diff options
Diffstat (limited to 'Swift/QtUI/QtProfileWindow.h')
-rw-r--r-- | Swift/QtUI/QtProfileWindow.h | 58 |
1 files changed, 32 insertions, 26 deletions
diff --git a/Swift/QtUI/QtProfileWindow.h b/Swift/QtUI/QtProfileWindow.h index a2af63a..7315807 100644 --- a/Swift/QtUI/QtProfileWindow.h +++ b/Swift/QtUI/QtProfileWindow.h @@ -1,7 +1,7 @@ /* - * Copyright (c) 2011 Remko Tronçon - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. + * Copyright (c) 2011-2015 Isode Limited. + * All rights reserved. + * See the COPYING file for more information. */ /* @@ -12,46 +12,52 @@ #pragma once +#include <QTimer> +#include <QWidget> + #include <Swiften/JID/JID.h> #include <Swift/Controllers/UIInterfaces/ProfileWindow.h> -#include <QWidget> - namespace Ui { - class QtProfileWindow; + class QtProfileWindow; } namespace Swift { class QtProfileWindow : public QWidget, public ProfileWindow { - Q_OBJECT + Q_OBJECT + + public: + QtProfileWindow(); + virtual ~QtProfileWindow(); - public: - QtProfileWindow(); - virtual ~QtProfileWindow(); + virtual void setJID(const JID& jid); + virtual void setVCard(VCard::ref vcard); - virtual void setJID(const JID& jid); - virtual void setVCard(VCard::ref vcard); + virtual void setEnabled(bool b); + virtual void setProcessing(bool processing); + virtual void setError(const std::string& error); + virtual void setEditable(bool b); - virtual void setEnabled(bool b); - virtual void setProcessing(bool processing); - virtual void setError(const std::string& error); - virtual void setEditable(bool b); + virtual void show(); + virtual void hide(); - virtual void show(); - virtual void hide(); + virtual QSize sizeHint() const; - private: - void updateTitle(); - virtual void closeEvent(QCloseEvent* event); + private: + void updateTitle(); + void updateWindowSize(); + virtual void closeEvent(QCloseEvent* event); - private slots: - void handleSave(); + private slots: + void handleSave(); + void handleAdjustSizeTimeout(); - private: - Ui::QtProfileWindow* ui; - JID jid; + private: + Ui::QtProfileWindow* ui; + JID jid; + QTimer adjustSizeTimer; }; } |