summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/UserSearch/ContactListDelegate.h')
-rw-r--r--Swift/QtUI/UserSearch/ContactListDelegate.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/Swift/QtUI/UserSearch/ContactListDelegate.h b/Swift/QtUI/UserSearch/ContactListDelegate.h
new file mode 100644
index 0000000..7680aba
--- /dev/null
+++ b/Swift/QtUI/UserSearch/ContactListDelegate.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2013 Tobias Markmann
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+#pragma once
+
+#include <QStyledItemDelegate>
+
+#include <Swift/QtUI/Roster/DelegateCommons.h>
+
+namespace Swift {
+
+class ContactListDelegate : public QStyledItemDelegate {
+ public:
+ ContactListDelegate(bool compact);
+ virtual ~ContactListDelegate();
+
+ QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const;
+ void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const;
+
+ public slots:
+ void setCompact(bool compact);
+
+ private:
+ bool compact_;
+ DelegateCommons common_;
+};
+}