Application Example
#ifndef RIBBONPOPULARPAGE_H #define RIBBONPOPULARPAGE_H #include <QWidget> #include "mainwindow.h" #include "ui_ribbonpopularpage.h" class RibbonPopularPage : public QWidget { Q_OBJECT public: explicit RibbonPopularPage(MainWindow* mainWindow, QWidget* parent = Q_NULL); virtual ~RibbonPopularPage(); public: enum Theme { DefaultStyle, FusionStyle, AdobePhotoshopLightGray, AdobePhotoshopGray, AdobePhotoshopDarkGray, AdobePhotoshopBlack, Office2013White, Office2013Gray, Office2013Dark, Office2016Colorful, Office2016White, Office2016DarkGray, Office2016Black, }; protected: void setupPage(); void updateEnabledWidgets(); public Q_SLOTS: void currentThemeChanged(int); void currentBackgroundChanged(int); void accentColorSelected(const QColor& color); void accepted(); protected: virtual void showEvent(QShowEvent* event); private: Ui::customizePopularPage m_pageRes; Qtitan::ColorPickerButton* m_accentButton; RibbonPopularPage::Theme m_currentThemeId; QColor m_accentColor; QString m_backgroundName; MainWindow* m_mainWindow; bool m_wasDisplayed; private: Q_DISABLE_COPY(RibbonPopularPage) }; #endif // RIBBONPOPULARPAGE_H