#ifndef VYMVIEW_H
#define VYMVIEW_H

#include <QItemSelectionModel>
#include <QMainWindow>
#include <QWidget>

class DockEditor;
class VymModel;
class MapEditor;
class SlideEditor;
class TreeEditor;
class QTreeView;

class VymView : public QMainWindow {
    Q_OBJECT
  public:
    VymView(VymModel *model);
    VymModel *getModel();
    MapEditor *getMapEditor();
    void initFocus();
    void nextSlide();
    void previousSlide();
    void updateColors();

  public slots:
    void changeSelection(const QItemSelection &newSel,
                         const QItemSelection &delSel);
    void updateDockWidgetTitles();
    void expandAll();
    void expandOneLevel();
    void collapseOneLevel();
    void collapseUnselected();
    void showSelection(bool scaled, bool rotated);
    void treeEditorVisibilityChanged();
    void setTreeEditorVisibility(bool);
    void slideEditorVisibilityChanged();
    void setSlideEditorVisibility(bool);
    void setFocusMapEditor();
    void setFocusTreeEditor();
    void setFocusSlideEditor();

  private:
    VymModel *model;
    TreeEditor *treeEditor;
    DockEditor *treeEditorDE;
    SlideEditor *slideEditor;
    DockEditor *slideEditorDE;

    MapEditor *mapEditor;
    // DockEditor *mapEditorDE;
    QItemSelectionModel *selModel;
};

#endif
