aboutsummaryrefslogtreecommitdiff
path: root/examples/GuiClient
diff options
context:
space:
mode:
authorManjeet Dahiya <manjeetdahiya@gmail.com>2010-10-17 13:48:04 +0000
committerManjeet Dahiya <manjeetdahiya@gmail.com>2010-10-17 13:48:04 +0000
commitaea583dd28166a556998e368ebd9595b610b0af5 (patch)
treea3800c71e506088de8a29be0f946ae5c57c2099a /examples/GuiClient
parent5dac70f3f45821cdb7035efb6255aa83d3545691 (diff)
downloadqxmpp-aea583dd28166a556998e368ebd9595b610b0af5.tar.gz
add action for launching aboutDialog
Diffstat (limited to 'examples/GuiClient')
-rw-r--r--examples/GuiClient/GuiClient.pro9
-rw-r--r--examples/GuiClient/mainDialog.cpp12
-rw-r--r--examples/GuiClient/mainDialog.h1
3 files changed, 19 insertions, 3 deletions
diff --git a/examples/GuiClient/GuiClient.pro b/examples/GuiClient/GuiClient.pro
index c25c9b1b..aec6064f 100644
--- a/examples/GuiClient/GuiClient.pro
+++ b/examples/GuiClient/GuiClient.pro
@@ -24,7 +24,8 @@ SOURCES += main.cpp \
profileDialog.cpp \
capabilitiesCache.cpp \
accountsCache.cpp \
- xmlConsoleDialog.cpp
+ xmlConsoleDialog.cpp \
+ aboutDialog.cpp
HEADERS += chatMsgGraphicsItem.h \
chatGraphicsScene.h \
@@ -46,13 +47,15 @@ HEADERS += chatMsgGraphicsItem.h \
profileDialog.h \
capabilitiesCache.h \
accountsCache.h \
- xmlConsoleDialog.h
+ xmlConsoleDialog.h \
+ aboutDialog.h
FORMS += mainDialog.ui \
chatDialog.ui \
statusWidget.ui \
profileDialog.ui \
- xmlConsoleDialog.ui
+ xmlConsoleDialog.ui \
+ aboutDialog.ui
QT += network \
xml
diff --git a/examples/GuiClient/mainDialog.cpp b/examples/GuiClient/mainDialog.cpp
index bb3ad9c4..206fbdbe 100644
--- a/examples/GuiClient/mainDialog.cpp
+++ b/examples/GuiClient/mainDialog.cpp
@@ -38,6 +38,7 @@
#include "QXmppRosterIq.h"
#include "profileDialog.h"
+#include "aboutDialog.h"
#include <QMovie>
#include <QCompleter>
@@ -664,6 +665,11 @@ void mainDialog::createSettingsMenu()
{
QMenu* settingsMenu = new QMenu(ui->pushButton_settings);
ui->pushButton_settings->setMenu(settingsMenu);
+
+ QAction* aboutDlg = new QAction("About", ui->pushButton_settings);
+ connect(aboutDlg, SIGNAL(triggered()), SLOT(action_aboutDlg()));
+ settingsMenu->addAction(aboutDlg);
+
QAction* showXml = new QAction("Show XML Console...", ui->pushButton_settings);
connect(showXml, SIGNAL(triggered()), SLOT(action_showXml()));
settingsMenu->addAction(showXml);
@@ -867,3 +873,9 @@ void mainDialog::addPhotoHash(QXmppPresence& pre)
pre.setPhotoHash(QByteArray());
}
}
+
+void mainDialog::action_aboutDlg()
+{
+ aboutDialog abtDlg(this);
+ abtDlg.exec();
+}
diff --git a/examples/GuiClient/mainDialog.h b/examples/GuiClient/mainDialog.h
index 98023bc8..8453aa1a 100644
--- a/examples/GuiClient/mainDialog.h
+++ b/examples/GuiClient/mainDialog.h
@@ -93,6 +93,7 @@ private slots:
void action_trayIconActivated(QSystemTrayIcon::ActivationReason reason);
void action_showXml();
+ void action_aboutDlg();
private:
void loadAccounts();