• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

kleopatra

  • Kleo
  • KioAvoidance
  • KIconDialog
Signals | Public Member Functions | Static Public Member Functions | Protected Slots | List of all members
Kleo::KioAvoidance::KIconDialog Class Reference

#include <kleo_kicondialog.h>

Inheritance diagram for Kleo::KioAvoidance::KIconDialog:
Inheritance graph
[legend]

Signals

void newIconName (const QString &)
 

Public Member Functions

 KIconDialog (QWidget *parent=0L)
 
 KIconDialog (KIconLoader *loader, QWidget *parent=0)
 
 ~KIconDialog ()
 
int iconSize () const
 
QString openDialog ()
 
void setCustomLocation (const QString &location)
 
void setIconSize (int size)
 
void setStrictIconSize (bool b)
 
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)
 
void showDialog ()
 
bool strictIconSize () const
 

Static Public Member Functions

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())
 

Protected Slots

void slotOk ()
 

Detailed Description

Dialog for interactive selection of icons.

Use the function getIcon() let the user select an icon.

An icon selection dialog.

Definition at line 108 of file kleo_kicondialog.h.

Constructor & Destructor Documentation

KIconDialog::KIconDialog ( QWidget *  parent = 0L)
explicit

Constructs an icon selection dialog using the global iconloader.

Parameters
parentThe parent widget.

Definition at line 269 of file kleo_kicondialog.cpp.

KIconDialog::KIconDialog ( KIconLoader *  loader,
QWidget *  parent = 0 
)
explicit

Constructs an icon selection dialog using a specific iconloader.

Parameters
loaderThe icon loader to use.
parentThe parent widget.

Definition at line 281 of file kleo_kicondialog.cpp.

KIconDialog::~KIconDialog ( )

Destructs the dialog.

Definition at line 419 of file kleo_kicondialog.cpp.

Member Function Documentation

QString KIconDialog::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() 
)
static

Pops up the dialog an lets the user select an icon.

Parameters
groupThe icon group this icon is intended for. Providing the group shows the icons in the dialog with the same appearance as when used outside the dialog.
contextThe initial icon context. Initially, the icons having this context are shown in the dialog. The user can change this.
strictIconSizeWhen true, only icons of the specified group's size are shown, otherwise icon not available in the desired group's size will also be selectable.
iconSizethe size of the icons – the default of the icongroup if set to 0
userBegin with the "user icons" instead of "system icons".
parentThe parent widget of the dialog.
captionThe caption to use for the dialog.
Returns
The name of the icon, suitable for loading with KIconLoader.

Definition at line 570 of file kleo_kicondialog.cpp.

int KIconDialog::iconSize ( ) const

Returns the iconsize set via setIconSize() or 0, if the default iconsize will be used.

Definition at line 482 of file kleo_kicondialog.cpp.

void Kleo::KioAvoidance::KIconDialog::newIconName ( const QString &  )
signal
QString KIconDialog::openDialog ( )

exec()utes this modal dialog and returns the name of the selected icon, or QString() if the dialog was aborted.

Returns
the name of the icon, suitable for loading with KIconLoader.
See also
getIcon

Definition at line 525 of file kleo_kicondialog.cpp.

void KIconDialog::setCustomLocation ( const QString &  location)

sets a custom icon directory

Definition at line 520 of file kleo_kicondialog.cpp.

void KIconDialog::setIconSize ( int  size)

Sets the size of the icons to be shown / selected.

See also
KIconLoader::StdSizes
iconSize

Definition at line 472 of file kleo_kicondialog.cpp.

void KIconDialog::setStrictIconSize ( bool  b)

Sets a strict icon size policy for allowed icons.

When true, only icons of the specified group's size in getIcon() are shown. When false, icons not available at the desired group's size will also be selectable.

Definition at line 462 of file kleo_kicondialog.cpp.

void KIconDialog::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 parameters to lock the choice between system and user dirs and to lock the custom user dir itself.

Definition at line 488 of file kleo_kicondialog.cpp.

void KIconDialog::showDialog ( )

show()es this dialog and emits a newIcon(const QString&) signal when successful.

QString() will be emitted if the dialog was aborted.

Definition at line 543 of file kleo_kicondialog.cpp.

void KIconDialog::slotOk ( )
protectedslot

Definition at line 550 of file kleo_kicondialog.cpp.

bool KIconDialog::strictIconSize ( ) const

Returns true if a strict icon size policy is set.

Definition at line 467 of file kleo_kicondialog.cpp.


The documentation for this class was generated from the following files:
  • kleo_kicondialog.h
  • kleo_kicondialog.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:56:43 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kleopatra

Skip menu "kleopatra"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal