diff --git a/software/icon.png b/software/icon.png new file mode 100644 index 0000000..5817e51 Binary files /dev/null and b/software/icon.png differ diff --git a/software/mainwindow.cpp b/software/mainwindow.cpp index 661fe86..9a15080 100644 --- a/software/mainwindow.cpp +++ b/software/mainwindow.cpp @@ -2,6 +2,7 @@ #include "ui_mainwindow.h" #include #include +#include MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), @@ -30,3 +31,15 @@ MainWindow::MainWindow(QWidget *parent) : MainWindow::~MainWindow() { } + +void MainWindow::on_pushExit_clicked() +{ + close(); +} + +void MainWindow::on_pushAbout_clicked() +{ + QMessageBox aboutBox(QMessageBox::NoIcon, "About µView", QString::fromUtf8("µView\n\nhackerspace brmlab - http://brmlab.cz/\n\nSee README for more info and COPYING for the license." ), QMessageBox::Ok, this); + aboutBox.setIconPixmap(QPixmap(":/icons/icon.png")); + aboutBox.exec(); +} diff --git a/software/mainwindow.h b/software/mainwindow.h index 276d0e1..1799310 100644 --- a/software/mainwindow.h +++ b/software/mainwindow.h @@ -17,6 +17,9 @@ public: private slots: + void on_pushExit_clicked(); + void on_pushAbout_clicked(); + private: Ui::MainWindow *ui; }; diff --git a/software/mainwindow.ui b/software/mainwindow.ui index b273b09..99c572e 100644 --- a/software/mainwindow.ui +++ b/software/mainwindow.ui @@ -13,6 +13,10 @@ µView + + + :/icons/icon.png:/icons/icon.png + @@ -128,7 +132,7 @@ E&xit - + 660 @@ -159,9 +163,11 @@ pushZoomIn pushZoomOut pushSnap - pushAbout_2 + pushAbout pushExit - + + + diff --git a/software/microview.pro b/software/microview.pro index b6ff7f2..25758eb 100644 --- a/software/microview.pro +++ b/software/microview.pro @@ -23,3 +23,6 @@ unix { CONFIG += link_pkgconfig PKGCONFIG += gstreamer-0.10 gstreamer-interfaces-0.10 } + +RESOURCES += \ + resources.qrc diff --git a/software/resources.qrc b/software/resources.qrc new file mode 100644 index 0000000..32e95c2 --- /dev/null +++ b/software/resources.qrc @@ -0,0 +1,5 @@ + + + icon.png + +