Akonadi
agenttypewidget.cpp
31 void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
35 void drawFocus(QPainter * /*painter*/, const QStyleOptionViewItem & /*option*/, QRect /*rect*/) const;
53 void currentAgentTypeChanged(const QModelIndex & /*currentIndex*/, const QModelIndex & /*previousIndex*/);
68void AgentTypeWidgetPrivate::currentAgentTypeChanged(const QModelIndex ¤tIndex, const QModelIndex &previousIndex)
102 d->mView->selectionModel()->setCurrentIndex(d->mView->model()->index(0, 0), QItemSelectionModel::Select);
104 connect(d->mView->selectionModel(), &QItemSelectionModel::currentChanged, this, [this](const QModelIndex &start, const QModelIndex &end) {
107 connect(d->mView, qOverload<const QModelIndex &>(&QListView::activated), this, [this](const QModelIndex &index) {
143void AgentTypeWidgetDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
180 QPalette::ColorGroup cg = (option.state & QStyle::State_Enabled) ? QPalette::Normal : QPalette::Disabled;
196 painter->drawText(option.rect.x() + 5 + wp + 5, option.rect.y() + 7, wn, hn, Qt::AlignLeft, name);
201 painter->drawText(option.rect.x() + 5 + wp + 5, option.rect.y() + 7 + hn, wc, hc, Qt::AlignLeft, comment);
209QSize AgentTypeWidgetDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
243void AgentTypeWidgetDelegate::drawFocus(QPainter *painter, const QStyleOptionViewItem &option, QRect rect) const
250 QPalette::ColorGroup cg = (option.state & QStyle::State_Enabled) ? QPalette::Normal : QPalette::Disabled;
251 o.backgroundColor = option.palette.color(cg, (option.state & QStyle::State_Selected) ? QPalette::Highlight : QPalette::Window);
A proxy model for filtering AgentType or AgentInstance.
Definition agentfilterproxymodel.h:42
~AgentTypeWidget() override
Destroys the agent type widget.
AgentType currentAgentType() const
Returns the current agent type or an invalid agent type if no agent type is selected.
Definition agenttypewidget.cpp:114
void currentChanged(const Akonadi::AgentType ¤t, const Akonadi::AgentType &previous)
This signal is emitted whenever the current agent type changes.
AgentFilterProxyModel * agentFilterProxyModel() const
Returns the agent filter proxy model, use this to filter by agent mimetype or capabilities.
Definition agenttypewidget.cpp:129
void activated()
This signal is emitted whenever the user activates an agent.
AgentTypeWidget(QWidget *parent=nullptr)
Creates a new agent type widget.
Definition agenttypewidget.cpp:83
Q_SCRIPTABLE Q_NOREPLY void start()
Helper integration between Akonadi and Qt.
QString name(StandardAction id)
virtual QVariant data(const QModelIndex &index, int role) const const=0
ScrollPerPixel
void activated(const QModelIndex &index)
QStyle * style()
QRect boundingRect(QChar ch) const const
void currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
QModelIndex currentIndex() const const
void addWidget(QWidget *w)
void setContentsMargins(const QMargins &margins)
QIcon
QVariant data(int role) const const
Qt::ItemFlags flags() const const
bool isValid() const const
const QAbstractItemModel * model() const const
Q_OBJECTQ_OBJECT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QObject * parent() const const
Antialiasing
void drawPixmap(const QPoint &point, const QPixmap &pixmap)
void drawText(const QPoint &position, const QString &text)
const QFont & font() const const
QFontMetrics fontMetrics() const const
const QPen & pen() const const
void setFont(const QFont &font)
void setPen(Qt::PenStyle style)
void setRenderHint(RenderHint hint, bool on)
ColorGroup
HighlightedText
int width() const const
int height() const const
int width() const const
bool isEmpty() const const
PE_PanelItemViewItem
State_Enabled
virtual void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const const=0
AlignLeft
DisplayRole
ItemIsSelectable
bool isValid() const const
QString toString() const const
int typeId() const const
T value() const const
QLayout * layout() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.