KToolBar Class Reference
Floatable toolbar with auto resize. More...
#include <ktoolbar.h>
Inheritance diagram for KToolBar:


Public Types | |
enum | IconText { IconOnly = 0, IconTextRight, TextOnly, IconTextBottom } |
enum | BarStatus { Toggle, Show, Hide } |
enum | BarPosition { Unmanaged, Floating, Top, Bottom, Right, Left, Flat } |
Public Slots | |
virtual void | setIconText (const QString &txt) |
Signals | |
void | clicked (int id) |
void | doubleClicked (int id) |
void | pressed (int) |
void | released (int) |
void | toggled (int) |
void | highlighted (int id, bool isHighlighted) |
void | highlighted (int id) |
void | moved (BarPosition) |
void | modechange () |
void | toolbarDestroyed () |
Public Member Functions | |
KToolBar (QWidget *parent, const char *name=0, bool honorStyle=false, bool readConfig=true) | |
KToolBar (QMainWindow *parentWindow, QMainWindow::ToolBarDock dock, bool newLine=false, const char *name=0, bool honorStyle=false, bool readConfig=true) | |
KToolBar (QMainWindow *parentWindow, QWidget *dock, bool newLine=false, const char *name=0, bool honorStyle=false, bool readConfig=true) | |
virtual | ~KToolBar () |
int | insertButton (const QString &icon, int id, bool enabled=true, const QString &text=QString::null, int index=-1, KInstance *_instance=KGlobal::instance()) |
int | insertButton (const QString &icon, int id, const char *signal, const QObject *receiver, const char *slot, bool enabled=true, const QString &text=QString::null, int index=-1, KInstance *_instance=KGlobal::instance()) |
int | insertButton (const QPixmap &pixmap, int id, bool enabled=true, const QString &text=QString::null, int index=-1) |
int | insertButton (const QPixmap &pixmap, int id, const char *signal, const QObject *receiver, const char *slot, bool enabled=true, const QString &text=QString::null, int index=-1) |
int | insertButton (const QString &icon, int id, QPopupMenu *popup, bool enabled, const QString &_text, int index=-1) |
int | insertButton (const QPixmap &pixmap, int id, QPopupMenu *popup, bool enabled, const QString &_text, int index=-1) |
int | insertLined (const QString &text, int id, const char *signal, const QObject *receiver, const char *slot, bool enabled=true, const QString &toolTipText=QString::null, int size=70, int index=-1) |
int | insertCombo (const QStringList &list, int id, bool writable, const char *signal, const QObject *receiver, const char *slot, bool enabled=true, const QString &tooltiptext=QString::null, int size=70, int index=-1, QComboBox::Policy policy=QComboBox::AtBottom) |
int | insertCombo (const QString &text, int id, bool writable, const char *signal, QObject *receiver, const char *slot, bool enabled=true, const QString &tooltiptext=QString::null, int size=70, int index=-1, QComboBox::Policy policy=QComboBox::AtBottom) |
int | insertSeparator (int index=-1, int id=-1) |
int | insertLineSeparator (int index=-1, int id=-1) |
int | insertWidget (int id, int width, QWidget *_widget, int index=-1) |
int | insertAnimatedWidget (int id, QObject *receiver, const char *slot, const QString &icons, int index=-1) |
KAnimWidget * | animatedWidget (int id) |
void | addConnection (int id, const char *signal, const QObject *receiver, const char *slot) |
void | setItemEnabled (int id, bool enabled) |
void | setButtonIcon (int id, const QString &_icon) |
void | setButtonPixmap (int id, const QPixmap &_pixmap) |
void | setButtonIconSet (int id, const QIconSet &iconset) |
void | setDelayedPopup (int id, QPopupMenu *_popup, bool toggle=false) |
void | setAutoRepeat (int id, bool flag=true) |
void | setToggle (int id, bool flag=true) |
void | toggleButton (int id) |
void | setButton (int id, bool flag) |
bool | isButtonOn (int id) const |
void | setLinedText (int id, const QString &text) |
QString | getLinedText (int id) const |
void | insertComboItem (int id, const QString &text, int index) |
void | insertComboList (int id, const QStringList &list, int index) |
void | removeComboItem (int id, int index) |
void | setCurrentComboItem (int id, int index) |
void | changeComboItem (int id, const QString &text, int index=-1) |
void | clearCombo (int id) |
QString | getComboItem (int id, int index=-1) const |
KComboBox * | getCombo (int id) |
KLineEdit * | getLined (int id) |
KToolBarButton * | getButton (int id) |
void | alignItemRight (int id, bool right=true) |
QWidget * | getWidget (int id) |
void | setItemAutoSized (int id, bool yes=true) |
void | clear () |
void | removeItem (int id) |
void | removeItemDelayed (int id) |
void | hideItem (int id) |
void | showItem (int id) |
int | itemIndex (int id) |
int | idAt (int index) |
void | setFullSize (bool flag=true) |
bool | fullSize () const |
void | enableMoving (bool flag=true) KDE_DEPRECATED |
void | setBarPos (BarPosition bpos) |
BarPosition | barPos () const |
bool | enable (BarStatus stat) KDE_DEPRECATED |
void | setMaxHeight (int h) KDE_DEPRECATED |
int | maxHeight () KDE_DEPRECATED |
void | setMaxWidth (int dw) KDE_DEPRECATED |
int | maxWidth () KDE_DEPRECATED |
void | setTitle (const QString &_title) |
void | enableFloating (bool flag) KDE_DEPRECATED |
void | setIconText (IconText it) |
void | setIconText (IconText it, bool update) |
IconText | iconText () const |
void | setIconSize (int size) |
void | setIconSize (int size, bool update) |
int | iconSize () const |
int | iconSizeDefault () const |
void | setEnableContextMenu (bool enable=true) |
bool | contextMenuEnabled () const |
void | setItemNoStyle (int id, bool no_style=true) |
void | setFlat (bool flag) |
int | count () const |
void | saveState () |
void | saveSettings (KConfig *config, const QString &configGroup) |
void | applySettings (KConfig *config, const QString &configGroup, bool force) |
void | applySettings (KConfig *config, const QString &configGroup) |
void | setXMLGUIClient (KXMLGUIClient *client) |
void | setText (const QString &txt) |
QString | text () const |
void | setStretchableWidget (QWidget *w) |
QSizePolicy | sizePolicy () const |
bool | highlight () const |
QSize | sizeHint () const |
QSize | minimumSizeHint () const |
QSize | minimumSize () const |
void | hide () |
void | show () |
void | updateRects (bool=false) |
void | loadState (const QDomElement &e) |
void | saveState (QDomElement &e) |
void | positionYourself (bool force=false) |
Static Public Member Functions | |
bool | highlightSetting () |
bool | transparentSetting () |
IconText | iconTextSetting () |
Protected Member Functions | |
void | mousePressEvent (QMouseEvent *) |
void | childEvent (QChildEvent *e) |
void | showEvent (QShowEvent *e) |
void | resizeEvent (QResizeEvent *e) |
bool | event (QEvent *e) |
void | applyAppearanceSettings (KConfig *config, const QString &_configGroup, bool forceGlobal=false) |
QString | settingsGroup () const |
virtual void | virtual_hook (int id, void *data) |
Properties | |
IconText | iconText |
BarPosition | barPos |
bool | fullSize |
int | iconSize |
QString | text |
Detailed Description
Floatable toolbar with auto resize.A KDE-style toolbar.
KToolBar can be dragged around in and between different docks.
A KToolBar can contain all sorts of widgets.
KToolBar can be used as a standalone widget, but KMainWindow provides easy factories and management of one or more toolbars. Once you have a KToolBar object, you can insert items into it with the insert... methods, or remove them with the removeItem() method. This can be done at any time; the toolbar will be automatically updated. There are also many methods to set per-child properties like alignment and toggle behavior.
KToolBar uses a global config group to load toolbar settings on construction. It will reread this config group on a KApplication::appearanceChanged() signal.
- Author:
- Reginald Stadlbauer <reggie@kde.org>, Stephan Kulow <coolo@kde.org>, Sven Radej <radej@kde.org>.
Definition at line 103 of file ktoolbar.h.
Member Enumeration Documentation
|
The state of the status bar.
Definition at line 119 of file ktoolbar.h. |
|
Possible bar positions.
Definition at line 123 of file ktoolbar.h. |
Constructor & Destructor Documentation
|
Normal constructor. This constructor is used by the XML-GUI. If you use it, you need to call QMainWindow::addToolBar to specify the position of the toolbar. So it's simpler to use the other constructor.
The toolbar will read in various global config settings for things like icon size and text position, etc. However, some of the settings will be honored only if
Definition at line 195 of file ktoolbar.cpp. References KToolBar(). Referenced by KToolBar(). |
|
Constructor for non-XML-GUI applications.
The toolbar will read in various global config settings for things like icon size and text position, etc. However, some of the settings will be honored only if
Definition at line 204 of file ktoolbar.cpp. References KToolBar(). |
|
Constructor for non-XML-GUI applications.
The toolbar will read in various global config settings for things like icon size and text position, etc. However, some of the settings will be honored only if
Definition at line 212 of file ktoolbar.cpp. References KToolBar(). |
|
Destructor.
Definition at line 220 of file ktoolbar.cpp. References toolbarDestroyed(). |
Member Function Documentation
|
Insert a button (a KToolBarButton) with a pixmap. The pixmap is loaded by the button itself based on the global icon settings.
You should connect to one or more signals in KToolBar: clicked() , pressed() , released() , or highlighted() and if the button is a toggle button ( setToggle() ) toggled() . Those signals have
Definition at line 257 of file ktoolbar.cpp. References insertButton(). Referenced by insertButton(), KPasteTextAction::plug(), KToolBarPopupAction::plug(), KActionMenu::plug(), KRecentFilesAction::plug(), and KAction::plug(). |
|
This is the same as above, but with specified signals and slots to which this button will be connected. You can add more signals with addConnection().
Definition at line 269 of file ktoolbar.cpp. References insertButton(). |
|
Inserts a button (a KToolBarButton) with the specified pixmap. This pixmap will be used as the "active" one and the disabled and default ones will be autogenerated. It is recommended that you use the insertButton function that allows you to specify the icon name rather then the pixmap itself. Specifying the icon name is much more flexible.
You should connect to one or more signals in KToolBar: clicked() , pressed() , released() , or highlighted() and if the button is a toggle button ( setToggle() ) toggled() . Those signals have
Definition at line 282 of file ktoolbar.cpp. References insertButton(). |
|
This is the same as above, but with specified signals and slots to which this button will be connected. You can add more signals with addConnection().
Definition at line 293 of file ktoolbar.cpp. References insertButton(). |
|
Inserts a button with popupmenu.
Button will have small triangle. You have to connect to popup's signals. The signals KButton::pressed(), KButton::released(), KButton::clicked() or KButton::doubleClicked() are Definition at line 307 of file ktoolbar.cpp. References insertButton(), and KToolBarButton::setPopup(). |
|
Inserts a button with popupmenu.
Button will have small triangle. You have to connect to popup's signals. The signals KButton::pressed(), KButton::released(), KButton::clicked() or KButton::doubleClicked() are Definition at line 319 of file ktoolbar.cpp. References insertButton(), and KToolBarButton::setPopup(). |
|
Inserts a KLineEdit. You have to specify signals and slots to which KLineEdit will be connected. KLineEdit has all slots QLineEdit has, plus signals KLineEdit::completion and KLineEdit::textRotation KLineEdit can be set to autoresize itself to full free width in toolbar, that is to last right aligned item. For that, toolbar must be set to full width (which it is by default).
Definition at line 331 of file ktoolbar.cpp. References insertLined(), QString::isEmpty(), and KLineEdit::setText(). Referenced by insertLined(). |
|
Inserts a KComboBox with list. Can be writable, but cannot contain pixmaps. By default inserting policy is AtBottom, i.e. typed items are placed at the bottom of the list. Can be autosized. If the size argument is specified as -1, the width of the combobox is automatically computed.
Definition at line 350 of file ktoolbar.cpp. References insertCombo(), QComboBox::insertStringList(), QString::isNull(), and QComboBox::setInsertionPolicy(). Referenced by insertCombo(), and KSelectAction::plug(). |
|
Insert a KComboBox with text. The rest is the same as above.
Definition at line 374 of file ktoolbar.cpp. References insertCombo(), QComboBox::insertItem(), QString::isNull(), and QComboBox::setInsertionPolicy(). |
|
Inserts a separator into the toolbar with the given
Definition at line 394 of file ktoolbar.cpp. References insertSeparator(). Referenced by insertSeparator(). |
|
Inserts a line separator into the toolbar with the given
Definition at line 401 of file ktoolbar.cpp. References insertLineSeparator(). Referenced by insertLineSeparator(). |
|
Inserts a user-defined widget.
The widget Widget must have a QWidget for base class. Widget can be autosized to full width. If you forget about it, you can get a pointer to this widget with getWidget().
Definition at line 409 of file ktoolbar.cpp. References insertWidget(). Referenced by insertWidget(), and KWidgetAction::plug(). |
|
Inserts an animated widget. A KAnimWidget will be created internally using the icon name you provide. This will emit a signal (clicked()) whenever the animation widget is clicked.
Definition at line 416 of file ktoolbar.cpp. References clicked(), and insertAnimatedWidget(). Referenced by insertAnimatedWidget(). |
|
This will return a pointer to the animated widget with the given
Definition at line 428 of file ktoolbar.cpp. References animatedWidget(), QMap::end(), and QMap::find(). Referenced by animatedWidget(). |
|
Adds connections to items.
It is important that you know the Definition at line 456 of file ktoolbar.cpp. References addConnection(), and getWidget(). Referenced by addConnection(). |
|
Enables/disables item.
Definition at line 464 of file ktoolbar.cpp. References getWidget(), QWidget::setEnabled(), and setItemEnabled(). Referenced by setItemEnabled(). |
|
Sets the icon for a button. Can be used while button is visible. Definition at line 480 of file ktoolbar.cpp. References getButton(), setButtonIcon(), and KToolBarButton::setIcon(). Referenced by setButtonIcon(). |
|
Sets button pixmap. Can be used while button is visible. Definition at line 472 of file ktoolbar.cpp. References getButton(), setButtonPixmap(), and KToolBarButton::setPixmap(). Referenced by setButtonPixmap(). |
|
Sets a button icon from a QIconSet. Can be used while button is visible. Definition at line 487 of file ktoolbar.cpp. References getButton(), setButtonIconSet(), and KToolBarButton::setIconSet(). Referenced by setButtonIconSet(). |
|
Sets a delayed popup for a button. Delayed popup is what you see in Netscape Navigator's Previous and Next buttons: If you click them you go back or forth. If you press them long enough, you get a history-menu. This is exactly what we do here. You will insert a normal button with connection (or use signals from toolbar): And then add a delayed popup:
Don't add delayed popups to buttons which have normal popups. You may add popups which are derived from QPopupMenu. You may add popups that are already in the menu bar or are submenus of other popups. Definition at line 495 of file ktoolbar.cpp. References getButton(), KToolBarButton::setDelayedPopup(), and setDelayedPopup(). Referenced by KPasteTextAction::plug(), KToolBarPopupAction::plug(), KActionMenu::plug(), KRecentFilesAction::plug(), and setDelayedPopup(). |
|
Turns a button into an autorepeat button. Toggle buttons, buttons with menus, or buttons with delayed menus cannot be made into autorepeat buttons. Moreover, you can and will receive only the signal clicked(), but not pressed() or released(). When the user presses this button, you will receive the signal clicked(), and if the button is still pressed after some time, you will receive more clicked() signals separated by regular intervals. Since this uses QButton::setAutoRepeat() , I can't quantify 'some'. Definition at line 503 of file ktoolbar.cpp. References getButton(), and setAutoRepeat(). Referenced by setAutoRepeat(). |
|
Turns button into a toggle button if
Definition at line 511 of file ktoolbar.cpp. References getButton(), KToolBarButton::setToggle(), and setToggle(). Referenced by KToggleAction::plug(), and setToggle(). |
|
Toggles a togglebutton.
If the button is a toggle button (see setToggle()) the button state will be toggled. This will also cause the toolbar to emit the signal KButton::toggled() with parameter Definition at line 519 of file ktoolbar.cpp. References getButton(), KToolBarButton::toggle(), and toggleButton(). Referenced by toggleButton(). |
|
Sets a toggle button state. If the button is a toggle button (see setToggle()) this will set its state flag. This will also emit the signal KButton::toggled().
Definition at line 527 of file ktoolbar.cpp. References getButton(), KToolBarButton::on(), and setButton(). Referenced by KToggleAction::plug(), and setButton(). |
|
Returns
Definition at line 535 of file ktoolbar.cpp. References isButtonOn(). Referenced by isButtonOn(). |
|
Sets the text of a line editor. Cursor is set at end of text. Definition at line 542 of file ktoolbar.cpp. References getLined(), setLinedText(), and KLineEdit::setText(). Referenced by setLinedText(). |
|
Returns the line editor text.
Definition at line 550 of file ktoolbar.cpp. References getLinedText(), and QLineEdit::text(). Referenced by getLinedText(). |
|
Inserts
Definition at line 557 of file ktoolbar.cpp. References getCombo(), insertComboItem(), and QComboBox::insertItem(). Referenced by insertComboItem(). |
|
Inserts
Definition at line 564 of file ktoolbar.cpp. References getCombo(), insertComboList(), and QComboBox::insertStringList(). Referenced by insertComboList(). |
|
Removes item
Definition at line 572 of file ktoolbar.cpp. References getCombo(), removeComboItem(), and QComboBox::removeItem(). Referenced by removeComboItem(). |
|
Sets item
Definition at line 580 of file ktoolbar.cpp. References getCombo(), setCurrentComboItem(), and KComboBox::setCurrentItem(). Referenced by setCurrentComboItem(). |
|
Changes item
Definition at line 588 of file ktoolbar.cpp. References changeComboItem(), QComboBox::changeItem(), and getCombo(). Referenced by changeComboItem(). |
|
Clears the combobox Does not delete it or hide it. Definition at line 596 of file ktoolbar.cpp. References QComboBox::clear(), clearCombo(), and getCombo(). Referenced by clearCombo(). |
|
Returns text of item
index = -1 refers to current item.
Definition at line 604 of file ktoolbar.cpp. References getComboItem(), and QComboBox::text(). Referenced by getComboItem(). |
|
Returns a pointer to the combobox with
That way you can get access to other public methods that KComboBox provides. Definition at line 611 of file ktoolbar.cpp. References QMap::end(), QMap::find(), and getCombo(). Referenced by changeComboItem(), clearCombo(), getCombo(), insertComboItem(), insertComboList(), KSelectAction::plug(), removeComboItem(), and setCurrentComboItem(). |
|
Returns a pointer to KToolBarLined with
That way you can get access to other public methods that KLineEdit provides. KLineEdit is the same thing as QLineEdit plus completion signals. Definition at line 620 of file ktoolbar.cpp. References QMap::end(), QMap::find(), and getLined(). Referenced by getLined(), and setLinedText(). |
|
Returns a pointer to KToolBarButton. Example: That way you can get access to other public methods that KToolBarButton provides. Using this method is not recommended. Definition at line 629 of file ktoolbar.cpp. References QMap::end(), QMap::find(), and getButton(). Referenced by KToolBarRadioGroup::addButton(), getButton(), KPasteTextAction::plug(), KToolBarPopupAction::plug(), KActionMenu::plug(), KRecentFilesAction::plug(), KAction::plug(), setAutoRepeat(), setButton(), setButtonIcon(), setButtonIconSet(), setButtonPixmap(), setDelayedPopup(), setItemNoStyle(), setToggle(), and toggleButton(). |
|
Align item to the right. This works only if toolbar is set to full width.
Definition at line 638 of file ktoolbar.cpp. References alignItemRight(), QMap::end(), and QMap::find(). Referenced by alignItemRight(). |
|
Returns a pointer to the widget corresponding to
Definition at line 650 of file ktoolbar.cpp. References QMap::end(), QMap::find(), and getWidget(). Referenced by addConnection(), getWidget(), hideItem(), itemIndex(), setItemAutoSized(), setItemEnabled(), and showItem(). |
|
Set item autosized.
This works only if the toolbar is set to full width. Only
Definition at line 657 of file ktoolbar.cpp. References getWidget(), and setItemAutoSized(). Referenced by KWidgetAction::plug(), and setItemAutoSized(). |
|
Remove all items. The toolbar is redrawn after it. Reimplemented from QToolBar. Definition at line 665 of file ktoolbar.cpp. References QMap::clear(), QMap< QWidget *, int >::clear(), and QToolBar::clear(). |
|
Remove item Item is deleted. Toolbar is redrawn after it. Definition at line 673 of file ktoolbar.cpp. References QMap::end(), endl(), QMap::find(), kdDebug(), QMap< QWidget *, int >::remove(), QMap::remove(), removeItem(), and QPtrList< QWidget >::removeRef(). Referenced by removeItem(). |
|
Remove item Item is deleted when toolbar is redrawn. Definition at line 689 of file ktoolbar.cpp. References QMap::end(), endl(), QMap::find(), kdDebug(), QMap< QWidget *, int >::remove(), QMap::remove(), removeItemDelayed(), QPtrList< QWidget >::removeRef(), and QTimer::start(). Referenced by removeItemDelayed(), and KAction::unplug(). |
|
Hide item
Definition at line 708 of file ktoolbar.cpp. References getWidget(), QWidget::hide(), and hideItem(). Referenced by hideItem(). |
|
Show item
Definition at line 716 of file ktoolbar.cpp. References getWidget(), QWidget::show(), and showItem(). Referenced by showItem(). |
|
Returns the index of the item
Definition at line 724 of file ktoolbar.cpp. References QPtrList< QWidget >::findRef(), getWidget(), and itemIndex(). Referenced by itemIndex(). |
|
Returns the id of the item at the given index.
Definition at line 730 of file ktoolbar.cpp. References QPtrList< QWidget >::at(), and idAt(). Referenced by idAt(). |
|
Set toolbar to full parent size (default). In full size mode the bar extends over the parent's full width or height. If the mode is disabled the toolbar tries to take as much space as it needs without wrapping, but it does not exceed the parent box. You can force a certain width or height with setMaxWidth() or setMaxHeight(). If you want to use right-aligned items or auto-sized items you must use full size mode. Definition at line 736 of file ktoolbar.cpp. References setFullSize(). Referenced by loadState(), and setFullSize(). |
|
Returns the full-size mode enabled flag.
|
|
Enable or disable moving of toolbar.
Definition at line 749 of file ktoolbar.cpp. References enableMoving(). Referenced by enableMoving(). |
|
Set position of toolbar.
Definition at line 755 of file ktoolbar.cpp. References QToolBar::mainWindow(), and setBarPos(). Referenced by setBarPos(). |
|
Returns the toolbar position.
|
|
Show, hide, or toggle toolbar. This method is provided for compatibility only, please use show() and/or hide() instead.
Definition at line 779 of file ktoolbar.cpp. References enable(). Referenced by enable(). |
|
Use setMaximumHeight() instead.
Definition at line 792 of file ktoolbar.cpp. References setMaxHeight(). Referenced by setMaxHeight(). |
|
Returns the value set with setMaxHeight().
Definition at line 797 of file ktoolbar.cpp. |
|
Use setMaximumWidth() instead. Set maximal width of horizontal (top or bottom) toolbar.
Definition at line 803 of file ktoolbar.cpp. References setMaxWidth(). Referenced by setMaxWidth(). |
|
Returns the value set with setMaxWidth(). Use maximumWidth() instead.
Definition at line 809 of file ktoolbar.cpp. |
|
Set title for toolbar when it floats. Titles are however not (yet) visible. You can't change toolbar's title while it's floating. Definition at line 815 of file ktoolbar.cpp. References setTitle(). Referenced by setTitle(). |
|
Use setMovingEnabled(bool) instead.
Definition at line 821 of file ktoolbar.cpp. References enableFloating(). Referenced by enableFloating(). |
|
Set the kind of painting for buttons. Choose from:
Definition at line 826 of file ktoolbar.cpp. References setIconText(). Referenced by loadState(), and setIconText(). |
|
Similar to setIconText(IconText it) but allows you to disable or enable updating.
If Definition at line 832 of file ktoolbar.cpp. References QToolBar::mainWindow(), and setIconText(). |
|
Returns the current text style for buttons.
|
|
Set the icon size to load. Usually you should not call this, the icon size is taken care of by KIconLoader and globally configured. By default, the toolbar will load icons of size 32 for main toolbars and 22 for other toolbars
Definition at line 868 of file ktoolbar.cpp. References setIconSize(). Referenced by loadState(), and setIconSize(). |
|
Same as setIconText(int size) but allows you to disable the toolbar update.
Definition at line 873 of file ktoolbar.cpp. References QToolBar::mainWindow(), and setIconSize(). |
|
Returns the current icon size for buttons.
Referenced by saveSettings(). |
|
Returns the default size for this type of toolbar.
Definition at line 907 of file ktoolbar.cpp. References KIconLoader::currentSize(), KGlobal::iconLoader(), and QObject::name(). Referenced by saveSettings(). |
|
This allows you to enable or disable the context menu.
Definition at line 915 of file ktoolbar.cpp. References setEnableContextMenu(). Referenced by setEnableContextMenu(). |
|
Returns the context menu enabled flag.
Definition at line 921 of file ktoolbar.cpp. |
|
This will inform a toolbar button to ignore certain style changes. Specifically, it will ignore IconText (always IconOnly) and will not allow image effects to apply.
Definition at line 927 of file ktoolbar.cpp. References getButton(), setItemNoStyle(), and KToolBarButton::setNoStyle(). Referenced by setItemNoStyle(). |
|
Returns the total number of items in the toolbar.
Definition at line 950 of file ktoolbar.cpp. References QMap::count(). |
|
Instruct the toolbar to save it's current state to either the app config file or to the XML-GUI resource file (whichever has precedence).
Definition at line 956 of file ktoolbar.cpp. References QDomElement::attribute(), KGlobal::config(), QDomDocument::documentElement(), QDomNode::isNull(), QDomNode::nextSibling(), saveSettings(), QDomDocument::setContent(), KConfigBase::sync(), QDomElement::tagName(), and QDomNode::toElement(). Referenced by KXMLGUIBuilder::removeContainer(). |
|
Save the toolbar settings to group
Definition at line 1037 of file ktoolbar.cpp. References QPtrList::append(), QPtrListIterator::count(), QPtrList::first(), KConfigBase::hasDefault(), iconSize(), iconSizeDefault(), QString::isEmpty(), QToolBar::mainWindow(), QPtrList::next(), KConfigBase::revertToDefault(), saveSettings(), QMainWindow::toolBars(), and KConfigBase::writeEntry(). Referenced by KMainWindow::saveMainWindowSettings(), saveSettings(), and saveState(). |
|
Read the toolbar settings from group
Even default settings are re-applied if Definition at line 1635 of file ktoolbar.cpp. References applySettings(), KConfigBase::hasGroup(), QString::isEmpty(), QToolBar::mainWindow(), KConfigBase::readBoolEntry(), KConfigBase::readEntry(), and KConfigBase::readNumEntry(). Referenced by KMainWindow::applyMainWindowSettings(), and applySettings(). |
|
Assign a (translated) text to this toolbar. This is used for the tooltip on the handle, and when listing the toolbars. Definition at line 1128 of file ktoolbar.cpp. References setText(). Referenced by loadState(), and setText(). |
|
Returns the toolbar's text.
|
|
Load state from an XML element, called by KXMLGUIBuilder.
Definition at line 1769 of file ktoolbar.cpp. References QMainWindow::addDockWindow(), QDomElement::attribute(), QDomElement::hasAttribute(), highlightSetting(), iconTextSetting(), QString::isEmpty(), QCString::isEmpty(), loadState(), QToolBar::mainWindow(), QMainWindow::moveDockWindow(), QMainWindow::opaqueMoving(), setFullSize(), setIconSize(), setIconText(), QMainWindow::setOpaqueMoving(), setText(), QDomElement::text(), QString::toInt(), and transparentSetting(). Referenced by KXMLGUIBuilder::createContainer(), and loadState(). |
|
Emitted when button
Referenced by insertAnimatedWidget(). |
|
Emitted when button Note: you will always recive two clicked() , pressed() and released() signals. There is no way to avoid it - at least no easy way. If you need to resolve this all you can do is set up timers which wait for QApplication::doubleClickInterval() to expire. If in that time you don't get this signal, you may belive that button was only clicked and not double-clicked. And please note that butons with popup menus do not emit this signal, but those with delayed popup do. |
|
Emitted when button
|
|
Emits when button
|
|
Emitted when a toggle button changes state. Emitted also if you change state with setButton() or toggleButton() If you make a button normal again, with setToggle(false), this signal won't be emitted. |
|
This signal is emitted when item
Note that this signal is emitted from all buttons (normal, disabled and toggle) even when there is no visible change in buttons (i.e., buttons do not raise when mouse enters). The parameter |
|
This signal is emitted when item Note that this signal is emitted from all buttons (normal, disabled and toggle) even when there is no visible change in buttons (i.e., buttons do not raise when mouse enters). |
|
Emitted when toolbar changes position, or when an item is removed from toolbar. If you subclass KMainWindow and reimplement KMainWindow::resizeEvent() be sure to connect to this signal. Note: You can connect this signal to a slot that doesn't take parameter. |
|
This signal is emitted when toolbar detects changing of following parameters: highlighting, button-size, button-mode. This signal is internal, aimed to buttons. |
|
This signal is emitted when the toolbar is getting deleted, and before ~KToolbar finishes (so it's still time to remove widgets from the toolbar). Used by KWidgetAction.
Referenced by ~KToolBar(). |
|
Returns the global setting for "Highlight buttons under mouse".
Definition at line 1477 of file ktoolbar.cpp. References KGlobal::config(), and KConfigBase::readBoolEntry(). Referenced by loadState(). |
|
Returns the global setting for "Toolbars transparent when moving".
Definition at line 1485 of file ktoolbar.cpp. References KGlobal::config(), and KConfigBase::readBoolEntry(). Referenced by loadState(). |
|
Returns the global setting for "Icon Text".
Definition at line 1493 of file ktoolbar.cpp. References KGlobal::config(), and KConfigBase::readEntry(). Referenced by loadState(). |
The documentation for this class was generated from the following files: