summaryrefslogtreecommitdiffstats
blob: 208246a332a173ec9547ee5a5dd75ed1f175ed3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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_;
};
}