56 : frect(
QRect(0, 0, 0, 0)),
61 leftFrameWidth(0), rightFrameWidth(0),
62 topFrameWidth(0), bottomFrameWidth(0)
265 return d->frameStyle;
348 d->frameStyle = (short)style;
350 d->updateFrameWidth();
371 if (
short(w) ==
d->lineWidth)
373 d->lineWidth = short(w);
374 d->updateFrameWidth();
398 if (
short(w) ==
d->midLineWidth)
400 d->midLineWidth = short(w);
401 d->updateFrameWidth();
407 return d->midLineWidth;
432 qMax(topFrameWidth, bottomFrameWidth));
446 QRect fr = q->frameRect();
447 updateStyledFrameWidths();
469 return d->frameWidth;
494 fr.
adjust(-
d->leftFrameWidth, -
d->topFrameWidth,
d->rightFrameWidth,
d->bottomFrameWidth);
502 cr.
adjust(
d->leftFrameWidth,
d->topFrameWidth, -
d->rightFrameWidth, -
d->bottomFrameWidth);
547 switch (frameShape) {
563 if (frameShadow ==
Sunken)
565 else if (frameShadow ==
Raised)
582 d->updateFrameWidth();
590 d_func()->updateFrameWidth();
594 d_func()->updateFrameWidth();
The QPainter class performs low-level painting on widgets and other paint devices.
void paintEvent(QPaintEvent *)
This event handler can be reimplemented in a subclass to receive paint events passed in event...
#define QT_END_NAMESPACE
This macro expands to.
static QString fromAscii(const char *, int size=-1)
Returns a QString initialized with the first size characters from the string str. ...
QStyle::State state
the style flags that are used when drawing the control
QFrame::Shape frameShape
This property holds the frame shape value of the frame.
int left() const
Returns the x-coordinate of the rectangle's left edge.
void init(const QWidget *w)
Use initFrom(widget) instead.
~QFrame()
Destroys the frame.
void updateFrameWidth()
Updated the frameWidth parameter.
void setMidLineWidth(int)
int frameStyle() const
Returns the frame style.
int bottom() const
Returns the y-coordinate of the rectangle's bottom edge.
Shape
This enum type defines the shapes of frame available.
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
void setObjectName(const QString &name)
QFrame(QWidget *parent=0, Qt::WindowFlags f=0)
Constructs a frame widget with frame style NoFrame and a 1-pixel frame width.
int lineWidth
the line width for drawing the frame
#define QT_BEGIN_NAMESPACE
This macro expands to.
void changeEvent(QEvent *)
This event handler can be reimplemented to handle state changes.
Shadow
This enum type defines the types of shadow that are used to give a 3D effect to frames.
void initFrom(const QWidget *w)
void adjust(int x1, int y1, int x2, int y2)
Adds dx1, dy1, dx2 and dy2 respectively to the existing coordinates of the rectangle.
void drawFrame(QPainter *)
em>Reimplemented Function
void setFrameShape(Shape)
Shadow frameShadow() const
void setFrameShadow(Shadow)
int top() const
Returns the y-coordinate of the rectangle's top edge.
int right() const
Returns the x-coordinate of the rectangle's right edge.
int midLineWidth
the mid-line width for drawing the frame
The QStyleOptionFrameV3 class is used to describe the parameters necessary for drawing a frame in Qt ...
QObject * parent() const
Returns a pointer to the parent object.
void setFrameStyle(int)
Sets the frame style to style.
bool event(QEvent *e)
Reimplemented Function
virtual void drawControl(ControlElement element, const QStyleOption *opt, QPainter *p, const QWidget *w=0) const =0
Draws the given element with the provided painter with the style options specified by option...
The QRect class defines a rectangle in the plane using integer precision.
void setFrameRect(const QRect &)
em>Reimplemented Function
QSize sizeHint() const
em>Reimplemented Function
The QSize class defines the size of a two-dimensional object using integer point precision.
bool isValid() const
Returns true if the rectangle is valid, otherwise returns false.
The QPaintEvent class contains event parameters for paint events.
static void setLayoutItemMargins(int left, int top, int right, int bottom, QRect *rect, Qt::LayoutDirection dir)
The QEvent class is the base class of all event classes.
Type type() const
Returns the event type.
The QFrame class is the base class of widgets that can have a frame.
QRect rect
the area that should be used for various calculations and painting
void updateStyledFrameWidths()
Updates the frame widths from the style.