From f4968ef3c88349414cc649a4f9e566dacb47b064 Mon Sep 17 00:00:00 2001 From: Manjeet Dahiya Date: Sat, 11 Dec 2010 11:42:37 +0000 Subject: eol style --- examples/GuiClient/aboutDialog.cpp | 54 +++---- examples/GuiClient/aboutDialog.h | 44 ++--- examples/GuiClient/aboutDialog.ui | 142 ++++++++-------- examples/GuiClient/xmlConsoleDialog.cpp | 114 ++++++------- examples/GuiClient/xmlConsoleDialog.h | 52 +++--- examples/GuiClient/xmlConsoleDialog.ui | 278 ++++++++++++++++---------------- 6 files changed, 342 insertions(+), 342 deletions(-) (limited to 'examples/GuiClient') diff --git a/examples/GuiClient/aboutDialog.cpp b/examples/GuiClient/aboutDialog.cpp index 6a18f972..ccbfc7c4 100644 --- a/examples/GuiClient/aboutDialog.cpp +++ b/examples/GuiClient/aboutDialog.cpp @@ -1,27 +1,27 @@ -#include "aboutDialog.h" -#include "ui_aboutDialog.h" - -#include "QXmppGlobal.h" - -#include - -aboutDialog::aboutDialog(QWidget *parent) : - QDialog(parent), - ui(new Ui::aboutDialog) -{ - ui->setupUi(this); - - setWindowTitle(QString("About %1").arg(qApp->applicationName())); - - ui->textEdit->append(QString("Copyright © 2009-2010, Manjeet Dahiya\n")); - ui->textEdit->append(qApp->applicationName() + " " + qApp->applicationVersion()); - ui->textEdit->append(QString("\nBased on:")); - ui->textEdit->append(QString("QXmpp %1").arg(QXmppVersion())); - ui->textEdit->append(QString("Qt %1 [built-with]").arg(qVersion())); - ui->textEdit->append(QString("Qt %1 [running-with]").arg(QT_VERSION_STR)); -} - -aboutDialog::~aboutDialog() -{ - delete ui; -} +#include "aboutDialog.h" +#include "ui_aboutDialog.h" + +#include "QXmppGlobal.h" + +#include + +aboutDialog::aboutDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::aboutDialog) +{ + ui->setupUi(this); + + setWindowTitle(QString("About %1").arg(qApp->applicationName())); + + ui->textEdit->append(QString("Copyright © 2009-2010, Manjeet Dahiya\n")); + ui->textEdit->append(qApp->applicationName() + " " + qApp->applicationVersion()); + ui->textEdit->append(QString("\nBased on:")); + ui->textEdit->append(QString("QXmpp %1").arg(QXmppVersion())); + ui->textEdit->append(QString("Qt %1 [built-with]").arg(qVersion())); + ui->textEdit->append(QString("Qt %1 [running-with]").arg(QT_VERSION_STR)); +} + +aboutDialog::~aboutDialog() +{ + delete ui; +} diff --git a/examples/GuiClient/aboutDialog.h b/examples/GuiClient/aboutDialog.h index f0adcc66..f71a0dbb 100644 --- a/examples/GuiClient/aboutDialog.h +++ b/examples/GuiClient/aboutDialog.h @@ -1,22 +1,22 @@ -#ifndef ABOUTDIALOG_H -#define ABOUTDIALOG_H - -#include - -namespace Ui { - class aboutDialog; -} - -class aboutDialog : public QDialog -{ - Q_OBJECT - -public: - explicit aboutDialog(QWidget *parent = 0); - ~aboutDialog(); - -private: - Ui::aboutDialog *ui; -}; - -#endif // ABOUTDIALOG_H +#ifndef ABOUTDIALOG_H +#define ABOUTDIALOG_H + +#include + +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 index bb124d00..01240819 100644 --- a/examples/GuiClient/aboutDialog.ui +++ b/examples/GuiClient/aboutDialog.ui @@ -1,71 +1,71 @@ - - - aboutDialog - - - - 0 - 0 - 309 - 218 - - - - Dialog - - - - - - true - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - aboutDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - aboutDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - + + + aboutDialog + + + + 0 + 0 + 309 + 218 + + + + Dialog + + + + + + true + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + aboutDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + aboutDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/examples/GuiClient/xmlConsoleDialog.cpp b/examples/GuiClient/xmlConsoleDialog.cpp index e915d53b..dd2d4f19 100644 --- a/examples/GuiClient/xmlConsoleDialog.cpp +++ b/examples/GuiClient/xmlConsoleDialog.cpp @@ -1,57 +1,57 @@ -#include "xmlConsoleDialog.h" -#include "ui_xmlConsoleDialog.h" - -#include -#include - -static QString s_colorHexSent("#02aa3f"); -static QString s_colorHexReceived("#aa0000"); - -xmlConsoleDialog::xmlConsoleDialog(QWidget *parent) : - QDialog(parent, Qt::Window), - ui(new Ui::xmlConsoleDialog) -{ - ui->setupUi(this); - setWindowTitle("Debugging Console"); - - ui->label_legend->setText( - QString("

Sent | Received

").arg(s_colorHexSent).arg(s_colorHexReceived)); -} - -xmlConsoleDialog::~xmlConsoleDialog() -{ - delete ui; -} - -void xmlConsoleDialog::message(QXmppLogger::MessageType type, const QString& text) -{ - if(!ui->checkBox_enable->isChecked()) - return; - - QColor color; - switch(type) - { - case QXmppLogger::ReceivedMessage: - color = QColor(s_colorHexReceived); - break; - case QXmppLogger::SentMessage: - color = QColor(s_colorHexSent); - break; - default: - return; - } - - QDomDocument doc; - -// Indent XML string - bool isXml = doc.setContent(text); - QString formattedText; - QTextStream stream(&formattedText); - doc.save(stream, 2); - - ui->textBrowser->setTextColor(color); - if(isXml) - ui->textBrowser->append(formattedText); - else - ui->textBrowser->append(text); -} +#include "xmlConsoleDialog.h" +#include "ui_xmlConsoleDialog.h" + +#include +#include + +static QString s_colorHexSent("#02aa3f"); +static QString s_colorHexReceived("#aa0000"); + +xmlConsoleDialog::xmlConsoleDialog(QWidget *parent) : + QDialog(parent, Qt::Window), + ui(new Ui::xmlConsoleDialog) +{ + ui->setupUi(this); + setWindowTitle("Debugging Console"); + + ui->label_legend->setText( + QString("

Sent | Received

").arg(s_colorHexSent).arg(s_colorHexReceived)); +} + +xmlConsoleDialog::~xmlConsoleDialog() +{ + delete ui; +} + +void xmlConsoleDialog::message(QXmppLogger::MessageType type, const QString& text) +{ + if(!ui->checkBox_enable->isChecked()) + return; + + QColor color; + switch(type) + { + case QXmppLogger::ReceivedMessage: + color = QColor(s_colorHexReceived); + break; + case QXmppLogger::SentMessage: + color = QColor(s_colorHexSent); + break; + default: + return; + } + + QDomDocument doc; + +// Indent XML string + bool isXml = doc.setContent(text); + QString formattedText; + QTextStream stream(&formattedText); + doc.save(stream, 2); + + ui->textBrowser->setTextColor(color); + if(isXml) + ui->textBrowser->append(formattedText); + else + ui->textBrowser->append(text); +} diff --git a/examples/GuiClient/xmlConsoleDialog.h b/examples/GuiClient/xmlConsoleDialog.h index 08caec59..6d5d0b3b 100644 --- a/examples/GuiClient/xmlConsoleDialog.h +++ b/examples/GuiClient/xmlConsoleDialog.h @@ -1,26 +1,26 @@ -#ifndef XMLCONSOLEDIALOG_H -#define XMLCONSOLEDIALOG_H - -#include -#include "QXmppLogger.h" - -namespace Ui { - class xmlConsoleDialog; -} - -class xmlConsoleDialog : public QDialog -{ - Q_OBJECT - -public: - explicit xmlConsoleDialog(QWidget *parent = 0); - ~xmlConsoleDialog(); - -public slots: - void message(QXmppLogger::MessageType, const QString &); - -private: - Ui::xmlConsoleDialog *ui; -}; - -#endif // XMLCONSOLEDIALOG_H +#ifndef XMLCONSOLEDIALOG_H +#define XMLCONSOLEDIALOG_H + +#include +#include "QXmppLogger.h" + +namespace Ui { + class xmlConsoleDialog; +} + +class xmlConsoleDialog : public QDialog +{ + Q_OBJECT + +public: + explicit xmlConsoleDialog(QWidget *parent = 0); + ~xmlConsoleDialog(); + +public slots: + void message(QXmppLogger::MessageType, const QString &); + +private: + Ui::xmlConsoleDialog *ui; +}; + +#endif // XMLCONSOLEDIALOG_H diff --git a/examples/GuiClient/xmlConsoleDialog.ui b/examples/GuiClient/xmlConsoleDialog.ui index 5c56b028..61a3a1e2 100644 --- a/examples/GuiClient/xmlConsoleDialog.ui +++ b/examples/GuiClient/xmlConsoleDialog.ui @@ -1,139 +1,139 @@ - - - xmlConsoleDialog - - - - 0 - 0 - 569 - 349 - - - - Dialog - - - - :/icons/resource/icon.png:/icons/resource/icon.png - - - - 6 - - - - - - - - TextLabel - - - - - - - - - Enable - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Clear - - - - - - - - 0 - 0 - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel - - - - - - - - - - - - - buttonBox - accepted() - xmlConsoleDialog - accept() - - - 389 - 289 - - - 157 - 274 - - - - - buttonBox - rejected() - xmlConsoleDialog - reject() - - - 389 - 289 - - - 286 - 274 - - - - - pushButton_clear - clicked() - textBrowser - clear() - - - 257 - 283 - - - 178 - 202 - - - - - + + + xmlConsoleDialog + + + + 0 + 0 + 569 + 349 + + + + Dialog + + + + :/icons/resource/icon.png:/icons/resource/icon.png + + + + 6 + + + + + + + + TextLabel + + + + + + + + + Enable + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Clear + + + + + + + + 0 + 0 + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel + + + + + + + + + + + + + buttonBox + accepted() + xmlConsoleDialog + accept() + + + 389 + 289 + + + 157 + 274 + + + + + buttonBox + rejected() + xmlConsoleDialog + reject() + + + 389 + 289 + + + 286 + 274 + + + + + pushButton_clear + clicked() + textBrowser + clear() + + + 257 + 283 + + + 178 + 202 + + + + + -- cgit v1.2.3