#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QComboBox>
#include <QWidgetAction>

#include "DockManager.h"
#include "DockAreaWidget.h"
#include "DockWidget.h"

QT_BEGIN_NAMESPACE
namespace Ui { class CMainWindow; }
QT_END_NAMESPACE

class QGraphicsItem;
class QUndoStack;
class DrawingPanel;
class GraphicElementsPanel;
class DesignerScene;

class CMainWindow : public QMainWindow
{
    Q_OBJECT

public:
    CMainWindow(QWidget *parent = nullptr);
    ~CMainWindow();

protected:
	virtual void closeEvent(QCloseEvent* event) override;
    virtual void changeEvent(QEvent* event) override;

private:
    void initializeDockUi();
    void initializeAction();

private slots:
    void onAction_zoomIn();
    void onAction_zoomOut();
    void onAction_zoomFit();
    void onAction_createGroup();
    void onAction_destroyGroup();
    void onSignal_addItem(QGraphicsItem*);
    void onSignal_deleteItem();

private:
	QAction* SavePerspectiveAction = nullptr;
	QWidgetAction* PerspectiveListAction = nullptr;
	QComboBox* PerspectiveComboBox = nullptr;

    QUndoStack* m_pUndoStack;

    Ui::CMainWindow *ui;

    ads::CDockManager* DockManager;
    ads::CDockAreaWidget* StatusDockArea;
    ads::CDockWidget* TimelineDockWidget;

    DrawingPanel*          m_pDrawingPanel;
    GraphicElementsPanel*  m_pGraphicElementsPanel;
};
#endif // MAINWINDOW_H
