Diffstat (limited to 'noncore/multimedia/tonleiter/editscale.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/tonleiter/editscale.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/noncore/multimedia/tonleiter/editscale.cpp b/noncore/multimedia/tonleiter/editscale.cpp index 593a150..0be0058 100644 --- a/noncore/multimedia/tonleiter/editscale.cpp +++ b/noncore/multimedia/tonleiter/editscale.cpp | |||
@@ -1,14 +1,46 @@ | |||
1 | #include "editscale.h" | 1 | #include "editscale.h" |
2 | 2 | ||
3 | #include <qlayout.h> | ||
4 | #include <qpushbutton.h> | ||
5 | |||
3 | Menu::ScaleEditDialog::ScaleEditDialog(TonleiterData* data,QWidget* parent,const char* name) | 6 | Menu::ScaleEditDialog::ScaleEditDialog(TonleiterData* data,QWidget* parent,const char* name) |
4 | :QDialog(parent,name,true,0),data(data) | 7 | :QDialog(parent,name,true,0),data(data) |
5 | { | 8 | { |
6 | setCaption("Tonleiter::"+tr("Scale")); | 9 | setCaption("Tonleiter::"+tr("Scale")); |
10 | QBoxLayout* masterlayout=new QBoxLayout(this,QBoxLayout::TopToBottom); | ||
11 | |||
12 | QBoxLayout* toplayout=new QBoxLayout(masterlayout,QBoxLayout::LeftToRight); | ||
13 | |||
14 | boxScale=new QComboBox(this,"boxScale"); | ||
15 | for(int s=0;s<data->noOfScales();s++) | ||
16 | { | ||
17 | Scale scale=data->getScale(s); | ||
18 | QString name=scale.scaleName(); | ||
19 | if(name.isNull()) continue; | ||
20 | //boxScale->insertItem(name,s); | ||
21 | } | ||
22 | boxScale->setCurrentItem(data->getCurrentScaleID()); | ||
23 | boxScale->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum)); | ||
24 | connect(boxScale,SIGNAL(activated(int)),data,SLOT(setCurrentScaleID(int))); | ||
25 | toplayout->addWidget(boxScale); | ||
26 | |||
27 | QPushButton* addButton=new QPushButton(tr("Add"),this,"addButton"); | ||
28 | connect(addButton,SIGNAL(pressed()),this,SLOT(addInstrument())); | ||
29 | toplayout->addWidget(addButton); | ||
30 | |||
31 | QPushButton* delButton=new QPushButton(tr("Delete"),this,"delButton"); | ||
32 | connect(delButton,SIGNAL(pressed()),this,SLOT(deleteInstrument())); | ||
33 | toplayout->addWidget(delButton); | ||
34 | |||
35 | pianoscale=new PianoScale(this); | ||
36 | masterlayout->addWidget(pianoscale); | ||
37 | |||
38 | //make dialog fit the screen | ||
7 | showMaximized(); | 39 | showMaximized(); |
8 | } | 40 | } |
9 | //**************************************************************************** | 41 | //**************************************************************************** |
10 | Menu::ScaleEditDialog::~ScaleEditDialog() | 42 | Menu::ScaleEditDialog::~ScaleEditDialog() |
11 | { | 43 | { |
12 | } | 44 | } |
13 | //**************************************************************************** | 45 | //**************************************************************************** |
14 | //**************************************************************************** | 46 | //**************************************************************************** |