diff --git a/kite/src/CMakeLists.txt b/kite/src/CMakeLists.txt index 61aa0b1a..11d61576 100644 --- a/kite/src/CMakeLists.txt +++ b/kite/src/CMakeLists.txt @@ -2,9 +2,10 @@ include ( ${QT_USE_FILE} ) include_directories ( ${KITE_SOURCE_DIR}/src - ${Boost_INCLUDE_DIRS} - ${HURRICANE_INCLUDE_DIR} ${CORIOLIS_INCLUDE_DIR} + ${HURRICANE_INCLUDE_DIR} + ${CONFIGURATION_INCLUDE_DIR} + ${Boost_INCLUDE_DIRS} ) set ( includes kite/TrackSegmentCost.h kite/TrackCost.h @@ -30,11 +31,8 @@ kite/Configuration.h kite/KiteEngine.h kite/GraphicKiteEngine.h - kite/ConfigurationWidget.h - ) - set ( mocIncludes kite/GraphicKiteEngine.h - kite/ConfigurationWidget.h ) + set ( mocIncludes kite/GraphicKiteEngine.h ) set ( cpps TrackSegmentCost.cpp TrackCost.cpp DataNegociate.cpp @@ -63,7 +61,6 @@ Configuration.cpp KiteEngine.cpp GraphicKiteEngine.cpp - ConfigurationWidget.cpp ) set ( kitecpps KiteMain.cpp ) qt4_wrap_cpp ( mocCpps ${mocIncludes} ) @@ -90,6 +87,7 @@ ${HURRICANE_GRAPHICAL_LIBRARIES} ${CIF_LIBRARY} ${AGDS_LIBRARY} + ${CONFIGURATION_LIBRARY} ${QT_LIBRARIES} ${LEFDEF_LIBRARIES} ${OA_LIBRARIES} diff --git a/kite/src/Configuration.cpp b/kite/src/Configuration.cpp index dfd62637..cc495cfc 100644 --- a/kite/src/Configuration.cpp +++ b/kite/src/Configuration.cpp @@ -25,6 +25,7 @@ #include +#include "vlsisapd/configuration/Configuration.h" #include "hurricane/Cell.h" #include "crlcore/Utilities.h" #include "kite/Configuration.h" @@ -49,33 +50,21 @@ namespace Kite { // Class : "Kite::Configuration". - Configuration* Configuration::_default = NULL; - - - Configuration* Configuration::getDefault () - { - if ( _default == NULL ) { - _default = new Configuration ( Katabatic::Configuration::getDefault() ); - } - return _default; - } - - Configuration::Configuration ( Katabatic::Configuration* base ) : Katabatic::Configuration() , _base (base) , _postEventCb () - , _edgeCapacityPercent(0.80) - , _expandStep (0.99) + , _edgeCapacityPercent(Cfg::getParamPercentage("kite.edgeCapacity", 80.0)->asDouble()) + , _expandStep (Cfg::getParamPercentage("kite.expandStep" ,100.0)->asDouble()) , _ripupLimits () - , _ripupCost (3) - , _eventsLimit (4000000) + , _ripupCost (Cfg::getParamPercentage("kite.ripupCost" , 3)->asInt()) + , _eventsLimit (Cfg::getParamPercentage("kite.eventsLimit" ,4000000)->asInt()) { - _ripupLimits[BorderRipupLimit] = 26; - _ripupLimits[StrapRipupLimit] = 16; - _ripupLimits[LocalRipupLimit] = 7; - _ripupLimits[GlobalRipupLimit] = 5; - _ripupLimits[LongGlobalRipupLimit] = 5; + _ripupLimits[BorderRipupLimit] = Cfg::getParamPercentage("kite.borderRipupLimit" ,26)->asInt(); + _ripupLimits[StrapRipupLimit] = Cfg::getParamPercentage("kite.strapRipupLimit" ,16)->asInt(); + _ripupLimits[LocalRipupLimit] = Cfg::getParamPercentage("kite.localRipupLimit" , 7)->asInt(); + _ripupLimits[GlobalRipupLimit] = Cfg::getParamPercentage("kite.globalRipupLimit" , 5)->asInt(); + _ripupLimits[LongGlobalRipupLimit] = Cfg::getParamPercentage("kite.longGlobalRipupLimit" , 5)->asInt(); } diff --git a/kite/src/ConfigurationWidget.cpp b/kite/src/ConfigurationWidget.cpp deleted file mode 100644 index 2b0f897d..00000000 --- a/kite/src/ConfigurationWidget.cpp +++ /dev/null @@ -1,409 +0,0 @@ - -// -*- C++ -*- -// -// This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved -// -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | -// | C O R I O L I S | -// | K i t e - D e t a i l e d R o u t e r | -// | | -// | Author : Jean-Paul Chaput | -// | E-mail : Jean-Paul.Chaput@lip6.fr | -// | =============================================================== | -// | C++ Module : "./ConfigurationWidget.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "hurricane/viewer/Graphics.h" -#include "kite/Configuration.h" -#include "kite/ConfigurationWidget.h" - - -namespace Kite { - - using Hurricane::Graphics; - - -// ------------------------------------------------------------------- -// Class : "Kite::ConfigurationWidget". - - - ConfigurationWidget::ConfigurationWidget ( QWidget* parent ) - : QWidget(parent) - , _configuration (NULL) - , _saturateRatioEdit (new QLineEdit()) - , _globalThresholdEdit (new QLineEdit()) - , _edgeCapacityEdit (new QLineEdit()) - , _expandStepEdit (new QLineEdit()) - , _eventsLimitEdit (new QLineEdit()) - , _ripupCostSb (new QSpinBox()) - , _borderRipupLimitSb (new QSpinBox()) - , _strapRipupLimitSb (new QSpinBox()) - , _localRipupLimitSb (new QSpinBox()) - , _globalRipupLimitSb (new QSpinBox()) - , _longGlobalRipupLimitSb(new QSpinBox()) - { - setAttribute ( Qt::WA_QuitOnClose, false ); - - QVBoxLayout* vLayout = new QVBoxLayout (); - QGridLayout* gLayout = new QGridLayout (); - - QLabel* label = new QLabel(); - label->setFont ( Graphics::getNormalFont(true) ); - label->setText ( "Katabatic - Routing Database" ); - gLayout->addWidget ( label, 0, 0, 1, 4, Qt::AlignLeft ); - - label = new QLabel(); - label->setText ( "Saturate Ratio (%)" ); - _saturateRatioEdit->setValidator ( new QDoubleValidator(this) ); - _saturateRatioEdit->setEnabled ( false ); - gLayout->addWidget ( label , 1, 0, Qt::AlignRight ); - gLayout->addWidget ( _saturateRatioEdit, 1, 1, Qt::AlignLeft ); - - label = new QLabel(); - _globalThresholdEdit->setValidator ( new QIntValidator(this) ); - _globalThresholdEdit->setEnabled ( false ); - label->setText ( "Global Length Threshold" ); - gLayout->addWidget ( label , 2, 0, Qt::AlignRight ); - gLayout->addWidget ( _globalThresholdEdit, 2, 1, Qt::AlignLeft ); - - const int kiteRow = 3; - - label = new QLabel(); - label->setFont ( Graphics::getNormalFont(true) ); - label->setText ( "Kite - Detailed Router" ); - - QFrame* separator = new QFrame (); - separator->setFrameShape ( QFrame::HLine ); - separator->setFrameShadow ( QFrame::Sunken ); - - gLayout->addWidget ( separator, kiteRow+0, 0, 1, 4 ); - gLayout->addWidget ( label , kiteRow+1, 0, 1, 4, Qt::AlignLeft ); - - label = new QLabel(); - label->setText ( "Edge Capacity (%)" ); - _edgeCapacityEdit->setValidator ( new QDoubleValidator(this) ); - _edgeCapacityEdit->setEnabled ( false ); - gLayout->addWidget ( label , kiteRow+2, 0, Qt::AlignRight ); - gLayout->addWidget ( _edgeCapacityEdit, kiteRow+2, 1, Qt::AlignLeft ); - - label = new QLabel(); - label->setText ( "Expand Step (%)" ); - _expandStepEdit->setValidator ( new QDoubleValidator(this) ); - _expandStepEdit->setEnabled ( false ); - gLayout->addWidget ( label , kiteRow+3, 0, Qt::AlignRight ); - gLayout->addWidget ( _expandStepEdit, kiteRow+3, 1, Qt::AlignLeft ); - - label = new QLabel(); - _eventsLimitEdit->setValidator ( new QIntValidator(this) ); - _eventsLimitEdit->setEnabled ( false ); - label->setText ( "Events Limit" ); - gLayout->addWidget ( label , kiteRow+4, 0, Qt::AlignRight ); - gLayout->addWidget ( _eventsLimitEdit, kiteRow+4, 1, Qt::AlignLeft ); - - label = new QLabel(); - label->setText ( "Ripup Cost" ); - _ripupCostSb->setEnabled ( false ); - gLayout->addWidget ( label , kiteRow+2, 2, Qt::AlignRight ); - gLayout->addWidget ( _ripupCostSb, kiteRow+2, 3, Qt::AlignLeft ); - - label = new QLabel(); - label->setFont ( Graphics::getNormalFont(true) ); - label->setText ( "Ripup Limit" ); - gLayout->addWidget ( label, kiteRow+3, 2, Qt::AlignLeft ); - - QSizePolicy spinBoxPolicy (QSizePolicy::MinimumExpanding,QSizePolicy::MinimumExpanding); - - label = new QLabel(); - label->setText ( "Borders" ); - _borderRipupLimitSb->setEnabled ( false ); - //_borderRipupLimitSb->setSizePolicy ( spinBoxPolicy ); - gLayout->addWidget ( label , kiteRow+4, 2, Qt::AlignRight ); - gLayout->addWidget ( _borderRipupLimitSb, kiteRow+4, 3, Qt::AlignLeft ); - - label = new QLabel(); - label->setText ( "Straps" ); - _strapRipupLimitSb->setEnabled ( false ); - gLayout->addWidget ( label , kiteRow+5, 2, Qt::AlignRight ); - gLayout->addWidget ( _strapRipupLimitSb, kiteRow+5, 3, Qt::AlignLeft ); - - label = new QLabel(); - label->setText ( "Locals" ); - _localRipupLimitSb->setEnabled ( false ); - gLayout->addWidget ( label , kiteRow+6, 2, Qt::AlignRight ); - gLayout->addWidget ( _localRipupLimitSb, kiteRow+6, 3, Qt::AlignLeft ); - - label = new QLabel(); - label->setText ( "Globals" ); - _globalRipupLimitSb->setEnabled ( false ); - gLayout->addWidget ( label , kiteRow+7, 2, Qt::AlignRight ); - gLayout->addWidget ( _globalRipupLimitSb, kiteRow+7, 3, Qt::AlignLeft ); - - label = new QLabel(); - label->setText ( "Long Globals" ); - _longGlobalRipupLimitSb->setEnabled ( false ); - gLayout->addWidget ( label , kiteRow+8, 2, Qt::AlignRight ); - gLayout->addWidget ( _longGlobalRipupLimitSb, kiteRow+8, 3, Qt::AlignLeft ); - - separator = new QFrame (); - separator->setFrameShape ( QFrame::HLine ); - separator->setFrameShadow ( QFrame::Sunken ); - gLayout->addWidget ( separator, kiteRow+9, 0, 1, 4 ); - - vLayout->addLayout ( gLayout ); - - QHBoxLayout* hLayout = new QHBoxLayout (); - hLayout->addStretch (); - - QPushButton* apply = new QPushButton (); - apply->setText ( tr("Apply") ); - hLayout->addWidget ( apply ); - hLayout->addStretch (); - - vLayout->addLayout ( hLayout ); - vLayout->addStretch (); - - setLayout ( vLayout ); - - connect ( apply, SIGNAL(clicked()), this, SLOT(_applySettings()) ); - // connect ( _saturateRatioEdit , SIGNAL(returnPressed()) , this, SLOT(_updateSaturateRatio()) ); - // connect ( _globalThresholdEdit , SIGNAL(returnPressed()) , this, SLOT(_updateGlobalThreshold()) ); - // connect ( _edgeCapacityEdit , SIGNAL(returnPressed()) , this, SLOT(_updateEdgeCapacity()) ); - // connect ( _expandStepEdit , SIGNAL(returnPressed()) , this, SLOT(_updateExpandStep()) ); - // connect ( _eventsLimitEdit , SIGNAL(returnPressed()) , this, SLOT(_updateEventsLimit()) ); - // connect ( _ripupCostSb , SIGNAL(valueChanged(int)), this, SLOT(_updateRipupCost(int)) ); - // connect ( _borderRipupLimitSb , SIGNAL(valueChanged(int)), this, SLOT(_updateBorderRipupLimit(int)) ); - // connect ( _strapRipupLimitSb , SIGNAL(valueChanged(int)), this, SLOT(_updateStrapRipupLimit(int)) ); - // connect ( _localRipupLimitSb , SIGNAL(valueChanged(int)), this, SLOT(_updateLocalRipupLimit(int)) ); - // connect ( _globalRipupLimitSb , SIGNAL(valueChanged(int)), this, SLOT(_updateGlobalRipupLimit(int)) ); - // connect ( _longGlobalRipupLimitSb, SIGNAL(valueChanged(int)), this, SLOT(_updateLongGlobalRipupLimit(int)) ); - } - - - void ConfigurationWidget::setConfiguration ( Configuration* config ) - { - if ( config != NULL ) { - _saturateRatioEdit ->setText ( QString("%1").arg(config->getSaturateRatio()) ); - _globalThresholdEdit->setText ( QString("%1").arg((long)DbU::getLambda(config->getGlobalThreshold())) ); - - _edgeCapacityEdit->setText ( QString("%1").arg(config->getEdgeCapacityPercent()) ); - _expandStepEdit ->setText ( QString("%1").arg(config->getExpandStep()) ); - _eventsLimitEdit ->setText ( QString("%1").arg(config->getEventsLimit()) ); - - _ripupCostSb ->setValue ( config->getRipupCost() ); - _borderRipupLimitSb ->setValue ( config->getRipupLimit(Configuration::BorderRipupLimit) ); - _strapRipupLimitSb ->setValue ( config->getRipupLimit(Configuration::StrapRipupLimit) ); - _localRipupLimitSb ->setValue ( config->getRipupLimit(Configuration::LocalRipupLimit) ); - _globalRipupLimitSb ->setValue ( config->getRipupLimit(Configuration::GlobalRipupLimit) ); - _longGlobalRipupLimitSb->setValue ( config->getRipupLimit(Configuration::LongGlobalRipupLimit) ); - - _saturateRatioEdit ->setEnabled ( true ); - _globalThresholdEdit ->setEnabled ( true ); - _edgeCapacityEdit ->setEnabled ( true ); - _expandStepEdit ->setEnabled ( true ); - _eventsLimitEdit ->setEnabled ( true ); - _ripupCostSb ->setEnabled ( true ); - _borderRipupLimitSb ->setEnabled ( true ); - _strapRipupLimitSb ->setEnabled ( true ); - _localRipupLimitSb ->setEnabled ( true ); - _globalRipupLimitSb ->setEnabled ( true ); - _longGlobalRipupLimitSb->setEnabled ( true ); - } else { - _saturateRatioEdit ->setEnabled ( false ); - _globalThresholdEdit ->setEnabled ( false ); - _edgeCapacityEdit ->setEnabled ( false ); - _expandStepEdit ->setEnabled ( false ); - _eventsLimitEdit ->setEnabled ( false ); - _ripupCostSb ->setEnabled ( false ); - _borderRipupLimitSb ->setEnabled ( false ); - _strapRipupLimitSb ->setEnabled ( false ); - _localRipupLimitSb ->setEnabled ( false ); - _globalRipupLimitSb ->setEnabled ( false ); - _longGlobalRipupLimitSb->setEnabled ( false ); - } - _configuration = config; - } - - - void ConfigurationWidget::_applySettings () - { - if ( _configuration == NULL ) return; - - _updateSaturateRatio (); - _updateGlobalThreshold (); - _updateEdgeCapacity (); - _updateExpandStep (); - _updateEventsLimit (); - _updateRipupCost (_ripupCostSb ->value()); - _updateBorderRipupLimit (_borderRipupLimitSb ->value()); - _updateStrapRipupLimit (_strapRipupLimitSb ->value()); - _updateLocalRipupLimit (_localRipupLimitSb ->value()); - _updateGlobalRipupLimit (_globalRipupLimitSb ->value()); - _updateLongGlobalRipupLimit(_longGlobalRipupLimitSb->value()); - } - - - void ConfigurationWidget::_updateSaturateRatio () - { - if ( _configuration == NULL ) return; - - bool success = false; - float ratio = _saturateRatioEdit->displayText().toFloat ( &success ); - if ( not success or (ratio >= 1.0) or (ratio < 0.0) ) { - _saturateRatioEdit->setText ( QString("%1").arg(_configuration->getSaturateRatio()) ); - } else { - _configuration->setSaturateRatio ( ratio ); - } - } - - - void ConfigurationWidget::_updateGlobalThreshold () - { - if ( _configuration == NULL ) return; - - bool success = false; - DbU::Unit length = DbU::lambda ( _globalThresholdEdit->displayText().toDouble(&success) ); - if ( not success or (length < 0) ) { - _globalThresholdEdit->setText ( QString("%1").arg((long)DbU::getLambda(_configuration->getGlobalThreshold())) ); - } else { - _configuration->setGlobalThreshold ( length ); - } - } - - - void ConfigurationWidget::_updateEdgeCapacity () - { - if ( _configuration == NULL ) return; - - bool success = false; - float ratio = _edgeCapacityEdit->displayText().toFloat ( &success ); - if ( not success or (ratio >= 1.0) or (ratio < 0.0) ) { - _edgeCapacityEdit->setText ( QString("%1").arg(_configuration->getEdgeCapacityPercent()) ); - } else { - _configuration->setEdgeCapacityPercent ( ratio ); - } - } - - - void ConfigurationWidget::_updateExpandStep () - { - if ( _configuration == NULL ) return; - - bool success = false; - float ratio = _expandStepEdit->displayText().toFloat ( &success ); - if ( not success or (ratio >= 1.0) or (ratio < 0.0) ) { - _expandStepEdit->setText ( QString("%1").arg(_configuration->getExpandStep()) ); - } else { - _configuration->setExpandStep ( ratio ); - } - } - - - void ConfigurationWidget::_updateEventsLimit () - { - if ( _configuration == NULL ) return; - - bool success = false; - long limit = _eventsLimitEdit->displayText().toLong ( &success ); - if ( not success or (limit < 0) ) { - _eventsLimitEdit->setText ( QString("%1").arg(_configuration->getEventsLimit()) ); - } else { - _configuration->setEventsLimit ( (unsigned long)limit ); - } - } - - - void ConfigurationWidget::_updateRipupCost ( int cost ) - { - if ( _configuration == NULL ) return; - - //std::cerr << "_vptr:" << (void*)(*((int*)_configuration)) << std::endl; - if ( cost < 0 ) { - _ripupCostSb->setValue ( (int)_configuration->getRipupCost() ); - } else { - _configuration->setRipupCost ( (unsigned int)cost ); - } - } - - - void ConfigurationWidget::_updateBorderRipupLimit ( int limit ) - { - if ( _configuration == NULL ) return; - - if ( limit < 0 ) { - _borderRipupLimitSb->setValue ( (int)_configuration->getRipupLimit(Configuration::BorderRipupLimit) ); - } else { - _configuration->setRipupLimit ( Configuration::BorderRipupLimit, (unsigned int)limit ); - } - } - - - void ConfigurationWidget::_updateStrapRipupLimit ( int limit ) - { - if ( _configuration == NULL ) return; - - if ( limit < 0 ) { - _strapRipupLimitSb->setValue ( (int)_configuration->getRipupLimit(Configuration::StrapRipupLimit) ); - } else { - _configuration->setRipupLimit ( Configuration::StrapRipupLimit, (unsigned int)limit ); - } - } - - - void ConfigurationWidget::_updateLocalRipupLimit ( int limit ) - { - if ( _configuration == NULL ) return; - - if ( limit < 0 ) { - _localRipupLimitSb->setValue ( (int)_configuration->getRipupLimit(Configuration::LocalRipupLimit) ); - } else { - _configuration->setRipupLimit ( Configuration::LocalRipupLimit, (unsigned int)limit ); - } - } - - - void ConfigurationWidget::_updateGlobalRipupLimit ( int limit ) - { - if ( _configuration == NULL ) return; - - if ( limit < 0 ) { - _globalRipupLimitSb->setValue ( (int)_configuration->getRipupLimit(Configuration::GlobalRipupLimit) ); - } else { - _configuration->setRipupLimit ( Configuration::GlobalRipupLimit, (unsigned int)limit ); - } - } - - - void ConfigurationWidget::_updateLongGlobalRipupLimit ( int limit ) - { - if ( _configuration == NULL ) return; - - if ( limit < 0 ) { - _longGlobalRipupLimitSb->setValue ( (int)_configuration->getRipupLimit(Configuration::LongGlobalRipupLimit) ); - } else { - _configuration->setRipupLimit ( Configuration::LongGlobalRipupLimit, (unsigned int)limit ); - } - } - - -} // End of Kite namespace. diff --git a/kite/src/GraphicKiteEngine.cpp b/kite/src/GraphicKiteEngine.cpp index 1e53e678..4f87b4f0 100644 --- a/kite/src/GraphicKiteEngine.cpp +++ b/kite/src/GraphicKiteEngine.cpp @@ -47,7 +47,7 @@ #include #include #include -#include +//#include namespace Kite { @@ -331,16 +331,16 @@ namespace Kite { connect ( this, SIGNAL(cellPreModificated ()), _viewer->getCellWidget(), SLOT(cellPreModificate ()) ); connect ( this, SIGNAL(cellPostModificated()), _viewer->getCellWidget(), SLOT(cellPostModificate()) ); - ControllerWidget* controller = _viewer->getControllerWidget(); - ConfigurationWidget* setting = controller->getSettings() - ->findChild("controller.tabSettings.setting.kite"); + // ControllerWidget* controller = _viewer->getControllerWidget(); + // ConfigurationWidget* setting = controller->getSettings() + // ->findChild("controller.tabSettings.setting.kite"); - if ( setting == NULL ) { - setting = new ConfigurationWidget (); - setting->setObjectName ( "controller.tabSettings.setting.kite" ); - setting->setConfiguration ( Configuration::getDefault() ); - controller->addSetting ( setting, "Kite" ); - } + // if ( setting == NULL ) { + // setting = new ConfigurationWidget (); + // setting->setObjectName ( "controller.tabSettings.setting.kite" ); + // setting->setConfiguration ( Configuration::getDefault() ); + // controller->addSetting ( setting, "Kite" ); + // } } diff --git a/kite/src/KiteEngine.cpp b/kite/src/KiteEngine.cpp index 17920f0d..d38f2ce2 100644 --- a/kite/src/KiteEngine.cpp +++ b/kite/src/KiteEngine.cpp @@ -105,7 +105,7 @@ namespace Kite { : KatabaticEngine (cell) , _knik (NULL) , _obstacleNet (NULL) - , _configuration (Configuration::getDefault()->clone(this)) + , _configuration (new Configuration(getKatabaticConfiguration())) , _routingPlanes () , _kiteGrid (NULL) , _negociateWindow (NULL) diff --git a/kite/src/KiteMain.cpp b/kite/src/KiteMain.cpp index 339821f9..bc75758f 100644 --- a/kite/src/KiteMain.cpp +++ b/kite/src/KiteMain.cpp @@ -161,7 +161,7 @@ int main ( int argc, char *argv[] ) } } - Kite::Configuration::getDefault()->setEdgeCapacityPercent ( edgeCapacity ); + //Kite::Configuration::getDefault()->setEdgeCapacityPercent ( edgeCapacity ); cell->flattenNets ( not arguments.count("global") ); diff --git a/kite/src/kite/Configuration.h b/kite/src/kite/Configuration.h index 2b2c43c4..bb160324 100644 --- a/kite/src/kite/Configuration.h +++ b/kite/src/kite/Configuration.h @@ -59,12 +59,11 @@ namespace Kite { , LongGlobalRipupLimit=4 , RipupLimitsTableSize=5 }; - public: - static Configuration* getDefault (); public: // Constructor & Destructor. virtual Configuration* clone () const; virtual Configuration* clone ( KiteEngine* kite ) const; + Configuration ( Katabatic::Configuration* ); ~Configuration (); // Decorateds. virtual bool isGMetal ( const Layer* ) const; @@ -99,12 +98,7 @@ namespace Kite { virtual Record* _getRecord () const; virtual string _getString () const; virtual string _getTypeName () const; - - protected: - Configuration ( Katabatic::Configuration* ); private: - // Static Attributes. - static Configuration* _default; // Attributes. Katabatic::Configuration* _base; PostEventCb_t _postEventCb; diff --git a/kite/src/kite/ConfigurationWidget.h b/kite/src/kite/ConfigurationWidget.h deleted file mode 100644 index fcf127e9..00000000 --- a/kite/src/kite/ConfigurationWidget.h +++ /dev/null @@ -1,81 +0,0 @@ - -// -*- C++ -*- -// -// This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved -// -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | -// | C O R I O L I S | -// | K i t e - D e t a i l e d R o u t e r | -// | | -// | Author : Jean-Paul Chaput | -// | E-mail : Jean-Paul.Chaput@lip6.fr | -// | =============================================================== | -// | C++ Header : "./ConfigurationWidget.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x - - - -#ifndef __CONFIGURATION_WIDGET__ -#define __CONFIGURATION_WIDGET__ - -#include -class QLineEdit; -class QSpinBox; - -namespace Kite { - - class Configuration; - - -// ------------------------------------------------------------------- -// Class : "Kite::ConfigurationWidget". - - - class ConfigurationWidget : public QWidget { - Q_OBJECT; - public: - ConfigurationWidget ( QWidget* parent=NULL ); - public slots: - void setConfiguration ( Configuration* ); - void _applySettings (); - void _updateSaturateRatio (); - void _updateGlobalThreshold (); - void _updateEdgeCapacity (); - void _updateExpandStep (); - void _updateEventsLimit (); - void _updateRipupCost (int); - void _updateBorderRipupLimit (int); - void _updateStrapRipupLimit (int); - void _updateLocalRipupLimit (int); - void _updateGlobalRipupLimit (int); - void _updateLongGlobalRipupLimit(int); - private: - Configuration* _configuration; - QLineEdit* _saturateRatioEdit; - QLineEdit* _globalThresholdEdit; - QLineEdit* _edgeCapacityEdit; - QLineEdit* _expandStepEdit; - QLineEdit* _eventsLimitEdit; - QSpinBox* _ripupCostSb; - QSpinBox* _borderRipupLimitSb; - QSpinBox* _strapRipupLimitSb; - QSpinBox* _localRipupLimitSb; - QSpinBox* _globalRipupLimitSb; - QSpinBox* _longGlobalRipupLimitSb; - }; - - - -} // End of Kite namespace. - - -#endif // __CONFIGURATION_WIDGET__