|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.core.QObject
com.trolltech.qt.gui.QWidget
com.trolltech.qt.gui.QFrame
public class QFrame
The QFrame class is the base class of widgets that can have a frame. QMenu 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.
QLabel label = new QLabel(this);
label.setFrameStyle(QFrame.Shape.Panel.value() | QFrame.Shadow.Raised.value());
label.setLineWidth(2);
QProgressBar pbar = new QProgressBar(this);
label.setFrameStyle(QFrame.Shape.NoFrame.value());
The QFrame class can also be used directly for creating simple placeholder frames without any contents. The frame style is specified by a frame shape and a shadow style that is used to visually separate the frame from surrounding widgets. These properties can be set together using the setFrameStyle() function and read with frameStyle().
The frame shapes are NoFrame , Box , Panel , StyledPanel , HLine and VLine ; the shadow styles are Plain , Raised and Sunken .
A frame widget has three attributes that describe the thickness of the border: lineWidth, midLineWidth, and frameWidth.
Box , HLine and VLine frames that are raised or sunken.frameWidth() function is used to obtain the value defined for the style used.QWidget::setContentsMargins() function. This table shows some of the combinations of styles and line widths: 
| Nested Class Summary | |
|---|---|
static class |
QFrame.Shadow
This enum type defines the types of shadow that are used to give a 3D effect to frames. |
static class |
QFrame.Shape
This enum type defines the shapes of frame available. |
static class |
QFrame.StyleMask
This enum defines two constants that can be used to extract the two components of frameStyle(): Normally, you don't need to use these, since frameShadow() and frameShape() already extract the Shadow and the Shape parts of frameStyle(). |
| Nested classes/interfaces inherited from class com.trolltech.qt.gui.QWidget |
|---|
QWidget.RenderFlag, QWidget.RenderFlags |
| Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
|---|
QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9 |
| Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
|---|
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal |
| Field Summary |
|---|
| Fields inherited from class com.trolltech.qt.gui.QWidget |
|---|
customContextMenuRequested |
| Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
|---|
currentSender |
| Constructor Summary | |
|---|---|
QFrame()
Constructs a frame widget with frame style NoFrame and a 1-pixel frame width. |
|
QFrame(QWidget parent)
Constructs a frame widget with frame style NoFrame and a 1-pixel frame width. |
|
QFrame(QWidget parent,
Qt.WindowFlags f)
Constructs a frame widget with frame style NoFrame and a 1-pixel frame width. |
|
QFrame(QWidget parent,
Qt.WindowType[] f)
|
|
| Method Summary | |
|---|---|
QRect |
frameRect()
This property holds the frame's rectangle. |
QFrame.Shadow |
frameShadow()
This property holds the frame shadow value from the frame style. |
QFrame.Shape |
frameShape()
This property holds the frame shape value from the frame style. |
int |
frameStyle()
Returns the frame style. |
int |
frameWidth()
This property holds the width of the frame that is drawn. |
int |
lineWidth()
This property holds the line width. |
int |
midLineWidth()
This property holds the width of the mid-line. |
void |
setFrameRect(QRect arg__1)
This property holds the frame's rectangle. |
void |
setFrameShadow(QFrame.Shadow arg__1)
This property holds the frame shadow value from the frame style. |
void |
setFrameShape(QFrame.Shape arg__1)
This property holds the frame shape value from the frame style. |
void |
setFrameStyle(int arg__1)
Sets the frame style to style. |
void |
setLineWidth(int arg__1)
This property holds the line width. |
void |
setMidLineWidth(int arg__1)
This property holds the width of the mid-line. |
| Methods inherited from class com.trolltech.qt.core.QObject |
|---|
childEvent, children, connectSlotsByName, customEvent, disposeLater, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, event, eventFilter, findChild, findChild, findChild, findChildren, findChildren, findChildren, findChildren, indexOfProperty, installEventFilter, isWidgetType, killTimer, moveToThread, objectName, parent, properties, property, removeEventFilter, setObjectName, setParent, setProperty, startTimer, timerEvent, toString, userProperty |
| Methods inherited from class com.trolltech.qt.QtJambiObject |
|---|
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr |
| Methods inherited from class com.trolltech.qt.QSignalEmitter |
|---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
| Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
|---|
__qt_signalInitialization |
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.trolltech.qt.QtJambiInterface |
|---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
| Constructor Detail |
|---|
public QFrame(QWidget parent,
Qt.WindowType[] f)
public QFrame(QWidget parent)
NoFrame and a 1-pixel frame width. The parent and f arguments are passed to the QWidget constructor.
public QFrame()
NoFrame and a 1-pixel frame width. The parent and f arguments are passed to the QWidget constructor.
public QFrame(QWidget parent,
Qt.WindowFlags f)
NoFrame and a 1-pixel frame width. The parent and f arguments are passed to the QWidget constructor.
| Method Detail |
|---|
public final QRect frameRect()
If you set the rectangle to a null rectangle (for example, QRect(0, 0, 0, 0)), then the resulting frame rectangle is equivalent to the widget rectangle.
public final QFrame.Shadow frameShadow()
frameStyle(), and frameShape().
public final QFrame.Shape frameShape()
frameStyle(), and frameShadow().
public final int frameStyle()
The default value is QFrame::NoFrame .
setFrameStyle(), frameShape(), and frameShadow().
public final int frameWidth()
frame style, not only the line width and the mid-line width. For example, the style specified by NoFrame always has a frame width of 0, whereas the style Panel has a frame width equivalent to the line width. lineWidth(), midLineWidth(), and frameStyle().
public final int lineWidth()
HLine and VLine ) is specified by frameWidth. The default value is 1.
midLineWidth, and frameWidth.
public final int midLineWidth()
lineWidth, and frameWidth.
public final void setFrameRect(QRect arg__1)
If you set the rectangle to a null rectangle (for example, QRect(0, 0, 0, 0)), then the resulting frame rectangle is equivalent to the widget rectangle.
public final void setFrameShadow(QFrame.Shadow arg__1)
frameStyle(), and frameShape().
public final void setFrameShape(QFrame.Shape arg__1)
frameStyle(), and frameShadow().
public final void setFrameStyle(int arg__1)
The style is the bitwise OR between a frame shape and a frame shadow style. See the picture of the frames in the main class documentation.
The frame shapes are given in QFrame::Shape and the shadow styles in QFrame::Shadow .
If a mid-line width greater than 0 is specified, an additional line is drawn for Raised or Sunken Box , HLine , and VLine frames. The mid-color of the current color group is used for drawing middle lines.
frameStyle().
public final void setLineWidth(int arg__1)
HLine and VLine ) is specified by frameWidth. The default value is 1.
midLineWidth, and frameWidth.
public final void setMidLineWidth(int arg__1)
lineWidth, and frameWidth.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||