OfficeStyle Class

OfficeStyle base class for Office2007Style, Office2010Style and Office2016Style. Contains the general settings that are typical for all styles of Microsof office. The style available for Windows, Linux and MacOSX without any restrictions. More...

Header: #include <OfficeStyle>
Inherits: CommonStyle
Inherited By:

Office2007Style, Office2010Style, Office2013Style, Office2016Style, and Windows7ScenicStyle

Public Types

enum OfficePopupDecoration { PopupSystemDecoration, PopupCompatibleDecoration, PopupOfficeFlatDecoration, PopupMSNDecoration }

Properties

Public Functions

virtual ~OfficeStyle()
QColor accentColor() const
OfficeStyle::AccentColor accentIndexColor() const
QFont font(const QWidget *widget) const
bool isActiveTabAccented() const
bool isMDIWindowTitleIgnored() const
OfficeStyle::OfficePopupDecoration popupDecoration() const
void setAccentColor(const QColor &accentcolor)
void setAccentColor(OfficeStyle::AccentColor index)
void setActiveTabAccented(bool accented)
void setMDIWindowTitleIgnored(bool ignore = false)
void setPopupDecoration(OfficeStyle::OfficePopupDecoration decoration)

Reimplemented Public Functions

virtual void polish(QWidget *widget) override
virtual void polish(QPalette &palette) override
virtual QSize sizeFromContents(QStyle::ContentsType ct, const QStyleOption *opt, const QSize &contentsSize, const QWidget *widget = QWIDGET_NULL) const override
virtual QPixmap standardPixmap(QStyle::StandardPixmap sp, const QStyleOption *opt = QSTYLEOPTION_NULL, const QWidget *widget = QWIDGET_NULL) const override
virtual int styleHint(QStyle::StyleHint hint, const QStyleOption *opt = QSTYLEOPTION_NULL, const QWidget *widget = QWIDGET_NULL, QStyleHintReturn *shret = Q_NULL) const override
virtual QRect subControlRect(QStyle::ComplexControl control, const QStyleOptionComplex *option, QStyle::SubControl subControl, const QWidget *widget = QWIDGET_NULL) const override
virtual void unpolish(QApplication *app) override
virtual void unpolish(QWidget *widget) override

Detailed Description

Member Type Documentation

enum OfficeStyle::OfficePopupDecoration

This enum determines the decoration for specialized popup windows - OfficePopupWindow, which are used for informing users about the events which are occurred.

ConstantValueDescription
OfficeStyle::PopupSystemDecoration0Decoration of the popup depends from value of the style installed in the QApplication or in the poup window inside. If the installed style is descendant of OfficeStyle then the value of the getTheme() will be taken into account when decoration will be painting.
OfficeStyle::PopupCompatibleDecoration1Old decoration which has used in XP and other old Microsoft products.
OfficeStyle::PopupOfficeFlatDecoration2Flat decoration of the popup
OfficeStyle::PopupMSNDecoration3Decoration which has used in Microsoft Messanger product.

Property Documentation

activeTabAccented : bool

This property holds whether the painting of active tab with accent color is enabled. Accent color depends on the style or theme and can't be changed. Implemented for Office 2013 theme only.

Access functions:

bool isActiveTabAccented() const
void setActiveTabAccented(bool accented)

ignoreMDIWindowTitle : bool

Sets the flag for drawing MDI window title with native style or with office/ribbon style.

Access functions:

bool isMDIWindowTitleIgnored() const
void setMDIWindowTitleIgnored(bool ignore = false)

Member Function Documentation

[virtual] OfficeStyle::~OfficeStyle()

Destructor of OfficeStyle class.

QColor OfficeStyle::accentColor() const

Returns an accent color for Office style.

See also setAccentColor().

OfficeStyle::AccentColor OfficeStyle::accentIndexColor() const

Returns an accent index color for Office style.

QFont OfficeStyle::font(const QWidget *widget) const

Returns font for the given widget. In most cases it is equal to QApplication::font().

bool OfficeStyle::isMDIWindowTitleIgnored() const

Returs the flag for drawing MDI window title with native style or with office/ribbon style.

Note: Getter function for property ignoreMDIWindowTitle.

[override virtual] void OfficeStyle::polish(QWidget *widget)

Reimplements: CommonStyle::polish(QWidget *widget).

[override virtual] void OfficeStyle::polish(QPalette &palette)

Reimplements: CommonStyle::polish(QPalette &palette).

OfficeStyle::OfficePopupDecoration OfficeStyle::popupDecoration() const

Returns the value of the popupDecoration flag.

See also setPopupDecoration().

void OfficeStyle::setAccentColor(const QColor &accentcolor)

Sets an accent color for Office style.

See also accentColor().

void OfficeStyle::setAccentColor(OfficeStyle::AccentColor index)

Sets an accent color for Office style by color index.

void OfficeStyle::setPopupDecoration(OfficeStyle::OfficePopupDecoration decoration)

Sets the style of the decoration for OfficePopupWindow.

See also popupDecoration().

[override virtual] QSize OfficeStyle::sizeFromContents(QStyle::ContentsType ct, const QStyleOption *opt, const QSize &contentsSize, const QWidget *widget = QWIDGET_NULL) const

Reimplements: CommonStyle::sizeFromContents(QStyle::ContentsType ct, const QStyleOption *opt, const QSize &contentsSize, const QWidget *widget) const.

[override virtual] QPixmap OfficeStyle::standardPixmap(QStyle::StandardPixmap sp, const QStyleOption *opt = QSTYLEOPTION_NULL, const QWidget *widget = QWIDGET_NULL) const

Reimplements: CommonStyle::standardPixmap(QStyle::StandardPixmap sp, const QStyleOption *opt, const QWidget *widget) const.

[override virtual] int OfficeStyle::styleHint(QStyle::StyleHint hint, const QStyleOption *opt = QSTYLEOPTION_NULL, const QWidget *widget = QWIDGET_NULL, QStyleHintReturn *shret = Q_NULL) const

Reimplements: CommonStyle::styleHint(QStyle::StyleHint hint, const QStyleOption *option, const QWidget *widget, QStyleHintReturn *returnData) const.

[override virtual] QRect OfficeStyle::subControlRect(QStyle::ComplexControl control, const QStyleOptionComplex *option, QStyle::SubControl subControl, const QWidget *widget = QWIDGET_NULL) const

Reimplements: CommonStyle::subControlRect(QStyle::ComplexControl control, const QStyleOptionComplex *option, QStyle::SubControl subControl, const QWidget *widget) const.

[override virtual] void OfficeStyle::unpolish(QApplication *app)

Reimplements: CommonStyle::unpolish(QApplication *app).

[override virtual] void OfficeStyle::unpolish(QWidget *widget)

Reimplements: CommonStyle::unpolish(QWidget *widget).