KIO
kicondialog.cpp
Go to the documentation of this file.
51 void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const;
59 KIconCanvasDelegate::KIconCanvasDelegate(KIconCanvas *parent, QAbstractItemDelegate *defaultDelegate)
66 void KIconCanvasDelegate::paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const
77 QSize KIconCanvasDelegate::sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const
235 QImage paddedImage = QImage(canvasIconWidth, canvasIconHeight, QImage::Format_ARGB32_Premultiplied);
238 painter.drawImage( (canvasIconWidth - img.width()) / 2, (canvasIconHeight - img.height()) / 2, img);
419 if (mpCanvas->style()->styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents, &opt, mpCanvas)) {
420 width += mpCanvas->style()->pixelMetric(QStyle::PM_ScrollView_ScrollBarSpacing, &opt, mpCanvas);
676 KFileDialog dlg(emptyUrl, i18n("*.png *.xpm *.svg *.svgz|Icon Files (*.png *.xpm *.svg *.svgz)"), q);
842 void KIconButton::setIconType(KIconLoader::Group group, KIconLoader::Context context, bool user)
860 d->mpDialog->setCustomLocation(QFileInfo(d->mpLoader->iconPath(d->mIcon, d->mGroup, true) ).absolutePath());
void setCustomLocation(const QString &location)
sets a custom icon directory
Definition: kicondialog.cpp:605
QString i18n(const char *text)
void clear()
KIconButton(QWidget *parent=0L)
Constructs a KIconButton using the global iconloader.
Definition: kicondialog.cpp:769
void setViewMode(ViewMode mode)
bool load(QIODevice *device, const char *format)
QString toUpper() const
QListWidgetItem * currentItem() const
int width() const
void setModal(bool modal)
QButtonGroup * group() const
void addWidget(QWidget *widget, int row, int column, QFlags< Qt::AlignmentFlag > alignment)
void setIconSize(int size)
Sets the size of the icons to be shown / selected.
Definition: kicondialog.cpp:549
static KIconLoader * global()
bool operator<(const QString &other) const
bool operator==(const QString &other) const
static QString getIcon(KIconLoader::Group group=KIconLoader::Desktop, KIconLoader::Context context=KIconLoader::Application, bool strictIconSize=false, int iconSize=0, bool user=false, QWidget *parent=0, const QString &caption=QString())
Pops up the dialog an lets the user select an icon.
Definition: kicondialog.cpp:657
int timeout
KIconDialog(QWidget *parent=0L)
Constructs an icon selection dialog using the global iconloader.
Definition: kicondialog.cpp:329
QString openDialog()
exec()utes this modal dialog and returns the name of the selected icon, or QString() if the dialog wa...
Definition: kicondialog.cpp:610
KStandardDirs * dirs()
void setMovement(Movement movement)
int exec()
QPixmap fromImage(const QImage &image, QFlags< Qt::ImageConversionFlag > flags)
void setButtonIconSize(int size)
Sets the size of the icon to be shown on the button.
Definition: kicondialog.cpp:831
void setIconType(KIconLoader::Group group, KIconLoader::Context context, bool user=false)
Sets the icon group and context.
Definition: kicondialog.cpp:842
void setup(KIconLoader::Group group, KIconLoader::Context context=KIconLoader::Application, bool strictIconSize=false, int iconSize=0, bool user=false, bool lockUser=false, bool lockCustomDir=false)
Allows you to set the same parameters as in the class method getIcon(), as well as two additional par...
Definition: kicondialog.cpp:565
void setIconSize(int size)
Sets the size of the icon to be shown / selected.
Definition: kicondialog.cpp:817
bool isNull() const
#define I18N_NOOP(x)
Definition: kfile.h:45
void setIcon(const QIcon &icon)
void startLoading(int count)
This signal is emitted when the loading of the icons has started.
void setStrictIconSize(bool b)
Sets a strict icon size policy for allowed icons.
Definition: kicondialog.cpp:807
Provides a user (and developer) friendly way to select files and directories.
Definition: kfiledialog.h:68
int lastIndexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
void initFrom(const QWidget *widget)
void setBuddy(QWidget *buddy)
int iconSize() const
Returns the iconsize set via setIconSize() or 0, if the default iconsize will be used.
bool strictIconSize() const
Returns true if a strict icon size policy is set.
Definition: kicondialog.cpp:544
QSize size() const
const char * name() const
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
void append(const T &value)
void setLayout(QLayout *layout)
int iconSize() const
Returns the iconsize set via setIconSize() or 0, if the default iconsize will be used.
Definition: kicondialog.cpp:559
void clear()
void fill(uint pixelValue)
void setToolTip(const QString &toolTip)
void setIconSize(const QSize &size)
int width() const
void setIconSize(const QSize &size)
void setWidth(int width)
bool isEmpty() const
void clicked(bool checked)
void setItemDelegate(QAbstractItemDelegate *delegate)
void setOverrideCursor(const QCursor &cursor)
virtual QVariant data(int role) const
QAbstractItemDelegate * itemDelegate() const
void restoreOverrideCursor()
void showDialog()
show()es this dialog and emits a newIcon(const QString&) signal when successful.
Definition: kicondialog.cpp:632
QListWidgetItem * item(int row) const
void setMargin(int margin)
virtual void accept()
QString right(int n) const
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const =0
Definition: kfiledialog.h:85
void setUniformItemSizes(bool enable)
virtual void setData(int role, const QVariant &value)
void setStrictIconSize(bool b)
Sets a strict icon size policy for allowed icons.
Definition: kicondialog.cpp:539
void newIconName(const QString &)
void setWhatsThis(const QString &)
void drawImage(const QRectF &target, const QImage &image, const QRectF &source, QFlags< Qt::ImageConversionFlag > flags)
QString mid(int position, int n) const
void setTitle(const QString &title)
Context
Group
typedef ConstIterator
void setCaption(const QString &c)
int height() const
virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const =0
QString completeBaseName() const
int height() const
void setGridSize(const QSize &size)
void show()
QStringList findAllResources(const char *type, const QString &filter=QString(), SearchOptions options=NoSearchOptions) const
bool strictIconSize() const
Returns true if a strict icon size policy is set.
QString absolutePath() const
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QObject * parent() const
const KShortcut & end()
QString toString() const
void currentItemChanged(QListWidgetItem *current, QListWidgetItem *previous)
QString text() const
QImage scaled(int width, int height, Qt::AspectRatioMode aspectRatioMode, Qt::TransformationMode transformMode) const
void addLayout(QLayout *layout, int stretch)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:53 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:24:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.