00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef QWINDOWSSTYLE_P_H
00025 #define QWINDOWSSTYLE_P_H
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #include "qwindowsstyle.h"
00039 #include "qcommonstyle_p.h"
00040
00041 #ifndef QT_NO_STYLE_WINDOWS
00042 #include <QList>
00043 #include <QTime>
00044 #include <QHash>
00045
00046 class QStringList;
00047 class QTime;
00048 class QProgressBar;
00049
00050 class IconTheme
00051 {
00052
00053 public:
00054 IconTheme(QHash <int, QString> dirList, QStringList parents) :
00055 _dirList(dirList), _parents(parents), _valid(true){ }
00056 IconTheme() : _valid(false){ }
00057
00058 QHash <int, QString> dirList() {return _dirList;}
00059 QStringList parents() {return _parents;}
00060 bool isValid() {return _valid;}
00061
00062 private:
00063 QHash <int, QString> _dirList;
00064 QStringList _parents;
00065 bool _valid;
00066 };
00067
00068 class QWindowsStylePrivate : public QCommonStylePrivate
00069 {
00070 Q_DECLARE_PUBLIC(QWindowsStyle)
00071 public:
00072 QWindowsStylePrivate();
00073 bool hasSeenAlt(const QWidget *widget) const;
00074 bool altDown() const { return alt_down; }
00075 bool alt_down;
00076 QList<const QWidget *> seenAlt;
00077 int menuBarTimer;
00078
00079 QList<QProgressBar *> bars;
00080 int animationFps;
00081 int animateTimer;
00082 QTime startTime;
00083 int animateStep;
00084 QColor inactiveCaptionText;
00085 QColor activeCaptionColor;
00086 QColor activeGradientCaptionColor;
00087 QColor inactiveCaptionColor;
00088 QColor inactiveGradientCaptionColor;
00089
00090
00091 QPixmap findIcon(int size, const QString &) const;
00092 #ifdef Q_WS_X11
00093 QPixmap findIconHelper(int size, const QString &, const QString &, QStringList &visited) const;
00094 IconTheme parseIndexFile(const QString &themeName) const;
00095 mutable QString themeName;
00096 QStringList iconDirs;
00097 mutable QHash <QString, IconTheme> themeList;
00098 #endif
00099 };
00100
00101 #endif // QT_NO_STYLE_WINDOWS
00102 #endif //QWINDOWSSTYLE_P_H