aboutsummaryrefslogtreecommitdiff
path: root/dev-tools
diff options
context:
space:
mode:
Diffstat (limited to 'dev-tools')
-rw-r--r--dev-tools/test-dbus/main.cpp12
-rw-r--r--dev-tools/test-dbus/test.h27
-rw-r--r--dev-tools/test-dbus/test.pro14
-rw-r--r--dev-tools/test-dbus/test.ui80
4 files changed, 133 insertions, 0 deletions
diff --git a/dev-tools/test-dbus/main.cpp b/dev-tools/test-dbus/main.cpp
new file mode 100644
index 00000000..0025ad07
--- /dev/null
+++ b/dev-tools/test-dbus/main.cpp
@@ -0,0 +1,12 @@
+#include <QApplication>
+#include "test.h"
+
+int main(int argc, char ** argv)
+{
+ QApplication a(argc, argv);
+ Test w;
+ w.show();
+
+ int retCode = a.exec();
+ return retCode;
+} \ No newline at end of file
diff --git a/dev-tools/test-dbus/test.h b/dev-tools/test-dbus/test.h
new file mode 100644
index 00000000..313115a7
--- /dev/null
+++ b/dev-tools/test-dbus/test.h
@@ -0,0 +1,27 @@
+#include <QDialog>
+#include <QDebug>
+
+#include "ui_test.h"
+
+namespace Ui{
+ class Test;
+};
+
+class Test : public QDialog{
+ Q_OBJECT
+
+private:
+ Ui::Test *ui;
+
+private slots:
+ void on_push_close_clicked(){ this->close(); }
+
+public:
+ Test() : QDialog(), ui(new Ui::Test){
+ qDebug() << "Creating Test Dialog:";
+ ui->setupUi(this);
+ qDebug() << "Loaded Dialog";
+ }
+ ~Test(){ delete ui; }
+
+};
diff --git a/dev-tools/test-dbus/test.pro b/dev-tools/test-dbus/test.pro
new file mode 100644
index 00000000..89e2105c
--- /dev/null
+++ b/dev-tools/test-dbus/test.pro
@@ -0,0 +1,14 @@
+# Simple Qt program to test whether UI files can be loaded when there is no DBUS session running
+
+QT = core gui widgets
+#Just for consistency - remove the dbus module from this app build (in case "gui" or "widgets" pulled it in)
+QT -= dbus
+
+TARGET = test
+target.path = $${PWD}
+
+SOURCES = main.cpp
+
+HEADERS = test.h
+
+FORMS = test.ui \ No newline at end of file
diff --git a/dev-tools/test-dbus/test.ui b/dev-tools/test-dbus/test.ui
new file mode 100644
index 00000000..64bd4125
--- /dev/null
+++ b/dev-tools/test-dbus/test.ui
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Test</class>
+ <widget class="QDialog" name="Test">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>300</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Dialog</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="1">
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>119</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="1" column="0">
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>142</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="1" column="1">
+ <widget class="QPushButton" name="push_close">
+ <property name="text">
+ <string>Close Test</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>142</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="2" column="1">
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>119</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
bgstack15