qt: Add status text and icons to toolbar
This commit is contained in:
Binary file not shown.
Before Width: | Height: | Size: 4.8 KiB |
@@ -69,14 +69,24 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
statusBar()->setStyleSheet("QStatusBar::item {border: None; } QStatusBar QLabel { margin-right: 2px; margin-bottom: 1px; }");
|
||||
ui->toolBar->setVisible(!hide_tool_bar);
|
||||
|
||||
auto toolbar_spacer = new QWidget();
|
||||
toolbar_spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
ui->toolBar->addWidget(toolbar_spacer);
|
||||
|
||||
auto toolbar_label = new QLabel();
|
||||
ui->toolBar->addWidget(toolbar_label);
|
||||
|
||||
this->setWindowIcon(QIcon(":/settings/win/icons/86Box-yellow.ico"));
|
||||
this->setWindowFlag(Qt::MSWindowsFixedSizeDialogHint, vid_resize != 1);
|
||||
this->setWindowFlag(Qt::WindowMaximizeButtonHint, vid_resize == 1);
|
||||
|
||||
this->setWindowTitle(QString("%1 - %2 %3").arg(vm_name, EMU_NAME_W, EMU_VERSION_FULL_W));
|
||||
|
||||
connect(this, &MainWindow::showMessageForNonQtThread, this, &MainWindow::showMessage_, Qt::BlockingQueuedConnection);
|
||||
|
||||
connect(this, &MainWindow::setTitle, this, [this](const QString& title) {
|
||||
setWindowTitle(title);
|
||||
connect(this, &MainWindow::setTitle, this, [this,toolbar_label](const QString& title) {
|
||||
if (!hide_tool_bar)
|
||||
toolbar_label->setText(title);
|
||||
});
|
||||
connect(this, &MainWindow::getTitleForNonQtThread, this, &MainWindow::getTitle_, Qt::BlockingQueuedConnection);
|
||||
|
||||
|
@@ -203,6 +203,9 @@
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonIconOnly</enum>
|
||||
</property>
|
||||
<property name="floatable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
@@ -213,10 +216,11 @@
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<addaction name="actionPause"/>
|
||||
<addaction name="actionHard_Reset"/>
|
||||
<addaction name="actionACPI_Shutdown"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionCtrl_Alt_Del"/>
|
||||
<addaction name="actionCtrl_Alt_Esc"/>
|
||||
<addaction name="actionHard_Reset"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionSettings"/>
|
||||
</widget>
|
||||
@@ -239,7 +243,7 @@
|
||||
<action name="actionHard_Reset">
|
||||
<property name="icon">
|
||||
<iconset resource="../qt_resources.qrc">
|
||||
<normaloff>:/menuicons/qt/icons/placeholder.png</normaloff>:/menuicons/qt/icons/placeholder.png</iconset>
|
||||
<normaloff>:/menuicons/win/icons/hard_reset.ico</normaloff>:/menuicons/win/icons/hard_reset.ico</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Hard Reset...</string>
|
||||
@@ -251,7 +255,7 @@
|
||||
<action name="actionCtrl_Alt_Del">
|
||||
<property name="icon">
|
||||
<iconset resource="../qt_resources.qrc">
|
||||
<normaloff>:/menuicons/qt/icons/placeholder.png</normaloff>:/menuicons/qt/icons/placeholder.png</iconset>
|
||||
<normaloff>:/menuicons/win/icons/send_cad.ico</normaloff>:/menuicons/win/icons/send_cad.ico</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Ctrl+Alt+Del</string>
|
||||
@@ -272,7 +276,7 @@
|
||||
<action name="actionCtrl_Alt_Esc">
|
||||
<property name="icon">
|
||||
<iconset resource="../qt_resources.qrc">
|
||||
<normaloff>:/menuicons/qt/icons/placeholder.png</normaloff>:/menuicons/qt/icons/placeholder.png</iconset>
|
||||
<normaloff>:/menuicons/win/icons/send_cae.ico</normaloff>:/menuicons/win/icons/send_cae.ico</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ctrl+Alt+&Esc</string>
|
||||
@@ -287,7 +291,7 @@
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../qt_resources.qrc">
|
||||
<normaloff>:/menuicons/qt/icons/placeholder.png</normaloff>:/menuicons/qt/icons/placeholder.png</iconset>
|
||||
<normaloff>:/menuicons/win/icons/pause.ico</normaloff>:/menuicons/win/icons/pause.ico</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Pause</string>
|
||||
@@ -304,7 +308,7 @@
|
||||
<action name="actionSettings">
|
||||
<property name="icon">
|
||||
<iconset resource="../qt_resources.qrc">
|
||||
<normaloff>:/menuicons/qt/icons/placeholder.png</normaloff>:/menuicons/qt/icons/placeholder.png</iconset>
|
||||
<normaloff>:/menuicons/win/icons/settings.ico</normaloff>:/menuicons/win/icons/settings.ico</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Settings...</string>
|
||||
@@ -647,6 +651,21 @@
|
||||
<string>Hide tool bar</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionACPI_Shutdown">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../qt_resources.qrc">
|
||||
<normaloff>:/menuicons/win/icons/acpi_shutdown.ico</normaloff>:/menuicons/win/icons/acpi_shutdown.ico</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ACPI Shutdown</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>ACPI Shutdown</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
@@ -49,6 +49,12 @@
|
||||
<file>win/icons/86Box-yellow.ico</file>
|
||||
</qresource>
|
||||
<qresource prefix="/menuicons">
|
||||
<file>qt/icons/placeholder.png</file>
|
||||
<file>win/icons/acpi_shutdown.ico</file>
|
||||
<file>win/icons/hard_reset.ico</file>
|
||||
<file>win/icons/pause.ico</file>
|
||||
<file>win/icons/run.ico</file>
|
||||
<file>win/icons/send_cad.ico</file>
|
||||
<file>win/icons/send_cae.ico</file>
|
||||
<file>win/icons/settings.ico</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
Reference in New Issue
Block a user