QtNovelUI/WordsIDE/fragmentsorderview.h

51 lines
1.3 KiB
C
Raw Normal View History

2022-12-08 19:43:42 +00:00
#ifndef FRAGMENTSORDERVIEW_H
#define FRAGMENTSORDERVIEW_H
#include <QStandardItemModel>
#include <QTableView>
#include <QWidget>
#include <libParse.h>
#include "appcore.h"
2023-03-10 13:01:19 +00:00
#include <commandsdispatcher.h>
2022-12-08 19:43:42 +00:00
2023-03-11 07:01:28 +00:00
namespace DataModel {
2023-03-11 05:55:16 +00:00
class FragmentsOrderviewModel : public Schedule::AccessibleObject {
public:
FragmentsOrderviewModel(Core::AppCore *core);
void refreshTable();
QStandardItemModel *tableModel() const;
private:
Core::AppCore *const core_ins;
QStandardItemModel *const table_base;
// AccessibleObject interface
public:
virtual QString name() const override;
};
2023-03-11 07:01:28 +00:00
} // namespace DataModel
2023-03-11 05:55:16 +00:00
2023-03-11 07:01:28 +00:00
namespace Components {
2023-03-10 13:01:19 +00:00
class FragmentsOrderView : public QWidget, public Schedule::AccessibleObject
2022-12-08 19:43:42 +00:00
{
Q_OBJECT
2023-03-11 05:55:16 +00:00
public:
explicit FragmentsOrderView(Schedule::CommandsDispatcher *core,
QWidget *parent = nullptr);
2022-12-08 19:43:42 +00:00
void double_click(const QModelIndex &index);
2023-03-11 05:55:16 +00:00
private:
Schedule::CommandsDispatcher *const core_ins;
2022-12-08 19:43:42 +00:00
QTableView *const table_view;
2023-03-10 13:01:19 +00:00
// AccessibleObject interface
2023-03-11 05:55:16 +00:00
public:
2023-03-10 13:01:19 +00:00
virtual QString name() const override;
2022-12-08 19:43:42 +00:00
};
2023-03-11 05:55:16 +00:00
} // namespace Components
2022-12-08 19:43:42 +00:00
#endif // FRAGMENTSORDERVIEW_H