Go to the
documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef QFRAME_H
00043 #define QFRAME_H
00044
00045 #include <QtGui/qwidget.h>
00046
00047 QT_BEGIN_HEADER
00048
00049 QT_BEGIN_NAMESPACE
00050
00051 QT_MODULE(Gui)
00052
00053 class QFramePrivate;
00054
00055 class Q_GUI_EXPORT QFrame : public QWidget
00056 {
00057 Q_OBJECT
00058
00059 Q_ENUMS(Shape Shadow)
00060 Q_PROPERTY(Shape frameShape READ frameShape WRITE setFrameShape)
00061 Q_PROPERTY(Shadow frameShadow READ frameShadow WRITE setFrameShadow)
00062 Q_PROPERTY(int lineWidth READ lineWidth WRITE setLineWidth)
00063 Q_PROPERTY(int midLineWidth READ midLineWidth WRITE setMidLineWidth)
00064 Q_PROPERTY(int frameWidth READ frameWidth)
00065 Q_PROPERTY(QRect frameRect READ frameRect WRITE setFrameRect DESIGNABLE false)
00066
00067 public:
00068 explicit QFrame(QWidget* parent = 0, Qt::WindowFlags f = 0);
00069 ~QFrame();
00070
00071 int frameStyle() const;
00072 void setFrameStyle(int);
00073
00074 int frameWidth() const;
00075
00076 QSize sizeHint() const;
00077
00078 enum Shape {
00079 NoFrame = 0,
00080 Box = 0x0001,
00081 Panel = 0x0002,
00082 WinPanel = 0x0003,
00083 HLine = 0x0004,
00084 VLine = 0x0005,
00085 StyledPanel = 0x0006
00086
00087 #if defined(QT3_SUPPORT) && !defined(Q_MOC_RUN)
00088 ,PopupPanel = StyledPanel,
00089 MenuBarPanel = StyledPanel,
00090 ToolBarPanel = StyledPanel,
00091 LineEditPanel = StyledPanel,
00092 TabWidgetPanel = StyledPanel,
00093 GroupBoxPanel = StyledPanel
00094 #endif
00095 };
00096 enum Shadow {
00097 Plain = 0x0010,
00098 Raised = 0x0020,
00099 Sunken = 0x0030
00100 };
00101
00102 enum StyleMask {
00103 Shadow_Mask = 0x00f0,
00104 Shape_Mask = 0x000f
00105 #if defined(QT3_SUPPORT)
00106 ,MShadow = Shadow_Mask,
00107 MShape = Shape_Mask
00108 #endif
00109 };
00110
00111 Shape frameShape() const;
00112 void setFrameShape(Shape);
00113 Shadow frameShadow() const;
00114 void setFrameShadow(Shadow);
00115
00116 int lineWidth() const;
00117 void setLineWidth(int);
00118
00119 int midLineWidth() const;
00120 void setMidLineWidth(int);
00121
00122 QRect frameRect() const;
00123 void setFrameRect(const QRect &);
00124
00125 protected:
00126 bool event(QEvent *e);
00127 void paintEvent(QPaintEvent *);
00128 void changeEvent(QEvent *);
00129 void drawFrame(QPainter *);
00130
00131 #ifdef QT3_SUPPORT
00132 public:
00133 QT3_SUPPORT_CONSTRUCTOR QFrame(QWidget* parent, const char* name, Qt::WindowFlags f = 0);
00134 #endif
00135
00136 protected:
00137 QFrame(QFramePrivate &dd, QWidget* parent = 0, Qt::WindowFlags f = 0);
00138
00139 private:
00140 Q_DISABLE_COPY(QFrame)
00141 Q_DECLARE_PRIVATE(QFrame)
00142 };
00143
00144 QT_END_NAMESPACE
00145
00146 QT_END_HEADER
00147
00148 #endif // QFRAME_H