~mixxxdevelopers/mixxx/engine-control-refactor

« back to all changes in this revision

Viewing changes to mixxx/src/dlgbpmscheme.cpp

  • Committer: RJ Ryan
  • Date: 2013-06-04 00:41:29 UTC
  • mfrom: (2890.22.101 mixxx)
  • Revision ID: rryan@mixxx.org-20130604004129-8jjxkicsb3givu4a
MergingĀ fromĀ lp:mixxx.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
                          dlgbpmscheme.cpp  -  description
3
 
                             -------------------
4
 
    begin                : Thu Jun 7 2007
5
 
    copyright            : (C) 2007 by John Sully
6
 
    email                : jsully@scs.ryerson.ca
7
 
***************************************************************************/
8
 
 
9
 
/***************************************************************************
10
 
*                                                                         *
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.                                   *
15
 
*                                                                         *
16
 
***************************************************************************/
17
 
 
18
 
#include <QtCore>
19
 
 
20
 
#include "dlgbpmscheme.h"
21
 
#include "bpm/bpmscheme.h"
22
 
 
23
 
DlgBpmScheme::DlgBpmScheme(BpmScheme *& bpmScheme) : QDialog(), Ui::DlgBpmSchemeDlg(), m_BpmScheme(bpmScheme)
24
 
{
25
 
    setupUi(this);
26
 
    
27
 
    connect(buttonBox, SIGNAL(accepted()), this,      SLOT(slotApply()));
28
 
    //connect(chkAnalyzeEntireSong,   SIGNAL(stateChanged(int)), this, SLOT(slotSetAnalyzeMode(int)));
29
 
    
30
 
    // Check to see if this is a new scheme. If so, create it with default values
31
 
    if(!bpmScheme)
32
 
    {
33
 
        bpmScheme = new BpmScheme("New Scheme Name", 50, 150, false);
34
 
    }
35
 
    
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());    
41
 
}
42
 
 
43
 
DlgBpmScheme::~DlgBpmScheme()
44
 
{
45
 
}
46
 
 
47
 
void DlgBpmScheme::slotApply()
48
 
{
49
 
    m_BpmScheme->setName(txtSchemeName->text());
50
 
    m_BpmScheme->setMinBpm(spinBpmMin->value());
51
 
    m_BpmScheme->setMaxBpm(spinBpmMax->value());
52
 
    m_BpmScheme->setAnalyzeEntireSong(chkAnalyzeEntireSong->isChecked());
53
 
}
54
 
 
55
 
void DlgBpmScheme::slotUpdate()
56
 
{
57
 
}
58