src/gui/styles/qwindowsstyle_p.h

Go to the documentation of this file.
00001 /****************************************************************************
00002 **
00003 ** Copyright (C) 1992-2006 Trolltech ASA. All rights reserved.
00004 **
00005 ** This file is part of the QtGui module of the Qt Toolkit.
00006 **
00007 ** This file may be used under the terms of the GNU General Public
00008 ** License version 2.0 as published by the Free Software Foundation
00009 ** and appearing in the file LICENSE.GPL included in the packaging of
00010 ** this file.  Please review the following information to ensure GNU
00011 ** General Public Licensing requirements will be met:
00012 ** http://www.trolltech.com/products/qt/opensource.html
00013 **
00014 ** If you are unsure which license is appropriate for your use, please
00015 ** review the following information:
00016 ** http://www.trolltech.com/products/qt/licensing.html or contact the
00017 ** sales department at sales@trolltech.com.
00018 **
00019 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00020 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00021 **
00022 ****************************************************************************/
00023 
00024 #ifndef QWINDOWSSTYLE_P_H
00025 #define QWINDOWSSTYLE_P_H
00026 
00027 //
00028 //  W A R N I N G
00029 //  -------------
00030 //
00031 // This file is not part of the Qt API.  It exists for the convenience
00032 // of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp.  This header
00033 // file may change from version to version without notice, or even be removed.
00034 //
00035 // We mean it.
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     //icon detection on X11
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

Generated on Thu Mar 15 11:55:46 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1