58 lines
1.5 KiB
C++
58 lines
1.5 KiB
C++
#ifndef STORYCONCEPTSPRESENT_H
|
|
#define STORYCONCEPTSPRESENT_H
|
|
|
|
#include "appcore.h"
|
|
#include "tools.h"
|
|
#include <libParse.h>
|
|
|
|
#include <QObject>
|
|
#include <QTextBrowser>
|
|
#include <QTreeView>
|
|
#include <QWidget>
|
|
|
|
namespace Components {
|
|
class StoryconceptsPresentModel : public Schedule::AccessibleObject {
|
|
public:
|
|
StoryconceptsPresentModel(Core::AppCore *core);
|
|
virtual ~StoryconceptsPresentModel();
|
|
|
|
QStandardItemModel *treeModel() const;
|
|
QTextDocument *detailsBackend() const;
|
|
|
|
void refreshTree();
|
|
void detailsShow(const QList<QString> &path);
|
|
|
|
// AccessibleObject interface
|
|
public:
|
|
virtual QString name() const override;
|
|
|
|
private:
|
|
Core::AppCore *const core_ins;
|
|
QStandardItemModel *const model_base;
|
|
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;
|
|
QTextBrowser *const details_view;
|
|
|
|
void show_details(const QModelIndex &curr);
|
|
void jump_to(const QModelIndex &curr);
|
|
|
|
// AccessibleObject interface
|
|
public:
|
|
virtual QString name() const override;
|
|
};
|
|
}
|
|
|
|
|
|
#endif // STORYCONCEPTSPRESENT_H
|