mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-07-19 05:24:59 -04:00
feat: Add basic task flow run and edit (#212)
This commit is contained in:
25
TaskFlow/Editor/TaskPortModel.hpp
Normal file
25
TaskFlow/Editor/TaskPortModel.hpp
Normal file
@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include <QAbstractListModel>
|
||||
|
||||
#include <BaseTask.hpp>
|
||||
|
||||
namespace QodeAssist::TaskFlow {
|
||||
|
||||
class TaskPortModel : public QAbstractListModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum TaskPortRoles { TaskPortNameRole = Qt::UserRole, TaskPortDataRole };
|
||||
|
||||
TaskPortModel(const QList<TaskPort *> &ports, QObject *parent = nullptr);
|
||||
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
QHash<int, QByteArray> roleNames() const override;
|
||||
|
||||
private:
|
||||
QList<TaskPort *> m_ports;
|
||||
};
|
||||
|
||||
} // namespace QodeAssist::TaskFlow
|
Reference in New Issue
Block a user