Changeset View
Changeset View
Standalone View
Standalone View
src/ui/itemsviewbasedelegate_p.h
Context not available. | |||||
33 | 33 | | |||
---|---|---|---|---|---|
34 | namespace KNS3 | 34 | namespace KNS3 | ||
35 | { | 35 | { | ||
36 | class ItemsModel; | | |||
37 | class Engine; | | |||
38 | | ||||
39 | class ItemsViewBaseDelegate: public KWidgetItemDelegate | 36 | class ItemsViewBaseDelegate: public KWidgetItemDelegate | ||
40 | { | 37 | { | ||
41 | Q_OBJECT | 38 | Q_OBJECT | ||
42 | public: | 39 | public: | ||
43 | explicit ItemsViewBaseDelegate(QAbstractItemView *itemView, Engine *engine, QObject *parent = 0); | 40 | explicit ItemsViewBaseDelegate(QAbstractItemView *itemView, KNSCore::Engine *engine, QObject *parent = 0); | ||
44 | virtual ~ItemsViewBaseDelegate(); | 41 | virtual ~ItemsViewBaseDelegate(); | ||
45 | // paint the item at index with all its attributes shown | 42 | // paint the item at index with all its attributes shown | ||
46 | void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE = 0; | 43 | void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE = 0; | ||
Context not available. | |||||
56 | QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE = 0; | 53 | QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE = 0; | ||
57 | 54 | | |||
58 | Q_SIGNALS: | 55 | Q_SIGNALS: | ||
59 | void signalShowDetails(const KNS3::EntryInternal &entry); | 56 | void signalShowDetails(const KNSCore::EntryInternal &entry); | ||
60 | 57 | | |||
61 | protected Q_SLOTS: | 58 | protected Q_SLOTS: | ||
62 | bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE; | 59 | bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE; | ||
Context not available. | |||||
67 | void slotDetailsClicked(); | 64 | void slotDetailsClicked(); | ||
68 | 65 | | |||
69 | protected: | 66 | protected: | ||
70 | Engine *m_engine; | 67 | KNSCore::Engine *m_engine; | ||
71 | QAbstractItemView *m_itemView; | 68 | QAbstractItemView *m_itemView; | ||
72 | QIcon m_iconInvalid; | 69 | QIcon m_iconInvalid; | ||
73 | QIcon m_iconDownloadable; | 70 | QIcon m_iconDownloadable; | ||
Context not available. |