summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2009-08-16 13:13:20 (GMT)
committerKevin Smith <git@kismith.co.uk>2009-08-16 13:13:20 (GMT)
commit6d64d22bdc18a8b4d3ef1ae7087f657de6c9abd9 (patch)
tree5994c7ee6b89bb6a1d24d849cb21ee3fe2f48191 /Swift/QtUI/QtRosterHeader.h
parent2ef0428c1f9559454654546f3cce32155cf5409d (diff)
downloadswift-6d64d22bdc18a8b4d3ef1ae7087f657de6c9abd9.zip
swift-6d64d22bdc18a8b4d3ef1ae7087f657de6c9abd9.tar.bz2
MeView collapsing.
Qt's peculiarities with which mouse events get passed where are evident here: clicking the toolbar collapses/expands, while if you're clicking the label, it has to be a doubleclick to collapse or expand.
Diffstat (limited to 'Swift/QtUI/QtRosterHeader.h')
-rw-r--r--Swift/QtUI/QtRosterHeader.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Swift/QtUI/QtRosterHeader.h b/Swift/QtUI/QtRosterHeader.h
index ae510ee..66c9333 100644
--- a/Swift/QtUI/QtRosterHeader.h
+++ b/Swift/QtUI/QtRosterHeader.h
@@ -10,6 +10,8 @@
#include "Swiften/Base/String.h"
#include "Swiften/Elements/StatusShow.h"
+class QHBoxLayout;
+
namespace Swift {
class QtStatusWidget;
@@ -28,13 +30,17 @@ namespace Swift {
void handleChangeStatusRequest(StatusShow::Type type);
protected:
virtual void resizeEvent(QResizeEvent* event);
+ virtual void mousePressEvent(QMouseEvent* event);
private:
void resizeNameLabel();
+ void toggleExpanded();
QString name_;
QLabel* avatarLabel_;
QLabel* nameLabel_;
QTextEdit* statusEdit_;
QToolBar* toolBar_;
QtStatusWidget* statusWidget_;
+ QHBoxLayout* expandedLayout_;
+ bool expanded_;
};
}