wire up other menu items, add app logo icon

This commit is contained in:
mappu 2017-05-20 15:20:30 +12:00
parent e8030a9579
commit 4b3fb783c4
6 changed files with 40 additions and 4 deletions

View File

@ -13,6 +13,8 @@ int main(int argc, char *argv[])
}
QApplication a(argc, argv);
QApplication::setApplicationDisplayName("QBolt");
MainWindow w;
w.show();

View File

@ -39,3 +39,26 @@ void MainWindow::on_actionOpen_database_triggered()
// Free
delete bdb;
}
void MainWindow::on_actionExit_triggered()
{
close();
}
void MainWindow::on_actionAbout_Qt_triggered()
{
QApplication::aboutQt();
}
void MainWindow::on_actionAbout_qbolt_triggered()
{
QMessageBox::about(
this,
QApplication::applicationDisplayName(),
"<b>QBolt</b><br>Graphical interface for managing Bolt databases<br><br>"
"- <a href='https://github.com/boltdb/bolt'>About BoltDB</a><br>"
"- <a href='http://www.famfamfam.com/lab/icons/silk/'>FamFamFam &quot;Silk&quot; icon set</a><br>"
"- <a href='https://code.ivysaur.me/qbolt'>QBolt homepage</a><br>"
);
}

View File

@ -18,6 +18,12 @@ public:
private slots:
void on_actionOpen_database_triggered();
void on_actionExit_triggered();
void on_actionAbout_Qt_triggered();
void on_actionAbout_qbolt_triggered();
private:
Ui::MainWindow *ui;
};

View File

@ -13,6 +13,10 @@
<property name="windowTitle">
<string>QBolt</string>
</property>
<property name="windowIcon">
<iconset resource="resources.qrc">
<normaloff>:/rsrc/database_lightning.png</normaloff>:/rsrc/database_lightning.png</iconset>
</property>
<widget class="QWidget" name="centralWidget">
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
@ -172,12 +176,12 @@
<normaloff>:/rsrc/information.png</normaloff>:/rsrc/information.png</iconset>
</property>
<property name="text">
<string>About QBolt</string>
<string>&amp;About QBolt</string>
</property>
</action>
<action name="actionAbout_Qt">
<property name="text">
<string>About Qt</string>
<string>About &amp;Qt</string>
</property>
</action>
<action name="actionOpen_database">
@ -186,12 +190,12 @@
<normaloff>:/rsrc/database_add.png</normaloff>:/rsrc/database_add.png</iconset>
</property>
<property name="text">
<string>Open database...</string>
<string>&amp;Open database...</string>
</property>
</action>
<action name="actionExit">
<property name="text">
<string>Exit</string>
<string>&amp;Exit</string>
</property>
</action>
</widget>

View File

@ -3,5 +3,6 @@
<file>rsrc/database_add.png</file>
<file>rsrc/table.png</file>
<file>rsrc/information.png</file>
<file>rsrc/database_lightning.png</file>
</qresource>
</RCC>

BIN
qbolt/rsrc/database_lightning.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 775 B