diff options
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/QtAddContactDialog.cpp | 38 | ||||
-rw-r--r-- | Swift/QtUI/QtAddContactDialog.h | 32 | ||||
-rw-r--r-- | Swift/QtUI/QtAddContactDialog.ui | 72 | ||||
-rw-r--r-- | Swift/QtUI/QtMainWindow.cpp | 1 | ||||
-rw-r--r-- | Swift/QtUI/SConscript | 2 |
5 files changed, 0 insertions, 145 deletions
diff --git a/Swift/QtUI/QtAddContactDialog.cpp b/Swift/QtUI/QtAddContactDialog.cpp deleted file mode 100644 index a5f5a10..0000000 --- a/Swift/QtUI/QtAddContactDialog.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2010 Kevin Smith - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. - */ - -#include "QtAddContactDialog.h" -#include "QtSwiftUtil.h" - -namespace Swift { - -QtAddContactDialog::QtAddContactDialog(QWidget* parent) : QDialog(parent) { - setupUi(this); - errorLabel_->hide(); - setAttribute(Qt::WA_DeleteOnClose, true); - connect(buttons_, SIGNAL(accepted()), SLOT(accept())); - connect(buttons_, SIGNAL(rejected()), SLOT(reject())); -} - -void QtAddContactDialog::accept() { - if (contactJID_->displayText().isEmpty()) { - showError("You must specify a contact to add."); - return; - } - if (name_->displayText().isEmpty()) { - showError("You must specify a name for the contact."); - return; - } - errorLabel_->hide(); - emit onAddCommand(JID(Q2PSTRING(contactJID_->displayText())), name_->displayText()); - QDialog::accept(); -} - -void QtAddContactDialog::showError(const QString& error) { - errorLabel_->setText(QString("<font color='red'>%1</font>").arg(error)); - errorLabel_->show(); -} -} diff --git a/Swift/QtUI/QtAddContactDialog.h b/Swift/QtUI/QtAddContactDialog.h deleted file mode 100644 index 8e12c46..0000000 --- a/Swift/QtUI/QtAddContactDialog.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2010 Kevin Smith - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. - */ - -#ifndef SWIFT_QtAddContactDialog_H -#define SWIFT_QtAddContactDialog_H - -#include "ui_QtAddContactDialog.h" -#include "Swiften/JID/JID.h" - -#include <QDialog> - -namespace Swift { - -class QtAddContactDialog : public QDialog, private Ui::QtAddContactDialog { - Q_OBJECT - - public: - QtAddContactDialog(QWidget* parent); - signals: - void onAddCommand(const JID& contact, const QString& name); - public slots: - void accept(); - private: - void showError(const QString& error); -}; - -} - -#endif diff --git a/Swift/QtUI/QtAddContactDialog.ui b/Swift/QtUI/QtAddContactDialog.ui deleted file mode 100644 index 861b1be..0000000 --- a/Swift/QtUI/QtAddContactDialog.ui +++ /dev/null @@ -1,72 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>QtAddContactDialog</class> - <widget class="QDialog" name="QtAddContactDialog"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>232</width> - <height>137</height> - </rect> - </property> - <property name="windowTitle"> - <string>Add contact</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout"> - <item> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <widget class="QLabel" name="label"> - <property name="text"> - <string>User's ID:</string> - </property> - </widget> - </item> - <item> - <widget class="QLineEdit" name="contactJID_"/> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_2"> - <item> - <widget class="QLabel" name="label_2"> - <property name="text"> - <string>Name:</string> - </property> - </widget> - </item> - <item> - <widget class="QLineEdit" name="name_"/> - </item> - </layout> - </item> - <item> - <widget class="QLabel" name="errorLabel_"> - <property name="text"> - <string/> - </property> - <property name="textFormat"> - <enum>Qt::RichText</enum> - </property> - </widget> - </item> - <item> - <widget class="QDialogButtonBox" name="buttons_"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="standardButtons"> - <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> - </property> - <property name="centerButtons"> - <bool>false</bool> - </property> - </widget> - </item> - </layout> - </widget> - <resources/> - <connections/> -</ui> diff --git a/Swift/QtUI/QtMainWindow.cpp b/Swift/QtUI/QtMainWindow.cpp index 63ce32b..2fd5700 100644 --- a/Swift/QtUI/QtMainWindow.cpp +++ b/Swift/QtUI/QtMainWindow.cpp @@ -21,7 +21,6 @@ #include <QAction> #include <QTabWidget> -#include "QtAddContactDialog.h" #include "QtSwiftUtil.h" #include "QtTabWidget.h" #include "Roster/QtTreeWidget.h" diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript index cc6db35..e0d29a0 100644 --- a/Swift/QtUI/SConscript +++ b/Swift/QtUI/SConscript @@ -64,7 +64,6 @@ myenv.WriteVal("DefaultTheme.qrc", myenv.Value(generateDefaultTheme(myenv.Dir(". sources = [ "main.cpp", "QtAboutWidget.cpp", - "QtAddContactDialog.cpp", "QtAvatarWidget.cpp", "QtUIFactory.cpp", "QtChatWindowFactory.cpp", @@ -150,7 +149,6 @@ myenv.Uic4("UserSearch/QtUserSearchWizard.ui") myenv.Uic4("UserSearch/QtUserSearchFirstPage.ui") myenv.Uic4("UserSearch/QtUserSearchFieldsPage.ui") myenv.Uic4("UserSearch/QtUserSearchResultsPage.ui") -myenv.Uic4("QtAddContactDialog.ui") myenv.Uic4("QtBookmarkDetailWindow.ui") myenv.Uic4("QtJoinMUCWindow.ui") myenv.Qrc("DefaultTheme.qrc") |