org.kde.koala
public class KToolBar extends QToolBar
UNKNOWN: Floatable toolbar with auto resize.
Field Summary | |
---|---|
static int | Bottom |
static int | Flat |
static int | Floating |
static int | IconOnly |
static int | IconTextBottom |
static int | IconTextRight |
static int | Left |
static int | Right |
static int | TextOnly |
static int | Top |
static int | Unmanaged
Possible bar positions. |
Constructor Summary | |
---|---|
protected | KToolBar(Class dummy) |
KToolBar(QWidget parent, String name, boolean honorStyle, boolean readConfig)
Normal constructor.
| |
KToolBar(QWidget parent, String name, boolean honorStyle) | |
KToolBar(QWidget parent, String name) | |
KToolBar(QWidget parent) | |
KToolBar(QMainWindow parentWindow, int dock, boolean newLine, String name, boolean honorStyle, boolean readConfig)
Constructor for non-XML-GUI applications.
| |
KToolBar(QMainWindow parentWindow, int dock, boolean newLine, String name, boolean honorStyle) | |
KToolBar(QMainWindow parentWindow, int dock, boolean newLine, String name) | |
KToolBar(QMainWindow parentWindow, int dock, boolean newLine) | |
KToolBar(QMainWindow parentWindow, int dock) | |
KToolBar(QMainWindow parentWindow, QWidget dock, boolean newLine, String name, boolean honorStyle, boolean readConfig)
Constructor for non-XML-GUI applications.
| |
KToolBar(QMainWindow parentWindow, QWidget dock, boolean newLine, String name, boolean honorStyle) | |
KToolBar(QMainWindow parentWindow, QWidget dock, boolean newLine, String name) | |
KToolBar(QMainWindow parentWindow, QWidget dock, boolean newLine) | |
KToolBar(QMainWindow parentWindow, QWidget dock) |
Method Summary | |
---|---|
void | addConnection(int id, String signal, QObject receiver, String slot)
Adds connections to items.
|
void | alignItemRight(int id, boolean right)
Align item to the right.
|
void | alignItemRight(int id) |
KAnimWidget | animatedWidget(int id)
This will return a pointer to the animated widget with the
given id , if it exists. |
protected void | applyAppearanceSettings(KConfig config, String _configGroup, boolean forceGlobal) |
protected void | applyAppearanceSettings(KConfig config, String _configGroup) |
void | applySettings(KConfig config, String configGroup, boolean force)
Read the toolbar settings from group configGroup in config
and apply them. |
void | applySettings(KConfig config, String configGroup) |
int | barPos()
Returns the toolbar position. |
void | changeComboItem(int id, String text, int index)
Changes item index in combobox id to text.
|
void | changeComboItem(int id, String text) |
protected void | childEvent(QChildEvent e) |
String | className() |
void | clear()
Remove all items.
|
void | clearCombo(int id)
Clears the combobox id.
Does not delete it or hide it. |
boolean | contextMenuEnabled()
Returns the context menu enabled flag |
int | count()
Returns the total number of items in the toolbar |
void | dispose() Delete the wrapped C++ instance ahead of finalize() |
boolean | event(QEvent e) |
protected void | finalize() Deletes the wrapped C++ instance |
boolean | fullSize()
Returns the full-size mode enabled flag. |
KToolBarButton | getButton(int id)
Returns a pointer to KToolBarButton.
|
KComboBox | getCombo(int id)
Returns a pointer to the combobox with id.
Example:
KComboBox combo = toolbar.getCombo(combo_id);That way you can get access to other public methods that KComboBox provides. |
String | getComboItem(int id, int index)
Returns text of item index from combobox id.
index = -1 refers to current item. |
String | getComboItem(int id) |
KLineEdit | getLined(int id)
Returns a pointer to KToolBarLined with id.
Example:
KLineEdit lined = toolbar.getKToolBarLined(lined_id);That way you can get access to other public methods that KLineEdit provides. |
String | getLinedText(int id)
Returns the line editor text. |
QWidget | getWidget(int id)
Returns a pointer to the widget corresponding to id.
Wrong ids are not tested.
|
void | hide() |
void | hideItem(int id)
Hide item id. |
boolean | highlight() |
static boolean | highlightSetting()
Returns the global setting for "Highlight buttons under mouse" |
int | iconSize()
Returns the current icon size for buttons. |
int | iconSizeDefault()
Returns the default size for this type of toolbar. |
int | iconTextId()
Returns the current text style for buttons. |
static int | iconTextSetting()
Returns the global setting for "Icon Text" |
int | idAt(int index)
Returns the id of the item at the given index. |
int | insertAnimatedWidget(int id, QObject receiver, String slot, String icons, int index)
Inserts an animated widget. |
int | insertAnimatedWidget(int id, QObject receiver, String slot, String icons) |
int | insertButton(String icon, int id, boolean enabled, String text, int index, KInstanceInterface _instance)
Insert a button (a KToolBarButton) with a pixmap. |
int | insertButton(String icon, int id, boolean enabled, String text, int index) |
int | insertButton(String icon, int id, boolean enabled, String text) |
int | insertButton(String icon, int id, boolean enabled) |
int | insertButton(String icon, int id) |
int | insertButton(String icon, int id, String signal, QObject receiver, String slot, boolean enabled, String text, int index, KInstanceInterface _instance)
This is the same as above, but with specified signals and
slots to which this button will be connected.
|
int | insertButton(String icon, int id, String signal, QObject receiver, String slot, boolean enabled, String text, int index) |
int | insertButton(String icon, int id, String signal, QObject receiver, String slot, boolean enabled, String text) |
int | insertButton(String icon, int id, String signal, QObject receiver, String slot, boolean enabled) |
int | insertButton(String icon, int id, String signal, QObject receiver, String slot) |
int | insertButton(QPixmap pixmap, int id, boolean enabled, String text, int index)
Inserts a button (a KToolBarButton) with the specified
pixmap. |
int | insertButton(QPixmap pixmap, int id, boolean enabled, String text) |
int | insertButton(QPixmap pixmap, int id, boolean enabled) |
int | insertButton(QPixmap pixmap, int id) |
int | insertButton(QPixmap pixmap, int id, String signal, QObject receiver, String slot, boolean enabled, String text, int index)
This is the same as above, but with specified signals and
slots to which this button will be connected.
|
int | insertButton(QPixmap pixmap, int id, String signal, QObject receiver, String slot, boolean enabled, String text) |
int | insertButton(QPixmap pixmap, int id, String signal, QObject receiver, String slot, boolean enabled) |
int | insertButton(QPixmap pixmap, int id, String signal, QObject receiver, String slot) |
int | insertButton(String icon, int id, QPopupMenu popup, boolean enabled, String _text, int index)
Inserts a button with popupmenu.
|
int | insertButton(String icon, int id, QPopupMenu popup, boolean enabled, String _text) |
int | insertButton(QPixmap pixmap, int id, QPopupMenu popup, boolean enabled, String _text, int index)
Inserts a button with popupmenu.
|
int | insertButton(QPixmap pixmap, int id, QPopupMenu popup, boolean enabled, String _text) |
int | insertCombo(String[] list, int id, boolean writable, String signal, QObject receiver, String slot, boolean enabled, String tooltiptext, int size, int index, int policy)
Inserts a KComboBox with list.
|
int | insertCombo(String[] list, int id, boolean writable, String signal, QObject receiver, String slot, boolean enabled, String tooltiptext, int size, int index) |
int | insertCombo(String[] list, int id, boolean writable, String signal, QObject receiver, String slot, boolean enabled, String tooltiptext, int size) |
int | insertCombo(String[] list, int id, boolean writable, String signal, QObject receiver, String slot, boolean enabled, String tooltiptext) |
int | insertCombo(String[] list, int id, boolean writable, String signal, QObject receiver, String slot, boolean enabled) |
int | insertCombo(String[] list, int id, boolean writable, String signal, QObject receiver, String slot) |
int | insertCombo(String text, int id, boolean writable, String signal, QObject receiver, String slot, boolean enabled, String tooltiptext, int size, int index, int policy)
Insert a KComboBox with text.
|
int | insertCombo(String text, int id, boolean writable, String signal, QObject receiver, String slot, boolean enabled, String tooltiptext, int size, int index) |
int | insertCombo(String text, int id, boolean writable, String signal, QObject receiver, String slot, boolean enabled, String tooltiptext, int size) |
int | insertCombo(String text, int id, boolean writable, String signal, QObject receiver, String slot, boolean enabled, String tooltiptext) |
int | insertCombo(String text, int id, boolean writable, String signal, QObject receiver, String slot, boolean enabled) |
int | insertCombo(String text, int id, boolean writable, String signal, QObject receiver, String slot) |
void | insertComboItem(int id, String text, int index)
Inserts text in combobox id at position index. |
void | insertComboList(int id, String[] list, int index)
Inserts list in combobox id at position index. |
int | insertLined(String text, int id, String signal, QObject receiver, String slot, boolean enabled, String toolTipText, int size, int index)
Inserts a KLineEdit. |
int | insertLined(String text, int id, String signal, QObject receiver, String slot, boolean enabled, String toolTipText, int size) |
int | insertLined(String text, int id, String signal, QObject receiver, String slot, boolean enabled, String toolTipText) |
int | insertLined(String text, int id, String signal, QObject receiver, String slot, boolean enabled) |
int | insertLined(String text, int id, String signal, QObject receiver, String slot) |
int | insertLineSeparator(int index, int id)
Inserts a line separator into the toolbar with the given id. |
int | insertLineSeparator(int index) |
int | insertLineSeparator() |
int | insertSeparator(int index, int id)
Inserts a separator into the toolbar with the given id. |
int | insertSeparator(int index) |
int | insertSeparator() |
int | insertWidget(int id, int width, QWidget _widget, int index)
Inserts a user-defined widget. |
int | insertWidget(int id, int width, QWidget _widget) |
boolean | isButtonOn(int id)
Returns true if button is on and is a toggle button |
boolean | isDisposed() Has the wrapped C++ instance been deleted? |
int | itemIndex(int id)
Returns the index of the item id. |
void | loadState(QDomElement e)
Load state from an XML element, called by KXMLGUIBuilder |
QMetaObject | metaObject() |
QSize | minimumSize() |
QSize | minimumSizeHint() |
protected void | mousePressEvent(QMouseEvent arg1) |
void | positionYourself(boolean force) |
void | positionYourself() |
void | removeComboItem(int id, int index)
Removes item index from combobox id. |
void | removeItem(int id)
Remove item id.
Item is deleted. |
void | removeItemDelayed(int id)
Remove item id.
Item is deleted when toolbar is redrawn. |
protected void | resizeEvent(QResizeEvent e) |
void | saveSettings(KConfig config, String configGroup)
Save the toolbar settings to group configGroup in config. |
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 | saveState(QDomElement e) |
void | setAutoRepeat(int id, boolean flag)
Turns a button into an autorepeat button.
|
void | setAutoRepeat(int id) |
void | setBarPos(int bpos)
Set position of toolbar. |
void | setButton(int id, boolean flag)
Sets a toggle button state.
|
void | setButtonIcon(int id, String _icon)
Sets the icon for a button.
|
void | setButtonIconSet(int id, QIconSet iconset)
Sets a button icon from a QIconSet.
|
void | setButtonPixmap(int id, QPixmap _pixmap)
Sets button pixmap.
|
void | setCurrentComboItem(int id, int index)
Sets item index to be current item in combobox id. |
void | setDelayedPopup(int id, QPopupMenu _popup, boolean toggle)
Sets a delayed popup for a button.
|
void | setDelayedPopup(int id, QPopupMenu _popup) |
void | setEnableContextMenu(boolean enable)
This allows you to enable or disable the context menu. |
void | setEnableContextMenu() |
void | setFlat(boolean flag) |
void | setFullSize(boolean flag)
Set toolbar to full parent size (default).
|
void | setFullSize() |
void | setIconSize(int size)
Set the icon size to load. |
void | setIconSize(int size, boolean update)
Same as setIconText(int size) but allows you
to disable the toolbar update. |
void | setIconText(int it)
Set the kind of painting for buttons.
|
void | setIconText(int it, boolean update)
Similar to setIconText(IconText it) but allows you to
disable or enable updating. |
void | setIconText(String txt) |
void | setItemAutoSized(int id, boolean yes)
Set item autosized.
|
void | setItemAutoSized(int id) |
void | setItemEnabled(int id, boolean enabled)
Enables/disables item. |
void | setItemNoStyle(int id, boolean no_style)
This will inform a toolbar button to ignore certain style
changes. |
void | setItemNoStyle(int id) |
void | setLinedText(int id, String text)
Sets the text of a line editor.
|
void | setStretchableWidget(QWidget w) |
protected String | settingsGroup() |
void | setText(String txt)
Assign a (translated) text to this toolbar. |
void | setTitle(String _title)
Set title for toolbar when it floats.
|
void | setToggle(int id, boolean flag)
Turns button into a toggle button if flag is true. |
void | setToggle(int id) |
void | setXMLGUIClient(KXMLGUIClientInterface client) |
void | show() |
void | showEvent(QShowEvent e) |
void | showItem(int id)
Show item id. |
QSize | sizeHint() |
QSizePolicy | sizePolicy() |
String | text()
Returns the toolbar's text. |
void | toggleButton(int id)
Toggles a togglebutton.
|
static boolean | transparentSetting()
Returns the global setting for "Toolbars transparent when moving" |
void | updateRects(boolean arg1) |
void | updateRects() |
UNKNOWN: Possible bar positions.
honorStyle
is set to
true. All other toolbars will be IconOnly and use Medium icons.Parameters: parent The standard toolbar parent (usually a KMainWindow) name The standard internal name honorStyle If true, then global settings for IconSize and IconText will be honored readConfig whether to apply the configuration (global and application-specific)
UNKNOWN: Normal constructor.
honorStyle
is set to
true. All other toolbars will be IconOnly and use Medium icons.Parameters: parentWindow The window that should be the parent of this toolbar dock The position of the toolbar. Usually QMainWindow.Top. newLine If true, start a new line in the dock for this toolbar. name The standard internal name honorStyle If true, then global settings for IconSize and IconText will be honored readConfig whether to apply the configuration (global and application-specific)
UNKNOWN: Constructor for non-XML-GUI applications.
honorStyle
is set to
true. All other toolbars will be IconOnly and use Medium icons.Parameters: parentWindow The window that should be the parent of this toolbar dock Another widget than the mainwindow to dock toolbar to. newLine If true, start a new line in the dock for this toolbar. name The standard internal name honorStyle If true, then global settings for IconSize and IconText will be honored readConfig whether to apply the configuration (global and application-specific)
UNKNOWN: Constructor for non-XML-GUI applications.
id
of particular item. Nothing happens if you forget id.
UNKNOWN: Adds connections to items.
See Also: KToolBar
UNKNOWN: Align item to the right.
id
, if it exists.Parameters: id The id for the widget you want to get a pointer to
Returns: A pointer to the current animated widget or 0L
See Also: KToolBar
UNKNOWN: This will return a pointer to the animated widget with the given id
, if it exists.
configGroup
in config
and apply them. Even default settings are re-applied if force
is set.UNKNOWN: Read the toolbar settings from group configGroup
in config
and apply them.
Returns: position of toolbar.
UNKNOWN: Returns the toolbar position.
index
in combobox id
to text.
index
= -1 refers current item (one displayed in the button).UNKNOWN: Changes item index
in combobox id
to text.
UNKNOWN: Remove all items.
id.
Does not delete it or hide it.UNKNOWN: Clears the combobox id.
Returns: true if the context menu is disabled
UNKNOWN: Returns the context menu enabled flag
Returns: the total number of items in the toolbar
UNKNOWN: Returns the total number of items in the toolbar
Returns: true
if the full-size mode is enabled.
UNKNOWN: Returns the full-size mode enabled flag.
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.
UNKNOWN: Returns a pointer to KToolBarButton.
id.
Example:
KComboBox combo = toolbar.getCombo(combo_id);That way you can get access to other public methods that KComboBox provides.
Returns: a pointer to the combobox with id.
UNKNOWN: Returns a pointer to the combobox with id.
index
from combobox id.
index
= -1 refers to current item.Returns: text of item index
from combobox id.
UNKNOWN: Returns text of item index
from combobox id.
id.
Example:
KLineEdit lined = toolbar.getKToolBarLined(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.
Returns: a pointer to KToolBarLined with id.
UNKNOWN: Returns a pointer to KToolBarLined with id.
Returns: the line editor text.
UNKNOWN: Returns the line editor text.
id.
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)Returns: a pointer to the widget corresponding to id.
See Also: org.kde.qt.QWidget KToolBar
UNKNOWN: Returns a pointer to the widget corresponding to id.
id.
UNKNOWN: Hide item id.
Returns: global setting for "Highlight buttons under mouse"
UNKNOWN: Returns the global setting for "Highlight buttons under mouse"
Returns: the current icon size for buttons.
UNKNOWN: Returns the current icon size for buttons.
Returns: the default size for this type of toolbar.
UNKNOWN: Returns the default size for this type of toolbar.
Returns: the current text style for buttons.
UNKNOWN: Returns the current text style for buttons.
Returns: global setting for "Icon Text"
UNKNOWN: Returns the global setting for "Icon Text"
UNKNOWN: Returns the id of the item at the given index.
Parameters: id The id for this toolbar item receiver The parent of your slot slot The slot to receive the clicked() signal icons The name of the animation icon group to use index The item index
Returns: The item index
See Also: KToolBar
UNKNOWN: Inserts an animated widget.
id
of a button that caused the signal. If you want to bind a popup
to button, see setButton().Parameters: icon The name of the icon to use as the active pixmap id The id of this button enabled Enable or disable the button at startup text The tooltip or toolbar text (depending on state) index The position of the button. (-1 = at end). _instance instance this button will belong to
Returns: The item index.
UNKNOWN: Insert a button (a KToolBarButton) with a pixmap.
Parameters: icon The name of the icon to use as the active pixmap id The id of this button signal The signal to connect to receiver The slot's parent slot The slot to receive the signal specified in that argument. enabled Enable or disable the button at startup text The tooltip or toolbar text (depending on state) index The position of the button. (-1 = at end). _instance instance this button will belong to
Returns: The item index.
UNKNOWN: This is the same as above, but with specified signals and slots to which this button will be connected.
id
of a button that caused the signal. If you want to bind a popup
to button, see setButton().Parameters: pixmap The active pixmap id The id of this button enabled Enable or disable the button at startup text The tooltip or toolbar text (depending on state) index The position of the button. (-1 = at end).
Returns: The item index.
UNKNOWN: Inserts a button (a KToolBarButton) with the specified pixmap.
Parameters: pixmap The name of the icon to use as the active pixmap id The id of this button signal The signal to connect to receiver The slot's parent slot The slot to receive the signal specified in that argument. enabled Enable or disable the button at startup text The tooltip or toolbar text (depending on state) index The position of the button. (-1 = at end).
Returns: The item index.
UNKNOWN: This is the same as above, but with specified signals and slots to which this button will be connected.
not
emmited by
this button (see setDelayedPopup() for that).
You can add custom popups which inherit QPopupMenu to get popups
with tables, drawings etc. Just don't fiddle with events there.UNKNOWN: Inserts a button with popupmenu.
not
emmited by
this button (see setDelayedPopup() for that).
You can add custom popups which inherit QPopupMenu to get popups
with tables, drawings etc. Just don't fiddle with events there.UNKNOWN: Inserts a button with popupmenu.
Returns: Item index.
See Also: KToolBar KToolBar KComboBox
UNKNOWN: Inserts a KComboBox with list.
Returns: Item index.
UNKNOWN: Insert a KComboBox with text.
text
in combobox id
at position index.
UNKNOWN: Inserts text
in combobox id
at position index.
list
in combobox id
at position index.
UNKNOWN: Inserts list
in combobox id
at position index.
Returns: Item index.
See Also: KToolBar KToolBar KLineEdit
UNKNOWN: Inserts a KLineEdit.
id.
Returns: the separator's index
UNKNOWN: Inserts a line separator into the toolbar with the given id.
id.
Returns: the separator's index
UNKNOWN: Inserts a separator into the toolbar with the given id.
must
have this
toolbar as its parent.
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().Returns: Item index.
See Also: KToolBar
UNKNOWN: Inserts a user-defined widget.
true
if button is on and is a toggle buttonReturns: true
if button is on and is a toggle button
See Also: KToolBar
UNKNOWN: Returns true
if button is on and is a toggle button
id.
Returns: the index of the item id.
UNKNOWN: Returns the index of the item id.
UNKNOWN: Load state from an XML element, called by KXMLGUIBuilder
UNKNOWN:
index
from combobox id.
UNKNOWN: Removes item index
from combobox id.
id.
Item is deleted. Toolbar is redrawn after it.UNKNOWN: Remove item id.
id.
Item is deleted when toolbar is redrawn.UNKNOWN: Remove item id.
configGroup
in config.
UNKNOWN: Save the toolbar settings to group configGroup
in config.
UNKNOWN: 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).
UNKNOWN: Turns a button into an autorepeat button.
See Also: BarPosition
UNKNOWN: Set position of toolbar.
See Also: KToolBar
UNKNOWN: Sets a toggle button state.
UNKNOWN: Sets the icon for a button.
UNKNOWN: Sets a button icon from a QIconSet.
UNKNOWN: Sets button pixmap.
index
to be current item in combobox id.
UNKNOWN: Sets item index
to be current item in combobox id.
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.
UNKNOWN: Sets a delayed popup for a button.
Parameters: enable If false, then the context menu will be disabled
UNKNOWN: This allows you to enable or disable the context menu.
UNKNOWN: Set toolbar to full parent size (default).
Parameters: size The size to use
See Also: #
UNKNOWN: Set the icon size to load.
Parameters: size The size to use update If true, then the toolbar will be updated after this
UNKNOWN: Same as setIconText(int size) but allows you to disable the toolbar update.
See Also: IconText
UNKNOWN: Set the kind of painting for buttons.
update
is false, then the
buttons will not be updated. This is useful only if you know
that you will be forcing an update later.UNKNOWN: Similar to setIconText(IconText it) but allows you to disable or enable updating.
one
item can be autosized, and it has to be
the last left-aligned item. Items that come after this must be right
aligned. Items that can be right aligned are Lineds, Frames, Widgets and
Combos. An autosized item will resize itself whenever the toolbar geometry
changes to the last right-aligned item (or to end of toolbar if there
are no right-aligned items.)
UNKNOWN: Set item autosized.
UNKNOWN: Enables/disables item.
Parameters: id The button to exclude from styles no_style If true, then it is excluded (default: true).
UNKNOWN: This will inform a toolbar button to ignore certain style changes.
UNKNOWN: Sets the text of a line editor.
UNKNOWN: Assign a (translated) text to this toolbar.
UNKNOWN: Set title for toolbar when it floats.
flag
is true.UNKNOWN: Turns button into a toggle button if flag
is true.
id.
UNKNOWN: Show item id.
Returns: the toolbar's text.
UNKNOWN: Returns the toolbar's text.
id.
You must connect to
this signal, or use addConnection() to connect directly to the
button signal KButton.toggled().UNKNOWN: Toggles a togglebutton.
Returns: global setting for "Toolbars transparent when moving"
UNKNOWN: Returns the global setting for "Toolbars transparent when moving"