summaryrefslogtreecommitdiffstats
path: root/ksplashml/themeengine/redmond/previewredmond.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit4aed2c8219774f5d797760606b8489a92ddc5163 (patch)
tree3f8c130f7d269626bf6a9447407ef6c35954426a /ksplashml/themeengine/redmond/previewredmond.h
downloadtdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz
tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip
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
Diffstat (limited to 'ksplashml/themeengine/redmond/previewredmond.h')
-rw-r--r--ksplashml/themeengine/redmond/previewredmond.h104
1 files changed, 104 insertions, 0 deletions
diff --git a/ksplashml/themeengine/redmond/previewredmond.h b/ksplashml/themeengine/redmond/previewredmond.h
new file mode 100644
index 000000000..3b67f293b
--- /dev/null
+++ b/ksplashml/themeengine/redmond/previewredmond.h
@@ -0,0 +1,104 @@
+/***************************************************************************
+ * Copyright Brian Ledbetter 2001-2003 <brian@shadowcom.net> *
+ * 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 __PREVIEWREDMOND_H__
+#define __PREVIEWREDMOND_H__
+
+#include <kiconloader.h>
+
+#include <qcolor.h>
+#include <qfont.h>
+#include <qwidget.h>
+
+/*
+ * class PreviewRedmond: Provides a sneak peek at how certain Redmond
+ * settings will look. This will not be able to render any background
+ * images, so we'll just use a nice shade of gray or black as the
+ * background...
+ */
+class PreviewRedmond: public QWidget
+{
+ Q_OBJECT
+public:
+
+ PreviewRedmond( QWidget* );
+
+ inline void setWelcomeString( const QString& s )
+ {
+ m_welcomeString = s;
+ _updateCache();
+ }
+ inline void setUserString( const QString& s )
+ {
+ m_userString = s;
+ _updateCache();
+ }
+
+ inline void setWelcomeFont( const QFont& f )
+ {
+ m_welcomeFont = f;
+ _updateCache();
+ }
+ inline void setUserFont( const QFont& f )
+ {
+ m_userFont = f;
+ _updateCache();
+ }
+ inline void setStatusFont( const QFont& f )
+ {
+ m_statusFont = f;
+ _updateCache();
+ }
+
+ inline void setWelcomeColor( const QColor& c )
+ {
+ m_welcomeColor = c;
+ _updateCache();
+ }
+ inline void setWelcomeShadowColor( const QColor& c )
+ {
+ m_welcomeShadowColor = c;
+ _updateCache();
+ }
+ inline void setUserColor( const QColor& c )
+ {
+ m_userColor = c;
+ _updateCache();
+ }
+ inline void setStatusColor( const QColor& c )
+ {
+ m_statusColor = c;
+ _updateCache();
+ }
+
+ inline void setIcon( const QString& s )
+ {
+ m_icon = DesktopIcon( s );
+ _updateCache();
+ }
+
+protected:
+ void _updateCache();
+ void paintEvent( QPaintEvent* );
+ void resizeEvent( QResizeEvent* );
+
+ QPixmap m_cache;
+
+ QString m_welcomeString, m_userString;
+ QFont m_welcomeFont, m_userFont, m_statusFont;
+ QColor m_welcomeColor, m_welcomeShadowColor, m_userColor, m_statusColor;
+ QPixmap m_icon;
+
+ bool m_showWelcomeString, m_showUserString, m_showUserIcon, m_showStatusString;
+};
+
+#endif