CustomTitleBarDemo Example

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QWizard>
#include <ui_titlebarwidget.h>
#include <QtitanDef.h>

/* TitleBarWidget */
class TitleBarWidget : public QWidget
{
    Q_OBJECT
public:
    explicit TitleBarWidget(QWidget* parent = Q_NULL);
    virtual ~TitleBarWidget();
private:
    void createToolBar();
protected:
    Ui::TitleBar m_ui;
private:
    Q_DISABLE_COPY(TitleBarWidget)
};

#define TEST_WIZARD

#ifdef TEST_WIZARD
typedef QWizard DemoMainWindow;
#else
typedef QMainWindow DemoMainWindow;
#endif

class MainWindow : public DemoMainWindow
{
  Q_OBJECT
public:
    explicit MainWindow(QWidget* parent = Q_NULL);
    virtual ~MainWindow();
protected:
    void setFrameThemeEnabled(bool enable);
protected:
    TitleBarWidget* m_titleBarWidget;
private:
    Q_DISABLE_COPY(MainWindow)
};

#endif // MAINWINDOW_H