62 lines
1.6 KiB
C++
62 lines
1.6 KiB
C++
#ifndef STORYUNITSPRESENT_H
|
|
#define STORYUNITSPRESENT_H
|
|
|
|
#include <QPlainTextEdit>
|
|
#include <QStandardItemModel>
|
|
#include <QTextEdit>
|
|
#include <QTreeView>
|
|
#include <QWidget>
|
|
|
|
#include "appcore.h"
|
|
#include "libParse.h"
|
|
|
|
namespace DataModel {
|
|
|
|
class StoryunitsPresentModel : public Schedule::AccessibleObject {
|
|
public:
|
|
StoryunitsPresentModel(Core::AppCore *core);
|
|
virtual ~StoryunitsPresentModel();
|
|
|
|
QStandardItemModel *treeModel() const;
|
|
QTextDocument *detailsBackend() const;
|
|
|
|
void refreshTree();
|
|
void details_show(const QList<QString> &path);
|
|
|
|
// AccessibleObject interface
|
|
public:
|
|
virtual QString name() const override;
|
|
|
|
private:
|
|
Core::AppCore *const core_ins;
|
|
QStandardItemModel *const model_ins;
|
|
QTextDocument *const details_backend;
|
|
};
|
|
|
|
} // namespace DataModel
|
|
|
|
namespace Components {
|
|
|
|
class StoryunitsPresent : public QWidget,
|
|
public Schedule::AccessibleObject {
|
|
Q_OBJECT
|
|
public:
|
|
explicit StoryunitsPresent(Schedule::CommandsDispatcher *core,
|
|
QWidget *parent = nullptr);
|
|
|
|
// AccessibleObject interface
|
|
public:
|
|
virtual QString name() const override;
|
|
|
|
private:
|
|
Schedule::CommandsDispatcher *const disp_core;
|
|
QTreeView *const units_view;
|
|
QTextEdit *const details_show;
|
|
|
|
void jump_to(const QModelIndex &curr);
|
|
void show_details(const QModelIndex &curr);
|
|
};
|
|
} // namespace Components
|
|
|
|
#endif // STORYUNITSPRESENT_H
|