KPropertiesDialogPlugin Class

Header: #include <KPropertiesDialogPlugin>
CMake: find_package(Qt6 REQUIRED COMPONENTS KIOWidgets)
target_link_libraries(mytarget PRIVATE Qt6::KIOWidgets)
Inherited By:

KDEPrivate::KDesktopPropsPlugin, KDEPrivate::KFilePermissionsPropsPlugin, KDEPrivate::KFilePropsPlugin, and KDEPrivate::KUrlPropsPlugin

Public Functions

KPropertiesDialogPlugin(QObject *parent)
virtual void applyChanges()

Signals

void changed()

Protected Functions

int fontHeight() const

Protected Variables

KPropertiesDialog *const properties

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, ensure it has embedded json metadata using * K_PLUGIN_CLASS_WITH_JSON and install the plugin in the KDE_INSTALL_PLUGINDIR/kf6/propertiesdialog * folder from the KDEInstallDirs CMake module. * * The metadata can contain the MIME types for which the plugin should be created. * For instance: * @verbatim { "KPlugin": { "MimeTypes": ["text/html", "application/x-mymimetype"] }, "X-KDE-Protocols": ["file"] } @endverbatim * If the MIME types are empty or not specified, the plugin will be created for all MIME types. * * You can also include "X-KDE-Protocols" if you want that plugin for instance * to be loaded only for local files.

Member Function Documentation

KPropertiesDialogPlugin::KPropertiesDialogPlugin(QObject *parent)

Constructor whos parent will be cast to KPropertiesDialog To insert tabs into the properties dialog, use the add methods provided by KPageDialog (the properties dialog is a KPageDialog).

[virtual] void KPropertiesDialogPlugin::applyChanges()

Applies all changes to the file. This function is called when the user presses 'Ok'. The last plugin inserted is called first.

[signal] void KPropertiesDialogPlugin::changed()

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 or if you have called setDirty() before.

[protected] int KPropertiesDialogPlugin::fontHeight() const

Returns the font height.

Member Variable Documentation

KPropertiesDialog *const KPropertiesDialogPlugin::properties

Pointer to the dialog