Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add icon

  • Loading branch information...
commit 338dee788afc0fc2963756262f86d478db987c3d 1 parent f640317
Pavol Rusnak prusnak authored
BIN  software/icon.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 software/mainwindow.cpp
View
@@ -2,6 +2,7 @@
#include "ui_mainwindow.h"
#include <gst/gst.h>
#include <gst/interfaces/xoverlay.h>
+#include <QMessageBox>
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();
+}
3  software/mainwindow.h
View
@@ -17,6 +17,9 @@ class MainWindow : public QMainWindow
private slots:
+ void on_pushExit_clicked();
+ void on_pushAbout_clicked();
+
private:
Ui::MainWindow *ui;
};
12 software/mainwindow.ui
View
@@ -13,6 +13,10 @@
<property name="windowTitle">
<string>µView</string>
</property>
+ <property name="windowIcon">
+ <iconset resource="resources.qrc">
+ <normaloff>:/icons/icon.png</normaloff>:/icons/icon.png</iconset>
+ </property>
<widget class="QWidget" name="centralWidget">
<widget class="VideoView" name="wgtVideo" native="true">
<property name="geometry">
@@ -128,7 +132,7 @@
<string>E&amp;xit</string>
</property>
</widget>
- <widget class="QPushButton" name="pushAbout_2">
+ <widget class="QPushButton" name="pushAbout">
<property name="geometry">
<rect>
<x>660</x>
@@ -159,9 +163,11 @@
<tabstop>pushZoomIn</tabstop>
<tabstop>pushZoomOut</tabstop>
<tabstop>pushSnap</tabstop>
- <tabstop>pushAbout_2</tabstop>
+ <tabstop>pushAbout</tabstop>
<tabstop>pushExit</tabstop>
</tabstops>
- <resources/>
+ <resources>
+ <include location="resources.qrc"/>
+ </resources>
<connections/>
</ui>
3  software/microview.pro
View
@@ -23,3 +23,6 @@ unix {
CONFIG += link_pkgconfig
PKGCONFIG += gstreamer-0.10 gstreamer-interfaces-0.10
}
+
+RESOURCES += \
+ resources.qrc
5 software/resources.qrc
View
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="icons">
+ <file>icon.png</file>
+ </qresource>
+</RCC>
Please sign in to comment.
Something went wrong with that request. Please try again.