home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / qt3_emx.zip / include / qplatinumstyle.h < prev    next >
C/C++ Source or Header  |  2001-10-11  |  4KB  |  111 lines

  1. /****************************************************************************
  2. ** $Id:  qt/qplatinumstyle.h   3.0.0   edited Aug 9 08:39 $
  3. **
  4. ** Definition of Platinum-like style class
  5. **
  6. ** Created : 981231
  7. **
  8. ** Copyright (C) 1998-2000 Trolltech AS.  All rights reserved.
  9. **
  10. ** This file is part of the widgets module of the Qt GUI Toolkit.
  11. **
  12. ** This file may be distributed under the terms of the Q Public License
  13. ** as defined by Trolltech AS of Norway and appearing in the file
  14. ** LICENSE.QPL included in the packaging of this file.
  15. **
  16. ** This file may be distributed and/or modified under the terms of the
  17. ** GNU General Public License version 2 as published by the Free Software
  18. ** Foundation and appearing in the file LICENSE.GPL included in the
  19. ** packaging of this file.
  20. **
  21. ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
  22. ** licenses may use this file in accordance with the Qt Commercial License
  23. ** Agreement provided with the Software.
  24. **
  25. ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  26. ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  27. **
  28. ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
  29. **   information about Qt Commercial License Agreements.
  30. ** See http://www.trolltech.com/qpl/ for QPL licensing information.
  31. ** See http://www.trolltech.com/gpl/ for GPL licensing information.
  32. **
  33. ** Contact info@trolltech.com if any conditions of this licensing are
  34. ** not clear to you.
  35. **
  36. **********************************************************************/
  37.  
  38. #ifndef QPLATINUMSTYLE_H
  39. #define QPLATINUMSTYLE_H
  40.  
  41. #ifndef QT_H
  42. #include "qwindowsstyle.h"
  43. #endif // QT_H
  44.  
  45. #ifndef QT_NO_STYLE_PLATINUM
  46.  
  47. class QPalette;
  48.  
  49. #if defined(QT_PLUGIN)
  50. #define Q_EXPORT_STYLE_PLATINUM
  51. #else
  52. #define Q_EXPORT_STYLE_PLATINUM Q_EXPORT
  53. #endif
  54.  
  55. class Q_EXPORT_STYLE_PLATINUM QPlatinumStyle : public QWindowsStyle
  56. {
  57.     Q_OBJECT
  58. public:
  59.     QPlatinumStyle();
  60.     virtual ~QPlatinumStyle();
  61.  
  62.     // new Style Stuff
  63.     void drawPrimitive( PrimitiveElement pe,
  64.             QPainter *p,
  65.             const QRect &r,
  66.             const QColorGroup &cg,
  67.             SFlags flags = Style_Default,
  68.             const QStyleOption& = QStyleOption::Default ) const;
  69.  
  70.     void drawControl( ControlElement element,
  71.               QPainter *p,
  72.               const QWidget *widget,
  73.               const QRect &r,
  74.               const QColorGroup &cg,
  75.               SFlags how = Style_Default,
  76.               const QStyleOption& = QStyleOption::Default ) const;
  77.  
  78.     void drawComplexControl( ComplexControl control,
  79.                  QPainter *p,
  80.                  const QWidget *widget,
  81.                  const QRect &r,
  82.                  const QColorGroup &cg,
  83.                  SFlags how = Style_Default,
  84.                  SCFlags sub = SC_All,
  85.                  SCFlags subActive = SC_None,
  86.                  const QStyleOption& = QStyleOption::Default ) const;
  87.  
  88.     QRect querySubControlMetrics( ComplexControl control,
  89.                   const QWidget *widget,
  90.                   SubControl sc,
  91.                   const QStyleOption& = QStyleOption::Default ) const;
  92.  
  93.     int pixelMetric( PixelMetric metric, const QWidget *widget = 0 ) const;
  94.  
  95.     QRect subRect( SubRect r, const QWidget *widget ) const;
  96.  
  97. protected:
  98.      QColor mixedColor(const QColor &, const QColor &) const;
  99.     void drawRiffles( QPainter* p,  int x, int y, int w, int h,
  100.               const QColorGroup &g, bool horizontal ) const;
  101. private:    // Disabled copy constructor and operator=
  102. #if defined(Q_DISABLE_COPY)
  103.     QPlatinumStyle( const QPlatinumStyle & );
  104.     QPlatinumStyle& operator=( const QPlatinumStyle & );
  105. #endif
  106. };
  107.  
  108. #endif // QT_NO_STYLE_PLATINUM
  109.  
  110. #endif // QPLATINUMSTYLE_H
  111.