kio Library API Documentation

KPropsDlgPlugin Class Reference

A Plugin in the Properties dialog This is an abstract class. More...

#include <kpropertiesdialog.h>

Inheritance diagram for KPropsDlgPlugin:

Inheritance graph
[legend]
Collaboration diagram for KPropsDlgPlugin:

Collaboration graph
[legend]
List of all members.

Public Slots

void setDirty ()

Signals

void changed ()

Public Member Functions

 KPropsDlgPlugin (KPropertiesDialog *_props)
virtual ~KPropsDlgPlugin ()
virtual void applyChanges ()
void setDirty (bool b)
bool isDirty () const

Static Public Member Functions

static bool isDesktopFile (KFileItem *_item)

Protected Member Functions

virtual void virtual_hook (int id, void *data)

Protected Attributes

KPropertiesDialogproperties
int fontHeight

Detailed Description

A Plugin in the Properties dialog This is an abstract class.

You must inherit from this class to build a new kind of tabbed page for the KPropertiesDialog. A plugin in itself is just a library containing code, not a dialog's page. It's up to the plugin to insert pages into the parent dialog.

To make a plugin available, define a service that implements the KPropsDlg/Plugin servicetype, as well as the mimetypes for which the plugin should be created. For instance, ServiceTypes=KPropsDlg/Plugin,text/html,application/x-mymimetype.

You can also include X-KDE-Protocol=file if you want that plugin to be loaded only for local files, for instance.

Definition at line 437 of file kpropertiesdialog.h.


Constructor & Destructor Documentation

KPropsDlgPlugin::KPropsDlgPlugin KPropertiesDialog _props  ) 
 

Constructor To insert tabs into the properties dialog, use the add methods provided by KDialogBase (the properties dialog is a KDialogBase).

Definition at line 577 of file kpropertiesdialog.cpp.

References fontHeight, and properties.


Member Function Documentation

void KPropsDlgPlugin::applyChanges  )  [virtual]
 

Applies all changes to the file.

This function is called when the user presses 'Ok'. The last plugin inserted is called first.

Reimplemented in KFileSharePropsPlugin, KFileMetaPropsPlugin, KFilePropsPlugin, KFilePermissionsPropsPlugin, KURLPropsPlugin, KBindingPropsPlugin, KDevicePropsPlugin, KDesktopPropsPlugin, KExecPropsPlugin, and KApplicationPropsPlugin.

Definition at line 628 of file kpropertiesdialog.cpp.

References kdWarning().

Referenced by KPropertiesDialog::slotOk().

bool KPropsDlgPlugin::isDesktopFile KFileItem _item  )  [static]
 

Convenience method for most supports methods.

Returns:
true if the file is a local, regular, readable, desktop file

Definition at line 591 of file kpropertiesdialog.cpp.

References QFile::encodeName(), KFileItem::isLocalFile(), KFileItem::mimetype(), KFileItem::mode(), KURL::path(), and KFileItem::url().

Referenced by KFilePropsPlugin::KFilePropsPlugin(), KExecPropsPlugin::supports(), KDesktopPropsPlugin::supports(), KDevicePropsPlugin::supports(), KBindingPropsPlugin::supports(), and KURLPropsPlugin::supports().

void KPropsDlgPlugin::changed  )  [signal]
 

Emit this signal when the user changed anything in the plugin's tabs.

The hosting PropertiesDialog will call applyChanges only if the PropsPlugin has emitted this signal before.

Referenced by KApplicationPropsPlugin::KApplicationPropsPlugin(), KBindingPropsPlugin::KBindingPropsPlugin(), KDesktopPropsPlugin::KDesktopPropsPlugin(), KDevicePropsPlugin::KDevicePropsPlugin(), KExecPropsPlugin::KExecPropsPlugin(), KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin(), KURLPropsPlugin::KURLPropsPlugin(), and KDesktopPropsPlugin::slotAdvanced().


Member Data Documentation

KPropertiesDialog* KPropsDlgPlugin::properties [protected]
 

Pointer to the dialog.

Definition at line 480 of file kpropertiesdialog.h.

Referenced by KApplicationPropsPlugin::applyChanges(), KExecPropsPlugin::applyChanges(), KDesktopPropsPlugin::applyChanges(), KDevicePropsPlugin::applyChanges(), KBindingPropsPlugin::applyChanges(), KURLPropsPlugin::applyChanges(), KFilePermissionsPropsPlugin::applyChanges(), KFilePropsPlugin::applyChanges(), KFileSharePropsPlugin::applyChanges(), KApplicationPropsPlugin::KApplicationPropsPlugin(), KBindingPropsPlugin::KBindingPropsPlugin(), KDesktopPropsPlugin::KDesktopPropsPlugin(), KDevicePropsPlugin::KDevicePropsPlugin(), KExecPropsPlugin::KExecPropsPlugin(), KFileMetaPropsPlugin::KFileMetaPropsPlugin(), KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin(), KFilePropsPlugin::KFilePropsPlugin(), KFileSharePropsPlugin::KFileSharePropsPlugin(), KPropsDlgPlugin(), KURLPropsPlugin::KURLPropsPlugin(), KFilePropsPlugin::postApplyChanges(), KFilePropsPlugin::setFileNameReadOnly(), KDesktopPropsPlugin::slotAddFiletype(), KDesktopPropsPlugin::slotAdvanced(), KFilePropsPlugin::slotCopyFinished(), KFilePropsPlugin::slotEditFileType(), KFilePropsPlugin::slotFileRenamed(), and KFilePropsPlugin::slotSizeDetermine().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kio Library Version 3.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Sep 16 06:58:54 2005 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003