18#ifndef FREETERMINALMODEL_H
19#define FREETERMINALMODEL_H
21#include <QAbstractTableModel>
23#include <QStyledItemDelegate>
26#include "../../qetproject.h"
51 int rowCount(
const QModelIndex &parent)
const override;
52 int columnCount(
const QModelIndex &parent)
const override;
53 QVariant
data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const override;
54 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole)
override;
55 QVariant
headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const override;
56 Qt::ItemFlags
flags(
const QModelIndex &index)
const override;
61 QVector<QSharedPointer<RealTerminal>>
realTerminalForIndex(
const QModelIndexList &index_list)
const;
80 QWidget *
createEditor(QWidget *parent,
const QStyleOptionViewItem &option,
const QModelIndex &index)
const override;
81 void setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index)
const override;
Definition freeterminalmodel.h:74
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
Definition freeterminalmodel.cpp:358
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Definition freeterminalmodel.cpp:332
The FreeTerminalModel class.
Definition freeterminalmodel.h:34
void fillTerminalVector()
FreeTerminalModel::fillTerminalVector.
Definition freeterminalmodel.cpp:306
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
FreeTerminalModel::headerData.
Definition freeterminalmodel.cpp:200
QVector< modelRealTerminalData > m_real_t_data
Definition freeterminalmodel.h:69
QVector< modelRealTerminalData > modifiedModelRealTerminalData() const
FreeTerminalModel::modifiedModelRealTerminalData.
Definition freeterminalmodel.cpp:252
modelRealTerminalData dataAtRow(int row) const
FreeTerminalModel::dataAtRow.
Definition freeterminalmodel.cpp:270
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
FreeTerminalModel::data.
Definition freeterminalmodel.cpp:92
QHash< QSharedPointer< RealTerminal >, QVector< bool > > m_modified_cell
Definition freeterminalmodel.h:70
static FreeTerminalModel::Column columnTypeForIndex(const QModelIndex &index)
Definition freeterminalmodel.cpp:37
QVector< QSharedPointer< RealTerminal > > realTerminalForIndex(const QModelIndexList &index_list) const
FreeTerminalModel::realTerminalForIndex.
Definition freeterminalmodel.cpp:284
Column
Definition freeterminalmodel.h:36
@ Type
Definition freeterminalmodel.h:39
@ Led
Definition freeterminalmodel.h:41
@ Invalid
Definition freeterminalmodel.h:42
@ Label
Definition freeterminalmodel.h:37
@ Function
Definition freeterminalmodel.h:40
@ XRef
Definition freeterminalmodel.h:38
QPointer< QETProject > m_project
Definition freeterminalmodel.h:67
Qt::ItemFlags flags(const QModelIndex &index) const override
Definition freeterminalmodel.cpp:220
int columnCount(const QModelIndex &parent) const override
FreeTerminalModel::columnCount.
Definition freeterminalmodel.cpp:80
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
Definition freeterminalmodel.cpp:135
QVector< QSharedPointer< RealTerminal > > m_terminal_vector
Definition freeterminalmodel.h:68
void clear()
FreeTerminalModel::clear Clear the model and set it as the current state of the project.
Definition freeterminalmodel.cpp:238
int rowCount(const QModelIndex &parent) const override
FreeTerminalModel::rowCount.
Definition freeterminalmodel.cpp:69
Definition qetproject.h:62
The RealTerminal class Represent a real terminal. A real terminal can be a drawn terminal in a folio ...
Definition realterminal.h:43
Definition modelTerminalData.h:26