31 #include <QAbstractTableModel>
32 #include <QSortFilterProxyModel>
The GateSelectEntry class comprises a single entry of the module selection table.
QVariant data(int icol) const
data returns data from requested column
The GateSelectHistory class singleton comprises a list of user selected modules.
static GateSelectHistory * instance()
The GateSelectModel class is the source model for module selection.
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
GateSelectModel(bool history, const QSet< u32 > &selectable=QSet< u32 >(), QObject *parent=nullptr)
GateSelectModel constructor.
u32 gateId(int irow) const
static bool isAccepted(u32 gateId, const QSet< u32 > &selectable)
int columnCount(const QModelIndex &parent=QModelIndex()) const override
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
int rowCount(const QModelIndex &parent=QModelIndex()) const override
The GateSelectPicker class instance gets spawned to pick module from graph.
GateSelectPicker(const QSet< u32 > &selectable, GateSelectReceiver *receiver)
void triggerCursor(int icurs)
void gatesPicked(QSet< u32 > gats)
void handleSelectionChanged(void *sender)
The GateSelectProxy class allows sorting and filtering of module tables.
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
void startSearch(QString text, int options)
GateSelectProxy(QObject *parent=nullptr)
void setSortMechanism(gui_utility::mSortMechanism sortMechanism)
void searchTextChanged(const QString &txt)
bool lessThan(const QModelIndex &sourceLeft, const QModelIndex &sourceRight) const override
virtual void handleGatesPicked(const QSet< u32 > &gats)=0
GateSelectReceiver(QObject *parent=nullptr)
virtual ~GateSelectReceiver()
The GateSelectView class is the table widget for module selection.
GateSelectView(bool history, const QSet< u32 > &selectable, QWidget *parent=nullptr)
GateSelectView constructor.
void gateSelected(u32 gatId, bool doubleClick)
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
QObject * parent() const const
QObject * sender() const const