QtNovelUI/WordsIDE/storyconceptspresent.h

58 lines
1.5 KiB
C
Raw Normal View History

2022-11-29 03:47:12 +00:00
#ifndef STORYCONCEPTSPRESENT_H
#define STORYCONCEPTSPRESENT_H
2022-11-25 01:18:54 +00:00
#include "appcore.h"
2022-11-29 03:47:12 +00:00
#include "tools.h"
#include <libParse.h>
2022-11-25 01:18:54 +00:00
#include <QObject>
#include <QTextBrowser>
#include <QTreeView>
#include <QWidget>
namespace Components {
2023-03-11 04:52:33 +00:00
class StoryconceptsPresentModel : public Schedule::AccessibleObject {
public:
StoryconceptsPresentModel(Core::AppCore *core);
virtual ~StoryconceptsPresentModel();
2022-11-25 01:18:54 +00:00
2023-03-11 04:52:33 +00:00
QStandardItemModel *treeModel() const;
QTextDocument *detailsBackend() const;
2022-11-25 01:18:54 +00:00
2023-03-11 04:52:33 +00:00
void refreshTree();
void detailsShow(const QList<QString> &path);
// AccessibleObject interface
public:
virtual QString name() const override;
private:
2022-11-25 01:18:54 +00:00
Core::AppCore *const core_ins;
QStandardItemModel *const model_base;
2023-03-11 04:52:33 +00:00
QTextDocument *const detail_backend;
Tools::TreeSyncs<Parse::Result::DesNode *> *concept_model;
};
class StoryconceptsPresent : public QWidget,
public Schedule::AccessibleObject {
public:
StoryconceptsPresent(Schedule::CommandsDispatcher *core,
QWidget *parent = nullptr);
private:
Schedule::CommandsDispatcher *const core_ins;
QTreeView *const tree_view;
2022-11-25 01:18:54 +00:00
QTextBrowser *const details_view;
2023-03-11 04:52:33 +00:00
void show_details(const QModelIndex &curr);
void jump_to(const QModelIndex &curr);
2023-03-11 05:55:16 +00:00
// AccessibleObject interface
public:
virtual QString name() const override;
2022-11-25 01:18:54 +00:00
};
}
2022-11-29 03:47:12 +00:00
#endif // STORYCONCEPTSPRESENT_H