kdeui
KEditToolbarWidget Class Reference
A widget used to customize or configure toolbars. More...
#include <kedittoolbar.h>
Signals | |
void | enableOk (bool) |
Public Member Functions | |
virtual KActionCollection * | actionCollection () const |
KEditToolbarWidget (const QString &defaultToolbar, KXMLGUIFactory *factory, QWidget *parent=0L) | |
KEditToolbarWidget (KXMLGUIFactory *factory, QWidget *parent=0L) | |
KEditToolbarWidget (const QString &defaultToolbar, KActionCollection *collection, const QString &file=QString::null, bool global=true, QWidget *parent=0L) | |
KEditToolbarWidget (KActionCollection *collection, const QString &xmlfile=QString::null, bool global=true, QWidget *parent=0L) | |
void | rebuildKXMLGUIClients () |
bool | save () |
virtual | ~KEditToolbarWidget () |
Protected Slots | |
void | slotActiveSelected (QListViewItem *item) |
void | slotChangeIcon () |
void | slotDownButton () |
void | slotDropped (KListView *list, QDropEvent *e, QListViewItem *after) |
void | slotInactiveSelected (QListViewItem *item) |
void | slotInsertButton () |
void | slotRemoveButton () |
void | slotToolbarSelected (const QString &text) |
void | slotUpButton () |
Protected Member Functions | |
void | initKPart (KXMLGUIFactory *factory) |
void | initNonKPart (KActionCollection *collection, const QString &file, bool global) |
void | insertActive (ToolbarItem *item, QListViewItem *before, bool prepend=false) |
void | loadActionList (QDomElement &elem) |
void | loadToolbarCombo (const QString &defaultToolbar=QString::null) |
void | moveActive (ToolbarItem *item, QListViewItem *before) |
void | removeActive (ToolbarItem *item) |
void | setupLayout () |
void | updateLocal (QDomElement &elem) |
virtual void | virtual_hook (int id, void *data) |
Detailed Description
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.
- Version:
- Id
- kedittoolbar.h 465272 2005-09-29 09:47:40Z mueller
Definition at line 270 of file kedittoolbar.h.
Constructor & Destructor Documentation
KEditToolbarWidget::KEditToolbarWidget | ( | KActionCollection * | collection, | |
const QString & | xmlfile = QString::null , |
|||
bool | global = true , |
|||
QWidget * | parent = 0L | |||
) |
Constructor.
This is the only entry point to this class. You 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 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.
- Parameters:
-
collection The collection of actions to work on xmlfile The application's local resource file global If true, then the global resource file will also be parsed parent This widget's parent
Definition at line 540 of file kedittoolbar.cpp.
KEditToolbarWidget::KEditToolbarWidget | ( | const QString & | defaultToolbar, | |
KActionCollection * | collection, | |||
const QString & | file = QString::null , |
|||
bool | global = true , |
|||
QWidget * | parent = 0L | |||
) |
Definition at line 553 of file kedittoolbar.cpp.
KEditToolbarWidget::KEditToolbarWidget | ( | KXMLGUIFactory * | factory, | |
QWidget * | parent = 0L | |||
) |
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:
KEditToolbar edit(factory()); if ( edit.exec() ) ...
- Parameters:
-
factory Your application's factory object parent This widget's parent
Definition at line 567 of file kedittoolbar.cpp.
KEditToolbarWidget::KEditToolbarWidget | ( | const QString & | defaultToolbar, | |
KXMLGUIFactory * | factory, | |||
QWidget * | parent = 0L | |||
) |
Definition at line 579 of file kedittoolbar.cpp.
KEditToolbarWidget::~KEditToolbarWidget | ( | ) | [virtual] |
Destructor.
Note that any changes done in this widget will NOT
be saved in the destructor. You must
call save() to do that.
Definition at line 592 of file kedittoolbar.cpp.
Member Function Documentation
KActionCollection * KEditToolbarWidget::actionCollection | ( | ) | const [virtual] |
For internal use only.
Reimplemented for internal purposes.
Reimplemented from KXMLGUIClient.
Definition at line 1056 of file kedittoolbar.cpp.
void KEditToolbarWidget::enableOk | ( | bool | ) | [signal] |
Emitted whenever any modifications are made by the user.
void KEditToolbarWidget::initKPart | ( | KXMLGUIFactory * | factory | ) | [protected] |
Definition at line 639 of file kedittoolbar.cpp.
void KEditToolbarWidget::initNonKPart | ( | KActionCollection * | collection, | |
const QString & | file, | |||
bool | global | |||
) | [protected] |
Definition at line 597 of file kedittoolbar.cpp.
void KEditToolbarWidget::insertActive | ( | ToolbarItem * | item, | |
QListViewItem * | before, | |||
bool | prepend = false | |||
) | [protected] |
Definition at line 1189 of file kedittoolbar.cpp.
void KEditToolbarWidget::loadActionList | ( | QDomElement & | elem | ) | [protected] |
Definition at line 943 of file kedittoolbar.cpp.
void KEditToolbarWidget::loadToolbarCombo | ( | const QString & | defaultToolbar = QString::null |
) | [protected] |
Definition at line 904 of file kedittoolbar.cpp.
void KEditToolbarWidget::moveActive | ( | ToolbarItem * | item, | |
QListViewItem * | before | |||
) | [protected] |
Definition at line 1276 of file kedittoolbar.cpp.
void KEditToolbarWidget::rebuildKXMLGUIClients | ( | ) |
Remove and readd all KMXLGUIClients to update the GUI.
- Since:
- 3.5
Definition at line 709 of file kedittoolbar.cpp.
void KEditToolbarWidget::removeActive | ( | ToolbarItem * | item | ) | [protected] |
Definition at line 1236 of file kedittoolbar.cpp.
bool KEditToolbarWidget::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.
Definition at line 680 of file kedittoolbar.cpp.
void KEditToolbarWidget::setupLayout | ( | ) | [protected] |
Definition at line 758 of file kedittoolbar.cpp.
void KEditToolbarWidget::slotActiveSelected | ( | QListViewItem * | item | ) | [protected, slot] |
Definition at line 1106 of file kedittoolbar.cpp.
void KEditToolbarWidget::slotChangeIcon | ( | ) | [protected, slot] |
Definition at line 1374 of file kedittoolbar.cpp.
void KEditToolbarWidget::slotDownButton | ( | ) | [protected, slot] |
Definition at line 1316 of file kedittoolbar.cpp.
void KEditToolbarWidget::slotDropped | ( | KListView * | list, | |
QDropEvent * | e, | |||
QListViewItem * | after | |||
) | [protected, slot] |
Definition at line 1138 of file kedittoolbar.cpp.
void KEditToolbarWidget::slotInactiveSelected | ( | QListViewItem * | item | ) | [protected, slot] |
Definition at line 1090 of file kedittoolbar.cpp.
void KEditToolbarWidget::slotInsertButton | ( | ) | [protected, slot] |
Definition at line 1166 of file kedittoolbar.cpp.
void KEditToolbarWidget::slotRemoveButton | ( | ) | [protected, slot] |
Definition at line 1179 of file kedittoolbar.cpp.
void KEditToolbarWidget::slotToolbarSelected | ( | const QString & | text | ) | [protected, slot] |
Definition at line 1061 of file kedittoolbar.cpp.
void KEditToolbarWidget::slotUpButton | ( | ) | [protected, slot] |
Definition at line 1261 of file kedittoolbar.cpp.
void KEditToolbarWidget::updateLocal | ( | QDomElement & | elem | ) | [protected] |
Definition at line 1331 of file kedittoolbar.cpp.
void KEditToolbarWidget::virtual_hook | ( | int | id, | |
void * | data | |||
) | [protected, virtual] |
The documentation for this class was generated from the following files: