00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef __PREVIEWREDMOND_H__
00014 #define __PREVIEWREDMOND_H__
00015
00016 #include <kiconloader.h>
00017
00018 #include <tqcolor.h>
00019 #include <tqfont.h>
00020 #include <tqwidget.h>
00021
00022
00023
00024
00025
00026
00027
00028 class PreviewRedmond: public QWidget
00029 {
00030 Q_OBJECT
00031 public:
00032
00033 PreviewRedmond( TQWidget* );
00034
00035 inline void setWelcomeString( const TQString& s )
00036 {
00037 m_welcomeString = s;
00038 _updateCache();
00039 }
00040 inline void setUserString( const TQString& s )
00041 {
00042 m_userString = s;
00043 _updateCache();
00044 }
00045
00046 inline void setWelcomeFont( const TQFont& f )
00047 {
00048 m_welcomeFont = f;
00049 _updateCache();
00050 }
00051 inline void setUserFont( const TQFont& f )
00052 {
00053 m_userFont = f;
00054 _updateCache();
00055 }
00056 inline void setStatusFont( const TQFont& f )
00057 {
00058 m_statusFont = f;
00059 _updateCache();
00060 }
00061
00062 inline void setWelcomeColor( const TQColor& c )
00063 {
00064 m_welcomeColor = c;
00065 _updateCache();
00066 }
00067 inline void setWelcomeShadowColor( const TQColor& c )
00068 {
00069 m_welcomeShadowColor = c;
00070 _updateCache();
00071 }
00072 inline void setUserColor( const TQColor& c )
00073 {
00074 m_userColor = c;
00075 _updateCache();
00076 }
00077 inline void setStatusColor( const TQColor& c )
00078 {
00079 m_statusColor = c;
00080 _updateCache();
00081 }
00082
00083 inline void setIcon( const TQString& s )
00084 {
00085 m_icon = DesktopIcon( s );
00086 _updateCache();
00087 }
00088
00089 protected:
00090 void _updateCache();
00091 void paintEvent( TQPaintEvent* );
00092 void resizeEvent( TQResizeEvent* );
00093
00094 TQPixmap m_cache;
00095
00096 TQString m_welcomeString, m_userString;
00097 TQFont m_welcomeFont, m_userFont, m_statusFont;
00098 TQColor m_welcomeColor, m_welcomeShadowColor, m_userColor, m_statusColor;
00099 TQPixmap m_icon;
00100
00101 bool m_showWelcomeString, m_showUserString, m_showUserIcon, m_showStatusString;
00102 };
00103
00104 #endif