diff options
| author | Manjeet Dahiya <manjeetdahiya@gmail.com> | 2010-09-08 09:23:18 +0000 |
|---|---|---|
| committer | Manjeet Dahiya <manjeetdahiya@gmail.com> | 2010-09-08 09:23:18 +0000 |
| commit | da88f5f0bb5e73bc69bf7ed3962691622b1ae4f9 (patch) | |
| tree | c3686f7649785a2bfcc2c637a1588acdb8a721e8 /examples/GuiClient/chatDialog.h | |
| parent | 3431f5a37174b7eb8490672686db68df2b48e35f (diff) | |
| download | qxmpp-da88f5f0bb5e73bc69bf7ed3962691622b1ae4f9.tar.gz | |
add Gui Client example
Diffstat (limited to 'examples/GuiClient/chatDialog.h')
| -rw-r--r-- | examples/GuiClient/chatDialog.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/examples/GuiClient/chatDialog.h b/examples/GuiClient/chatDialog.h new file mode 100644 index 00000000..9840ac49 --- /dev/null +++ b/examples/GuiClient/chatDialog.h @@ -0,0 +1,56 @@ +#ifndef CHATDIALOG_H
+#define CHATDIALOG_H
+
+#include <QDialog>
+#include <QKeyEvent>
+
+namespace Ui
+{
+ class chatDialogClass;
+}
+
+class chatGraphicsView;
+class chatGraphicsScene;
+class QXmppClient;
+class QPushButton;
+
+class chatDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ chatDialog(QWidget *parent = 0);
+ void show();
+
+ QString getBareJid() const;
+ QString getDisplayName() const;
+ void setBareJid(const QString&);
+ void setDisplayName(const QString&);
+ void setQXmppClient(QXmppClient* client);
+ void messageReceived(const QString& msg);
+
+private slots:
+ void sendMessage();
+
+protected:
+ void keyPressEvent(QKeyEvent*);
+ void paintEvent(QPaintEvent* event);
+ virtual void resizeEvent(QResizeEvent*);
+ virtual void moveEvent(QMoveEvent*);
+
+private:
+ void updateSendButtonGeomerty();
+
+ Ui::chatDialogClass *ui;
+ chatGraphicsView* m_view;
+ chatGraphicsScene* m_scene;
+ QPushButton* m_pushButtonSend;
+
+ // holds a reference to the the connected client
+ QXmppClient* m_client;
+
+ QString m_bareJid;
+ QString m_displayName;
+};
+
+#endif // CHATDIALOG_H
|
