diff options
Diffstat (limited to 'Swift/QtUI/QtProfileWindow.h')
-rw-r--r-- | Swift/QtUI/QtProfileWindow.h | 52 |
1 files changed, 31 insertions, 21 deletions
diff --git a/Swift/QtUI/QtProfileWindow.h b/Swift/QtUI/QtProfileWindow.h index edb9cce..57cc2df 100644 --- a/Swift/QtUI/QtProfileWindow.h +++ b/Swift/QtUI/QtProfileWindow.h @@ -5,31 +5,46 @@ */ +/* + * Copyright (c) 2012 Tobias Markmann + * Licensed under the simplified BSD license. + * See Documentation/Licenses/BSD-simplified.txt for more information. + */ + #pragma once -#include <QWidget> +#include <Swiften/JID/JID.h> #include <Swift/Controllers/UIInterfaces/ProfileWindow.h> -class QLabel; -class QLineEdit; -class QHBoxLayout; -class QPushButton; +#include <QWidget> + +namespace Ui { + class QtProfileWindow; +} namespace Swift { - class QtAvatarWidget; class QtProfileWindow : public QWidget, public ProfileWindow { Q_OBJECT + public: QtProfileWindow(); + virtual ~QtProfileWindow(); + + virtual void setJID(const JID& jid); + virtual void setVCard(VCard::ref vcard); - void setVCard(Swift::VCard::ref); - void setEnabled(bool); - void setProcessing(bool); - virtual void setError(const std::string&); - void show(); - void hide(); + virtual void setEnabled(bool b); + virtual void setProcessing(bool processing); + virtual void setError(const std::string& error); + virtual void setEditable(bool b); - void hideEvent (QHideEvent* event); + virtual void show(); + virtual void hide(); + + private: + void updateTitle(); + void updateWindowSize(); + virtual void closeEvent(QCloseEvent* event); private slots: @@ -37,12 +52,7 @@ namespace Swift { private: - VCard::ref vcard; - QtAvatarWidget* avatar; - QLabel* nicknameLabel; - QLineEdit* nickname; - QLabel* throbberLabel; - QLabel* errorLabel; - QHBoxLayout* horizontalLayout; - QPushButton* saveButton; + Ui::QtProfileWindow* ui; + JID jid; }; + } |