2023-03-10 12:53:54 +00:00
|
|
|
#ifndef PROJECTPRESENT_H
|
|
|
|
#define PROJECTPRESENT_H
|
|
|
|
|
2023-03-17 13:58:38 +00:00
|
|
|
#include "DocsManager.h"
|
2023-03-10 12:53:54 +00:00
|
|
|
#include "manager_docs.h"
|
|
|
|
|
|
|
|
#include <QTreeView>
|
|
|
|
#include <QWidget>
|
|
|
|
#include <commandsdispatcher.h>
|
|
|
|
#include <libProjectManager.h>
|
2023-08-27 14:09:46 +00:00
|
|
|
#include <splitpanel.h>
|
2023-03-10 12:53:54 +00:00
|
|
|
|
|
|
|
namespace Components {
|
|
|
|
/**
|
|
|
|
* @brief 项目视图
|
|
|
|
*/
|
2023-08-27 14:09:46 +00:00
|
|
|
class ProjectPresent : public SplitFrame::FnWrap<ProjectPresent, false> {
|
2023-03-10 12:53:54 +00:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2023-08-27 14:09:46 +00:00
|
|
|
explicit ProjectPresent(SplitFrame::ViewPresent *host, Schedule::CommandsDispatcher *core, Core::DocumentsManager *mgr,
|
|
|
|
QWidget *parent = nullptr);
|
2023-03-10 12:53:54 +00:00
|
|
|
|
2023-08-27 14:09:46 +00:00
|
|
|
QModelIndex currentIndex() const;
|
2023-03-10 12:53:54 +00:00
|
|
|
|
|
|
|
private:
|
2023-08-27 14:09:46 +00:00
|
|
|
Core::DocumentsManager *const project_manager;
|
|
|
|
Schedule::CommandsDispatcher *const source;
|
|
|
|
QTreeView *const view_present;
|
2023-03-10 12:53:54 +00:00
|
|
|
|
2023-08-27 14:09:46 +00:00
|
|
|
void menu_popup(const QPoint &p);
|
|
|
|
void open_target(const QModelIndex &t);
|
|
|
|
|
|
|
|
// FnWrap interface
|
|
|
|
public:
|
|
|
|
virtual void closeProcess() override;
|
2023-03-10 12:53:54 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif // PROJECTPRESENT_H
|