.TH "KPropertiesDialog" 3 "28 Jan 2004" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KPropertiesDialog \- The main properties dialog class.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kpropertiesdialog.h>\fP
.PP
Inherits \fBKDialogBase\fP.
.PP
.SS "Public Slots"

.in +1c
.ti -1c
.RI "virtual void \fBslotOk\fP ()"
.br
.RI "\fICalled when the user presses 'Ok'. \fP"
.ti -1c
.RI "virtual void \fBslotCancel\fP ()"
.br
.in -1c
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBpropertiesClosed\fP ()"
.br
.RI "\fIEmitted when we have finished with the properties (be it Apply or Cancel). \fP"
.ti -1c
.RI "void \fBapplied\fP ()"
.br
.ti -1c
.RI "void \fBcanceled\fP ()"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKPropertiesDialog\fP (\fBKFileItem\fP *item, \fBQWidget\fP *parent=0L, const  char *name=0L, bool modal=false, bool autoShow=true)"
.br
.RI "\fIBrings up a Properties dialog. \fP"
.ti -1c
.RI "\fBKPropertiesDialog\fP (\fBKFileItemList\fP _items, \fBQWidget\fP *parent=0L, const  char *name=0L, bool modal=false, bool autoShow=true)"
.br
.RI "\fIBrings up a Properties dialog. \fP"
.ti -1c
.RI "\fBKPropertiesDialog\fP (const  \fBKURL\fP &_url, mode_t _mode, \fBQWidget\fP *parent=0L, const  char *name=0L, bool modal=false, bool autoShow=true)"
.br
.RI "\fI\fBThis class or method is obsolete, it is provided for compatibility only.\fP \fP"
.ti -1c
.RI "\fBKPropertiesDialog\fP (const  \fBKURL\fP &_url, \fBQWidget\fP *parent=0L, const  char *name=0L, bool modal=false, bool autoShow=true)"
.br
.RI "\fIBrings up a Properties dialog. \fP"
.ti -1c
.RI "\fBKPropertiesDialog\fP (const  \fBKURL\fP &_tempUrl, const  \fBKURL\fP &_currentDir, const  \fBQString\fP &_defaultName, \fBQWidget\fP *parent=0L, const  char *name=0L, bool modal=false, bool autoShow=true)"
.br
.RI "\fICreates a properties dialog for a new .desktop file (whose name is not known yet), based on a template. \fP"
.ti -1c
.RI "\fBKPropertiesDialog\fP (const  \fBQString\fP &title, \fBQWidget\fP *parent=0L, const  char *name=0L, bool modal=false)"
.br
.RI "\fICreates an empty properties dialog (for applications that want use a standard dialog, but for things not doable via the plugin-mechanism). \fP"
.ti -1c
.RI "virtual \fB~KPropertiesDialog\fP ()"
.br
.RI "\fICleans up the properties dialog and frees any associated resources, including the dialog itself. \fP"
.ti -1c
.RI "void \fBinsertPlugin\fP (\fBKPropsDlgPlugin\fP *plugin)"
.br
.RI "\fIAdds a '3rd party' properties plugin to the dialog. \fP"
.ti -1c
.RI "const  \fBKURL\fP & \fBkurl\fP () const "
.br
.ti -1c
.RI "\fBKFileItem\fP * \fBitem\fP ()"
.br
.ti -1c
.RI "\fBKFileItemList\fP \fBitems\fP () const "
.br
.ti -1c
.RI "\fBKDialogBase\fP * \fBdialog\fP ()"
.br
.ti -1c
.RI "const  \fBKDialogBase\fP * \fBdialog\fP () const "
.br
.ti -1c
.RI "const  \fBKURL\fP & \fBcurrentDir\fP () const "
.br
.RI "\fIIf we are building this dialog from a template,. \fP"
.ti -1c
.RI "const  \fBQString\fP & \fBdefaultName\fP () const "
.br
.RI "\fIIf we are building this dialog from a template,. \fP"
.ti -1c
.RI "void \fBupdateUrl\fP (const  \fBKURL\fP &_newUrl)"
.br
.RI "\fIUpdates the item url (either called by rename or because a global apps/mimelnk desktop file is being saved) Can only be called if the dialog applies to a single file/URL. \fP"
.ti -1c
.RI "void \fBrename\fP (const  \fBQString\fP &_name)"
.br
.RI "\fI#see FilePropsPlugin::applyChanges Can only be called if the dialog applies to a single file/URL. \fP"
.ti -1c
.RI "void \fBabortApplying\fP ()"
.br
.RI "\fITo abort applying changes. \fP"
.ti -1c
.RI "void \fBshowFileSharingPage\fP ()"
.br
.RI "\fI\fBSince:\fP
.RS 4
3.1 
.RE
.PP
\fP"
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "bool \fBcanDisplay\fP (\fBKFileItemList\fP _items)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SH "Detailed Description"
.PP 
The main properties dialog class. 

A Properties Dialog is a dialog which displays various information about a particular file or URL, or several ones. This main class holds various related classes, which are instantiated in the form of tab entries in the tabbed dialog that this class provides. The various tabs themselves will let the user view or change information about the file or URL.
.PP
This class must be created with (void)new KPropertiesDialog(...) It will take care of deleting itself. 
.PP
Definition at line 64 of file kpropertiesdialog.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KPropertiesDialog::KPropertiesDialog (\fBKFileItem\fP * item, \fBQWidget\fP * parent = 0L, const char * name = 0L, bool modal = false, bool autoShow = true)"
.PP
Brings up a Properties dialog. Normal constructor for file-manager-like applications. Normally you will use this method rather than the one below.
.PP
\fBParameters:\fP
.RS 4
\fIitem\fP file item whose properties should be displayed. 
.br
\fIparent\fP is the parent of the dialog widget. 
.br
\fIname\fP is the internal name. 
.br
\fImodal\fP tells the dialog whether it should be modal. 
.br
\fIautoShow\fP tells the dialog whethr it should show itself automatically. 
.RE
.PP
Definition at line 132 of file kpropertiesdialog.cpp.
.PP
References QPtrList::append(), KIO::decodeFileName(), KURL::isEmpty(), KStdAccel::name(), and KFileItem::url().
.SS "KPropertiesDialog::KPropertiesDialog (\fBKFileItemList\fP _items, \fBQWidget\fP * parent = 0L, const char * name = 0L, bool modal = false, bool autoShow = true)"
.PP
Brings up a Properties dialog. Normal constructor for file-manager-like applications.
.PP
\fBParameters:\fP
.RS 4
\fI_items\fP list of file items whose properties should be displayed.
.br
\fIparent\fP is the parent of the dialog widget. 
.br
\fIname\fP is the internal name. 
.br
\fImodal\fP tells the dialog whether it should be modal. 
.br
\fIautoShow\fP tells the dialog whethr it should show itself automatically. 
.RE
.PP
Definition at line 160 of file kpropertiesdialog.cpp.
.PP
References QPtrList::append(), QPtrListIterator::current(), KIO::decodeFileName(), QPtrList::first(), KURL::isEmpty(), QPtrList::isEmpty(), and KStdAccel::name().
.SS "KPropertiesDialog::KPropertiesDialog (const \fBKURL\fP & _url, mode_t _mode, \fBQWidget\fP * parent = 0L, const char * name = 0L, bool modal = false, bool autoShow = true)"
.PP
\fBThis class or method is obsolete, it is provided for compatibility only.\fP Brings up a Properties dialog. Convenience constructor for non-file-manager applications.
.PP
\fBParameters:\fP
.RS 4
\fI_url\fP the URL whose properties should be displayed 
.br
\fI_mode\fP unused. 
.br
\fIparent\fP is the parent of the dialog widget. 
.br
\fIname\fP is the internal name. 
.br
\fImodal\fP tells the dialog whether it should be modal. 
.br
\fIautoShow\fP tells the dialog whethr it should show itself automatically. 
.RE
.PP
Definition at line 182 of file kpropertiesdialog.cpp.
.PP
References KIO::decodeFileName(), KURL::isEmpty(), KStdAccel::name(), QDialog::result(), and KIO::stat().
.SS "KPropertiesDialog::KPropertiesDialog (const \fBKURL\fP & _url, \fBQWidget\fP * parent = 0L, const char * name = 0L, bool modal = false, bool autoShow = true)"
.PP
Brings up a Properties dialog. Convenience constructor for non-file-manager applications.
.PP
\fBParameters:\fP
.RS 4
\fI_url\fP the URL whose properties should be displayed 
.br
\fIparent\fP is the parent of the dialog widget. 
.br
\fIname\fP is the internal name. 
.br
\fImodal\fP tells the dialog whether it should be modal. IMPORTANT: This constructor, together with modal=true, leads to a grave display bug (due to \fBKIO::stat()\fP being run before the dialog has all the necessary information). Do not use this combination for now. For local files with a known mimetype, simply create a \fBKFileItem\fP and pass it to the other constructor.
.br
\fIautoShow\fP tells the dialog whethr it should show itself automatically. 
.RE
.PP
Definition at line 202 of file kpropertiesdialog.cpp.
.PP
References KIO::decodeFileName(), KURL::isEmpty(), KStdAccel::name(), QDialog::result(), and KIO::stat().
.SS "KPropertiesDialog::KPropertiesDialog (const \fBKURL\fP & _tempUrl, const \fBKURL\fP & _currentDir, const \fBQString\fP & _defaultName, \fBQWidget\fP * parent = 0L, const char * name = 0L, bool modal = false, bool autoShow = true)"
.PP
Creates a properties dialog for a new .desktop file (whose name is not known yet), based on a template. Special constructor for 'File / New' in file-manager applications.
.PP
\fBParameters:\fP
.RS 4
\fI_templUrl\fP template used for reading only 
.br
\fI_currentDir\fP directory where the file will be written to 
.br
\fI_defaultName\fP something to put in the name field, like mimetype.desktop 
.br
\fIparent\fP is the parent of the dialog widget. 
.br
\fIname\fP is the internal name. 
.br
\fImodal\fP tells the dialog whether it should be modal. 
.br
\fIautoShow\fP tells the dialog whethr it should show itself automatically. 
.RE
.PP
Definition at line 221 of file kpropertiesdialog.cpp.
.PP
References QPtrList::append(), KIO::decodeFileName(), KURL::isEmpty(), and KStdAccel::name().
.SS "KPropertiesDialog::KPropertiesDialog (const \fBQString\fP & title, \fBQWidget\fP * parent = 0L, const char * name = 0L, bool modal = false)"
.PP
Creates an empty properties dialog (for applications that want use a standard dialog, but for things not doable via the plugin-mechanism). \fBParameters:\fP
.RS 4
\fItitle\fP is the string display as the 'filename' in the caption of the dialog. 
.br
\fIparent\fP is the parent of the dialog widget. 
.br
\fIname\fP is the internal name. 
.br
\fImodal\fP tells the dialog whether it should be modal. 
.RE
.PP
Definition at line 149 of file kpropertiesdialog.cpp.
.PP
References KStdAccel::name().
.SS "KPropertiesDialog::~\fBKPropertiesDialog\fP ()\fC [virtual]\fP"
.PP
Cleans up the properties dialog and frees any associated resources, including the dialog itself. Note that when a properties dialog is closed it cleans up and deletes itself. Definition at line 304 of file kpropertiesdialog.cpp.
.PP
References QPtrList< KPropsDlgPlugin >::clear().
.SH "Member Function Documentation"
.PP 
.SS "bool KPropertiesDialog::canDisplay (\fBKFileItemList\fP _items)\fC [static]\fP"
.PP
\fBReturns:\fP
.RS 4
whether there are any property pages available for the given file items 
.RE
.PP
Definition at line 318 of file kpropertiesdialog.cpp.
.PP
References KFileMetaPropsPlugin::supports(), KFilePermissionsPropsPlugin::supports(), and KFilePropsPlugin::supports().
.SS "void KPropertiesDialog::insertPlugin (\fBKPropsDlgPlugin\fP * plugin)"
.PP
Adds a '3rd party' properties plugin to the dialog. Useful for extending the properties mechanism.
.PP
To create a new plugin type, inherit from the base class KPropsPlugin and implement all the methods. If you define a service .desktop file for your plugin, you do not need to call \fBinsertPlugin()\fP.
.PP
\fBParameters:\fP
.RS 4
\fIplugin\fP is a pointer to the PropsPlugin. The Properties dialog will do destruction for you. The KPropsPlugin MUST have been created with the KPropertiesDialog as its parent. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBKPropsDlgPlugin\fP 
.RE
.PP
Definition at line 310 of file kpropertiesdialog.cpp.
.PP
References QPtrList< KPropsDlgPlugin >::append().
.SS "const \fBKURL\fP& KPropertiesDialog::kurl () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
a parsed URL. Valid only if dialog shown for one file/url. 
.RE
.PP
Definition at line 202 of file kpropertiesdialog.h.
.PP
Referenced by KDevicePropsPlugin::applyChanges(), KBindingPropsPlugin::applyChanges(), KApplicationPropsPlugin::applyChanges(), KURLPropsPlugin::applyChanges(), KExecPropsPlugin::applyChanges(), KFilePropsPlugin::applyChanges(), KApplicationPropsPlugin::KApplicationPropsPlugin(), KFileMetaPropsPlugin::KFileMetaPropsPlugin(), KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin(), KFilePropsPlugin::KFilePropsPlugin(), and KURLPropsPlugin::KURLPropsPlugin().
.SS "\fBKFileItem\fP* KPropertiesDialog::item ()\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
the file item for which the dialog is shown Warning, it returns the first item of the list. This means, use this only if you are sure the dialog is used for a single item. 
.RE
.PP
Definition at line 210 of file kpropertiesdialog.h.
.PP
References QPtrList::first().
.PP
Referenced by KFileMetaPropsPlugin::KFileMetaPropsPlugin(), KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin(), and KFilePropsPlugin::KFilePropsPlugin().
.SS "\fBKFileItemList\fP KPropertiesDialog::items () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
the items for which the dialog is shown 
.RE
.PP
Definition at line 215 of file kpropertiesdialog.h.
.PP
Referenced by KFilePermissionsPropsPlugin::applyChanges(), KFileSharePropsPlugin::applyChanges(), KFileMetaPropsPlugin::KFileMetaPropsPlugin(), KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin(), KFilePropsPlugin::KFilePropsPlugin(), and KFilePropsPlugin::postApplyChanges().
.SS "\fBKDialogBase\fP* KPropertiesDialog::dialog ()\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
a pointer to the dialog \fBThis class or method is obsolete, it is provided for compatibility only.\fP 
.RE
.PP
Definition at line 221 of file kpropertiesdialog.h.
.PP
Referenced by KApplicationPropsPlugin::KApplicationPropsPlugin(), KBindingPropsPlugin::KBindingPropsPlugin(), KExecPropsPlugin::KExecPropsPlugin(), KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin(), KFilePropsPlugin::KFilePropsPlugin(), KPropsDlgPlugin::KPropsDlgPlugin(), and KURLPropsPlugin::KURLPropsPlugin().
.SS "const \fBKURL\fP& KPropertiesDialog::currentDir () const\fC [inline]\fP"
.PP
If we are building this dialog from a template,. \fBReturns:\fP
.RS 4
the current directory QString::null means no template used 
.RE
.PP
Definition at line 229 of file kpropertiesdialog.h.
.PP
Referenced by KFilePropsPlugin::KFilePropsPlugin().
.SS "const \fBQString\fP& KPropertiesDialog::defaultName () const\fC [inline]\fP"
.PP
If we are building this dialog from a template,. \fBReturns:\fP
.RS 4
the default name (see 3rd constructor) QString::null means no template used 
.RE
.PP
Definition at line 236 of file kpropertiesdialog.h.
.PP
Referenced by KFilePropsPlugin::KFilePropsPlugin().
.SS "void KPropertiesDialog::updateUrl (const \fBKURL\fP & _newUrl)"
.PP
Updates the item url (either called by rename or because a global apps/mimelnk desktop file is being saved) Can only be called if the dialog applies to a single file/URL. \fBParameters:\fP
.RS 4
\fI_name\fP new URL 
.RE
.PP
Definition at line 476 of file kpropertiesdialog.cpp.
.PP
References QPtrList::count(), QPtrListIterator::current(), QPtrList::first(), KURL::isEmpty(), and KURL::url().
.PP
Referenced by rename().
.SS "void KPropertiesDialog::rename (const \fBQString\fP & _name)"
.PP
#see FilePropsPlugin::applyChanges Can only be called if the dialog applies to a single file/URL. \fBParameters:\fP
.RS 4
\fI_name\fP new filename, encoded. 
.RE
.PP
Definition at line 494 of file kpropertiesdialog.cpp.
.PP
References KURL::addPath(), QString::at(), QPtrList::count(), KURL::isEmpty(), QString::length(), KURL::setFileName(), QString::truncate(), updateUrl(), and KURL::url().
.PP
Referenced by KFilePropsPlugin::applyChanges().
.SS "void KPropertiesDialog::abortApplying ()"
.PP
To abort applying changes. Definition at line 517 of file kpropertiesdialog.cpp.
.PP
Referenced by KFilePropsPlugin::applyChanges().
.SS "void KPropertiesDialog::showFileSharingPage ()"
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP
Definition at line 274 of file kpropertiesdialog.cpp.
.PP
References QPtrList< KPropsDlgPlugin >::first(), QPtrList< KPropsDlgPlugin >::next(), KFileSharePropsPlugin::page(), KDialogBase::pageIndex(), and KDialogBase::showPage().
.SS "void KPropertiesDialog::slotOk ()\fC [virtual, slot]\fP"
.PP
Called when the user presses 'Ok'. Reimplemented from \fBKDialogBase\fP.
.PP
Definition at line 330 of file kpropertiesdialog.cpp.
.PP
References QDialog::accept(), KPropsDlgPlugin::applyChanges(), QObject::className(), QPtrList< KPropsDlgPlugin >::first(), KPropsDlgPlugin::isDirty(), QPtrList< KPropsDlgPlugin >::next(), KFilePropsPlugin::postApplyChanges(), propertiesClosed(), and KPropsDlgPlugin::setDirty().
.SS "void KPropertiesDialog::propertiesClosed ()\fC [signal]\fP"
.PP
Emitted when we have finished with the properties (be it Apply or Cancel). Referenced by slotOk().

.SH "Author"
.PP 
Generated automatically by Doxygen for kio Library from the source code.
