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/default/themelegacy.h | 103 ++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 ksplashml/themeengine/default/themelegacy.h (limited to 'ksplashml/themeengine/default/themelegacy.h') diff --git a/ksplashml/themeengine/default/themelegacy.h b/ksplashml/themeengine/default/themelegacy.h new file mode 100644 index 000000000..b0a6138a9 --- /dev/null +++ b/ksplashml/themeengine/default/themelegacy.h @@ -0,0 +1,103 @@ +/*************************************************************************** + * Copyright Brian Ledbetter 2001-2003 * + * Copyright Ravikiran Rajagopal 2003 * + * ravi@ee.eng.ohio-state.edu * + * * + * 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 __THEMELEGACY_H__ +#define __THEMELEGACY_H__ + +#include + +#include +#include + +#include "themeengine.h" +class QPixmap; +class QTimer; + +class QCheckBox; + +class DefaultConfig: public ThemeEngineConfig +{ + Q_OBJECT +public: + DefaultConfig( QWidget *, KConfig * ); + void save(); +protected: + QCheckBox *mFlash, *mAlwaysShow; +}; + +/** + * @short Traditional KDE splash screen. + */ +class ObjKsTheme; +class KDE_EXPORT ThemeDefault : public ThemeEngine +{ + Q_OBJECT +public: + ThemeDefault( QWidget *, const char *, const QStringList& ); + virtual ~ThemeDefault(); + + inline const DefaultConfig *config( QWidget *p, KConfig *c ) + { + return new DefaultConfig( p, c ); + }; + + static QStringList names() + { + QStringList Names; + Names << "Default"; + Names << "Classic"; + Names << "Klassic"; + return( Names ); + } + +public slots: + inline void slotSetText( const QString& s ) + { + if( mLabel ) + mLabel->setText( s ); + slotUpdateState(); + }; + inline void slotUpdateSteps( int s ) + { + mProgressBar->show(); + mProgressBar->setTotalSteps( s ); + } + inline void slotUpdateProgress( int i ) + { + mProgressBar->setProgress( i ); + } + + +private slots: + void slotUpdateState(); + QPixmap updateBarPixmap( int ); + void flash(); + +private: + void _initUi(); + void _readSettings(); + QString _findPicture( const QString &pic ); + + // Configurable Options + bool mIconsFlashing; + QColor mLabelForeground; + + // Internals. + KProgress *mProgressBar; + QLabel *mLabel, *mBarLabel; + QPixmap *mActivePixmap, *mInactivePixmap; + int mState; + QTimer *mFlashTimer; + QPixmap *mFlashPixmap1, *mFlashPixmap2; +}; + +#endif -- cgit v1.2.1