6 #include <QDialogButtonBox>
22 mButSel =
new QPushButton(
"Current GUI selection",
this);
25 mButNone =
new QPushButton(
"Clear selection",
this);
53 void GateSelectionDialog::handleSelectAll()
58 void GateSelectionDialog::handleCurrentGuiSelection()
68 for (
int irow = 0; irow<nrows; irow++)
77 void GateSelectionDialog::handleClearSelection()
84 std::vector<Gate*> retval;
96 for (
u32 gid: selGates)
99 if (g) retval.push_back(g);
The GateSelectModel class is the source model for module selection.
The GateSelectProxy class allows sorting and filtering of module tables.
std::vector< Gate * > selectedGates() const
GateSelectionDialog(QWidget *parent=nullptr)
Gate * get_gate_by_id(const u32 gate_id) const
const QSet< u32 > & selectedGates() const
SelectionRelay * gSelectionRelay
virtual QVariant data(const QModelIndex &index, int role) const const=0
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const=0
virtual int rowCount(const QModelIndex &parent) const const=0
QAbstractItemModel * model() const const
void setSelectionBehavior(QAbstractItemView::SelectionBehavior behavior)
void setSelectionMode(QAbstractItemView::SelectionMode mode)
QItemSelectionModel * selectionModel() const const
bool hasSelection() const const
QModelIndexList selectedRows(int column) const const
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
bool contains(const T &value) const const
QSet::iterator insert(const T &value)
virtual void setSourceModel(QAbstractItemModel *sourceModel) override
void sortByColumn(int column)
void resizeColumnsToContents()
virtual void setModel(QAbstractItemModel *model) override
void setSortingEnabled(bool enable)
uint toUInt(bool *ok) const const