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

Public Types | |
enum | BarStatus |
The state of the status bar. More... | |
enum | BarPosition |
Possible bar positions. More... | |
Signals | |
void | clicked (int id) |
Emitted when button id is clicked. | |
void | doubleClicked (int id) |
Emitted when button id is double-clicked. | |
void | pressed (int) |
Emitted when button id is pressed. | |
void | released (int) |
Emits when button id is released. | |
void | toggled (int) |
Emitted when a toggle button changes state. | |
void | highlighted (int id, bool isHighlighted) |
This signal is emitted when item id gets highlighted/unhighlighted (i.e when mouse enters/exits). | |
void | highlighted (int id) |
This signal is emitted when item id gets highlighted/unhighlighted (i.e when mouse enters/exits). | |
void | moved (BarPosition) |
Emitted when toolbar changes position, or when an item is removed from toolbar. | |
void | toolbarDestroyed () |
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). | |
Public Methods | |
KToolBar (QWidget *parent, const char *name=0, bool honor_style=FALSE, bool readConfig=TRUE) | |
Constructor. | |
KToolBar (QMainWindow *parentWindow, QMainWindow::ToolBarDock dock, bool newLine=false, const char *name=0, bool honor_style=FALSE, bool readConfig=TRUE) | |
Constructor for non-XML-GUI applications. | |
KToolBar (QMainWindow *parentWindow, QWidget *dock, bool newLine=false, const char *name=0, bool honor_style=FALSE, bool readConfig=TRUE) | |
Constructor for non-XML-GUI applications. | |
int | insertButton (const QString &icon, int id, bool enabled=true, const QString &text=QString::null, int index=-1, KInstance *_instance=KGlobal::instance()) |
Insert a button (a KToolBarButton) with a pixmap. | |
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()) |
This is the same as above, but with specified signals and slots to which this button will be connected. | |
int | insertButton (const QPixmap &pixmap, int id, bool enabled=true, const QString &text=QString::null, int index=-1) |
Inserts a button (a KToolBarButton) with the specified pixmap. | |
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) |
This is the same as above, but with specified signals and slots to which this button will be connected. | |
int | insertButton (const QString &icon, int id, QPopupMenu *popup, bool enabled, const QString &_text, int index=-1) |
Inserts a button with popupmenu. | |
int | insertButton (const QPixmap &pixmap, int id, QPopupMenu *popup, bool enabled, const QString &_text, int index=-1) |
Inserts a button with popupmenu. | |
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) |
Inserts a KLineEdit. | |
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) |
Inserts a KComboBox with list. | |
int | insertCombo (const QString &text, int id, bool writable, const char *signal, QObject *recevier, const char *slot, bool enabled=true, const QString &tooltiptext=QString::null, int size=70, int index=-1, QComboBox::Policy policy=QComboBox::AtBottom) |
Insert a KComboBox with text. | |
int | insertSeparator (int index=-1, int id=-1) |
Inserts a separator into the toolbar with the given id. | |
int | insertLineSeparator (int index=-1, int id=-1) |
Inserts a line separator into the toolbar with the given id. | |
int | insertWidget (int id, int width, QWidget *_widget, int index=-1) |
Inserts a user-defined widget. | |
int | insertAnimatedWidget (int id, QObject *receiver, const char *slot, const QString &icons, int index=-1) |
Inserts an animated widget. | |
KAnimWidget * | animatedWidget (int id) |
This will return a pointer to the given animated widget, if it exists. | |
void | addConnection (int id, const char *signal, const QObject *receiver, const char *slot) |
Adds connections to items. | |
void | setItemEnabled (int id, bool enabled) |
Enables/disables item. | |
void | setButtonIcon (int id, const QString &_icon) |
Sets the icon for a button. | |
void | setButtonPixmap (int id, const QPixmap &_pixmap) |
Sets button pixmap. | |
void | setButtonIconSet (int id, const QIconSet &iconset) |
Sets a button icon from a QIconSet. | |
void | setDelayedPopup (int id, QPopupMenu *_popup, bool toggle=false) |
Sets a delayed popup for a button. | |
void | setAutoRepeat (int id, bool flag=true) |
Turns a button into an autorepeat button. | |
void | setToggle (int id, bool flag=true) |
Turns button into a toggle button if flag is true. | |
void | toggleButton (int id) |
Toggles a togglebutton. | |
void | setButton (int id, bool flag) |
Sets a toggle button state. | |
bool | isButtonOn (int id) const |
void | setLinedText (int id, const QString &text) |
Sets the text of a line editor. | |
QString | getLinedText (int id) const |
Returns a line editor text. | |
void | insertComboItem (int id, const QString &text, int index) |
Inserts text in combobox id at position index . | |
void | insertComboList (int id, const QStringList &list, int index) |
Inserts list in combobox id at position index . | |
void | removeComboItem (int id, int index) |
Removes item index from combobox id . | |
void | setCurrentComboItem (int id, int index) |
Sets item index to be current item in combobox id . | |
void | changeComboItem (int id, const QString &text, int index=-1) |
Changes item index in combobox id to text. | |
void | clearCombo (int id) |
Clears the combobox id . | |
QString | getComboItem (int id, int index=-1) const |
Returns text of item index from combobox id . | |
KComboBox * | getCombo (int id) |
Returns a pointer to the combobox. | |
KLineEdit * | getLined (int id) |
Returns a pointer to KToolBarLined. | |
KToolBarButton * | getButton (int id) |
Returns a pointer to KToolBarButton. | |
void | alignItemRight (int id, bool right=true) |
Align item to the right. | |
QWidget * | getWidget (int id) |
Returns a pointer to an inserted widget. | |
void | setItemAutoSized (int id, bool yes=true) |
Set item autosized. | |
void | clear () |
Remove all items. | |
void | removeItem (int id) |
Remove item id . | |
void | hideItem (int id) |
Hide item. | |
void | showItem (int id) |
Show item. | |
void | setFullSize (bool flag=true) |
Set toolbar to full parent size (default). | |
bool | fullSize () const |
void | enableMoving (bool flag=true) |
void | setBarPos (BarPosition bpos) |
Set position of toolbar. | |
BarPosition | barPos () const |
Returns position of toolbar. | |
bool | enable (BarStatus stat) |
void | setMaxHeight (int h) |
int | maxHeight () |
void | setMaxWidth (int dw) |
int | maxWidth () |
void | setTitle (const QString &_title) |
Set title for toolbar when it floats. | |
void | enableFloating (bool arrrrrrgh) |
void | setIconText (IconText it) |
Set the kind of painting for buttons. | |
void | setIconText (IconText it, bool update) |
Similar to setIconText(IconText it) but allows you to disable or enable updating. | |
IconText | iconText () const |
void | setIconSize (int size) |
Set the icon size to load. | |
void | setIconSize (int size, bool update) |
Same as setIconText(int size) but allows you to disable the toolbar update. | |
int | iconSize () const |
void | setEnableContextMenu (bool enable=true) |
This allows you to enable or disable the context menu. | |
bool | contextMenuEnabled () const |
Returns whether or not the context menu is disabled. | |
void | setItemNoStyle (int id, bool no_style=true) |
This will inform a toolbar button to ignore certain style changes. | |
int | count () const |
void | saveState () |
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). | |
void | saveSettings (KConfig *config, const QString &configGroup) |
Save the toolbar settings to group configGroup in config . | |
void | applySettings (KConfig *config, const QString &configGroup) |
Read the toolbar settings from group configGroup in config and apply them. | |
void | setXMLGUIClient (KXMLGUIClient *client) |
Tell the toolbar what XML-GUI resource file it should use to save it's state. | |
void | setText (const QString &txt) |
Assign a (translated) text to this toolbar. | |
QString | text () const |
void | setStretchableWidget (QWidget *w) |
Static Public Methods | |
bool | highlightSetting () |
bool | transparentSetting () |
IconText | iconTextSetting () |
Detailed Description
A KDE-style toolbar. Floatable toolbar with auto resize.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 behaviour.
KToolBar uses a global config group to load toolbar settings on construction. It will reread this config group on a KApplication::appearanceChanged() signal.
- Version:
- Id:
- ktoolbar.h,v 1.153.2.1 2002/12/09 23:28:37 faure Exp
- Author:
- Reginald Stadlbauer <reggie@kde.org>, Stephan Kulow <coolo@kde.org>, Sven Radej <radej@kde.org>.
Definition at line 101 of file ktoolbar.h.
Member Enumeration Documentation
|
The state of the status bar.
Definition at line 117 of file ktoolbar.h. |
|
Possible bar positions.
Definition at line 121 of file ktoolbar.h. Referenced by barPos(). |
Constructor & Destructor Documentation
|
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 _honor_mode is set to true. All other toolbars will be IconOnly and use Medium icons.
Definition at line 170 of file ktoolbar.cpp. |
|
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 _honor_mode is set to true. All other toolbars will be IconOnly and use Medium icons.
Definition at line 179 of file ktoolbar.cpp. |
|
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 _honor_mode is set to true. All other toolbars will be IconOnly and use Medium icons.
Definition at line 187 of file ktoolbar.cpp. |
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 229 of file ktoolbar.cpp. Referenced by KToolBarPopupAction::plug(), KActionMenu::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 241 of file ktoolbar.cpp. |
|
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 254 of file ktoolbar.cpp. |
|
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 265 of file ktoolbar.cpp. |
|
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 279 of file ktoolbar.cpp. References 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 291 of file ktoolbar.cpp. References 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 303 of file ktoolbar.cpp. References QToolTip::add(), QString::isEmpty(), and QLineEdit::setText(). |
|
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 322 of file ktoolbar.cpp. References QToolTip::add(), QComboBox::insertStringList(), QString::isEmpty(), QString::isNull(), and QComboBox::setInsertionPolicy(). Referenced by KSelectAction::plug(). |
|
Insert a KComboBox with text. The rest is the same as above.
Definition at line 348 of file ktoolbar.cpp. References QToolTip::add(), QComboBox::insertItem(), QString::isEmpty(), QString::isNull(), and QComboBox::setInsertionPolicy(). |
|
Inserts a separator into the toolbar with the given id. Returns the separator's index Definition at line 370 of file ktoolbar.cpp. |
|
Inserts a line separator into the toolbar with the given id. Returns the separator's index Definition at line 377 of file ktoolbar.cpp. |
|
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 385 of file ktoolbar.cpp. Referenced by 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 392 of file ktoolbar.cpp. References clicked(). |
|
This will return a pointer to the given animated widget, if it exists.
Definition at line 404 of file ktoolbar.cpp. References QMap< int, QWidget * >::end(), QMap< int, QWidget * >::find(), and QObject::inherits(). |
|
Adds connections to items.
It is important that you know the Definition at line 430 of file ktoolbar.cpp. References QMap< int, QWidget * >::end(), and QMap< int, QWidget * >::find(). |
|
Enables/disables item.
Definition at line 440 of file ktoolbar.cpp. References QMap< int, QWidget * >::end(), and QMap< int, QWidget * >::find(). |
|
Sets the icon for a button. Can be used while button is visible. Definition at line 461 of file ktoolbar.cpp. References QMap< int, QWidget * >::end(), QMap< int, QWidget * >::find(), and KToolBarButton::setIcon(). |
|
Sets button pixmap. Can be used while button is visible. Definition at line 450 of file ktoolbar.cpp. References QMap< int, QWidget * >::end(), QMap< int, QWidget * >::find(), and KToolBarButton::setPixmap(). |
|
Sets a button icon from a QIconSet. Can be used while button is visible. Definition at line 471 of file ktoolbar.cpp. References QMap< int, QWidget * >::end(), QMap< int, QWidget * >::find(), and KToolBarButton::setIconSet(). |
|
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 normal a button with connection (or use signals from toolbar): bar->insertButton(icon, id, SIGNAL(clicked ()), this, SLOT (slotClick()), true, "click or wait for popup");And then add a delayed popup: bar->setDelayedPopup (id, historyPopup); 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 482 of file ktoolbar.cpp. References QMap< int, QWidget * >::end(), QMap< int, QWidget * >::find(), and KToolBarButton::setDelayedPopup(). Referenced by KToolBarPopupAction::plug(), and KActionMenu::plug(). |
|
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 493 of file ktoolbar.cpp. References QMap< int, QWidget * >::end(), and QMap< int, QWidget * >::find(). |
|
Turns button into a toggle button if
Definition at line 504 of file ktoolbar.cpp. References QMap< int, QWidget * >::end(), QMap< int, QWidget * >::find(), and KToolBarButton::setToggle(). Referenced by KToggleAction::plug(). |
|
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 515 of file ktoolbar.cpp. References QMap< int, QWidget * >::end(), QMap< int, QWidget * >::find(), and KToolBarButton::toggle(). |
|
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 526 of file ktoolbar.cpp. References QMap< int, QWidget * >::end(), QMap< int, QWidget * >::find(), and KToolBarButton::on(). Referenced by KToggleAction::plug(). |
|
Definition at line 537 of file ktoolbar.cpp. References QMap< int, QWidget * >::end(), and QMap< int, QWidget * >::find(). |
|
Sets the text of a line editor. Cursor is set at end of text. Definition at line 547 of file ktoolbar.cpp. References QMap< int, QWidget * >::end(), QMap< int, QWidget * >::find(), and QLineEdit::setText(). |
|
Returns a line editor text.
Definition at line 558 of file ktoolbar.cpp. References QMap< int, QWidget * >::end(), QMap< int, QWidget * >::find(), and QLineEdit::text(). |
|
Inserts
Definition at line 568 of file ktoolbar.cpp. References QMap< int, QWidget * >::end(), QMap< int, QWidget * >::find(), and QComboBox::insertItem(). |
|
Inserts
Definition at line 578 of file ktoolbar.cpp. References QMap< int, QWidget * >::end(), QMap< int, QWidget * >::find(), and QComboBox::insertStringList(). |
|
Removes item
Definition at line 589 of file ktoolbar.cpp. References QMap< int, QWidget * >::end(), QMap< int, QWidget * >::find(), and QComboBox::removeItem(). |
|
Sets item
Definition at line 600 of file ktoolbar.cpp. References QMap< int, QWidget * >::end(), QMap< int, QWidget * >::find(), and QComboBox::setCurrentItem(). |
|
Changes item
Definition at line 611 of file ktoolbar.cpp. References QComboBox::changeItem(), QMap< int, QWidget * >::end(), and QMap< int, QWidget * >::find(). |
|
Clears the combobox Does not delete it or hide it. Definition at line 622 of file ktoolbar.cpp. References QComboBox::clear(), QMap< int, QWidget * >::end(), and QMap< int, QWidget * >::find(). |
|
Returns text of item
Definition at line 633 of file ktoolbar.cpp. References QMap< int, QWidget * >::end(), QMap< int, QWidget * >::find(), and QComboBox::text(). |
|
Returns a pointer to the combobox. Example: KComboBox *combo = toolbar->getCombo(combo_id);That way you can get access to other public methods that KComboBox provides. Definition at line 643 of file ktoolbar.cpp. References QMap< int, QWidget * >::end(), and QMap< int, QWidget * >::find(). Referenced by KSelectAction::plug(). |
|
Returns a pointer to KToolBarLined. Example: KLineEdit * lined = toolbar->getKTollBarLined(lined_id);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 652 of file ktoolbar.cpp. References QMap< int, QWidget * >::end(), and QMap< int, QWidget * >::find(). |
|
Returns a pointer to KToolBarButton. Example: KToolBarButton * button = toolbar->getButton(button_id);That way you can get access to other public methods that KToolBarButton provides. Using this method is not recommended. Definition at line 661 of file ktoolbar.cpp. References QMap< int, QWidget * >::end(), and QMap< int, QWidget * >::find(). Referenced by KToolBarRadioGroup::addButton(), KToolBarPopupAction::plug(), KActionMenu::plug(), and KAction::plug(). |
|
Align item to the right. This works only if toolbar is set to full width.
Definition at line 670 of file ktoolbar.cpp. References QMap< int, QWidget * >::end(), and QMap< int, QWidget * >::find(). |
|
Returns a pointer to an inserted widget. Wrong ids are not tested. You can do with this whatever you want, except change its height (hardcoded). If you change its width you will probably have to call QToolBar::updateRects(true)
Definition at line 682 of file ktoolbar.cpp. References QMap< int, QWidget * >::end(), and QMap< int, QWidget * >::find(). Referenced by hideItem(), setItemAutoSized(), and showItem(). |
|
Set item autosized.
This works only if the toolbar is set to full width. Only
Definition at line 689 of file ktoolbar.cpp. References getWidget(), and QToolBar::setStretchableWidget(). Referenced by KWidgetAction::plug(). |
|
Remove all items. The toolbar is redrawn after it. Reimplemented from QToolBar. Definition at line 697 of file ktoolbar.cpp. References QMap< int, QWidget * >::clear(), QMap< QWidget *, int >::clear(), and QToolBar::clear(). |
|
Remove item Item is deleted. Toolbar is redrawn after it. Definition at line 705 of file ktoolbar.cpp. References QMap< int, QWidget * >::end(), QMap< int, QWidget * >::find(), QMap< QWidget *, int >::remove(), QMap< int, QWidget * >::remove(), and QPtrList< QWidget >::removeRef(). Referenced by KAction::unplug(). |
|
Hide item.
Definition at line 721 of file ktoolbar.cpp. References getWidget(), and QWidget::hide(). |
|
Show item.
Definition at line 729 of file ktoolbar.cpp. References getWidget(), and QWidget::show(). |
|
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 737 of file ktoolbar.cpp. |
|
Definition at line 744 of file ktoolbar.cpp. |
|
Definition at line 750 of file ktoolbar.cpp. |
|
Set position of toolbar.
Definition at line 756 of file ktoolbar.cpp. References QToolBar::mainWindow(). |
|
Returns position of toolbar.
Definition at line 764 of file ktoolbar.cpp. References BarPosition, and QToolBar::mainWindow(). Referenced by KMainWindow::sizeForCentralWidgetSize(). |
|
This method is provided for compatibility only, please use show() and/or hide() instead.
Definition at line 779 of file ktoolbar.cpp. Referenced by setEnableContextMenu(). |
|
Definition at line 792 of file ktoolbar.cpp. |
|
Definition at line 797 of file ktoolbar.cpp. |
|
Definition at line 803 of file ktoolbar.cpp. |
|
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 QToolBar::setLabel(). |
|
Definition at line 821 of file ktoolbar.cpp. |
|
Set the kind of painting for buttons. Choose from:
Definition at line 826 of file ktoolbar.cpp. |
|
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(). |
|
Definition at line 858 of file ktoolbar.cpp. |
|
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 864 of file ktoolbar.cpp. |
|
Same as setIconText(int size) but allows you to disable the toolbar update.
Definition at line 869 of file ktoolbar.cpp. References QToolBar::mainWindow(). |
|
Definition at line 895 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 908 of file ktoolbar.cpp. References enable(). |
|
Returns whether or not the context menu is disabled.
Definition at line 914 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 920 of file ktoolbar.cpp. References QMap< int, QWidget * >::end(), QMap< int, QWidget * >::find(), and KToolBarButton::setNoStyle(). |
|
Definition at line 945 of file ktoolbar.cpp. References QMap< int, QWidget * >::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 951 of file ktoolbar.cpp. References QDomElement::attribute(), KGlobal::config(), QDomDocument::documentElement(), KXMLGUIFactory::removeDOMComments(), saveSettings(), QDomDocument::setContent(), and QDomElement::tagName(). Referenced by KXMLGUIBuilder::removeContainer(). |
|
Save the toolbar settings to group
Definition at line 1034 of file ktoolbar.cpp. References iconSize(), and QString::isEmpty(). Referenced by KMainWindow::saveMainWindowSettings(), and saveState(). |
|
Read the toolbar settings from group
Definition at line 1514 of file ktoolbar.cpp. References QString::isEmpty(), QToolBar::mainWindow(), QMainWindow::moveDockWindow(), and KGlobal::staticQString(). Referenced by KMainWindow::applyMainWindowSettings(). |
|
Tell the toolbar what XML-GUI resource file it should use to save it's state. The state of the toolbar (position, size, etc) is saved in KConfig files if the application does not use XML-GUI.. but if the app does, then it's saved the XML file. This function allows this to happen.
Definition at line 1062 of file ktoolbar.cpp. Referenced by KXMLGUIBuilder::createContainer(). |
|
Assign a (translated) text to this toolbar. This is used for the tooltip on the handle, and when listing the toolbars. Definition at line 1067 of file ktoolbar.cpp. References QToolBar::setLabel(). |
|
Definition at line 1073 of file ktoolbar.cpp. References QToolBar::label(). |
|
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 id gets highlighted/unhighlighted (i.e when mouse enters/exits).
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 id gets highlighted/unhighlighted (i.e when mouse enters/exits). 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 the toolbar is getting deleted, and before ~KToolbar finishes (so it's still time to remove widgets from the toolbar). Used by KWidgetAction.
|
|
Definition at line 1377 of file ktoolbar.cpp. References KGlobal::config(), and QString::fromLatin1(). |
|
Definition at line 1385 of file ktoolbar.cpp. References KGlobal::config(), and QString::fromLatin1(). |
|
Definition at line 1393 of file ktoolbar.cpp. References KGlobal::config(), and QString::fromLatin1(). |
The documentation for this class was generated from the following files: