31 #include <QAbstractTableModel>
35 #include <QSortFilterProxyModel>
187 static const int sMaxEntries;
The ModuleSelectEntry class comprises a single entry of the module selection table.
QVariant data(int icol) const
data returns data from requested column
ModuleSelectEntry(Module *m)
The ModuleSelectExclude class is used to determine which modules can't be selected.
QSet< u32 > modules() const
QString selectionToString() const
selectionToString function is used to generate selection as text for message box
bool isAccepted(u32 modId) const
void append(QSet< u32 > mod_ids)
QSet< u32 > gates() const
The ModuleSelectHistory class singleton comprises a list of user selected modules.
static ModuleSelectHistory * instance()
The ModuleSelectModel class is the source model for module selection.
QColor moduleColor(int irow) const
void excludeModulesById(QSet< u32 > id_set)
void appendEntries(bool history)
int rowCount(const QModelIndex &parent=QModelIndex()) const override
ModuleSelectModel(QObject *parent=nullptr)
ModuleSelectModel constructor.
u32 moduleId(int irow) const
int columnCount(const QModelIndex &parent=QModelIndex()) const override
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
The ModuleSelectPicker class instance gets spawned to pick module from graph.
void handleSelectionChanged(void *sender)
ModuleSelectPicker(ModuleSelectReceiver *receiver, QObject *parent=nullptr)
void modulesPicked(QSet< u32 > mods)
void triggerCursor(int icurs)
The ModuleSelectProxy class allows sorting and filtering of module tables.
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override
void startSearch(QString text, int options) override
static bool lessThan(const QColor &a, const QColor &b)
ModuleSelectProxy(QObject *parent=nullptr)
void setSortMechanism(gui_utility::mSortMechanism sortMechanism)
ModuleSelectReceiver(QObject *parent=nullptr)
virtual void handleModulesPicked(const QSet< u32 > &mods)=0
virtual ~ModuleSelectReceiver()
The ModuleSelectView class is the table widget for module selection.
void moduleSelected(u32 modId, bool doubleClick)
ModuleSelectView(bool history, Searchbar *sbar, QSet< u32 > *exclude_ids, QWidget *parent=nullptr)
ModuleSelectView constructor.
A QFrame with a QLineEdit that can be used to input a substring to search for.
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
QObject * parent() const const
QObject * sender() const const
bool contains(const T &value) const const
QSet< T > fromList(const QList< T > &list)