![]() |
Mixxx
|
00001 /*************************************************************************** 00002 dlgbpmscheme.cpp - description 00003 ------------------- 00004 begin : Thu Jun 7 2007 00005 copyright : (C) 2007 by John Sully 00006 email : jsully@scs.ryerson.ca 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #include <QtCore> 00019 00020 #include "dlgbpmscheme.h" 00021 #include "bpm/bpmscheme.h" 00022 00023 DlgBpmScheme::DlgBpmScheme(BpmScheme *& bpmScheme) : QDialog(), Ui::DlgBpmSchemeDlg(), m_BpmScheme(bpmScheme) 00024 { 00025 setupUi(this); 00026 00027 connect(buttonBox, SIGNAL(accepted()), this, SLOT(slotApply())); 00028 //connect(chkAnalyzeEntireSong, SIGNAL(stateChanged(int)), this, SLOT(slotSetAnalyzeMode(int))); 00029 00030 // Check to see if this is a new scheme. If so, create it with default values 00031 if(!bpmScheme) 00032 { 00033 bpmScheme = new BpmScheme("New Scheme Name", 50, 150, false); 00034 } 00035 00036 // Populate the dialog values 00037 txtSchemeName->setText(bpmScheme->getName()); 00038 spinBpmMin->setValue(bpmScheme->getMinBpm()); 00039 spinBpmMax->setValue(bpmScheme->getMaxBpm()); 00040 chkAnalyzeEntireSong->setChecked(bpmScheme->getAnalyzeEntireSong()); 00041 } 00042 00043 DlgBpmScheme::~DlgBpmScheme() 00044 { 00045 } 00046 00047 void DlgBpmScheme::slotApply() 00048 { 00049 m_BpmScheme->setName(txtSchemeName->text()); 00050 m_BpmScheme->setMinBpm(spinBpmMin->value()); 00051 m_BpmScheme->setMaxBpm(spinBpmMax->value()); 00052 m_BpmScheme->setAnalyzeEntireSong(chkAnalyzeEntireSong->isChecked()); 00053 } 00054 00055 void DlgBpmScheme::slotUpdate() 00056 { 00057 } 00058