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

  1. /****************************************************************************
  2. ** $Id:  qt/qsgistyle.h   3.0.0   edited Oct 10 16:34 $
  3. **
  4. ** Definition of SGI-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 QSGISTYLE_H
  39. #define QSGISTYLE_H
  40.  
  41. #ifndef QT_H
  42. #include "qmotifstyle.h"
  43. #include "qguardedptr.h"
  44. #include "qwidget.h"
  45. #endif // QT_H
  46.  
  47. #ifndef QT_NO_STYLE_SGI
  48.  
  49. #if defined(QT_PLUGIN)
  50. #define Q_EXPORT_STYLE_SGI
  51. #else
  52. #define Q_EXPORT_STYLE_SGI Q_EXPORT
  53. #endif
  54.  
  55. class QSGIStylePrivate;
  56.  
  57. class Q_EXPORT_STYLE_SGI QSGIStyle: public QMotifStyle
  58. {
  59.     Q_OBJECT
  60. public:
  61.     QSGIStyle( bool useHighlightCols = FALSE );
  62.     virtual ~QSGIStyle();
  63.  
  64.     void polish( QWidget* );
  65.     void unPolish( QWidget* );
  66.     void polish( QApplication* );
  67.     void unPolish( QApplication* );
  68.  
  69.     void drawPrimitive( PrimitiveElement pe,
  70.             QPainter *p,
  71.             const QRect &r,
  72.             const QColorGroup &cg,
  73.             SFlags flags = Style_Default,
  74.             const QStyleOption& = QStyleOption::Default ) const;
  75.  
  76.     void drawControl( ControlElement element,
  77.               QPainter *p,
  78.               const QWidget *widget,
  79.               const QRect &r,
  80.               const QColorGroup &cg,
  81.               SFlags how = Style_Default,
  82.               const QStyleOption& = QStyleOption::Default ) const;
  83.  
  84.     void drawComplexControl( ComplexControl control,
  85.                  QPainter *p,
  86.                  const QWidget* widget,
  87.                  const QRect& r,
  88.                  const QColorGroup& cg,
  89.                  SFlags how = Style_Default,
  90.                  SCFlags sub = SC_All,
  91.                  SCFlags subActive = SC_None,
  92.                  const QStyleOption& = QStyleOption::Default ) const;
  93.  
  94.     int pixelMetric( PixelMetric metric, const QWidget *widget = 0 ) const;
  95.  
  96.     QSize sizeFromContents( ContentsType contents,
  97.                 const QWidget *widget,
  98.                 const QSize &contentsSize,
  99.                 const QStyleOption& = QStyleOption::Default ) const;
  100.  
  101.     QRect subRect( SubRect r, const QWidget *widget ) const;
  102.     QRect querySubControlMetrics( ComplexControl control,
  103.                   const QWidget *widget,
  104.                   SubControl sc,
  105.                   const QStyleOption& = QStyleOption::Default ) const;
  106.  
  107. protected:
  108.     bool eventFilter( QObject*, QEvent*);
  109.  
  110. private:
  111.     QSGIStylePrivate *d;
  112.  
  113.     uint isApplicationStyle :1;
  114. #if defined(Q_DISABLE_COPY)
  115.     QSGIStyle( const QSGIStyle & );
  116.     QSGIStyle& operator=( const QSGIStyle & );
  117. #endif
  118.  
  119. };
  120.  
  121. #endif // QT_NO_STYLE_SGI
  122.  
  123. #endif // QSGISTYLE_H
  124.