KEditToolbarWidget Class Reference
This is a widget used to customize or configure toolbars A widget used to customize or configure toolbars. More...
#include <kedittoolbar.h>
Inheritance diagram for KEditToolbarWidget:

Signals | |
void | enableOk (bool) |
Emitted whenever any modifications are made by the user. | |
Public Member Functions | |
KEditToolbarWidget (KActionCollection *collection, const QString &file=QString::null, bool global=true, QWidget *parent=0L) | |
Constructor. | |
KEditToolbarWidget (KXMLGUIFactory *factory, QWidget *parent=0L) | |
Constructor for KParts based apps. | |
virtual | ~KEditToolbarWidget () |
Destructor. | |
virtual KActionCollection * | actionCollection () const |
Retrieves the entire action collection for the GUI client. | |
bool | save () |
Save any changes the user made. | |
Protected Slots | |
void | slotToolbarSelected (const QString &text) |
void | slotInactiveSelected (QListViewItem *item) |
void | slotActiveSelected (QListViewItem *item) |
void | slotInsertButton () |
void | slotRemoveButton () |
void | slotUpButton () |
void | slotDownButton () |
Protected Member Functions | |
void | setupLayout () |
void | loadToolbarCombo () |
void | loadActionList (QDomElement &elem) |
void | updateLocal (QDomElement &elem) |
virtual void | virtual_hook (int id, void *data) |
Detailed Description
This is a widget used to customize or configure toolbars 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.
- Author:
- Kurt Granroth <granroth@kde.org>
- Id
- kedittoolbar.h,v 1.25.4.2 2003/07/15 10:42:17 mueller Exp
Definition at line 216 of file kedittoolbar.h.
Constructor & Destructor Documentation
|
Constructor.
This is the only entry point to this class. You 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 KMainWindow 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.
Definition at line 252 of file kedittoolbar.cpp. References KActionCollection::actions(), QWidget::adjustSize(), KXMLGUIClient::domDocument(), KNotifyClient::instance(), locate(), KXMLGUIFactory::removeDOMComments(), QWidget::setMinimumSize(), KXMLGUIClient::setXML(), KXMLGUIClient::setXMLFile(), and QWidget::sizeHint(). |
|
Constructor for KParts based apps. The first parameter, factory, is a pointer to the XML GUI factory object for your application. It contains a list of all of the GUI clients (along with the action collections and xml files) and the toolbar editor uses that. The second parameter, parent, is the standard parent Use this like so:
Definition at line 301 of file kedittoolbar.cpp. References KXMLGUIClient::actionCollection(), actionCollection(), KActionCollection::actions(), QPtrListIterator::atFirst(), KXMLGUIFactory::clients(), QPtrListIterator::current(), KXMLGUIClient::instance(), KNotifyClient::instance(), QString::isNull(), KXMLGUIClient::localXMLFile(), KXMLGUIFactory::removeDOMComments(), KXMLGUIClient::setFactory(), QWidget::setMinimumSize(), KActionCollection::setWidget(), QWidget::sizeHint(), and KXMLGUIClient::xmlFile(). |
|
Destructor.
Note that any changes done in this widget will Definition at line 345 of file kedittoolbar.cpp. |
Member Function Documentation
|
Retrieves the entire action collection for the GUI client.
Reimplemented from KXMLGUIClient. Definition at line 678 of file kedittoolbar.cpp. Referenced by KEditToolbarWidget(). |
|
Save any changes the user made. The file will be in the user's local directory (usually $HOME/.kde/share/apps/). The filename will be the one specified in the constructor.. or the made up one if the filename was NULL.
Definition at line 350 of file kedittoolbar.cpp. References KXMLGUIFactory::addClient(), KXMLGUIClient::factory(), QPtrList::first(), QString::isEmpty(), QPtrList::last(), locate(), QPtrList::next(), QPtrList::prev(), KXMLGUIFactory::removeClient(), KXMLGUIClient::setXMLFile(), KXMLGUIClient::setXMLGUIBuildDocument(), and KXMLGUIClient::xmlFile(). Referenced by KEditToolbar::slotApply(), and KEditToolbar::slotOk(). |
|
Emitted whenever any modifications are made by the user.
|
The documentation for this class was generated from the following files: