From 4b3fb783c4354c285aecd4c7b1b97d7a0464c53a Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 20 May 2017 15:20:30 +1200 Subject: [PATCH] wire up other menu items, add app logo icon --- qbolt/main.cpp | 2 ++ qbolt/mainwindow.cpp | 23 +++++++++++++++++++++++ qbolt/mainwindow.h | 6 ++++++ qbolt/mainwindow.ui | 12 ++++++++---- qbolt/resources.qrc | 1 + qbolt/rsrc/database_lightning.png | Bin 0 -> 775 bytes 6 files changed, 40 insertions(+), 4 deletions(-) create mode 100755 qbolt/rsrc/database_lightning.png diff --git a/qbolt/main.cpp b/qbolt/main.cpp index 7785f88..ae2bd5b 100644 --- a/qbolt/main.cpp +++ b/qbolt/main.cpp @@ -13,6 +13,8 @@ int main(int argc, char *argv[]) } QApplication a(argc, argv); + QApplication::setApplicationDisplayName("QBolt"); + MainWindow w; w.show(); diff --git a/qbolt/mainwindow.cpp b/qbolt/mainwindow.cpp index c16ff58..95a79ec 100644 --- a/qbolt/mainwindow.cpp +++ b/qbolt/mainwindow.cpp @@ -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(), + "QBolt
Graphical interface for managing Bolt databases

" + "- About BoltDB
" + "- FamFamFam "Silk" icon set
" + "- QBolt homepage
" + ); +} + diff --git a/qbolt/mainwindow.h b/qbolt/mainwindow.h index 7b68fa8..6e067f0 100644 --- a/qbolt/mainwindow.h +++ b/qbolt/mainwindow.h @@ -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; }; diff --git a/qbolt/mainwindow.ui b/qbolt/mainwindow.ui index a228d9a..7847836 100644 --- a/qbolt/mainwindow.ui +++ b/qbolt/mainwindow.ui @@ -13,6 +13,10 @@ QBolt + + + :/rsrc/database_lightning.png:/rsrc/database_lightning.png + @@ -172,12 +176,12 @@ :/rsrc/information.png:/rsrc/information.png - About QBolt + &About QBolt - About Qt + About &Qt @@ -186,12 +190,12 @@ :/rsrc/database_add.png:/rsrc/database_add.png - Open database... + &Open database... - Exit + &Exit diff --git a/qbolt/resources.qrc b/qbolt/resources.qrc index c94596f..cdeb017 100644 --- a/qbolt/resources.qrc +++ b/qbolt/resources.qrc @@ -3,5 +3,6 @@ rsrc/database_add.png rsrc/table.png rsrc/information.png + rsrc/database_lightning.png diff --git a/qbolt/rsrc/database_lightning.png b/qbolt/rsrc/database_lightning.png new file mode 100755 index 0000000000000000000000000000000000000000..d9eefc22513d4e100b3eea40d529bdc600913f88 GIT binary patch literal 775 zcmV+i1Ni)jP)5nA-%a4+}V@4MeQ=X-`y3jgzYw>wNE z5*85;QH)9{yJ+p8psh^O`jOT<6p7*CVPX8KfWSR;_8=4r^@hV?1cN~Y0s-iIg+c*q zYin3oSU@(LeL-jE{vwFSxdb>guXioAv$#n*<*5Hy`WXQQPW*6cdmY2Ttw-e0$D< zqaN8z#w|mGW3d>h51UPtLPm+;LQQZlc;O8^zCL=zMme9t5H5`|cvg>BpLcs$jf zxCG0uPt=msOa7)qbpR=MGBleFu}53-T&&w)_lJ{Jx~u`zUtWTQOqxag+{>}`{DQbNeQdIy48b9rSiL# zC6`Zp{;*Nvjc6UXh2@nJxZ_mw+E|fD1lnZjbb3?4R`T=Xp3_u9+hV@?dRh&Pb$`hO z^{g$+a)J7F4c1oHE}WT}$&jIjs!sg$u&Y-IA=}T-C#R>U_mRYF6eHB}20eG}zFaPc za=EO5_o