Marble
MapThemeDownloadDialog.cpp
28 void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
32 bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override;
77 d->m_model.setRegistryFile(MarbleDirs::localPath() + QLatin1StringView("/newstuff/marble-map-themes.knsregistry"), Marble::NewstuffModel::NameTag);
92MapItemDelegate::MapItemDelegate(QListView *view, NewstuffModel *newstuffModel, MarbleWidget *marbleWidget)
103void MapItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
111 paintContext.palette.setColor(QPalette::Text, styleOption.palette.color(QPalette::Active, QPalette::HighlightedText));
180QSize MapItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
186 doc.setTextWidth(qMax(200, m_view->contentsRect().width() - iconSize.width() - buttonWidth(option) - 3 * m_margin));
188 return QSize(iconSize.width() + doc.size().width() + buttonWidth(option) + 3 * m_margin, 2 + qMax(iconSize.height(), qRound(doc.size().height())));
194bool MapItemDelegate::editorEvent(QEvent *event, QAbstractItemModel *, const QStyleOptionViewItem &option, const QModelIndex &index)
255 m_buttonWidth = 2 * m_iconSize + qMax(qMax(installWidth, removeWidth), qMax(cancelWidth, upgradeWidth));
261QStyleOptionButton MapItemDelegate::button(Element element, const QStyleOptionViewItem &option) const
307 QPoint const topLeftCol3 = topLeftCol2 + QPoint(option.rect.width() - 3 * m_margin - width - option.decorationSize.width(), 0);
318 QSize buttonSize = QApplication::style()->sizeFromContents(QStyle::CT_PushButton, &optionButton, size);
326 QSize buttonSize = QApplication::style()->sizeFromContents(QStyle::CT_PushButton, &optionButton, size);
346 return QStringLiteral("<p><b>%1</b><br />%2</p><p>Author: %3<br />License: %4<br />Version %5 (%6) %7</p>")
This file contains the headers for MarbleWidget.
AKONADI_CALENDAR_EXPORT KCalendarCore::Event::Ptr event(const Akonadi::Item &item)
Binds a QML item to a specific geodetic location in screen coordinates.
Definition AbstractDataPlugin.cpp:23
virtual void draw(QPainter *painter, const PaintContext &context)=0
QStyle * style()
QString absolutePath() const const
bool cdUp()
MouseButtonRelease
Adjust
int column() const const
QVariant data(int role) const const
int row() const const
Q_OBJECTQ_OBJECT
virtual bool event(QEvent *e)
void drawPixmap(const QPoint &point, const QPixmap &pixmap)
void drawText(const QPoint &position, const QString &text)
void restore()
void save()
void setClipRect(const QRect &rectangle, Qt::ClipOperation operation)
void translate(const QPoint &offset)
Active
Text
int x() const const
void adjust(int dx1, int dy1, int dx2, int dy2)
bool contains(const QPoint &point, bool proper) const const
int height() const const
QSize size() const const
QPoint topLeft() const const
int width() const const
int height() const const
void setWidth(int width)
int width() const const
QString left(qsizetype n) const const
QString mid(qsizetype position, qsizetype n) const const
QString number(double n, char format, int precision)
qsizetype size() const const
CT_PushButton
CE_ItemViewItem
State_Selected
virtual void drawControl(ControlElement 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
AlignCenter
DecorationRole
QAbstractTextDocumentLayout * documentLayout() const const
void setDefaultFont(const QFont &font)
void setHtml(const QString &html)
void setTextWidth(qreal width)
bool toBool() const const
qlonglong toLongLong(bool *ok) const const
QString toString() const const
QStringList toStringList() const const
T value() const const
void setupUi(QWidget *widget)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:45 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:15:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.