class KEditToolbarWidget

A widget used to customize or configure toolbars. More...

Definition#include <kedittoolbar.h>
InheritsKXMLGUIClient [virtual public], QWidget (qt)
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Signals

Protected Methods

Protected Slots


Detailed Description

This is a widget used to customize or configure toolbars

This is the widget that does all of the work for the KEditToolbar dialog. In most cases, you will want to use the dialog instead of this widget directly.

Typically, you would use this widget only if you wanted to embed the toolbar editing directly into your existing configure or preferences dialog.

This widget only works if your application uses the XML UI framework for creating menus and toolbars. It depends on the XML files to describe the toolbar layouts and it requires the actions to determine which buttons are active.

 KEditToolbarWidget (QActionCollection *collection, const QString& file = QString::null, bool global = true, QWidget *parent = 0L)

Constructor. This is the only entry point to this class. You @bf must pass along your collection of actions (some of which appear in your toolbars). The other three parameters are optional.

The second parameter, xmlfile, is the name (absolute or relative) of your application's UI resource file. If it is left blank, then the resource file: share/apps/appname/appnameui.rc is used. This is the same resource file that is used by the default createGUI function in KTMainWindow so you're usually pretty safe in leaving it blank.

The third parameter, global, controls whether or not the global resource file is used. If this is true, then you may edit all of the actions in your toolbars -- global ones and local one. If it is false, then you may edit only your application's entries. The only time you should set this to false is if your application does not use the global resource file at all (very rare)

The last parameter, parent, is the standard parent stuff.

Parameters:
collectionThe collection of actions to work on
xmlfileThe application's local resource file
globalIf true, then the global resource file will also be parsed
parentThis widget's parent

 KEditToolbarWidget (QActionCollection *collection, const QString& shellxml, const QString& partxml, QWidget *parent = 0L)

Constructor for KParts based apps. You must pass along all of the parameters.

The first parameter, collection, is your collection of all of the actions that appear in your application. This is 'actionCollection() + m_part->actionCollection()' in many apps

The second parameter, shellxml, is the name of your shell (or MainWindow) XML resource file. It may be relative or absolute. Relative is best.

The third parameter, partxml, is the name of your currently active part's XML resource file. It may be relative or absolute. Relative is best.

The last parameter, parent, is the standard parent

Parameters:
collectionThe collection of actions to work on
xmlfileThe shell XML resource file
partxmlThe active part's XML resource file
parentThis widget's parent

KEditToolbarWidget ()

[virtual]

Destructor. Note that any changes done in this widget will @bf NOT be saved in the destructor. You @bf must call save to do that.

QActionCollectionactionCollection ()

[const virtual]

This is overriden so that the KXMLGUIClient internal functions have the proper action collections to deal with. You shouldn't have to do anything with this as it was your collection in the first place.

Returns: Your application's collection of actions

Reimplemented from KXMLGUIClient

bool  save ()

Save any changes the user made. The file will be in the user's local directory (usually $HOME/.kde/share/apps/<appname>). The filename will be the one specified in the constructor.. or the made up one if the filename was NULL.

Returns: The status of whether or not the save succeeded.

void  enableOk (bool)

[signal]

Emitted whenever any modifications are made by the user.