From 92422cb683d5a8d5914b66de1d43edda281398fa Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Wed, 28 Apr 2010 15:40:51 +0000 Subject: [PATCH] * ./hurricane: - Bug: In CellWidget, correct the slightly off position of Labels references. - New: In ControllerWidget, new TabSettings tab to hold the configuration settings of the various Coriolis tools. The TabSettings is a tab itself. --- hurricane/src/viewer/ControllerWidget.cpp | 26 +++++++++++++++++ .../hurricane/viewer/ControllerWidget.h | 28 +++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/hurricane/src/viewer/ControllerWidget.cpp b/hurricane/src/viewer/ControllerWidget.cpp index 1d0d5bc0..4f0547f0 100644 --- a/hurricane/src/viewer/ControllerWidget.cpp +++ b/hurricane/src/viewer/ControllerWidget.cpp @@ -431,6 +431,29 @@ namespace Hurricane { } +// ------------------------------------------------------------------- +// Class : "Hurricane::TabSettings". + + + TabSettings::TabSettings ( QWidget* parent ) + : ControllerTab(parent) + , _settings(new QTabWidget()) + { + setContentsMargins ( 5, 0, 5, 5 ); + + _settings->setObjectName ( "controller.tabSettings.settings" ); + + QVBoxLayout* vLayout = new QVBoxLayout (); + vLayout->setContentsMargins ( 0, 0, 0, 0 ); + vLayout->addWidget ( _settings ); + setLayout ( vLayout ); + } + + + void TabSettings::setCellWidget ( CellWidget* ) + { } + + // ------------------------------------------------------------------- // Class : "Hurricane::ControllerWidget". @@ -444,6 +467,7 @@ namespace Hurricane { , _tabNetlist (new TabNetlist()) , _tabSelection (new TabSelection()) , _tabInspector (new TabInspector()) + , _tabSettings (new TabSettings()) { setObjectName ( "controller" ); setAttribute ( Qt::WA_QuitOnClose, false ); @@ -457,6 +481,7 @@ namespace Hurricane { _tabNetlist ->setObjectName ( "controller.tabNetlist" ); _tabSelection ->setObjectName ( "controller.tabSelection" ); _tabInspector ->setObjectName ( "controller.tabInspector" ); + _tabSettings ->setObjectName ( "controller.tabSettings" ); addTab ( _tabGraphics , "Look" ); addTab ( _tabDisplayFilter , "Filter" ); @@ -464,6 +489,7 @@ namespace Hurricane { addTab ( _tabNetlist , "Netlist" ); addTab ( _tabSelection , "Selection" ); addTab ( _tabInspector , "Inspector" ); + addTab ( _tabSettings , "Settings" ); QAction* toggleShow = new QAction ( tr("Controller"), this ); toggleShow->setObjectName ( "controller.action.hideShow" ); diff --git a/hurricane/src/viewer/hurricane/viewer/ControllerWidget.h b/hurricane/src/viewer/hurricane/viewer/ControllerWidget.h index 47afdb11..3e4aa3af 100644 --- a/hurricane/src/viewer/hurricane/viewer/ControllerWidget.h +++ b/hurricane/src/viewer/hurricane/viewer/ControllerWidget.h @@ -227,6 +227,29 @@ namespace Hurricane { inline QComboBox* TabInspector::getBookmarks () { return _bookmarks; } +// ------------------------------------------------------------------- +// Class : "Hurricane::TabSettings". + + + class TabSettings : public ControllerTab { + Q_OBJECT; + + public: + TabSettings ( QWidget* parent=NULL ); + inline QTabWidget* getSettings (); + inline int addSetting ( QWidget* page, const QString& label ); + public slots: + void setCellWidget ( CellWidget* ); + + protected: + QTabWidget* _settings; + }; + + + inline QTabWidget* TabSettings::getSettings () { return _settings; } + inline int TabSettings::addSetting ( QWidget* page, const QString& label ) { return _settings->addTab(page,label); } + + // ------------------------------------------------------------------- // Class : "Hurricane::ControllerWidget". @@ -243,7 +266,9 @@ namespace Hurricane { inline NetlistWidget* getNetlistBrowser (); inline SelectionWidget* getSelection (); inline InspectorWidget* getInspectorWidget (); + inline TabSettings* getSettings (); void setCellWidget ( CellWidget* ); + inline int addSetting ( QWidget* page, const QString& label ); public slots: void cellPreModificate (); void cellPostModificate (); @@ -259,6 +284,7 @@ namespace Hurricane { TabNetlist* _tabNetlist; TabSelection* _tabSelection; TabInspector* _tabInspector; + TabSettings* _tabSettings; }; @@ -269,6 +295,8 @@ namespace Hurricane { inline NetlistWidget* ControllerWidget::getNetlistBrowser () { return _tabNetlist->getNetlistBrowser(); } inline SelectionWidget* ControllerWidget::getSelection () { return _tabSelection->getSelection(); } inline InspectorWidget* ControllerWidget::getInspectorWidget () { return _tabInspector->getInspectorWidget(); } + inline TabSettings* ControllerWidget::getSettings () { return _tabSettings; } + inline int ControllerWidget::addSetting ( QWidget* page, const QString& label ) { return _tabSettings->addSetting(page,label); } } // End of Hurricane namespace.