|
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 | |
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 | |
| 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) |
Properties inherited from QObject | |
| 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 100 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 108 of file content_manager.cpp.
References QObject::connect(), hal::FileManager::fileOpened(), hal::FileManager::get_instance(), and handleOpenDocument().
| hal::ContentManager::~ContentManager | ( | ) |
Definition at line 128 of file content_manager.cpp.
| void hal::ContentManager::addExternalWidget | ( | ContentFactory * | factory | ) |
Definition at line 299 of file content_manager.cpp.
References hal::MainWindow::addContent(), hal::ContentFactory::contentFactory(), hal::ContentWidget::open(), hal::ContentWidget::restoreFromProject(), and hal::ContentLayout::Right.
| void hal::ContentManager::deleteContent | ( | ) |
Deletes all subwidgets created by the manager. Used when closing a file.
Definition at line 132 of file content_manager.cpp.
References QObject::deleteLater(), QList::end(), hal::ExternalContent::instance(), and hal::ExternalContent::openWidgets.
| ContextManagerWidget * hal::ContentManager::getContextManagerWidget | ( | ) |
Get hal's context manager.
Definition at line 185 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 165 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 175 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 180 of file content_manager.cpp.
Referenced by hal::ModuleDialog::ModuleDialog().
| PythonEditor * hal::ContentManager::getPythonEditorWidget | ( | ) |
Get hal's python editor.
Definition at line 160 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 170 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 190 of file content_manager.cpp.
References hal::MainWindow::addContent(), QList::append(), QList::begin(), hal::ContentLayout::Bottom, hal::ContentLayout::Center, QObject::connect(), QList::end(), QList::erase(), hal::GuiPluginManager::getGuiExtensions(), hal::GroupingManagerWidget::getProxyModel(), hal::gGraphContextManager, hal::gNetlist, hal::ContextManagerWidget::handleOpenContextClicked(), hal::ContentWidget::handleSearchKeysequenceChanged(), hal::ContentWidgetPlacement::index, hal::ExternalContent::instance(), hal::SettingsManager::instance(), hal::SettingsItemDropdown::intChanged(), QList::isEmpty(), hal::SettingsItemKeybind::keySequenceChanged(), hal::MainWindow::layoutArea(), hal::ContentLayout::Left, hal::ModuleWidget::proxyModel(), hal::GraphContextSerializer::restore(), hal::GraphContextManager::restoreFromFile(), hal::ContentWidget::restoreFromProject(), hal::ContentLayoutArea::restoreSplitter(), hal::ContentLayout::Right, hal::GraphContextSerializer::selectedContext(), hal::SelectionDetailsWidget::selectionTreeView(), hal::ContextManagerWidget::selectViewContext(), setWindowTitle(), sSettingSearch, QVariant::toInt(), QVariant::toString(), hal::SettingsItemDropdown::value(), hal::SettingsItemKeybind::value(), hal::SettingsManager::widgetDetach(), and hal::SettingsManager::widgetPlacement().
Referenced by ContentManager().
| void hal::ContentManager::setWindowTitle | ( | const QString & | filename | ) |
Set main window title.
| filename | name of netlist filename. |
Definition at line 319 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 180 of file content_manager.h.
Referenced by hal::ContextManagerWidget::ContextManagerWidget(), hal::GroupingManagerWidget::GroupingManagerWidget(), and hal::ModuleWidget::ModuleWidget().
|
static |
Definition at line 179 of file content_manager.h.
Referenced by hal::GateDialog::GateDialog(), hal::GroupingDialog::GroupingDialog(), handleOpenDocument(), and hal::ModuleDialog::ModuleDialog().