KDEUI
#include <kedittoolbar.h>
Signals | |
void | newToolBarConfig () |
QT_MOC_COMPAT void | newToolbarConfig () |
Signals inherited from KDialog | |
void | aboutToShowDetails () |
void | applyClicked () |
void | buttonClicked (KDialog::ButtonCode button) |
void | cancelClicked () |
void | closeClicked () |
void | defaultClicked () |
void | finished () |
void | helpClicked () |
void | hidden () |
void | layoutHintChanged () |
void | noClicked () |
void | okClicked () |
void | resetClicked () |
void | tryClicked () |
void | user1Clicked () |
void | user2Clicked () |
void | user3Clicked () |
void | yesClicked () |
Static Public Member Functions | |
static void | setGlobalDefaultToolBar (const char *toolBarName) |
Static Public Member Functions inherited from KDialog | |
static bool | avoidArea (QWidget *widget, const QRect &area, int screen=-1) |
static void | centerOnScreen (QWidget *widget, int screen=-1) |
static int | groupSpacingHint () |
static QString | makeStandardCaption (const QString &userCaption, QWidget *window=0, CaptionFlags flags=HIGCompliantCaption) |
static int | marginHint () |
static void | resizeLayout (QWidget *widget, int margin, int spacing) |
static void | resizeLayout (QLayout *lay, int margin, int spacing) |
static void | setAllowEmbeddingInGraphicsView (bool allowEmbedding) |
static int | spacingHint () |
Protected Member Functions | |
virtual void | hideEvent (QHideEvent *event) |
virtual void | showEvent (QShowEvent *event) |
Protected Member Functions inherited from KDialog | |
KDialog (KDialogPrivate &dd, QWidget *parent, Qt::WindowFlags flags=0) | |
virtual void | closeEvent (QCloseEvent *e) |
virtual void | keyPressEvent (QKeyEvent *) |
Additional Inherited Members | |
Public Types inherited from KDialog | |
enum | ButtonCode { None = 0x00000000, Help = 0x00000001, Default = 0x00000002, Ok = 0x00000004, Apply = 0x00000008, Try = 0x00000010, Cancel = 0x00000020, Close = 0x00000040, No = 0x00000080, Yes = 0x00000100, Reset = 0x00000200, Details = 0x00000400, User1 = 0x00001000, User2 = 0x00002000, User3 = 0x00004000, NoDefault = 0x00008000 } |
enum | ButtonPopupMode { InstantPopup = 0, DelayedPopup = 1 } |
enum | CaptionFlag { NoCaptionFlags = 0, AppNameCaption = 1, ModifiedCaption = 2, HIGCompliantCaption = AppNameCaption } |
Public Slots inherited from KDialog | |
void | delayedDestruct () |
void | enableButton (ButtonCode id, bool state) |
void | enableButtonApply (bool state) |
void | enableButtonCancel (bool state) |
void | enableButtonOk (bool state) |
void | enableLinkedHelp (bool state) |
bool | isDetailsWidgetVisible () const |
virtual void | setCaption (const QString &caption) |
virtual void | setCaption (const QString &caption, bool modified) |
void | setDetailsWidget (QWidget *detailsWidget) |
void | setDetailsWidgetVisible (bool visible) |
void | setHelp (const QString &anchor, const QString &appname=QString()) |
void | setHelpLinkText (const QString &text) |
virtual void | setPlainCaption (const QString &caption) |
Protected Slots inherited from KDialog | |
virtual void | slotButtonClicked (int button) |
void | updateGeometry () |
Protected Attributes inherited from KDialog | |
KDialogPrivate *const | d_ptr |
Detailed Description
A dialog used to customize or configure toolbars.
This dialog 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.
Typically you do not need to use it directly as KXmlGuiWindow::setupGUI takes care of it.
If you use plugListAction you need to overload saveNewToolbarConfig() to plug actions again:
When created, KEditToolBar takes a KXMLGUIFactory object, and uses it to find all of the action collections and XML files (there is one of each for the mainwindow, but there could be more, when adding other XMLGUI clients like KParts or plugins). The editor aims to be semi-intelligent about where it assigns any modifications. In other words, it will not write out part specific changes to your application's main XML file.
KXmlGuiWindow and KParts::MainWindow take care of creating KEditToolBar correctly and connecting to its newToolBarConfig slot, but if you really really want to do it yourself, see the KXmlGuiWindow::configureToolbars() and KXmlGuiWindow::saveNewToolbarConfig() code.
Definition at line 68 of file kedittoolbar.h.
Constructor & Destructor Documentation
|
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).
- Parameters
-
collection The collection of actions to work on. parent The parent of the dialog.
Definition at line 526 of file kedittoolbar.cpp.
|
explicit |
Main constructor.
The main 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.
Use this like so:
- Parameters
-
factory Your application's factory object parent The usual parent for the dialog.
Definition at line 536 of file kedittoolbar.cpp.
KEditToolBar::~KEditToolBar | ( | ) |
destructor
Definition at line 579 of file kedittoolbar.cpp.
Member Function Documentation
|
protectedvirtual |
Emits the hidden signal.
You can connect to that signal to detect when a dialog has been closed.
Reimplemented from KDialog.
Definition at line 1691 of file kedittoolbar.cpp.
|
signal |
Signal emitted when 'apply' or 'ok' is clicked or toolbars were reset.
Connect to it, to plug action lists and to call applyMainWindowSettings (see sample code in this class's documentation)
|
signal |
void KEditToolBar::setDefaultToolBar | ( | const QString & | toolBarName | ) |
Sets 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.
- Parameters
-
toolBarName the name of the tool bar
- See also
- setGlobalDefaultToolBar
Definition at line 585 of file kedittoolbar.cpp.
|
static |
Sets the default toolbar which will be auto-selected for all KEditToolBar instances.
Can be overridden on a per-dialog basis by calling setDefaultToolBar( const QString& ) on the dialog.
- Parameters
-
toolbarName the name of the tool bar
Definition at line 689 of file kedittoolbar.cpp.
The name (absolute or relative) of your application's UI resource file is assumed to be share/apps/appname/appnameui.rc though this can be overridden by calling this method.
The global parameter 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).
- Parameters
-
xmlfile The application's local resource file. global If true
, then the global resource file will also be parsed.
Definition at line 572 of file kedittoolbar.cpp.
|
protectedvirtual |
Definition at line 1674 of file kedittoolbar.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:17 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.