Marble
PluginItemDelegate.cpp
38void PluginItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
70 QStyleOptionButton button = buttonOption(option, index, PluginItemDelegate::About, topRight.x(), Qt::AlignRight);
76 QStyleOptionButton button = buttonOption(option, index, PluginItemDelegate::Configure, topRight.x(), Qt::AlignRight);
96 style->drawItemText(painter, nameRect, Qt::AlignLeft | Qt::AlignVCenter, option.palette, true, name);
101QSize PluginItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
136bool PluginItemDelegate::editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index)
141 if ((event->type() == QEvent::MouseButtonRelease) || (event->type() == QEvent::MouseButtonDblClick) || (event->type() == QEvent::MouseButtonPress)
156 if (checkRect.contains(mousePosition) && ((event->type() == QEvent::MouseButtonDblClick) || (event->type() == QEvent::MouseButtonRelease))) {
159 if (!(flags & Qt::ItemIsUserCheckable) || !(option.state & QStyle::State_Enabled) || !(flags & Qt::ItemIsEnabled))
171 Qt::CheckState state = (static_cast<Qt::CheckState>(checkValue.toInt()) == Qt::Checked ? Qt::Unchecked : Qt::Checked);
185 QRect aboutRect = buttonOption(option, index, PluginItemDelegate::About, topRight.x(), Qt::AlignRight).rect;
222 QRect configRect = buttonOption(option, index, PluginItemDelegate::Configure, topRight.x(), Qt::AlignRight).rect;
266QStyleOptionButton PluginItemDelegate::checkboxOption(const QStyleOptionViewItem &option, const QModelIndex &index, int position, Qt::AlignmentFlag alignment)
326 QSize buttonSize = QApplication::style()->sizeFromContents(QStyle::CT_PushButton, &buttonOption, contentSize);
340QRect PluginItemDelegate::alignRect(const QRect &object, const QRect &frame, int position, Qt::AlignmentFlag alignment)
QString name(StandardAction id)
Binds a QML item to a specific geodetic location in screen coordinates.
Definition AbstractDataPlugin.cpp:23
virtual Qt::ItemFlags flags(const QModelIndex &index) const const
virtual bool setData(const QModelIndex &index, const QVariant &value, int role)
QFontMetrics fontMetrics()
QStyle * style()
MouseButtonRelease
bool isNull() const const
void append(QList< T > &&value)
void reserve(qsizetype size)
QVariant data(int role) const const
bool isValid() const const
Q_EMITQ_EMIT
virtual bool event(QEvent *e)
QString tr(const char *sourceText, const char *disambiguation, int n)
void restore()
void save()
void translate(const QPoint &offset)
int x() const const
int bottom() const const
bool contains(const QPoint &point, bool proper) const const
int height() const const
int left() const const
void moveBottom(int y)
void moveLeft(int x)
void moveRight(int x)
void moveTop(int y)
void moveTopLeft(const QPoint &position)
void setLeft(int x)
void setRight(int x)
void setTopLeft(const QPoint &position)
QPoint topLeft() const const
QPoint topRight() const const
int width() const const
int height() const const
bool isEmpty() const const
void setHeight(int height)
void setWidth(int width)
int width() const const
CT_CheckBox
CE_CheckBox
PE_PanelItemViewItem
State_Enabled
virtual void drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const const=0
virtual void drawItemPixmap(QPainter *painter, const QRect &rectangle, int alignment, const QPixmap &pixmap) const const
virtual void drawItemText(QPainter *painter, const QRect &rectangle, int alignment, const QPalette &palette, bool enabled, const QString &text, QPalette::ColorRole textRole) const const
virtual void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const const=0
virtual QSize sizeFromContents(ContentsType type, const QStyleOption *option, const QSize &contentsSize, const QWidget *widget) const const=0
AlignLeft
CheckState
DecorationRole
typedef ItemFlags
LeftButton
bool isValid() const const
bool toBool() const const
int toInt(bool *ok) const const
QString toString() const const
T value() const const
void setMouseTracking(bool enable)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:52:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:52:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.