|
Krita Source Code Documentation
|
A widget used to customize or configure toolbars. More...
#include <kedittoolbar_p.h>
Inheritance diagram for KDEPrivate::KisKEditToolBarWidget:Signals | |
| void | enableOk (bool) |
Public Member Functions | |
| KisKActionCollection * | actionCollection () const override |
| KisKEditToolBarWidget (KisKActionCollection *collection, QWidget *parent=0L) | |
| KisKEditToolBarWidget (QWidget *parent=0L) | |
| void | load (const QString &resourceFile, bool global=true, const QString &defaultToolBar=QString()) |
| void | load (KisKXMLGUIFactory *factory, const QString &defaultToolBar=QString()) |
| void | rebuildKisKXMLGUIClients () |
| void | save () |
| ~KisKEditToolBarWidget () override | |
Public Member Functions inherited from KisKXMLGUIClient | |
| QAction * | action (const char *name) const |
| virtual QAction * | action (const QDomElement &element) const |
| void | addStateActionDisabled (const QString &state, const QString &action) |
| void | addStateActionEnabled (const QString &state, const QString &action) |
| void | beginXMLPlug (QWidget *) |
| QList< KisKXMLGUIClient * > | childClients () |
| KisKXMLGUIBuilder * | clientBuilder () const |
| virtual QString | componentName () const |
| virtual QDomDocument | domDocument () const |
| void | endXMLPlug () |
| KisKXMLGUIFactory * | factory () const |
| StateChange | getActionsToChangeForState (const QString &state) |
| void | insertChildClient (KisKXMLGUIClient *child) |
| KisKXMLGUIClient () | |
| KisKXMLGUIClient (KisKXMLGUIClient *parent) | |
| virtual QString | localXMLFile () const |
| KisKXMLGUIClient * | parentClient () const |
| void | plugActionList (const QString &name, const QList< QAction * > &actionList) |
| void | prepareXMLUnplug (QWidget *) |
| void | reloadXML () |
| void | removeChildClient (KisKXMLGUIClient *child) |
| void | replaceXMLFile (const QString &xmlfile, const QString &localxmlfile, bool merge=false) |
| void | setClientBuilder (KisKXMLGUIBuilder *builder) |
| void | setFactory (KisKXMLGUIFactory *factory) |
| void | setXMLGUIBuildDocument (const QDomDocument &doc) |
| void | unplugActionList (const QString &name) |
| virtual QString | xmlFile () const |
| QDomDocument | xmlguiBuildDocument () const |
| virtual | ~KisKXMLGUIClient () |
Private Attributes | |
| KisKEditToolBarWidgetPrivate *const | d |
Friends | |
| class | KisKEditToolBarWidgetPrivate |
Additional Inherited Members | |
Public Types inherited from KisKXMLGUIClient | |
| enum | ReverseStateChange { StateNoReverse , StateReverse } |
Static Public Member Functions inherited from KisKXMLGUIClient | |
| static QString | findMostRecentXMLFile (const QStringList &files, QString &doc) |
Protected Member Functions inherited from KisKXMLGUIClient | |
| void | loadStandardsXmlFile () |
| virtual void | setComponentName (const QString &componentName, const QString &componentDisplayName) |
| void | setDOMDocument (const QDomDocument &document, bool merge=false) |
| void | setLocalXMLFile (const QString &file) |
| void | setXML (const QString &document, bool merge=false) |
| void | setXMLFile (const QString &file, bool merge=false, bool setXMLDoc=true) |
| virtual void | stateChanged (const QString &newstate, ReverseStateChange reverse=StateNoReverse) |
| virtual void | virtual_hook (int id, void *data) |
Static Protected Member Functions inherited from KisKXMLGUIClient | |
| static QString | standardsXmlFileLocation () |
A widget used to customize or configure toolbars.
This is the widget that does all of the work for the KisKEditToolBar 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.
Definition at line 114 of file kedittoolbar_p.h.
|
explicit |
Old constructor for apps that do not use components. This constructor is somewhat deprecated, since it doesn't work with any KXMLGuiClient being added to the mainwindow. You really want to use the other constructor.
You must pass along your collection of actions (some of which appear in your toolbars). Then call old-style load.
| collection | The collection of actions to work on |
| parent | This widget's parent |
Definition at line 782 of file kedittoolbar.cpp.
References d, and KDEPrivate::KisKEditToolBarWidgetPrivate::setupLayout().
|
explicit |
Main constructor.
Use this like so:
| parent | This widget's parent |
Definition at line 790 of file kedittoolbar.cpp.
References d, and KDEPrivate::KisKEditToolBarWidgetPrivate::setupLayout().
|
override |
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 797 of file kedittoolbar.cpp.
References d.
|
overridevirtual |
Retrieves the entire action collection for the GUI client.
Reimplemented from KisKXMLGUIClient.
Definition at line 1291 of file kedittoolbar.cpp.
References d, and KDEPrivate::KisKEditToolBarWidgetPrivate::m_collection.
|
signal |
Emitted whenever any modifications are made by the user.
| void KisKEditToolBarWidget::load | ( | const QString & | resourceFile, |
| bool | global = true, | ||
| const QString & | defaultToolBar = QString() ) |
Old-style load.
Loads the toolbar configuration into the widget. Should be called before being shown.
| resourceFile | 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.xmlgui is used. This is the same resource file that is used by the default createGUI function in KisKMainWindow so you're usually pretty safe in leaving it blank. |
| 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) |
| defaultToolBar | the default toolbar that will be selected when the dialog is shown. If not set, or QString() is passed in, the global default tool bar name will be used. |
Definition at line 802 of file kedittoolbar.cpp.
References d, and KDEPrivate::KisKEditToolBarWidgetPrivate::initOldStyle().
| void KisKEditToolBarWidget::load | ( | KisKXMLGUIFactory * | factory, |
| const QString & | defaultToolBar = QString() ) |
Loads the toolbar configuration into the widget. Should be called before being shown.
| factory | 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. |
| defaultToolBar | the default toolbar that will be selected when the dialog is shown. If not set, or QString() is passed in, the global default tool bar name will be used. |
Definition at line 807 of file kedittoolbar.cpp.
References d, KisKXMLGUIClient::factory(), and KDEPrivate::KisKEditToolBarWidgetPrivate::initFromFactory().
| void KisKEditToolBarWidget::rebuildKisKXMLGUIClients | ( | ) |
Remove and readd all KMXLGUIClients to update the GUI
Definition at line 944 of file kedittoolbar.cpp.
References KisKXMLGUIFactory::addClient(), KisKXMLGUIFactory::clients(), d, KisKXMLGUIClient::loadStandardsXmlFile(), KDEPrivate::KisKEditToolBarWidgetPrivate::m_factory, KisKXMLGUIFactory::removeClient(), KisKXMLGUIClient::setXMLFile(), KisKXMLGUIClient::setXMLGUIBuildDocument(), and KisKXMLGUIClient::xmlFile().
| void KisKEditToolBarWidget::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.
Definition at line 904 of file kedittoolbar.cpp.
References d, KDEPrivate::KisKEditToolBarWidgetPrivate::m_factory, KDEPrivate::KisKEditToolBarWidgetPrivate::m_xmlFiles, KDEPrivate::XmlData::Merged, rebuildKisKXMLGUIClients(), and KisKXMLGUIFactory::saveConfigFile().
|
friend |
Definition at line 240 of file kedittoolbar_p.h.
|
private |
Definition at line 241 of file kedittoolbar_p.h.