summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2012-02-26 14:32:39 (GMT)
committerSwift Review <review@swift.im>2013-01-12 09:38:51 (GMT)
commit25b10f8d2b77bc5b3a40aac8d2edd5d42e1b6585 (patch)
treedb398f92b820ff03cb301c91ada51b226f212065 /Swift/QtUI/QtProfileWindow.h
parent4ed137080a3d80d20a2cead47f741e3dd2f2d42e (diff)
downloadswift-25b10f8d2b77bc5b3a40aac8d2edd5d42e1b6585.zip
swift-25b10f8d2b77bc5b3a40aac8d2edd5d42e1b6585.tar.bz2
Adding basic vCard edit/show support.
Change-Id: I3104efcb9d56cfcaafda45eac2a51d2702f5245b License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
Diffstat (limited to 'Swift/QtUI/QtProfileWindow.h')
-rw-r--r--Swift/QtUI/QtProfileWindow.h77
1 files changed, 43 insertions, 34 deletions
diff --git a/Swift/QtUI/QtProfileWindow.h b/Swift/QtUI/QtProfileWindow.h
index edb9cce..1dbc0fb 100644
--- a/Swift/QtUI/QtProfileWindow.h
+++ b/Swift/QtUI/QtProfileWindow.h
@@ -4,45 +4,54 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
+/*
+ * 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();
-
- void setVCard(Swift::VCard::ref);
- void setEnabled(bool);
- void setProcessing(bool);
- virtual void setError(const std::string&);
- void show();
- void hide();
-
- void hideEvent (QHideEvent* event);
-
- private slots:
- void handleSave();
-
- private:
- VCard::ref vcard;
- QtAvatarWidget* avatar;
- QLabel* nicknameLabel;
- QLineEdit* nickname;
- QLabel* throbberLabel;
- QLabel* errorLabel;
- QHBoxLayout* horizontalLayout;
- QPushButton* saveButton;
- };
+
+class QtProfileWindow : public QWidget, public ProfileWindow {
+ Q_OBJECT
+
+ public:
+ explicit QtProfileWindow(QWidget* parent = 0);
+ virtual ~QtProfileWindow();
+
+ 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 show();
+ virtual void hide();
+
+ private:
+ void updateTitle();
+ virtual void closeEvent(QCloseEvent* event);
+
+ private slots:
+ void handleSave();
+
+ private:
+ Ui::QtProfileWindow* ui;
+ JID jid;
+};
+
}