14 #include <QApplication>
16 #include <QHeaderView>
18 #include <QMouseEvent>
28 mIsGrouping = isGrouping;
73 if (!treeProxy)
return nullptr;
91 void SelectionTreeView::handleCustomContextMenuRequested(
const QPoint& point)
122 if (!treeProxy)
return;
124 if (!treeModel)
return;
140 else treeModel->
clear();
179 void SelectionTreeView::handleTreeViewItemFocusClicked(
const ModuleItem* sti)
181 u32 itemId = sti->
id();
GraphTabWidget * getGraphTabWidget()
Get hal's graph tab widget.
std::vector< u32 > get_gate_ids(const std::function< bool(Gate *)> &filter=nullptr) const
std::vector< u32 > get_module_ids(const std::function< bool(Module *)> &filter=nullptr) const
std::vector< u32 > get_net_ids(const std::function< bool(Net *)> &filter=nullptr) const
static void addPluginSubmenus(QMenu *contextMenu, Netlist *netlist, const std::vector< u32 > &modules, const std::vector< u32 > &gates, const std::vector< u32 > &nets)
void moduleColorChanged(u32 id) const
An item in the ModuleModel.
TreeItemType getType() const
A model for displaying multiple netlist elements.
void populateTree(const QVector< u32 > &modIds={}, const QVector< u32 > &gatIds={}, const QVector< u32 > &netIds={})
Grouping * get_grouping_by_id(u32 grouping_id) const
ModuleColorManager * getModuleColorManager() const
QList< u32 > selectedModulesList() const
QList< u32 > selectedNetsList() const
QList< u32 > selectedGatesList() const
Enables filtering of the SelectionTreeModel.
bool isGraphicsBusy() const
virtual void mouseDoubleClickEvent(QMouseEvent *event) override
void handleModuleColorChanged(u32 id)
void handleFilterTextChanged(const QString& filter_text);
void populate(bool mVisible, u32 groupingId=0)
void itemDoubleClicked(const ModuleItem *sti)
virtual void currentChanged(const QModelIndex ¤t, const QModelIndex &previous) override
SelectionTreeView(QWidget *parent=nullptr, bool isGrouping=false)
void setDefaultColumnWidth()
SelectionTreeProxyModel * proxyModel()
ModuleItem * itemFromIndex(const QModelIndex &index=QModelIndex()) const
void triggerSelection(const ModuleItem *sti)
ContentManager * gContentManager
SelectionRelay * gSelectionRelay
NetlistRelay * gNetlistRelay
void setDragDropMode(QAbstractItemView::DragDropMode behavior)
void setDragEnabled(bool enable)
virtual bool event(QEvent *event) override
QAbstractItemModel * model() const const
QModelIndex rootIndex() const const
void setSelectionMode(QAbstractItemView::SelectionMode mode)
QItemSelectionModel * selectionModel() const const
virtual void setCurrentIndex(const QModelIndex &index, QItemSelectionModel::SelectionFlags command)
void * internalPointer() const const
bool isValid() const const
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const const override
virtual QModelIndex indexAt(const QPoint &point) const const override
void setColumnWidth(int column, int width)
QVector< T > fromList(const QList< T > &list)
QVector< T > fromStdVector(const std::vector< T > &vector)