QtNovelUI/WordsIDE/vcontrol_project.h

41 lines
1.1 KiB
C
Raw Normal View History

2023-02-26 14:44:00 +00:00
#ifndef VISUABLE_PROJECT_CONTROLLER
#define VISUABLE_PROJECT_CONTROLLER
2022-11-17 08:26:05 +00:00
#include "appcore.h"
2022-11-17 08:26:05 +00:00
#include <QTreeView>
#include <QWidget>
2022-11-18 23:47:32 +00:00
#include <libProjectManager.h>
2022-11-17 08:26:05 +00:00
namespace Components {
2023-02-26 14:44:00 +00:00
class VisiableProjectController : public QTreeView
2022-11-17 08:26:05 +00:00
{
Q_OBJECT
public:
2023-02-26 14:44:00 +00:00
VisiableProjectController(Core::AppCore *src, Project::ProjectManager *project, QWidget *parent=nullptr);
virtual ~VisiableProjectController() = default;
2022-11-17 08:26:05 +00:00
signals:
void activeDocument(const QString &file_path, const QString &name);
2022-11-29 03:47:12 +00:00
void aboutToBoDelete(const QList<QFileInfo> &file_paths);
2022-11-17 08:26:05 +00:00
private:
Core::AppCore *const rtcore;
Project::ProjectManager *pjtins;
2022-11-17 08:26:05 +00:00
void explicit_active_document(const QModelIndex &curr);
void contexMenuPopup(const QPoint &pos);
void alloc_file(const QModelIndex &idx_it, const QString &type, const QString &suffix);
void project_configration();
2022-11-29 03:47:12 +00:00
2023-02-26 14:44:00 +00:00
void remove_node_tree(const QModelIndex &target);
2022-11-29 03:47:12 +00:00
QList<QStandardItem*> nodes_contained(QStandardItem *root);
2022-11-17 08:26:05 +00:00
};
}
2023-02-26 14:44:00 +00:00
#endif // VISUABLE_PROJECT_CONTROLLER