aboutsummaryrefslogtreecommitdiff
path: root/examples/GuiClient
diff options
context:
space:
mode:
authorManjeet Dahiya <manjeetdahiya@gmail.com>2010-10-17 13:46:55 +0000
committerManjeet Dahiya <manjeetdahiya@gmail.com>2010-10-17 13:46:55 +0000
commit5dac70f3f45821cdb7035efb6255aa83d3545691 (patch)
treea63cb9b940eb1785479ebae7e42620c130a5d8ca /examples/GuiClient
parentde559cb56ea663af227dd7a09207b0a0609563cc (diff)
downloadqxmpp-5dac70f3f45821cdb7035efb6255aa83d3545691.tar.gz
add aboutDialog
Diffstat (limited to 'examples/GuiClient')
-rw-r--r--examples/GuiClient/aboutDialog.cpp19
-rw-r--r--examples/GuiClient/aboutDialog.h22
-rw-r--r--examples/GuiClient/aboutDialog.ui71
3 files changed, 112 insertions, 0 deletions
diff --git a/examples/GuiClient/aboutDialog.cpp b/examples/GuiClient/aboutDialog.cpp
new file mode 100644
index 00000000..38063721
--- /dev/null
+++ b/examples/GuiClient/aboutDialog.cpp
@@ -0,0 +1,19 @@
+#include "aboutDialog.h"
+#include "ui_aboutDialog.h"
+#include "QXmppGlobal.h"
+
+aboutDialog::aboutDialog(QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::aboutDialog)
+{
+ ui->setupUi(this);
+
+ ui->textEdit->append(QString("Copyright © 2009-2010, Manjeet Dahiya"));
+ ui->textEdit->append(qApp->applicationName() + " " + qApp->applicationVersion());
+ ui->textEdit->append(QString("Based on QXmpp v %1").arg(QXmppVersion()));
+}
+
+aboutDialog::~aboutDialog()
+{
+ delete ui;
+}
diff --git a/examples/GuiClient/aboutDialog.h b/examples/GuiClient/aboutDialog.h
new file mode 100644
index 00000000..f0adcc66
--- /dev/null
+++ b/examples/GuiClient/aboutDialog.h
@@ -0,0 +1,22 @@
+#ifndef ABOUTDIALOG_H
+#define ABOUTDIALOG_H
+
+#include <QDialog>
+
+namespace Ui {
+ class aboutDialog;
+}
+
+class aboutDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit aboutDialog(QWidget *parent = 0);
+ ~aboutDialog();
+
+private:
+ Ui::aboutDialog *ui;
+};
+
+#endif // ABOUTDIALOG_H
diff --git a/examples/GuiClient/aboutDialog.ui b/examples/GuiClient/aboutDialog.ui
new file mode 100644
index 00000000..bb124d00
--- /dev/null
+++ b/examples/GuiClient/aboutDialog.ui
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>aboutDialog</class>
+ <widget class="QDialog" name="aboutDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>309</width>
+ <height>218</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Dialog</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QTextEdit" name="textEdit">
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>aboutDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>248</x>
+ <y>254</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>157</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>aboutDialog</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>316</x>
+ <y>260</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>286</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>