From: nds Date: Fri, 6 Jun 2014 12:32:01 +0000 (+0400) Subject: refs #80 - Sketch base GUI: create/draw point, circle and arc X-Git-Tag: V_0.4.4~308 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=759a12660edd93a3c402e36c67409d391ca04ad2;p=modules%2Fshaper.git refs #80 - Sketch base GUI: create/draw point, circle and arc Code correction to set the focus widget for all ModelWidget children. --- diff --git a/src/ModuleBase/CMakeLists.txt b/src/ModuleBase/CMakeLists.txt index 8679b5724..22c359484 100644 --- a/src/ModuleBase/CMakeLists.txt +++ b/src/ModuleBase/CMakeLists.txt @@ -2,30 +2,30 @@ INCLUDE(Common) SET(CMAKE_AUTOMOC ON) SET(PROJECT_HEADERS - ModuleBase.h + ModuleBase.h ModuleBase_IOperation.h ModuleBase_Operation.h ModuleBase_OperationDescription.h ModuleBase_ModelWidget.h + ModuleBase_WidgetBoolValue.h + ModuleBase_WidgetDoubleValue.h ModuleBase_WidgetFactory.h ModuleBase_WidgetPoint2D.h ModuleBase_WidgetSwitch.h - ModuleBase_MetaWidget.h - ModuleBase_SelectorWidget.h - ModuleBase_IWorkshop.h - ModuleBase_Widgets.h + ModuleBase_SelectorWidget.h + ModuleBase_IWorkshop.h ) SET(PROJECT_SOURCES ModuleBase_IOperation.cpp ModuleBase_Operation.cpp ModuleBase_OperationDescription.cpp + ModuleBase_WidgetBoolValue.cpp + ModuleBase_WidgetDoubleValue.cpp ModuleBase_WidgetFactory.cpp ModuleBase_WidgetPoint2D.cpp ModuleBase_WidgetSwitch.cpp - ModuleBase_MetaWidget.cpp - ModuleBase_SelectorWidget.cpp - ModuleBase_Widgets.cpp + ModuleBase_SelectorWidget.cpp ) SET(PROJECT_LIBRARIES diff --git a/src/ModuleBase/ModuleBase_MetaWidget.cpp b/src/ModuleBase/ModuleBase_MetaWidget.cpp deleted file mode 100644 index ba8eb260d..000000000 --- a/src/ModuleBase/ModuleBase_MetaWidget.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* - * - */ - -#include -#include - -#ifdef _DEBUG -#include -#endif - -ModuleBase_MetaWidget::ModuleBase_MetaWidget(QWidget* theWrapped) - : ModuleBase_ModelWidget(theWrapped->parent()), - myWrappedWidget(theWrapped) -{ - -} - -ModuleBase_MetaWidget::~ModuleBase_MetaWidget() -{ - -} - -bool ModuleBase_MetaWidget::storeValue(FeaturePtr theFeature) -{ - #ifdef _DEBUG - std::cout << "ModuleBase_MetaWidget::storeValue" - << myWrappedWidget->metaObject()->className() << std::endl; - #endif - return true; -} - -bool ModuleBase_MetaWidget::restoreValue(FeaturePtr theFeature) -{ - #ifdef _DEBUG - std::cout << "ModuleBase_MetaWidget::restoreValue" - << myWrappedWidget->metaObject()->className() << std::endl; - #endif - return true; -} - -bool ModuleBase_MetaWidget::focusTo(const std::string& theAttributeName) -{ - #ifdef _DEBUG - std::cout << "ModuleBase_MetaWidget::focusTo" - << myWrappedWidget->metaObject()->className() << std::endl; - #endif - return true; -} - -QList ModuleBase_MetaWidget::getControls() const -{ - return QList(); -} diff --git a/src/ModuleBase/ModuleBase_MetaWidget.h b/src/ModuleBase/ModuleBase_MetaWidget.h deleted file mode 100644 index 42504e0f0..000000000 --- a/src/ModuleBase/ModuleBase_MetaWidget.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - */ - -#ifndef MODULEBASE_METAWIDGET_H_ -#define MODULEBASE_METAWIDGET_H_ - -#include -#include - -#include - -#include - -#include - -/* - * - */ -class ModuleBase_MetaWidget : public ModuleBase_ModelWidget -{ -public: - MODULEBASE_EXPORT ModuleBase_MetaWidget(QWidget* theWrapped); - virtual ~ModuleBase_MetaWidget(); - //! Interface for saving widget's data into the data model - MODULEBASE_EXPORT virtual bool storeValue(FeaturePtr theFeature); - //! Interface for loading widget's data from the data model - MODULEBASE_EXPORT virtual bool restoreValue(FeaturePtr theFeature); - - /// Set focus to the current widget if it corresponds to the given attribute - /// \param theAttribute name - MODULEBASE_EXPORT virtual bool focusTo(const std::string& theAttributeName); - - /// Returns list of widget controls - /// \return a control list - virtual QList getControls() const; - -private: - QWidget* myWrappedWidget; -}; - -#endif /* MODULEBASE_METAWIDGET_H_ */ diff --git a/src/ModuleBase/ModuleBase_WidgetBoolValue.cpp b/src/ModuleBase/ModuleBase_WidgetBoolValue.cpp new file mode 100644 index 000000000..d55bd18e0 --- /dev/null +++ b/src/ModuleBase/ModuleBase_WidgetBoolValue.cpp @@ -0,0 +1,76 @@ +// File: ModuleBase_Widgets.h +// Created: 04 June 2014 +// Author: Vitaly Smetannikov + +#include + +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +ModuleBase_WidgetBoolValue::ModuleBase_WidgetBoolValue(QWidget* theParent, const Config_WidgetAPI* theData) + : ModuleBase_ModelWidget(theParent) +{ + myAttributeID = theData->widgetId(); + QString aText = QString::fromStdString(theData->widgetLabel()); + QString aToolTip = QString::fromStdString(theData->widgetTooltip()); + QString aDefault = QString::fromStdString(theData->getProperty("default")); + + myCheckBox = new QCheckBox(aText, theParent); + myCheckBox->setToolTip(aToolTip); + myCheckBox->setChecked(aDefault == "true"); + + connect(myCheckBox, SIGNAL(toggled(bool)), this, SIGNAL(valuesChanged())); +} + +ModuleBase_WidgetBoolValue::~ModuleBase_WidgetBoolValue() +{ +} + +QWidget* ModuleBase_WidgetBoolValue::getControl() const +{ + return myCheckBox; +} + +bool ModuleBase_WidgetBoolValue::storeValue(FeaturePtr theFeature) const +{ + DataPtr aData = theFeature->data(); + boost::shared_ptr aBool = aData->boolean(myAttributeID); + + if (aBool->value() != myCheckBox->isChecked()) { + aBool->setValue(myCheckBox->isChecked()); + Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_FEATURE_UPDATED)); + } + return true; +} + +bool ModuleBase_WidgetBoolValue::restoreValue(FeaturePtr theFeature) +{ + DataPtr aData = theFeature->data(); + boost::shared_ptr aRef = aData->boolean(myAttributeID); + + bool isBlocked = myCheckBox->blockSignals(true); + myCheckBox->setChecked(aRef->value()); + myCheckBox->blockSignals(isBlocked); + + return true; +} + +QList ModuleBase_WidgetBoolValue::getControls() const +{ + QList aList; + aList.append(myCheckBox); + return aList; +} diff --git a/src/ModuleBase/ModuleBase_WidgetBoolValue.h b/src/ModuleBase/ModuleBase_WidgetBoolValue.h new file mode 100644 index 000000000..8753c4cfd --- /dev/null +++ b/src/ModuleBase/ModuleBase_WidgetBoolValue.h @@ -0,0 +1,45 @@ +// File: ModuleBase_WidgetBoolValue.h +// Created: 04 June 2014 +// Author: Vitaly Smetannikov + +#ifndef ModuleBase_WidgetBoolValue_H +#define ModuleBase_WidgetBoolValue_H + +#include "ModuleBase.h" +#include "ModuleBase_ModelWidget.h" + +class Config_WidgetAPI; +class QWidget; +class QLabel; +class QDoubleSpinBox; +class QCheckBox; + +class MODULEBASE_EXPORT ModuleBase_WidgetBoolValue: public ModuleBase_ModelWidget +{ + Q_OBJECT +public: + ModuleBase_WidgetBoolValue(QWidget* theParent, const Config_WidgetAPI* theData); + + virtual ~ModuleBase_WidgetBoolValue(); + + /// Saves the internal parameters to the given feature + /// \param theFeature a model feature to be changed + virtual bool storeValue(FeaturePtr theFeature) const; + + virtual bool restoreValue(FeaturePtr theFeature); + + /// Returns list of widget controls + /// \return a control list + virtual QList getControls() const; + + /// Returns the internal parent wiget control, that can be shown anywhere + /// \returns the widget + QWidget* getControl() const; + +private: + std::string myAttributeID; + + QCheckBox* myCheckBox; +}; + +#endif \ No newline at end of file diff --git a/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp b/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp new file mode 100644 index 000000000..d65091fd1 --- /dev/null +++ b/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp @@ -0,0 +1,113 @@ +// File: ModuleBase_Widgets.h +// Created: 04 June 2014 +// Author: Vitaly Smetannikov + +#include + +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + + +ModuleBase_WidgetDoubleValue::ModuleBase_WidgetDoubleValue(QWidget* theParent, const Config_WidgetAPI* theData) + : ModuleBase_ModelWidget(theParent) +{ + myContainer = new QWidget(theParent); + QHBoxLayout* aControlLay = new QHBoxLayout(myContainer); + aControlLay->setContentsMargins(0, 0, 0, 0); + + QString aLabelText = QString::fromStdString(theData->widgetLabel()); + QString aLabelIcon = QString::fromStdString(theData->widgetIcon()); + myLabel = new QLabel(aLabelText, myContainer); + myLabel->setPixmap(QPixmap(aLabelIcon)); + aControlLay->addWidget(myLabel); + + myAttributeID = theData->widgetId(); + mySpinBox = new QDoubleSpinBox(myContainer); + QString anObjName = QString::fromStdString(myAttributeID); + mySpinBox->setObjectName(anObjName); + + bool isOk = false; + std::string aProp = theData->getProperty(DOUBLE_WDG_MIN); + double aMinVal = QString::fromStdString(aProp).toDouble(&isOk); + if (isOk) { + mySpinBox->setMinimum(aMinVal); + } else { + mySpinBox->setMinimum(-DBL_MAX); + } + + aProp = theData->getProperty(DOUBLE_WDG_MAX); + double aMaxVal = QString::fromStdString(aProp).toDouble(&isOk); + if (isOk) { + mySpinBox->setMaximum(aMaxVal); + } else { + mySpinBox->setMaximum(DBL_MAX); + } + + aProp = theData->getProperty(DOUBLE_WDG_STEP); + double aStepVal = QString::fromStdString(aProp).toDouble(&isOk); + if (isOk) { + mySpinBox->setSingleStep(aStepVal); + } + + aProp = theData->getProperty(DOUBLE_WDG_DFLT); + double aDefVal = QString::fromStdString(aProp).toDouble(&isOk); + if (isOk) { + mySpinBox->setValue(aDefVal); + } + + QString aTTip = QString::fromStdString(theData->widgetTooltip()); + mySpinBox->setToolTip(aTTip); + + aControlLay->addWidget(mySpinBox); + aControlLay->setStretch(1, 1); + + connect(mySpinBox, SIGNAL(valueChanged(double)), this, SIGNAL(valuesChanged())); +} + +ModuleBase_WidgetDoubleValue::~ModuleBase_WidgetDoubleValue() +{ +} + +bool ModuleBase_WidgetDoubleValue::storeValue(FeaturePtr theFeature) const +{ + DataPtr aData = theFeature->data(); + boost::shared_ptr aReal = aData->real(myAttributeID); + if (aReal->value() != mySpinBox->value()) { + aReal->setValue(mySpinBox->value()); + Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_FEATURE_UPDATED)); + } + return true; +} + +bool ModuleBase_WidgetDoubleValue::restoreValue(FeaturePtr theFeature) +{ + DataPtr aData = theFeature->data(); + boost::shared_ptr aRef = aData->real(myAttributeID); + + bool isBlocked = mySpinBox->blockSignals(true); + mySpinBox->setValue(aRef->value()); + mySpinBox->blockSignals(isBlocked); + + return true; +} + +QList ModuleBase_WidgetDoubleValue::getControls() const +{ + QList aList; + aList.append(myLabel); + aList.append(mySpinBox); + return aList; +} diff --git a/src/ModuleBase/ModuleBase_WidgetDoubleValue.h b/src/ModuleBase/ModuleBase_WidgetDoubleValue.h new file mode 100644 index 000000000..caab19556 --- /dev/null +++ b/src/ModuleBase/ModuleBase_WidgetDoubleValue.h @@ -0,0 +1,47 @@ +// File: ModuleBase_WidgetDoubleValue.h +// Created: 04 June 2014 +// Author: Vitaly Smetannikov + +#ifndef ModuleBase_WidgetDoubleValue_H +#define ModuleBase_WidgetDoubleValue_H + +#include "ModuleBase.h" +#include "ModuleBase_ModelWidget.h" + +class Config_WidgetAPI; +class QWidget; +class QLabel; +class QDoubleSpinBox; +class QCheckBox; + +class MODULEBASE_EXPORT ModuleBase_WidgetDoubleValue: public ModuleBase_ModelWidget +{ + Q_OBJECT +public: + ModuleBase_WidgetDoubleValue(QWidget* theParent, const Config_WidgetAPI* theData); + + virtual ~ModuleBase_WidgetDoubleValue(); + + /// Saves the internal parameters to the given feature + /// \param theFeature a model feature to be changed + virtual bool storeValue(FeaturePtr theFeature) const; + + virtual bool restoreValue(FeaturePtr theFeature); + + /// Returns list of widget controls + /// \return a control list + virtual QList getControls() const; + + /// Returns the internal parent wiget control, that can be shown anywhere + /// \returns the widget + QWidget* getControl() const { return myContainer; } + +private: + std::string myAttributeID; + + QWidget* myContainer; + QLabel* myLabel; + QDoubleSpinBox* mySpinBox; +}; + +#endif \ No newline at end of file diff --git a/src/ModuleBase/ModuleBase_WidgetFactory.cpp b/src/ModuleBase/ModuleBase_WidgetFactory.cpp index 63646b956..1f2f6a673 100644 --- a/src/ModuleBase/ModuleBase_WidgetFactory.cpp +++ b/src/ModuleBase/ModuleBase_WidgetFactory.cpp @@ -12,7 +12,8 @@ #include #include #include -#include +#include +#include #include #include @@ -149,7 +150,7 @@ QWidget* ModuleBase_WidgetFactory::createContainer(const std::string& theType, Q QWidget* ModuleBase_WidgetFactory::doubleSpinBoxControl(QWidget* theParent) { - ModuleBase_DoubleValueWidget* aDblWgt = new ModuleBase_DoubleValueWidget(theParent, myWidgetApi); + ModuleBase_WidgetDoubleValue* aDblWgt = new ModuleBase_WidgetDoubleValue(theParent, myWidgetApi); QObject::connect(aDblWgt, SIGNAL(valuesChanged()), myOperation, SLOT(storeCustomValue())); myModelWidgets.append(aDblWgt); @@ -203,7 +204,7 @@ QWidget* ModuleBase_WidgetFactory::selectorControl(QWidget* theParent) QWidget* ModuleBase_WidgetFactory::booleanControl(QWidget* theParent) { - ModuleBase_BoolValueWidget* aBoolWgt = new ModuleBase_BoolValueWidget(theParent, myWidgetApi); + ModuleBase_WidgetBoolValue* aBoolWgt = new ModuleBase_WidgetBoolValue(theParent, myWidgetApi); QObject::connect(aBoolWgt, SIGNAL(valuesChanged()), myOperation, SLOT(storeCustomValue())); myModelWidgets.append(aBoolWgt); diff --git a/src/ModuleBase/ModuleBase_Widgets.cpp b/src/ModuleBase/ModuleBase_Widgets.cpp deleted file mode 100644 index 0d810ece1..000000000 --- a/src/ModuleBase/ModuleBase_Widgets.cpp +++ /dev/null @@ -1,170 +0,0 @@ -// File: ModuleBase_Widgets.h -// Created: 04 June 2014 -// Author: Vitaly Smetannikov - -#include "ModuleBase_Widgets.h" - -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include -#include -#include -#include - - -ModuleBase_DoubleValueWidget::ModuleBase_DoubleValueWidget(QWidget* theParent, const Config_WidgetAPI* theData) - : ModuleBase_ModelWidget(theParent) -{ - myContainer = new QWidget(theParent); - QHBoxLayout* aControlLay = new QHBoxLayout(myContainer); - aControlLay->setContentsMargins(0, 0, 0, 0); - - QString aLabelText = QString::fromStdString(theData->widgetLabel()); - QString aLabelIcon = QString::fromStdString(theData->widgetIcon()); - myLabel = new QLabel(aLabelText, myContainer); - myLabel->setPixmap(QPixmap(aLabelIcon)); - aControlLay->addWidget(myLabel); - - myAttributeID = theData->widgetId(); - mySpinBox = new QDoubleSpinBox(myContainer); - QString anObjName = QString::fromStdString(myAttributeID); - mySpinBox->setObjectName(anObjName); - - bool isOk = false; - std::string aProp = theData->getProperty(DOUBLE_WDG_MIN); - double aMinVal = QString::fromStdString(aProp).toDouble(&isOk); - if (isOk) { - mySpinBox->setMinimum(aMinVal); - } else { - mySpinBox->setMinimum(-DBL_MAX); - } - - aProp = theData->getProperty(DOUBLE_WDG_MAX); - double aMaxVal = QString::fromStdString(aProp).toDouble(&isOk); - if (isOk) { - mySpinBox->setMaximum(aMaxVal); - } else { - mySpinBox->setMaximum(DBL_MAX); - } - - aProp = theData->getProperty(DOUBLE_WDG_STEP); - double aStepVal = QString::fromStdString(aProp).toDouble(&isOk); - if (isOk) { - mySpinBox->setSingleStep(aStepVal); - } - - aProp = theData->getProperty(DOUBLE_WDG_DFLT); - double aDefVal = QString::fromStdString(aProp).toDouble(&isOk); - if (isOk) { - mySpinBox->setValue(aDefVal); - } - - QString aTTip = QString::fromStdString(theData->widgetTooltip()); - mySpinBox->setToolTip(aTTip); - - aControlLay->addWidget(mySpinBox); - aControlLay->setStretch(1, 1); - - connect(mySpinBox, SIGNAL(valueChanged(double)), this, SIGNAL(valuesChanged())); -} - -ModuleBase_DoubleValueWidget::~ModuleBase_DoubleValueWidget() -{ -} - -bool ModuleBase_DoubleValueWidget::storeValue(FeaturePtr theFeature) const -{ - DataPtr aData = theFeature->data(); - boost::shared_ptr aReal = aData->real(myAttributeID); - if (aReal->value() != mySpinBox->value()) { - aReal->setValue(mySpinBox->value()); - Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_FEATURE_UPDATED)); - } - return true; -} - -bool ModuleBase_DoubleValueWidget::restoreValue(FeaturePtr theFeature) -{ - DataPtr aData = theFeature->data(); - boost::shared_ptr aRef = aData->real(myAttributeID); - - bool isBlocked = mySpinBox->blockSignals(true); - mySpinBox->setValue(aRef->value()); - mySpinBox->blockSignals(isBlocked); - - return true; -} - -QList ModuleBase_DoubleValueWidget::getControls() const -{ - QList aList; - aList.append(myLabel); - aList.append(mySpinBox); - return aList; -} - - -////////////////////////////////////////////////////////////////////////////////// -ModuleBase_BoolValueWidget::ModuleBase_BoolValueWidget(QWidget* theParent, const Config_WidgetAPI* theData) - : ModuleBase_ModelWidget(theParent) -{ - myAttributeID = theData->widgetId(); - QString aText = QString::fromStdString(theData->widgetLabel()); - QString aToolTip = QString::fromStdString(theData->widgetTooltip()); - QString aDefault = QString::fromStdString(theData->getProperty("default")); - - myCheckBox = new QCheckBox(aText, theParent); - myCheckBox->setToolTip(aToolTip); - myCheckBox->setChecked(aDefault == "true"); - - connect(myCheckBox, SIGNAL(toggled(bool)), this, SIGNAL(valuesChanged())); -} - -ModuleBase_BoolValueWidget::~ModuleBase_BoolValueWidget() -{ -} - -QWidget* ModuleBase_BoolValueWidget::getControl() const -{ - return myCheckBox; -} - -bool ModuleBase_BoolValueWidget::storeValue(FeaturePtr theFeature) const -{ - DataPtr aData = theFeature->data(); - boost::shared_ptr aBool = aData->boolean(myAttributeID); - - if (aBool->value() != myCheckBox->isChecked()) { - aBool->setValue(myCheckBox->isChecked()); - Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_FEATURE_UPDATED)); - } - return true; -} - -bool ModuleBase_BoolValueWidget::restoreValue(FeaturePtr theFeature) -{ - DataPtr aData = theFeature->data(); - boost::shared_ptr aRef = aData->boolean(myAttributeID); - - bool isBlocked = myCheckBox->blockSignals(true); - myCheckBox->setChecked(aRef->value()); - myCheckBox->blockSignals(isBlocked); - - return true; -} - -QList ModuleBase_BoolValueWidget::getControls() const -{ - QList aList; - aList.append(myCheckBox); - return aList; -} diff --git a/src/ModuleBase/ModuleBase_Widgets.h b/src/ModuleBase/ModuleBase_Widgets.h deleted file mode 100644 index d8030f9ab..000000000 --- a/src/ModuleBase/ModuleBase_Widgets.h +++ /dev/null @@ -1,78 +0,0 @@ -// File: ModuleBase_Widgets.h -// Created: 04 June 2014 -// Author: Vitaly Smetannikov - -#ifndef ModuleBase_Widgets_H -#define ModuleBase_Widgets_H - -#include "ModuleBase.h" -#include "ModuleBase_ModelWidget.h" - -class Config_WidgetAPI; -class QWidget; -class QLabel; -class QDoubleSpinBox; -class QCheckBox; - -class MODULEBASE_EXPORT ModuleBase_DoubleValueWidget: public ModuleBase_ModelWidget -{ - Q_OBJECT -public: - ModuleBase_DoubleValueWidget(QWidget* theParent, const Config_WidgetAPI* theData); - - virtual ~ModuleBase_DoubleValueWidget(); - - /// Saves the internal parameters to the given feature - /// \param theFeature a model feature to be changed - virtual bool storeValue(FeaturePtr theFeature) const; - - virtual bool restoreValue(FeaturePtr theFeature); - - /// Returns list of widget controls - /// \return a control list - virtual QList getControls() const; - - /// Returns the internal parent wiget control, that can be shown anywhere - /// \returns the widget - QWidget* getControl() const { return myContainer; } - -private: - std::string myAttributeID; - - QWidget* myContainer; - QLabel* myLabel; - QDoubleSpinBox* mySpinBox; -}; - - -////////////////////////////////////////////////////////////////////////////////// - -class MODULEBASE_EXPORT ModuleBase_BoolValueWidget: public ModuleBase_ModelWidget -{ - Q_OBJECT -public: - ModuleBase_BoolValueWidget(QWidget* theParent, const Config_WidgetAPI* theData); - - virtual ~ModuleBase_BoolValueWidget(); - - /// Saves the internal parameters to the given feature - /// \param theFeature a model feature to be changed - virtual bool storeValue(FeaturePtr theFeature) const; - - virtual bool restoreValue(FeaturePtr theFeature); - - /// Returns list of widget controls - /// \return a control list - virtual QList getControls() const; - - /// Returns the internal parent wiget control, that can be shown anywhere - /// \returns the widget - QWidget* getControl() const; - -private: - std::string myAttributeID; - - QCheckBox* myCheckBox; -}; - -#endif \ No newline at end of file