⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qframe.3qt

📁 Linux下的基于X11的图形开发环境。
💻 3QT
📖 第 1 页 / 共 2 页
字号:
'\" t.TH QFrame 3qt "9 December 2002" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2001 Trolltech AS.  All rights reserved.  See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQFrame \- The base class of widgets that can have a frame.SH SYNOPSIS\fC#include <qframe.h>\fR.PPInherits QWidget..PPInherited by QGroupBox, QScrollView, QDockWindow, QGrid, QHBox, QLabel, QLCDNumber, QLineEdit, QMenuBar, QPopupMenu, QProgressBar, QSplitter, and QWidgetStack..PP.SS "Public Members".in +1c.ti -1c.BI "\fBQFrame\fR ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 )".br.ti -1c.BI "int \fBframeStyle\fR () const".br.ti -1c.BI "virtual void \fBsetFrameStyle\fR ( int style )".br.ti -1c.BI "int \fBframeWidth\fR () const".br.ti -1c.BI "QRect \fBcontentsRect\fR () const".br.ti -1c.BI "enum \fBShape\fR { NoFrame = 0, Box = 0x0001, Panel = 0x0002, WinPanel = 0x0003, HLine = 0x0004, VLine = 0x0005, StyledPanel = 0x0006, PopupPanel = 0x0007, MenuBarPanel = 0x0008, ToolBarPanel = 0x0009, LineEditPanel = 0x000a, TabWidgetPanel = 0x000b, GroupBoxPanel = 0x000c, MShape = 0x000f }".br.ti -1c.BI "enum \fBShadow\fR { Plain = 0x0010, Raised = 0x0020, Sunken = 0x0030, MShadow = 0x00f0 }".br.ti -1c.BI "Shape \fBframeShape\fR () const".br.ti -1c.BI "void \fBsetFrameShape\fR ( Shape )".br.ti -1c.BI "Shadow \fBframeShadow\fR () const".br.ti -1c.BI "void \fBsetFrameShadow\fR ( Shadow )".br.ti -1c.BI "int \fBlineWidth\fR () const".br.ti -1c.BI "virtual void \fBsetLineWidth\fR ( int )".br.ti -1c.BI "int \fBmargin\fR () const".br.ti -1c.BI "virtual void \fBsetMargin\fR ( int )".br.ti -1c.BI "int \fBmidLineWidth\fR () const".br.ti -1c.BI "virtual void \fBsetMidLineWidth\fR ( int )".br.ti -1c.BI "QRect \fBframeRect\fR () const".br.ti -1c.BI "virtual void \fBsetFrameRect\fR ( const QRect & )".br.in -1c.SS "Properties".in +1c.ti -1c.BI "QRect \fBcontentsRect\fR - the rectangle inside the frame  \fI(read " "only" ")\fR".br.ti -1c.BI "QRect \fBframeRect\fR - the frame rectangle".br.ti -1c.BI "Shadow \fBframeShadow\fR - the frame shadow value from the frame style".br.ti -1c.BI "Shape \fBframeShape\fR - the frame shape value from the frame style".br.ti -1c.BI "int \fBframeWidth\fR - the width of the frame that is drawn  \fI(read " "only" ")\fR".br.ti -1c.BI "int \fBlineWidth\fR - the line width".br.ti -1c.BI "int \fBmargin\fR - the width of the margin".br.ti -1c.BI "int \fBmidLineWidth\fR - the width of the mid-line".br.in -1c.SS "Protected Members".in +1c.ti -1c.BI "virtual void \fBpaintEvent\fR ( QPaintEvent * event )".br.ti -1c.BI "virtual void \fBresizeEvent\fR ( QResizeEvent * e )".br.ti -1c.BI "virtual void \fBdrawFrame\fR ( QPainter * p )".br.ti -1c.BI "virtual void \fBdrawContents\fR ( QPainter * )".br.ti -1c.BI "virtual void \fBframeChanged\fR ()".br.in -1c.SH DESCRIPTIONThe QFrame class is the base class of widgets that can have a frame..PPIt draws a frame and calls a virtual function, drawContents(), to fill in the frame. This function is reimplemented by subclasses. There are also two other less useful functions: drawFrame() and frameChanged()..PPQPopupMenu uses this to "raise" the menu above the surrounding screen. QProgressBar has a "sunken" look. QLabel has a flat look. The frames of widgets like these can be changed..PP.nf.br    QLabel label(...);.br    label.setFrameStyle( QFrame::Panel | QFrame::Raised );.br    label.setLineWidth( 2 );.br.br    QProgressBar pbar(...);.br    label.setFrameStyle( QFrame::NoFrame );.br.fi.PPThe QFrame class can also be used directly for creating simple frames without any contents, although usually you would use a QHBox or QVBox because they automatically lay out the widgets you put inside the frame..PPA frame widget has four attributes: frameStyle(), lineWidth(), midLineWidth(), and margin()..PPThe frame style is specified by a frame shape and a shadow style. The frame shapes are NoFrame, Box, Panel, StyledPanel, PopupPanel, WinPanel, ToolBarPanel, MenuBarPanel, HLine and VLine; the shadow styles are Plain, Raised and Sunken..PPThe line width is the width of the frame border..PPThe 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 Box, HLine and VLine frames that are raised or sunken..PPThe margin is the gap between the frame and the contents of the frame..PPThis table shows the most useful combinations of styles and widths (and some rather useless ones):.PP<center>.ce 1.B "[Image Omitted]".PP</center>.PPSee also Abstract Widget Classes..SS "Member Type Documentation".SH "QFrame::Shadow"This enum type defines the 3D effect used for QFrame's frame..TP\fCQFrame::Plain\fR - the frame and contents appear level with the surroundings; draws using the palette foreground color (without any 3D effect).TP\fCQFrame::Raised\fR - the frame and contents appear raised; draws a 3D raised line using the light and dark colors of the current color group.TP\fCQFrame::Sunken\fR - the frame and contents appear sunken; draws a 3D sunken line using the light and dark colors of the current color group.TP\fCQFrame::MShadow\fR - internal; mask for the shadow.PPShadow interacts with QFrame::Shape, the lineWidth() and the midLineWidth(). See the picture of the frames in the class description..PPSee also QFrame::Shape, lineWidth, and midLineWidth..SH "QFrame::Shape"This enum type defines the shapes of a QFrame's frame..TP\fCQFrame::NoFrame\fR - QFrame draws nothing.TP\fCQFrame::Box\fR - QFrame draws a box around its contents.TP\fCQFrame::Panel\fR - QFrame draws a panel to make the contents appear raised or sunken.TP\fCQFrame::StyledPanel\fR - draws a rectangular panel with a look that depends on the current GUI style. It can be raised or sunken..TP\fCQFrame::HLine\fR - QFrame draws a horizontal line that frames nothing (useful as separator).TP\fCQFrame::VLine\fR - QFrame draws a vertical line that frames nothing (useful as separator).TP\fCQFrame::GroupBoxPanel\fR - draws a rectangular panel.TP\fCQFrame::WinPanel\fR - 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. WinPanel is provided for compatibility. For GUI style independence we recommend using StyledPanel instead..TP\fCQFrame::ToolBarPanel\fR.TP\fCQFrame::MenuBarPanel\fR.TP

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -