Add a few buttons to the toolbar.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
parent
8dd454af4d
commit
bcf57a4e19
2 changed files with 31 additions and 1 deletions
|
@ -168,13 +168,17 @@ QApple::QApple(QWidget *parent) :
|
|||
{
|
||||
setupUi(this);
|
||||
|
||||
actionStart->setIcon(style()->standardIcon(QStyle::SP_MediaPlay));
|
||||
actionPause->setIcon(style()->standardIcon(QStyle::SP_MediaPause));
|
||||
actionReboot->setIcon(style()->standardIcon(QStyle::SP_MediaSkipForward));
|
||||
|
||||
myEmulator = new Emulator(mdiArea);
|
||||
myEmulatorWindow = mdiArea->addSubWindow(myEmulator, Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint);
|
||||
|
||||
myMSGap = 5;
|
||||
|
||||
on_actionPause_triggered();
|
||||
initialiseEmulator();
|
||||
|
||||
startEmulator(myEmulatorWindow);
|
||||
}
|
||||
|
||||
|
@ -225,6 +229,10 @@ void QApple::on_actionStart_triggered()
|
|||
myElapsedTimer.start();
|
||||
actionPause->setEnabled(true);
|
||||
actionStart->setEnabled(false);
|
||||
|
||||
actionChange->setIcon(style()->standardIcon(QStyle::SP_MediaPause));
|
||||
actionChange->disconnect(SIGNAL(triggered(bool)));
|
||||
connect(actionChange, SIGNAL(triggered(bool)), this, SLOT(on_actionPause_triggered()));
|
||||
}
|
||||
|
||||
void QApple::on_actionPause_triggered()
|
||||
|
@ -232,6 +240,10 @@ void QApple::on_actionPause_triggered()
|
|||
stopTimer();
|
||||
actionPause->setEnabled(false);
|
||||
actionStart->setEnabled(true);
|
||||
|
||||
actionChange->setIcon(style()->standardIcon(QStyle::SP_MediaPlay));
|
||||
actionChange->disconnect(SIGNAL(triggered(bool)));
|
||||
connect(actionChange, SIGNAL(triggered(bool)), this, SLOT(on_actionStart_triggered()));
|
||||
}
|
||||
|
||||
void QApple::on_actionX1_triggered()
|
||||
|
|
|
@ -79,6 +79,19 @@
|
|||
<addaction name="actionX2"/>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusBar"/>
|
||||
<widget class="QToolBar" name="toolBar">
|
||||
<property name="windowTitle">
|
||||
<string>toolBar</string>
|
||||
</property>
|
||||
<attribute name="toolBarArea">
|
||||
<enum>TopToolBarArea</enum>
|
||||
</attribute>
|
||||
<attribute name="toolBarBreak">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<addaction name="actionChange"/>
|
||||
<addaction name="actionReboot"/>
|
||||
</widget>
|
||||
<action name="actionStart">
|
||||
<property name="text">
|
||||
<string>&Start</string>
|
||||
|
@ -127,6 +140,11 @@
|
|||
<string>&Options...</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionChange">
|
||||
<property name="text">
|
||||
<string>Change</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
|
|
Loading…
Add table
Reference in a new issue