StyledWidgetsDemo Example
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <DevMachines/QtitanStyle>
class QMdiArea;
class QTextEdit;
class QActionGroup;
class StyleWindow;
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget* parent = 0);
virtual ~MainWindow();
protected:
void createActions();
void createMenuBar();
void createToolBar();
void createDockWindows();
protected:
virtual void closeEvent(QCloseEvent* event);
protected:
void readSettings();
void writeSettings();
private Q_SLOTS:
void showStyleWindow();
void createStyleDialog();
QTextEdit* createMdiChild();
void styleChanged(QAction* action);
void about();
#ifdef QTN_CALCULATOR
void executeAction(int);
void extActionsOn(int);
void userActionsOn(int);
#endif
private:
QMenu* m_menuView;
QMenu* m_menuTheme;
#ifdef QTN_CALCULATOR
CalculatorWidget* m_calculator;
#endif
QAction* m_actNew;
QAction* m_actOpen;
QAction* m_actClose;
QAction* m_actSave;
QAction* m_actSaveAs;
QAction* m_actPrint;
QAction* m_actPrintPreview;
QAction* m_actExit;
QActionGroup* m_groupThemesActions;
QAction* m_actDefaultStyle;
QAction* m_actFusionStyle;
QAction* m_actionAdobeLightGray;
QAction* m_actionAdobeGray;
QAction* m_actionAdobeDarkGray;
QAction* m_actionAdobeBlack;
QAction* m_actBlueTheme;
QAction* m_actBlackTheme;
QAction* m_actSilverTheme;
QAction* m_actAquaTheme;
QAction* m_actScenicTheme;
QAction* m_actBlue2010Theme;
QAction* m_actSilver2010Theme;
QAction* m_actBlack2010Theme;
QAction* m_act2013WhiteTheme;
QAction* m_act2013GrayTheme;
QAction* m_act2013DarkTheme;
QAction* m_act2016ColorfulTheme;
QAction* m_act2016WhiteTheme;
QAction* m_act2016DarkGrayTheme;
QAction* m_act2016BlackTheme;
QAction* m_DCStyleLight;
QAction* m_DCStyleDark;
QAction* m_actHelp;
QMdiArea* m_mdiArea;
QDockWidget* m_styleDock;
QDockWidget* m_treeDock;
QDockWidget* m_propDock;
QDockWidget* m_toolBoxDock;
StyleWindow* m_styleWindow;
private:
QString m_styleName;
};
class StyleWindow : public QMainWindow
{
public:
StyleWindow(QWidget* parent);
QSize sizeHint() const override;
private:
QWidget* createPaletteForm();
QWidget* createIconsForm();
QWidget* createButtonsForm();
private:
QTabWidget* m_forms;
};
#endif // MAINWINDOW_H