messagelist
#include <themedelegate.h>
Public Member Functions | |
ThemeDelegate (QAbstractItemView *parent) | |
~ThemeDelegate () | |
const Theme::Column * | hitColumn () const |
int | hitColumnIndex () const |
const Theme::ContentItem * | hitContentItem () const |
QRect | hitContentItemRect () const |
bool | hitContentItemRight () const |
const QModelIndex & | hitIndex () const |
Item * | hitItem () const |
QRect | hitItemRect () const |
const Theme::Row * | hitRow () const |
int | hitRowIndex () const |
bool | hitRowIsMessageRow () const |
QRect | hitRowRect () const |
bool | hitTest (const QPoint &viewportPoint, bool exact=true) |
void | setTheme (const Theme *theme) |
QSize | sizeHintForItemTypeAndColumn (Item::Type type, int column, const Item *item=0) const |
const Theme * | theme () const |
Public Member Functions inherited from QStyledItemDelegate | |
QStyledItemDelegate (QObject *parent) | |
~QStyledItemDelegate () | |
virtual QWidget * | createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const |
virtual QString | displayText (const QVariant &value, const QLocale &locale) const |
QItemEditorFactory * | itemEditorFactory () const |
virtual void | setEditorData (QWidget *editor, const QModelIndex &index) const |
void | setItemEditorFactory (QItemEditorFactory *factory) |
virtual void | setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const |
virtual void | updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const |
Public Member Functions inherited from QAbstractItemDelegate | |
QAbstractItemDelegate (QObject *parent) | |
virtual | ~QAbstractItemDelegate () |
void | closeEditor (QWidget *editor, QAbstractItemDelegate::EndEditHint hint) |
void | commitData (QWidget *editor) |
bool | helpEvent (QHelpEvent *event, QAbstractItemView *view, const QStyleOptionViewItem &option, const QModelIndex &index) |
virtual void | paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const =0 |
virtual QSize | sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const =0 |
void | sizeHintChanged (const QModelIndex &index) |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
Static Public Member Functions | |
static QFont | itemFont (const Theme::ContentItem *ci, const Item *item) |
static QString | itemFontKey (const Theme::ContentItem *ci, const Item *item) |
Static Public Member Functions inherited from QAbstractItemDelegate | |
QString | elidedText (const QFontMetrics &fontMetrics, int width, Qt::TextElideMode mode, const QString &text) |
Static Public Member Functions inherited from QObject | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Protected Member Functions | |
virtual Item * | itemFromIndex (const QModelIndex &index) const =0 |
void | paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const |
QSize | sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const |
Protected Member Functions inherited from QStyledItemDelegate | |
virtual bool | editorEvent (QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) |
virtual bool | eventFilter (QObject *editor, QEvent *event) |
virtual void | initStyleOption (QStyleOptionViewItem *option, const QModelIndex &index) const |
Protected Member Functions inherited from QObject | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
Additional Inherited Members | |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from QObject | |
objectName | |
Detailed Description
The ThemeDelegate paints the message list view message and group items by using the supplied Theme.
Definition at line 45 of file themedelegate.h.
Constructor & Destructor Documentation
|
explicit |
Definition at line 50 of file themedelegate.cpp.
ThemeDelegate::~ThemeDelegate | ( | ) |
Definition at line 58 of file themedelegate.cpp.
Member Function Documentation
|
inline |
Returns the theme column that was reported as hit by the previous call to hitTest().
The result of this function is valid only if hitTest() returned true and only within the same calling function.
Definition at line 125 of file themedelegate.h.
|
inline |
Returns the index of the theme column that was reported as hit by the previous call to hitTest().
The result of this function is valid only if hitTest() returned true and only within the same calling function. This is the same as hitIndex().column().
Definition at line 134 of file themedelegate.h.
|
inline |
Returns the theme content item that was reported as hit by the previous call to hitTest().
The result of this function is valid only if hitTest() returned true and only within the same calling function. This function may also return a null content item when hitTest() returned true. This means that the item was globally hit but no content item was exactly hit (the user might have clicked inside a blank unused space instead).
Definition at line 177 of file themedelegate.h.
|
inline |
Returns the bounding rect of the content item that was reported as hit by the previous call to hitTest().
The result of this function is valid only if hitTest() returned true and only within the same calling function. The result of this function is to be considered invalid also when hitContentItem() returns 0.
Definition at line 193 of file themedelegate.h.
|
inline |
Returns true if the hit theme content item was a right item and false otherwise.
The result of this function is valid only if hitContentItem() returns true.
Definition at line 184 of file themedelegate.h.
|
inline |
Returns the model index that was reported as hit by the previous call to hitTest().
The result of this function is valid only if hitTest() returned true and only within the same calling function.
Definition at line 100 of file themedelegate.h.
|
inline |
Returns the Item that was reported as hit by the previous call to hitTest().
The result of this function is valid only if hitTest() returned true and only within the same calling function.
Definition at line 108 of file themedelegate.h.
|
inline |
Returns the visual rectangle of the item that was reported as hit by the previous call to hitTest().
The result of this function is valid only if hitTest() returned true and only within the same calling function. Please note that this rectangle refers to a specific item column (and not all of the columns).
Definition at line 117 of file themedelegate.h.
|
inline |
Returns the theme row that was reported as hit by the previous call to hitTest().
The result of this function is valid only if hitTest() returned true and only within the same calling function. This function may also return a null row when hitTest() returned true. This means that the item was globally hit but no row was exactly hit (the user probably hit the margin instead).
Definition at line 144 of file themedelegate.h.
|
inline |
Returns the index of the theme row that was reported as hit by the previous call to hitTest().
The result of this function is valid only if hitRow() returns a non null value.
Definition at line 151 of file themedelegate.h.
|
inline |
Returns true if the hitRow() is a message row, false otherwise.
The result of this function has a meaning only if hitRow() returns a non zero result.
Definition at line 167 of file themedelegate.h.
|
inline |
Returns the rectangle of the row that was reported as hit by the previous call to hitTest().
The result of this function is valid only if hitTest() returned true and only within the same calling function. The result of this function is also invalid if hitRow() returns 0.
Definition at line 160 of file themedelegate.h.
bool ThemeDelegate::hitTest | ( | const QPoint & | viewportPoint, |
bool | exact = true |
||
) |
Performs a hit test on the specified viewport point.
Returns true if the point hit something and false otherwise. When the hit test is succesfull then the hitIndex(), hitItem(), hitColumn(), hitRow(), and hitContentItem() function will return information about the item that was effectively hit. If exact is set to true then hitTest() will return true only if the viewportPoint is exactly over an item. If exact is set to false then the hitTest() function will do its best to find the closest object to be actually "hit": this is useful, for example, in drag and drop operations.
Definition at line 1173 of file themedelegate.cpp.
|
static |
return the font to paint given item with, checking global kmail settings and theme settings
Definition at line 1662 of file themedelegate.cpp.
|
static |
return the font key to paint given item with, checking global kmail settings and theme settings
Definition at line 1683 of file themedelegate.cpp.
|
protectedpure virtual |
Returns the Item for the specified model index.
Pure virtual: must be reimplemented by derived classes.
Implemented in MessageList::Utils::ThemePreviewDelegate, and MessageList::Core::Delegate.
|
protectedvirtual |
Reimplemented from QStyledItemDelegate.
Reimplemented from QStyledItemDelegate.
Definition at line 550 of file themedelegate.cpp.
void ThemeDelegate::setTheme | ( | const Theme * | theme | ) |
Definition at line 62 of file themedelegate.cpp.
|
protectedvirtual |
Reimplemented from QStyledItemDelegate.
Reimplemented from QStyledItemDelegate.
Definition at line 1645 of file themedelegate.cpp.
QSize ThemeDelegate::sizeHintForItemTypeAndColumn | ( | Item::Type | type, |
int | column, | ||
const Item * | item = 0 |
||
) | const |
Returns a heuristic sizeHint() for the specified item type and column.
The hint is based on the contents of the theme (and not of any message or group header).
Definition at line 1592 of file themedelegate.cpp.
|
inline |
Definition at line 73 of file themedelegate.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.