Eneboo - Documentación para desarrolladores
|
00001 /**************************************************************************** 00002 ** $Id: qt/qtoolbar.h 3.3.8 edited Jan 11 14:39 $ 00003 ** 00004 ** Definition of QToolBar class 00005 ** 00006 ** Created : 980306 00007 ** 00008 ** Copyright (C) 1992-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 QTOOLBAR_H 00039 #define QTOOLBAR_H 00040 00041 #ifndef QT_H 00042 #include "qdockwindow.h" 00043 #endif // QT_H 00044 00045 #ifndef QT_NO_TOOLBAR 00046 00047 class QMainWindow; 00048 class QButton; 00049 class QBoxLayout; 00050 class QToolBarPrivate; 00051 00052 class Q_EXPORT QToolBar: public QDockWindow 00053 { 00054 Q_OBJECT 00055 Q_PROPERTY( QString label READ label WRITE setLabel ) 00056 00057 public: 00058 QToolBar( const QString &label, 00059 QMainWindow *, ToolBarDock = DockTop, 00060 bool newLine = FALSE, const char* name=0 ); 00061 QToolBar( const QString &label, QMainWindow *, QWidget *, 00062 bool newLine = FALSE, const char* name=0, WFlags f = 0 ); 00063 QToolBar( QMainWindow* parent=0, const char* name=0 ); 00064 ~QToolBar(); 00065 00066 void addSeparator(); 00067 00068 void show(); 00069 void hide(); 00070 00071 QMainWindow * mainWindow() const; 00072 00073 virtual void setStretchableWidget( QWidget * ); 00074 00075 bool event( QEvent * e ); 00076 00077 virtual void setLabel( const QString & ); 00078 QString label() const; 00079 00080 virtual void clear(); 00081 00082 QSize minimumSize() const; 00083 QSize minimumSizeHint() const; 00084 00085 void setOrientation( Orientation o ); 00086 void setMinimumSize( int minw, int minh ); 00087 00088 protected: 00089 void resizeEvent( QResizeEvent *e ); 00090 void styleChange( QStyle & ); 00091 00092 private slots: 00093 void createPopup(); 00094 00095 private: 00096 void init(); 00097 void checkForExtension( const QSize &sz ); 00098 QToolBarPrivate * d; 00099 QMainWindow * mw; 00100 QWidget * sw; 00101 QString l; 00102 00103 friend class QMainWindow; 00104 00105 private: // Disabled copy constructor and operator= 00106 #if defined(Q_DISABLE_COPY) 00107 QToolBar( const QToolBar & ); 00108 QToolBar& operator=( const QToolBar & ); 00109 #endif 00110 }; 00111 00112 #endif // QT_NO_TOOLBAR 00113 00114 #endif // QTOOLBAR_H