summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-05-31 09:25:48 (GMT)
committerTobias Markmann <tm@ayena.de>2015-05-31 18:10:20 (GMT)
commit5b851c72510ef88feb059455033915588fa6fb8c (patch)
tree8f02dba6cefa1d564f4ea29c74a2504e4c7a181a /Swift/QtUI/QtProfileWindow.h
parentc62f1fc1006474809597a75ed920795da38e4113 (diff)
downloadswift-5b851c72510ef88feb059455033915588fa6fb8c.zip
swift-5b851c72510ef88feb059455033915588fa6fb8c.tar.bz2
Open profile windows in their ideal size so everything is readable
Test-Information: Tested on OS X 10.9.5 with Qt 5.4.1 and Windows 8 with Qt 5.3.2 and KUbuntu 14.04 with Qt 5.4.1. Change-Id: Ia6cf54baad3020d05be94c6159aa623f7a619816
Diffstat (limited to 'Swift/QtUI/QtProfileWindow.h')
-rw-r--r--Swift/QtUI/QtProfileWindow.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/Swift/QtUI/QtProfileWindow.h b/Swift/QtUI/QtProfileWindow.h
index d1eed99..0821444 100644
--- a/Swift/QtUI/QtProfileWindow.h
+++ b/Swift/QtUI/QtProfileWindow.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 Isode Limited.
+ * Copyright (c) 2011-2015 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -12,12 +12,13 @@
#pragma once
+#include <QTimer>
+#include <QWidget>
+
#include <Swiften/JID/JID.h>
#include <Swift/Controllers/UIInterfaces/ProfileWindow.h>
-#include <QWidget>
-
namespace Ui {
class QtProfileWindow;
}
@@ -42,6 +43,8 @@ class QtProfileWindow : public QWidget, public ProfileWindow {
virtual void show();
virtual void hide();
+ virtual QSize sizeHint() const;
+
private:
void updateTitle();
void updateWindowSize();
@@ -49,10 +52,12 @@ class QtProfileWindow : public QWidget, public ProfileWindow {
private slots:
void handleSave();
+ void handleAdjustSizeTimeout();
private:
Ui::QtProfileWindow* ui;
JID jid;
+ QTimer adjustSizeTimer;
};
}