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

  1. /****************************************************************************
  2. ** $Id:  qt/qtitlebar_p.h   3.0.0   edited Oct 2 23:10 $
  3. **
  4. ** Definition of some Qt private functions.
  5. **
  6. ** Created : 2000-01-01
  7. **
  8. ** Copyright (C) 2000 Trolltech AS.  All rights reserved.
  9. **
  10. ** This file is part of the kernel 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 QTITLEBAR_P_H
  39. #define QTITLEBAR_P_H
  40.  
  41.  
  42. //
  43. //  W A R N I N G
  44. //  -------------
  45. //
  46. // This file is not part of the Qt API.  It exists for the convenience
  47. // of qworkspace.cpp and qdockwindow.cpp.  This header file may change
  48. // from version to version without notice, or even be removed.
  49. //
  50. // We mean it.
  51. //
  52. //
  53.  
  54.  
  55. #ifndef QT_H
  56. #include "qbutton.h"
  57. #include "qlabel.h"
  58. #endif // QT_H
  59.  
  60. #if !defined(QT_NO_TITLEBAR)
  61.  
  62. class QToolTip;
  63. class QTitleBarPrivate;
  64. class QPixmap;
  65.  
  66. class Q_EXPORT QTitleBar : public QWidget
  67. {
  68.     Q_OBJECT
  69.     Q_PROPERTY( bool autoRaise READ autoRaise WRITE setAutoRaise )
  70.     Q_PROPERTY( bool movable READ isMovable WRITE setMovable )
  71.  
  72. public:
  73.     QTitleBar (QWidget* w, QWidget* parent, const char* name=0);
  74.     ~QTitleBar();
  75.  
  76.     bool isActive() const;
  77.     virtual QString visibleText() const;
  78.  
  79.     bool isMovable() const;
  80.     void setMovable(bool);
  81.  
  82.     bool autoRaise() const;
  83.     void setAutoRaise(bool);
  84.  
  85.     QWidget *window() const;
  86.  
  87.     QSize sizeHint() const;
  88.  
  89. public slots:
  90.     void setActive( bool );
  91.     void setCaption( const QString& title );
  92.     void setIcon( const QPixmap& icon );
  93.  
  94. signals:
  95.     void doActivate();
  96.     void doNormal();
  97.     void doClose();
  98.     void doMaximize();
  99.     void doMinimize();
  100.     void doShade();
  101.     void showOperationMenu();
  102.     void popupOperationMenu( const QPoint& );
  103.     void doubleClicked();
  104.  
  105. protected:
  106.     bool event( QEvent *);
  107.     void resizeEvent( QResizeEvent *);
  108.     void contextMenuEvent( QContextMenuEvent * );
  109.     void mousePressEvent( QMouseEvent * );
  110.     void mouseDoubleClickEvent( QMouseEvent * );
  111.     void mouseReleaseEvent( QMouseEvent * );
  112.     void mouseMoveEvent( QMouseEvent * );
  113.     void enterEvent( QEvent *e );
  114.     void leaveEvent( QEvent *e );
  115.     void paintEvent( QPaintEvent *p );
  116.  
  117.     virtual void cutText();
  118.  
  119. private:
  120.     void readColors();
  121.  
  122.     QTitleBarPrivate *d;
  123. };
  124.  
  125. #endif
  126. #endif //QTITLEBAR_P_H
  127.