From 4aed2c8219774f5d797760606b8489a92ddc5163 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- ksplashml/themeengine/themeengine.h | 82 +++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 ksplashml/themeengine/themeengine.h (limited to 'ksplashml/themeengine/themeengine.h') diff --git a/ksplashml/themeengine/themeengine.h b/ksplashml/themeengine/themeengine.h new file mode 100644 index 000000000..62461cd4e --- /dev/null +++ b/ksplashml/themeengine/themeengine.h @@ -0,0 +1,82 @@ +/*************************************************************************** + * Copyright Brian Ledbetter 2001-2003 * + * Copyright Ravikiran Rajagopal 2003 * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License (version 2) as * + * published by the Free Software Foundation. (The original KSplash/ML * + * codebase (upto version 0.95.3) is BSD-licensed.) * + * * + ***************************************************************************/ + +#ifndef THEMEENGINE_H +#define THEMEENGINE_H + +#include +#include +#include + +#include + +class KConfig; +class ObjKsTheme; +class QMouseEvent; + +/** + * @short The base for the ThemeEngine's configuration widget. + */ +class KDE_EXPORT ThemeEngineConfig: public QVBox +{ + Q_OBJECT +public: + + ThemeEngineConfig( QWidget *p, KConfig *c ) + :QVBox( p ), mConfig( c ) + {} + + KConfig* config()const { return mConfig; } + +public slots: + virtual void load() {} + virtual void save() {} + +protected: + KConfig *mConfig; +}; + +/** + * @short Base class for all theme engines. Member functions need to be + * overridden by derived classes in order to provide actual functionality. + */ +class KDE_EXPORT ThemeEngine: public QVBox +{ + Q_OBJECT +public: + ThemeEngine( QWidget *parent, const char *name, const QStringList &args ); + virtual ~ThemeEngine() = 0; + virtual const ThemeEngineConfig *config( QWidget *, KConfig * ) { return 0L; } + virtual ObjKsTheme *ksTheme() { return mTheme; } + virtual bool eventFilter( QObject* o, QEvent* e ); + +public slots: + virtual void slotUpdateProgress( int ) {} + virtual void slotUpdateSteps( int ) {} + virtual void slotSetText( const QString& ) {} + virtual void slotSetPixmap( const QString& ) {} // use DesktopIcon() to load this. + +protected: + void addSplashWindow( QWidget* ); + +protected: + ObjKsTheme *mTheme; + virtual bool x11Event( XEvent* ); + +private slots: + void splashWindowDestroyed( QObject* ); + +private: + class ThemeEnginePrivate; + ThemeEnginePrivate *d; +}; + +#endif -- cgit v1.2.1