|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kde.qt.Qt
org.kde.qt.QObject
org.kde.qt.QWidget
org.kde.qt.QMainWindow
org.kde.koala.KMainWindow
public class KMainWindow
Top level widget that provides toolbars, a status line and a frame. It should be used as a top level (parent-less) widget. It manages the geometry for all its children, including your main widget. Normally, you will inherit from KMainWindow, then construct (or use some existing) widget as your main view. You can set only one main view. You can add as many toolbars as you like. There can be only one menubar and only one statusbar. The toolbars, menubar, and statusbar can be created by the KMainWindow and - unlike the old KMainWindow - may, but do not have to, be deleted by you. KMainWindow will handle that internally. Height and width can be operated independently from each other. Simply define the minimum/maximum height/width of your main widget and KMainWindow will take this into account. For fixed size windows set your main widget to a fixed size. Fixed aspect ratios (heightForWidth()) and fixed width widgets are not supported. KMainWindow will set icon, mini icon and caption, which it gets from KApplication. It provides full session management, and will save its position, geometry and positions of toolbars and menubar on logout. If you want to save additional data, reimplement saveProperties() and (to read them again on next login) readProperties(). To save special data about your data, reimplement saveGlobalProperties(). To warn user that application or windows have unsaved data on close or logout, reimplement queryClose() and/or queryExit(). There are also kRestoreMainWindows convenience functions which can restore all your windows on next login. Note that a KMainWindow per-default is created with the WDestructiveClose flag, i.e. it is automatically destroyed when the window is closed. If you do not want this behavior, specify 0 as widget flag in the constructor.
KApplication
Field Summary | |
---|---|
static int |
Create
|
static int |
Keys
|
static int |
NoDCOPObject
Flags that can be passed in an argument to the constructor to change the behavior. |
static int |
Save
|
static int |
StatusBar
|
static int |
ToolBar
|
Fields inherited from class org.kde.qt.QMainWindow |
---|
AllDockWindows, NoToolBars, OnlyToolBars |
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, Bottom, 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, Left, 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, Right, RightArrow, RightButton, RoundCap, RoundJoin, SetROP, SHIFT, ShiftButton, ShowPrefix, SingleLine, SizeAllCursor, SizeBDiagCursor, SizeFDiagCursor, SizeHorCursor, SizeVerCursor, SolidLine, SolidPattern, SplitHCursor, SplitVCursor, SquareCap, StrikeOut, TextDate, ThresholdAlphaDither, ThresholdDither, Top, TopLeft, TopRight, TornOff, TransparentMode, TwipsUnit, UI_AnimateCombo, UI_AnimateMenu, UI_AnimateToolBox, UI_AnimateTooltip, UI_FadeMenu, UI_FadeTooltip, UI_General, Underline, UNICODE_ACCEL, Unmanaged, 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 | |
---|---|
|
KMainWindow()
|
protected |
KMainWindow(java.lang.Class dummy)
|
|
KMainWindow(int cflags)
|
|
KMainWindow(int cflags,
org.kde.qt.QWidget parent)
|
|
KMainWindow(int cflags,
org.kde.qt.QWidget parent,
java.lang.String name)
|
|
KMainWindow(int cflags,
org.kde.qt.QWidget parent,
java.lang.String name,
int f)
Overloaded constructor which allows passing some KMainWindow.CreationFlags. |
|
KMainWindow(org.kde.qt.QWidget parent)
|
|
KMainWindow(org.kde.qt.QWidget parent,
java.lang.String name)
|
|
KMainWindow(org.kde.qt.QWidget parent,
java.lang.String name,
int f)
Construct a main window. |
Method Summary | |
---|---|
KAccel |
accel()
|
KAction |
action(org.kde.qt.QDomElement element)
Retrieves an action for a given QDomElement. |
KAction |
action(java.lang.String name)
Retrieves an action of the client by name. |
KActionCollection |
actionCollection()
Retrieves the entire action collection for the GUI client. |
void |
addStateActionDisabled(java.lang.String state,
java.lang.String action)
|
void |
addStateActionEnabled(java.lang.String state,
java.lang.String action)
|
void |
appHelpActivated()
Open the help page for the application. |
void |
applyMainWindowSettings(KConfig config)
|
void |
applyMainWindowSettings(KConfig config,
java.lang.String groupName)
|
void |
applyMainWindowSettings(KConfig config,
java.lang.String groupName,
boolean force)
Read settings for statusbar, menubar and toolbar from their respective groups in the config file and apply them. |
java.lang.String |
autoSaveGroup()
|
boolean |
autoSaveSettings()
|
void |
beginXMLPlug(org.kde.qt.QWidget arg1)
|
KXMLGUIClientInterface |
builderClient()
|
KInstanceInterface |
builderInstance()
|
static boolean |
canBeRestored(int number)
Session Management Try to restore the toplevel widget as defined by the number (1..X). |
protected void |
childEvent(org.kde.qt.QChildEvent e)
|
java.lang.String |
className()
|
static java.lang.String |
classNameOfToplevel(int number)
Returns the className() of the number of the toplevel window which
should be restored. |
KXMLGUIBuilderInterface |
clientBuilder()
Retrieves the client's GUI builder or null if no client specific builder has been assigned via setClientBuilder() |
protected void |
closeEvent(org.kde.qt.QCloseEvent arg1)
Reimplemented to call the queryClose() and queryExit() handlers. |
int |
configureToolbars()
Show a standard configure toolbar dialog. |
protected void |
conserveMemory()
This function will attempt to give up some memory after the GUI is built. |
java.util.ArrayList |
containerTags()
|
org.kde.qt.QWidget |
createContainer(org.kde.qt.QWidget parent,
int index,
org.kde.qt.QDomElement element,
int[] id)
Creates a container (menubar/menu/toolbar/statusbar/separator/...) from an element in the XML file |
int |
createCustomElement(org.kde.qt.QWidget parent,
int index,
org.kde.qt.QDomElement element)
|
void |
createGUI()
|
void |
createGUI(java.lang.String xmlfile)
|
void |
createGUI(java.lang.String xmlfile,
boolean _conserveMemory)
Create a GUI given a local XML file. |
void |
createStandardStatusBarAction()
Sets whether KMainWindow should provide a menu that allows showing/hiding of the statusbar ( using KToggleStatusBarAction ). |
KPopupMenu |
customHelpMenu()
|
KPopupMenu |
customHelpMenu(boolean showWhatsThis)
Returns the help menu. |
java.util.ArrayList |
customTags()
|
void |
dispose()
Delete the wrapped C++ instance ahead of finalize() |
org.kde.qt.QDomDocument |
domDocument()
|
void |
endXMLPlug()
|
KXMLGUIFactory |
factory()
Retrieves a pointer to the KXMLGUIFactory this client is associated with (will return null if the client's GUI has not been built by a KXMLGUIFactory. |
protected void |
finalize()
Deletes the wrapped C++ instance |
void |
finalizeGUI(boolean force)
|
void |
finalizeGUI(KXMLGUIClientInterface client)
|
static java.lang.String |
findMostRecentXMLFile(java.lang.String[] files,
java.lang.StringBuffer doc)
|
KXMLGUIFactory |
guiFactory()
|
boolean |
hasMenuBar()
Returns true, if there is a menubar |
KPopupMenu |
helpMenu()
|
KPopupMenu |
helpMenu(java.lang.String aboutAppText)
|
KPopupMenu |
helpMenu(java.lang.String aboutAppText,
boolean showWhatsThis)
Retrieve the standard help menu. |
void |
hide()
Reimplementation of QMainWindow.hide() |
void |
ignoreInitialGeometry()
Used from Konqueror when reusing the main window. |
boolean |
initialGeometrySet()
|
void |
insertChildClient(KXMLGUIClientInterface child)
Use this method to make a client a child client of another client. |
KInstanceInterface |
instance()
|
boolean |
isDisposed()
Has the wrapped C++ instance been deleted? |
boolean |
isHelpMenuEnabled()
Return true when the help menu is enabled |
boolean |
isStandardToolBarMenuEnabled()
|
KMenuBar |
kmenuBar()
Returns a pointer to the menu bar. |
KStatusBar |
kstatusBar()
Returns a pointer to the status bar. |
java.lang.String |
localXMLFile()
|
java.util.ArrayList |
memberList()
List of members of KMainWindow class. |
org.kde.qt.QMetaObject |
metaObject()
|
protected void |
paintEvent(org.kde.qt.QPaintEvent e)
List of members of KMainWindow class. |
KXMLGUIClientInterface |
parentClient()
KXMLGUIClients can form a simple child/parent object tree. |
protected void |
parseGeometry(boolean parsewidth)
|
void |
prepareXMLUnplug(org.kde.qt.QWidget arg1)
|
protected boolean |
queryClose()
Called before the window is closed, either by the user or indirectly by the session manager. |
protected boolean |
queryExit()
Called before the very last window is closed, either by the user or indirectly by the session manager. |
protected void |
readGlobalProperties(KConfig sessionConfig)
The counterpart of saveGlobalProperties(). |
protected void |
readProperties(KConfig arg1)
Read your instance-specific properties. |
protected boolean |
readPropertiesInternal(KConfig arg1,
int arg2)
|
void |
reloadXML()
Forces this client to re-read its XML resource file. |
void |
removeChildClient(KXMLGUIClientInterface child)
Removes the given child from the client's children list. |
void |
removeContainer(org.kde.qt.QWidget container,
org.kde.qt.QWidget parent,
org.kde.qt.QDomElement element,
int id)
Removes the given (and previously via createContainer ) created container. |
void |
removeCustomElement(org.kde.qt.QWidget parent,
int id)
|
void |
resetAutoSaveSettings()
Disable the auto-save-settings feature. |
protected void |
resizeEvent(org.kde.qt.QResizeEvent e)
|
boolean |
restore(int number)
|
boolean |
restore(int number,
boolean show)
Restore the session specified by number.
Returns false if this
fails, otherwise returns true and shows the window. |
static void |
RESTORE(java.lang.String typeName)
|
protected void |
restoreWindowSize(KConfig config)
For inherited classes Note that the group must be set before calling, and that a -geometry on the command line has priority. |
protected void |
saveAutoSaveSettings()
This slot should only be called in case you reimplement closeEvent() and if you are using the "auto-save" feature. |
protected void |
saveGlobalProperties(KConfig sessionConfig)
Save your application-wide properties. |
void |
saveMainWindowSettings(KConfig config)
|
void |
saveMainWindowSettings(KConfig config,
java.lang.String groupName)
Save settings for statusbar, menubar and toolbar to their respective groups in the config file config. |
protected void |
saveNewToolbarConfig()
Rebuilds the GUI after KEditToolbar changed the toolbar layout. |
protected void |
saveProperties(KConfig arg1)
Save your instance-specific properties. |
protected void |
savePropertiesInternal(KConfig arg1,
int arg2)
|
protected void |
saveWindowSize(KConfig config)
For inherited classes Note that the group must be set before calling |
void |
setAutoSaveSettings()
|
void |
setAutoSaveSettings(java.lang.String groupName)
|
void |
setAutoSaveSettings(java.lang.String groupName,
boolean saveWindowSize)
Call this to enable "auto-save" of toolbar/menubar/statusbar settings (and optionally window size). |
void |
setBuilderClient(KXMLGUIClientInterface client)
|
void |
setBuilderInstance(KInstanceInterface instance)
|
void |
setCaption(java.lang.String caption)
Makes a KDE compliant caption. |
void |
setCaption(java.lang.String caption,
boolean modified)
Makes a KDE compliant caption. |
void |
setClientBuilder(KXMLGUIBuilderInterface builder)
A client can have an own KXMLGUIBuilder. |
protected void |
setDOMDocument(org.kde.qt.QDomDocument document)
|
protected void |
setDOMDocument(org.kde.qt.QDomDocument document,
boolean merge)
Sets the Document for the part, describing the layout of the GUI. |
void |
setFactory(KXMLGUIFactory factory)
This method is called by the KXMLGUIFactory as soon as the client is added to the KXMLGUIFactory's GUI. |
void |
setFrameBorderWidth(int arg1)
|
void |
setHelpMenuEnabled()
|
void |
setHelpMenuEnabled(boolean showHelpMenu)
Enables the build of a standard help menu when calling createGUI(). |
void |
setIcon(org.kde.qt.QPixmap arg1)
|
protected void |
setInstance(KInstanceInterface instance)
Sets the instance ( KInstance) for this part. |
protected void |
setLocalXMLFile(java.lang.String file)
|
void |
setPlainCaption(java.lang.String caption)
Make a plain caption without any modifications. |
void |
setSettingsDirty()
Tell the main window that it should save its settings when being closed. |
void |
setStandardToolBarMenuEnabled(boolean enable)
Sets whether KMainWindow should provide a menu that allows showing/hiding the available toolbars ( using KToggleToolBarAction ) . |
protected boolean |
settingsDirty()
For inherited classes |
protected java.lang.String |
settingsGroup()
For inherited classes |
void |
setupGUI()
|
void |
setupGUI(int options)
|
void |
setupGUI(int options,
java.lang.String xmlfile)
Configures the current windows and its actions in the typical KDE fashion. |
void |
setupGUI(org.kde.qt.QSize defaultSize)
|
void |
setupGUI(org.kde.qt.QSize defaultSize,
int options)
|
void |
setupGUI(org.kde.qt.QSize defaultSize,
int options,
java.lang.String xmlfile)
Configures the current windows and its actions in the typical KDE fashion. |
void |
setupToolbarMenuActions()
|
protected void |
setXML(java.lang.String document)
|
protected void |
setXML(java.lang.String document,
boolean merge)
Sets the XML for the part. |
protected void |
setXMLFile(java.lang.String file)
|
protected void |
setXMLFile(java.lang.String file,
boolean merge)
|
protected void |
setXMLFile(java.lang.String file,
boolean merge,
boolean setXMLDoc)
Sets the name of the rc file containing the XML for the part. |
void |
setXMLGUIBuildDocument(org.kde.qt.QDomDocument doc)
|
void |
show()
Reimplementation of QMainWindow.show() |
protected void |
showAboutApplication()
This slot does nothing. |
void |
slotStateChanged(java.lang.String newstate)
Apply a state change Enable and disable actions as defined in the XML rc file |
void |
slotStateChanged(java.lang.String newstate,
int arg2)
Apply a state change Enable and disable actions as defined in the XML rc file, can "reverse" the state (disable the actions which should be enabled, and vice-versa) if specified. |
protected void |
stateChanged(java.lang.String newstate)
|
protected void |
stateChanged(java.lang.String newstate,
int reverse)
Actions can collectively be assigned a "State". |
KToolBar |
toolBar()
|
KToolBar |
toolBar(java.lang.String name)
Returns a pointer to the toolbar with the specified name. |
KAction |
toolBarMenuAction()
Returns a pointer to the mainwindows action responsible for the toolbars menu |
void |
unplugActionList(java.lang.String name)
The complement of plugActionList() ... |
org.kde.qt.QWidget |
widget()
|
java.lang.String |
xmlFile()
This will return the name of the XML file as set by setXMLFile(). |
org.kde.qt.QDomDocument |
xmlguiBuildDocument()
|
Methods inherited from class org.kde.qt.QMainWindow |
---|
addDockWindow, addDockWindow, addDockWindow, addDockWindow, addDockWindow, addDockWindow, addToolBar, addToolBar, addToolBar, addToolBar, addToolBar, addToolBar, appropriate, bottomDock, centralWidget, createDockWindowMenu, createDockWindowMenu, customize, dockingArea, dockWindowsMovable, event, eventFilter, getLocation, hasDockWindow, isCustomizable, isDockEnabled, isDockEnabled, isDockEnabled, isDockEnabled, isDockMenuEnabled, leftDock, lineUpDockWindows, lineUpDockWindows, lineUpToolBars, lineUpToolBars, menuAboutToShow, menuBar, minimumSizeHint, moveDockWindow, moveDockWindow, moveDockWindow, moveDockWindow, moveToolBar, moveToolBar, moveToolBar, moveToolBar, opaqueMoving, removeDockWindow, removeToolBar, rightDock, rightJustification, setAppropriate, setCentralWidget, setDockEnabled, setDockEnabled, setDockMenuEnabled, setDockWindowsMovable, setOpaqueMoving, setRightJustification, setToolBarsMovable, setUpLayout, setUsesBigPixmaps, setUsesTextLabel, showDockMenu, sizeHint, statusBar, styleChange, toolBarsMovable, toolTipGroup, topDock, tr, tr, usesBigPixmaps, usesTextLabel, whatsThis |
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, colorGroup, constPolish, contextMenuEvent, 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, hideEvent, 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, minimumSize, minimumWidth, mouseDoubleClickEvent, mouseGrabber, mouseMoveEvent, mousePressEvent, 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, setIconText, setInputMethodEnabled, setKeyCompression, setMask, setMask, setMaximumHeight, setMaximumSize, setMaximumSize, setMaximumWidth, setMicroFocusHint, setMicroFocusHint, setMicroFocusHint, setMinimumHeight, setMinimumSize, setMinimumSize, setMinimumWidth, setMouseTracking, setName, setPalette, setPalette, setPaletteBackgroundColor, setPaletteBackgroundPixmap, setPaletteForegroundColor, setResolution, setShown, setSizeIncrement, setSizeIncrement, setSizePolicy, setSizePolicy, setSizePolicy, setStyle, setStyle, setTabOrder, setUpdatesEnabled, setWFlags, setWindowOpacity, setWindowState, setWState, showEvent, showFullScreen, showMaximized, showMinimized, showNormal, size, sizeIncrement, sizePolicy, 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 |
---|
public static final int NoDCOPObject
public static final int ToolBar
setupGUI(int, java.lang.String)
,
Constant Field Valuespublic static final int Keys
public static final int StatusBar
public static final int Save
public static final int Create
Constructor Detail |
---|
protected KMainWindow(java.lang.Class dummy)
public KMainWindow(org.kde.qt.QWidget parent, java.lang.String name, int f)
parent
- The widget parent. This is usually 0 but it may also be the window
group leader. In that case, the KMainWindow becomes sort of a
secondary window.name
- The object name. For session management and window management to work
properly, all main windows in the application should have a
different name. When passing 0 (the default), KMainWindow will create
a unique name, but it's recommended to explicitly pass a window name that will
also describe the type of the window. If there can be several windows of the same
type, append '#' (hash) to the name, and KMainWindow will append numbers to make
the names unique. For example, for a mail client which has one main window showing
the mails and folders, and which can also have one or more windows for composing
mails, the name for the folders window should be e.g. "mainwindow" and
for the composer windows "composer#".f
- Specify the widget flags. The default is
WType_TopLevel and WDestructiveClose. TopLevel indicates that a
main window is a toplevel window, regardless of whether it has a
parent or not. DestructiveClose indicates that a main window is
automatically destroyed when its window is closed. Pass 0 if
you do not want this behavior.
KMainWindows must be created on the heap with 'new', like:
KMainWindow kmw = new KMainWindow (...);
#http://doc#trolltech#com/3#2/qt#html#WidgetFlags-enum
public KMainWindow(org.kde.qt.QWidget parent, java.lang.String name)
public KMainWindow(org.kde.qt.QWidget parent)
public KMainWindow()
public KMainWindow(int cflags, org.kde.qt.QWidget parent, java.lang.String name, int f)
public KMainWindow(int cflags, org.kde.qt.QWidget parent, java.lang.String name)
public KMainWindow(int cflags, org.kde.qt.QWidget parent)
public KMainWindow(int cflags)
Method Detail |
---|
public org.kde.qt.QMetaObject metaObject()
metaObject
in class org.kde.qt.QMainWindow
public java.lang.String className()
className
in class org.kde.qt.QMainWindow
public KPopupMenu helpMenu(java.lang.String aboutAppText, boolean showWhatsThis)
KPopupMenu help = helpMenu(); menuBar().insertItem( i18n("&Help"), help );
aboutAppText
- The string that is used in the application
specific dialog box. If you leave this string empty the
information in the global KAboutData of the
application will be used to make a standard dialog box.showWhatsThis
- Set this to false if you do not want to include
the "What's This" menu entry.
public KPopupMenu helpMenu(java.lang.String aboutAppText)
public KPopupMenu helpMenu()
public KPopupMenu customHelpMenu(boolean showWhatsThis)
menuBar().insertItem( i18n("&Help"), customHelpMenu() );
showWhatsThis
- Set this to false
if you do not want to include
the "What's This" menu entry.
public KPopupMenu customHelpMenu()
public void show()
show
in class org.kde.qt.QMainWindow
public void hide()
hide
in class org.kde.qt.QMainWindow
public boolean restore(int number, boolean show)
number.
Returns false
if this
fails, otherwise returns true
and shows the window.
You should call canBeRestored() first.
If show
is true (default), this widget will be shown automatically.
public boolean restore(int number)
public KXMLGUIFactory guiFactory()
public void createGUI(java.lang.String xmlfile, boolean _conserveMemory)
xmlfile
is NULL,
then it will try to construct a local XML filename like
appnameui.rc where 'appname' is your app's name. If that file
does not exist, then the XML UI code will only use the global
(standard) XML file for the layout purposes.
Note that when passing true for the conserveMemory argument subsequent
calls to guiFactory().addClient/removeClient may not work as expected.
Also retrieving references to containers like popup menus or toolbars using
the container method will not work.
xmlfile
- The local xmlfile (relative or absolute)_conserveMemory
- Specify whether createGUI() should call
KXMLGUIClient.conserveMemory() to free all memory
allocated by the QDomDocument and by the KXMLGUIFactory.public void createGUI(java.lang.String xmlfile)
public void createGUI()
public void setHelpMenuEnabled(boolean showHelpMenu)
public void setHelpMenuEnabled()
public boolean isHelpMenuEnabled()
true
when the help menu is enabled
public boolean hasMenuBar()
public KMenuBar kmenuBar()
public KStatusBar kstatusBar()
KActionCollection
public KToolBar toolBar(java.lang.String name)
name
- The internal name of the toolbar. If no name is
specified "mainToolBar" is assumed.
public KToolBar toolBar()
public KAccel accel()
public void setFrameBorderWidth(int arg1)
public void setAutoSaveSettings(java.lang.String groupName, boolean saveWindowSize)
groupName
- a name that identifies this "type of window".
You can have several types of window in the same application.saveWindowSize
- set it to true to include the window size
when saving.
Typically, you will call setAutoSaveSettings() in your
KMainWindow-inherited class constructor, and it will take care
of restoring and saving automatically. Make sure you call this
_after all_ your bars have been created.
To make sure that KMainWindow propertly obtains the default
size of the window you should do the following:
- Remove hard coded resize() calls in the constructor or main, they
should be removed in favor of letting the automatic resizing
determine the default window size. Hard coded window sizes will
be wrong for users that have big fonts, use different styles,
long/small translations, large toolbars, and other factors.
- Put the setAutoSaveSettings ( or setupGUI() ) call after all widgets
have been created and placed inside the main window (i.e. for 99% of
apps setCentralWidget())
- Widgets that inherit from QWidget (like game boards) should overload
"QSize sizeHint() const;" to specify a default size rather
than letting QWidget.adjust use the default size of 0x0.public void setAutoSaveSettings(java.lang.String groupName)
public void setAutoSaveSettings()
public void resetAutoSaveSettings()
public boolean autoSaveSettings()
public java.lang.String autoSaveGroup()
public void applyMainWindowSettings(KConfig config, java.lang.String groupName, boolean force)
config
- Config file to read the settings from.groupName
- Group name to use. If not specified, the last used
group name is used.force
- if set, even default settings are re-appliedpublic void applyMainWindowSettings(KConfig config, java.lang.String groupName)
public void applyMainWindowSettings(KConfig config)
public void saveMainWindowSettings(KConfig config, java.lang.String groupName)
config.
config
- Config file to save the settings to.groupName
- Group name to use. If not specified, the last used
group name is usedpublic void saveMainWindowSettings(KConfig config)
public void setStandardToolBarMenuEnabled(boolean enable)
public boolean isStandardToolBarMenuEnabled()
public void createStandardStatusBarAction()
public void setupGUI(int options, java.lang.String xmlfile)
StandardWindowOptions
public void setupGUI(int options)
public void setupGUI()
public void setupGUI(org.kde.qt.QSize defaultSize, int options, java.lang.String xmlfile)
defaultSize
The default size of the window
Typically this function replaces createGUI().
StandardWindowOptions
public void setupGUI(org.kde.qt.QSize defaultSize, int options)
public void setupGUI(org.kde.qt.QSize defaultSize)
public KAction toolBarMenuAction()
public void setupToolbarMenuActions()
public void finalizeGUI(KXMLGUIClientInterface client)
finalizeGUI
in interface KXMLGUIBuilderInterface
public void finalizeGUI(boolean force)
public boolean initialGeometrySet()
public void ignoreInitialGeometry()
public void setIcon(org.kde.qt.QPixmap arg1)
setIcon
in class org.kde.qt.QWidget
public int configureToolbars()
KStdAction.configureToolbars( guiFactory(), SLOT("configureToolbars()"), actionCollection() );
public void setCaption(java.lang.String caption)
setCaption
in class org.kde.qt.QWidget
caption
- Your caption. Do not include the application name
in this string. It will be added automatically according to the KDE
standard.public void setCaption(java.lang.String caption, boolean modified)
caption
- Your caption. Do not include the application name
in this string. It will be added automatically according to the KDE
standard.modified
- Specify whether the document is modified. This displays
an additional sign in the title bar, usually "**".public void setPlainCaption(java.lang.String caption)
caption
- Your caption. This is the string that will be
displayed in the window title.public void appHelpActivated()
KIconLoader &loader = KGlobal.iconLoader(); QPixmap pixmap = loader.loadIcon( "help" ); toolBar(0).insertButton( pixmap, 0, SIGNAL("clicked()"), this, SLOT("appHelpActivated()"), true, i18n("Help") );
public void slotStateChanged(java.lang.String newstate)
public void slotStateChanged(java.lang.String newstate, int arg2)
public void setSettingsDirty()
public static boolean canBeRestored(int number)
false
returned.
That means clients could simply do the following:
if (kapp.isRestored()){ int n = 1; while (KMainWindow.canBeRestored(n)){ (new childMW).restore(n); n++; } } else { // create default application as usual }Note that QWidget.show() is called implicitly in restore. With this you can easily restore all toplevel windows of your application. If your application uses different kinds of toplevel windows, then you can use KMainWindow.classNameOfToplevel(n) to determine the exact type before calling the childMW constructor in the example from above. If your client has only one kind of toplevel widgets (which should be pretty usual) then you should use the RESTORE-macro for backwards compatibility with 3.1 and 3.0 branches:
if (kapp.isRestored()) RESTORE(childMW) else { // create default application as usual }The macro expands to the term above but is easier to use and less code to write. For new code or if you have more than one kind of toplevel widget (each derived from KMainWindow, of course), you can use the templated kRestoreMainWindows global functions:
if (kapp.isRestored()) kRestoreMainWindows< childMW1, childMW2, childMW3 >(); else { // create default application as usual }Currently, these functions are provided for up to three template arguments. If you need more, tell us. To help you in deciding whether or not you can use kRestoreMainWindows, a define KDE_RESTORE_MAIN_WINDOWS_NUM_TEMPLATE_ARGS is provided.
restore(int, boolean)
,
classNameOfToplevel(int)
public static java.lang.String classNameOfToplevel(int number)
number
of the toplevel window which
should be restored.
This is only useful if your application uses
different kinds of toplevel windows.
protected void paintEvent(org.kde.qt.QPaintEvent e)
paintEvent
in class org.kde.qt.QMainWindow
protected void childEvent(org.kde.qt.QChildEvent e)
childEvent
in class org.kde.qt.QMainWindow
protected void resizeEvent(org.kde.qt.QResizeEvent e)
resizeEvent
in class org.kde.qt.QWidget
protected void closeEvent(org.kde.qt.QCloseEvent arg1)
closeEvent
in class org.kde.qt.QWidget
protected boolean queryExit()
true.
Returning false
will
cancel the exiting. In the latter case, the last window will
remain visible. If KApplication.sessionSaving() is true, refusing
the exit will also cancel KDE logout.
queryClose()
,
KApplication.sessionSaving()
protected boolean queryClose()
false
will cancel
the closing, and, if KApplication.sessionSaving() is true, it will also
cancel KDE logout.
Reimplement this function to prevent the user from losing data.
Example:
switch ( KMessageBox.warningYesNoCancel( this, i18n("Save changes to document foo?")) ) { case KMessageBox.Yes : // save document here. If saving fails, return false; return true; case KMessageBox.No : return true; default: // cancel return false;Note that you should probably not actually close the document from within this method, as it may be called by the session manager before the session is saved. If the document is closed before the session save occurs, its location might not be properly saved. In addition, the session shutdown may be canceled, in which case the document should remain open.
queryExit()
,
KApplication.sessionSaving()
protected void saveProperties(KConfig arg1)
kconfig
object, since
KMainWindow uses one group for each window. Please
reimplement these function in childclasses.
Note: No user interaction is allowed
in this function!
protected void readProperties(KConfig arg1)
protected void saveGlobalProperties(KConfig sessionConfig)
protected void readGlobalProperties(KConfig sessionConfig)
protected void savePropertiesInternal(KConfig arg1, int arg2)
protected boolean readPropertiesInternal(KConfig arg1, int arg2)
protected boolean settingsDirty()
protected java.lang.String settingsGroup()
protected void saveWindowSize(KConfig config)
protected void restoreWindowSize(KConfig config)
protected void parseGeometry(boolean parsewidth)
protected void saveNewToolbarConfig()
configureToolbars()
protected void showAboutApplication()
void MyMainLevel.setupInterface() { .. menuBar().insertItem( i18n("&Help"), customHelpMenu() ); .. } void MyMainLevel.showAboutApplication() {}
protected void saveAutoSaveSettings()
void MyMainWindow.closeEvent( QCloseEvent e ) { // Save settings if auto-save is enabled, and settings have changed if ( settingsDirty() && autoSaveSettings() ) saveAutoSaveSettings(); .. }
setAutoSaveSettings(java.lang.String, boolean)
,
setSettingsDirty()
protected void finalize() throws java.lang.InternalError
finalize
in class org.kde.qt.QMainWindow
java.lang.InternalError
public void dispose()
dispose
in class org.kde.qt.QMainWindow
public boolean isDisposed()
isDisposed
in class org.kde.qt.QMainWindow
public KXMLGUIClientInterface builderClient()
builderClient
in interface KXMLGUIBuilderInterface
public void setBuilderClient(KXMLGUIClientInterface client)
setBuilderClient
in interface KXMLGUIBuilderInterface
public KInstanceInterface builderInstance()
builderInstance
in interface KXMLGUIBuilderInterface
public void setBuilderInstance(KInstanceInterface instance)
setBuilderInstance
in interface KXMLGUIBuilderInterface
public org.kde.qt.QWidget widget()
widget
in interface KXMLGUIBuilderInterface
public java.util.ArrayList containerTags()
containerTags
in interface KXMLGUIBuilderInterface
public org.kde.qt.QWidget createContainer(org.kde.qt.QWidget parent, int index, org.kde.qt.QDomElement element, int[] id)
createContainer
in interface KXMLGUIBuilderInterface
parent
- The parent for the containerindex
- The index where the container should be inserted
into the parent container/widgetelement
- The element from the DOM tree describing the
container (use it to access container specified
attributes or child elements)id
- The id to be used for this containerpublic void removeContainer(org.kde.qt.QWidget container, org.kde.qt.QWidget parent, org.kde.qt.QDomElement element, int id)
removeContainer
in interface KXMLGUIBuilderInterface
public java.util.ArrayList customTags()
customTags
in interface KXMLGUIBuilderInterface
public int createCustomElement(org.kde.qt.QWidget parent, int index, org.kde.qt.QDomElement element)
createCustomElement
in interface KXMLGUIBuilderInterface
public void removeCustomElement(org.kde.qt.QWidget parent, int id)
removeCustomElement
in interface KXMLGUIBuilderInterface
public KAction action(java.lang.String name)
action
in interface KXMLGUIClientInterface
public KAction action(org.kde.qt.QDomElement element)
action
in interface KXMLGUIClientInterface
public KActionCollection actionCollection()
actionCollection
in interface KXMLGUIClientInterface
KActionCollection#setWidget(
,
org.kde.qt.QWidget*
public KInstanceInterface instance()
instance
in interface KXMLGUIClientInterface
public org.kde.qt.QDomDocument domDocument()
domDocument
in interface KXMLGUIClientInterface
public java.lang.String xmlFile()
xmlFile
in interface KXMLGUIClientInterface
public java.lang.String localXMLFile()
localXMLFile
in interface KXMLGUIClientInterface
public void setXMLGUIBuildDocument(org.kde.qt.QDomDocument doc)
setXMLGUIBuildDocument
in interface KXMLGUIClientInterface
public org.kde.qt.QDomDocument xmlguiBuildDocument()
xmlguiBuildDocument
in interface KXMLGUIClientInterface
public void setFactory(KXMLGUIFactory factory)
setFactory
in interface KXMLGUIClientInterface
public KXMLGUIFactory factory()
factory
in interface KXMLGUIClientInterface
public KXMLGUIClientInterface parentClient()
parentClient
in interface KXMLGUIClientInterface
public void insertChildClient(KXMLGUIClientInterface child)
insertChildClient
in interface KXMLGUIClientInterface
public void removeChildClient(KXMLGUIClientInterface child)
child
from the client's children list.
removeChildClient
in interface KXMLGUIClientInterface
public void setClientBuilder(KXMLGUIBuilderInterface builder)
setClientBuilder
in interface KXMLGUIClientInterface
public KXMLGUIBuilderInterface clientBuilder()
clientBuilder
in interface KXMLGUIClientInterface
public void reloadXML()
reloadXML
in interface KXMLGUIClientInterface
public void unplugActionList(java.lang.String name)
unplugActionList
in interface KXMLGUIClientInterface
public void addStateActionEnabled(java.lang.String state, java.lang.String action)
addStateActionEnabled
in interface KXMLGUIClientInterface
public void addStateActionDisabled(java.lang.String state, java.lang.String action)
addStateActionDisabled
in interface KXMLGUIClientInterface
public void beginXMLPlug(org.kde.qt.QWidget arg1)
beginXMLPlug
in interface KXMLGUIClientInterface
public void endXMLPlug()
endXMLPlug
in interface KXMLGUIClientInterface
public void prepareXMLUnplug(org.kde.qt.QWidget arg1)
prepareXMLUnplug
in interface KXMLGUIClientInterface
public static java.lang.String findMostRecentXMLFile(java.lang.String[] files, java.lang.StringBuffer doc)
protected void setInstance(KInstanceInterface instance)
protected void setXMLFile(java.lang.String file, boolean merge, boolean setXMLDoc)
file
- Either an absolute path for the file, or simply the
filename, which will then be assumed to be installed
in the "data" resource, under a directory named like
the instance.merge
- Whether to merge with the global document.setXMLDoc
- Specify whether to call setXML. Default is true.
and the DOM document at once.protected void setXMLFile(java.lang.String file, boolean merge)
protected void setXMLFile(java.lang.String file)
protected void setLocalXMLFile(java.lang.String file)
protected void setXML(java.lang.String document, boolean merge)
protected void setXML(java.lang.String document)
protected void setDOMDocument(org.kde.qt.QDomDocument document, boolean merge)
protected void setDOMDocument(org.kde.qt.QDomDocument document)
protected void conserveMemory()
protected void stateChanged(java.lang.String newstate, int reverse)
newstate
- Name of a State in the XMLfile.reverse
- If the flag reverse is set to StateReverse, the State is reversed.
(actions to be enabled will be disabled and action to be disabled will be enabled)
Default is reverse=false.protected void stateChanged(java.lang.String newstate)
public java.util.ArrayList memberList()
public static void RESTORE(java.lang.String typeName)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |