diff options
author | Jonathan Bauer | 2011-06-19 18:27:48 +0200 |
---|---|---|
committer | Jonathan Bauer | 2011-06-19 18:27:48 +0200 |
commit | ed226848f447ab4a5aed93b1acf95390a6ac856d (patch) | |
tree | d86280d2b80d61369d9b5dbe0dadecb18184e608 /src | |
parent | typo, sortof (diff) | |
download | fbsplash-ed226848f447ab4a5aed93b1acf95390a6ac856d.tar.gz fbsplash-ed226848f447ab4a5aed93b1acf95390a6ac856d.tar.xz fbsplash-ed226848f447ab4a5aed93b1acf95390a6ac856d.zip |
Layout using QT's external UI definition file
Diffstat (limited to 'src')
-rw-r--r-- | src/fbsplash.cpp | 13 | ||||
-rw-r--r-- | src/fbsplash.h | 15 | ||||
-rw-r--r-- | src/fbsplash.ui | 59 |
3 files changed, 79 insertions, 8 deletions
diff --git a/src/fbsplash.cpp b/src/fbsplash.cpp index d22cbbc..6815c61 100644 --- a/src/fbsplash.cpp +++ b/src/fbsplash.cpp @@ -1,15 +1,18 @@ #include <QProgressBar> #include "fbsplash.h" +#include "ui_fbsplash.h" -fbsplash::fbsplash() : - QMainWindow(){ +fbsplash::fbsplash(QWidget *parent) : + QWidget(parent), ui(new Ui::fbsplash){ qDebug() << "fbsplash init"; - //ui->setup(this); + ui->setupUi(this); createActions(); + + /* setupTheme(); @@ -33,6 +36,10 @@ fbsplash::fbsplash() : setAttribute(Qt::WA_QuitOnClose, true); setWindowFlags(Qt::FramelessWindowHint); showFullScreen(); + */ +} +fbsplash::~fbsplash(){ + delete ui; } //----------------------------------------------------------------------------- void fbsplash::setupTheme() { diff --git a/src/fbsplash.h b/src/fbsplash.h index 145b92a..efbaeb1 100644 --- a/src/fbsplash.h +++ b/src/fbsplash.h @@ -15,15 +15,20 @@ #define FBSPLASH_H #include <QtGui> +#include "ui_fbsplash.h" -//#include "ui_fbsplash.h" -//namespace Ui { class fbsplash; } -class fbsplash: public QMainWindow{ +namespace Ui { +class fbsplash; +} + + +class fbsplash: public QWidget { Q_OBJECT public: - fbsplash(); + fbsplash(QWidget *parent = 0); + virtual ~fbsplash(); private: void createActions(); @@ -35,7 +40,7 @@ private: QAction* _quit; QAction* _printSize; QLabel* _label; - //Ui::fbsplash *ui; + Ui::fbsplash *ui; // ** TESTING ** diff --git a/src/fbsplash.ui b/src/fbsplash.ui new file mode 100644 index 0000000..bee2404 --- /dev/null +++ b/src/fbsplash.ui @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>fbsplash</class> + <widget class="QWidget" name="fbsplash"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>1024</width> + <height>768</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <property name="styleSheet"> + <string notr="true"/> + </property> + <widget class="QLabel" name="label"> + <property name="geometry"> + <rect> + <x>390</x> + <y>300</y> + <width>201</width> + <height>61</height> + </rect> + </property> + <property name="font"> + <font> + <pointsize>20</pointsize> + </font> + </property> + <property name="styleSheet"> + <string notr="true"/> + </property> + <property name="text"> + <string>TextLabel</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + <widget class="QProgressBar" name="progressBar"> + <property name="geometry"> + <rect> + <x>420</x> + <y>380</y> + <width>181</width> + <height>21</height> + </rect> + </property> + <property name="value"> + <number>24</number> + </property> + </widget> + </widget> + <resources/> + <connections/> +</ui> |