parley
buttondelegate.cpp
Go to the documentation of this file.
29 : QStyledItemDelegate(itemView), m_rightMargin(0), m_buttonHeight(0), m_dashboard(parent), m_itemView(itemView)
47 void ButtonDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
60 painter->drawPixmap(option.rect.x() + iconMargin, option.rect.y() + iconMargin, icon.pixmap(iconSize, iconSize));
63 QRect textRect(rectX, option.rect.y(), option.rect.width() - rectX - m_rightMargin, option.rect.height());
QUrl toUrl() const
int width() const
virtual QSize sizeHint() const
virtual QModelIndex indexAt(const QPoint &point) const =0
T value() const
QWidget * viewport() const
void setIcon(const QIcon &icon)
ButtonDelegate(QAbstractItemView *itemView, Dashboard *parent)
Definition: buttondelegate.cpp:28
QPixmap pixmap(const QSize &size, Mode mode, State state) const
void resize(int w, int h)
bool isValid() const
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition: buttondelegate.cpp:47
void drawPixmap(const QRectF &target, const QPixmap &pixmap, const QRectF &source)
void move(int x, int y)
void drawText(const QPointF &position, const QString &text)
QString elidedText(const QFontMetrics &fontMetrics, int width, Qt::TextElideMode mode, const QString &text)
void hide()
void setAutoRaise(bool enable)
Definition: dashboard.h:40
QPoint pos()
QVariant data(int role) const
QStyle * style()
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition: buttondelegate.cpp:70
QPoint mapFromGlobal(const QPoint &pos) const
int height() const
virtual void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const =0
void show()
void setToolTip(const QString &)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QString toString() const
height
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:15:56 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:15:56 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.