Diffstat (limited to 'noncore/multimedia/tonleiter/editinst.cpp') (more/less context) (ignore 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,29 +1,31 @@ #include "editinst.h" #include <qlabel.h> #include <qpushbutton.h> +#include <qpe/qpeapplication.h> + Menu::InstEditDialog::InstEditDialog(TonleiterData* data,QWidget* parent,const char* name) :QDialog(parent,name,true,0),data(data) { setCaption("Tonleiter::"+tr("Instrument")); QBoxLayout* masterlayout=new QBoxLayout(this,QBoxLayout::TopToBottom); instid=data->getCurrentInstrumentID(); stringlist.setAutoDelete(true); QBoxLayout* toplayout=new QBoxLayout(masterlayout,QBoxLayout::LeftToRight); //Name combo + Add + Delete boxInst=new QComboBox(this,"boxInst"); boxInst->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum)); connect(boxInst,SIGNAL(activated(int)),this,SLOT(setCurrentInstrumetID(int))); for(int i=0;i<data->noOfInstruments();i++) { Instrument inst=data->getInstrument(i); QString name=inst.instName(); if(name.isNull()) continue; boxInst->insertItem(name,i); } boxInst->setCurrentItem(instid); toplayout->addWidget(boxInst); @@ -33,49 +35,49 @@ Menu::InstEditDialog::InstEditDialog(TonleiterData* data,QWidget* parent,const c QPushButton* delButton=new QPushButton(tr("Delete"),this,"delButton"); connect(delButton,SIGNAL(pressed()),this,SLOT(deleteInstrument())); toplayout->addWidget(delButton); QPushButton* addhighButton=new QPushButton(tr("Add High String"),this,"addhighButton"); masterlayout->addWidget(addhighButton); scrollview=new QScrollView(this); scrollview->setVScrollBarMode(QScrollView::AlwaysOn); scrollview->setHScrollBarMode(QScrollView::AlwaysOff); stringwidget=new QVBox(scrollview->viewport()); stringwidget->setSizePolicy(QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum)); stringwidget->setSpacing(10); scrollview->addChild(stringwidget); scrollview->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum)); masterlayout->addWidget(scrollview); loadInstrument(); QPushButton* addlowButton=new QPushButton(tr("Add Low String"),this,"addlowButton"); masterlayout->addWidget(addlowButton); //make dialog fit the screen - showMaximized(); + QPEApplication::showDialog( this ); } //**************************************************************************** Menu::InstEditDialog::~InstEditDialog() { } //**************************************************************************** void Menu::InstEditDialog::setCurrentInstrumetID(int id) { saveInstrument(); instid=id; data->setCurrentInstrumetID(id); loadInstrument(); } //**************************************************************************** void Menu::InstEditDialog::addInstrument() { } //**************************************************************************** void Menu::InstEditDialog::deleteInstrument() { } //**************************************************************************** void Menu::InstEditDialog::addLowString() { |