#include <datadisplaydelegate.hpp>
List of all members.
Public Types |
typedef std::vector< std::pair
< int, QIcon > > | IconList |
typedef std::vector< std::pair
< int, QString > > | ValueList |
Public Member Functions |
| DataDisplayDelegate (const ValueList &values, const IconList &icons, QUndoStack &undoStack, QObject *parent) |
| ~DataDisplayDelegate () |
virtual void | paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const |
void | setIconSize (const QSize icon) |
| pass a QSize defining height / width of icon. Default is QSize (16,16).
|
void | setIconLeftOffset (int offset) |
| offset the horizontal position of the icon from the left edge of the cell. Default is 3 pixels.
|
void | setTextLeftOffset (int offset) |
| offset the horizontal position of the text from the right edge of the icon. Default is 8 pixels.
|
Protected Types |
enum | DisplayMode { Mode_TextOnly,
Mode_IconOnly,
Mode_IconAndText
} |
Protected Attributes |
DisplayMode | mDisplayMode |
IconList | mIcons |
Private Member Functions |
void | paintIcon (QPainter *painter, const QStyleOptionViewItem &option, int i) const |
| custom paint function for painting the icon. Mode_IconAndText and Mode_Icon only.
|
void | buildPixmaps () |
| rebuild the list of pixmaps from the provided icons (called when icon size is changed)
|
Private Attributes |
std::vector< std::pair< int,
QPixmap > > | mPixmaps |
QTextOption | mTextAlignment |
QSize | mIconSize |
int | mIconLeftOffset |
int | mTextLeftOffset |
Member Typedef Documentation
Member Enumeration Documentation
- Enumerator:
Mode_TextOnly |
|
Mode_IconOnly |
|
Mode_IconAndText |
|
Constructor & Destructor Documentation
Member Function Documentation
rebuild the list of pixmaps from the provided icons (called when icon size is changed)
custom paint function for painting the icon. Mode_IconAndText and Mode_Icon only.
offset the horizontal position of the icon from the left edge of the cell. Default is 3 pixels.
pass a QSize defining height / width of icon. Default is QSize (16,16).
offset the horizontal position of the text from the right edge of the icon. Default is 8 pixels.
Member Data Documentation
The documentation for this class was generated from the following files: