kio Library API Documentation

KURLBarItemDialog Class Reference

A dialog that allows editing entries of a KURLBar (KURLBarItem). More...

#include <kurlbar.h>

Inheritance diagram for KURLBarItemDialog:

KDialogBase KDialog QDialog List of all members.

Public Methods

 KURLBarItemDialog (bool allowGlobal, const KURL &url, const QString &description, QString icon, bool appLocal=true, int iconSize=KIcon::SizeMedium, QWidget *parent=0, const char *name=0)
 Constructs a KURLBarItemDialog.

 ~KURLBarItemDialog ()
 Destroys the dialog.

KURL url () const
QString description () const
QString icon () const
bool applicationLocal () const

Static Public Methods

bool getInformation (bool allowGlobal, KURL &url, QString &description, QString &icon, bool &appLocal, int iconSize, QWidget *parent=0)
 A convenience method to show up the dialog and retrieve all the properties via the given parameters.


Protected Attributes

KURLRequesterm_urlEdit
 The KURLRequester used for editing the url.

KLineEditm_edit
 The KLineEdit used for editing the description.

KIconButtonm_iconButton
 The KIconButton to configure the icon.

QCheckBoxm_appLocal
 The QCheckBox to modify the local/global setting.


Detailed Description

A dialog that allows editing entries of a KURLBar (KURLBarItem).

The dialog offers to configure a given url, description and icon. See the class-method getInformation() for easy usage.

Author:
Carsten Pfeiffer <pfeiffer@kde.org>

Definition at line 512 of file kurlbar.h.


Constructor & Destructor Documentation

KURLBarItemDialog::KURLBarItemDialog bool    allowGlobal,
const KURL   url,
const QString   description,
QString    icon,
bool    appLocal = true,
int    iconSize = KIcon::SizeMedium,
QWidget   parent = 0,
const char *    name = 0
 

Constructs a KURLBarItemDialog.

allowGlobal if you set this to true, the dialog will have a checkbox for the user to decide if he wants the entry to be available globally or just for the current application. url the url of the item description a short, translated description of the item icon an icon for the item appLocal tells whether the item should be local for this application or available globalle iconSize determines the size of the icon that is shown/selectable parent the parent-widget for the dialog

If you leave the icon empty, the default icon for the given url will be used (KMimeType::pixmapForURL()).

Definition at line 750 of file kurlbar.cpp.

References KInstance::aboutData(), QWhatsThis::add(), QString::arg(), KStdAccel::description(), KURL::fileName(), QString::fromLatin1(), QDir::homeDirPath(), KMimeType::iconForURL(), KGlobal::instance(), QString::isEmpty(), KStdAccel::label(), KURLRequester::lineEdit(), m_appLocal, m_edit, m_iconButton, m_urlEdit, KURL::prettyURL(), KAboutData::programName(), QLabel::setBuddy(), QCheckBox::setChecked(), KIconButton::setIcon(), KIconButton::setIconSize(), KDialogBase::setMainWidget(), KURLRequester::setMode(), QGrid::setSpacing(), KIconButton::setStrictIconSize(), and KDialog::spacingHint().

Referenced by getInformation().

KURLBarItemDialog::~KURLBarItemDialog  
 

Destroys the dialog.

Definition at line 822 of file kurlbar.cpp.


Member Function Documentation

bool KURLBarItemDialog::getInformation bool    allowGlobal,
KURL   url,
QString   description,
QString   icon,
bool &    appLocal,
int    iconSize,
QWidget   parent = 0
[static]
 

A convenience method to show up the dialog and retrieve all the properties via the given parameters.

The parameters are used to initialize the dialog and then return the user-configured values.

See the KURLBarItem constructor for the parameter description.

Definition at line 726 of file kurlbar.cpp.

References applicationLocal(), description(), KStdAccel::description(), QDialog::exec(), icon(), KURLBarItemDialog(), and url().

Referenced by KURLBar::editItem(), and KURLBar::slotDropped().

KURL KURLBarItemDialog::url  
 

Returns:
the configured url

Definition at line 831 of file kurlbar.cpp.

References QString::at(), m_urlEdit, KURL::setPath(), and KURLRequester::url().

Referenced by getInformation().

QString KURLBarItemDialog::description  
 

Returns:
the configured description

Definition at line 843 of file kurlbar.cpp.

References m_edit.

Referenced by getInformation().

QString KURLBarItemDialog::icon  
 

Returns:
the configured icon

Definition at line 848 of file kurlbar.cpp.

References KIconButton::icon(), and m_iconButton.

Referenced by getInformation().

bool KURLBarItemDialog::applicationLocal  
 

Returns:
whether the item should be local to the application or global. if allowGlobal was set to false in the constructor, this will always return true.

Definition at line 853 of file kurlbar.cpp.

References QCheckBox::isChecked(), and m_appLocal.

Referenced by getInformation().


Member Data Documentation

KURLRequester* KURLBarItemDialog::m_urlEdit [protected]
 

The KURLRequester used for editing the url.

Definition at line 582 of file kurlbar.h.

Referenced by KURLBarItemDialog(), and url().

KLineEdit* KURLBarItemDialog::m_edit [protected]
 

The KLineEdit used for editing the description.

Definition at line 586 of file kurlbar.h.

Referenced by description(), and KURLBarItemDialog().

KIconButton* KURLBarItemDialog::m_iconButton [protected]
 

The KIconButton to configure the icon.

Definition at line 590 of file kurlbar.h.

Referenced by icon(), and KURLBarItemDialog().

QCheckBox* KURLBarItemDialog::m_appLocal [protected]
 

The QCheckBox to modify the local/global setting.

Definition at line 594 of file kurlbar.h.

Referenced by applicationLocal(), and KURLBarItemDialog().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.0.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Oct 8 12:21:37 2003 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2001