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

📄 qstyleoption.cpp

📁 奇趣公司比较新的qt/emd版本
💻 CPP
📖 第 1 页 / 共 5 页
字号:
    \fn QStyleOptionFocusRect::QStyleOptionFocusRect(const QStyleOptionFocusRect &other)    Constructs a copy of the \a other style option.*//*!    \variable QStyleOptionFocusRect::backgroundColor    \brief the background color on which the focus rectangle is being drawn    The default value is an invalid color with the RGB value (0, 0,    0). An invalid color is a color that is not properly set up for    the underlying window system.*//*!    \class QStyleOptionFrame    \brief The QStyleOptionFrame class is used to describe the    parameters for drawing a frame.    QStyleOptionFrame is used for drawing several built-in Qt widgets,    including QFrame, QGroupBox, QLineEdit, and QMenu. Note that to    describe the parameters necessary for drawing a frame in Qt 4.1 or    above, you must use the QStyleOptionFrameV2 subclass.    An instance of the QStyleOptionFrame class has \l type SO_Frame    and \l version 1.    The type is used internally by QStyleOption, its subclasses, and    qstyleoption_cast() to determine the type of style option. In    general you do not need to worry about this unless you want to    create your own QStyleOption subclass and your own styles.  The    version is used by QStyleOption subclasses to implement extensions    without breaking compatibility. If you use qstyleoption_cast(),    you normally don't need to check it.    If you create your own QStyle subclass, you should handle both    QStyleOptionFrame and QStyleOptionFrameV2.    For an example demonstrating how style options can be used, see    the \l {widgets/styles}{Styles} example.    \sa QStyleOptionFrameV2, QStyleOption*//*!    Constructs a QStyleOptionFrame, initializing the members    variables to their default values.*/QStyleOptionFrame::QStyleOptionFrame()    : QStyleOption(Version, SO_Frame), lineWidth(0), midLineWidth(0){}/*!    \internal*/QStyleOptionFrame::QStyleOptionFrame(int version)    : QStyleOption(version, SO_Frame), lineWidth(0), midLineWidth(0){}/*!    \fn QStyleOptionFrame::QStyleOptionFrame(const QStyleOptionFrame &other)    Constructs a copy of the \a other style option.*//*!    \enum QStyleOptionFrame::StyleOptionType    This enum is used to hold information about the type of the style option, and    is defined for each QStyleOption subclass.    \value Type The type of style option provided (\l{SO_Frame} for this class).    The type is used internally by QStyleOption, its subclasses, and    qstyleoption_cast() to determine the type of style option. In    general you do not need to worry about this unless you want to    create your own QStyleOption subclass and your own styles.    \sa StyleOptionVersion*//*!    \enum QStyleOptionFrame::StyleOptionVersion    This enum is used to hold information about the version of the style option, and    is defined for each QStyleOption subclass.    \value Version 1    The version is used by QStyleOption subclasses to implement    extensions without breaking compatibility. If you use    qstyleoption_cast(), you normally don't need to check it.    \sa StyleOptionType*//*!    \variable QStyleOptionFrame::lineWidth    \brief the line width for drawing the frame    The default value is 0.    \sa QFrame::lineWidth*//*!    \variable QStyleOptionFrame::midLineWidth    \brief the mid-line width for drawing the frame    This is usually used in drawing sunken or raised frames.    The default value is 0.    \sa QFrame::midLineWidth*//*!    \class QStyleOptionFrameV2    \brief The QStyleOptionFrameV2 class is used to describe the    parameters necessary for drawing a frame in Qt 4.1 or above.    \since 4.1    QStyleOptionFrameV2 inherits QStyleOptionFrame which is used for    drawing several built-in Qt widgets, including QFrame, QGroupBox,    QLineEdit, and QMenu.    An instance of the QStyleOptionFrameV2 class has \l type SO_Frame    and \l version 2.  The type is used internally by QStyleOption,    its subclasses, and qstyleoption_cast() to determine the type of    style option. In general you do not need to worry about this    unless you want to create your own QStyleOption subclass and your    own styles. The version is used by QStyleOption subclasses to    implement extensions without breaking compatibility. If you use    qstyleoption_cast(), you normally don't need to check it.    If you create your own QStyle subclass, you should handle both    QStyleOptionFrame and QStyleOptionFrameV2. One way to achieve this    is to use the QStyleOptionFrameV2 copy constructor. For example:    \quotefromfile snippets/qstyleoption/main.cpp    \skipto MyStyle()    \skipto QStyleOptionFrame    \printuntil }    In the example above: If the \c frameOption's version is 1, \l    FrameFeature is set to \l None for \c frameOptionV2. If \c    frameOption's version is 2, the constructor will simply copy the    \c frameOption's \l FrameFeature value.    For an example demonstrating how style options can be used, see    the \l {widgets/styles}{Styles} example.    \sa QStyleOptionFrame, QStyleOption*//*!    Constructs a QStyleOptionFrameV2 object.*/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.*//*!    \variable QStyleOptionFrameV2::features    \brief a bitwise OR of the features that describe this frame.    \sa FrameFeature*//*!    \enum QStyleOptionFrameV2::StyleOptionVersion    This enum is used to hold information about the version of the style option, and    is defined for each QStyleOption subclass.    \value Version 2    The version is used by QStyleOption subclasses to implement    extensions without breaking compatibility. If you use    qstyleoption_cast(), you normally don't need to check it.    \sa StyleOptionType*//*!    \class QStyleOptionViewItemV2    \brief The QStyleOptionViewItemV2 class is used to describe the    parameters necessary for drawing a frame in Qt 4.2 or above.    \since 4.2    QStyleOptionViewItemV2 inherits QStyleOptionViewItem.    An instance of the QStyleOptionViewItemV2 class has \l type SO_ViewItem    and \l version 2. The type is used internally by QStyleOption,    its subclasses, and qstyleoption_cast() to determine the type of    style option. In general you do not need to worry about this    unless you want to create your own QStyleOption subclass and your    own styles. The version is used by QStyleOption subclasses to    implement extensions without breaking compatibility. If you use    qstyleoption_cast(), you normally don't need to check it.    See QStyleOptionFrameV2's detailed description for a discussion    of how to handle "V2" classes.    \sa QStyleOptionViewItem, QStyleOption*//*!    \enum QStyleOptionViewItemV2::StyleOptionVersion    This enum is used to hold information about the version of the    style option, and is defined for each QStyleOption subclass.    \value Version 2    The version is used by QStyleOption subclasses to implement    extensions without breaking compatibility. If you use    qstyleoption_cast(), you normally don't need to check it.    \sa StyleOptionType*//*!    \variable QStyleOptionViewItemV2::features    \brief a bitwise OR of the features that describe this view item    \sa ViewItemFeature*//*!    Constructs a QStyleOptionViewItemV2 object.*/QStyleOptionViewItemV2::QStyleOptionViewItemV2()    : QStyleOptionViewItem(Version), features(None){}/*!    \fn QStyleOptionViewItemV2::QStyleOptionViewItemV2(const QStyleOptionViewItemV2 &other)    Constructs a copy of \a other.*//*!    Constructs a QStyleOptionViewItemV2 copy of the \a other style option    which can be either of the QStyleOptionViewItemV2 or    QStyleOptionViewItem types.    If the \a other style option's version is 1, the new style option's \l    ViewItemFeature value is set to \l QStyleOptionViewItemV2::None. If its    version is 2, its \l ViewItemFeature value is simply copied to the    new style option.    \sa version*/QStyleOptionViewItemV2::QStyleOptionViewItemV2(const QStyleOptionViewItem &other)    : QStyleOptionViewItem(Version){    (void)QStyleOptionViewItemV2::operator=(other);}/*!    \internal*/QStyleOptionViewItemV2::QStyleOptionViewItemV2(int version)    : QStyleOptionViewItem(version){}/*!    Assigns the \a other style option to this style option. The \a    other style option can be either of the QStyleOptionViewItemV2 or    QStyleOptionViewItem types.    If the \a{other} style option's version is 1, this style option's    \l ViewItemFeature value is set to \l QStyleOptionViewItemV2::None.    If its version is 2, its \l ViewItemFeature value is simply copied    to this style option.*/QStyleOptionViewItemV2 &QStyleOptionViewItemV2::operator=(const QStyleOptionViewItem &other){    QStyleOptionViewItem::operator=(other);    const QStyleOptionViewItemV2 *v2 = qstyleoption_cast<const QStyleOptionViewItemV2 *>(&other);    features = v2 ? v2->features : ViewItemFeatures(QStyleOptionViewItemV2::None);    return *this;}/*!    \enum QStyleOptionViewItemV2::ViewItemFeature    This enum describles the different types of features an item can have.    \value None      Indicates a normal item.    \value WrapText  Indicates an item with wrapped text.    \value Alternate Indicates that the item's background is rendered using alternateBase.*/QStyleOptionViewItemV3::QStyleOptionViewItemV3()    : QStyleOptionViewItemV2(Version){}QStyleOptionViewItemV3::QStyleOptionViewItemV3(const QStyleOptionViewItem &other)    : QStyleOptionViewItemV2(Version){    (void)QStyleOptionViewItemV3::operator=(other);}QStyleOptionViewItemV3 &QStyleOptionViewItemV3::operator = (const QStyleOptionViewItem &other){    QStyleOptionViewItemV2::operator=(other);    const QStyleOptionViewItemV3 *v3 = qstyleoption_cast<const QStyleOptionViewItemV3*>(&other);    locale = v3 ? v3->locale : QLocale();    widget = v3 ? v3->widget : 0;    return *this;}QStyleOptionViewItemV3::QStyleOptionViewItemV3(int version)    : QStyleOptionViewItemV2(version){}/*!    \class QStyleOptionGroupBox    \brief The QStyleOptionGroupBox class describes the parameters for    drawing a group box.    \since 4.1    QStyleOptionButton contains all the information that QStyle    functions need the various graphical elements of a group 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 performance reasons, the access to the member variables is    direct (i.e., using the \c . or \c -> operator). This low-level feel    makes the structures straightforward to use and emphasizes that    these are simply parameters used by the style functions.    For an example demonstrating how style options can be used, see    the \l {widgets/styles}{Styles} example.    \sa QStyleOption, QStyleOptionComplex, QGroupBox*//*!    \enum QStyleOptionGroupBox::StyleOptionType    This enum is used to hold information about the type of the style option, and    is defined for each QStyleOption subclass.    \value Type The type of style option provided (\l{SO_GroupBox} for this class).    The type is used internally by QStyleOption, its subclasses, and    qstyleoption_cast() to determine the type of style option. In    general you do not need to worry about this unless you want to    create your own QStyleOption subclass and your own styles.

⌨️ 快捷键说明

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