![]() |
HAL
|
Manages all ContentWidgets. More...
#include <content_manager.h>
Public Slots | |
void | handleOpenDocument (const QString &fileName) |
Static Public Attributes | |
static SettingsItemKeybind * | sSettingSearch |
static SettingsItemKeybind * | sSettingDeleteItem |
Additional Inherited Members | |
![]() | |
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) |
![]() | |
typedef | QObjectList |
![]() | |
QObject * | sender () 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) |
![]() | |
objectName | |
Manages all ContentWidgets.
The ContentManager class manages the creation and deletion of hal's subwidgets such as the python editor or the selection details widget. There should only be one content manager at any time.
Definition at line 91 of file content_manager.h.
|
explicit |
The constructor of the class. The content manager's parent is the MainwWndow of hal. The MainWindow must be known to the content manager so it can place the subwidgets in it.
parent | - The content manager's parent. |
Definition at line 89 of file content_manager.cpp.
References QObject::connect(), hal::FileManager::fileOpened(), hal::FileManager::get_instance(), and handleOpenDocument().
hal::ContentManager::~ContentManager | ( | ) |
Definition at line 110 of file content_manager.cpp.
void hal::ContentManager::addExternalWidget | ( | ContentFactory * | factory | ) |
Definition at line 285 of file content_manager.cpp.
References hal::MainWindow::addContent(), hal::ContentFactory::contentFactory(), hal::ContentWidget::open(), hal::ContentWidget::restoreFromProject(), and hal::right.
Referenced by handleOpenDocument().
void hal::ContentManager::deleteContent | ( | ) |
Deletes all subwidgets created by the manager. Used when closing a file.
Definition at line 114 of file content_manager.cpp.
ContextManagerWidget * hal::ContentManager::getContextManagerWidget | ( | ) |
Get hal's context manager.
Definition at line 159 of file content_manager.cpp.
Referenced by hal::NetlistRelay::addToModuleDialog(), hal::ActionAddItemsToObject::exec(), hal::ActionFoldModule::exec(), hal::ActionUnfoldModule::exec(), hal::GraphGraphicsView::handleRemoveFromView(), hal::GraphTabWidget::handleTabChanged(), and hal::GraphContextManager::openModuleInView().
GraphTabWidget * hal::ContentManager::getGraphTabWidget | ( | ) |
Get hal's graph tab widget.
Definition at line 139 of file content_manager.cpp.
Referenced by hal::ModuleContextMenu::addGateSubmenu(), hal::ModuleContextMenu::addModuleSubmenu(), hal::ModuleContextMenu::addNetSubmenu(), hal::NetlistRelay::addToModuleDialog(), hal::GateSelectPicker::GateSelectPicker(), hal::AddToModuleReceiver::handleModulesPicked(), hal::SelectionDetailsWidget::handleSelectionUpdate(), hal::ModuleSelectPicker::ModuleSelectPicker(), hal::GateSelectPicker::terminatePicker(), hal::ModuleSelectPicker::terminatePicker(), and hal::GraphContext::writeToFile().
GroupingManagerWidget * hal::ContentManager::getGroupingManagerWidget | ( | ) |
Get hal's grouping manager.
Definition at line 149 of file content_manager.cpp.
Referenced by hal::ModuleContextMenu::addGateSubmenu(), hal::ModuleContextMenu::addModuleSubmenu(), hal::ModuleContextMenu::addMultipleElementsSubmenu(), hal::ModuleContextMenu::addNetSubmenu(), hal::GraphicsScene::connectAll(), hal::GraphicsScene::disconnectAll(), hal::ActionCreateObject::exec(), hal::ActionDeleteObject::exec(), hal::ActionRenameObject::exec(), hal::ActionSetObjectColor::exec(), hal::GraphicsItem::groupingColor(), hal::GroupingsOfItemModel::GroupingsOfItemModel(), hal::StandardGraphicsGate::paint(), hal::SelectionDetailsWidget::selectionToGroupingAction(), and hal::GroupingColorSerializer::serialize().
ModuleWidget * hal::ContentManager::getModuleWidget | ( | ) |
Get hal's module tree widget.
Definition at line 154 of file content_manager.cpp.
Referenced by hal::ModuleDialog::ModuleDialog().
PythonEditor * hal::ContentManager::getPythonEditorWidget | ( | ) |
Get hal's python editor.
Definition at line 134 of file content_manager.cpp.
Referenced by hal::PythonSerializer::serialize(), and hal::PythonSerializer::serialize_control().
SelectionDetailsWidget * hal::ContentManager::getSelectionDetailsWidget | ( | ) |
Get hal's selection details widget.
Definition at line 144 of file content_manager.cpp.
Referenced by hal::GraphLayouter::GraphLayouter().
|
slot |
This function is called when a file is opened (connected to a signal that is emitted by the file manager). It creates the necessary subwidgets and places them in the mainwindow.
fileName | - The name of the opened file. |
Definition at line 164 of file content_manager.cpp.
References hal::MainWindow::addContent(), addExternalWidget(), hal::bottom, hal::center, QObject::connect(), hal::GuiPluginManager::getGuiExtensions(), hal::GroupingManagerWidget::getProxyModel(), hal::gGraphContextManager, hal::gNetlist, hal::ContextManagerWidget::handleOpenContextClicked(), hal::ContentWidget::handleSearchKeysequenceChanged(), hal::ExternalContent::instance(), hal::SettingsItemDropdown::intChanged(), hal::SettingsItemKeybind::keySequenceChanged(), hal::left, hal::ContentWidget::open(), hal::ModuleWidget::proxyModel(), hal::GraphContextSerializer::restore(), hal::GraphContextManager::restoreFromFile(), hal::right, hal::GraphContextSerializer::selectedContext(), hal::SelectionDetailsWidget::selectionTreeView(), hal::ContextManagerWidget::selectViewContext(), setWindowTitle(), sSettingSearch, QVariant::toInt(), QVariant::toString(), hal::SettingsItemDropdown::value(), and hal::SettingsItemKeybind::value().
Referenced by ContentManager().
void hal::ContentManager::setWindowTitle | ( | const QString & | filename | ) |
Set main window title.
filename | name of netlist filename. |
Definition at line 305 of file content_manager.cpp.
References QString::fromStdString(), QWidget::setWindowTitle(), and QString::toStdString().
Referenced by handleOpenDocument(), hal::MainWindow::handleSaveAsTriggered(), and hal::MainWindow::handleSaveTriggered().
|
static |
Definition at line 171 of file content_manager.h.
Referenced by hal::ContextManagerWidget::ContextManagerWidget(), hal::GroupingManagerWidget::GroupingManagerWidget(), and hal::ModuleWidget::ModuleWidget().
|
static |
Definition at line 170 of file content_manager.h.
Referenced by hal::GateDialog::GateDialog(), hal::GroupingDialog::GroupingDialog(), handleOpenDocument(), and hal::ModuleDialog::ModuleDialog().