<class name="QFrame" doc="/** <p>The <a href="QFrame.html#QFrame(com.trolltech.qt.gui.QWidget, com.trolltech.qt.core.Qt.WindowFlags)"><tt>QFrame</tt></a> class is the base class of widgets that can have a frame.</p> <p><a href="QMenu.html"><tt>QMenu</tt></a> uses this to &quot;raise&quot; the menu above the surrounding screen. <a href="QProgressBar.html"><tt>QProgressBar</tt></a> has a &quot;sunken&quot; look. <a href="QLabel.html"><tt>QLabel</tt></a> has a flat look. The frames of widgets like these can be changed.</p> <pre> QLabel label(...); label.setFrameStyle(QFrame::Panel | QFrame::Raised); label.setLineWidth(2); QProgressBar pbar(...); label.setFrameStyle(QFrame::NoFrame);</pre> <p>The <a href="QFrame.html#QFrame(com.trolltech.qt.gui.QWidget, com.trolltech.qt.core.Qt.WindowFlags)"><tt>QFrame</tt></a> class can also be used directly for creating simple placeholder frames without any contents.</p> <p>The frame style is specified by a frame shape</tt> and a shadow style</tt> that is used to visually separate the frame from surrounding widgets. These properties can be set together using the <a href="QFrame.html#setFrameStyle(int)"><tt>setFrameStyle</tt></a> function and read with <a href="QFrame.html#frameStyle()"><tt>frameStyle</tt></a>.</p> <p>The frame shapes are <a href="QFrame.html#Shape-enum"><tt>NoFrame</tt></a>, <a href="QFrame.html#Shape-enum">Box</tt></a>, <a href="QFrame.html#Shape-enum">Panel</tt></a>, <a href="QFrame.html#Shape-enum"><tt>StyledPanel</tt></a>, <a href="QFrame.html#Shape-enum"><tt>HLine</tt></a> and <a href="QFrame.html#Shape-enum"><tt>VLine</tt></a>; the shadow styles are <a href="QFrame.html#Shadow-enum">Plain</tt></a>, <a href="QFrame.html#Shadow-enum">Raised</tt></a> and <a href="QFrame.html#Shadow-enum">Sunken</tt></a>.</p> <p>A frame widget has three attributes that describe the thickness of the border: <a href="QFrame.html#lineWidth()"><tt>lineWidth</tt></a>, <a href="QFrame.html#midLineWidth()"><tt>midLineWidth</tt></a>, and <a href="QFrame.html#frameWidth()"><tt>frameWidth</tt></a>.</p> <ul> <li>The line width is the width of the frame border. It can be modified to customize the frame's appearance.</li> <li>The mid-line width specifies the width of an extra line in the middle of the frame, which uses a third color to obtain a special 3D effect. Notice that a mid-line is only drawn for <a href="QFrame.html#Shape-enum">Box</tt></a>, <a href="QFrame.html#Shape-enum"><tt>HLine</tt></a> and <a href="QFrame.html#Shape-enum"><tt>VLine</tt></a> frames that are raised or sunken.</li> <li>The frame width is determined by the frame style, and the <a href="QFrame.html#frameWidth()"><tt>frameWidth</tt></a> function is used to obtain the value defined for the style used.</li> </ul> <p>The margin between the frame and the contents of the frame can be customized with the QWidget::setContentsMargins() function.</p> <a name="picture"></a><p>This table shows some of the combinations of styles and line widths:</p> <p align="center"><img src="%2E%2E/images/frames.png" alt="Table of frame styles" /></p> */"> <signal name="protected final void customContextMenuRequested(com.trolltech.qt.core.QPoint pos)" doc="/** <p>This signal is emitted when the widget's <a href="QWidget.html#contextMenuPolicy()"><tt>contextMenuPolicy</tt></a> is Qt::CustomContextMenu, and the user has requested a context menu on the widget. The position <tt>pos</tt> is the position of the context menu event that the widget receives. Normally this is in widget coordinates. The exception to this rule is <a href="QAbstractScrollArea.html"><tt>QAbstractScrollArea</tt></a> and its subclasses that map the context menu event to coordinates of the viewport()</tt> .</p> <dl> <dt><b>Compatible Slot Signatures:</b></dt> <dd><tt>void mySlot(com.trolltech.qt.core.QPoint pos)</tt></dd> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><a href="QWidget.html#mapToGlobal(com.trolltech.qt.core.QPoint)"><tt>mapToGlobal</tt></a>, <a href="QMenu.html"><tt>QMenu</tt></a>, <a href="QWidget.html#contextMenuPolicy()"><tt>contextMenuPolicy</tt></a></dd> </dl> */"/> <method name="public QFrame(com.trolltech.qt.gui.QWidget parent, com.trolltech.qt.core.Qt.WindowFlags f)" doc="/** <p>Constructs a frame widget with frame style <a href="QFrame.html#Shape-enum"><tt>NoFrame</tt></a> and a 1-pixel frame width.</p> <p>The <tt>parent</tt> and <tt>f</tt> arguments are passed to the <a href="QWidget.html#QWidget(com.trolltech.qt.gui.QWidget, com.trolltech.qt.core.Qt.WindowFlags)"><tt>QWidget</tt></a> constructor.</p> */"/> <method name="public QFrame(com.trolltech.qt.gui.QWidget parent)" doc="/** <p>Equivalent to <a href="QFrame.html#QFrame(com.trolltech.qt.gui.QWidget, com.trolltech.qt.core.Qt.WindowFlags)"><tt>QFrame</tt></a>(<tt>parent</tt>, 0). */"/> <method name="public QFrame()" doc="/** <p>Equivalent to <a href="QFrame.html#QFrame(com.trolltech.qt.gui.QWidget, com.trolltech.qt.core.Qt.WindowFlags)"><tt>QFrame</tt></a>(0, 0). */"/> <method name="protected final void drawFrame(com.trolltech.qt.gui.QPainter arg__1)" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> */"/> <method name="public final com.trolltech.qt.core.QRect frameRect()" doc="/** <p>Returns the frame's rectangle.</p> <p>The frame's rectangle is the rectangle the frame is drawn in. By default, this is the entire widget. Setting the rectangle does does <i>not</i> cause a widget update. The frame rectangle is automatically adjusted when the widget changes size.</p> <p>If you set the rectangle to a null rectangle (for example, <a href="%2E%2E/core/QRect.html"><tt>QRect</tt></a>(0, 0, 0, 0)), then the resulting frame rectangle is equivalent to the widget rectangle</tt>.</p> @see <a href="QFrame.html#setFrameRect(com.trolltech.qt.core.QRect)"><tt>setFrameRect</tt></a> */"/> <method name="public final com.trolltech.qt.gui.QFrame.Shadow frameShadow()" doc="/** <p>Returns the frame shadow value from the frame style.</p> @see <a href="QFrame.html#setFrameShadow(com.trolltech.qt.gui.QFrame.Shadow)"><tt>setFrameShadow</tt></a> @see <a href="QFrame.html#frameStyle()"><tt>frameStyle</tt></a> @see <a href="QFrame.html#frameShape()"><tt>frameShape</tt></a> */"/> <method name="public final com.trolltech.qt.gui.QFrame.Shape frameShape()" doc="/** <p>Returns the frame shape value from the frame style.</p> @see <a href="QFrame.html#setFrameShape(com.trolltech.qt.gui.QFrame.Shape)"><tt>setFrameShape</tt></a> @see <a href="QFrame.html#frameStyle()"><tt>frameStyle</tt></a> @see <a href="QFrame.html#frameShadow()"><tt>frameShadow</tt></a> */"/> <method name="public final int frameStyle()" doc="/** <p>Returns the frame style.</p> <p>The default value is QFrame::NoFrame.</p> @see <a href="QFrame.html#setFrameStyle(int)"><tt>setFrameStyle</tt></a> @see <a href="QFrame.html#frameShape()"><tt>frameShape</tt></a> @see <a href="QFrame.html#frameShadow()"><tt>frameShadow</tt></a> */"/> <method name="public final int frameWidth()" doc="/** <p>Returns the width of the frame that is drawn..</p> <p>Note that the frame width depends on the frame style</tt>, not only the line width and the mid-line width. For example, the style specified by <a href="QFrame.html#Shape-enum"><tt>NoFrame</tt></a> always has a frame width of 0, whereas the style <a href="QFrame.html#Shape-enum">Panel</tt></a> has a frame width equivalent to the line width.</p> @see <a href="QFrame.html#lineWidth()"><tt>lineWidth</tt></a> @see <a href="QFrame.html#midLineWidth()"><tt>midLineWidth</tt></a> @see <a href="QFrame.html#frameStyle()"><tt>frameStyle</tt></a> */"/> <method name="public final int lineWidth()" doc="/** <p>Returns the line width.</p> <p>Note that the <i>total</i> line width for frames used as separators (<a href="QFrame.html#Shape-enum"><tt>HLine</tt></a> and <a href="QFrame.html#Shape-enum"><tt>VLine</tt></a>) is specified by <a href="QFrame.html#frameWidth()"><tt>frameWidth</tt></a>.</p> <p>The default value is 1.</p> @see <a href="QFrame.html#setLineWidth(int)"><tt>setLineWidth</tt></a> @see <a href="QFrame.html#midLineWidth()"><tt>midLineWidth</tt></a> @see <a href="QFrame.html#frameWidth()"><tt>frameWidth</tt></a> */"/> <method name="public final int midLineWidth()" doc="/** <p>Returns the width of the mid-line.</p> <p>The default value is 0.</p> @see <a href="QFrame.html#setMidLineWidth(int)"><tt>setMidLineWidth</tt></a> @see <a href="QFrame.html#lineWidth()"><tt>lineWidth</tt></a> @see <a href="QFrame.html#frameWidth()"><tt>frameWidth</tt></a> */"/> <method name="public final void setFrameRect(com.trolltech.qt.core.QRect arg__1)" doc="/** <p>Sets the frame's rectangle to <tt>arg__1</tt>.</p> <p>The frame's rectangle is the rectangle the frame is drawn in. By default, this is the entire widget. Setting the rectangle does does <i>not</i> cause a widget update. The frame rectangle is automatically adjusted when the widget changes size.</p> <p>If you set the rectangle to a null rectangle (for example, <a href="%2E%2E/core/QRect.html"><tt>QRect</tt></a>(0, 0, 0, 0)), then the resulting frame rectangle is equivalent to the widget rectangle</tt>.</p> @see <a href="QFrame.html#frameRect()"><tt>frameRect</tt></a> */"/> <method name="public final void setFrameShadow(com.trolltech.qt.gui.QFrame.Shadow arg__1)" doc="/** <p>Sets the frame shadow value from the frame style to <tt>arg__1</tt>.</p> @see <a href="QFrame.html#frameShadow()"><tt>frameShadow</tt></a> @see <a href="QFrame.html#frameStyle()"><tt>frameStyle</tt></a> @see <a href="QFrame.html#frameShape()"><tt>frameShape</tt></a> */"/> <method name="public final void setFrameShape(com.trolltech.qt.gui.QFrame.Shape arg__1)" doc="/** <p>Sets the frame shape value from the frame style to <tt>arg__1</tt>.</p> @see <a href="QFrame.html#frameShape()"><tt>frameShape</tt></a> @see <a href="QFrame.html#frameStyle()"><tt>frameStyle</tt></a> @see <a href="QFrame.html#frameShadow()"><tt>frameShadow</tt></a> */"/> <method name="public final void setFrameStyle(int arg__1)" doc="/** <p>Sets the frame style to <tt>arg__1</tt>.</p> <p>The <tt>arg__1</tt> is the bitwise OR between a frame shape and a frame shadow style. See the picture of the frames in the main class documentation.</p> <p>The frame shapes are given in <tt>QFrame::Shape</tt> and the shadow styles in <tt>QFrame::Shadow</tt>.</p> <p>If a mid-line width greater than 0 is specified, an additional line is drawn for <a href="QFrame.html#Shadow-enum">Raised</tt></a> or <a href="QFrame.html#Shadow-enum">Sunken</tt></a> <a href="QFrame.html#Shape-enum">Box</tt></a>, <a href="QFrame.html#Shape-enum"><tt>HLine</tt></a>, and <a href="QFrame.html#Shape-enum"><tt>VLine</tt></a> frames. The mid-color of the current color group is used for drawing middle lines.</p> @see <a href="QFrame.html#frameStyle()"><tt>frameStyle</tt></a> */"/> <method name="public final void setLineWidth(int arg__1)" doc="/** <p>Sets the line width to <tt>arg__1</tt>.</p> <p>Note that the <i>total</i> line width for frames used as separators (<a href="QFrame.html#Shape-enum"><tt>HLine</tt></a> and <a href="QFrame.html#Shape-enum"><tt>VLine</tt></a>) is specified by <a href="QFrame.html#frameWidth()"><tt>frameWidth</tt></a>.</p> <p>The default value is 1.</p> @see <a href="QFrame.html#lineWidth()"><tt>lineWidth</tt></a> @see <a href="QFrame.html#midLineWidth()"><tt>midLineWidth</tt></a> @see <a href="QFrame.html#frameWidth()"><tt>frameWidth</tt></a> */"/> <method name="public final void setMidLineWidth(int arg__1)" doc="/** <p>Sets the width of the mid-line to <tt>arg__1</tt>.</p> <p>The default value is 0.</p> @see <a href="QFrame.html#midLineWidth()"><tt>midLineWidth</tt></a> @see <a href="QFrame.html#lineWidth()"><tt>lineWidth</tt></a> @see <a href="QFrame.html#frameWidth()"><tt>frameWidth</tt></a> */"/> <method name="protected void changeEvent(com.trolltech.qt.core.QEvent arg__1)" doc="/** <p>This function is reimplemented for internal reasons.</p> */"/> <method name="public boolean event(com.trolltech.qt.core.QEvent e)" doc="/** <p>This function is reimplemented for internal reasons.</p> */"/> <method name="protected void paintEvent(com.trolltech.qt.gui.QPaintEvent arg__1)" doc="/** <p>This function is reimplemented for internal reasons.</p> */"/> <method name="public com.trolltech.qt.core.QSize sizeHint()" doc="/** <p>This function is reimplemented for internal reasons.</p> */"/> <enum name="StyleMask" doc="/** <p>This enum defines two constants that can be used to extract the two components of <a href="QFrame.html#frameStyle()"><tt>frameStyle</tt></a>:</p> <p><table border="1" cellpadding="2" cellspacing="1" width="100%"> <tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr> <tr><td valign="top"><tt>Shadow_Mask</tt></td><td align="center" valign="top"><tt>240</tt></td><td valign="top">The <a href="QFrame.html#Shadow-enum">Shadow</tt></a> part of <a href="QFrame.html#frameStyle()"><tt>frameStyle</tt></a></td></tr> <tr><td valign="top"><tt>Shape_Mask</tt></td><td align="center" valign="top"><tt>15</tt></td><td valign="top">The <a href="QFrame.html#Shape-enum">Shape</tt></a> part of <a href="QFrame.html#frameStyle()"><tt>frameStyle</tt></a></td></tr> </table></p> <p>Normally, you don't need to use these, since <a href="QFrame.html#frameShadow()"><tt>frameShadow</tt></a> and <a href="QFrame.html#frameShape()"><tt>frameShape</tt></a> already extract the <a href="QFrame.html#Shadow-enum">Shadow</tt></a> and the <a href="QFrame.html#Shape-enum">Shape</tt></a> parts of <a href="QFrame.html#frameStyle()"><tt>frameStyle</tt></a>.</p> @see <a href="QFrame.html#frameStyle()"><tt>frameStyle</tt></a> @see <a href="QFrame.html#setFrameStyle(int)"><tt>setFrameStyle</tt></a> */"> <enum-value name="Shadow_Mask" doc="/** <p>The <a href="QFrame.html#Shadow-enum">Shadow</tt></a> part of <a href="QFrame.html#frameStyle()"><tt>frameStyle</tt></a></p> */"/> <enum-value name="Shape_Mask" doc="/** <p>The <a href="QFrame.html#Shape-enum">Shape</tt></a> part of <a href="QFrame.html#frameStyle()"><tt>frameStyle</tt></a></p> */"/> </enum> <enum name="Shape" doc="/** <p>This enum type defines the shapes of frame available.</p> <p>When it does not call <a href="QStyle.html"><tt>QStyle</tt></a>, Shape interacts with QFrame::Shadow, the <a href="QFrame.html#lineWidth()"><tt>lineWidth</tt></a> and the <a href="QFrame.html#midLineWidth()"><tt>midLineWidth</tt></a> to create the total result. See the picture of the frames in the main class documentation.</p> @see <tt>QFrame::Shadow</tt> @see <tt>QFrame::style</tt> @see <tt>QStyle::drawPrimitive</tt> */"> <enum-value name="NoFrame" doc="/** <p><a href="QFrame.html#QFrame(com.trolltech.qt.gui.QWidget, com.trolltech.qt.core.Qt.WindowFlags)"><tt>QFrame</tt></a> draws nothing</p> */"/> <enum-value name="Box" doc="/** <p><a href="QFrame.html#QFrame(com.trolltech.qt.gui.QWidget, com.trolltech.qt.core.Qt.WindowFlags)"><tt>QFrame</tt></a> draws a box around its contents</p> */"/> <enum-value name="Panel" doc="/** <p><a href="QFrame.html#QFrame(com.trolltech.qt.gui.QWidget, com.trolltech.qt.core.Qt.WindowFlags)"><tt>QFrame</tt></a> draws a panel to make the contents appear raised or sunken</p> */"/> <enum-value name="WinPanel" doc="/** <p>draws a rectangular panel that can be raised or sunken like those in Windows 95. Specifying this shape sets the line width to 2 pixels. <a href="QFrame.html#Shape-enum"><tt>WinPanel</tt></a> is provided for compatibility. For GUI style independence we recommend using <a href="QFrame.html#Shape-enum"><tt>StyledPanel</tt></a> instead.</p> */"/> <enum-value name="HLine" doc="/** <p><a href="QFrame.html#QFrame(com.trolltech.qt.gui.QWidget, com.trolltech.qt.core.Qt.WindowFlags)"><tt>QFrame</tt></a> draws a horizontal line that frames nothing (useful as separator)</p> */"/> <enum-value name="VLine" doc="/** <p><a href="QFrame.html#QFrame(com.trolltech.qt.gui.QWidget, com.trolltech.qt.core.Qt.WindowFlags)"><tt>QFrame</tt></a> draws a vertical line that frames nothing (useful as separator)</p> */"/> <enum-value name="StyledPanel" doc="/** <p>draws a rectangular panel with a look that depends on the current GUI style. It can be raised or sunken.</p> */"/> </enum> <enum name="Shadow" doc="/** <p>This enum type defines the types of shadow that are used to give a 3D effect to frames.</p> <p>Shadow interacts with QFrame::Shape, the <a href="QFrame.html#lineWidth()"><tt>lineWidth</tt></a> and the <a href="QFrame.html#midLineWidth()"><tt>midLineWidth</tt></a>. See the picture of the frames in the main class documentation.</p> @see <tt>QFrame::Shape</tt> @see <a href="QFrame.html#lineWidth()"><tt>lineWidth</tt></a> @see <a href="QFrame.html#midLineWidth()"><tt>midLineWidth</tt></a> */"> <enum-value name="Plain" doc="/** <p>the frame and contents appear level with the surroundings; draws using the palette foreground color (without any 3D effect)</p> */"/> <enum-value name="Raised" doc="/** <p>the frame and contents appear raised; draws a 3D raised line using the light and dark colors of the current color group</p> */"/> <enum-value name="Sunken" doc="/** <p>the frame and contents appear sunken; draws a 3D sunken line using the light and dark colors of the current color group</p> */"/> </enum> </class>