Eneboo - Documentación para desarrolladores
|
00001 /**************************************************************************** 00002 ** $Id: qt/qtitlebar_p.h 3.3.8 edited Jan 11 14:46 $ 00003 ** 00004 ** Definition of some Qt private functions. 00005 ** 00006 ** Created : 000101 00007 ** 00008 ** Copyright (C) 2000-2007 Trolltech ASA. All rights reserved. 00009 ** 00010 ** This file is part of the widgets module of the Qt GUI Toolkit. 00011 ** 00012 ** This file may be distributed under the terms of the Q Public License 00013 ** as defined by Trolltech ASA of Norway and appearing in the file 00014 ** LICENSE.QPL included in the packaging of this file. 00015 ** 00016 ** This file may be distributed and/or modified under the terms of the 00017 ** GNU General Public License version 2 as published by the Free Software 00018 ** Foundation and appearing in the file LICENSE.GPL included in the 00019 ** packaging of this file. 00020 ** 00021 ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition 00022 ** licenses may use this file in accordance with the Qt Commercial License 00023 ** Agreement provided with the Software. 00024 ** 00025 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00026 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00027 ** 00028 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for 00029 ** information about Qt Commercial License Agreements. 00030 ** See http://www.trolltech.com/qpl/ for QPL licensing information. 00031 ** See http://www.trolltech.com/gpl/ for GPL licensing information. 00032 ** 00033 ** Contact info@trolltech.com if any conditions of this licensing are 00034 ** not clear to you. 00035 ** 00036 **********************************************************************/ 00037 00038 #ifndef QTITLEBAR_P_H 00039 #define QTITLEBAR_P_H 00040 00041 00042 // 00043 // W A R N I N G 00044 // ------------- 00045 // 00046 // This file is not part of the Qt API. It exists for the convenience 00047 // of qworkspace.cpp and qdockwindow.cpp. This header file may change 00048 // from version to version without notice, or even be removed. 00049 // 00050 // We mean it. 00051 // 00052 // 00053 00054 00055 #ifndef QT_H 00056 #include "qbutton.h" 00057 #include "qlabel.h" 00058 #endif // QT_H 00059 00060 #if !defined(QT_NO_TITLEBAR) 00061 00062 class QToolTip; 00063 class QTitleBarPrivate; 00064 class QPixmap; 00065 00066 class Q_EXPORT QTitleBar : public QWidget 00067 { 00068 Q_OBJECT 00069 Q_PROPERTY( bool autoRaise READ autoRaise WRITE setAutoRaise ) 00070 Q_PROPERTY( bool movable READ isMovable WRITE setMovable ) 00071 00072 public: 00073 QTitleBar (QWidget* w, QWidget* parent, const char* name=0); 00074 ~QTitleBar(); 00075 00076 bool isActive() const; 00077 bool usesActiveColor() const; 00078 virtual QString visibleText() const; 00079 00080 bool isMovable() const; 00081 void setMovable(bool); 00082 00083 bool autoRaise() const; 00084 void setAutoRaise(bool); 00085 00086 QWidget *window() const; 00087 00088 QSize sizeHint() const; 00089 00090 #ifdef QT_NO_WIDGET_TOPEXTRA 00091 // We provide one, since titlebar is useless otherwise. 00092 QString caption() const; 00093 #endif 00094 00095 public slots: 00096 void setActive( bool ); 00097 void setCaption( const QString& title ); 00098 void setIcon( const QPixmap& icon ); 00099 00100 signals: 00101 void doActivate(); 00102 void doNormal(); 00103 void doClose(); 00104 void doMaximize(); 00105 void doMinimize(); 00106 void doShade(); 00107 void showOperationMenu(); 00108 void popupOperationMenu( const QPoint& ); 00109 void doubleClicked(); 00110 00111 protected: 00112 bool event( QEvent *); 00113 void resizeEvent( QResizeEvent *); 00114 void contextMenuEvent( QContextMenuEvent * ); 00115 void mousePressEvent( QMouseEvent * ); 00116 void mouseDoubleClickEvent( QMouseEvent * ); 00117 void mouseReleaseEvent( QMouseEvent * ); 00118 void mouseMoveEvent( QMouseEvent * ); 00119 void enterEvent( QEvent *e ); 00120 void leaveEvent( QEvent *e ); 00121 void paintEvent( QPaintEvent *p ); 00122 00123 virtual void cutText(); 00124 00125 private: 00126 void readColors(); 00127 00128 QTitleBarPrivate *d; 00129 #if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator= 00130 QTitleBar( const QTitleBar & ); 00131 QTitleBar &operator=( const QTitleBar & ); 00132 #endif 00133 }; 00134 00135 #endif 00136 #endif //QTITLEBAR_P_H