HAL
hal::GraphContextManager Class Reference

User interface to manage all GraphContexts. More...

#include <graph_context_manager.h>

Inheritance diagram for hal::GraphContextManager:
Inheritance graph
Collaboration diagram for hal::GraphContextManager:
Collaboration graph

Signals

void contextCreated (GraphContext *context)
 
void contextRenamed (GraphContext *context)
 
void deletingContext (GraphContext *context)
 
void directoryRenamed (ContextDirectory *directory)
 
void deletingDirectory (ContextDirectory *directory)
 

Public Member Functions

 GraphContextManager ()
 
GraphContextcreateNewContext (const QString &name, u32 parentId=0)
 
ContextDirectorycreateNewDirectory (const QString &name, u32 parentId=0)
 
void openModuleInView (u32 moduleId, bool unfold)
 
void openGateInView (u32 gateId)
 
void openNetEndpointsInView (u32 netId)
 
void renameGraphContextAction (GraphContext *ctx, const QString &newName)
 
void renameContextDirectoryAction (ContextDirectory *ctxDir, const QString &newName)
 
void deleteGraphContext (GraphContext *ctx)
 
void deleteContextDirectory (ContextDirectory *ctxDir)
 
QVector< GraphContext * > getContexts () const
 
GraphContextgetCleanContext (const QString &name) const
 
GraphContextgetContextById (u32 id) const
 
u32 getParentId (u32 childId, bool isDirectory) const
 
bool moveItem (u32 itemId, bool isDirectory, u32 parentId, int row=-1)
 
ContextDirectorygetDirectoryById (u32 id) const
 
GraphContextgetContextByExclusiveModuleId (u32 module_id) const
 
bool contextWithNameExists (const QString &name) const
 
QString nextViewName (const QString &prefix) const
 
void handleModuleCreated (Module *m) const
 
void handleModuleRemoved (Module *m)
 
void handleModuleNameChanged (Module *m) const
 
void handleModuleTypeChanged (Module *m) const
 
void handleModuleColorChanged (Module *m) const
 
void handleModuleSubmoduleAdded (Module *m, const u32 added_module) const
 
void handleModuleSubmoduleRemoved (Module *m, const u32 removed_module)
 
void handleModuleGateAssigned (Module *m, const u32 inserted_gate) const
 
void handleModuleGateRemoved (Module *m, const u32 removed_gate)
 
void handleModulePortsChanged (Module *m, PinEvent pev, u32 pgid)
 
void handleGateRemoved (Gate *g) const
 
void handleGateNameChanged (Gate *g) const
 
void handleNetCreated (Net *n) const
 
void handleNetRemoved (Net *n) const
 
void handleNetNameChanged (Net *n) const
 
void handleNetSourceAdded (Net *n, const u32 src_gate_id) const
 
void handleNetSourceRemoved (Net *n, const u32 src_gate_id) const
 
void handleNetDestinationAdded (Net *n, const u32 dst_gate_id) const
 
void handleNetDestinationRemoved (Net *n, const u32 dst_gate_id) const
 
void handleMarkedGlobalInput (u32 mNetId)
 
void handleMarkedGlobalOutput (u32 mNetId)
 
void handleUnmarkedGlobalInput (u32 mNetId)
 
void handleUnmarkedGlobalOutput (u32 mNetId)
 
void setContextId (GraphContext *ctx, u32 ctxId)
 
GraphLayoutergetDefaultLayouter (GraphContext *const context) const
 
GraphShadergetDefaultShader (GraphContext *const context) const
 
ContextTreeModelgetContextTreeModel () const
 
void clear ()
 
bool handleSaveTriggered (const QString &filename)
 
GraphContextrestoreFromFile (const QString &filename)
 
QString nextDefaultName () const
 
- Public Member Functions inherited from QObject
virtual const QMetaObjectmetaObject () const const
 
 QObject (QObject *parent)
 
virtual ~QObject ()
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
QString objectName () const const
 
void setObjectName (const QString &name)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
bool signalsBlocked () const const
 
bool blockSignals (bool block)
 
QThreadthread () const const
 
void moveToThread (QThread *targetThread)
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
void killTimer (int id)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
const QObjectListchildren () const const
 
void setParent (QObject *parent)
 
void installEventFilter (QObject *filterObj)
 
void removeEventFilter (QObject *obj)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectTree ()
 
void dumpObjectInfo ()
 
void dumpObjectTree () const const
 
void dumpObjectInfo () const const
 
bool setProperty (const char *name, const QVariant &value)
 
QVariant property (const char *name) const const
 
QList< QByteArraydynamicPropertyNames () const const
 
void destroyed (QObject *obj)
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
bool inherits (const char *className) const const
 
void deleteLater ()
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
qobject_cast (QObject *object)
 
qobject_cast (const QObject *object)
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
 Q_CLASSINFO (Name, Value)
 
 Q_INTERFACES (...)
 
 Q_PROPERTY (...)
 
 Q_ENUMS (...)
 
 Q_FLAGS (...)
 
 Q_ENUM (...)
 
 Q_FLAG (...)
 
 Q_ENUM_NS (...)
 
 Q_FLAG_NS (...)
 
 Q_OBJECT Q_OBJECT
 
 Q_GADGET Q_GADGET
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SLOTS Q_SLOTS
 
 Q_SLOT Q_SLOT
 
 Q_EMIT Q_EMIT
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 

Static Public Attributes

static SettingsItemCheckboxsSettingNetGroupingToPins
 
static SettingsItemCheckboxsSettingPanOnMiddleButton
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
- Public Attributes inherited from QObject
typedef QObjectList
 
- Protected Member Functions inherited from QObject
QObjectsender () const const
 
int senderSignalIndex () const const
 
int receivers (const char *signal) const const
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
virtual void timerEvent (QTimerEvent *event)
 
virtual void childEvent (QChildEvent *event)
 
virtual void customEvent (QEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
- Properties inherited from QObject
 objectName
 

Detailed Description

User interface to manage all GraphContexts.

The GraphContextManager is a manager class that contains and manages all GraphContexts.
It can be used to create, delete or rename GraphContexts.
Moreover it is responsible for applying changes of the Netlist to the contexts. Therefore it inspects which contexts are affected by the corresponding changes to only adjust the relevant contexts.

Definition at line 59 of file graph_context_manager.h.

Constructor & Destructor Documentation

◆ GraphContextManager()

hal::GraphContextManager::GraphContextManager ( )

Constructor.

Definition at line 45 of file graph_context_manager.cpp.

Member Function Documentation

◆ clear()

void hal::GraphContextManager::clear ( )

Deletes all contexts.

Definition at line 700 of file graph_context_manager.cpp.

References hal::ContextTreeModel::clear(), and hal::ContextTreeModel::list().

◆ contextCreated

void hal::GraphContextManager::contextCreated ( GraphContext context)
signal

Q_SIGNAL that notifies about the creation of a new context by the context manager.

Parameters
context- The created context

Referenced by createNewContext(), hal::GraphTabWidget::GraphTabWidget(), and restoreFromFile().

◆ contextRenamed

void hal::GraphContextManager::contextRenamed ( GraphContext context)
signal

Q_SIGNAL that notifies about the renaming of a context by the context manager.

Parameters
context- The renamed context

Referenced by hal::GraphTabWidget::GraphTabWidget(), and renameGraphContextAction().

◆ contextWithNameExists()

bool hal::GraphContextManager::contextWithNameExists ( const QString name) const

Checks if a context with the given name exists.

Parameters
name- The context name
Returns
true if a context with the name exists

Definition at line 299 of file graph_context_manager.cpp.

References hal::ContextTreeModel::list(), and name.

Referenced by hal::GuiApiClasses::View::getId(), hal::GuiApiClasses::View::isolateInNew(), nextViewName(), and hal::GuiApiClasses::View::setName().

◆ createNewContext()

GraphContext * hal::GraphContextManager::createNewContext ( const QString name,
u32  parentId = 0 
)

Creates a new context with the given name. The context is initialized with the default GraphLayouter and GraphShader.
Emits the signal contextCreated.

Parameters
name- The name of the new context. Names don't have to be unique.
Returns
the created GraphContext

Definition at line 111 of file graph_context_manager.cpp.

References hal::ContextTreeModel::addContext(), hal::SettingsItemCheckbox::boolChanged(), QObject::connect(), contextCreated(), getDefaultLayouter(), getDefaultShader(), hal::ContextTreeModel::getDirectory(), name, QObject::Q_EMIT(), hal::GraphContext::scene(), hal::GraphContext::setLayouter(), hal::GraphContext::setShader(), QVariant::toBool(), and hal::SettingsItemCheckbox::value().

Referenced by hal::ActionCreateObject::exec().

◆ createNewDirectory()

ContextDirectory * hal::GraphContextManager::createNewDirectory ( const QString name,
u32  parentId = 0 
)

◆ deleteContextDirectory()

void hal::GraphContextManager::deleteContextDirectory ( ContextDirectory ctxDir)

Removes and deletes the given ContextDiretory. The passed pointer will be a nullptr afterwards.

Parameters
ctxDir- The ContextDirectory to delete.

Definition at line 232 of file graph_context_manager.cpp.

References deletingDirectory(), QObject::Q_EMIT(), and hal::ContextTreeModel::removeDirectory().

Referenced by hal::ActionDeleteObject::exec().

◆ deleteGraphContext()

void hal::GraphContextManager::deleteGraphContext ( GraphContext ctx)

Removes and deletes the given GraphContext. The passed pointer will be a nullptr afterwards.
Emits deletingContext before the deletion.

Parameters
ctx- The graph context to delete.

Definition at line 223 of file graph_context_manager.cpp.

References deletingContext(), QObject::Q_EMIT(), and hal::ContextTreeModel::removeContext().

Referenced by hal::ActionDeleteObject::exec(), handleModuleGateRemoved(), handleModuleRemoved(), handleModuleSubmoduleRemoved(), and restoreFromFile().

◆ deletingContext

void hal::GraphContextManager::deletingContext ( GraphContext context)
signal

Q_SIGNAL that notifies that a context is about to be deleted.
This signal is emitted before the context is removed from the manager and deleted.

Parameters
context- The context that is about to be deleted

Referenced by deleteGraphContext(), and hal::GraphTabWidget::GraphTabWidget().

◆ deletingDirectory

void hal::GraphContextManager::deletingDirectory ( ContextDirectory directory)
signal

Q_SIGNAL that notifies that a directory is about to be deleted. This signal is emitted before the directory is deleted.

Parameters
directory- The directory that is about to be deleted

Referenced by deleteContextDirectory().

◆ directoryRenamed

void hal::GraphContextManager::directoryRenamed ( ContextDirectory directory)
signal

Q_SIGNAL that notifies about the renaming of a directory by the context manager.

Parameters
directory- The renamed directory

Referenced by renameContextDirectoryAction().

◆ getCleanContext()

GraphContext * hal::GraphContextManager::getCleanContext ( const QString name) const

Definition at line 268 of file graph_context_manager.cpp.

References hal::ContextTreeModel::list(), and name.

◆ getContextByExclusiveModuleId()

GraphContext * hal::GraphContextManager::getContextByExclusiveModuleId ( u32  module_id) const

Gets the context which is exclusively showing the module with the id module_id.

Returns
a context exclusively showing the module with id module_id or nullptr.s.

Definition at line 278 of file graph_context_manager.cpp.

References hal::ContextTreeModel::list().

Referenced by hal::NetlistRelay::deleteModule(), and openModuleInView().

◆ getContextById()

◆ getContexts()

QVector< GraphContext * > hal::GraphContextManager::getContexts ( ) const

◆ getContextTreeModel()

◆ getDefaultLayouter()

GraphLayouter * hal::GraphContextManager::getDefaultLayouter ( GraphContext *const  context) const

Creates an instance of the StandardGraphLayouter used for a certain GraphContext.

Note: The calling party must assure that the layouter is delegated to the context using GraphContext::setLayouter

Parameters
context- The context the layouter works on
Returns
a pointer to the new GraphLayouter

Definition at line 676 of file graph_context_manager.cpp.

References hal::SettingsItemCheckbox::boolChanged(), QObject::connect(), hal::GraphLayouter::setDumpJunctionEnabled(), hal::StandardGraphLayouter::setLayoutBoxesEnabled(), hal::StandardGraphLayouter::setParseLayoutEnabled(), QVariant::toBool(), and hal::SettingsItemCheckbox::value().

Referenced by createNewContext(), and restoreFromFile().

◆ getDefaultShader()

GraphShader * hal::GraphContextManager::getDefaultShader ( GraphContext *const  context) const

Creates an instance of ModuleShader used for a certain GraphContext.

Note: The calling party must assure that the shader is delegated to the context using GraphContext::setShader

Parameters
context- The context the shader works on
Returns
a pointer to the new GraphShader

Definition at line 690 of file graph_context_manager.cpp.

Referenced by createNewContext(), and restoreFromFile().

◆ getDirectoryById()

ContextDirectory * hal::GraphContextManager::getDirectoryById ( u32  id) const

◆ getParentId()

◆ handleGateNameChanged()

void hal::GraphContextManager::handleGateNameChanged ( Gate g) const

Handler to be called after a gate has been renamed.
Used to apply the changes in the affected contexts.

Parameters
g- The renamed gate

Definition at line 547 of file graph_context_manager.cpp.

References test_plugin::g, and hal::ContextTreeModel::list().

◆ handleGateRemoved()

void hal::GraphContextManager::handleGateRemoved ( Gate g) const

Handler to be called after a gate has been removed.
Used to apply the changes in the affected contexts.

Parameters
g- The removed gate

Definition at line 540 of file graph_context_manager.cpp.

References test_plugin::g, and hal::ContextTreeModel::list().

◆ handleMarkedGlobalInput()

void hal::GraphContextManager::handleMarkedGlobalInput ( u32  mNetId)

Handler to be called after a net has been marked as a global input net.
Used to apply the changes in the affected contexts.

Parameters
mNetId- The id of the net that has been marked as a global input

Definition at line 632 of file graph_context_manager.cpp.

References hal::ContextTreeModel::list().

◆ handleMarkedGlobalOutput()

void hal::GraphContextManager::handleMarkedGlobalOutput ( u32  mNetId)

Handler to be called after a net has been marked as a global output net.
Used to apply the changes in the affected contexts.

Parameters
mNetId- The id of the net that has been marked as a global output

Definition at line 644 of file graph_context_manager.cpp.

References hal::ContextTreeModel::list().

◆ handleModuleColorChanged()

void hal::GraphContextManager::handleModuleColorChanged ( Module m) const

Handler to be called after a module's color has been changed. Used to apply the changes in the affected contexts.

Parameters
m- The module which color has been changed

Definition at line 354 of file graph_context_manager.cpp.

References test_plugin::g, hal::Module::get_gates(), hal::Module::get_id(), QSet::insert(), and hal::ContextTreeModel::list().

Referenced by hal::ActionSetObjectColor::exec().

◆ handleModuleCreated()

void hal::GraphContextManager::handleModuleCreated ( Module m) const

Handler to be called after a module has been created. Used to apply the changes in the affected contexts.

Parameters
m- The module that has been created

Definition at line 311 of file graph_context_manager.cpp.

References hal::Module::get_id(), and hal::ContextTreeModel::list().

◆ handleModuleGateAssigned()

void hal::GraphContextManager::handleModuleGateAssigned ( Module m,
const u32  inserted_gate 
) const

Handler to be called after a gate was newly assigned to a module.
Used to apply the changes in the affected contexts.

Parameters
m- The module with the new gate
inserted_gate- The id of the newly assigned gate

Definition at line 430 of file graph_context_manager.cpp.

References QList::append(), QSet::contains(), hal::Module::get_id(), hal::Module::get_parent_module(), hal::ContextTreeModel::list(), and QSet::remove().

◆ handleModuleGateRemoved()

void hal::GraphContextManager::handleModuleGateRemoved ( Module m,
const u32  removed_gate 
)

Handler to be called after a gate was removed from a module.
Used to apply the changes in the affected contexts.

Parameters
m- The module with the removed gate
removed_gate- The id of the removed gate

new code line above should cover commented lines below else if (context->gates().contains(removed_gate)) context->scheduleSceneUpdate();

Definition at line 465 of file graph_context_manager.cpp.

References deleteGraphContext(), hal::Node::Gate, hal::Module::get_gates(), hal::Module::get_id(), hal::Module::get_submodules(), and hal::ContextTreeModel::list().

◆ handleModuleNameChanged()

void hal::GraphContextManager::handleModuleNameChanged ( Module m) const

Handler to be called after a module's name has been changed. Used to apply the changes in the affected contexts.

Parameters
m- The module that has been changed

Definition at line 340 of file graph_context_manager.cpp.

References hal::Module::get_id(), and hal::ContextTreeModel::list().

◆ handleModulePortsChanged()

void hal::GraphContextManager::handleModulePortsChanged ( Module m,
PinEvent  pev,
u32  pgid 
)

Handler to be called after a port of a module has been changed.
Used to apply the changes in the affected contexts.

Parameters
m- The module with the changed port

Definition at line 528 of file graph_context_manager.cpp.

References hal::Module::get_id(), and hal::ContextTreeModel::list().

◆ handleModuleRemoved()

void hal::GraphContextManager::handleModuleRemoved ( Module m)

Handler to be called after a module has been removed. Used to apply the changes in the affected contexts.
The module is already removed from the netlist at this point. However the module isn't deleted yet (not nullptr).

Parameters
m- The module that has been removed

Definition at line 321 of file graph_context_manager.cpp.

References deleteGraphContext(), hal::Module::get_id(), and hal::ContextTreeModel::list().

◆ handleModuleSubmoduleAdded()

void hal::GraphContextManager::handleModuleSubmoduleAdded ( Module m,
const u32  added_module 
) const

Handler to be called after a submodule was added to a module.
Used to apply the changes in the affected contexts.

Parameters
m- The module with the new submodule
added_module- The id of the added submodule

Definition at line 368 of file graph_context_manager.cpp.

References QList::append(), QSet::contains(), hal::Module::get_id(), hal::Module::get_parent_module(), hal::ContextTreeModel::list(), and QSet::remove().

◆ handleModuleSubmoduleRemoved()

void hal::GraphContextManager::handleModuleSubmoduleRemoved ( Module m,
const u32  removed_module 
)

Handler to be called after a submodule was removed from a module.
Used to apply the changes in the affected contexts.

Parameters
m- The module with the removed submodule
removed_module- The id of the removed submodule

Definition at line 410 of file graph_context_manager.cpp.

References deleteGraphContext(), hal::Module::get_id(), hal::ContextTreeModel::list(), and hal::Node::Module.

◆ handleModuleTypeChanged()

void hal::GraphContextManager::handleModuleTypeChanged ( Module m) const

Handler to be called after a module's type has been changed. Used to apply the changes in the affected contexts.

Parameters
m- The module that has been changed

Definition at line 347 of file graph_context_manager.cpp.

References hal::Module::get_id(), and hal::ContextTreeModel::list().

◆ handleNetCreated()

void hal::GraphContextManager::handleNetCreated ( Net n) const

Handler to be called after a new net has been created.
Currently no logic is done here.

Parameters
n- The new net

Definition at line 554 of file graph_context_manager.cpp.

References test::n.

◆ handleNetDestinationAdded()

void hal::GraphContextManager::handleNetDestinationAdded ( Net n,
const u32  dst_gate_id 
) const

Handler to be called after a destination has been added to a net.
Used to apply the changes in the affected contexts.

Parameters
n- The net with the new destination
dst_gate_id- The id of the gate that contains the destination pin

Definition at line 604 of file graph_context_manager.cpp.

References hal::ContextTreeModel::list(), and test::n.

◆ handleNetDestinationRemoved()

void hal::GraphContextManager::handleNetDestinationRemoved ( Net n,
const u32  dst_gate_id 
) const

Handler to be called after a destination has been removed from a net.
Used to apply the changes in the affected contexts.

Parameters
n- The net with the removed destination
dst_gate_id- The id of the gate that contains the destination pin

Definition at line 617 of file graph_context_manager.cpp.

References hal::ContextTreeModel::list(), test::n, and UNUSED.

◆ handleNetNameChanged()

void hal::GraphContextManager::handleNetNameChanged ( Net n) const

Handler to be called after a net has been renamed.
Used to apply the changes in the affected contexts.

Parameters
n- The renamed net

Definition at line 569 of file graph_context_manager.cpp.

References hal::ContextTreeModel::list(), and test::n.

◆ handleNetRemoved()

void hal::GraphContextManager::handleNetRemoved ( Net n) const

Handler to be called after a net has been removed.
Used to apply the changes in the affected contexts.

Parameters
n- The removed net

Definition at line 562 of file graph_context_manager.cpp.

References hal::ContextTreeModel::list(), and test::n.

◆ handleNetSourceAdded()

void hal::GraphContextManager::handleNetSourceAdded ( Net n,
const u32  src_gate_id 
) const

Handler to be called after a source has been added to a net.
Used to apply the changes in the affected contexts.

Parameters
n- The net with the new source
src_gate_id- The id of the gate that contains the source pin

Definition at line 576 of file graph_context_manager.cpp.

References hal::ContextTreeModel::list(), and test::n.

◆ handleNetSourceRemoved()

void hal::GraphContextManager::handleNetSourceRemoved ( Net n,
const u32  src_gate_id 
) const

Handler to be called after a source has been removed from a net.
Used to apply the changes in the affected contexts.

Parameters
n- The net with the removed source
src_gate_id- The id of the gate that contains the source pin

Definition at line 589 of file graph_context_manager.cpp.

References hal::ContextTreeModel::list(), test::n, and UNUSED.

◆ handleSaveTriggered()

◆ handleUnmarkedGlobalInput()

void hal::GraphContextManager::handleUnmarkedGlobalInput ( u32  mNetId)

Handler to be called after a net is no longer a global input net.
Used to apply the changes in the affected contexts.

Parameters
mNetId- The id of the net that is no longer a global input

Definition at line 656 of file graph_context_manager.cpp.

References hal::ContextTreeModel::list().

◆ handleUnmarkedGlobalOutput()

void hal::GraphContextManager::handleUnmarkedGlobalOutput ( u32  mNetId)

Handler to be called after a net is no longer a global output net.
Used to apply the changes in the affected contexts.

Parameters
mNetId- The id of the net that is no longer a global output

Definition at line 666 of file graph_context_manager.cpp.

References hal::ContextTreeModel::list().

◆ moveItem()

bool hal::GraphContextManager::moveItem ( u32  itemId,
bool  isDirectory,
u32  parentId,
int  row = -1 
)

◆ nextDefaultName()

QString hal::GraphContextManager::nextDefaultName ( ) const
inline

Definition at line 412 of file graph_context_manager.h.

References QString::arg().

Referenced by hal::ActionCreateObject::exec().

◆ nextViewName()

QString hal::GraphContextManager::nextViewName ( const QString prefix) const

Generate next view name with given prefix

Parameters
prefix
Returns
the view name which does not exist so far

Definition at line 288 of file graph_context_manager.cpp.

References QString::arg(), contextWithNameExists(), and name.

Referenced by hal::GuiApiClasses::View::isolateInNew(), openGateInView(), and openNetEndpointsInView().

◆ openGateInView()

void hal::GraphContextManager::openGateInView ( u32  gateId)

◆ openModuleInView()

◆ openNetEndpointsInView()

◆ renameContextDirectoryAction()

void hal::GraphContextManager::renameContextDirectoryAction ( ContextDirectory ctxDir,
const QString newName 
)

Renames a contextDirectory.
Emits the signal directoryRenamed.

Parameters
ctxDir- The contextDirectory to rename. Must not be a nullptr.
newName- The new name of the directory

Definition at line 216 of file graph_context_manager.cpp.

References directoryRenamed(), QObject::Q_EMIT(), and hal::ContextDirectory::setName().

Referenced by hal::ActionRenameObject::exec().

◆ renameGraphContextAction()

void hal::GraphContextManager::renameGraphContextAction ( GraphContext ctx,
const QString newName 
)

Renames a GraphContext.
Emits the signal contextRenamed.

Parameters
ctx- The graph context to rename. Must not be a nullptr.
newName- The new name of the context

Definition at line 209 of file graph_context_manager.cpp.

References contextRenamed(), and QObject::Q_EMIT().

Referenced by hal::ActionRenameObject::exec(), and restoreFromFile().

◆ restoreFromFile()

◆ setContextId()

void hal::GraphContextManager::setContextId ( GraphContext ctx,
u32  ctxId 
)

Assigns new ID to context if this id is not in use

Parameters
ctxthe context
ctxIduser provided ID

Definition at line 127 of file graph_context_manager.cpp.

References getContextById(), and hal::GraphContext::id().

Referenced by hal::ActionCreateObject::exec().

Member Data Documentation

◆ sSettingNetGroupingToPins

SettingsItemCheckbox * hal::GraphContextManager::sSettingNetGroupingToPins
static
Initial value:
= new SettingsItemCheckbox("Net Grouping Color to Gate Pins",
"graph_view/net_grp_pin",
true,
"Appearance:Graph View",
"If set net grouping colors are also applied to input and output pins of gates")

Definition at line 417 of file graph_context_manager.h.

Referenced by hal::GraphicsScene::GraphicsScene(), and hal::StandardGraphicsGate::paint().

◆ sSettingPanOnMiddleButton

SettingsItemCheckbox * hal::GraphContextManager::sSettingPanOnMiddleButton
static
Initial value:
= new SettingsItemCheckbox("Pan with Middle Mouse Button",
"graph_view/pan_middle_button",
false,
"Graph View",
"If enabled middle mouse button will pan the graphics.\n"
"If disabled middle mouse button can be used for rubber band selection.")

Definition at line 419 of file graph_context_manager.h.

Referenced by hal::GraphGraphicsView::mouseMoveEvent(), and hal::GraphGraphicsView::mousePressEvent().


The documentation for this class was generated from the following files: