diff options
Diffstat (limited to 'tdecore/tdeapplication.h')
| -rw-r--r-- | tdecore/tdeapplication.h | 84 |
1 files changed, 41 insertions, 43 deletions
diff --git a/tdecore/tdeapplication.h b/tdecore/tdeapplication.h index 1b4fbe097..171ae2eec 100644 --- a/tdecore/tdeapplication.h +++ b/tdecore/tdeapplication.h @@ -1,4 +1,4 @@ -/* This file is part of the KDE libraries +/* This file is part of the TDE libraries Copyright (C) 1997 Matthias Kalle Dalheimer (kalle@kde.org) Copyright (c) 1998, 1999 KDE Team @@ -18,8 +18,8 @@ Boston, MA 02110-1301, USA. */ -#ifndef _TDEAPP_H -#define _TDEAPP_H +#ifndef __TDEAPPLICATION_H__ +#define __TDEAPPLICATION_H__ // Version macros. Never put this further down. #include "tdeversion.h" @@ -30,16 +30,14 @@ class KCharsets; class DCOPClient; class DCOPObject; -#include <tqtglobaldefines.h> - typedef unsigned long Atom; -#if !defined(Q_WS_X11) +#if !defined(TQ_WS_X11) typedef void Display; #endif #include <tqapplication.h> #include <tqpixmap.h> -#include <kinstance.h> +#include <tdeinstance.h> struct _IceConn; class TQPopupMenu; @@ -48,7 +46,7 @@ class KSessionManaged; class TDEStyle; class KURL; -#define kapp TDEApplication::kApplication() +#define tdeApp TDEApplication::tdeApplication() class TDEApplicationPrivate; @@ -56,7 +54,7 @@ class TDEApplicationPrivate; * 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. +* 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. @@ -96,7 +94,7 @@ class TDEApplicationPrivate; class TDECORE_EXPORT TDEApplication : public TQApplication, public TDEInstance { - Q_OBJECT + TQ_OBJECT public: /** Position of the caption (presumably in the application window's * title bar). This enum appears to be unused. @@ -140,7 +138,7 @@ public: #endif // TDEAPPLICATION_BINARY_COMPAT_HACK #endif // Q_QDOC -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 /** * Constructor. Parses command-line arguments. Use this constructor when you * you want ARGB support to be automatically detected and enabled. @@ -187,7 +185,7 @@ public: * * @see RGBADisplay() */ - TDEApplication(Display *display, bool disable_argb, Qt::HANDLE visual, Qt::HANDLE colormap, bool allowStyles); + TDEApplication(Display *display, bool disable_argb, TQt::HANDLE visual, TQt::HANDLE colormap, bool allowStyles); /** * Constructor. Parses command-line arguments. Use this constructor when you @@ -212,7 +210,7 @@ public: * * @since KDE 3.3 */ - TDEApplication(Display *display, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0, + TDEApplication(Display *display, TQt::HANDLE visual = 0, TQt::HANDLE colormap = 0, bool allowStyles=true); /** @@ -268,7 +266,7 @@ public: // REMOVE FOR KDE 4.0 - using it only gives crashing applications because // TDECmdLineArgs::init isn't called TDEApplication(int& argc, char** argv, - const TQCString& rAppName, bool allowStyles=true, bool GUIenabled=true, bool SMenabled=true) KDE_DEPRECATED; + const TQCString& rAppName, bool allowStyles=true, bool GUIenabled=true, bool SMenabled=true) TDE_DEPRECATED; #ifdef Q_QDOC #else // Q_QDOC @@ -277,7 +275,7 @@ public: // FOR BINARY COMPATIBILITY ONLY // REMOVE WHEN PRACTICAL! TDEApplication(int& argc, char** argv, - const TQCString& rAppName, bool allowStyles, bool GUIenabled) KDE_DEPRECATED; + const TQCString& rAppName, bool allowStyles, bool GUIenabled) TDE_DEPRECATED; #endif // TDEAPPLICATION_BINARY_COMPAT_HACK #endif // Q_QDOC @@ -298,7 +296,7 @@ public: * to every function that may require it. * @return the current application object */ - static TDEApplication* kApplication() { return KApp; } + static TDEApplication* tdeApplication() { return TDEApp; } /** * Returns the application session config object. @@ -545,7 +543,7 @@ public: * value will be appended to the filename, * prefixed with a "#" (hash) character. */ - void invokeHTMLHelp( const TQString& aFilename, const TQString& aTopic = TQString::null ) const KDE_DEPRECATED; + void invokeHTMLHelp( const TQString& aFilename, const TQString& aTopic = TQString::null ) const TDE_DEPRECATED; /** * Convenience method; invokes the standard email application. @@ -621,7 +619,7 @@ public slots: * If the widget with focus provides a cut() slot, call that slot. Thus for a * simple application cut can be implemented as: * \code - * KStdAction::cut( kapp, TQT_SLOT( cut() ), actionCollection() ); + * KStdAction::cut( tdeApp, TQ_SLOT( cut() ), actionCollection() ); * \endcode */ void cut(); @@ -630,7 +628,7 @@ public slots: * If the widget with focus provides a copy() slot, call that slot. Thus for a * simple application copy can be implemented as: * \code - * KStdAction::copy( kapp, TQT_SLOT( copy() ), actionCollection() ); + * KStdAction::copy( tdeApp, TQ_SLOT( copy() ), actionCollection() ); * \endcode */ void copy(); @@ -639,7 +637,7 @@ public slots: * If the widget with focus provides a paste() slot, call that slot. Thus for a * simple application copy can be implemented as: * \code - * KStdAction::paste( kapp, TQT_SLOT( paste() ), actionCollection() ); + * KStdAction::paste( tdeApp, TQ_SLOT( paste() ), actionCollection() ); * \endcode */ void paste(); @@ -648,7 +646,7 @@ public slots: * If the widget with focus provides a clear() slot, call that slot. Thus for a * simple application clear() can be implemented as: * \code - * new TDEAction( i18n( "Clear" ), "edit-clear", 0, kapp, TQT_SLOT( clear() ), actionCollection(), "clear" ); + * new TDEAction( i18n( "Clear" ), "edit-clear", 0, tdeApp, TQ_SLOT( clear() ), actionCollection(), "clear" ); * \endcode * * Note that for some widgets, this may not provide the intended bahavior. For @@ -660,7 +658,7 @@ public slots: * * \code * class MyListView : public TDEListView { - * Q_OBJECT + * TQ_OBJECT * public: * MyListView( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) : TDEListView( parent, name, f ) {} * virtual ~MyListView() {} @@ -675,7 +673,7 @@ public slots: * If the widget with focus provides a selectAll() slot, call that slot. Thus for a * simple application select all can be implemented as: * \code - * KStdAction::selectAll( kapp, TQT_SLOT( selectAll() ), actionCollection() ); + * KStdAction::selectAll( tdeApp, TQ_SLOT( selectAll() ), actionCollection() ); * \endcode */ void selectAll(); @@ -893,14 +891,14 @@ public: /** * @deprecated */ - KDE_DEPRECATED TDEStyle* tdestyle() const { return 0; } + TDE_DEPRECATED TDEStyle* tdestyle() const { return 0; } /** * 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: @p setCaption(kapp->makeStdCaption(yourCaption)); + * for your window, simply do: @p setCaption(tdeApp->makeStdCaption(yourCaption)); * * @param userCaption The caption string you want to display in the * window caption area. Do not include the application name! @@ -935,7 +933,7 @@ public: */ TQString checkRecoverFile( const TQString& pFilename, bool& bRecover ) const; -#if defined(Q_WS_X11) +#if defined(TQ_WS_X11) /** * @internal * Get the X11 display @@ -964,7 +962,7 @@ public: * Note that calling this method will probably cause the screen to flicker. * @see isCompositionManagerAvailable() * @param force_available If set, force TDE to assume a composition manager is available - * @param available Whether or not the composition manager is available (only used if force_available is TRUE) + * @param available Whether or not the composition manager is available (only used if force_available is true) * @return whether the composition manager is enabled */ bool detectCompositionManagerAvailable(bool force_available=false, bool available=true); @@ -984,14 +982,14 @@ public: * * @return A pointer to the X11 display visual */ - Qt::HANDLE getX11RGBAVisual(Display *dpy); + TQt::HANDLE getX11RGBAVisual(Display *dpy); /** * Returns the X11 display colormap * * @return An X11 display colormap object */ - Qt::HANDLE getX11RGBAColormap(Display *dpy); + TQt::HANDLE getX11RGBAColormap(Display *dpy); /** * Returns whether or not X11 composition is available @@ -1219,7 +1217,7 @@ public: * @deprecated Use keyboardMouseState() * @since 3.1 */ - static uint keyboardModifiers() KDE_DEPRECATED; + static uint keyboardModifiers() TDE_DEPRECATED; /** @deprecated Same values as Button1Mask etc. in X.h */ enum { Button1Pressed = 1<<8, @@ -1231,7 +1229,7 @@ public: * @deprecated Use keyboardMouseState() * @since 3.1 */ - static uint mouseState() KDE_DEPRECATED; + static uint mouseState() TDE_DEPRECATED; /** * Returns the VT that the current X server is running on, or -1 if this information is unavailable. @@ -1258,15 +1256,15 @@ public slots: protected: /** - * @internal Used by KUniqueApplication + * @internal Used by TDEUniqueApplication */ TDEApplication( bool allowStyles, bool GUIenabled, TDEInstance* _instance ); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 /** - * @internal Used by KUniqueApplication + * @internal Used by TDEUniqueApplication */ - TDEApplication( Display *display, Qt::HANDLE visual, Qt::HANDLE colormap, + TDEApplication( Display *display, TQt::HANDLE visual, TQt::HANDLE colormap, bool allowStyles, TDEInstance* _instance ); /** @@ -1280,14 +1278,14 @@ protected: int kipcEventMask; /// Current application object. - static TDEApplication *KApp; + static TDEApplication *TDEApp; int pArgc; /** * 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. * - * @param slot is the slot as returned using the TQT_SLOT() macro, for example TQT_SLOT( cut() ) + * @param slot is 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): @@ -1295,7 +1293,7 @@ protected: * \code * void MyApplication::deselect() * { - * invokeEditSlot( TQT_SLOT( deselect() ) ); + * invokeEditSlot( TQ_SLOT( deselect() ) ); * } * \endcode * @@ -1303,7 +1301,7 @@ protected: * focused widget if it provides this slot. You can combine this with TDEAction with: * * \code - * KStdAction::deselect( static_cast<MyApplication *>( kapp ), TQT_SLOT( cut() ), actionCollection() ); + * KStdAction::deselect( static_cast<MyApplication *>( tdeApp ), TQ_SLOT( cut() ), actionCollection() ); * \endcode * * @see cut() @@ -1352,9 +1350,9 @@ private: void initUrlActionRestrictions(); bool argb_visual; -#if defined(Q_WS_X11) - Qt::HANDLE argb_x11_visual; - Qt::HANDLE argb_x11_colormap; +#if defined(TQ_WS_X11) + TQt::HANDLE argb_x11_visual; + TQt::HANDLE argb_x11_colormap; #endif public: @@ -1452,7 +1450,7 @@ signals: * connect to this to monitor global font changes, especially if you are * using explicit fonts. * - * Note: If you derive from a QWidget-based class, a faster method is to + * 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. */ |
