libkdegames
kgthemeselector.cpp
Go to the documentation of this file.
55 Private(KgThemeProvider* provider, Options options, KgThemeSelector* q) : q(q), m_provider(provider), m_options(options), m_knsButton(0) {}
75 d->m_list->setMinimumSize(itemSizeHint.width() + 2 * scrollBarSizeHint.width(), 4.1 * itemSizeHint.height());
235 QRect thumbnailBaseRect(QPoint(Metrics::Padding + baseRect.left(), 0), Metrics::ThumbnailBaseSize);
242 void KgThemeDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const
250 const QPixmap thumbnail = index.data(Qt::DecorationRole).value<QPixmap>().scaled(Metrics::ThumbnailBaseSize, Qt::KeepAspectRatio, Qt::SmoothTransformation);
276 const QString authorString = ki18nc("Author attribution, e.g. \"by Jack\"", "by %1").subs(author).toString();
319 QSize KgThemeDelegate::sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const
QLayout * layout() const
QByteArray toByteArray() const
const QSize ThumbnailBaseSize(64, 64)
QSize size() const
bool isRightToLeft()
int width() const
Enable downloading of additional themes with KNewStuff3.
Definition: kgthemeselector.h:52
KgThemeDelegate(QObject *parent=0)
Definition: kgthemeselector.cpp:225
QRect thumbnailRect(const QRect &baseRect) const
Definition: kgthemeselector.cpp:233
int right() const
const QFont & font() const
A theme provider manages KgTheme instances, and maintains a selection of the currentTheme().
Definition: kgthemeprovider.h:39
void translate(int dx, int dy)
bool isVisible() const
void save()
T value() const
int height() const
void setParent(QWidget *parent)
int x() const
int y() const
void setBold(bool enable)
const char * name() const
QRect boundingRect(QChar ch) const
void setFont(const QFont &font)
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
int count(const T &value) const
Definition: kgthemeselector_p.h:26
int top() const
int left() const
void drawPixmap(const QRectF &target, const QPixmap &pixmap, const QRectF &source)
bool isEmpty() const
void setItemDelegate(QAbstractItemDelegate *delegate)
QString elidedText(const QString &text, Qt::TextElideMode mode, int width, int flags) const
virtual QVariant data(int role) const
void drawText(const QPointF &position, const QString &text)
QPoint center() const
void deleteLater()
void hide()
void moveTop(int y)
KgThemeSelector(KgThemeProvider *provider, Options options=DefaultBehavior, QWidget *parent=0)
Definition: kgthemeselector.cpp:62
void setMargin(int margin)
virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition: kgthemeselector.cpp:319
virtual void setData(int role, const QVariant &value)
void setItalic(bool enable)
void restore()
void setRight(int x)
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition: kgthemeselector.cpp:242
int width() const
QVariant data(int role) const
QStyle * style()
void setHeight(int height)
void setCaption(const QString &c)
int height() const
void adjust(int dx1, int dy1, int dx2, int dy2)
int bottom() const
QPoint topLeft() const
virtual void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const =0
Definition: kgthemeselector_p.h:34
void show()
virtual void closeEvent(QCloseEvent *event)
void moveRight(int x)
void moveCenter(const QPoint &position)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QObject * parent() const
QString toString() const
virtual bool event(QEvent *event)
void setLeft(int x)
int lineSpacing() const
void showAsDialog(const QString &caption=QString())
Create and show a non-modal dialog which displays this selector.
Definition: kgthemeselector.cpp:214
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:42 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:18:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.