1
/***************************************************************************
2
dlgbpmscheme.cpp - description
5
copyright : (C) 2007 by John Sully
6
email : jsully@scs.ryerson.ca
7
***************************************************************************/
9
/***************************************************************************
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
16
***************************************************************************/
20
#include "dlgbpmscheme.h"
21
#include "bpm/bpmscheme.h"
23
DlgBpmScheme::DlgBpmScheme(BpmScheme *& bpmScheme) : QDialog(), Ui::DlgBpmSchemeDlg(), m_BpmScheme(bpmScheme)
27
connect(buttonBox, SIGNAL(accepted()), this, SLOT(slotApply()));
28
//connect(chkAnalyzeEntireSong, SIGNAL(stateChanged(int)), this, SLOT(slotSetAnalyzeMode(int)));
30
// Check to see if this is a new scheme. If so, create it with default values
33
bpmScheme = new BpmScheme("New Scheme Name", 50, 150, false);
36
// Populate the dialog values
37
txtSchemeName->setText(bpmScheme->getName());
38
spinBpmMin->setValue(bpmScheme->getMinBpm());
39
spinBpmMax->setValue(bpmScheme->getMaxBpm());
40
chkAnalyzeEntireSong->setChecked(bpmScheme->getAnalyzeEntireSong());
43
DlgBpmScheme::~DlgBpmScheme()
47
void DlgBpmScheme::slotApply()
49
m_BpmScheme->setName(txtSchemeName->text());
50
m_BpmScheme->setMinBpm(spinBpmMin->value());
51
m_BpmScheme->setMaxBpm(spinBpmMax->value());
52
m_BpmScheme->setAnalyzeEntireSong(chkAnalyzeEntireSong->isChecked());
55
void DlgBpmScheme::slotUpdate()