org.kde.koala
Class KToolBar

java.lang.Object
  extended by org.kde.qt.Qt
      extended by org.kde.qt.QObject
          extended by org.kde.qt.QWidget
              extended by org.kde.qt.QFrame
                  extended by org.kde.qt.QDockWindow
                      extended by org.kde.qt.QToolBar
                          extended by org.kde.koala.KToolBar
All Implemented Interfaces:
org.kde.qt.QPaintDeviceInterface, org.kde.qt.QtSupport
Direct Known Subclasses:
KMdiTaskBar

public class KToolBar
extends org.kde.qt.QToolBar

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. See KToolBarSignals for signals emitted by KToolBar

Author:
Reginald Stadlbauer , Stephan Kulow , Sven Radej .

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.
 
Fields inherited from class org.kde.qt.QDockWindow
Always, Docked, InDock, Never, OutsideDock, Undocked
 
Fields inherited from class org.kde.qt.QFrame
Box, GroupBoxPanel, HLine, LineEditPanel, MenuBarPanel, MShadow, MShape, NoFrame, Panel, Plain, PopupPanel, Raised, StyledPanel, Sunken, TabWidgetPanel, ToolBarPanel, VLine, WinPanel
 
Fields inherited from class org.kde.qt.QWidget
AncestorOrigin, ClickFocus, NoFocus, ParentOrigin, StrongFocus, TabFocus, WheelFocus, WidgetOrigin, WindowOrigin
 
Fields inherited from class org.kde.qt.Qt
AlignAuto, AlignBottom, AlignCenter, AlignHCenter, AlignHorizontal_Mask, AlignJustify, AlignLeft, AlignRight, AlignTop, AlignVCenter, AlignVertical_Mask, AlphaDither_Mask, ALT, AltButton, AnchorHref, AnchorName, AndNotROP, AndROP, ArrowCursor, Ascending, ASCII_ACCEL, AutoColor, AutoDither, AutoText, AvoidDither, BDiagPattern, BeginsWith, BevelJoin, BitmapCursor, BlankCursor, BottomLeft, BottomRight, BreakAnywhere, BusyCursor, CaseSensitive, ClearROP, ColorMode_Mask, ColorOnly, Contains, ControlButton, CopyROP, CrossCursor, CrossPattern, CTRL, CustomPattern, DashDotDotLine, DashDotLine, DashLine, Dense1Pattern, Dense2Pattern, Dense3Pattern, Dense4Pattern, Dense5Pattern, Dense6Pattern, Dense7Pattern, Descending, DiagCrossPattern, DiffuseAlphaDither, DiffuseDither, Dither_Mask, DitherMode_Mask, DockBottom, DockLeft, DockMinimized, DockRight, DockTop, DockTornOff, DockUnmanaged, DontClip, DontPrint, DotLine, DownArrow, EndsWith, EraseROP, ExactMatch, ExpandTabs, FDiagPattern, FixedColor, FixedPixmap, FlatCap, ForbiddenCursor, HiEnglishUnit, HiMetricUnit, Horizontal, HorPattern, IbeamCursor, Identical, IncludeTrailingSpaces, ISODate, Key_0, Key_1, Key_2, Key_3, Key_4, Key_5, Key_6, Key_7, Key_8, Key_9, Key_A, Key_aacute, Key_Aacute, Key_acircumflex, Key_Acircumflex, Key_acute, Key_adiaeresis, Key_Adiaeresis, Key_ae, Key_AE, Key_agrave, Key_Agrave, Key_Alt, Key_Ampersand, Key_Any, Key_Apostrophe, Key_aring, Key_Aring, Key_AsciiCircum, Key_AsciiTilde, Key_Asterisk, Key_At, Key_atilde, Key_Atilde, Key_B, Key_Back, Key_Backslash, Key_Backspace, Key_BackSpace, Key_Backtab, Key_BackTab, Key_Bar, Key_BassBoost, Key_BassDown, Key_BassUp, Key_BraceLeft, Key_BraceRight, Key_BracketLeft, Key_BracketRight, Key_brokenbar, Key_C, Key_CapsLock, Key_ccedilla, Key_Ccedilla, Key_cedilla, Key_cent, Key_Clear, Key_Colon, Key_Comma, Key_Control, Key_copyright, Key_currency, Key_D, Key_degree, Key_Delete, Key_diaeresis, Key_Direction_L, Key_Direction_R, Key_division, Key_Dollar, Key_Down, Key_E, Key_eacute, Key_Eacute, Key_ecircumflex, Key_Ecircumflex, Key_ediaeresis, Key_Ediaeresis, Key_egrave, Key_Egrave, Key_End, Key_Enter, Key_Equal, Key_Escape, Key_eth, Key_ETH, Key_Exclam, Key_exclamdown, Key_F, Key_F1, Key_F10, Key_F11, Key_F12, Key_F13, Key_F14, Key_F15, Key_F16, Key_F17, Key_F18, Key_F19, Key_F2, Key_F20, Key_F21, Key_F22, Key_F23, Key_F24, Key_F25, Key_F26, Key_F27, Key_F28, Key_F29, Key_F3, Key_F30, Key_F31, Key_F32, Key_F33, Key_F34, Key_F35, Key_F4, Key_F5, Key_F6, Key_F7, Key_F8, Key_F9, Key_Favorites, Key_Forward, Key_G, Key_Greater, Key_guillemotleft, Key_guillemotright, Key_H, Key_Help, Key_Home, Key_HomePage, Key_Hyper_L, Key_Hyper_R, Key_hyphen, Key_I, Key_iacute, Key_Iacute, Key_icircumflex, Key_Icircumflex, Key_idiaeresis, Key_Idiaeresis, Key_igrave, Key_Igrave, Key_Insert, Key_J, Key_K, Key_L, Key_Launch0, Key_Launch1, Key_Launch2, Key_Launch3, Key_Launch4, Key_Launch5, Key_Launch6, Key_Launch7, Key_Launch8, Key_Launch9, Key_LaunchA, Key_LaunchB, Key_LaunchC, Key_LaunchD, Key_LaunchE, Key_LaunchF, Key_LaunchMail, Key_LaunchMedia, Key_Left, Key_Less, Key_M, Key_macron, Key_masculine, Key_MediaLast, Key_MediaNext, Key_MediaPlay, Key_MediaPrev, Key_MediaRecord, Key_MediaStop, Key_Menu, Key_Meta, Key_Minus, Key_mu, Key_multiply, Key_N, Key_Next, Key_nobreakspace, Key_notsign, Key_ntilde, Key_Ntilde, Key_NumberSign, Key_NumLock, Key_O, Key_oacute, Key_Oacute, Key_ocircumflex, Key_Ocircumflex, Key_odiaeresis, Key_Odiaeresis, Key_ograve, Key_Ograve, Key_onehalf, Key_onequarter, Key_onesuperior, Key_Ooblique, Key_OpenUrl, Key_ordfeminine, Key_oslash, Key_otilde, Key_Otilde, Key_P, Key_PageDown, Key_PageUp, Key_paragraph, Key_ParenLeft, Key_ParenRight, Key_Pause, Key_Percent, Key_Period, Key_periodcentered, Key_Plus, Key_plusminus, Key_Print, Key_Prior, Key_Q, Key_Question, Key_questiondown, Key_QuoteDbl, Key_QuoteLeft, Key_R, Key_Refresh, Key_registered, Key_Return, Key_Right, Key_S, Key_ScrollLock, Key_Search, Key_section, Key_Semicolon, Key_Shift, Key_Slash, Key_Space, Key_ssharp, Key_Standby, Key_sterling, Key_Stop, Key_Super_L, Key_Super_R, Key_SysReq, Key_T, Key_Tab, Key_thorn, Key_THORN, Key_threequarters, Key_threesuperior, Key_TrebleDown, Key_TrebleUp, Key_twosuperior, Key_U, Key_uacute, Key_Uacute, Key_ucircumflex, Key_Ucircumflex, Key_udiaeresis, Key_Udiaeresis, Key_ugrave, Key_Ugrave, Key_Underscore, Key_unknown, Key_Up, Key_V, Key_VolumeDown, Key_VolumeMute, Key_VolumeUp, Key_W, Key_X, Key_Y, Key_yacute, Key_Yacute, Key_ydiaeresis, Key_yen, Key_Z, KeyButtonMask, Keypad, LastCursor, LastROP, LeftArrow, LeftButton, LocalDate, LocalTime, LoEnglishUnit, LogText, LoMetricUnit, MacStyle, META, MetaButton, MidButton, Minimized, MiterJoin, MODIFIER_MASK, MonoOnly, MotifStyle, MouseButtonMask, MPenCapStyle, MPenJoinStyle, MPenStyle, MV_10_DOT_0, MV_10_DOT_1, MV_10_DOT_2, MV_10_DOT_3, MV_10_DOT_4, MV_9, MV_CHEETAH, MV_JAGUAR, MV_PANTHER, MV_PUMA, MV_TIGER, MV_Unknown, NandROP, NoAccel, NoAlpha, NoBackground, NoBrush, NoButton, NoMatch, NoPen, NopROP, NorROP, NotAndROP, NotCopyROP, NotEraseROP, NotOrROP, NotROP, NotXorROP, OpaqueMode, OrderedAlphaDither, OrderedDither, OrNotROP, OrROP, Overline, PaletteBackground, PaletteBase, PaletteBrightText, PaletteButton, PaletteButtonText, PaletteDark, PaletteForeground, PaletteHighlight, PaletteHighlightedText, PaletteLight, PaletteLink, PaletteLinkVisited, PaletteMid, PaletteMidlight, PaletteShadow, PaletteText, PartialMatch, PixelUnit, PlainText, PMStyle, PointingHandCursor, PreferDither, RichText, RightArrow, RightButton, RoundCap, RoundJoin, SetROP, SHIFT, ShiftButton, ShowPrefix, SingleLine, SizeAllCursor, SizeBDiagCursor, SizeFDiagCursor, SizeHorCursor, SizeVerCursor, SolidLine, SolidPattern, SplitHCursor, SplitVCursor, SquareCap, StrikeOut, TextDate, ThresholdAlphaDither, ThresholdDither, TopLeft, TopRight, TornOff, TransparentMode, TwipsUnit, UI_AnimateCombo, UI_AnimateMenu, UI_AnimateToolBox, UI_AnimateTooltip, UI_FadeMenu, UI_FadeTooltip, UI_General, Underline, UNICODE_ACCEL, UpArrow, UpArrowCursor, UTC, VerPattern, Vertical, WaitCursor, WDestructiveClose, WGroupLeader, WhatsThisCursor, Win3Style, WindowActive, WindowFullScreen, WindowMaximized, WindowMinimized, WindowNoState, WindowsStyle, WMacDrawer, WMacNoSheet, WMouseNoMask, WNoAutoErase, WNoMousePropagation, WNorthWestGravity, WordBreak, WPaintClever, WPaintDesktop, WPaintUnclipped, WRepaintNoErase, WResizeNoErase, WShowModal, WState_AutoMask, WState_BlockUpdates, WState_CompressKeys, WState_ConfigPending, WState_Created, WState_CreatedHidden, WState_Disabled, WState_DND, WState_Exposed, WState_ForceDisabled, WState_ForceHide, WState_FullScreen, WState_HasMouse, WState_InPaintEvent, WState_Maximized, WState_Minimized, WState_MouseTracking, WState_OwnCursor, WState_OwnSizePolicy, WState_Polished, WState_Reparented, WState_Reserved0, WState_Resized, WState_Visible, WStaticContents, WStyle_ContextHelp, WStyle_Customize, WStyle_Dialog, WStyle_DialogBorder, WStyle_Mask, WStyle_Maximize, WStyle_Minimize, WStyle_MinMax, WStyle_NoBorder, WStyle_NoBorderEx, WStyle_NormalBorder, WStyle_Reserved, WStyle_Splash, WStyle_StaysOnTop, WStyle_SysMenu, WStyle_Title, WStyle_Tool, WSubWindow, WType_Desktop, WType_Dialog, WType_Mask, WType_Modal, WType_Popup, WType_TopLevel, WV_2000, WV_2003, WV_32s, WV_95, WV_98, WV_CE, WV_CE_based, WV_CENET, WV_DOS_based, WV_Me, WV_NT, WV_NT_based, WV_XP, WWinOwnDC, WX11BypassWM, X11ParentRelative, XorROP
 
Constructor Summary
protected KToolBar(java.lang.Class dummy)
           
  KToolBar(org.kde.qt.QMainWindow parentWindow, int dock)
           
  KToolBar(org.kde.qt.QMainWindow parentWindow, int dock, boolean newLine)
           
  KToolBar(org.kde.qt.QMainWindow parentWindow, int dock, boolean newLine, java.lang.String name)
           
  KToolBar(org.kde.qt.QMainWindow parentWindow, int dock, boolean newLine, java.lang.String name, boolean honorStyle)
           
  KToolBar(org.kde.qt.QMainWindow parentWindow, int dock, boolean newLine, java.lang.String name, boolean honorStyle, boolean readConfig)
          Constructor for non-XML-GUI applications.
  KToolBar(org.kde.qt.QMainWindow parentWindow, org.kde.qt.QWidget dock)
           
  KToolBar(org.kde.qt.QMainWindow parentWindow, org.kde.qt.QWidget dock, boolean newLine)
           
  KToolBar(org.kde.qt.QMainWindow parentWindow, org.kde.qt.QWidget dock, boolean newLine, java.lang.String name)
           
  KToolBar(org.kde.qt.QMainWindow parentWindow, org.kde.qt.QWidget dock, boolean newLine, java.lang.String name, boolean honorStyle)
           
  KToolBar(org.kde.qt.QMainWindow parentWindow, org.kde.qt.QWidget dock, boolean newLine, java.lang.String name, boolean honorStyle, boolean readConfig)
          Constructor for non-XML-GUI applications.
  KToolBar(org.kde.qt.QWidget parent)
           
  KToolBar(org.kde.qt.QWidget parent, java.lang.String name)
           
  KToolBar(org.kde.qt.QWidget parent, java.lang.String name, boolean honorStyle)
           
  KToolBar(org.kde.qt.QWidget parent, java.lang.String name, boolean honorStyle, boolean readConfig)
          Normal constructor.
 
Method Summary
 void addConnection(int id, java.lang.String signal, org.kde.qt.QObject receiver, java.lang.String slot)
          Adds connections to items.
 void alignItemRight(int id)
           
 void alignItemRight(int id, boolean right)
          Align item to the right.
 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, java.lang.String _configGroup)
           
protected  void applyAppearanceSettings(KConfig config, java.lang.String _configGroup, boolean forceGlobal)
           
 void applySettings(KConfig config, java.lang.String configGroup)
           
 void applySettings(KConfig config, java.lang.String configGroup, boolean force)
          Read the toolbar settings from group configGroup in config and apply them.
 int barPos()
          Returns the toolbar position.
 void changeComboItem(int id, java.lang.String text)
           
 void changeComboItem(int id, java.lang.String text, int index)
          Changes item index in combobox id to text.
protected  void childEvent(org.kde.qt.QChildEvent e)
           
 java.lang.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(org.kde.qt.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:
 java.lang.String getComboItem(int id)
           
 java.lang.String getComboItem(int id, int index)
          Returns text of item index from combobox id. index = -1 refers to current item.
 KLineEdit getLined(int id)
          Returns a pointer to KToolBarLined with id. Example:
 java.lang.String getLinedText(int id)
          Returns the line editor text.
 org.kde.qt.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, org.kde.qt.QObject receiver, java.lang.String slot, java.lang.String icons)
           
 int insertAnimatedWidget(int id, org.kde.qt.QObject receiver, java.lang.String slot, java.lang.String icons, int index)
          Inserts an animated widget.
 int insertButton(org.kde.qt.QPixmap pixmap, int id)
           
 int insertButton(org.kde.qt.QPixmap pixmap, int id, boolean enabled)
           
 int insertButton(org.kde.qt.QPixmap pixmap, int id, boolean enabled, java.lang.String text)
           
 int insertButton(org.kde.qt.QPixmap pixmap, int id, boolean enabled, java.lang.String text, int index)
          Inserts a button (a KToolBarButton) with the specified pixmap.
 int insertButton(org.kde.qt.QPixmap pixmap, int id, org.kde.qt.QPopupMenu popup, boolean enabled, java.lang.String _text)
           
 int insertButton(org.kde.qt.QPixmap pixmap, int id, org.kde.qt.QPopupMenu popup, boolean enabled, java.lang.String _text, int index)
          Inserts a button with popupmenu.
 int insertButton(org.kde.qt.QPixmap pixmap, int id, java.lang.String signal, org.kde.qt.QObject receiver, java.lang.String slot)
           
 int insertButton(org.kde.qt.QPixmap pixmap, int id, java.lang.String signal, org.kde.qt.QObject receiver, java.lang.String slot, boolean enabled)
           
 int insertButton(org.kde.qt.QPixmap pixmap, int id, java.lang.String signal, org.kde.qt.QObject receiver, java.lang.String slot, boolean enabled, java.lang.String text)
           
 int insertButton(org.kde.qt.QPixmap pixmap, int id, java.lang.String signal, org.kde.qt.QObject receiver, java.lang.String slot, boolean enabled, java.lang.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(java.lang.String icon, int id)
           
 int insertButton(java.lang.String icon, int id, boolean enabled)
           
 int insertButton(java.lang.String icon, int id, boolean enabled, java.lang.String text)
           
 int insertButton(java.lang.String icon, int id, boolean enabled, java.lang.String text, int index)
           
 int insertButton(java.lang.String icon, int id, boolean enabled, java.lang.String text, int index, KInstanceInterface _instance)
          Insert a button (a KToolBarButton) with a pixmap.
 int insertButton(java.lang.String icon, int id, org.kde.qt.QPopupMenu popup, boolean enabled, java.lang.String _text)
           
 int insertButton(java.lang.String icon, int id, org.kde.qt.QPopupMenu popup, boolean enabled, java.lang.String _text, int index)
          Inserts a button with popupmenu.
 int insertButton(java.lang.String icon, int id, java.lang.String signal, org.kde.qt.QObject receiver, java.lang.String slot)
           
 int insertButton(java.lang.String icon, int id, java.lang.String signal, org.kde.qt.QObject receiver, java.lang.String slot, boolean enabled)
           
 int insertButton(java.lang.String icon, int id, java.lang.String signal, org.kde.qt.QObject receiver, java.lang.String slot, boolean enabled, java.lang.String text)
           
 int insertButton(java.lang.String icon, int id, java.lang.String signal, org.kde.qt.QObject receiver, java.lang.String slot, boolean enabled, java.lang.String text, int index)
           
 int insertButton(java.lang.String icon, int id, java.lang.String signal, org.kde.qt.QObject receiver, java.lang.String slot, boolean enabled, java.lang.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 insertCombo(java.lang.String[] list, int id, boolean writable, java.lang.String signal, org.kde.qt.QObject receiver, java.lang.String slot)
           
 int insertCombo(java.lang.String[] list, int id, boolean writable, java.lang.String signal, org.kde.qt.QObject receiver, java.lang.String slot, boolean enabled)
           
 int insertCombo(java.lang.String[] list, int id, boolean writable, java.lang.String signal, org.kde.qt.QObject receiver, java.lang.String slot, boolean enabled, java.lang.String tooltiptext)
           
 int insertCombo(java.lang.String[] list, int id, boolean writable, java.lang.String signal, org.kde.qt.QObject receiver, java.lang.String slot, boolean enabled, java.lang.String tooltiptext, int size)
           
 int insertCombo(java.lang.String[] list, int id, boolean writable, java.lang.String signal, org.kde.qt.QObject receiver, java.lang.String slot, boolean enabled, java.lang.String tooltiptext, int size, int index)
           
 int insertCombo(java.lang.String[] list, int id, boolean writable, java.lang.String signal, org.kde.qt.QObject receiver, java.lang.String slot, boolean enabled, java.lang.String tooltiptext, int size, int index, int policy)
          Inserts a KComboBox with list.
 int insertCombo(java.lang.String text, int id, boolean writable, java.lang.String signal, org.kde.qt.QObject receiver, java.lang.String slot)
           
 int insertCombo(java.lang.String text, int id, boolean writable, java.lang.String signal, org.kde.qt.QObject receiver, java.lang.String slot, boolean enabled)
           
 int insertCombo(java.lang.String text, int id, boolean writable, java.lang.String signal, org.kde.qt.QObject receiver, java.lang.String slot, boolean enabled, java.lang.String tooltiptext)
           
 int insertCombo(java.lang.String text, int id, boolean writable, java.lang.String signal, org.kde.qt.QObject receiver, java.lang.String slot, boolean enabled, java.lang.String tooltiptext, int size)
           
 int insertCombo(java.lang.String text, int id, boolean writable, java.lang.String signal, org.kde.qt.QObject receiver, java.lang.String slot, boolean enabled, java.lang.String tooltiptext, int size, int index)
           
 int insertCombo(java.lang.String text, int id, boolean writable, java.lang.String signal, org.kde.qt.QObject receiver, java.lang.String slot, boolean enabled, java.lang.String tooltiptext, int size, int index, int policy)
          Insert a KComboBox with text.
 void insertComboItem(int id, java.lang.String text, int index)
          Inserts text in combobox id at position index.
 void insertComboList(int id, java.lang.String[] list, int index)
          Inserts list in combobox id at position index.
 int insertLined(java.lang.String text, int id, java.lang.String signal, org.kde.qt.QObject receiver, java.lang.String slot)
           
 int insertLined(java.lang.String text, int id, java.lang.String signal, org.kde.qt.QObject receiver, java.lang.String slot, boolean enabled)
           
 int insertLined(java.lang.String text, int id, java.lang.String signal, org.kde.qt.QObject receiver, java.lang.String slot, boolean enabled, java.lang.String toolTipText)
           
 int insertLined(java.lang.String text, int id, java.lang.String signal, org.kde.qt.QObject receiver, java.lang.String slot, boolean enabled, java.lang.String toolTipText, int size)
           
 int insertLined(java.lang.String text, int id, java.lang.String signal, org.kde.qt.QObject receiver, java.lang.String slot, boolean enabled, java.lang.String toolTipText, int size, int index)
          Inserts a KLineEdit.
 int insertLineSeparator()
           
 int insertLineSeparator(int index)
           
 int insertLineSeparator(int index, int id)
          Inserts a line separator into the toolbar with the given id.
 int insertSeparator()
           
 int insertSeparator(int index)
           
 int insertSeparator(int index, int id)
          Inserts a separator into the toolbar with the given id.
 int insertWidget(int id, int width, org.kde.qt.QWidget _widget)
           
 int insertWidget(int id, int width, org.kde.qt.QWidget _widget, int index)
          Inserts a user-defined 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(org.kde.qt.QDomElement e)
          Load state from an XML element, called by KXMLGUIBuilder
 org.kde.qt.QMetaObject metaObject()
           
 org.kde.qt.QSize minimumSize()
           
 org.kde.qt.QSize minimumSizeHint()
           
protected  void mousePressEvent(org.kde.qt.QMouseEvent arg1)
           
 void positionYourself()
           
 void positionYourself(boolean force)
           
 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(org.kde.qt.QResizeEvent e)
           
 void saveSettings(KConfig config, java.lang.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(org.kde.qt.QDomElement e)
           
 void setAutoRepeat(int id)
           
 void setAutoRepeat(int id, boolean flag)
          Turns a button into an autorepeat button.
 void setBarPos(int bpos)
          Set position of toolbar.
 void setButton(int id, boolean flag)
          Sets a toggle button state.
 void setButtonIcon(int id, java.lang.String _icon)
          Sets the icon for a button.
 void setButtonIconSet(int id, org.kde.qt.QIconSet iconset)
          Sets a button icon from a QIconSet.
 void setButtonPixmap(int id, org.kde.qt.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, org.kde.qt.QPopupMenu _popup)
           
 void setDelayedPopup(int id, org.kde.qt.QPopupMenu _popup, boolean toggle)
          Sets a delayed popup for a button.
 void setEnableContextMenu()
           
 void setEnableContextMenu(boolean enable)
          This allows you to enable or disable the context menu.
 void setFlat(boolean flag)
           
 void setFullSize()
           
 void setFullSize(boolean flag)
          Set toolbar to full parent size (default).
 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(java.lang.String txt)
           
 void setItemAutoSized(int id)
           
 void setItemAutoSized(int id, boolean yes)
          Set item autosized.
 void setItemEnabled(int id, boolean enabled)
          Enables/disables item.
 void setItemNoStyle(int id)
           
 void setItemNoStyle(int id, boolean no_style)
          This will inform a toolbar button to ignore certain style changes.
 void setLinedText(int id, java.lang.String text)
          Sets the text of a line editor.
 void setStretchableWidget(org.kde.qt.QWidget w)
           
 void setText(java.lang.String txt)
          Assign a (translated) text to this toolbar.
protected  java.lang.String settingsGroup()
           
 void setTitle(java.lang.String _title)
          Set title for toolbar when it floats.
 void setToggle(int id)
           
 void setToggle(int id, boolean flag)
          Turns button into a toggle button if flag is true.
 void setXMLGUIClient(KXMLGUIClientInterface client)
           
 void show()
           
 void showEvent(org.kde.qt.QShowEvent e)
           
 void showItem(int id)
          Show item id.
 org.kde.qt.QSize sizeHint()
           
 org.kde.qt.QSizePolicy sizePolicy()
           
 java.lang.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()
           
 void updateRects(boolean arg1)
           
 
Methods inherited from class org.kde.qt.QToolBar
addSeparator, label, mainWindow, setLabel, setMinimumSize, setOrientation, styleChange, tr, tr
 
Methods inherited from class org.kde.qt.QDockWindow
area, boxLayout, closeMode, contextMenuEvent, dock, drawContents, drawFrame, eventFilter, fixedExtent, hideEvent, isCloseEnabled, isHorizontallyStretchable, isHorizontalStretchable, isMovingEnabled, isResizeEnabled, isStretchable, isVerticallyStretchable, isVerticalStretchable, newLine, offset, opaqueMoving, orientation, place, setCaption, setCloseMode, setFixedExtentHeight, setFixedExtentWidth, setHorizontallyStretchable, setHorizontalStretchable, setMovingEnabled, setNewLine, setOffset, setOpaqueMoving, setResizeEnabled, setVerticallyStretchable, setVerticalStretchable, setWidget, undock, undock, widget
 
Methods inherited from class org.kde.qt.QFrame
contentsRect, frameChanged, frameRect, frameShadow, frameShape, frameStyle, frameWidth, lineShapesOk, lineWidth, margin, midLineWidth, paintEvent, setFrameRect, setFrameShadow, setFrameShape, setFrameStyle, setLineWidth, setMargin, setMidLineWidth
 
Methods inherited from class org.kde.qt.QWidget
acceptDrops, adjustSize, autoMask, backgroundBrush, backgroundColor, backgroundMode, backgroundOffset, backgroundOrigin, backgroundPixmap, baseSize, caption, childAt, childAt, childAt, childAt, childrenRect, childrenRegion, clearFocus, clearMask, clearWFlags, clearWState, clipRegion, close, close, closeEvent, colorGroup, constPolish, create, create, create, create, cursor, customWhatsThis, destroy, destroy, destroy, devType, dragEnterEvent, dragLeaveEvent, dragMoveEvent, drawText, drawText, dropEvent, enabledChange, enterEvent, erase, erase, erase, erase, eraseColor, erasePixmap, find, focusData, focusInEvent, focusNextPrevChild, focusOutEvent, focusPolicy, focusProxy, focusWidget, font, fontChange, fontInf, fontInfo, fontMet, fontMet, fontMet, fontMetrics, foregroundColor, frameGeometry, frameSize, geometry, getWFlags, getWState, grabKeyboard, grabMouse, grabMouse, hasFocus, hasMouse, hasMouseTracking, height, heightForWidth, icon, iconify, iconText, imComposeEvent, imEndEvent, imStartEvent, isActiveWindow, isDesktop, isDialog, isEnabled, isEnabledTo, isEnabledToTLW, isExtDev, isFocusEnabled, isFullScreen, isHidden, isInputMethodEnabled, isMaximized, isMinimized, isModal, isPopup, isShown, isTopLevel, isUpdatesEnabled, isVisible, isVisibleTo, isVisibleToTLW, keyboardGrabber, keyPressEvent, keyReleaseEvent, layout, leaveEvent, lower, mapFrom, mapFromGlobal, mapFromParent, mapTo, mapToGlobal, mapToParent, maximumHeight, maximumSize, maximumWidth, metric, microFocusHint, minimumHeight, minimumWidth, mouseDoubleClickEvent, mouseGrabber, mouseMoveEvent, mouseReleaseEvent, move, move, moveEvent, ownCursor, ownFont, ownPalette, paintDevice, paintingActive, palette, paletteBackgroundColor, paletteBackgroundPixmap, paletteChange, paletteForegroundColor, parentWidget, parentWidget, polish, pos, raise, recreate, recreate, rect, releaseKeyboard, releaseMouse, repaint, repaint, repaint, repaint, repaint, repaint, repaint, repaint, reparent, reparent, reparent, reparent, resetInputContext, resize, resize, resolution, scroll, scroll, setAcceptDrops, setActiveWindow, setAutoMask, setBackgroundColor, setBackgroundMode, setBackgroundMode, setBackgroundOrigin, setBackgroundPixmap, setBaseSize, setBaseSize, setCursor, setDisabled, setEnabled, setEraseColor, setErasePixmap, setFixedHeight, setFixedSize, setFixedSize, setFixedWidth, setFocus, setFocusPolicy, setFocusProxy, setFont, setFont, setGeometry, setGeometry, setHidden, setIcon, setInputMethodEnabled, setKeyCompression, setMask, setMask, setMaximumHeight, setMaximumSize, setMaximumSize, setMaximumWidth, setMicroFocusHint, setMicroFocusHint, setMicroFocusHint, setMinimumHeight, setMinimumSize, setMinimumWidth, setMouseTracking, setName, setPalette, setPalette, setPaletteBackgroundColor, setPaletteBackgroundPixmap, setPaletteForegroundColor, setResolution, setShown, setSizeIncrement, setSizeIncrement, setSizePolicy, setSizePolicy, setSizePolicy, setStyle, setStyle, setTabOrder, setUpdatesEnabled, setWFlags, setWindowOpacity, setWindowState, setWState, showFullScreen, showMaximized, showMinimized, showNormal, size, sizeIncrement, stackUnder, style, tabletEvent, testWFlags, testWState, topLevelWidget, unsetCursor, unsetFont, unsetPalette, update, update, update, updateGeometry, updateMask, visibleRect, wheelEvent, width, windowActivationChange, windowOpacity, windowState, winId, x, y
 
Methods inherited from class org.kde.qt.QObject
activate_filters, activate_signal_bool, activate_signal, activate_signal, activate_signal, activate_signal, blockSignals, checkConnectArgs, child, child, child, children, connect, connect, connectInternal, connectNotify, customEvent, deleteLater, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnectInternal, disconnectNotify, dumpObjectInfo, dumpObjectTree, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, highPriority, i18n, inherits, insertChild, installEventFilter, isA, isWidgetType, killTimer, killTimers, name, name, normalizeSignalSlot, objectTrees, parent, property, queryList, queryList, queryList, queryList, queryList, registerUserData, removeChild, removeEventFilter, sender, setProperty, signalsBlocked, startTimer, timerEvent
 
Methods inherited from class org.kde.qt.Qt
arrowCursor, bin, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, bitBlt, black, blankCursor, blue, color0, color1, copyBlt, copyBlt, copyBlt, copyBlt, copyBlt, crossCursor, cyan, darkBlue, darkCyan, darkGray, darkGreen, darkMagenta, darkRed, darkYellow, dec, dynamicCast, endl, flush, forbiddenCursor, fromUtf8, gray, green, hex, ibeamCursor, lightGray, magenta, oct, op_div, op_div, op_div, op_div, op_equals, op_equals, op_equals, op_equals, op_minus, op_minus, op_minus, op_mult, op_mult, op_mult, op_mult, op_mult, op_mult, op_mult, op_mult, op_mult, op_not_equals, op_not_equals, op_not_equals, op_not_equals, op_plus, op_plus, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_read, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, op_write, pointingHandCursor, qAlpha, qApp, qAppName, qBlue, qCompress, qCompress, qDebug, qDebug, qDrawArrow, qDrawItem, qDrawItem, qDrawItem, qDrawPlainRect, qDrawPlainRect, qDrawPlainRect, qDrawPlainRect, qDrawPlainRect, qDrawPlainRect, qDrawShadeLine, qDrawShadeLine, qDrawShadeLine, qDrawShadeLine, qDrawShadeLine, qDrawShadeLine, qDrawShadeLine, qDrawShadeLine, qDrawShadePanel, qDrawShadePanel, qDrawShadePanel, qDrawShadePanel, qDrawShadePanel, qDrawShadePanel, qDrawShadePanel, qDrawShadePanel, qDrawShadeRect, qDrawShadeRect, qDrawShadeRect, qDrawShadeRect, qDrawShadeRect, qDrawShadeRect, qDrawShadeRect, qDrawShadeRect, qDrawShadeRect, qDrawShadeRect, qDrawWinButton, qDrawWinButton, qDrawWinButton, qDrawWinButton, qDrawWinButton, qDrawWinButton, qDrawWinPanel, qDrawWinPanel, qDrawWinPanel, qDrawWinPanel, qDrawWinPanel, qDrawWinPanel, qFatal, qFatal, qGLVersion, qGray, qGray, qGreen, qInitNetworkProtocols, qInstallPath, qInstallPathBins, qInstallPathData, qInstallPathDocs, qInstallPathHeaders, qInstallPathLibs, qInstallPathPlugins, qInstallPathSysconf, qInstallPathTranslations, qItemRect, qItemRect, qObsolete, qObsolete, qObsolete, qRed, qRgb, qRgba, qRound, qSharedBuild, qSuppressObsoleteWarnings, qSuppressObsoleteWarnings, qSysInfo, qSystemWarning, qSystemWarning, qUncompress, qUncompress, qVersion, qWarning, qWarning, red, reset, SIGNAL, sizeAllCursor, sizeBDiagCursor, sizeFDiagCursor, sizeHorCursor, sizeVerCursor, SLOT, splitHCursor, splitVCursor, upArrowCursor, waitCursor, whatsThisCursor, white, ws, yellow
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IconOnly

public static final int IconOnly
See Also:
Constant Field Values

IconTextRight

public static final int IconTextRight
See Also:
Constant Field Values

TextOnly

public static final int TextOnly
See Also:
Constant Field Values

IconTextBottom

public static final int IconTextBottom
See Also:
Constant Field Values

Unmanaged

public static final int Unmanaged
Possible bar positions.

See Also:
Constant Field Values

Floating

public static final int Floating
See Also:
Constant Field Values

Top

public static final int Top
See Also:
Constant Field Values

Bottom

public static final int Bottom
See Also:
Constant Field Values

Right

public static final int Right
See Also:
Constant Field Values

Left

public static final int Left
See Also:
Constant Field Values

Flat

public static final int Flat
See Also:
Constant Field Values
Constructor Detail

KToolBar

protected KToolBar(java.lang.Class dummy)

KToolBar

public KToolBar(org.kde.qt.QWidget parent,
                java.lang.String name,
                boolean honorStyle,
                boolean readConfig)
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 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)

KToolBar

public KToolBar(org.kde.qt.QWidget parent,
                java.lang.String name,
                boolean honorStyle)

KToolBar

public KToolBar(org.kde.qt.QWidget parent,
                java.lang.String name)

KToolBar

public KToolBar(org.kde.qt.QWidget parent)

KToolBar

public KToolBar(org.kde.qt.QMainWindow parentWindow,
                int dock,
                boolean newLine,
                java.lang.String name,
                boolean honorStyle,
                boolean readConfig)
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 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)

KToolBar

public KToolBar(org.kde.qt.QMainWindow parentWindow,
                int dock,
                boolean newLine,
                java.lang.String name,
                boolean honorStyle)

KToolBar

public KToolBar(org.kde.qt.QMainWindow parentWindow,
                int dock,
                boolean newLine,
                java.lang.String name)

KToolBar

public KToolBar(org.kde.qt.QMainWindow parentWindow,
                int dock,
                boolean newLine)

KToolBar

public KToolBar(org.kde.qt.QMainWindow parentWindow,
                int dock)

KToolBar

public KToolBar(org.kde.qt.QMainWindow parentWindow,
                org.kde.qt.QWidget dock,
                boolean newLine,
                java.lang.String name,
                boolean honorStyle,
                boolean readConfig)
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 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)

KToolBar

public KToolBar(org.kde.qt.QMainWindow parentWindow,
                org.kde.qt.QWidget dock,
                boolean newLine,
                java.lang.String name,
                boolean honorStyle)

KToolBar

public KToolBar(org.kde.qt.QMainWindow parentWindow,
                org.kde.qt.QWidget dock,
                boolean newLine,
                java.lang.String name)

KToolBar

public KToolBar(org.kde.qt.QMainWindow parentWindow,
                org.kde.qt.QWidget dock,
                boolean newLine)

KToolBar

public KToolBar(org.kde.qt.QMainWindow parentWindow,
                org.kde.qt.QWidget dock)
Method Detail

metaObject

public org.kde.qt.QMetaObject metaObject()
Overrides:
metaObject in class org.kde.qt.QToolBar

className

public java.lang.String className()
Overrides:
className in class org.kde.qt.QToolBar

insertButton

public int insertButton(java.lang.String icon,
                        int id,
                        boolean enabled,
                        java.lang.String text,
                        int index,
                        KInstanceInterface _instance)
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 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.

insertButton

public int insertButton(java.lang.String icon,
                        int id,
                        boolean enabled,
                        java.lang.String text,
                        int index)

insertButton

public int insertButton(java.lang.String icon,
                        int id,
                        boolean enabled,
                        java.lang.String text)

insertButton

public int insertButton(java.lang.String icon,
                        int id,
                        boolean enabled)

insertButton

public int insertButton(java.lang.String icon,
                        int id)

insertButton

public int insertButton(java.lang.String icon,
                        int id,
                        java.lang.String signal,
                        org.kde.qt.QObject receiver,
                        java.lang.String slot,
                        boolean enabled,
                        java.lang.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. You can add more signals with addConnection().

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.

insertButton

public int insertButton(java.lang.String icon,
                        int id,
                        java.lang.String signal,
                        org.kde.qt.QObject receiver,
                        java.lang.String slot,
                        boolean enabled,
                        java.lang.String text,
                        int index)

insertButton

public int insertButton(java.lang.String icon,
                        int id,
                        java.lang.String signal,
                        org.kde.qt.QObject receiver,
                        java.lang.String slot,
                        boolean enabled,
                        java.lang.String text)

insertButton

public int insertButton(java.lang.String icon,
                        int id,
                        java.lang.String signal,
                        org.kde.qt.QObject receiver,
                        java.lang.String slot,
                        boolean enabled)

insertButton

public int insertButton(java.lang.String icon,
                        int id,
                        java.lang.String signal,
                        org.kde.qt.QObject receiver,
                        java.lang.String slot)

insertButton

public int insertButton(org.kde.qt.QPixmap pixmap,
                        int id,
                        boolean enabled,
                        java.lang.String text,
                        int index)
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 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.

insertButton

public int insertButton(org.kde.qt.QPixmap pixmap,
                        int id,
                        boolean enabled,
                        java.lang.String text)

insertButton

public int insertButton(org.kde.qt.QPixmap pixmap,
                        int id,
                        boolean enabled)

insertButton

public int insertButton(org.kde.qt.QPixmap pixmap,
                        int id)

insertButton

public int insertButton(org.kde.qt.QPixmap pixmap,
                        int id,
                        java.lang.String signal,
                        org.kde.qt.QObject receiver,
                        java.lang.String slot,
                        boolean enabled,
                        java.lang.String text,
                        int index)
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().

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.

insertButton

public int insertButton(org.kde.qt.QPixmap pixmap,
                        int id,
                        java.lang.String signal,
                        org.kde.qt.QObject receiver,
                        java.lang.String slot,
                        boolean enabled,
                        java.lang.String text)

insertButton

public int insertButton(org.kde.qt.QPixmap pixmap,
                        int id,
                        java.lang.String signal,
                        org.kde.qt.QObject receiver,
                        java.lang.String slot,
                        boolean enabled)

insertButton

public int insertButton(org.kde.qt.QPixmap pixmap,
                        int id,
                        java.lang.String signal,
                        org.kde.qt.QObject receiver,
                        java.lang.String slot)

insertButton

public int insertButton(java.lang.String icon,
                        int id,
                        org.kde.qt.QPopupMenu popup,
                        boolean enabled,
                        java.lang.String _text,
                        int index)
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 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.


insertButton

public int insertButton(java.lang.String icon,
                        int id,
                        org.kde.qt.QPopupMenu popup,
                        boolean enabled,
                        java.lang.String _text)

insertButton

public int insertButton(org.kde.qt.QPixmap pixmap,
                        int id,
                        org.kde.qt.QPopupMenu popup,
                        boolean enabled,
                        java.lang.String _text,
                        int index)
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 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.


insertButton

public int insertButton(org.kde.qt.QPixmap pixmap,
                        int id,
                        org.kde.qt.QPopupMenu popup,
                        boolean enabled,
                        java.lang.String _text)

insertLined

public int insertLined(java.lang.String text,
                       int id,
                       java.lang.String signal,
                       org.kde.qt.QObject receiver,
                       java.lang.String slot,
                       boolean enabled,
                       java.lang.String toolTipText,
                       int size,
                       int index)
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).

Returns:
Item index.
See Also:
#setFullWidth, setItemAutoSized(int, boolean), KLineEdit

insertLined

public int insertLined(java.lang.String text,
                       int id,
                       java.lang.String signal,
                       org.kde.qt.QObject receiver,
                       java.lang.String slot,
                       boolean enabled,
                       java.lang.String toolTipText,
                       int size)

insertLined

public int insertLined(java.lang.String text,
                       int id,
                       java.lang.String signal,
                       org.kde.qt.QObject receiver,
                       java.lang.String slot,
                       boolean enabled,
                       java.lang.String toolTipText)

insertLined

public int insertLined(java.lang.String text,
                       int id,
                       java.lang.String signal,
                       org.kde.qt.QObject receiver,
                       java.lang.String slot,
                       boolean enabled)

insertLined

public int insertLined(java.lang.String text,
                       int id,
                       java.lang.String signal,
                       org.kde.qt.QObject receiver,
                       java.lang.String slot)

insertCombo

public int insertCombo(java.lang.String[] list,
                       int id,
                       boolean writable,
                       java.lang.String signal,
                       org.kde.qt.QObject receiver,
                       java.lang.String slot,
                       boolean enabled,
                       java.lang.String tooltiptext,
                       int size,
                       int index,
                       int policy)
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.

Returns:
Item index.
See Also:
#setFullWidth, setItemAutoSized(int, boolean), KComboBox

insertCombo

public int insertCombo(java.lang.String[] list,
                       int id,
                       boolean writable,
                       java.lang.String signal,
                       org.kde.qt.QObject receiver,
                       java.lang.String slot,
                       boolean enabled,
                       java.lang.String tooltiptext,
                       int size,
                       int index)

insertCombo

public int insertCombo(java.lang.String[] list,
                       int id,
                       boolean writable,
                       java.lang.String signal,
                       org.kde.qt.QObject receiver,
                       java.lang.String slot,
                       boolean enabled,
                       java.lang.String tooltiptext,
                       int size)

insertCombo

public int insertCombo(java.lang.String[] list,
                       int id,
                       boolean writable,
                       java.lang.String signal,
                       org.kde.qt.QObject receiver,
                       java.lang.String slot,
                       boolean enabled,
                       java.lang.String tooltiptext)

insertCombo

public int insertCombo(java.lang.String[] list,
                       int id,
                       boolean writable,
                       java.lang.String signal,
                       org.kde.qt.QObject receiver,
                       java.lang.String slot,
                       boolean enabled)

insertCombo

public int insertCombo(java.lang.String[] list,
                       int id,
                       boolean writable,
                       java.lang.String signal,
                       org.kde.qt.QObject receiver,
                       java.lang.String slot)

insertCombo

public int insertCombo(java.lang.String text,
                       int id,
                       boolean writable,
                       java.lang.String signal,
                       org.kde.qt.QObject receiver,
                       java.lang.String slot,
                       boolean enabled,
                       java.lang.String tooltiptext,
                       int size,
                       int index,
                       int policy)
Insert a KComboBox with text. The rest is the same as above.

Returns:
Item index.
See Also:
setItemAutoSized(int, boolean), KComboBox

insertCombo

public int insertCombo(java.lang.String text,
                       int id,
                       boolean writable,
                       java.lang.String signal,
                       org.kde.qt.QObject receiver,
                       java.lang.String slot,
                       boolean enabled,
                       java.lang.String tooltiptext,
                       int size,
                       int index)

insertCombo

public int insertCombo(java.lang.String text,
                       int id,
                       boolean writable,
                       java.lang.String signal,
                       org.kde.qt.QObject receiver,
                       java.lang.String slot,
                       boolean enabled,
                       java.lang.String tooltiptext,
                       int size)

insertCombo

public int insertCombo(java.lang.String text,
                       int id,
                       boolean writable,
                       java.lang.String signal,
                       org.kde.qt.QObject receiver,
                       java.lang.String slot,
                       boolean enabled,
                       java.lang.String tooltiptext)

insertCombo

public int insertCombo(java.lang.String text,
                       int id,
                       boolean writable,
                       java.lang.String signal,
                       org.kde.qt.QObject receiver,
                       java.lang.String slot,
                       boolean enabled)

insertCombo

public int insertCombo(java.lang.String text,
                       int id,
                       boolean writable,
                       java.lang.String signal,
                       org.kde.qt.QObject receiver,
                       java.lang.String slot)

insertSeparator

public int insertSeparator(int index,
                           int id)
Inserts a separator into the toolbar with the given id.

Returns:
the separator's index

insertSeparator

public int insertSeparator(int index)

insertSeparator

public int insertSeparator()

insertLineSeparator

public int insertLineSeparator(int index,
                               int id)
Inserts a line separator into the toolbar with the given id.

Returns:
the separator's index

insertLineSeparator

public int insertLineSeparator(int index)

insertLineSeparator

public int insertLineSeparator()

insertWidget

public int insertWidget(int id,
                        int width,
                        org.kde.qt.QWidget _widget,
                        int index)
Inserts a user-defined widget. The widget 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:
setItemAutoSized(int, boolean)

insertWidget

public int insertWidget(int id,
                        int width,
                        org.kde.qt.QWidget _widget)

insertAnimatedWidget

public int insertAnimatedWidget(int id,
                                org.kde.qt.QObject receiver,
                                java.lang.String slot,
                                java.lang.String icons,
                                int index)
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.

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:
animatedWidget(int)

insertAnimatedWidget

public int insertAnimatedWidget(int id,
                                org.kde.qt.QObject receiver,
                                java.lang.String slot,
                                java.lang.String icons)

animatedWidget

public KAnimWidget animatedWidget(int id)
This will return a pointer to the animated widget with the given 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:
insertAnimatedWidget(int, org.kde.qt.QObject, java.lang.String, java.lang.String, int)

addConnection

public void addConnection(int id,
                          java.lang.String signal,
                          org.kde.qt.QObject receiver,
                          java.lang.String slot)
Adds connections to items. It is important that you know the id of particular item. Nothing happens if you forget id.


setItemEnabled

public void setItemEnabled(int id,
                           boolean enabled)
Enables/disables item.


setButtonIcon

public void setButtonIcon(int id,
                          java.lang.String _icon)
Sets the icon for a button. Can be used while button is visible.


setButtonPixmap

public void setButtonPixmap(int id,
                            org.kde.qt.QPixmap _pixmap)
Sets button pixmap. Can be used while button is visible.


setButtonIconSet

public void setButtonIconSet(int id,
                             org.kde.qt.QIconSet iconset)
Sets a button icon from a QIconSet. Can be used while button is visible.


setDelayedPopup

public void setDelayedPopup(int id,
                            org.kde.qt.QPopupMenu _popup,
                            boolean toggle)
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):
                 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.


setDelayedPopup

public void setDelayedPopup(int id,
                            org.kde.qt.QPopupMenu _popup)

setAutoRepeat

public void setAutoRepeat(int id,
                          boolean flag)
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'.


setAutoRepeat

public void setAutoRepeat(int id)

setToggle

public void setToggle(int id,
                      boolean flag)
Turns button into a toggle button if flag is true.


setToggle

public void setToggle(int id)

toggleButton

public void toggleButton(int id)
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 id. You must connect to this signal, or use addConnection() to connect directly to the button signal KButton.toggled().


setButton

public void setButton(int id,
                      boolean flag)
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().

See Also:
setToggle(int, boolean)

isButtonOn

public boolean isButtonOn(int id)
Returns true if button is on and is a toggle button

Returns:
true if button is on and is a toggle button
See Also:
setToggle(int, boolean)

setLinedText

public void setLinedText(int id,
                         java.lang.String text)
Sets the text of a line editor. Cursor is set at end of text.


getLinedText

public java.lang.String getLinedText(int id)
Returns the line editor text.

Returns:
the line editor text.

insertComboItem

public void insertComboItem(int id,
                            java.lang.String text,
                            int index)
Inserts text in combobox id at position index.


insertComboList

public void insertComboList(int id,
                            java.lang.String[] list,
                            int index)
Inserts list in combobox id at position index.


removeComboItem

public void removeComboItem(int id,
                            int index)
Removes item index from combobox id.


setCurrentComboItem

public void setCurrentComboItem(int id,
                                int index)
Sets item index to be current item in combobox id.


changeComboItem

public void changeComboItem(int id,
                            java.lang.String text,
                            int index)
Changes item index in combobox id to text. index = -1 refers current item (one displayed in the button).


changeComboItem

public void changeComboItem(int id,
                            java.lang.String text)

clearCombo

public void clearCombo(int id)
Clears the combobox id. Does not delete it or hide it.


getComboItem

public java.lang.String getComboItem(int id,
                                     int index)
Returns text of item index from combobox id. index = -1 refers to current item.

Returns:
text of item index from combobox id.

getComboItem

public java.lang.String getComboItem(int id)

getCombo

public 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.

Returns:
a pointer to the combobox with id.

getLined

public 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. KLineEdit is the same thing as QLineEdit plus completion signals.

Returns:
a pointer to KToolBarLined with id.

getButton

public KToolBarButton getButton(int id)
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.


alignItemRight

public void alignItemRight(int id,
                           boolean right)
Align item to the right. This works only if toolbar is set to full width.

See Also:
#setFullWidth

alignItemRight

public void alignItemRight(int id)

getWidget

public org.kde.qt.QWidget getWidget(int id)
Returns a pointer to the widget corresponding to 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:
QWidget, updateRects(boolean)

setItemAutoSized

public void setItemAutoSized(int id,
                             boolean yes)
Set item autosized. This works only if the toolbar is set to full width. Only 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.)

See Also:
#setFullWidth, alignItemRight(int, boolean)

setItemAutoSized

public void setItemAutoSized(int id)

clear

public void clear()
Remove all items. The toolbar is redrawn after it.

Overrides:
clear in class org.kde.qt.QToolBar

removeItem

public void removeItem(int id)
Remove item id. Item is deleted. Toolbar is redrawn after it.


removeItemDelayed

public void removeItemDelayed(int id)
Remove item id. Item is deleted when toolbar is redrawn.


hideItem

public void hideItem(int id)
Hide item id.


showItem

public void showItem(int id)
Show item id.


itemIndex

public int itemIndex(int id)
Returns the index of the item id.

Returns:
the index of the item id.

idAt

public int idAt(int index)
Returns the id of the item at the given index.


setFullSize

public void setFullSize(boolean flag)
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.


setFullSize

public void setFullSize()

fullSize

public boolean fullSize()
Returns the full-size mode enabled flag.

Returns:
true if the full-size mode is enabled.

setBarPos

public void setBarPos(int bpos)
Set position of toolbar.

See Also:
BarPosition

barPos

public int barPos()
Returns the toolbar position.

Returns:
position of toolbar.

setTitle

public void setTitle(java.lang.String _title)
Set title for toolbar when it floats. Titles are however not (yet) visible. You can't change toolbar's title while it's floating.


setIconText

public void setIconText(int it)
Set the kind of painting for buttons. Choose from:
  • IconOnly (only icons),
  • IconTextRight (icon and text, text is left from icons),
  • TextOnly (only text),
  • IconTextBottom (icons and text, text is under icons).
  • See Also:
    IconText

    setIconText

    public void setIconText(int it,
                            boolean update)
    Similar to setIconText(IconText it) but allows you to disable or enable updating. If 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.


    iconTextId

    public int iconTextId()
    Returns the current text style for buttons.

    Returns:
    the current text style for buttons.

    setIconSize

    public void setIconSize(int size)
    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

    Parameters:
    size - The size to use
    See Also:
    KIconLoader#

    setIconSize

    public void setIconSize(int size,
                            boolean update)
    Same as setIconText(int size) but allows you to disable the toolbar update.

    Parameters:
    size - The size to use
    update - If true, then the toolbar will be updated after this

    iconSize

    public int iconSize()
    Returns the current icon size for buttons.

    Returns:
    the current icon size for buttons.

    iconSizeDefault

    public int iconSizeDefault()
    Returns the default size for this type of toolbar.

    Returns:
    the default size for this type of toolbar.

    setEnableContextMenu

    public void setEnableContextMenu(boolean enable)
    This allows you to enable or disable the context menu.

    Parameters:
    enable - If false, then the context menu will be disabled

    setEnableContextMenu

    public void setEnableContextMenu()

    contextMenuEnabled

    public boolean contextMenuEnabled()
    Returns the context menu enabled flag

    Returns:
    true if the context menu is disabled

    setItemNoStyle

    public void setItemNoStyle(int id,
                               boolean no_style)
    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.

    Parameters:
    id - The button to exclude from styles
    no_style - If true, then it is excluded (default: true).

    setItemNoStyle

    public void setItemNoStyle(int id)

    setFlat

    public void setFlat(boolean flag)

    count

    public int count()
    Returns the total number of items in the toolbar

    Returns:
    the total number of items in the toolbar

    saveState

    public 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).


    saveSettings

    public void saveSettings(KConfig config,
                             java.lang.String configGroup)
    Save the toolbar settings to group configGroup in config.


    applySettings

    public void applySettings(KConfig config,
                              java.lang.String configGroup,
                              boolean force)
    Read the toolbar settings from group configGroup in config and apply them. Even default settings are re-applied if force is set.


    applySettings

    public void applySettings(KConfig config,
                              java.lang.String configGroup)

    setXMLGUIClient

    public void setXMLGUIClient(KXMLGUIClientInterface client)

    setText

    public void setText(java.lang.String txt)
    Assign a (translated) text to this toolbar. This is used for the tooltip on the handle, and when listing the toolbars.


    text

    public java.lang.String text()
    Returns the toolbar's text.

    Returns:
    the toolbar's text.

    setStretchableWidget

    public void setStretchableWidget(org.kde.qt.QWidget w)
    Overrides:
    setStretchableWidget in class org.kde.qt.QToolBar

    sizePolicy

    public org.kde.qt.QSizePolicy sizePolicy()
    Overrides:
    sizePolicy in class org.kde.qt.QWidget

    highlight

    public boolean highlight()

    sizeHint

    public org.kde.qt.QSize sizeHint()
    Overrides:
    sizeHint in class org.kde.qt.QDockWindow

    minimumSizeHint

    public org.kde.qt.QSize minimumSizeHint()
    Overrides:
    minimumSizeHint in class org.kde.qt.QToolBar

    minimumSize

    public org.kde.qt.QSize minimumSize()
    Overrides:
    minimumSize in class org.kde.qt.QToolBar

    hide

    public void hide()
    Overrides:
    hide in class org.kde.qt.QToolBar

    show

    public void show()
    Overrides:
    show in class org.kde.qt.QToolBar

    updateRects

    public void updateRects(boolean arg1)

    updateRects

    public void updateRects()

    loadState

    public void loadState(org.kde.qt.QDomElement e)
    Load state from an XML element, called by KXMLGUIBuilder


    saveState

    public void saveState(org.kde.qt.QDomElement e)

    positionYourself

    public void positionYourself(boolean force)

    positionYourself

    public void positionYourself()

    setIconText

    public void setIconText(java.lang.String txt)
    Overrides:
    setIconText in class org.kde.qt.QWidget

    highlightSetting

    public static boolean highlightSetting()
    Returns the global setting for "Highlight buttons under mouse"

    Returns:
    global setting for "Highlight buttons under mouse"

    transparentSetting

    public static boolean transparentSetting()
    Returns the global setting for "Toolbars transparent when moving"

    Returns:
    global setting for "Toolbars transparent when moving"

    iconTextSetting

    public static int iconTextSetting()
    Returns the global setting for "Icon Text"

    Returns:
    global setting for "Icon Text"

    mousePressEvent

    protected void mousePressEvent(org.kde.qt.QMouseEvent arg1)
    Overrides:
    mousePressEvent in class org.kde.qt.QWidget

    childEvent

    protected void childEvent(org.kde.qt.QChildEvent e)
    Overrides:
    childEvent in class org.kde.qt.QObject

    showEvent

    public void showEvent(org.kde.qt.QShowEvent e)
    Overrides:
    showEvent in class org.kde.qt.QDockWindow

    resizeEvent

    protected void resizeEvent(org.kde.qt.QResizeEvent e)
    Overrides:
    resizeEvent in class org.kde.qt.QToolBar

    event

    public boolean event(org.kde.qt.QEvent e)
    Overrides:
    event in class org.kde.qt.QToolBar

    applyAppearanceSettings

    protected void applyAppearanceSettings(KConfig config,
                                           java.lang.String _configGroup,
                                           boolean forceGlobal)

    applyAppearanceSettings

    protected void applyAppearanceSettings(KConfig config,
                                           java.lang.String _configGroup)

    settingsGroup

    protected java.lang.String settingsGroup()

    finalize

    protected void finalize()
                     throws java.lang.InternalError
    Deletes the wrapped C++ instance

    Overrides:
    finalize in class org.kde.qt.QToolBar
    Throws:
    java.lang.InternalError

    dispose

    public void dispose()
    Delete the wrapped C++ instance ahead of finalize()

    Overrides:
    dispose in class org.kde.qt.QToolBar

    isDisposed

    public boolean isDisposed()
    Has the wrapped C++ instance been deleted?

    Overrides:
    isDisposed in class org.kde.qt.QToolBar