#ifndef VIEWSESSION_H #define VIEWSESSION_H #include "projectview.h" #include #include #include #include #include #include class MainWindow; namespace Core { class ViewSession : public QObject { Q_OBJECT public: ViewSession(Config::Configration *port, MainWindow *host); void initPresentView(Components::PresentContainer *center_frame, Components::ProjectView *project_present, QStandardItemModel *model); void viewStatesSave(QMainWindow *win, SplitFrame::ViewPresent *root); void viewStatesRestore(QMainWindow *win, SplitFrame::ViewPresent *root); private: QList base_path; SplitFrame::ViewPresent *host; SplitFrame::RectCom *edit_panel = nullptr; Config::Configration *const recover_port; QHash view_store; typedef float split_pos; typedef float split_width; std::map> split_infos; SplitFrame::RectCom *views_state_restore(const QHash &cache, const QList &target_path, Config::Configration *port, SplitFrame::ViewPresent *host); void relayout_cascade(SplitFrame::RectCom *root); // QObject interface public: virtual bool eventFilter(QObject *watched, QEvent *event) override; }; } // namespace Core #endif // VIEWSESSION_H