• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
TDEApplication Class Reference

#include <tdeapplication.h>

Inheritance diagram for TDEApplication:
TDEInstance TDEUniqueApplication

Public Types

enum  CaptionLayout { CaptionAppLast =1 , CaptionAppFirst , CaptionNoApp }
 
enum  ShutdownConfirm { ShutdownConfirmDefault = -1 , ShutdownConfirmNo = 0 , ShutdownConfirmYes = 1 }
 
enum  ShutdownType { ShutdownTypeDefault = -1 , ShutdownTypeNone = 0 , ShutdownTypeReboot = 1 , ShutdownTypeHalt = 2 }
 
enum  ShutdownMode {
  ShutdownModeDefault = -1 , ShutdownModeSchedule = 0 , ShutdownModeTryNow = 1 , ShutdownModeForceNow = 2 ,
  ShutdownModeInteractive = 3
}
 
enum  {
  ShiftModifier = 1<<0 , LockModifier = 1<<1 , ControlModifier = 1<<2 , Modifier1 = 1<<3 ,
  Modifier2 = 1<<4 , Modifier3 = 1<<5 , Modifier4 = 1<<6 , Modifier5 = 1<<7
}
 
enum  {
  Button1Pressed = 1<<8 , Button2Pressed = 1<<9 , Button3Pressed = 1<<10 , Button4Pressed = 1<<11 ,
  Button5Pressed = 1<<12
}
 
enum  SettingsCategory {
  SETTINGS_MOUSE , SETTINGS_COMPLETION , SETTINGS_PATHS , SETTINGS_POPUPMENU ,
  SETTINGS_QT , SETTINGS_SHORTCUTS
}
 

Public Slots

void invokeBrowser (const TQString &url, const TQCString &startup_id)
 
void invokeBrowser (const TQString &url)
 
void cut ()
 
void copy ()
 
void paste ()
 
void clear ()
 
void selectAll ()
 
void broadcastKeyCode (unsigned int keyCode)
 
void ref ()
 
void deref ()
 

Signals

void tdedisplayPaletteChanged ()
 
void tdedisplayStyleChanged ()
 
void tdedisplayFontChanged ()
 
void appearanceChanged ()
 
void toolbarAppearanceChanged (int)
 
void backgroundChanged (int desk)
 
void settingsChanged (int category)
 
void iconChanged (int group)
 
void kipcMessage (int id, int data)
 
void saveYourself ()
 
void shutDown ()
 
void updateIconLoaders ()
 
void coreFakeKeyPress (unsigned int keyCode)
 

Public Member Functions

 TDEApplication (bool allowStyles=true, bool GUIenabled=true, bool SMenabled=true)
 
 TDEApplication (int &argc, char **argv, const TQCString &rAppName, bool allowStyles=true, bool GUIenabled=true, bool SMenabled=true) TDE_DEPRECATED
 
TDEConfig * sessionConfig ()
 
bool isRestored () const
 
void disableSessionManagement ()
 
void enableSessionManagement ()
 
bool requestShutDown (ShutdownConfirm confirm=ShutdownConfirmDefault, ShutdownType sdtype=ShutdownTypeDefault, ShutdownMode sdmode=ShutdownModeDefault)
 
void propagateSessionManager ()
 
void commitData (TQSessionManager &sm)
 
void saveState (TQSessionManager &sm)
 
bool sessionSaving () const
 
TQPixmap icon () const
 
TQString iconName () const
 
TQPixmap miniIcon () const
 
TQString miniIconName () const
 
void setTopWidget (TQWidget *topWidget)
 
void invokeHelp (const TQString &anchor, const TQString &appname, const TQCString &startup_id) const
 
void invokeHelp (const TQString &anchor=TQString::null, const TQString &appname=TQString::null) const
 
void invokeHTMLHelp (const TQString &aFilename, const TQString &aTopic=TQString::null) const TDE_DEPRECATED
 
void invokeMailer (const TQString &address, const TQString &subject, const TQCString &startup_id)
 
void invokeMailer (const TQString &address, const TQString &subject)
 
void invokeMailer (const KURL &mailtoURL, const TQCString &startup_id, bool allowAttachments)
 
void invokeMailer (const KURL &mailtoURL, const TQCString &startup_id)
 
void invokeMailer (const KURL &mailtoURL)
 
void invokeMailer (const TQString &to, const TQString &cc, const TQString &bcc, const TQString &subject, const TQString &body, const TQString &messageFile, const TQStringList &attachURLs, const TQCString &startup_id)
 
void invokeMailer (const TQString &to, const TQString &cc, const TQString &bcc, const TQString &subject, const TQString &body, const TQString &messageFile=TQString::null, const TQStringList &attachURLs=TQStringList())
 
TQString caption () const
 
TDE_DEPRECATED TDEStyle * tdestyle () const
 
TQString makeStdCaption (const TQString &userCaption, bool withAppName=true, bool modified=false) const
 
TQString tempSaveName (const TQString &pFilename) const
 
TQString checkRecoverFile (const TQString &pFilename, bool &bRecover) const
 
void getX11RGBAInformation (Display *dpy)
 
bool detectCompositionManagerAvailable (bool force_available=false, bool available=true)
 
TQt::HANDLE getX11RGBAVisual (Display *dpy)
 
TQt::HANDLE getX11RGBAColormap (Display *dpy)
 
bool isX11CompositionAvailable ()
 
void enableStyles ()
 
void disableStyles ()
 
void installX11EventFilter (TQWidget *filter)
 
void removeX11EventFilter (const TQWidget *filter)
 
void addKipcEventMask (int id)
 
void removeKipcEventMask (int id)
 
TQCString startupId () const
 
void setStartupId (const TQCString &startup_id)
 
void updateUserTimestamp (unsigned long time=0)
 
unsigned long userTimestamp () const
 
void updateRemoteUserTimestamp (const TQCString &dcopId, unsigned long time=0)
 
TQString geometryArgument () const
 
void installKDEPropertyMap ()
 
bool authorize (const TQString &genericAction)
 
bool authorizeTDEAction (const char *action)
 
bool authorizeURLAction (const TQString &action, const KURL &baseURL, const KURL &destURL)
 
void allowURLAction (const TQString &action, const KURL &_baseURL, const KURL &_destURL)
 
bool authorizeControlModule (const TQString &menuId)
 
TQStringList authorizeControlModules (const TQStringList &menuIds)
 
bool notify (TQObject *receiver, TQEvent *event)
 
int xErrhandler (Display *, void *)
 
int xioErrhandler (Display *)
 
void iceIOErrorHandler (_IceConn *conn)
 
- Public Member Functions inherited from TDEInstance
 TDEInstance (const TQCString &instanceName)
 
 TDEInstance (const TDEAboutData *aboutData)
 
 TDEInstance (TDEInstance *src)
 
virtual ~TDEInstance ()
 
TDEStandardDirs * dirs () const
 
TDEConfig * config () const
 
TDESharedConfig * sharedConfig () const
 
void setConfigReadOnly (bool ro)
 
TDEIconLoader * iconLoader () const
 
void newIconLoader () const
 
const TDEAboutData * aboutData () const
 
TQCString instanceName () const
 
KMimeSourceFactory * mimeSourceFactory () const
 

Static Public Member Functions

static void addCmdLineOptions ()
 
static TDEApplication * tdeApplication ()
 
static DCOPClient * dcopClient ()
 
static void disableAutoDcopRegistration ()
 
static TQCString launcher ()
 
static int startServiceByName (const TQString &_name, const TQString &URL, TQString *error=0, TQCString *dcopService=0, int *pid=0, const TQCString &startup_id="", bool noWait=false)
 
static int startServiceByName (const TQString &_name, const TQStringList &URLs=TQStringList(), TQString *error=0, TQCString *dcopService=0, int *pid=0, const TQCString &startup_id="", bool noWait=false)
 
static int startServiceByDesktopPath (const TQString &_name, const TQString &URL, TQString *error=0, TQCString *dcopService=0, int *pid=0, const TQCString &startup_id="", bool noWait=false)
 
static int startServiceByDesktopPath (const TQString &_name, const TQStringList &URLs=TQStringList(), TQString *error=0, TQCString *dcopService=0, int *pid=0, const TQCString &startup_id="", bool noWait=false)
 
static int startServiceByDesktopName (const TQString &_name, const TQString &URL, TQString *error=0, TQCString *dcopService=0, int *pid=0, const TQCString &startup_id="", bool noWait=false)
 
static int startServiceByDesktopName (const TQString &_name, const TQStringList &URLs=TQStringList(), TQString *error=0, TQCString *dcopService=0, int *pid=0, const TQCString &startup_id="", bool noWait=false)
 
static int tdeinitExec (const TQString &name, const TQStringList &args, TQString *error, int *pid, const TQCString &startup_id)
 
static int tdeinitExec (const TQString &name, const TQStringList &args=TQStringList(), TQString *error=0, int *pid=0)
 
static int tdeinitExecWait (const TQString &name, const TQStringList &args, TQString *error, int *pid, const TQCString &startup_id)
 
static int tdeinitExecWait (const TQString &name, const TQStringList &args=TQStringList(), TQString *error=0, int *pid=0)
 
static bool isCompositionManagerAvailable ()
 
static Display * openX11RGBADisplay ()
 
static int random ()
 
static TQString randomString (int length)
 
static ButtonState keyboardMouseState ()
 
static uint keyboardModifiers () TDE_DEPRECATED
 
static uint mouseState () TDE_DEPRECATED
 
static int currentX11VT ()
 
static void startKdeinit ()
 
static TQPalette createApplicationPalette ()
 
static TQPalette createApplicationPalette (TDEConfig *config, int contrast)
 
static void installSigpipeHandler ()
 
static bool guiEnabled ()
 

Static Public Attributes

static bool loadedByKdeinit = false
 

Protected Member Functions

 TDEApplication (bool allowStyles, bool GUIenabled, TDEInstance *_instance)
 
void invokeEditSlot (const char *slot)
 
virtual void virtual_hook (int id, void *data)
 
- Protected Member Functions inherited from TDEInstance
 TDEInstance (const TDEInstance &)
 
void setConfigName (const TQString &name)
 
virtual void virtual_hook (int id, void *data)
 

Protected Attributes

Atom kipcCommAtom
 
int kipcEventMask
 
int pArgc
 

Static Protected Attributes

static TDEApplication * TDEApp = nullptr
 

Detailed Description

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 'tdeApp' global variable. See cut() for an example.

This class provides the following services to all KDE applications.

  • It controls the event queue (see TQApplication ).
  • It provides the application with KDE resources such as accelerators, common menu entries, a TDEConfig 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 TDEApplication'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 TDEApplication'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.

Controls and provides information to all KDE applications.

Author
Matthias Kalle Dalheimer kalle.nosp@m.@kde.nosp@m..org

Definition at line 94 of file tdeapplication.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Definition at line 1208 of file tdeapplication.h.

◆ anonymous enum

anonymous enum
Deprecated:
Same values as Button1Mask etc. in X.h

Definition at line 1223 of file tdeapplication.h.

◆ CaptionLayout

enum TDEApplication::CaptionLayout

Position of the caption (presumably in the application window's title bar).

This enum appears to be unused.

Todo:
Find out if this is used anywhere.
Enumerator
CaptionAppLast 

Display the application name last (before document name).

CaptionAppFirst 

Display the application name first.

CaptionNoApp 

Do not display application name at all.

Definition at line 104 of file tdeapplication.h.

◆ SettingsCategory

enum TDEApplication::SettingsCategory

Valid values for the settingsChanged signal.

Definition at line 1392 of file tdeapplication.h.

◆ ShutdownConfirm

enum TDEApplication::ShutdownConfirm

The possible values for the confirm parameter of requestShutDown().

Enumerator
ShutdownConfirmDefault 

Obey the user's confirmation setting.

ShutdownConfirmNo 

Don't confirm, shutdown without asking.

ShutdownConfirmYes 

Always confirm, ask even if the user turned it off.

Definition at line 339 of file tdeapplication.h.

◆ ShutdownMode

enum TDEApplication::ShutdownMode

The possible values for the sdmode parameter of requestShutDown().

Enumerator
ShutdownModeDefault 

Select previous mode or the default if it's the first time.

ShutdownModeSchedule 

Schedule a shutdown (halt or reboot) for the time all active sessions have exited.

ShutdownModeTryNow 

Shut down, if no sessions are active.

Otherwise do nothing.

ShutdownModeForceNow 

Force shutdown.

Kill any possibly active sessions.

ShutdownModeInteractive 

Pop up a dialog asking the user what to do if sessions are still active.

Definition at line 379 of file tdeapplication.h.

◆ ShutdownType

enum TDEApplication::ShutdownType

The possible values for the sdtype parameter of requestShutDown().

Enumerator
ShutdownTypeDefault 

Select previous action or the default if it's the first time.

ShutdownTypeNone 

Only log out.

ShutdownTypeReboot 

Log out and reboot the machine.

ShutdownTypeHalt 

Log out and halt the machine.

Definition at line 357 of file tdeapplication.h.

Constructor & Destructor Documentation

◆ TDEApplication() [1/3]

TDEApplication::TDEApplication ( bool  allowStyles = true,
bool  GUIenabled = true,
bool  SMenabled = true 
)

This constructor takes aboutData and command line arguments from TDECmdLineArgs.

If ARGB (transparent) widgets are to be used in your application, please use TDEApplication app(TDEApplication::openX11RGBADisplay()); or TDEApplication app(TDEApplication::openX11RGBADisplay(), useStyles);

Parameters
allowStylesSet 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.
GUIenabledSet to false to disable all GUI stuff. This implies no styles either.

Definition at line 754 of file tdeapplication.cpp.

◆ TDEApplication() [2/3]

TDEApplication::TDEApplication ( int &  argc,
char **  argv,
const TQCString &  rAppName,
bool  allowStyles = true,
bool  GUIenabled = true,
bool  SMenabled = true 
)
Deprecated:
do not use it at all, it will make your application crash, use TDECmdLineArgs

Constructor. Parses command-line arguments.

Parameters
argccommand line argument count
argvcommand line argument value(s)
rAppNameapplication name. Will be used for finding the associated message files and icon files, and as the default registration name for DCOP. This is a mandatory parameter.
allowStylesSet 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 that normally runs in the background but under special circumstances displays widgets call enableStyles() before displaying any widgets.
GUIenabledSet to false to disable all GUI stuff. This implies no styles either.

Definition at line 701 of file tdeapplication.cpp.

◆ ~TDEApplication()

TDEApplication::~TDEApplication ( )
virtual

Definition at line 1855 of file tdeapplication.cpp.

◆ TDEApplication() [3/3]

TDEApplication::TDEApplication ( bool  allowStyles,
bool  GUIenabled,
TDEInstance *  _instance 
)
protected

Definition at line 876 of file tdeapplication.cpp.

Member Function Documentation

◆ addCmdLineOptions()

void TDEApplication::addCmdLineOptions ( )
static

Add Qt and KDE command line options to TDECmdLineArgs.

Definition at line 1690 of file tdeapplication.cpp.

◆ addKipcEventMask()

void TDEApplication::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
idThe message id. See KIPC::Message.
See also
KIPC
removeKipcEventMask()
kipcMessage()

Definition at line 2323 of file tdeapplication.cpp.

◆ allowURLAction()

void TDEApplication::allowURLAction ( const TQString &  action,
const KURL &  _baseURL,
const 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
actionThe name of the action.
_baseURLThe url where the action originates from
_destURLThe object of the action
Since
3.2

Definition at line 3551 of file tdeapplication.cpp.

◆ appearanceChanged

void TDEApplication::appearanceChanged ( )
signal

Emitted when TDEApplication has changed either its GUI style, its font or its palette in response to a tdedisplay request.

Normally, widgets will update their styles automatically, but you should connect to this to program special behavior.

◆ authorize()

bool TDEApplication::authorize ( const TQString &  genericAction)

Returns whether a certain action is authorized.

Parameters
genericActionThe name of a generic action
Returns
true if the action is authorized

Definition at line 3431 of file tdeapplication.cpp.

◆ authorizeControlModule()

bool TDEApplication::authorizeControlModule ( const TQString &  menuId)

Returns whether access to a certain control module is authorized.

Parameters
menuIdidentifying the control module, e.g. tde-mouse.desktop
Returns
true if access to the module is authorized, false otherwise.
Since
3.2

Definition at line 3451 of file tdeapplication.cpp.

◆ authorizeControlModules()

TQStringList TDEApplication::authorizeControlModules ( const TQStringList &  menuIds)

Returns whether access to a certain control modules is authorized.

Parameters
menuIdslist of menu-ids of control module, an example of a menu-id is tde-mouse.desktop.
Returns
Those control modules for which access has been authorized.
Since
3.2

Definition at line 3460 of file tdeapplication.cpp.

◆ authorizeTDEAction()

bool TDEApplication::authorizeTDEAction ( const char *  action)

Returns whether a certain TDEAction is authorized.

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

Definition at line 3441 of file tdeapplication.cpp.

◆ authorizeURLAction()

bool TDEApplication::authorizeURLAction ( const TQString &  action,
const KURL &  baseURL,
const KURL &  destURL 
)

Returns whether a certain URL related action is authorized.

Parameters
actionThe 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)
baseURLThe url where the action originates from
destURLThe object of the action
Returns
true when the action is authorized, false otherwise.
Since
3.1

Definition at line 3561 of file tdeapplication.cpp.

◆ backgroundChanged

void TDEApplication::backgroundChanged ( int  desk)
signal

Emitted when the desktop background has been changed by kcmdisplay.

Parameters
deskThe desktop whose background has changed.

◆ broadcastKeyCode

void TDEApplication::broadcastKeyCode ( unsigned int  keyCode)
slot

Broadcast a received keycode to all listening KDE applications The primary use for this feature is to connect hotkeys such as XF86Display to their respective TDEGlobalAccel functions while the screen is locked by kdesktop_lock.

Definition at line 3047 of file tdeapplication.cpp.

◆ caption()

TQString TDEApplication::caption ( ) const

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

Definition at line 2384 of file tdeapplication.cpp.

◆ checkRecoverFile()

TQString TDEApplication::checkRecoverFile ( const TQString &  pFilename,
bool &  bRecover 
) const

Check whether an auto-save file exists for the document you want to open.

Parameters
pFilenameThe full path to the document you want to open.
bRecoverThis gets set to true if there was a recover file.
Returns
The full path of the file to open.

Definition at line 3262 of file tdeapplication.cpp.

◆ clear

void TDEApplication::clear ( )
slot

If the widget with focus provides a clear() slot, call that slot.

Thus for a simple application clear() can be implemented as:

new TDEAction( i18n( "Clear" ), "edit-clear", 0, tdeApp, TQ_SLOT( clear() ), actionCollection(), "clear" );
TDEAction
TDEApplication::clear
void clear()
If the widget with focus provides a clear() slot, call that slot.
Definition: tdeapplication.cpp:3037

Note that for some widgets, this may not provide the intended bahavior. For example if you make use of the code above and a TDEListView 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 TDEListView and reimplement this slot. For example the following code would implement a TDEListView without this behavior:

class MyListView : public TDEListView {
TQ_OBJECT
public:
MyListView( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) : TDEListView( parent, name, f ) {}
virtual ~MyListView() {}
public slots:
virtual void clear() {}
};
TDEListView

Definition at line 3037 of file tdeapplication.cpp.

◆ commitData()

void TDEApplication::commitData ( TQSessionManager &  sm)

Reimplemented for internal purposes, mainly the highlevel handling of session management with KSessionManaged.

Definition at line 1409 of file tdeapplication.cpp.

◆ copy

void TDEApplication::copy ( )
slot

If the widget with focus provides a copy() slot, call that slot.

Thus for a simple application copy can be implemented as:

KStdAction::copy( tdeApp, TQ_SLOT( copy() ), actionCollection() );
TDEApplication::copy
void copy()
If the widget with focus provides a copy() slot, call that slot.
Definition: tdeapplication.cpp:3027
KStdAction::copy
TDEAction * copy(const TQObject *recvr, const char *slot, TDEActionCollection *parent, const char *name=0)

Definition at line 3027 of file tdeapplication.cpp.

◆ createApplicationPalette() [1/2]

TQPalette TDEApplication::createApplicationPalette ( )
static

Used to obtain the TQPalette 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
Since
3.1

Definition at line 2422 of file tdeapplication.cpp.

◆ createApplicationPalette() [2/2]

TQPalette TDEApplication::createApplicationPalette ( TDEConfig *  config,
int  contrast 
)
static

Definition at line 2429 of file tdeapplication.cpp.

◆ currentX11VT()

int TDEApplication::currentX11VT ( )
static

Returns the VT that the current X server is running on, or -1 if this information is unavailable.

Since
14.0.0

Definition at line 3688 of file tdeapplication.cpp.

◆ cut

void TDEApplication::cut ( )
slot

If the widget with focus provides a cut() slot, call that slot.

Thus for a simple application cut can be implemented as:

KStdAction::cut( tdeApp, TQ_SLOT( cut() ), actionCollection() );
TDEApplication::cut
void cut()
If the widget with focus provides a cut() slot, call that slot.
Definition: tdeapplication.cpp:3022
KStdAction::cut
TDEAction * cut(const TQObject *recvr, const char *slot, TDEActionCollection *parent, const char *name=0)

Definition at line 3022 of file tdeapplication.cpp.

◆ dcopClient()

DCOPClient * TDEApplication::dcopClient ( )
static

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

Definition at line 1187 of file tdeapplication.cpp.

◆ deref

void TDEApplication::deref ( )
slot

Tells TDEApplication that one operation such as those described in ref() just finished.

The application exits if the counter is back to 0.

Definition at line 1253 of file tdeapplication.cpp.

◆ detectCompositionManagerAvailable()

bool TDEApplication::detectCompositionManagerAvailable ( bool  force_available = false,
bool  available = true 
)

Detects the availability of a composition manager such as kompmgr Note that calling this method will probably cause the screen to flicker.

See also
isCompositionManagerAvailable()
Parameters
force_availableIf set, force TDE to assume a composition manager is available
availableWhether or not the composition manager is available (only used if force_available is true)
Returns
whether the composition manager is enabled

Definition at line 2108 of file tdeapplication.cpp.

◆ disableAutoDcopRegistration()

void TDEApplication::disableAutoDcopRegistration ( )
static

Disable automatic dcop registration Must be called before creating a TDEApplication instance to have an effect.

Definition at line 1232 of file tdeapplication.cpp.

◆ disableSessionManagement()

void TDEApplication::disableSessionManagement ( )

Disables session management for this application.

Useful in case your application is started by the initial "starttde" script.

Definition at line 1283 of file tdeapplication.cpp.

◆ disableStyles()

void TDEApplication::disableStyles ( )

Disables style plugins.

Current style plugins do not get unloaded.

This is only useful when used in combination with enableStyles().

Definition at line 2352 of file tdeapplication.cpp.

◆ enableSessionManagement()

void TDEApplication::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.

Definition at line 1287 of file tdeapplication.cpp.

◆ enableStyles()

void TDEApplication::enableStyles ( )

Enables style plugins.

This is useful only to applications that normally do not display a GUI and create the TDEApplication with allowStyles set to false.

Definition at line 2343 of file tdeapplication.cpp.

◆ geometryArgument()

TQString TDEApplication::geometryArgument ( ) const

Returns the argument to –geometry if any, so the geometry can be set wherever necessary.

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

Definition at line 1816 of file tdeapplication.cpp.

◆ getX11RGBAColormap()

TQt::HANDLE TDEApplication::getX11RGBAColormap ( Display *  dpy)

Returns the X11 display colormap.

Returns
An X11 display colormap object

Definition at line 2151 of file tdeapplication.cpp.

◆ getX11RGBAInformation()

void TDEApplication::getX11RGBAInformation ( Display *  dpy)

Definition at line 2101 of file tdeapplication.cpp.

◆ getX11RGBAVisual()

TQt::HANDLE TDEApplication::getX11RGBAVisual ( Display *  dpy)

Returns the X11 display visual.

Returns
A pointer to the X11 display visual

Definition at line 2147 of file tdeapplication.cpp.

◆ guiEnabled()

bool TDEApplication::guiEnabled ( )
static

Definition at line 3721 of file tdeapplication.cpp.

◆ iceIOErrorHandler()

void TDEApplication::iceIOErrorHandler ( _IceConn *  conn)

Definition at line 954 of file tdeapplication.cpp.

◆ icon()

TQPixmap TDEApplication::icon ( ) const

Returns a TQPixmap with the application icon.

Returns
the application icon

◆ iconChanged

void TDEApplication::iconChanged ( int  group)
signal

Emitted when the global icon settings have been changed.

Parameters
groupthe new group

◆ iconName()

TQString TDEApplication::iconName ( ) const

Returns the name of the application icon.

Returns
the icon's name

Definition at line 1832 of file tdeapplication.cpp.

◆ installKDEPropertyMap()

void TDEApplication::installKDEPropertyMap ( )

Install a Qt SQL property map with entries for all KDE widgets Call this in any application using KDE widgets in TQSqlForm or TQDataView.

If you are adding a widget that was missing please make sure to also add it to TDEConfigDialogManager's retrieveSettings() function. Thanks.

Definition at line 2609 of file tdeapplication.cpp.

◆ installSigpipeHandler()

void TDEApplication::installSigpipeHandler ( )
static

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 TDEApplication instance.

Definition at line 3694 of file tdeapplication.cpp.

◆ installX11EventFilter()

void TDEApplication::installX11EventFilter ( TQWidget *  filter)

Installs widget filter as global X11 event filter.

The widget filter receives XEvents in its standard TQWidget::x11Event() function.

Warning: Only do this when absolutely necessary. An installed X11 filter can slow things down.

Definition at line 519 of file tdeapplication.cpp.

◆ invokeBrowser [1/2]

void TDEApplication::invokeBrowser ( const TQString &  url)
slot

Invoke the standard browser.

Uses a startup_id of "" (empty) and is otherwise the same as the above function.

Definition at line 2998 of file tdeapplication.cpp.

◆ invokeBrowser [2/2]

void TDEApplication::invokeBrowser ( const TQString &  url,
const TQCString &  startup_id 
)
slot

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
urlThe destination address
startup_idfor app startup notification, "0" for none, "" ( empty string ) is the default

Definition at line 93 of file kapplication_win.cpp.

◆ invokeEditSlot()

void TDEApplication::invokeEditSlot ( const char *  slot)
protected

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
slotis the slot as returned using the TQ_SLOT() macro, for example TQ_SLOT( cut() )

This method can be used in TDEApplication subclasses to implement application wide edit actions not supported by the TDEApplication class. For example (in your subclass):

void MyApplication::deselect()
{
invokeEditSlot( TQ_SLOT( deselect() ) );
}
TDEApplication::invokeEditSlot
void invokeEditSlot(const char *slot)
This method is used internally to determine which edit slots are implemented by the widget that has t...
Definition: tdeapplication.cpp:2308

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 TDEAction with:

KStdAction::deselect( static_cast<MyApplication *>( tdeApp ), TQ_SLOT( cut() ), actionCollection() );
KStdAction::deselect
TDEAction * deselect(const TQObject *recvr, const char *slot, TDEActionCollection *parent, const char *name=0)
See also
cut()
copy()
paste()
clear()
selectAll()
Since
3.2

Definition at line 2308 of file tdeapplication.cpp.

◆ invokeHelp() [1/2]

void TDEApplication::invokeHelp ( const TQString &  anchor,
const TQString &  appname,
const TQCString &  startup_id 
) const

Invokes the KHelpCenter HTML help viewer from docbook sources.

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

Definition at line 77 of file kapplication_win.cpp.

◆ invokeHelp() [2/2]

void TDEApplication::invokeHelp ( const TQString &  anchor = TQString::null,
const TQString &  appname = TQString::null 
) const

Definition at line 2651 of file tdeapplication.cpp.

◆ invokeHTMLHelp()

void TDEApplication::invokeHTMLHelp ( const TQString &  aFilename,
const TQString &  aTopic = TQString::null 
) const
Deprecated:
Invoke the khelpcenter HTML help viewer from HTML sources. Please use invokeHelp() instead.
Parameters
aFilenameThe filename that is to be loaded. Its location is computed automatically according to the KFSSTND. If aFilename is empty, the logical appname with .html appended to it is used.
aTopicThis allows context-sensitive help. Its value will be appended to the filename, prefixed with a "#" (hash) character.

Definition at line 2694 of file tdeapplication.cpp.

◆ invokeMailer() [1/7]

void TDEApplication::invokeMailer ( const KURL &  mailtoURL)

Definition at line 2740 of file tdeapplication.cpp.

◆ invokeMailer() [2/7]

void TDEApplication::invokeMailer ( const KURL &  mailtoURL,
const TQCString &  startup_id 
)

Definition at line 2745 of file tdeapplication.cpp.

◆ invokeMailer() [3/7]

void TDEApplication::invokeMailer ( const KURL &  mailtoURL,
const TQCString &  startup_id,
bool  allowAttachments 
)

Invokes the standard email application.

Parameters
mailtoURLA mailto URL.
startup_idfor app startup notification, "0" for none, "" ( empty string ) is the default
allowAttachmentswhether attachments specified in mailtoURL should be honoured. The default is false; do not honour requests for attachments.

Definition at line 2750 of file tdeapplication.cpp.

◆ invokeMailer() [4/7]

void TDEApplication::invokeMailer ( const TQString &  address,
const TQString &  subject 
)

Definition at line 2729 of file tdeapplication.cpp.

◆ invokeMailer() [5/7]

void TDEApplication::invokeMailer ( const TQString &  address,
const TQString &  subject,
const TQCString &  startup_id 
)

Convenience method; invokes the standard email application.

Parameters
addressThe destination address
subjectSubject string. Can be TQString::null.
startup_idfor app startup notification, "0" for none, "" ( empty string ) is the default

Definition at line 2734 of file tdeapplication.cpp.

◆ invokeMailer() [6/7]

void TDEApplication::invokeMailer ( const TQString &  to,
const TQString &  cc,
const TQString &  bcc,
const TQString &  subject,
const TQString &  body,
const TQString &  messageFile,
const TQStringList &  attachURLs,
const TQCString &  startup_id 
)

Convenience method; invokes the standard email application.

All parameters are optional.

Parameters
toThe destination address.
ccThe Cc field
bccThe Bcc field
subjectSubject string
bodyA string containing the body of the mail (exclusive with messageFile)
messageFileA file (URL) containing the body of the mail (exclusive with body) - currently unsupported
attachURLsList of URLs to be attached to the mail.
startup_idfor app startup notification, "0" for none, "" ( empty string ) is the default

Definition at line 100 of file kapplication_win.cpp.

◆ invokeMailer() [7/7]

void TDEApplication::invokeMailer ( const TQString &  to,
const TQString &  cc,
const TQString &  bcc,
const TQString &  subject,
const TQString &  body,
const TQString &  messageFile = TQString::null,
const TQStringList &  attachURLs = TQStringList() 
)

Definition at line 2783 of file tdeapplication.cpp.

◆ isCompositionManagerAvailable()

bool TDEApplication::isCompositionManagerAvailable ( )
static

Gets the availability of a composition manager such as kompmgr Note that at least one application must have called detectCompositionManagerAvailable while the current X display was active in order for this method to return valid results.

See also
detectCompositionManagerAvailable()
Returns
whether the composition manager is enabled

Definition at line 2104 of file tdeapplication.cpp.

◆ isRestored()

bool TDEApplication::isRestored ( ) const
inline

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()

Definition at line 318 of file tdeapplication.h.

◆ isX11CompositionAvailable()

bool TDEApplication::isX11CompositionAvailable ( )

Returns whether or not X11 composition is available.

You must first call getX11RGBAInformation()

Note that getX11RGBAInformation() has already been called if you used the default TDEApplication constructor.

Additionally, at least one application must have called detectCompositionManagerAvailable while the current X display was active in order for this method to return valid results.

Returns
true if composition is available

Definition at line 2155 of file tdeapplication.cpp.

◆ keyboardModifiers()

uint TDEApplication::keyboardModifiers ( )
static
Deprecated:
Use keyboardMouseState()
Since
3.1

Definition at line 3592 of file tdeapplication.cpp.

◆ keyboardMouseState()

TQt::ButtonState TDEApplication::keyboardMouseState ( )
static

Returns the state of the currently pressed keyboard modifiers (e.g.

shift, control, etc.) and mouse buttons, similarly to TQKeyEvent::state() and TQMouseEvent::state(). You usually should simply use the information provided by TQKeyEvent and TQMouseEvent, 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
Since
3.4

Definition at line 3635 of file tdeapplication.cpp.

◆ kipcMessage

void TDEApplication::kipcMessage ( int  id,
int  data 
)
signal

Emitted when a KIPC user message has been received.

Parameters
idthe message id
datathe data
See also
KIPC
KIPC::Message
addKipcEventMask
removeKipcEventMask

◆ launcher()

TQCString TDEApplication::launcher ( )
static

Returns the DCOP name of the service launcher.

This will be something like klaucher_$host_$uid.

Returns
the name of the service launcher

Definition at line 3053 of file tdeapplication.cpp.

◆ makeStdCaption()

TQString TDEApplication::makeStdCaption ( const TQString &  userCaption,
bool  withAppName = true,
bool  modified = false 
) const

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(tdeApp->makeStdCaption(yourCaption));

Parameters
userCaptionThe caption string you want to display in the window caption area. Do not include the application name!
withAppNameIndicates 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.
modifiedIf 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

Definition at line 2403 of file tdeapplication.cpp.

◆ miniIcon()

TQPixmap TDEApplication::miniIcon ( ) const

Returns the mini-icon for the application as a TQPixmap.

Returns
the application's mini icon

◆ miniIconName()

TQString TDEApplication::miniIconName ( ) const

Returns the name of the mini-icon for the application.

Returns
the mini icon's name

Definition at line 1848 of file tdeapplication.cpp.

◆ mouseState()

uint TDEApplication::mouseState ( )
static
Deprecated:
Use keyboardMouseState()
Since
3.1

Definition at line 3610 of file tdeapplication.cpp.

◆ notify()

bool TDEApplication::notify ( TQObject *  receiver,
TQEvent *  event 
)

Definition at line 551 of file tdeapplication.cpp.

◆ openX11RGBADisplay()

Display * TDEApplication::openX11RGBADisplay ( )
static

Definition at line 2143 of file tdeapplication.cpp.

◆ paste

void TDEApplication::paste ( )
slot

If the widget with focus provides a paste() slot, call that slot.

Thus for a simple application copy can be implemented as:

KStdAction::paste( tdeApp, TQ_SLOT( paste() ), actionCollection() );
TDEApplication::paste
void paste()
If the widget with focus provides a paste() slot, call that slot.
Definition: tdeapplication.cpp:3032
KStdAction::paste
TDEAction * paste(const TQObject *recvr, const char *slot, TDEActionCollection *parent, const char *name=0)

Definition at line 3032 of file tdeapplication.cpp.

◆ propagateSessionManager()

void TDEApplication::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.

Definition at line 1374 of file tdeapplication.cpp.

◆ random()

int TDEApplication::random ( )
static

Generates a uniform random number.

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

Definition at line 3393 of file tdeapplication.cpp.

◆ randomString()

TQString TDEApplication::randomString ( int  length)
static

Generates a random string.

It operates in the range [A-Za-z0-9]

Parameters
lengthGenerate a string of this length.
Returns
the random string

Definition at line 3413 of file tdeapplication.cpp.

◆ ref

void TDEApplication::ref ( )
slot

Tells TDEApplication 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).

Definition at line 1247 of file tdeapplication.cpp.

◆ removeKipcEventMask()

void TDEApplication::removeKipcEventMask ( int  id)

Removes a message type from the KIPC event mask.

This message will not be handled anymore.

Parameters
idThe message id.
See also
KIPC
addKipcEventMask()
kipcMessage()

Definition at line 2333 of file tdeapplication.cpp.

◆ removeX11EventFilter()

void TDEApplication::removeX11EventFilter ( const TQWidget *  filter)

Removes global X11 event filter previously installed by installX11EventFilter().

Definition at line 534 of file tdeapplication.cpp.

◆ requestShutDown()

bool TDEApplication::requestShutDown ( ShutdownConfirm  confirm = ShutdownConfirmDefault,
ShutdownType  sdtype = ShutdownTypeDefault,
ShutdownMode  sdmode = ShutdownModeDefault 
)

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
confirmWhether to ask the user if he really wants to log out. ShutdownConfirm
sdtypeThe action to take after logging out. ShutdownType
sdmodeIf/When the action should be taken. ShutdownMode
Returns
true on success, false if the session manager could not be contacted.

Definition at line 1311 of file tdeapplication.cpp.

◆ saveState()

void TDEApplication::saveState ( TQSessionManager &  sm)

Reimplemented for internal purposes, mainly the highlevel handling of session management with KSessionManaged.

Definition at line 1482 of file tdeapplication.cpp.

◆ saveYourself

void TDEApplication::saveYourself ( )
signal
 Session management asks you to save the state of your application.

This signal is provided for compatibility only. For new
applications, simply use TDEMainWindow. By reimplementing 
TDEMainWindow::queryClose(), TDEMainWindow::saveProperties() and

TDEMainWindow::readProperties() you can simply handle session management for applications with multiple toplevel windows.

For purposes without TDEMainWindow, create an instance of KSessionManaged and reimplement the functions KSessionManaged::commitData() and/or KSessionManaged::saveState()

If you still want to use this signal, here is what you should do:

Connect to this signal in order to save your data. Do NOT manipulate the UI in that slot, it is blocked by the session manager.

Use the sessionConfig() TDEConfig object to store all your instance specific data.

Do not do any closing at this point! The user may still select Cancel wanting to continue working with your application. Cleanups could be done after shutDown() (see the following).

◆ selectAll

void TDEApplication::selectAll ( )
slot

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( tdeApp, TQ_SLOT( selectAll() ), actionCollection() );
TDEApplication::selectAll
void selectAll()
If the widget with focus provides a selectAll() slot, call that slot.
Definition: tdeapplication.cpp:3042
KStdAction::selectAll
TDEAction * selectAll(const TQObject *recvr, const char *slot, TDEActionCollection *parent, const char *name=0)

Definition at line 3042 of file tdeapplication.cpp.

◆ sessionConfig()

TDEConfig * TDEApplication::sessionConfig ( )

Returns the application session config object.

Returns
A pointer to the application's instance specific TDEConfig object.
See also
TDEConfig

Definition at line 1237 of file tdeapplication.cpp.

◆ sessionSaving()

bool TDEApplication::sessionSaving ( ) const

Returns true if the application is currently saving its session data (most probably before KDE logout).

This is intended for use mainly in TDEMainWindow::queryClose() and TDEMainWindow::queryExit().

See also
TDEMainWindow::queryClose
TDEMainWindow::queryExit
Since
3.1.1

Definition at line 1564 of file tdeapplication.cpp.

◆ setStartupId()

void TDEApplication::setStartupId ( const TQCString &  startup_id)

Definition at line 3360 of file tdeapplication.cpp.

◆ settingsChanged

void TDEApplication::settingsChanged ( int  category)
signal

Emitted when the global settings have been changed - see TDEGlobalSettings TDEApplication takes care of calling reparseConfiguration on TDEGlobal::config() so that applications/classes using this only have to re-read the configuration.

Parameters
categorythe category among the enum above

◆ setTopWidget()

void TDEApplication::setTopWidget ( TQWidget *  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 TDEMainWindow.

Parameters
topWidgetA top widget of the application.
See also
icon(), caption()

Definition at line 3334 of file tdeapplication.cpp.

◆ shutDown

void TDEApplication::shutDown ( )
signal

Your application is killed.

Either by your program itself, xkill or (the usual case) by KDE's logout.

The signal is particularly useful if your application has to do some last-second cleanups. Note that no user interaction is possible at this state.

◆ startKdeinit()

void TDEApplication::startKdeinit ( )
static

Definition at line 1569 of file tdeapplication.cpp.

◆ startServiceByDesktopName() [1/2]

int TDEApplication::startServiceByDesktopName ( const TQString &  _name,
const TQString &  URL,
TQString *  error = 0,
TQCString *  dcopService = 0,
int *  pid = 0,
const TQCString &  startup_id = "",
bool  noWait = false 
)
static

Starts a service based on the desktop name of the service.

E.g. "konqueror"

Parameters
_namethe desktop name of the service
URLif not empty this URL is passed to the service
errorOn failure, error contains a description of the error that occurred. If the pointer is 0, the argument will be ignored
dcopServiceOn 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
pidOn success, the process id of the new service will be written here. If the pointer is 0, the argument will be ignored.
startup_idfor app startup notification, "0" for none, "" ( empty string ) is the default
noWaitif set, the function does not wait till the service is running.
Returns
an error code indicating success (== 0) or failure (> 0).

Definition at line 3184 of file tdeapplication.cpp.

◆ startServiceByDesktopName() [2/2]

int TDEApplication::startServiceByDesktopName ( const TQString &  _name,
const TQStringList &  URLs = TQStringList(),
TQString *  error = 0,
TQCString *  dcopService = 0,
int *  pid = 0,
const TQCString &  startup_id = "",
bool  noWait = false 
)
static

Starts a service based on the desktop name of the service.

E.g. "konqueror"

Parameters
_namethe desktop name of the service
URLsif not empty these URLs will be passed to the service
errorOn failure, error contains a description of the error that occurred. If the pointer is 0, the argument will be ignored
dcopServiceOn 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
pidOn success, the process id of the new service will be written here. If the pointer is 0, the argument will be ignored.
startup_idfor app startup notification, "0" for none, "" ( empty string ) is the default
noWaitif set, the function does not wait till the service is running.
Returns
an error code indicating success (== 0) or failure (> 0).

Definition at line 3196 of file tdeapplication.cpp.

◆ startServiceByDesktopPath() [1/2]

int TDEApplication::startServiceByDesktopPath ( const TQString &  _name,
const TQString &  URL,
TQString *  error = 0,
TQCString *  dcopService = 0,
int *  pid = 0,
const TQCString &  startup_id = "",
bool  noWait = false 
)
static

Starts a service based on the desktop path of the service.

E.g. "Applications/konqueror.desktop" or "/home/user/bla/myfile.desktop"

Parameters
_namethe path of the desktop file
URLif not empty this URL is passed to the service
errorOn failure, error contains a description of the error that occurred. If the pointer is 0, the argument will be ignored
dcopServiceOn 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
pidOn success, the process id of the new service will be written here. If the pointer is 0, the argument will be ignored.
startup_idfor app startup notification, "0" for none, "" ( empty string ) is the default
noWaitif set, the function does not wait till the service is running.
Returns
an error code indicating success (== 0) or failure (> 0).

Definition at line 3163 of file tdeapplication.cpp.

◆ startServiceByDesktopPath() [2/2]

int TDEApplication::startServiceByDesktopPath ( const TQString &  _name,
const TQStringList &  URLs = TQStringList(),
TQString *  error = 0,
TQCString *  dcopService = 0,
int *  pid = 0,
const TQCString &  startup_id = "",
bool  noWait = false 
)
static

Starts a service based on the desktop path of the service.

E.g. "Applications/konqueror.desktop" or "/home/user/bla/myfile.desktop"

Parameters
_namethe path of the desktop file
URLsif not empty these URLs will be passed to the service
errorOn failure, error contains a description of the error that occurred. If the pointer is 0, the argument will be ignored
dcopServiceOn 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
pidOn success, the process id of the new service will be written here. If the pointer is 0, the argument will be ignored.
startup_idfor app startup notification, "0" for none, "" ( empty string ) is the default
noWaitif set, the function does not wait till the service is running.
Returns
an error code indicating success (== 0) or failure (> 0).

Definition at line 3175 of file tdeapplication.cpp.

◆ startServiceByName() [1/2]

int TDEApplication::startServiceByName ( const TQString &  _name,
const TQString &  URL,
TQString *  error = 0,
TQCString *  dcopService = 0,
int *  pid = 0,
const TQCString &  startup_id = "",
bool  noWait = false 
)
static

Starts a service based on the (translated) name of the service.

E.g. "Web Browser"

Parameters
_namethe name of the service
URLif not empty this URL is passed to the service
errorOn failure, error contains a description of the error that occurred. If the pointer is 0, the argument will be ignored
dcopServiceOn 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
pidOn success, the process id of the new service will be written here. If the pointer is 0, the argument will be ignored.
startup_idfor app startup notification, "0" for none, "" ( empty string ) is the default
noWaitif set, the function does not wait till the service is running.
Returns
an error code indicating success (== 0) or failure (> 0).

Definition at line 3142 of file tdeapplication.cpp.

◆ startServiceByName() [2/2]

int TDEApplication::startServiceByName ( const TQString &  _name,
const TQStringList &  URLs = TQStringList(),
TQString *  error = 0,
TQCString *  dcopService = 0,
int *  pid = 0,
const TQCString &  startup_id = "",
bool  noWait = false 
)
static

Starts a service based on the (translated) name of the service.

E.g. "Web Browser"

Parameters
_namethe name of the service
URLsif not empty these URLs will be passed to the service
errorOn failure, error contains a description of the error that occurred. If the pointer is 0, the argument will be ignored
dcopServiceOn 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
pidOn success, the process id of the new service will be written here. If the pointer is 0, the argument will be ignored.
startup_idfor app startup notification, "0" for none, "" ( empty string ) is the default
noWaitif set, the function does not wait till the service is running.
Returns
an error code indicating success (== 0) or failure (> 0).

Definition at line 3154 of file tdeapplication.cpp.

◆ startupId()

TQCString TDEApplication::startupId ( ) const

Returns the app startup notification identifier for this running application.

Returns
the startup notification identifier

Definition at line 3355 of file tdeapplication.cpp.

◆ tdeApplication()

static TDEApplication * TDEApplication::tdeApplication ( )
inlinestatic

Returns the current application object.

This is similar to the global TQApplication pointer tqApp. It allows access to the single global TDEApplication 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

Definition at line 299 of file tdeapplication.h.

◆ tdedisplayFontChanged

void TDEApplication::tdedisplayFontChanged ( )
signal

Emitted when TDEApplication has changed its font in response to a KControl request.

Normally widgets will update their fonts automatically, but you should connect to this to monitor global font changes, especially if you are using explicit fonts.

Note: If you derive from a TQWidget-based class, a faster method is to reimplement TQWidget::fontChange(). This is the preferred way to get informed about font updates.

◆ tdedisplayPaletteChanged

void TDEApplication::tdedisplayPaletteChanged ( )
signal

Emitted when TDEApplication has changed its palette due to a KControl request.

Normally, widgets will update their palette automatically, but you should connect to this to program special behavior.

◆ tdedisplayStyleChanged

void TDEApplication::tdedisplayStyleChanged ( )
signal

Emitted when TDEApplication has changed its GUI style in response to a KControl request.

Normally, widgets will update their styles automatically (as they would respond to an explicit setGUIStyle() call), but you should connect to this to program special behavior.

◆ tdeinitExec() [1/2]

int TDEApplication::tdeinitExec ( const TQString &  name,
const TQStringList &  args,
TQString *  error,
int *  pid,
const TQCString &  startup_id 
)
static

Starts a program via tdeinit.

program name and arguments are converted to according to the local encoding and passed as is to tdeinit.

Parameters
nameName of the program to start
argsArguments to pass to the program
errorOn failure, error contains a description of the error that occurred. If the pointer is 0, the argument will be ignored
pidOn success, the process id of the new service will be written here. If the pointer is 0, the argument will be ignored.
startup_idfor app startup notification, "0" for none, "" ( empty string ) is the default
Returns
an error code indicating success (== 0) or failure (> 0).

Definition at line 3212 of file tdeapplication.cpp.

◆ tdeinitExec() [2/2]

int TDEApplication::tdeinitExec ( const TQString &  name,
const TQStringList &  args = TQStringList(),
TQString *  error = 0,
int *  pid = 0 
)
static

Definition at line 3205 of file tdeapplication.cpp.

◆ tdeinitExecWait() [1/2]

int TDEApplication::tdeinitExecWait ( const TQString &  name,
const TQStringList &  args,
TQString *  error,
int *  pid,
const TQCString &  startup_id 
)
static

Starts a program via tdeinit and wait for it to finish.

Like tdeinitExec(), but it waits till the program is finished. As such it behaves similar to the system(...) function.

Parameters
nameName of the program to start
argsArguments to pass to the program
errorOn failure, error contains a description of the error that occurred. If the pointer is 0, the argument will be ignored
pidOn success, the process id of the new service will be written here. If the pointer is 0, the argument will be ignored.
startup_idfor app startup notification, "0" for none, "" ( empty string ) is the default
Returns
an error code indicating success (== 0) or failure (> 0).

Definition at line 3227 of file tdeapplication.cpp.

◆ tdeinitExecWait() [2/2]

int TDEApplication::tdeinitExecWait ( const TQString &  name,
const TQStringList &  args = TQStringList(),
TQString *  error = 0,
int *  pid = 0 
)
static

Definition at line 3220 of file tdeapplication.cpp.

◆ tdestyle()

TDE_DEPRECATED TDEStyle * TDEApplication::tdestyle ( ) const
inline
Deprecated:

Definition at line 894 of file tdeapplication.h.

◆ tempSaveName()

TQString TDEApplication::tempSaveName ( const TQString &  pFilename) const

Get a file name in order to make a temporary copy of your document.

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

Definition at line 3234 of file tdeapplication.cpp.

◆ toolbarAppearanceChanged

void TDEApplication::toolbarAppearanceChanged ( int  )
signal

Emitted when the settings for toolbars have been changed.

TDEToolBar will know what to do.

◆ updateRemoteUserTimestamp()

void TDEApplication::updateRemoteUserTimestamp ( const TQCString &  dcopId,
unsigned long  time = 0 
)

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 tdebase/twin/README.

Since
3.3

Definition at line 2299 of file tdeapplication.cpp.

◆ updateUserTimestamp()

void TDEApplication::updateUserTimestamp ( unsigned long  time = 0)

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 tdebase/twin/README.

Since
3.2

Definition at line 2266 of file tdeapplication.cpp.

◆ userTimestamp()

unsigned long TDEApplication::userTimestamp ( ) const

Returns the last user action timestamp or 0 if no user activity has taken place yet.

Since
3.2.3
See also
updateuserTimestamp

Definition at line 2290 of file tdeapplication.cpp.

◆ virtual_hook()

void TDEApplication::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

Reimplemented from TDEInstance.

Definition at line 3726 of file tdeapplication.cpp.

◆ xErrhandler()

int TDEApplication::xErrhandler ( Display *  dpy,
void *  err_ 
)

Definition at line 941 of file tdeapplication.cpp.

◆ xioErrhandler()

int TDEApplication::xioErrhandler ( Display *  dpy)

Definition at line 926 of file tdeapplication.cpp.

Member Data Documentation

◆ icon

TQPixmap TDEApplication::icon

Definition at line 1333 of file tdeapplication.h.

◆ kipcCommAtom

Atom TDEApplication::kipcCommAtom
protected

Definition at line 1277 of file tdeapplication.h.

◆ kipcEventMask

int TDEApplication::kipcEventMask
protected

Definition at line 1278 of file tdeapplication.h.

◆ loadedByKdeinit

bool TDEApplication::loadedByKdeinit = false
static

Definition at line 1382 of file tdeapplication.h.

◆ miniIcon

TQPixmap TDEApplication::miniIcon

Definition at line 1333 of file tdeapplication.h.

◆ pArgc

int TDEApplication::pArgc
protected

Definition at line 1282 of file tdeapplication.h.

◆ TDEApp

TDEApplication * TDEApplication::TDEApp = nullptr
staticprotected

Current application object.

Definition at line 1281 of file tdeapplication.h.

◆ unused

char TDEApplication::unused[sizeof(oldPixmapType)]

Definition at line 1335 of file tdeapplication.h.


The documentation for this class was generated from the following files:
  • tdeapplication.h
  • kapplication_win.cpp
  • tdeapplication.cpp

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.