Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

editscale.cpp

Go to the documentation of this file.
00001 #include "editscale.h"
00002 
00003 #include <qlayout.h>
00004 #include <qpushbutton.h>
00005 
00006 #include <qpe/qpeapplication.h>
00007 
00008 Menu::ScaleEditDialog::ScaleEditDialog(TonleiterData* data,QWidget* parent,const char* name)
00009 :QDialog(parent,name,true,0),data(data)
00010 {
00011     setCaption("Tonleiter::"+tr("Scale"));
00012     QBoxLayout* masterlayout=new QBoxLayout(this,QBoxLayout::TopToBottom);
00013 
00014     QBoxLayout* toplayout=new QBoxLayout(masterlayout,QBoxLayout::LeftToRight);
00015 
00016     boxScale=new QComboBox(this,"boxScale");
00017     for(int s=0;s<data->noOfScales();s++)
00018     {
00019         Scale scale=data->getScale(s);
00020         QString name=scale.scaleName();
00021         if(name.isNull()) continue;
00022         //boxScale->insertItem(name,s);
00023     }
00024     boxScale->setCurrentItem(data->getCurrentScaleID());
00025     boxScale->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum));
00026     connect(boxScale,SIGNAL(activated(int)),data,SLOT(setCurrentScaleID(int)));
00027     toplayout->addWidget(boxScale);
00028 
00029     QPushButton* addButton=new QPushButton(tr("Add"),this,"addButton");
00030     connect(addButton,SIGNAL(pressed()),this,SLOT(addInstrument()));
00031     toplayout->addWidget(addButton);
00032 
00033     QPushButton* delButton=new QPushButton(tr("Delete"),this,"delButton");
00034     connect(delButton,SIGNAL(pressed()),this,SLOT(deleteInstrument()));
00035     toplayout->addWidget(delButton);
00036 
00037     pianoscale=new PianoScale(this);
00038     masterlayout->addWidget(pianoscale);
00039     
00040     //make dialog fit the screen
00041     QPEApplication::showDialog( this );
00042 }
00043 //****************************************************************************
00044 Menu::ScaleEditDialog::~ScaleEditDialog()
00045 {
00046 }
00047 //****************************************************************************
00048 //****************************************************************************

Generated on Sat Nov 5 16:17:35 2005 for OPIE by  doxygen 1.4.2