org.kde.koala
Class KApplication

java.lang.Object
  extended by org.kde.qt.Qt
      extended by org.kde.qt.QObject
          extended by org.kde.qt.QApplication
              extended by org.kde.koala.KApplication
All Implemented Interfaces:
KInstanceInterface, org.kde.qt.QtSupport
Direct Known Subclasses:
KUniqueApplication

public class KApplication
extends org.kde.qt.QApplication
implements KInstanceInterface

Controls and provides information to all KDE applications. Only one object of this class can be instantiated in a single app. This instance is always accessible via the 'kapp' global variable. See cut() for an example. This class provides the following services to all KDE applications.

  • It controls the event queue (see QApplication ).
  • It provides the application with KDE resources such as accelerators, common menu entries, a KConfig object. session management events, help invocation etc.
  • Installs a signal handler for the SIGCHLD signal in order to avoid zombie children. If you want to catch this signal yourself or don't want it to be caught at all, you have set a new signal handler (or SIG_IGN) after KApplication's constructor has run.
  • Installs an empty signal handler for the SIGPIPE signal using installSigpipeHandler(). If you want to catch this signal yourself, you have set a new signal handler after KApplication's constructor has run.
  • It can start new services
  • The way a service gets started depends on the 'X-DCOP-ServiceType' entry in the desktop file of the service: There are three possibilities:
  • X-DCOP-ServiceType=None (default) Always start a new service, don't wait till the service registers with dcop.
  • X-DCOP-ServiceType=Multi Always start a new service, wait until the service has registered with dcop.
  • X-DCOP-ServiceType=Unique Only start the service if it isn't already running, wait until the service has registered with dcop.
  • See KApplicationSignals for signals emitted by KApplication

    Author:
    Matthias Kalle Dalheimer

    Field Summary
    static int Button1Pressed
              Deprecated. Same values as Button1Mask etc. in X.h @short @deprecated Same values as Button1Mask etc.
    static int Button2Pressed
               
    static int Button3Pressed
               
    static int Button4Pressed
               
    static int Button5Pressed
               
    static int CaptionAppFirst
               
    static int CaptionAppLast
              Position of the caption (presumably in the application window's title bar).
    static int CaptionNoApp
               
    static int ControlModifier
               
    static int LockModifier
               
    static int Modifier1
               
    static int Modifier2
               
    static int Modifier3
               
    static int Modifier4
               
    static int Modifier5
               
    static int SETTINGS_COMPLETION
               
    static int SETTINGS_MOUSE
              Valid values for the settingsChanged signal
    static int SETTINGS_PATHS
               
    static int SETTINGS_POPUPMENU
               
    static int SETTINGS_QT
               
    static int SETTINGS_SHORTCUTS
               
    static int ShiftModifier
               
    static int ShutdownConfirmDefault
              The possible values for the confirm parameter of requestShutDown().
    static int ShutdownConfirmNo
               
    static int ShutdownConfirmYes
               
    static int ShutdownModeDefault
              The possible values for the sdmode parameter of requestShutDown().
    static int ShutdownModeForceNow
               
    static int ShutdownModeInteractive
               
    static int ShutdownModeSchedule
               
    static int ShutdownModeTryNow
               
    static int ShutdownTypeDefault
              The possible values for the sdtype parameter of requestShutDown().
    static int ShutdownTypeHalt
               
    static int ShutdownTypeNone
               
    static int ShutdownTypeReboot
               
     
    Fields inherited from class org.kde.qt.QApplication
    CustomColor, CustomColors, DefaultCodec, GuiClient, GuiServer, ManyColor, NormalColor, NormalColors, Tty, UnicodeUTF8
     
    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
      KApplication()
               
      KApplication(boolean allowStyles)
               
      KApplication(boolean allowStyles, boolean GUIenabled)
              This constructor takes aboutData and command line arguments from KCmdLineArgs.
      KApplication(boolean allowStyles, boolean GUIenabled, KInstanceInterface _instance)
               
    protected KApplication(java.lang.Class dummy)
               
     
    Method Summary
     KAboutData aboutData()
              Returns the about data of this instance Warning, can be null
    static void addCmdLineOptions()
              Add Qt and KDE command line options to KCmdLineArgs.
     void addKipcEventMask(int id)
              Adds a message type to the KIPC event mask.
     void allowURLAction(java.lang.String action, KURL _baseURL, KURL _destURL)
              Allow a certain URL action.
     boolean authorize(java.lang.String genericAction)
              Returns whether a certain action is authorized
     boolean authorizeControlModule(java.lang.String menuId)
              Returns whether access to a certain control module is authorized.
     java.util.ArrayList authorizeControlModules(java.lang.String[] menuIds)
              Returns whether access to a certain control modules is authorized.
     boolean authorizeKAction(java.lang.String action)
              Returns whether a certain KAction is authorized.
     boolean authorizeURLAction(java.lang.String action, KURL baseURL, KURL destURL)
              Returns whether a certain URL related action is authorized.
     java.lang.String caption()
              Returns a text for the window caption.
     java.lang.String checkRecoverFile(java.lang.String pFilename, boolean bRecover)
              Check whether an auto-save file exists for the document you want to open.
     java.lang.String className()
               
     void clear()
              If the widget with focus provides a clear() slot, call that slot.
     void commitData(org.kde.qt.QSessionManager sm)
              Reimplemented for internal purposes, mainly the highlevel handling of session management with KSessionManaged.
     KConfig config()
              Returns the general config object ("appnamerc").
     void copy()
              If the widget with focus provides a copy() slot, call that slot.
    static org.kde.qt.QPalette createApplicationPalette()
              Used to obtain the QPalette that will be used to set the application palette.
    static org.kde.qt.QPalette createApplicationPalette(KConfig config, int contrast)
              Raw access for use by KDM.
     void cut()
              If the widget with focus provides a cut() slot, call that slot.
    static DCOPClient dcopClient()
              Returns a pointer to a DCOPClient for the application.
     void deref()
              Tells KApplication that one operation such as those described in ref() just finished.
     KStandardDirs dirs()
              Returns the application standard dirs object.
    static void disableAutoDcopRegistration()
              Disable automatic dcop registration Must be called before creating a KApplication instance to have an effect.
     void disableSessionManagement()
              Disables session management for this application.
     void disableStyles()
              Disables style plugins.
     void dispose()
              Delete the wrapped C++ instance ahead of finalize()
     void enableSessionManagement()
              Enables again session management for this application, formerly disabled by calling disableSessionManagement().
     void enableStyles()
              Enables style plugins.
    protected  void finalize()
              Deletes the wrapped C++ instance
     java.lang.String geometryArgument()
              Returns the argument to --geometry if any, so the geometry can be set wherever necessary
    static boolean guiEnabled()
              Whether widgets can be used.
     org.kde.qt.QPixmap icon()
              Returns a QPixmap with the application icon.
     KIconLoader iconLoader()
              Returns an iconloader object.
     java.lang.String iconName()
              Returns the name of the application icon.
     void installKDEPropertyMap()
              Install a Qt SQL property map with entries for all KDE widgets Call this in any application using KDE widgets in QSqlForm or QDataView.
    static void installSigpipeHandler()
              Installs a handler for the SIGPIPE signal.
     void installX11EventFilter(org.kde.qt.QWidget filter)
              Installs widget filter as global X11 event filter.
     java.lang.String instanceName()
              Returns the name of the instance
     void invokeBrowser(java.lang.String url)
              Invoke the standard browser.
     void invokeBrowser(java.lang.String url, java.lang.String startup_id)
              Invokes the standard browser.
    protected  void invokeEditSlot(java.lang.String slot)
              This method is used internally to determine which edit slots are implemented by the widget that has the focus, and to invoke those slots if available.
     void invokeHelp()
               
     void invokeHelp(java.lang.String anchor)
               
     void invokeHelp(java.lang.String anchor, java.lang.String appname)
               
     void invokeHelp(java.lang.String anchor, java.lang.String appname, java.lang.String startup_id)
              Invokes the KHelpCenter HTML help viewer from docbook sources.
     void invokeMailer(KURL mailtoURL)
               
     void invokeMailer(KURL mailtoURL, java.lang.String startup_id)
               
     void invokeMailer(KURL mailtoURL, java.lang.String startup_id, boolean allowAttachments)
              Invokes the standard email application.
     void invokeMailer(java.lang.String address, java.lang.String subject)
               
     void invokeMailer(java.lang.String address, java.lang.String subject, java.lang.String startup_id)
              Convenience method; invokes the standard email application.
     void invokeMailer(java.lang.String to, java.lang.String cc, java.lang.String bcc, java.lang.String subject, java.lang.String body)
               
     void invokeMailer(java.lang.String to, java.lang.String cc, java.lang.String bcc, java.lang.String subject, java.lang.String body, java.lang.String messageFile)
               
     void invokeMailer(java.lang.String to, java.lang.String cc, java.lang.String bcc, java.lang.String subject, java.lang.String body, java.lang.String messageFile, java.lang.String[] attachURLs)
               
     void invokeMailer(java.lang.String to, java.lang.String cc, java.lang.String bcc, java.lang.String subject, java.lang.String body, java.lang.String messageFile, java.lang.String[] attachURLs, java.lang.String startup_id)
              Convenience method; invokes the standard email application.
     boolean isDisposed()
              Has the wrapped C++ instance been deleted?
     boolean isRestored()
              Is the application restored from the session manager?
    static KApplication kApplication()
              Returns the current application object.
    static int kdeinitExec(java.lang.String name)
               
    static int kdeinitExec(java.lang.String name, java.lang.String[] args)
               
    static int kdeinitExec(java.lang.String name, java.lang.String[] args, java.lang.StringBuffer error)
               
    static int kdeinitExec(java.lang.String name, java.lang.String[] args, java.lang.StringBuffer error, int[] pid)
               
    static int kdeinitExec(java.lang.String name, java.lang.String[] args, java.lang.StringBuffer error, int[] pid, java.lang.String startup_id)
              Starts a program via kdeinit.
    static int kdeinitExecWait(java.lang.String name)
               
    static int kdeinitExecWait(java.lang.String name, java.lang.String[] args)
               
    static int kdeinitExecWait(java.lang.String name, java.lang.String[] args, java.lang.StringBuffer error)
               
    static int kdeinitExecWait(java.lang.String name, java.lang.String[] args, java.lang.StringBuffer error, int[] pid)
               
    static int kdeinitExecWait(java.lang.String name, java.lang.String[] args, java.lang.StringBuffer error, int[] pid, java.lang.String startup_id)
              Starts a program via kdeinit and wait for it to finish.
    static int keyboardMouseState()
              Returns the state of the currently pressed keyboard modifiers (e.g.
    static java.lang.String launcher()
              Returns the DCOP name of the service launcher.
     java.lang.String makeStdCaption(java.lang.String userCaption)
               
     java.lang.String makeStdCaption(java.lang.String userCaption, boolean withAppName)
               
     java.lang.String makeStdCaption(java.lang.String userCaption, boolean withAppName, boolean modified)
              Builds a caption that contains the application name along with the userCaption using a standard layout.
     org.kde.qt.QMetaObject metaObject()
               
     KMimeSourceFactory mimeSourceFactory()
              Returns the KMimeSourceFactory of the instance.
     org.kde.qt.QPixmap miniIcon()
              Returns the mini-icon for the application as a QPixmap.
     java.lang.String miniIconName()
              Returns the name of the mini-icon for the application.
     void newIconLoader()
              Re-allocate the global iconloader.
     boolean notify(org.kde.qt.QObject receiver, org.kde.qt.QEvent event)
               
     void paste()
              If the widget with focus provides a paste() slot, call that slot.
     void propagateSessionManager()
              Propagates the network address of the session manager in the SESSION_MANAGER environment variable so that child processes can pick it up.
    static int random()
              Generates a uniform random number.
    static java.lang.String randomString(int length)
              Generates a random string.
     void ref()
              Tells KApplication about one more operation that should be finished before the application exits.
     void removeKipcEventMask(int id)
              Removes a message type from the KIPC event mask.
     void removeX11EventFilter(org.kde.qt.QWidget filter)
              Removes global X11 event filter previously installed by installX11EventFilter().
     boolean requestShutDown()
               
     boolean requestShutDown(int confirm)
               
     boolean requestShutDown(int confirm, int sdtype)
               
     boolean requestShutDown(int confirm, int sdtype, int sdmode)
              Asks the session manager to shut the session down.
     void saveState(org.kde.qt.QSessionManager sm)
              Reimplemented for internal purposes, mainly the highlevel handling of session management with KSessionManaged.
     void selectAll()
              If the widget with focus provides a selectAll() slot, call that slot.
     KConfig sessionConfig()
              Returns the application session config object.
     boolean sessionSaving()
              Returns true if the application is currently saving its session data (most probably before KDE logout).
    protected  void setConfigName(java.lang.String name)
              Set name of default config file.
    static void setJavaSlotFactory()
              Used internally by the KDE Koala Java bindings runtime
     void setStartupId(java.lang.String startup_id)
              Sets a new value for the application startup notification window property for newly created toplevel windows.
     void setTopWidget(org.kde.qt.QWidget topWidget)
              Sets the top widget of the application.
     KSharedConfig sharedConfig()
              Returns the general config object ("appnamerc").
    static void startKdeinit()
               
    static int startServiceByDesktopName(java.lang.String _name)
               
    static int startServiceByDesktopName(java.lang.String _name, java.lang.String URL)
               
    static int startServiceByDesktopName(java.lang.String _name, java.lang.String[] URLs)
               
    static int startServiceByDesktopName(java.lang.String _name, java.lang.String[] URLs, java.lang.StringBuffer error)
               
    static int startServiceByDesktopName(java.lang.String _name, java.lang.String[] URLs, java.lang.StringBuffer error, java.lang.StringBuffer dcopService)
               
    static int startServiceByDesktopName(java.lang.String _name, java.lang.String[] URLs, java.lang.StringBuffer error, java.lang.StringBuffer dcopService, int[] pid)
               
    static int startServiceByDesktopName(java.lang.String _name, java.lang.String[] URLs, java.lang.StringBuffer error, java.lang.StringBuffer dcopService, int[] pid, java.lang.String startup_id)
               
    static int startServiceByDesktopName(java.lang.String _name, java.lang.String[] URLs, java.lang.StringBuffer error, java.lang.StringBuffer dcopService, int[] pid, java.lang.String startup_id, boolean noWait)
              Starts a service based on the desktop name of the service.
    static int startServiceByDesktopName(java.lang.String _name, java.lang.String URL, java.lang.StringBuffer error)
               
    static int startServiceByDesktopName(java.lang.String _name, java.lang.String URL, java.lang.StringBuffer error, java.lang.StringBuffer dcopService)
               
    static int startServiceByDesktopName(java.lang.String _name, java.lang.String URL, java.lang.StringBuffer error, java.lang.StringBuffer dcopService, int[] pid)
               
    static int startServiceByDesktopName(java.lang.String _name, java.lang.String URL, java.lang.StringBuffer error, java.lang.StringBuffer dcopService, int[] pid, java.lang.String startup_id)
               
    static int startServiceByDesktopName(java.lang.String _name, java.lang.String URL, java.lang.StringBuffer error, java.lang.StringBuffer dcopService, int[] pid, java.lang.String startup_id, boolean noWait)
              Starts a service based on the desktop name of the service.
    static int startServiceByDesktopPath(java.lang.String _name)
               
    static int startServiceByDesktopPath(java.lang.String _name, java.lang.String URL)
               
    static int startServiceByDesktopPath(java.lang.String _name, java.lang.String[] URLs)
               
    static int startServiceByDesktopPath(java.lang.String _name, java.lang.String[] URLs, java.lang.StringBuffer error)
               
    static int startServiceByDesktopPath(java.lang.String _name, java.lang.String[] URLs, java.lang.StringBuffer error, java.lang.StringBuffer dcopService)
               
    static int startServiceByDesktopPath(java.lang.String _name, java.lang.String[] URLs, java.lang.StringBuffer error, java.lang.StringBuffer dcopService, int[] pid)
               
    static int startServiceByDesktopPath(java.lang.String _name, java.lang.String[] URLs, java.lang.StringBuffer error, java.lang.StringBuffer dcopService, int[] pid, java.lang.String startup_id)
               
    static int startServiceByDesktopPath(java.lang.String _name, java.lang.String[] URLs, java.lang.StringBuffer error, java.lang.StringBuffer dcopService, int[] pid, java.lang.String startup_id, boolean noWait)
              Starts a service based on the desktop path of the service.
    static int startServiceByDesktopPath(java.lang.String _name, java.lang.String URL, java.lang.StringBuffer error)
               
    static int startServiceByDesktopPath(java.lang.String _name, java.lang.String URL, java.lang.StringBuffer error, java.lang.StringBuffer dcopService)
               
    static int startServiceByDesktopPath(java.lang.String _name, java.lang.String URL, java.lang.StringBuffer error, java.lang.StringBuffer dcopService, int[] pid)
               
    static int startServiceByDesktopPath(java.lang.String _name, java.lang.String URL, java.lang.StringBuffer error, java.lang.StringBuffer dcopService, int[] pid, java.lang.String startup_id)
               
    static int startServiceByDesktopPath(java.lang.String _name, java.lang.String URL, java.lang.StringBuffer error, java.lang.StringBuffer dcopService, int[] pid, java.lang.String startup_id, boolean noWait)
              Starts a service based on the desktop path of the service.
    static int startServiceByName(java.lang.String _name)
               
    static int startServiceByName(java.lang.String _name, java.lang.String URL)
               
    static int startServiceByName(java.lang.String _name, java.lang.String[] URLs)
               
    static int startServiceByName(java.lang.String _name, java.lang.String[] URLs, java.lang.StringBuffer error)
               
    static int startServiceByName(java.lang.String _name, java.lang.String[] URLs, java.lang.StringBuffer error, java.lang.StringBuffer dcopService)
               
    static int startServiceByName(java.lang.String _name, java.lang.String[] URLs, java.lang.StringBuffer error, java.lang.StringBuffer dcopService, int[] pid)
               
    static int startServiceByName(java.lang.String _name, java.lang.String[] URLs, java.lang.StringBuffer error, java.lang.StringBuffer dcopService, int[] pid, java.lang.String startup_id)
               
    static int startServiceByName(java.lang.String _name, java.lang.String[] URLs, java.lang.StringBuffer error, java.lang.StringBuffer dcopService, int[] pid, java.lang.String startup_id, boolean noWait)
              Starts a service based on the (translated) name of the service.
    static int startServiceByName(java.lang.String _name, java.lang.String URL, java.lang.StringBuffer error)
               
    static int startServiceByName(java.lang.String _name, java.lang.String URL, java.lang.StringBuffer error, java.lang.StringBuffer dcopService)
               
    static int startServiceByName(java.lang.String _name, java.lang.String URL, java.lang.StringBuffer error, java.lang.StringBuffer dcopService, int[] pid)
               
    static int startServiceByName(java.lang.String _name, java.lang.String URL, java.lang.StringBuffer error, java.lang.StringBuffer dcopService, int[] pid, java.lang.String startup_id)
               
    static int startServiceByName(java.lang.String _name, java.lang.String URL, java.lang.StringBuffer error, java.lang.StringBuffer dcopService, int[] pid, java.lang.String startup_id, boolean noWait)
              Starts a service based on the (translated) name of the service.
     java.lang.String startupId()
              Returns the app startup notification identifier for this running application.
     java.lang.String tempSaveName(java.lang.String pFilename)
              Get a file name in order to make a temporary copy of your document.
     void updateRemoteUserTimestamp(java.lang.String dcopId)
               
     void updateRemoteUserTimestamp(java.lang.String dcopId, long time)
              Updates the last user action timestamp in the application registered to DCOP with dcopId to the given time, or to this application's user time, if 0 is given.
     void updateUserTimestamp()
               
     void updateUserTimestamp(long time)
              Updates the last user action timestamp to the given time, or to the current time, if 0 is given.
     long userTimestamp()
              Returns the last user action timestamp or 0 if no user activity has taken place yet.
     
    Methods inherited from class org.kde.qt.QApplication
    aboutQt, activeModalWidget, activePopupWidget, activeWindow, addLibraryPath, allWidgets, applicationDirPath, applicationFilePath, args, beep, clipboard, closeAllWindows, closingDown, colorMode, colorSpec, cursorFlashTime, defaultCodec, desktop, desktopSettingsAware, doubleClickInterval, enter_loop, event, eventLoop, exec, exit_loop, exit, exit, flush, flushX, focusWidget, font, font, fontMetrics, globalStrut, hasGlobalMouseTracking, hasPendingEvents, horizontalAlignment, installTranslator, isEffectEnabled, isSessionRestored, libraryPaths, loopLevel, mainWidget, overrideCursor, palette, palette, polish, postEvent, processEvents, processEvents, processOneEvent, quit, removeLibraryPath, removePostedEvents, removeTranslator, restoreOverrideCursor, reverseLayout, sendEvent, sendPostedEvents, sendPostedEvents, sessionId, sessionKey, setColorMode, setColorSpec, setCursorFlashTime, setDefaultCodec, setDesktopSettingsAware, setDoubleClickInterval, setEffectEnabled, setEffectEnabled, setFont, setFont, setFont, setGlobalMouseTracking, setGlobalStrut, setLibraryPaths, setMainWidget, setOverrideCursor, setOverrideCursor, setPalette, setPalette, setPalette, setReverseLayout, setStartDragDistance, setStartDragTime, setStyle, setStyle, setWheelScrollLines, setWinStyleHighlightColor, startDragDistance, startDragTime, startingUp, style, syncX, topLevelWidgets, tr, tr, translate, translate, translate, type, wakeUpGuiThread, wheelScrollLines, widgetAt, widgetAt, widgetAt, widgetAt, winStyleHighlightColor
     
    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, childEvent, 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, eventFilter, highPriority, i18n, inherits, insertChild, installEventFilter, isA, isWidgetType, killTimer, killTimers, name, name, normalizeSignalSlot, objectTrees, parent, property, queryList, queryList, queryList, queryList, queryList, registerUserData, removeChild, removeEventFilter, sender, setName, 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

    ShiftModifier

    public static final int ShiftModifier
    See Also:
    Constant Field Values

    LockModifier

    public static final int LockModifier
    See Also:
    Constant Field Values

    ControlModifier

    public static final int ControlModifier
    See Also:
    Constant Field Values

    Modifier1

    public static final int Modifier1
    See Also:
    Constant Field Values

    Modifier2

    public static final int Modifier2
    See Also:
    Constant Field Values

    Modifier3

    public static final int Modifier3
    See Also:
    Constant Field Values

    Modifier4

    public static final int Modifier4
    See Also:
    Constant Field Values

    Modifier5

    public static final int Modifier5
    See Also:
    Constant Field Values

    Button1Pressed

    public static final int Button1Pressed
    Deprecated. Same values as Button1Mask etc. in X.h @short @deprecated Same values as Button1Mask etc.
    See Also:
    Constant Field Values

    Button2Pressed

    public static final int Button2Pressed
    See Also:
    Constant Field Values

    Button3Pressed

    public static final int Button3Pressed
    See Also:
    Constant Field Values

    Button4Pressed

    public static final int Button4Pressed
    See Also:
    Constant Field Values

    Button5Pressed

    public static final int Button5Pressed
    See Also:
    Constant Field Values

    CaptionAppLast

    public static final int CaptionAppLast
    Position of the caption (presumably in the application window's title bar). This enum appears to be unused.

    See Also:
    Constant Field Values

    CaptionAppFirst

    public static final int CaptionAppFirst
    See Also:
    Constant Field Values

    CaptionNoApp

    public static final int CaptionNoApp
    See Also:
    Constant Field Values

    ShutdownConfirmDefault

    public static final int ShutdownConfirmDefault
    The possible values for the confirm parameter of requestShutDown().

    See Also:
    Constant Field Values

    ShutdownConfirmNo

    public static final int ShutdownConfirmNo
    See Also:
    Constant Field Values

    ShutdownConfirmYes

    public static final int ShutdownConfirmYes
    See Also:
    Constant Field Values

    ShutdownTypeDefault

    public static final int ShutdownTypeDefault
    The possible values for the sdtype parameter of requestShutDown().

    See Also:
    Constant Field Values

    ShutdownTypeNone

    public static final int ShutdownTypeNone
    See Also:
    Constant Field Values

    ShutdownTypeReboot

    public static final int ShutdownTypeReboot
    See Also:
    Constant Field Values

    ShutdownTypeHalt

    public static final int ShutdownTypeHalt
    See Also:
    Constant Field Values

    ShutdownModeDefault

    public static final int ShutdownModeDefault
    The possible values for the sdmode parameter of requestShutDown().

    See Also:
    Constant Field Values

    ShutdownModeSchedule

    public static final int ShutdownModeSchedule
    See Also:
    Constant Field Values

    ShutdownModeTryNow

    public static final int ShutdownModeTryNow
    See Also:
    Constant Field Values

    ShutdownModeForceNow

    public static final int ShutdownModeForceNow
    See Also:
    Constant Field Values

    ShutdownModeInteractive

    public static final int ShutdownModeInteractive
    See Also:
    Constant Field Values

    SETTINGS_MOUSE

    public static final int SETTINGS_MOUSE
    Valid values for the settingsChanged signal

    See Also:
    Constant Field Values

    SETTINGS_COMPLETION

    public static final int SETTINGS_COMPLETION
    See Also:
    Constant Field Values

    SETTINGS_PATHS

    public static final int SETTINGS_PATHS
    See Also:
    Constant Field Values

    SETTINGS_POPUPMENU

    public static final int SETTINGS_POPUPMENU
    See Also:
    Constant Field Values

    SETTINGS_QT

    public static final int SETTINGS_QT
    See Also:
    Constant Field Values

    SETTINGS_SHORTCUTS

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

    KApplication

    protected KApplication(java.lang.Class dummy)

    KApplication

    public KApplication(boolean allowStyles,
                        boolean GUIenabled)
    This constructor takes aboutData and command line arguments from KCmdLineArgs.

    Parameters:
    allowStyles - Set to false to disable the loading on plugin based styles. This is only useful to applications that do not display a GUI normally. If you do create an application with allowStyles set to false it normally runs in the background but under special circumstances displays widgets. Call enableStyles() before displaying any widgets.
    GUIenabled - Set to false to disable all GUI stuff. This implies no styles either.

    KApplication

    public KApplication(boolean allowStyles)

    KApplication

    public KApplication()

    KApplication

    public KApplication(boolean allowStyles,
                        boolean GUIenabled,
                        KInstanceInterface _instance)
    Method Detail

    metaObject

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

    className

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

    sessionConfig

    public KConfig sessionConfig()
    Returns the application session config object.

    Returns:
    A pointer to the application's instance specific KConfig object.
    See Also:
    KConfig

    isRestored

    public boolean isRestored()
    Is the application restored from the session manager?

    Returns:
    If true, this application was restored by the session manager. Note that this may mean the config object returned by sessionConfig() contains data saved by a session closedown.
    See Also:
    sessionConfig()

    disableSessionManagement

    public void disableSessionManagement()
    Disables session management for this application. Useful in case your application is started by the initial "startkde" script.


    enableSessionManagement

    public void enableSessionManagement()
    Enables again session management for this application, formerly disabled by calling disableSessionManagement(). You usually shouldn't call this function, as the session management is enabled by default.


    requestShutDown

    public boolean requestShutDown(int confirm,
                                   int sdtype,
                                   int sdmode)
    Asks the session manager to shut the session down. Using confirm == ShutdownConfirmYes or sdtype != ShutdownTypeDefault or sdmode != ShutdownModeDefault causes the use of ksmserver's DCOP interface. The remaining two combinations use the standard XSMP and will work with any session manager compliant with it.

    Parameters:
    confirm - Whether to ask the user if he really wants to log out. ShutdownConfirm
    sdtype - The action to take after logging out. ShutdownType
    sdmode - If/When the action should be taken. ShutdownMode
    Returns:
    true on success, false if the session manager could not be contacted.

    requestShutDown

    public boolean requestShutDown(int confirm,
                                   int sdtype)

    requestShutDown

    public boolean requestShutDown(int confirm)

    requestShutDown

    public boolean requestShutDown()

    propagateSessionManager

    public void propagateSessionManager()
    Propagates the network address of the session manager in the SESSION_MANAGER environment variable so that child processes can pick it up. If SESSION_MANAGER isn't defined yet, the address is searched in $HOME/.KSMserver. This function is called by clients that are started outside the session ( i.e. before ksmserver is started), but want to launch other processes that should participate in the session. Examples are kdesktop or kicker.


    commitData

    public void commitData(org.kde.qt.QSessionManager sm)
    Reimplemented for internal purposes, mainly the highlevel handling of session management with KSessionManaged.

    Overrides:
    commitData in class org.kde.qt.QApplication

    saveState

    public void saveState(org.kde.qt.QSessionManager sm)
    Reimplemented for internal purposes, mainly the highlevel handling of session management with KSessionManaged.

    Overrides:
    saveState in class org.kde.qt.QApplication

    sessionSaving

    public boolean sessionSaving()
    Returns true if the application is currently saving its session data (most probably before KDE logout). This is intended for use mainly in KMainWindow.queryClose() and KMainWindow.queryExit().

    See Also:
    KMainWindow.queryClose(), KMainWindow.queryExit()

    icon

    public org.kde.qt.QPixmap icon()
    Returns a QPixmap with the application icon.

    Returns:
    the application icon

    iconName

    public java.lang.String iconName()
    Returns the name of the application icon.

    Returns:
    the icon's name

    miniIcon

    public org.kde.qt.QPixmap miniIcon()
    Returns the mini-icon for the application as a QPixmap.

    Returns:
    the application's mini icon

    miniIconName

    public java.lang.String miniIconName()
    Returns the name of the mini-icon for the application.

    Returns:
    the mini icon's name

    setTopWidget

    public void setTopWidget(org.kde.qt.QWidget topWidget)
    Sets the top widget of the application. This means basically applying the right window caption and icon. An application may have several top widgets. You don't need to call this function manually when using KMainWindow.

    Parameters:
    topWidget - A top widget of the application.
    See Also:
    icon(), caption()

    invokeHelp

    public void invokeHelp(java.lang.String anchor,
                           java.lang.String appname,
                           java.lang.String startup_id)
    Invokes the KHelpCenter HTML help viewer from docbook sources.

    Parameters:
    anchor - This has to be a defined anchor in your docbook sources. If empty the main index is loaded
    appname - This allows you to show the help of another application. If empty the current name() is used
    startup_id - for app startup notification, "0" for none, "" ( empty string ) is the default

    invokeHelp

    public void invokeHelp(java.lang.String anchor,
                           java.lang.String appname)

    invokeHelp

    public void invokeHelp(java.lang.String anchor)

    invokeHelp

    public void invokeHelp()

    invokeMailer

    public void invokeMailer(java.lang.String address,
                             java.lang.String subject,
                             java.lang.String startup_id)
    Convenience method; invokes the standard email application.

    Parameters:
    address - The destination address
    subject - Subject string. Can be null.
    startup_id - for app startup notification, "0" for none, "" ( empty string ) is the default

    invokeMailer

    public void invokeMailer(java.lang.String address,
                             java.lang.String subject)

    invokeMailer

    public void invokeMailer(KURL mailtoURL,
                             java.lang.String startup_id,
                             boolean allowAttachments)
    Invokes the standard email application.

    Parameters:
    mailtoURL - A mailto URL.
    startup_id - for app startup notification, "0" for none, "" ( empty string ) is the default
    allowAttachments - whether attachments specified in mailtoURL should be honoured. The default is false; do not honour requests for attachments.

    invokeMailer

    public void invokeMailer(KURL mailtoURL,
                             java.lang.String startup_id)

    invokeMailer

    public void invokeMailer(KURL mailtoURL)

    invokeMailer

    public void invokeMailer(java.lang.String to,
                             java.lang.String cc,
                             java.lang.String bcc,
                             java.lang.String subject,
                             java.lang.String body,
                             java.lang.String messageFile,
                             java.lang.String[] attachURLs,
                             java.lang.String startup_id)
    Convenience method; invokes the standard email application. All parameters are optional.

    Parameters:
    to - The destination address.
    cc - The Cc field
    bcc - The Bcc field
    subject - Subject string
    body - A string containing the body of the mail (exclusive with messageFile)
    messageFile - A file (URL) containing the body of the mail (exclusive with body) - currently unsupported
    attachURLs - List of URLs to be attached to the mail.
    startup_id - for app startup notification, "0" for none, "" ( empty string ) is the default

    invokeMailer

    public void invokeMailer(java.lang.String to,
                             java.lang.String cc,
                             java.lang.String bcc,
                             java.lang.String subject,
                             java.lang.String body,
                             java.lang.String messageFile,
                             java.lang.String[] attachURLs)

    invokeMailer

    public void invokeMailer(java.lang.String to,
                             java.lang.String cc,
                             java.lang.String bcc,
                             java.lang.String subject,
                             java.lang.String body,
                             java.lang.String messageFile)

    invokeMailer

    public void invokeMailer(java.lang.String to,
                             java.lang.String cc,
                             java.lang.String bcc,
                             java.lang.String subject,
                             java.lang.String body)

    caption

    public java.lang.String caption()
    Returns a text for the window caption. This may be set by "-caption", otherwise it will be equivalent to the name of the executable.

    Returns:
    the text for the window caption

    makeStdCaption

    public java.lang.String makeStdCaption(java.lang.String userCaption,
                                           boolean withAppName,
                                           boolean modified)
    Builds a caption that contains the application name along with the userCaption using a standard layout. To make a compliant caption for your window, simply do: setCaption(kapp.makeStdCaption(yourCaption));

    Parameters:
    userCaption - The caption string you want to display in the window caption area. Do not include the application name!
    withAppName - Indicates that the method shall include or ignore the application name when making the caption string. You are not compliant if you set this to false.
    modified - If true, a 'modified' sign will be included in the returned string. This is useful when indicating that a file is modified, i.e., it contains data that has not been saved.
    Returns:
    the created caption

    makeStdCaption

    public java.lang.String makeStdCaption(java.lang.String userCaption,
                                           boolean withAppName)

    makeStdCaption

    public java.lang.String makeStdCaption(java.lang.String userCaption)

    tempSaveName

    public java.lang.String tempSaveName(java.lang.String pFilename)
    Get a file name in order to make a temporary copy of your document.

    Parameters:
    pFilename - The full path to the current file of your document.
    Returns:
    A new filename for auto-saving.

    checkRecoverFile

    public java.lang.String checkRecoverFile(java.lang.String pFilename,
                                             boolean bRecover)
    Check whether an auto-save file exists for the document you want to open.

    Parameters:
    pFilename - The full path to the document you want to open.
    bRecover - This gets set to true if there was a recover file.
    Returns:
    The full path of the file to open.

    enableStyles

    public void enableStyles()
    Enables style plugins. This is useful only to applications that normally do not display a GUI and create the KApplication with allowStyles set to false.


    disableStyles

    public void disableStyles()
    Disables style plugins. Current style plugins do not get unloaded. This is only useful when used in combination with enableStyles().


    installX11EventFilter

    public void installX11EventFilter(org.kde.qt.QWidget filter)
    Installs widget filter as global X11 event filter. The widget filter receives XEvents in its standard QWidget.x11Event() function. Warning: Only do this when absolutely necessary. An installed X11 filter can slow things down.


    removeX11EventFilter

    public void removeX11EventFilter(org.kde.qt.QWidget filter)
    Removes global X11 event filter previously installed by installX11EventFilter().


    addKipcEventMask

    public void addKipcEventMask(int id)
    Adds a message type to the KIPC event mask. You can only add "system messages" to the event mask. These are the messages with id < 32. Messages with id >= 32 are user messages.

    Parameters:
    id - The message id. See KIPC.Message.
    See Also:
    KIPC, removeKipcEventMask(int), #kipcMessage

    removeKipcEventMask

    public void removeKipcEventMask(int id)
    Removes a message type from the KIPC event mask. This message will not be handled anymore.

    Parameters:
    id - The message id.
    See Also:
    KIPC, addKipcEventMask(int), #kipcMessage

    startupId

    public java.lang.String startupId()
    Returns the app startup notification identifier for this running application.

    Returns:
    the startup notification identifier

    setStartupId

    public void setStartupId(java.lang.String startup_id)
    Sets a new value for the application startup notification window property for newly created toplevel windows.

    Parameters:
    startup_id - the startup notification identifier
    See Also:
    KStartupInfo#setNewStartupId

    updateUserTimestamp

    public void updateUserTimestamp(long time)
    Updates the last user action timestamp to the given time, or to the current time, if 0 is given. Do not use unless you're really sure what you're doing. Consult focus stealing prevention section in kdebase/kwin/README.


    updateUserTimestamp

    public void updateUserTimestamp()

    userTimestamp

    public long userTimestamp()
    Returns the last user action timestamp or 0 if no user activity has taken place yet.

    See Also:
    #updateuserTimestamp

    updateRemoteUserTimestamp

    public void updateRemoteUserTimestamp(java.lang.String dcopId,
                                          long time)
    Updates the last user action timestamp in the application registered to DCOP with dcopId to the given time, or to this application's user time, if 0 is given. Use before causing user interaction in the remote application, e.g. invoking a dialog in the application using a DCOP call. Consult focus stealing prevention section in kdebase/kwin/README.


    updateRemoteUserTimestamp

    public void updateRemoteUserTimestamp(java.lang.String dcopId)

    geometryArgument

    public java.lang.String geometryArgument()
    Returns the argument to --geometry if any, so the geometry can be set wherever necessary

    Returns:
    the geometry argument, or null if there is none

    installKDEPropertyMap

    public void installKDEPropertyMap()
    Install a Qt SQL property map with entries for all KDE widgets Call this in any application using KDE widgets in QSqlForm or QDataView.


    authorize

    public boolean authorize(java.lang.String genericAction)
    Returns whether a certain action is authorized

    Parameters:
    genericAction - The name of a generic action
    Returns:
    true if the action is authorized

    authorizeKAction

    public boolean authorizeKAction(java.lang.String action)
    Returns whether a certain KAction is authorized.

    Parameters:
    action - The name of a KAction action. The name is prepended with "action/" before being passed to authorize()
    Returns:
    true if the KAction is authorized

    authorizeURLAction

    public boolean authorizeURLAction(java.lang.String action,
                                      KURL baseURL,
                                      KURL destURL)
    Returns whether a certain URL related action is authorized.

    Parameters:
    action - The name of the action. Known actions are list (may be listed (e.g. in file selection dialog)), link (may be linked to), open (may open) and redirect (may be redirected to)
    baseURL - The url where the action originates from
    destURL - The object of the action
    Returns:
    true when the action is authorized, false otherwise.

    allowURLAction

    public void allowURLAction(java.lang.String action,
                               KURL _baseURL,
                               KURL _destURL)
    Allow a certain URL action. This can be useful if your application needs to ensure access to an application specific directory that may otherwise be subject to KIOSK restrictions.

    Parameters:
    action - The name of the action.
    _baseURL - The url where the action originates from
    _destURL - The object of the action

    authorizeControlModule

    public boolean authorizeControlModule(java.lang.String menuId)
    Returns whether access to a certain control module is authorized.

    Parameters:
    menuId - identifying the control module, e.g. kde-mouse.desktop
    Returns:
    true if access to the module is authorized, false otherwise.

    authorizeControlModules

    public java.util.ArrayList authorizeControlModules(java.lang.String[] menuIds)
    Returns whether access to a certain control modules is authorized.

    Parameters:
    menuIds - list of menu-ids of control module, an example of a menu-id is kde-mouse.desktop.
    Returns:
    Those control modules for which access has been authorized.

    notify

    public boolean notify(org.kde.qt.QObject receiver,
                          org.kde.qt.QEvent event)
    Overrides:
    notify in class org.kde.qt.QApplication

    invokeBrowser

    public void invokeBrowser(java.lang.String url,
                              java.lang.String startup_id)
    Invokes the standard browser. Note that you should only do this when you know for sure that the browser can handle the URL (i.e. its mimetype). In doubt, if the URL can point to an image or anything else than directory or HTML, prefer to use new KRun( url ).

    Parameters:
    url - The destination address
    startup_id - for app startup notification, "0" for none, "" ( empty string ) is the default

    invokeBrowser

    public void invokeBrowser(java.lang.String url)
    Invoke the standard browser. Uses a startup_id of "" (empty) and is otherwise the same as the above function.


    cut

    public void cut()
    If the widget with focus provides a cut() slot, call that slot. Thus for a simple application cut can be implemented as:
                     KStdAction.cut( kapp, SLOT("cut()"), actionCollection() );
                     


    copy

    public void copy()
    If the widget with focus provides a copy() slot, call that slot. Thus for a simple application copy can be implemented as:
                     KStdAction.copy( kapp, SLOT("copy()"), actionCollection() );
                     


    paste

    public void paste()
    If the widget with focus provides a paste() slot, call that slot. Thus for a simple application copy can be implemented as:
                     KStdAction.paste( kapp, SLOT("paste()"), actionCollection() );
                     


    clear

    public void clear()
    If the widget with focus provides a clear() slot, call that slot. Thus for a simple application clear() can be implemented as:
                     new KAction( i18n( "Clear" ), "editclear", 0, kapp, SLOT("clear()"), actionCollection(), "clear" );
                     
    Note that for some widgets, this may not provide the intended bahavior. For example if you make use of the code above and a KListView has the focus, clear() will clear all of the items in the list. If this is not the intened behavior and you want to make use of this slot, you can subclass KListView and reimplement this slot. For example the following code would implement a KListView without this behavior:
                     public class MyListView implements KListView {
                        public    MyListView( QWidget  parent = 0, String  name = 0, WFlags f = 0 ) {}
    
                     public    void clear() {}
                     }
                     


    selectAll

    public void selectAll()
    If the widget with focus provides a selectAll() slot, call that slot. Thus for a simple application select all can be implemented as:
                     KStdAction.selectAll( kapp, SLOT("selectAll()"), actionCollection() );
                     


    ref

    public void ref()
    Tells KApplication about one more operation that should be finished before the application exits. The standard behavior is to exit on the "last window closed" event, but some events should outlive the last window closed (e.g. a file copy for a file manager, or 'compacting folders on exit' for a mail client).


    deref

    public void deref()
    Tells KApplication that one operation such as those described in ref() just finished. The application exits if the counter is back to 0.


    addCmdLineOptions

    public static void addCmdLineOptions()
    Add Qt and KDE command line options to KCmdLineArgs.


    kApplication

    public static KApplication kApplication()
    Returns the current application object. This is similar to the global QApplication pointer qApp. It allows access to the single global KApplication object, since more than one cannot be created in the same application. It saves you the trouble of having to pass the pointer explicitly to every function that may require it.

    Returns:
    the current application object

    dcopClient

    public static DCOPClient dcopClient()
    Returns a pointer to a DCOPClient for the application. If a client does not exist yet, it is created when this function is called.

    Returns:
    the DCOPClient for the application

    disableAutoDcopRegistration

    public static void disableAutoDcopRegistration()
    Disable automatic dcop registration Must be called before creating a KApplication instance to have an effect.


    launcher

    public static java.lang.String launcher()
    Returns the DCOP name of the service launcher. This will be something like klaucher_$host_$uid.

    Returns:
    the name of the service launcher

    startServiceByName

    public static int startServiceByName(java.lang.String _name,
                                         java.lang.String URL,
                                         java.lang.StringBuffer error,
                                         java.lang.StringBuffer dcopService,
                                         int[] pid,
                                         java.lang.String startup_id,
                                         boolean noWait)
    Starts a service based on the (translated) name of the service. E.g. "Web Browser"

    Parameters:
    _name - the name of the service
    URL - if not empty this URL is passed to the service
    error - On failure, error contains a description of the error that occurred. If the pointer is 0, the argument will be ignored
    dcopService - On success, dcopService contains the DCOP name under which this service is available. If empty, the service does not provide DCOP services. If the pointer is 0 the argument will be ignored
    pid - On success, the process id of the new service will be written here. If the pointer is 0, the argument will be ignored.
    startup_id - for app startup notification, "0" for none, "" ( empty string ) is the default
    noWait - if set, the function does not wait till the service is running.
    Returns:
    an error code indicating success (== 0) or failure (> 0).

    startServiceByName

    public static int startServiceByName(java.lang.String _name,
                                         java.lang.String URL,
                                         java.lang.StringBuffer error,
                                         java.lang.StringBuffer dcopService,
                                         int[] pid,
                                         java.lang.String startup_id)

    startServiceByName

    public static int startServiceByName(java.lang.String _name,
                                         java.lang.String URL,
                                         java.lang.StringBuffer error,
                                         java.lang.StringBuffer dcopService,
                                         int[] pid)

    startServiceByName

    public static int startServiceByName(java.lang.String _name,
                                         java.lang.String URL,
                                         java.lang.StringBuffer error,
                                         java.lang.StringBuffer dcopService)

    startServiceByName

    public static int startServiceByName(java.lang.String _name,
                                         java.lang.String URL,
                                         java.lang.StringBuffer error)

    startServiceByName

    public static int startServiceByName(java.lang.String _name,
                                         java.lang.String URL)

    startServiceByName

    public static int startServiceByName(java.lang.String _name,
                                         java.lang.String[] URLs,
                                         java.lang.StringBuffer error,
                                         java.lang.StringBuffer dcopService,
                                         int[] pid,
                                         java.lang.String startup_id,
                                         boolean noWait)
    Starts a service based on the (translated) name of the service. E.g. "Web Browser"

    Parameters:
    _name - the name of the service
    URLs - if not empty these URLs will be passed to the service
    error - On failure, error contains a description of the error that occurred. If the pointer is 0, the argument will be ignored
    dcopService - On success, dcopService contains the DCOP name under which this service is available. If empty, the service does not provide DCOP services. If the pointer is 0 the argument will be ignored
    pid - On success, the process id of the new service will be written here. If the pointer is 0, the argument will be ignored.
    startup_id - for app startup notification, "0" for none, "" ( empty string ) is the default
    noWait - if set, the function does not wait till the service is running.
    Returns:
    an error code indicating success (== 0) or failure (> 0).

    startServiceByName

    public static int startServiceByName(java.lang.String _name,
                                         java.lang.String[] URLs,
                                         java.lang.StringBuffer error,
                                         java.lang.StringBuffer dcopService,
                                         int[] pid,
                                         java.lang.String startup_id)

    startServiceByName

    public static int startServiceByName(java.lang.String _name,
                                         java.lang.String[] URLs,
                                         java.lang.StringBuffer error,
                                         java.lang.StringBuffer dcopService,
                                         int[] pid)

    startServiceByName

    public static int startServiceByName(java.lang.String _name,
                                         java.lang.String[] URLs,
                                         java.lang.StringBuffer error,
                                         java.lang.StringBuffer dcopService)

    startServiceByName

    public static int startServiceByName(java.lang.String _name,
                                         java.lang.String[] URLs,
                                         java.lang.StringBuffer error)

    startServiceByName

    public static int startServiceByName(java.lang.String _name,
                                         java.lang.String[] URLs)

    startServiceByName

    public static int startServiceByName(java.lang.String _name)

    startServiceByDesktopPath

    public static int startServiceByDesktopPath(java.lang.String _name,
                                                java.lang.String URL,
                                                java.lang.StringBuffer error,
                                                java.lang.StringBuffer dcopService,
                                                int[] pid,
                                                java.lang.String startup_id,
                                                boolean noWait)
    Starts a service based on the desktop path of the service. E.g. "Applications/konqueror.desktop" or "/home/user/bla/myfile.desktop"

    Parameters:
    _name - the path of the desktop file
    URL - if not empty this URL is passed to the service
    error - On failure, error contains a description of the error that occurred. If the pointer is 0, the argument will be ignored
    dcopService - On success, dcopService contains the DCOP name under which this service is available. If empty, the service does not provide DCOP services. If the pointer is 0 the argument will be ignored
    pid - On success, the process id of the new service will be written here. If the pointer is 0, the argument will be ignored.
    startup_id - for app startup notification, "0" for none, "" ( empty string ) is the default
    noWait - if set, the function does not wait till the service is running.
    Returns:
    an error code indicating success (== 0) or failure (> 0).

    startServiceByDesktopPath

    public static int startServiceByDesktopPath(java.lang.String _name,
                                                java.lang.String URL,
                                                java.lang.StringBuffer error,
                                                java.lang.StringBuffer dcopService,
                                                int[] pid,
                                                java.lang.String startup_id)

    startServiceByDesktopPath

    public static int startServiceByDesktopPath(java.lang.String _name,
                                                java.lang.String URL,
                                                java.lang.StringBuffer error,
                                                java.lang.StringBuffer dcopService,
                                                int[] pid)

    startServiceByDesktopPath

    public static int startServiceByDesktopPath(java.lang.String _name,
                                                java.lang.String URL,
                                                java.lang.StringBuffer error,
                                                java.lang.StringBuffer dcopService)

    startServiceByDesktopPath

    public static int startServiceByDesktopPath(java.lang.String _name,
                                                java.lang.String URL,
                                                java.lang.StringBuffer error)

    startServiceByDesktopPath

    public static int startServiceByDesktopPath(java.lang.String _name,
                                                java.lang.String URL)

    startServiceByDesktopPath

    public static int startServiceByDesktopPath(java.lang.String _name,
                                                java.lang.String[] URLs,
                                                java.lang.StringBuffer error,
                                                java.lang.StringBuffer dcopService,
                                                int[] pid,
                                                java.lang.String startup_id,
                                                boolean noWait)
    Starts a service based on the desktop path of the service. E.g. "Applications/konqueror.desktop" or "/home/user/bla/myfile.desktop"

    Parameters:
    _name - the path of the desktop file
    URLs - if not empty these URLs will be passed to the service
    error - On failure, error contains a description of the error that occurred. If the pointer is 0, the argument will be ignored
    dcopService - On success, dcopService contains the DCOP name under which this service is available. If empty, the service does not provide DCOP services. If the pointer is 0 the argument will be ignored
    pid - On success, the process id of the new service will be written here. If the pointer is 0, the argument will be ignored.
    startup_id - for app startup notification, "0" for none, "" ( empty string ) is the default
    noWait - if set, the function does not wait till the service is running.
    Returns:
    an error code indicating success (== 0) or failure (> 0).

    startServiceByDesktopPath

    public static int startServiceByDesktopPath(java.lang.String _name,
                                                java.lang.String[] URLs,
                                                java.lang.StringBuffer error,
                                                java.lang.StringBuffer dcopService,
                                                int[] pid,
                                                java.lang.String startup_id)

    startServiceByDesktopPath

    public static int startServiceByDesktopPath(java.lang.String _name,
                                                java.lang.String[] URLs,
                                                java.lang.StringBuffer error,
                                                java.lang.StringBuffer dcopService,
                                                int[] pid)

    startServiceByDesktopPath

    public static int startServiceByDesktopPath(java.lang.String _name,
                                                java.lang.String[] URLs,
                                                java.lang.StringBuffer error,
                                                java.lang.StringBuffer dcopService)

    startServiceByDesktopPath

    public static int startServiceByDesktopPath(java.lang.String _name,
                                                java.lang.String[] URLs,
                                                java.lang.StringBuffer error)

    startServiceByDesktopPath

    public static int startServiceByDesktopPath(java.lang.String _name,
                                                java.lang.String[] URLs)

    startServiceByDesktopPath

    public static int startServiceByDesktopPath(java.lang.String _name)

    startServiceByDesktopName

    public static int startServiceByDesktopName(java.lang.String _name,
                                                java.lang.String URL,
                                                java.lang.StringBuffer error,
                                                java.lang.StringBuffer dcopService,
                                                int[] pid,
                                                java.lang.String startup_id,
                                                boolean noWait)
    Starts a service based on the desktop name of the service. E.g. "konqueror"

    Parameters:
    _name - the desktop name of the service
    URL - if not empty this URL is passed to the service
    error - On failure, error contains a description of the error that occurred. If the pointer is 0, the argument will be ignored
    dcopService - On success, dcopService contains the DCOP name under which this service is available. If empty, the service does not provide DCOP services. If the pointer is 0 the argument will be ignored
    pid - On success, the process id of the new service will be written here. If the pointer is 0, the argument will be ignored.
    startup_id - for app startup notification, "0" for none, "" ( empty string ) is the default
    noWait - if set, the function does not wait till the service is running.
    Returns:
    an error code indicating success (== 0) or failure (> 0).

    startServiceByDesktopName

    public static int startServiceByDesktopName(java.lang.String _name,
                                                java.lang.String URL,
                                                java.lang.StringBuffer error,
                                                java.lang.StringBuffer dcopService,
                                                int[] pid,
                                                java.lang.String startup_id)

    startServiceByDesktopName

    public static int startServiceByDesktopName(java.lang.String _name,
                                                java.lang.String URL,
                                                java.lang.StringBuffer error,
                                                java.lang.StringBuffer dcopService,
                                                int[] pid)

    startServiceByDesktopName

    public static int startServiceByDesktopName(java.lang.String _name,
                                                java.lang.String URL,
                                                java.lang.StringBuffer error,
                                                java.lang.StringBuffer dcopService)

    startServiceByDesktopName

    public static int startServiceByDesktopName(java.lang.String _name,
                                                java.lang.String URL,
                                                java.lang.StringBuffer error)

    startServiceByDesktopName

    public static int startServiceByDesktopName(java.lang.String _name,
                                                java.lang.String URL)

    startServiceByDesktopName

    public static int startServiceByDesktopName(java.lang.String _name,
                                                java.lang.String[] URLs,
                                                java.lang.StringBuffer error,
                                                java.lang.StringBuffer dcopService,
                                                int[] pid,
                                                java.lang.String startup_id,
                                                boolean noWait)
    Starts a service based on the desktop name of the service. E.g. "konqueror"

    Parameters:
    _name - the desktop name of the service
    URLs - if not empty these URLs will be passed to the service
    error - On failure, error contains a description of the error that occurred. If the pointer is 0, the argument will be ignored
    dcopService - On success, dcopService contains the DCOP name under which this service is available. If empty, the service does not provide DCOP services. If the pointer is 0 the argument will be ignored
    pid - On success, the process id of the new service will be written here. If the pointer is 0, the argument will be ignored.
    startup_id - for app startup notification, "0" for none, "" ( empty string ) is the default
    noWait - if set, the function does not wait till the service is running.
    Returns:
    an error code indicating success (== 0) or failure (> 0).

    startServiceByDesktopName

    public static int startServiceByDesktopName(java.lang.String _name,
                                                java.lang.String[] URLs,
                                                java.lang.StringBuffer error,
                                                java.lang.StringBuffer dcopService,
                                                int[] pid,
                                                java.lang.String startup_id)

    startServiceByDesktopName

    public static int startServiceByDesktopName(java.lang.String _name,
                                                java.lang.String[] URLs,
                                                java.lang.StringBuffer error,
                                                java.lang.StringBuffer dcopService,
                                                int[] pid)

    startServiceByDesktopName

    public static int startServiceByDesktopName(java.lang.String _name,
                                                java.lang.String[] URLs,
                                                java.lang.StringBuffer error,
                                                java.lang.StringBuffer dcopService)

    startServiceByDesktopName

    public static int startServiceByDesktopName(java.lang.String _name,
                                                java.lang.String[] URLs,
                                                java.lang.StringBuffer error)

    startServiceByDesktopName

    public static int startServiceByDesktopName(java.lang.String _name,
                                                java.lang.String[] URLs)

    startServiceByDesktopName

    public static int startServiceByDesktopName(java.lang.String _name)

    kdeinitExec

    public static int kdeinitExec(java.lang.String name,
                                  java.lang.String[] args,
                                  java.lang.StringBuffer error,
                                  int[] pid,
                                  java.lang.String startup_id)
    Starts a program via kdeinit. program name and arguments are converted to according to the local encoding and passed as is to kdeinit.

    Parameters:
    name - Name of the program to start
    args - Arguments to pass to the program
    error - On failure, error contains a description of the error that occurred. If the pointer is 0, the argument will be ignored
    pid - On success, the process id of the new service will be written here. If the pointer is 0, the argument will be ignored.
    startup_id - for app startup notification, "0" for none, "" ( empty string ) is the default
    Returns:
    an error code indicating success (== 0) or failure (> 0).

    kdeinitExec

    public static int kdeinitExec(java.lang.String name,
                                  java.lang.String[] args,
                                  java.lang.StringBuffer error,
                                  int[] pid)

    kdeinitExec

    public static int kdeinitExec(java.lang.String name,
                                  java.lang.String[] args,
                                  java.lang.StringBuffer error)

    kdeinitExec

    public static int kdeinitExec(java.lang.String name,
                                  java.lang.String[] args)

    kdeinitExec

    public static int kdeinitExec(java.lang.String name)

    kdeinitExecWait

    public static int kdeinitExecWait(java.lang.String name,
                                      java.lang.String[] args,
                                      java.lang.StringBuffer error,
                                      int[] pid,
                                      java.lang.String startup_id)
    Starts a program via kdeinit and wait for it to finish. Like kdeinitExec(), but it waits till the program is finished. As such it behaves similar to the system(...) function.

    Parameters:
    name - Name of the program to start
    args - Arguments to pass to the program
    error - On failure, error contains a description of the error that occurred. If the pointer is 0, the argument will be ignored
    pid - On success, the process id of the new service will be written here. If the pointer is 0, the argument will be ignored.
    startup_id - for app startup notification, "0" for none, "" ( empty string ) is the default
    Returns:
    an error code indicating success (== 0) or failure (> 0).

    kdeinitExecWait

    public static int kdeinitExecWait(java.lang.String name,
                                      java.lang.String[] args,
                                      java.lang.StringBuffer error,
                                      int[] pid)

    kdeinitExecWait

    public static int kdeinitExecWait(java.lang.String name,
                                      java.lang.String[] args,
                                      java.lang.StringBuffer error)

    kdeinitExecWait

    public static int kdeinitExecWait(java.lang.String name,
                                      java.lang.String[] args)

    kdeinitExecWait

    public static int kdeinitExecWait(java.lang.String name)

    random

    public static int random()
    Generates a uniform random number.

    Returns:
    A truly unpredictable number in the range [0, RAND_MAX)

    randomString

    public static java.lang.String randomString(int length)
    Generates a random string. It operates in the range [A-Za-z0-9]

    Parameters:
    length - Generate a string of this length.
    Returns:
    the random string

    keyboardMouseState

    public static int keyboardMouseState()
    Returns the state of the currently pressed keyboard modifiers (e.g. shift, control, etc.) and mouse buttons, similarly to QKeyEvent.state() and QMouseEvent.state(). You usually should simply use the information provided by QKeyEvent and QMouseEvent, but it can be useful to query for the status of the modifiers at another moment (e.g. some KDE apps do that upon a drop event).

    Returns:
    the keyboard modifiers and mouse buttons state

    startKdeinit

    public static void startKdeinit()

    createApplicationPalette

    public static org.kde.qt.QPalette createApplicationPalette()
    Used to obtain the QPalette that will be used to set the application palette. This is only useful for configuration modules such as krdb and should not be used in normal circumstances.

    Returns:
    the QPalette

    createApplicationPalette

    public static org.kde.qt.QPalette createApplicationPalette(KConfig config,
                                                               int contrast)
    Raw access for use by KDM.


    installSigpipeHandler

    public static void installSigpipeHandler()
    Installs a handler for the SIGPIPE signal. It is thrown when you write to a pipe or socket that has been closed. The handler is installed automatically in the constructor, but you may need it if your application or component does not have a KApplication instance.


    guiEnabled

    public static boolean guiEnabled()
    Whether widgets can be used.


    invokeEditSlot

    protected void invokeEditSlot(java.lang.String slot)
    This method is used internally to determine which edit slots are implemented by the widget that has the focus, and to invoke those slots if available.

    Parameters:
    slot - is the slot as returned using the SLOT() macro, for example SLOT("cut()") This method can be used in KApplication subclasses to implement application wide edit actions not supported by the KApplication class. For example (in your subclass):
                     void MyApplication.deselect()
                     {
                       invokeEditSlot( SLOT("deselect()") );
                     }
                     
    Now in your application calls to MyApplication.deselect() will call this slot on the focused widget if it provides this slot. You can combine this with KAction with:
                     KStdAction.deselect( (MyApplication)( kapp ), SLOT("cut()"), actionCollection() );
                     
    See Also:
    cut(), copy(), paste(), clear(), selectAll()

    finalize

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

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

    dispose

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

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

    isDisposed

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

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

    dirs

    public KStandardDirs dirs()
    Returns the application standard dirs object.

    Specified by:
    dirs in interface KInstanceInterface
    Returns:
    The KStandardDirs of the application.

    config

    public KConfig config()
    Returns the general config object ("appnamerc").

    Specified by:
    config in interface KInstanceInterface
    Returns:
    the KConfig object for the instance.

    sharedConfig

    public KSharedConfig sharedConfig()
    Returns the general config object ("appnamerc").

    Specified by:
    sharedConfig in interface KInstanceInterface
    Returns:
    the KConfig object for the instance.

    iconLoader

    public KIconLoader iconLoader()
    Returns an iconloader object.

    Specified by:
    iconLoader in interface KInstanceInterface
    Returns:
    the iconloader object.

    newIconLoader

    public void newIconLoader()
    Re-allocate the global iconloader.

    Specified by:
    newIconLoader in interface KInstanceInterface

    aboutData

    public KAboutData aboutData()
    Returns the about data of this instance Warning, can be null

    Specified by:
    aboutData in interface KInstanceInterface
    Returns:
    the about data of the instance, or 0 if it has not been set yet

    instanceName

    public java.lang.String instanceName()
    Returns the name of the instance

    Specified by:
    instanceName in interface KInstanceInterface
    Returns:
    the instance name, can be null if the KInstance has been created with a null name

    mimeSourceFactory

    public KMimeSourceFactory mimeSourceFactory()
    Returns the KMimeSourceFactory of the instance. Mainly added for API completeness and future extensibility.

    Specified by:
    mimeSourceFactory in interface KInstanceInterface
    Returns:
    the KMimeSourceFactory set as default for this application.

    setConfigName

    protected void setConfigName(java.lang.String name)
    Set name of default config file.

    Parameters:
    name - the name of the default config file

    setJavaSlotFactory

    public static void setJavaSlotFactory()
    Used internally by the KDE Koala Java bindings runtime