Diffstat (limited to 'noncore/multimedia/tonleiter/menuwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/tonleiter/menuwidget.cpp | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/noncore/multimedia/tonleiter/menuwidget.cpp b/noncore/multimedia/tonleiter/menuwidget.cpp index 3dfa09d..1e3742c 100644 --- a/noncore/multimedia/tonleiter/menuwidget.cpp +++ b/noncore/multimedia/tonleiter/menuwidget.cpp | |||
@@ -3,7 +3,10 @@ | |||
3 | #include <qlabel.h> | 3 | #include <qlabel.h> |
4 | #include <qlayout.h> | 4 | #include <qlayout.h> |
5 | 5 | ||
6 | MenuWidget::MenuWidget(TonleiterData* data,QWidget* parent,const char* name,WFlags f) | 6 | #include "editinst.h" |
7 | #include "editscale.h" | ||
8 | |||
9 | Menu::MenuWidget::MenuWidget(TonleiterData* data,QWidget* parent,const char* name,WFlags f) | ||
7 | :QWidget(parent,name,f),data(data) | 10 | :QWidget(parent,name,f),data(data) |
8 | { | 11 | { |
9 | QGridLayout* layout=new QGridLayout(this,3,3,10,-1,"menulayout"); | 12 | QGridLayout* layout=new QGridLayout(this,3,3,10,-1,"menulayout"); |
@@ -14,6 +17,7 @@ MenuWidget::MenuWidget(TonleiterData* data,QWidget* parent,const char* name,WFla | |||
14 | connect(boxInst,SIGNAL(activated(int)),data,SLOT(setCurrentInstrumetID(int))); | 17 | connect(boxInst,SIGNAL(activated(int)),data,SLOT(setCurrentInstrumetID(int))); |
15 | layout->addWidget(boxInst,0,1); | 18 | layout->addWidget(boxInst,0,1); |
16 | editInst=new QPushButton(tr("Edit"),this,"editInst"); | 19 | editInst=new QPushButton(tr("Edit"),this,"editInst"); |
20 | connect(editInst,SIGNAL(pressed()),this,SLOT(editInstPressed())); | ||
17 | layout->addWidget(editInst,0,2); | 21 | layout->addWidget(editInst,0,2); |
18 | 22 | ||
19 | QLabel* noteLabel=new QLabel(tr("Note"),this,"noteLabel"); | 23 | QLabel* noteLabel=new QLabel(tr("Note"),this,"noteLabel"); |
@@ -35,17 +39,30 @@ MenuWidget::MenuWidget(TonleiterData* data,QWidget* parent,const char* name,WFla | |||
35 | connect(boxScale,SIGNAL(activated(int)),data,SLOT(setCurrentScaleID(int))); | 39 | connect(boxScale,SIGNAL(activated(int)),data,SLOT(setCurrentScaleID(int))); |
36 | layout->addWidget(boxScale,2,1); | 40 | layout->addWidget(boxScale,2,1); |
37 | editScale=new QPushButton(tr("Edit"),this,"editScale"); | 41 | editScale=new QPushButton(tr("Edit"),this,"editScale"); |
42 | connect(editScale,SIGNAL(pressed()),this,SLOT(editScalePressed())); | ||
38 | layout->addWidget(editScale,2,2); | 43 | layout->addWidget(editScale,2,2); |
39 | 44 | ||
40 | updateBoxes(); | 45 | updateBoxes(); |
41 | 46 | ||
42 | } | 47 | } |
43 | //**************************************************************************** | 48 | //**************************************************************************** |
44 | MenuWidget::~MenuWidget() | 49 | Menu::MenuWidget::~MenuWidget() |
50 | { | ||
51 | } | ||
52 | //**************************************************************************** | ||
53 | void Menu::MenuWidget::editInstPressed() | ||
54 | { | ||
55 | InstEditDialog* instdialog=new InstEditDialog(data,this); | ||
56 | instdialog->exec(); | ||
57 | } | ||
58 | //**************************************************************************** | ||
59 | void Menu::MenuWidget::editScalePressed() | ||
45 | { | 60 | { |
61 | ScaleEditDialog* scaledialog=new ScaleEditDialog(data,this); | ||
62 | scaledialog->exec(); | ||
46 | } | 63 | } |
47 | //**************************************************************************** | 64 | //**************************************************************************** |
48 | void MenuWidget::updateBoxes() | 65 | void Menu::MenuWidget::updateBoxes() |
49 | { | 66 | { |
50 | boxInst->clear(); | 67 | boxInst->clear(); |
51 | 68 | ||