QtNovelUI/WordsIDE/projectpresent.h

39 lines
909 B
C++

#ifndef PROJECTPRESENT_H
#define PROJECTPRESENT_H
#include "DocsManager.h"
#include "manager_docs.h"
#include <QTreeView>
#include <QWidget>
#include <commandsdispatcher.h>
#include <libProjectManager.h>
namespace Components {
/**
* @brief 项目视图
*/
class ProjectPresent : public QWidget, public MakeTools::PresentBase {
Q_OBJECT
public:
explicit ProjectPresent(Schedule::CommandsDispatcher *core, DataModel::DocumentsManager *mgr, QWidget *parent = nullptr);
QModelIndex currentIndex() const;
// PresentBase interface
public:
virtual QWidget *widget() const override;
virtual QString name() const override;
private:
Schedule::CommandsDispatcher *const source;
QTreeView *const view_present;
void menu_popup(const QPoint &p);
void open_target(const QModelIndex &t);
};
}
#endif // PROJECTPRESENT_H