KDEGames
kgamethemeselector.cpp
49 KGameThemeSelectorPrivate(KGameThemeProvider *provider, KGameThemeSelector::Options options, KGameThemeSelector *q)
62KGameThemeSelector::KGameThemeSelector(KGameThemeProvider *provider, Options options, QWidget *parent)
89 d->m_list->setMinimumSize(itemSizeHint.width() + 2 * scrollBarSizeHint.width(), 4.1 * itemSizeHint.height());
93 connect(d->m_provider, &KGameThemeProvider::currentThemeChanged, this, [this](const KGameTheme *theme) {
108 d->m_knsButton = new KNSWidgets::Button(i18nc("@action:button", "Download New Themes…"), name, this);
113 connect(d->m_knsButton, &KNSWidgets::Button::dialogFinished, this, [this](const QList<KNSCore::Entry> &changedEntries) {
139 item->setData(Qt::DecorationRole, m_provider->generatePreview(theme, Metrics::ThumbnailBaseSize));
198 QPushButton *stuff = new QPushButton(QIcon::fromTheme(QStringLiteral("get-hot-new-stuff")), btn->text());
256 QRect thumbnailBaseRect(QPoint(Metrics::Padding + baseRect.left(), 0), Metrics::ThumbnailBaseSize);
263void KGameThemeDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
340QSize KGameThemeDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
A theme provider manages KGameTheme instances, and maintains a selection of the currentTheme().
Definition kgamethemeprovider.h:31
QList< const KGameTheme * > themes() const
Definition kgamethemeprovider.cpp:95
void currentThemeChanged(const KGameTheme *theme)
Emitted when the current theme changes.
virtual QPixmap generatePreview(const KGameTheme *theme, QSize size)
Generate a preview pixmap for the given theme.
Definition kgamethemeprovider.cpp:330
void setCurrentTheme(const KGameTheme *theme)
Select a new theme.
Definition kgamethemeprovider.cpp:159
void showAsDialog(const QString &caption=QString())
Create and show a non-modal dialog which displays this selector.
Definition kgamethemeselector.cpp:236
void dialogFinished(const QList< KNSCore::Entry > &changedEntries)
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString name(StandardAction id)
void clicked(bool checked)
ScrollPerPixel
SingleSelection
void setItemDelegate(QAbstractItemDelegate *delegate)
QStyle * style()
void addLayout(QLayout *layout, int stretch)
void addStretch(int stretch)
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
applicationName
virtual void closeEvent(QCloseEvent *e) override
virtual void reject()
ActionRole
QPushButton * addButton(StandardButton button)
void rejected()
void setStandardButtons(StandardButtons buttons)
bool isRightToLeft()
QIcon fromTheme(const QString &name)
ClearAndSelect
void setContentsMargins(const QMargins &margins)
qsizetype count() const const
void reserve(qsizetype size)
qsizetype size() const const
void clear()
count
void setCurrentRow(int row)
QListWidgetItem * item(int row) const const
void itemSelectionChanged()
QList< QListWidgetItem * > selectedItems() const const
void setCurrentItem(QListWidgetItem *item)
virtual QVariant data(int role) const const
virtual void setData(int role, const QVariant &value)
QVariant data(int role) const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
void deleteLater()
QObject * parent() const const
T qobject_cast(QObject *object)
void drawText(const QPoint &position, const QString &text)
const QFont & font() const const
void restore()
void save()
void setFont(const QFont &font)
int y() const const
QPoint center() const const
int height() const const
int left() const const
int right() const const
int top() const const
availableSize
int height() const const
int width() const const
Ignored
bool isEmpty() const const
PE_PanelItemViewItem
virtual void drawItemPixmap(QPainter *painter, const QRect &rectangle, int alignment, const QPixmap &pixmap) const const
virtual void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const const=0
AlignCenter
DecorationRole
RightToLeft
ElideRight
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
QByteArray toByteArray() const const
QString toString() const const
T value() const const
void hide()
QScreen * screen() const const
void setLayout(QLayout *layout)
void show()
bool isVisible() const const
void setWindowTitle(const QString &)
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:50:49 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:50:49 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.