QtNovelUI/WordsIDE/storyboardspresent.h

60 lines
1.6 KiB
C
Raw Normal View History

2022-11-25 01:18:54 +00:00
#ifndef STORYBOARDSPRESENT_H
#define STORYBOARDSPRESENT_H
2023-03-17 13:58:38 +00:00
#include "DocsManager.h"
2022-11-25 01:18:54 +00:00
#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 {
2023-03-17 13:58:38 +00:00
class StoryboardsPresent : public QWidget, public MakeTools::PresentBase {
2023-03-11 07:01:28 +00:00
public:
2023-03-17 13:58:38 +00:00
StoryboardsPresent(Schedule::CommandsDispatcher *core, DataModel::StoryboardsPresentModel *backend, QWidget *parent = nullptr);
2023-03-11 07:01:28 +00:00
// AccessibleObject interface
public:
virtual QString name() const override;
2023-03-17 13:58:38 +00:00
// PresentBase interface
public:
virtual QWidget *widget() const override;
2023-03-11 07:01:28 +00:00
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