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

📄 qstyleoption.cpp

📁 qt-x11-opensource-src-4.1.4.tar.gz源码
💻 CPP
📖 第 1 页 / 共 5 页
字号:
    For an example demonstrating how style options can be used, see    the \l {widgets/styles}{Styles} example.    \sa QStyleOptionFrame, QStyleOption*//*!    Constructs a QStyleOptionFrameV2.*/QStyleOptionFrameV2::QStyleOptionFrameV2()    : QStyleOptionFrame(Version), features(None){}/*!    \fn QStyleOptionFrameV2::QStyleOptionFrameV2(const QStyleOptionFrameV2 &other)    Constructs a QStyleOptionFrameV2 copy of the \a other style option.*//*!    \internal*/QStyleOptionFrameV2::QStyleOptionFrameV2(int version)    : QStyleOptionFrame(version), features(None){}/*!    Constructs a QStyleOptionFrameV2 copy of the \a other style option    which can be either of the QStyleOptionFrameV2 or    QStyleOptionFrame types.    If the \a other style option's version is 1, the new style option's \l    FrameFeature value is set to \l QStyleOptionFrameV2::None. If its    version is 2, its \l FrameFeature value is simply copied to the    new style option.    \sa version*/QStyleOptionFrameV2::QStyleOptionFrameV2(const QStyleOptionFrame &other){    QStyleOptionFrame::operator=(other);    const QStyleOptionFrameV2 *f2 = qstyleoption_cast<const QStyleOptionFrameV2 *>(&other);    features = f2 ? f2->features : FrameFeatures(QStyleOptionFrameV2::None);    version = Version;}/*!    Assigns the \a other style option to this style option. The \a    other style option can be either of the QStyleOptionFrameV2 or    QStyleOptionFrame types.    If the \a{other} style option's version is 1, this style option's    \l FrameFeature value is set to \l QStyleOptionFrameV2::None. If    its version is 2, its \l FrameFeature value is simply copied to    this style option.*/QStyleOptionFrameV2 &QStyleOptionFrameV2::operator=(const QStyleOptionFrame &other){    QStyleOptionFrame::operator=(other);    const QStyleOptionFrameV2 *f2 = qstyleoption_cast<const QStyleOptionFrameV2 *>(&other);    features = f2 ? f2->features : FrameFeatures(QStyleOptionFrameV2::None);    version = Version;    return *this;}/*!    \enum QStyleOptionFrameV2::FrameFeature    This enum describles the different types of features a frame can have.    \value None Indicates a normal frame.    \value Flat Indicates a flat frame.*//*!    \class QStyleOptionGroupBox    \brief The QStyleOptionGroupBox class describes the parameters for    drawing a group box.    \since 4.1    The QStyleOptionGroupBox class is used to draw the group box'    frame, title, and optional check box.    It holds the lineWidth and the midLineWidth for drawing the panel,    the group box's \l {text}{title} and the title's \l    {textAlignment}{alignment} and \l {textColor}{color}.    For an example demonstrating how style options can be used, see    the \l {widgets/styles}{Styles} example.    \sa QStyleOption*//*!    \variable QStyleOptionGroupBox::lineWidth    \brief The line width for drawing the panel.    \sa QFrame::lineWidth*//*!    \variable QStyleOptionGroupBox::midLineWidth    \brief The mid-line width for drawing the panel. This is usually used in    drawing sunken or raised group box frames.    \sa QFrame::midLineWidth*//*!    \variable QStyleOptionGroupBox::text    The text of the group box.    \sa QGroupBox::title*//*!    \variable QStyleOptionGroupBox::textAlignment    The alignment of the group box title.    \sa QGroupBox::alignment*//*!    \variable QStyleOptionGroupBox::textColor    The color of the group box title.*//*!    Constructs a QStyleOptionGroupBox. The members variables are    initialized to default values.*/QStyleOptionGroupBox::QStyleOptionGroupBox()    : QStyleOptionComplex(Version, Type), features(QStyleOptionFrameV2::None),      textAlignment(Qt::AlignLeft), lineWidth(0), midLineWidth(0){}/*!    \fn QStyleOptionGroupBox::QStyleOptionGroupBox(const QStyleOptionGroupBox &other)    Constructs a copy of the \a other style option.*//*!    \internal*/QStyleOptionGroupBox::QStyleOptionGroupBox(int version)    : QStyleOptionComplex(version, Type), features(QStyleOptionFrameV2::None),      textAlignment(Qt::AlignLeft), lineWidth(0), midLineWidth(0){}/*!    \class QStyleOptionHeader    \brief The QStyleOptionHeader class is used to describe the    parameters for drawing a header.    The QStyleOptionHeader class is used for drawing the item views'    header pane, header sort arrow, and header label.*//*!    Constructs a QStyleOptionHeader. The members variables are    initialized to default values.*/QStyleOptionHeader::QStyleOptionHeader()    : QStyleOption(QStyleOptionHeader::Version, SO_Header),      section(0), textAlignment(0), iconAlignment(0),      position(QStyleOptionHeader::Beginning),      selectedPosition(QStyleOptionHeader::NotAdjacent), sortIndicator(None),      orientation(Qt::Horizontal){}/*!    \internal*/QStyleOptionHeader::QStyleOptionHeader(int version)    : QStyleOption(version, SO_Header),      section(0), textAlignment(0), iconAlignment(0),      position(QStyleOptionHeader::Beginning),      selectedPosition(QStyleOptionHeader::NotAdjacent), sortIndicator(None),      orientation(Qt::Horizontal){}/*!    \variable QStyleOptionHeader::orientation    \brief the header's orientation (horizontal or vertical)    \sa Qt::Orientation*//*!    \fn QStyleOptionHeader::QStyleOptionHeader(const QStyleOptionHeader &other)    Constructs a copy of the \a other style option.*//*!    \variable QStyleOptionHeader::Type    Equals SO_Header.*//*!    \variable QStyleOptionHeader::Version    Equals 1.*//*!    \variable QStyleOptionHeader::section    \brief Which section of the header is being painted.*//*!    \variable QStyleOptionHeader::text    \brief The text of the header.*//*!    \variable QStyleOptionHeader::textAlignment    \brief The alignment flags for the text of the header.    \sa Qt::Alignment*//*!    \variable QStyleOptionHeader::icon    \brief The icon of the header.*//*!    \variable QStyleOptionHeader::iconAlignment    \brief The alignment flags for the icon of the header.    \sa Qt::Alignment*//*!    \variable QStyleOptionHeader::position    \brief the section's position in relation to the other sections*//*!    \variable QStyleOptionHeader::selectedPosition    \brief the section's position in relation to the selected section*//*!    \variable QStyleOptionHeader::sortIndicator    \brief the direction the sort indicator should be drawn*//*!    \enum QStyleOptionHeader::SectionPosition    This enum lets you know where the section's position is in relation to the other sections.    \value Beginning At the beginining of the header    \value Middle In the middle of the header    \value End At the end of the header    \value OnlyOneSection Only one header section*//*!    \enum QStyleOptionHeader::SelectedPosition    This enum lets you know where the section's position is in relation to the selected section.    \value NotAdjacent Not adjacent to the selected section    \value NextIsSelected The next section is selected    \value PreviousIsSelected The previous section is selected    \value NextAndPreviousAreSelected Both the next and previous section are selected*//*!    \enum QStyleOptionHeader::SortIndicator    Indicates which direction the sort indicator should be drawn    \value None No sort indicator is needed    \value SortUp Draw an up indicator    \value SortDown Draw a down indicator*//*!    \class QStyleOptionButton    \brief The QStyleOptionButton class is used to describe the    parameters for drawing buttons.    The QStyleOptionButton class is used to draw \l QPushButton, \l    QCheckBox, and \l QRadioButton.    \sa QStyleOptionToolButton*//*!    \enum QStyleOptionButton::ButtonFeature    This enum describles the different types of features a push button can have.    \value None	Indicates a normal push button.    \value Flat Indicates a flat push button.    \value HasMenu Indicates that the button has a drop down menu.    \value DefaultButton Indicates that the button is a default button.    \value AutoDefaultButton Indicates that the button is an auto default button.    \sa features*//*!    Constructs a QStyleOptionButton. The members variables are    initialized to default values.*/QStyleOptionButton::QStyleOptionButton()    : QStyleOption(QStyleOptionButton::Version, SO_Button), features(None){}/*!    \internal*/QStyleOptionButton::QStyleOptionButton(int version)    : QStyleOption(version, SO_Button), features(None){}/*!    \fn QStyleOptionButton::QStyleOptionButton(const QStyleOptionButton &other)    Constructs a copy of the \a other style option.*//*!    \variable QStyleOptionButton::Type    Equals SO_Button.*//*!    \variable QStyleOptionButton::Version    Equals 1.*//*!    \variable QStyleOptionButton::features    \brief The features for the button    This variable is a bitwise OR of the features that describe this button.    \sa ButtonFeature*//*!    \variable QStyleOptionButton::text    \brief The text of the button.*//*!    \variable QStyleOptionButton::icon    \brief The icon of the button.    \sa iconSize*//*!    \variable QStyleOptionButton::iconSize    \brief The size of the icon for the button*/#ifndef QT_NO_TOOLBAR/*!    \class QStyleOptionToolBar    \brief The QStyleOptionToolBar class is used to describe the    parameters for drawing a toolbar.    \since 4.1    The QStyleOptionToolBar class holds the lineWidth and the    midLineWidth for drawing the widget. It also stores information    about which \l {toolBarArea}{area} the toolbar should be located    in, whether it is movable or not, which position the toolbar line    should have (positionOfLine), and the toolbar's position within    the line (positionWithinLine).    In addition, the class provides a couple of enums: The    ToolBarFeature enum is used to describe whether a toolbar is    movable or not, and the ToolBarPosition enum is used to describe    the position of a toolbar line, as well as the toolbar's position    within the line.    For an example demonstrating how style options can be used, see    the \l {widgets/styles}{Styles} example.    \sa QStyleOption*//*!    Constructs a QStyleOptionToolBar. The members variables are    initialized to default values.*/QStyleOptionToolBar::QStyleOptionToolBar()    : QStyleOption(Version, SO_ToolBar), positionOfLine(OnlyOne), positionWithinLine(OnlyOne),      toolBarArea(Qt::TopToolBarArea), features(None), lineWidth(0), midLineWidth(0){}/*!    \fn QStyleOptionToolBar::QStyleOptionToolBar(const QStyleOptionToolBar &other)    Constructs a copy of the \a other style option.*//*!    \internal*/QStyleOptionToolBar::QStyleOptionToolBar(int version): QStyleOption(version, SO_ToolBar), positionOfLine(OnlyOne), positionWithinLine(OnlyOne),  toolBarArea(Qt::TopToolBarArea), features(None), lineWidth(0), midLineWidth(0){}/*!    \enum QStyleOptionToolBar::ToolBarPosition    \image qstyleoptiontoolbar-position.png    This enum is used to describe the position of a toolbar line, as    well as the toolbar's position within the line.    The order of the positions within a line starts at the top of a    vertical line, and from the left within a horizontal line. The    order of the positions for the lines is always from the the    parent widget's boundary edges.    \value Beginning The toolbar is located at the beginning of the line,           or the toolbar line is the first of several lines. There can           only be one toolbar (and only one line) with this position.    \value Middle The toolbar is located in the middle of the line,           or the toolbar line is in the middle of several lines. There can           several toolbars (and lines) with this position.    \value End The toolbar is located at the end of the line,           or the toolbar line is the last of several lines. There can           only be one toolbar (and only one line) with this position.    \value OnlyOne There is only one toolbar or line. This is the default value           of the positionOfLine and positionWithinLine variables.    \sa positionWithinLine, positionOfLine*//*!    \enum QStyleOptionToolBar::ToolBarFeature    This enum is used to describe whether a toolbar is movable or not.    \value None The toolbar cannot be moved. The default value.

⌨️ 快捷键说明

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