Diffstat (limited to 'noncore/multimedia/tonleiter/editinst.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/tonleiter/editinst.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/multimedia/tonleiter/editinst.cpp b/noncore/multimedia/tonleiter/editinst.cpp index f172ef8..5616569 100644 --- a/noncore/multimedia/tonleiter/editinst.cpp +++ b/noncore/multimedia/tonleiter/editinst.cpp | |||
@@ -1,17 +1,19 @@ | |||
1 | #include "editinst.h" | 1 | #include "editinst.h" |
2 | 2 | ||
3 | #include <qlabel.h> | 3 | #include <qlabel.h> |
4 | #include <qpushbutton.h> | 4 | #include <qpushbutton.h> |
5 | 5 | ||
6 | #include <qpe/qpeapplication.h> | ||
7 | |||
6 | Menu::InstEditDialog::InstEditDialog(TonleiterData* data,QWidget* parent,const char* name) | 8 | Menu::InstEditDialog::InstEditDialog(TonleiterData* data,QWidget* parent,const char* name) |
7 | :QDialog(parent,name,true,0),data(data) | 9 | :QDialog(parent,name,true,0),data(data) |
8 | { | 10 | { |
9 | setCaption("Tonleiter::"+tr("Instrument")); | 11 | setCaption("Tonleiter::"+tr("Instrument")); |
10 | QBoxLayout* masterlayout=new QBoxLayout(this,QBoxLayout::TopToBottom); | 12 | QBoxLayout* masterlayout=new QBoxLayout(this,QBoxLayout::TopToBottom); |
11 | instid=data->getCurrentInstrumentID(); | 13 | instid=data->getCurrentInstrumentID(); |
12 | stringlist.setAutoDelete(true); | 14 | stringlist.setAutoDelete(true); |
13 | 15 | ||
14 | QBoxLayout* toplayout=new QBoxLayout(masterlayout,QBoxLayout::LeftToRight); | 16 | QBoxLayout* toplayout=new QBoxLayout(masterlayout,QBoxLayout::LeftToRight); |
15 | 17 | ||
16 | //Name combo + Add + Delete | 18 | //Name combo + Add + Delete |
17 | boxInst=new QComboBox(this,"boxInst"); | 19 | boxInst=new QComboBox(this,"boxInst"); |
@@ -45,25 +47,25 @@ Menu::InstEditDialog::InstEditDialog(TonleiterData* data,QWidget* parent,const c | |||
45 | stringwidget->setSizePolicy(QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum)); | 47 | stringwidget->setSizePolicy(QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum)); |
46 | stringwidget->setSpacing(10); | 48 | stringwidget->setSpacing(10); |
47 | scrollview->addChild(stringwidget); | 49 | scrollview->addChild(stringwidget); |
48 | scrollview->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum)); | 50 | scrollview->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum)); |
49 | masterlayout->addWidget(scrollview); | 51 | masterlayout->addWidget(scrollview); |
50 | 52 | ||
51 | loadInstrument(); | 53 | loadInstrument(); |
52 | 54 | ||
53 | QPushButton* addlowButton=new QPushButton(tr("Add Low String"),this,"addlowButton"); | 55 | QPushButton* addlowButton=new QPushButton(tr("Add Low String"),this,"addlowButton"); |
54 | masterlayout->addWidget(addlowButton); | 56 | masterlayout->addWidget(addlowButton); |
55 | 57 | ||
56 | //make dialog fit the screen | 58 | //make dialog fit the screen |
57 | showMaximized(); | 59 | QPEApplication::showDialog( this ); |
58 | } | 60 | } |
59 | //**************************************************************************** | 61 | //**************************************************************************** |
60 | Menu::InstEditDialog::~InstEditDialog() | 62 | Menu::InstEditDialog::~InstEditDialog() |
61 | { | 63 | { |
62 | } | 64 | } |
63 | //**************************************************************************** | 65 | //**************************************************************************** |
64 | void Menu::InstEditDialog::setCurrentInstrumetID(int id) | 66 | void Menu::InstEditDialog::setCurrentInstrumetID(int id) |
65 | { | 67 | { |
66 | saveInstrument(); | 68 | saveInstrument(); |
67 | instid=id; | 69 | instid=id; |
68 | data->setCurrentInstrumetID(id); | 70 | data->setCurrentInstrumetID(id); |
69 | loadInstrument(); | 71 | loadInstrument(); |