Changeset View
Changeset View
Standalone View
Standalone View
src/lib/marble/MapViewItemDelegate.h
Show All 27 Lines | |||||
28 | * and MapChangeEditDialog's listView. | 28 | * and MapChangeEditDialog's listView. | ||
29 | */ | 29 | */ | ||
30 | class MapViewItemDelegate : public QStyledItemDelegate | 30 | class MapViewItemDelegate : public QStyledItemDelegate | ||
31 | { | 31 | { | ||
32 | Q_OBJECT | 32 | Q_OBJECT | ||
33 | 33 | | |||
34 | public: | 34 | public: | ||
35 | explicit MapViewItemDelegate( QListView* view ); | 35 | explicit MapViewItemDelegate( QListView* view ); | ||
36 | void paint( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const; | 36 | void paint( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const override; | ||
37 | QSize sizeHint( const QStyleOptionViewItem &option, const QModelIndex &index ) const; | 37 | QSize sizeHint( const QStyleOptionViewItem &option, const QModelIndex &index ) const override; | ||
38 | 38 | | |||
39 | private: | 39 | private: | ||
40 | static QString text( const QModelIndex &index ); | 40 | static QString text( const QModelIndex &index ); | ||
41 | QListView* m_view; | 41 | QListView* m_view; | ||
42 | QIcon m_bookmarkIcon; | 42 | QIcon m_bookmarkIcon; | ||
43 | }; | 43 | }; | ||
44 | 44 | | |||
45 | } //Namespace: Marble | 45 | } //Namespace: Marble | ||
46 | 46 | | |||
47 | #endif // MAPVIEWITEMDELEGATE_H | 47 | #endif // MAPVIEWITEMDELEGATE_H |