DocumentDemo Example

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QWidget>
#include <QLabel>
#include <QMouseEvent>
#include "DemoDockWindow.h"

class MdiChild;
class DockWidgetPanelCreator;
class MainWindow : public DemoDockWindow
{
    Q_OBJECT
public:
    explicit MainWindow(QWidget* parent = Q_NULL);
    virtual ~MainWindow();
public:
    void createActions();
    void createMainMenu();
    void createFileMenu(QMenu* menu);
    void createEditMenu(QMenu* menu);
    void createViewMenu(QMenu* menu);
    void createToolBars();
    void createDockPanels();
    void createStatusBar();
    bool openFile(const QString& path = QString());
public Q_SLOTS:
    void newFile();
    void open();
    MdiChild* createMdiChild();
private:
    bool loadFile(const QString& fileName);
    DockWidgetPanel* findMdiChild(const QString& fileName) const;
protected:
    virtual void closeEvent(QCloseEvent* event);
protected:
    QMenu* m_fileMenu;
    QMenu* m_editMenu;
    QMenu* m_viewMenu;
    QMenu* m_helpMenu;

    QAction* m_navigateBackwardAction;
    QAction* m_navigateForwardAction;
    QAction* m_newFileAction;
    QAction* m_openFileAction;
    QAction* m_closeDocFileAction;
    QAction* m_saveFileAction;
    QAction* m_saveAllFileAction;
    QAction* m_undoAction;
    QAction* m_redoAction;
    // Panels
    QAction* m_solutionExplorerAction;
    QAction* m_classViewAction;
    QAction* m_resourceViewAction;

    DockWidgetPanelCreator* m_panelSolutionExplorer;
    DockWidgetPanelCreator* m_panelResourceView;
    DockWidgetPanelCreator* m_panelClassView;
    DockWidgetPanelCreator* m_panelOutput;
    DockWidgetPanelCreator* m_panelWatch;
    DockWidgetPanelCreator* m_panelToolBox;
private:
    Q_DISABLE_COPY(MainWindow)
};

#endif /* MAINWINDOW_H */