class KPropertiesDialog

# class KPropertiesDialog | The main properties dialog class. More...
Definition | `#include <kpropertiesdialog.h>`
Inherits | KDialogBase (kdeui) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- KPropertiesDialog ( KFileItem * item, QWidget* parent = 0L, const char* name = 0L, bool modal = false, bool autoShow = true)
- KPropertiesDialog ( KFileItemList _items, QWidget *parent = 0L, const char* name = 0L, bool modal = false, bool autoShow = true)
- KPropertiesDialog ( const KURL& _url, QWidget* parent = 0L, const char* name = 0L, bool modal = false, bool autoShow = true)
- KPropertiesDialog ( const KURL& _tempUrl, const KURL& _currentDir, const QString& _defaultName, QWidget* parent = 0L, const char* name = 0L, bool modal = false, bool autoShow = true)
- KPropertiesDialog (const QString& title, QWidget* parent = 0L, const char* name = 0L, bool modal = false)
- virtual ~KPropertiesDialog ()
- void insertPlugin (KPropsDlgPlugin *plugin)
- const KURL& kurl () const
- KFileItem * item ()
- KFileItemList items () const
- KDialogBase* dialog ()
- const KDialogBase* dialog () const
- const KURL& currentDir () const
- const QString& defaultName () const
- void updateUrl ( const KURL& _newUrl )
- void rename ( const QString& _name )
- void abortApplying ()
- void showFileSharingPage ()

#### Public Slots

- virtual void slotOk ()
- virtual void slotCancel ()

#### Signals

- void propertiesClosed ()
- void applied ()
- void canceled ()

#### Public Static Methods

- static bool canDisplay ( KFileItemList _items )

#### Protected Methods

- virtual void virtual_hook ( int id, void* data )

## Detailed Description

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.

This class must be created with (void)new KPropertiesDialog(...) It will take care of deleting itself.

bool canDisplay ( KFileItemList _items ) | ### canDisplay

[static]

Returns: whether there are any property pages available for the given file items

KPropertiesDialog ( KFileItem * item, QWidget* parent = 0L, const char* name = 0L, bool modal = false, bool autoShow = true) | ### KPropertiesDialog

Brings up a Properties dialog. Normal constructor for file-manager-like applications. Normally you will use this method rather than the one below.

Parameters:

item | file item whose properties should be displayed.
parent | is the parent of the dialog widget.
name | is the internal name.
modal | tells the dialog whether it should be modal.
autoShow | tells the dialog whethr it should show itself automatically.

KPropertiesDialog ( KFileItemList _items, QWidget *parent = 0L, const char* name = 0L, bool modal = false, bool autoShow = true) | ### KPropertiesDialog

Brings up a Properties dialog. Normal constructor for file-manager-like applications.

Parameters:

_items | list of file items whose properties should be displayed.
parent | is the parent of the dialog widget.
name | is the internal name.
modal | tells the dialog whether it should be modal.
autoShow | tells the dialog whethr it should show itself automatically.

KPropertiesDialog ( const KURL& _url, QWidget* parent = 0L, const char* name = 0L, bool modal = false, bool autoShow = true) | ### KPropertiesDialog

Brings up a Properties dialog. Convenience constructor for non-file-manager applications.

/** Brings up a Properties dialog. Convenience constructor for non-file-manager applications.

Parameters:

_url | the URL whose properties should be displayed
_mode | unused.
parent | is the parent of the dialog widget.
name | is the internal name.
modal | tells the dialog whether it should be modal.
autoShow | tells the dialog whethr it should show itself automatically. */ KPropertiesDialog( const KURL& _url, mode_t _mode, QWidget* parent = 0L, const char* name = 0L, bool modal = false, bool autoShow = true); #endif
_url | the URL whose properties should be displayed
parent | is the parent of the dialog widget.
name | is the internal name.
modal | tells the dialog whether it should be modal. IMPORTANT: This constructor, together with modal=true, leads to a grave display bug (due to KIO::stat() 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 KFileItem and pass it to the other constructor.
autoShow | tells the dialog whethr it should show itself automatically.

KPropertiesDialog ( const KURL& _tempUrl, const KURL& _currentDir, const QString& _defaultName, QWidget* parent = 0L, const char* name = 0L, bool modal = false, bool autoShow = true) | ### KPropertiesDialog

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.

Parameters:

_templUrl | template used for reading only
_currentDir | directory where the file will be written to
_defaultName | something to put in the name field, like mimetype.desktop
parent | is the parent of the dialog widget.
name | is the internal name.
modal | tells the dialog whether it should be modal.
autoShow | tells the dialog whethr it should show itself automatically.

KPropertiesDialog (const QString& title, QWidget* parent = 0L, const char* name = 0L, bool modal = false) | ### KPropertiesDialog

Creates an empty properties dialog (for applications that want use a standard dialog, but for things not doable via the plugin-mechanism).

Parameters:

title | is the string display as the "filename" in the caption of the dialog.
parent | is the parent of the dialog widget.
name | is the internal name.
modal | tells the dialog whether it should be modal.

~KPropertiesDialog () | ### ~KPropertiesDialog

[virtual]

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.

void insertPlugin (KPropsDlgPlugin *plugin) | ### insertPlugin

Adds a "3rd party" properties plugin to the dialog. Useful for extending the properties mechanism.

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

Parameters:

plugin | 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.

See also: KPropsDlgPlugin

const KURL& kurl () | ### kurl

[const]

Returns: a parsed URL. Valid only if dialog shown for one file/url.

KFileItem * item () | ### item

Returns: 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.

KFileItemList items () | ### items

[const]

Returns: the items for which the dialog is shown

KDialogBase* dialog () | ### dialog

Returns: a pointer to the dialog

const KDialogBase* dialog () | ### dialog

[const]

const KURL& currentDir () | ### currentDir

[const]

If we are building this dialog from a template,

Returns: the current directory QString::null means no template used

const QString& defaultName () | ### defaultName

[const]

If we are building this dialog from a template,

Returns: the default name (see 3rd constructor) QString::null means no template used

void updateUrl ( const KURL& _newUrl ) | ### updateUrl

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.

Parameters:

_name | new URL

void rename ( const QString& _name ) | ### rename

#see FilePropsPlugin::applyChanges Can only be called if the dialog applies to a single file/URL.

Parameters:

_name | new filename, encoded.

void abortApplying () | ### abortApplying

To abort applying changes.

void showFileSharingPage () | ### showFileSharingPage

void slotOk () | ### slotOk

[virtual slot]

Called when the user presses 'Ok'.

Reimplemented from KDialogBase.

void slotCancel () | ### slotCancel

[virtual slot]

Reimplemented from KDialogBase.

void propertiesClosed () | ### propertiesClosed

[signal]

Emitted when we have finished with the properties (be it Apply or Cancel)

void applied () | ### applied

[signal]

void canceled () | ### canceled

[signal]

void virtual_hook ( int id, void* data ) | ### virtual_hook

[protected virtual]

Reimplemented from KDialogBase.

Generated by: root on macppc.ports.openbsd.org on Sat Sep 6 10:37:17 2003, using kdoc 2.0a54.