QtNovelUI/WordsIDE/storyboardspresent.h

58 lines
1.5 KiB
C
Raw Normal View History

2022-11-25 01:18:54 +00:00
#ifndef STORYBOARDSPRESENT_H
#define STORYBOARDSPRESENT_H
#include "appcore.h"
#include <QTextEdit>
#include <QTreeView>
#include <QWidget>
2023-03-11 07:01:28 +00:00
namespace DataModel {
2022-11-25 01:18:54 +00:00
2023-03-11 07:01:28 +00:00
class StoryboardsPresentModel : public Schedule::AccessibleObject {
public:
StoryboardsPresentModel(Core::AppCore *core);
virtual ~StoryboardsPresentModel();
2022-11-25 01:18:54 +00:00
void refresh();
2023-03-11 07:01:28 +00:00
void detailShow(const QList<QString> &navi);
QStandardItemModel *treeModel() const;
QTextDocument *detailBackend() const;
2022-11-25 01:18:54 +00:00
2023-03-11 07:01:28 +00:00
// AccessibleObject interface
public:
virtual QString name() const override;
private:
2022-11-25 01:18:54 +00:00
Core::AppCore *const core_ins;
2023-03-11 07:01:28 +00:00
QStandardItemModel *const model_base;
QTextDocument *const detail_backend;
};
} // namespace DataModel
namespace Components {
class StoryboardsPresent : public QWidget,
public Schedule::AccessibleObject {
public:
StoryboardsPresent(Schedule::CommandsDispatcher *core,
QWidget *parent = nullptr);
// AccessibleObject interface
public:
virtual QString name() const override;
private:
Schedule::CommandsDispatcher *const core_ins;
2022-11-25 01:18:54 +00:00
QTreeView *const tree_view;
QTextEdit *const details_view;
void show_current_details(const QModelIndex &idx);
2023-03-11 07:01:28 +00:00
void jump_to(const QModelIndex &idx);
2022-11-25 01:18:54 +00:00
};
2023-03-11 07:01:28 +00:00
} // namespace Components
2022-11-25 01:18:54 +00:00
#endif // STORYBOARDSPRESENT_H