diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-13 19:49:36 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-13 19:49:36 +0000 |
commit | b56a10ae43f369fd79100bd82e99cab169ed6220 (patch) | |
tree | 9c16894ef43c0290539e4290f0dcbf54ff9237bf /kdecore/kapplication.h | |
parent | 356e5c30a8bf03e240f9a79043bcfc25c2f72494 (diff) | |
download | tdelibs-b56a10ae43f369fd79100bd82e99cab169ed6220.tar.gz tdelibs-b56a10ae43f369fd79100bd82e99cab169ed6220.zip |
Fix kapplication ARGB init methods
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1246945 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdecore/kapplication.h')
-rw-r--r-- | kdecore/kapplication.h | 45 |
1 files changed, 30 insertions, 15 deletions
diff --git a/kdecore/kapplication.h b/kdecore/kapplication.h index 9558d528e..ee0d48f02 100644 --- a/kdecore/kapplication.h +++ b/kdecore/kapplication.h @@ -113,9 +113,11 @@ public: * This constructor takes aboutData and command line * arguments from KCmdLineArgs. * - * If ARGB (transparent) widgets are to be used in your application, - * please use KARGBApplication(new object name) or - * KARGBApplication(new object name, allow_styles) instead of KApplication(...). + * If ARGB (transparent) widgets are to be used in your application, + * please use + * KApplication app(KApplication::openX11RGBADisplay()); + * or + * KApplication app(KApplication::openX11RGBADisplay(), useStyles); * * @param allowStyles Set to false to disable the loading on plugin based * styles. This is only useful to applications that do not display a GUI @@ -131,6 +133,25 @@ public: #ifdef Q_WS_X11 /** * Constructor. Parses command-line arguments. Use this constructor when you + * you want ARGB support to be automatically detected and enabled. + * + * @param display Will be passed to Qt as the X display. The display must be + * valid and already opened. + * + * @param 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 @p allowStyles set to false + * that normally runs in the background but under special circumstances + * displays widgets call enableStyles() before displaying any widgets. + * + * @since KDE 3.5 + * + * @see RGBADisplay() + */ + KApplication(Display *display, bool allowStyles); + + /** + * Constructor. Parses command-line arguments. Use this constructor when you * you need to use a non-default visual or colormap. * * @param display Will be passed to Qt as the X display. The display must be @@ -899,19 +920,13 @@ public: /** * @internal - * Opens an X11 display and returns the handle to it - * @return the X11 display handle + * Opens the display + * This can be used to initialize a KApplication with RGBA support like this: + * KApplication app(KApplication::openX11RGBADisplay()); + * or + * KApplication app(KApplication::openX11RGBADisplay(), useStyles); */ - Display *openX11RGBADisplay(); - - /** - * @internal - * Creates a default KApplication with transparency support - * (if available) - */ - static KApplication KARGBApplicationObject( bool allowStyles=true ); - - #define KARGBApplication(objectname, ...) const KApplication &__kapplication_internal_app = KApplication::KARGBApplicationObject(__VA_ARGS__); KApplication &objectname = const_cast<KApplication&>(__kapplication_internal_app); + static Display* openX11RGBADisplay(); /** * Returns the X11 display visual |