From: vsv Date: Thu, 14 Aug 2014 07:27:42 +0000 (+0400) Subject: Visualization preferences for sketcher are created X-Git-Tag: V_0.4.4~105^2~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=300f40cc0945ce614f9c0af668ac2b3094ec0524;p=modules%2Fshaper.git Visualization preferences for sketcher are created --- diff --git a/src/Config/CMakeLists.txt b/src/Config/CMakeLists.txt index aa7ea19e4..1b52cfbb8 100644 --- a/src/Config/CMakeLists.txt +++ b/src/Config/CMakeLists.txt @@ -15,6 +15,8 @@ SET(PROJECT_HEADERS Config_PointerMessage.h Config_Common.h Config_ValidatorMessage.h + Config_Prop.h + Config_PropManager.h ) SET(PROJECT_SOURCES @@ -27,6 +29,7 @@ SET(PROJECT_SOURCES Config_PointerMessage.cpp Config_Common.cpp Config_ValidatorMessage.cpp + Config_PropManager.cpp ) SET(XML_RESOURCES diff --git a/src/Config/Config_Prop.h b/src/Config/Config_Prop.h new file mode 100644 index 000000000..3e5ab7f42 --- /dev/null +++ b/src/Config/Config_Prop.h @@ -0,0 +1,59 @@ +// File: Config_Prop.h +// Created: 12 Aug 2014 +// Author: Vitaly SMETANNIKOV + +#ifndef Config_Prop_H +#define Config_Prop_H + +#include "Config_def.h" + +#include +#include + +/// Class which describes a one property +class Config_Prop +{ +public: + + enum PropType { Auto, Space, Bool, Color, String, Selector, + DblSpin, IntSpin, Double, Integer, + GroupBox, Tab, Frame, Font, DirList, File, + Slider, Shortcut, ShortcutTree, BiColor, Background }; + + + /** + * Creates a one property + * \param theSection - name of section (domain of using) of the property. + * \param theName - name (title) of the value. + * \param theType - type of the value. + * \param theValue - initial value of the property. + */ + Config_Prop(const std::string& theSection, + const std::string& theName, + const std::string& theTitle, + PropType theType, + const std::string& theValue ) { + mySection = theSection; + myName = theName; + myTitle = theTitle; + myType = theType; + myValue = theValue; + } + + std::string section() const { return mySection; } + std::string name() const { return myName; } + std::string title() const { return myTitle; } + PropType type() const { return myType; } + std::string value() const { return myValue; } + +private: + std::string mySection; + std::string myName; + std::string myTitle; + PropType myType; + std::string myValue; +}; + +typedef std::list Config_Properties; + +#endif \ No newline at end of file diff --git a/src/Config/Config_PropManager.cpp b/src/Config/Config_PropManager.cpp new file mode 100644 index 000000000..b8593206d --- /dev/null +++ b/src/Config/Config_PropManager.cpp @@ -0,0 +1,121 @@ +// File: Config_PropManager.cpp +// Created: 13 Aug 2014 +// Author: Vitaly SMETANNIKOV + +#include "Config_PropManager.h" + + +std::map Config_PropManager::myPropMap; + + + +bool Config_PropManager::registerProp(const std::string& theOwnerId, + const std::string& theSection, + const std::string& theName, + const std::string& theTitle, + Config_Prop::PropType theType, + const std::string& theValue) +{ + Config_Prop* aProp = new Config_Prop(theSection, theName, theTitle, theType, theValue); + return registerProp(theOwnerId, aProp); +} + +bool Config_PropManager::registerProp(const std::string& theOwnerId, + Config_Prop* theProp) +{ + if (myPropMap.find(theOwnerId) == myPropMap.end()) { + Config_Properties aPropList; + aPropList.push_back(theProp); + myPropMap[theOwnerId] = aPropList; + } else { + myPropMap[theOwnerId].push_back(theProp); + } + return true; +} + +std::list Config_PropManager::getOwners() +{ + std::list aKeys; + std::map::const_iterator aIt; + for (aIt = myPropMap.cbegin(); aIt != myPropMap.cend(); ++aIt) + aKeys.push_back((*aIt).first); + return aKeys; +} + +Config_Properties Config_PropManager::getProperties(const std::string& theOwnerId) +{ + return myPropMap[theOwnerId]; +} + + +std::list Config_PropManager::getSections(const std::string& theOwnerId) +{ + std::list aSections; + Config_Properties aProps = getProperties(theOwnerId); + Config_Properties::const_iterator aIt; + for (aIt = aProps.cbegin(); aIt != aProps.cend(); aIt++) { + const Config_Prop* aProp = (*aIt); + aSections.push_back(aProp->section()); + } + aSections.unique(); + return aSections; +} + +Config_Properties Config_PropManager::getProperties(const std::string& theOwnerId, + const std::string& theSection) +{ + Config_Properties aProps = getProperties(theOwnerId); + Config_Properties aRes; + Config_Properties::iterator aIt; + for (aIt = aProps.begin(); aIt != aProps.end(); aIt++) { + Config_Prop* aProp = (*aIt); + if (aProp->section() == theSection) + aRes.push_back(aProp); + } + return aRes; +} + + +std::string Config_PropManager::value(const std::string& theOwnerId, + const std::string& theSection, + const std::string& theName, + const std::string& theDefault) +{ + Config_Properties aProps = getProperties(theOwnerId, theSection); + Config_Properties::const_iterator aIt; + for (aIt = aProps.cbegin(); aIt != aProps.cend(); aIt++) { + Config_Prop* aProp = (*aIt); + if (aProp->name() == theName) + return aProp->value(); + } + return theDefault; +} + + +std::vector stringToRGB(const std::string& theColor) +{ + std::vector aRes(3); + + int aPos = theColor.find(","); + char aBuf[10]; + // Get Red + std::size_t length = theColor.copy(aBuf, aPos, 0); + aBuf[length] = '\0'; + int aC = atoi(aBuf); + aRes[0] = aC; + + // Get Green + int aNPos = theColor.find(",", aPos + 1); + length = theColor.copy(aBuf, aNPos - aPos - 1, aPos + 1); + aBuf[length] = '\0'; + aC = atoi(aBuf); + aRes[1] = aC; + + // Get Green + length = theColor.copy(aBuf, theColor.length() - aNPos - 1, aNPos + 1); + aBuf[length] = '\0'; + aC = atoi(aBuf); + aRes[2] = aC; + + return aRes; +} \ No newline at end of file diff --git a/src/Config/Config_PropManager.h b/src/Config/Config_PropManager.h new file mode 100644 index 000000000..4a6d43226 --- /dev/null +++ b/src/Config/Config_PropManager.h @@ -0,0 +1,71 @@ +// File: Config_PropManager.h +// Created: 13 Aug 2014 +// Author: Vitaly SMETANNIKOV + +#ifndef Config_PropManager_H +#define Config_PropManager_H + +#include "Config_def.h" +#include "Config_Prop.h" + +#include +#include +#include + +//! Class wihich let to register properties +class CONFIG_EXPORT Config_PropManager +{ +public: + + /** + * Registers property parameters + * \param theOwnerId - name of owner (name of plugin for example) + * \param theSection - name of section (domain of using) of the property. + * \param theName - name (title) of the value. + * \param theType - type of the value. + * \param theValue - initial value of the property + * Returns True if the property succesfully registered + */ + static bool registerProp(const std::string& theOwnerId, + const std::string& theSection, + const std::string& theName, + const std::string& theTitle, + Config_Prop::PropType theType, + const std::string& theValue); + + //! Returns list of registered owners. + static std::list getOwners(); + + //! Returns list of properties by its owner. + static Config_Properties getProperties(const std::string& theOwnerId); + + //! Returns list of registered section names. + static std::list getSections(const std::string& theOwnerId); + + //! Returns list of properties by its owner and section. + static Config_Properties getProperties(const std::string& theOwnerId, const std::string& theSection); + + //! Returns value of the property by its owner, section, and name + static std::string value(const std::string& theOwnerId, + const std::string& theSection, + const std::string& theName, + const std::string& theDefault); + +private: + + /** + * Registers property parameters + * \param theOwnerId - name of owner (name of plugin for example) + * \param theProp - the Property object. + * Returns True if the property succesfully registered + */ + static bool registerProp(const std::string& theOwnerId, + Config_Prop* theProp); + + static std::map myPropMap; +}; + + +CONFIG_EXPORT std::vector stringToRGB(const std::string& theColor); + +#endif \ No newline at end of file diff --git a/src/GeomAPI/GeomAPI_AISObject.cpp b/src/GeomAPI/GeomAPI_AISObject.cpp index b2bb96faf..ec44e1c63 100644 --- a/src/GeomAPI/GeomAPI_AISObject.cpp +++ b/src/GeomAPI/GeomAPI_AISObject.cpp @@ -234,7 +234,12 @@ void GeomAPI_AISObject::setColor(const int& theColor) Handle(AIS_InteractiveObject) anAIS = impl(); if (anAIS.IsNull()) return ; - anAIS->SetColor(Quantity_Color((Quantity_NameOfColor)theColor)); + Quantity_Color aColor((Quantity_NameOfColor)theColor); + anAIS->SetColor(aColor); + Handle(AIS_Dimension) aDimAIS = Handle(AIS_Dimension)::DownCast(anAIS); + if (!aDimAIS.IsNull()) { + aDimAIS->DimensionAspect()->SetCommonColor(aColor); + } } void GeomAPI_AISObject::setWidth(const double& theWidth) @@ -245,6 +250,19 @@ void GeomAPI_AISObject::setWidth(const double& theWidth) anAIS->SetWidth(theWidth); } +void GeomAPI_AISObject::setColor(int theR, int theG, int theB) +{ + Handle(AIS_InteractiveObject) anAIS = impl(); + if (anAIS.IsNull()) + return ; + Quantity_Color aColor(theR/255., theG/255., theB/255., Quantity_TOC_RGB); + anAIS->SetColor(aColor); + Handle(AIS_Dimension) aDimAIS = Handle(AIS_Dimension)::DownCast(anAIS); + if (!aDimAIS.IsNull()) { + aDimAIS->DimensionAspect()->SetCommonColor(aColor); + } +} + bool GeomAPI_AISObject::empty() const { Handle(AIS_InteractiveObject) anAIS = diff --git a/src/GeomAPI/GeomAPI_AISObject.h b/src/GeomAPI/GeomAPI_AISObject.h index a874e5d3e..12b29708b 100644 --- a/src/GeomAPI/GeomAPI_AISObject.h +++ b/src/GeomAPI/GeomAPI_AISObject.h @@ -84,6 +84,13 @@ public: */ void setColor(const int& theColor); + /** \brief Assigns the color for the shape + * \param[in] theR value of the red component + * \param[in] theG value of the green component + * \param[in] theB value of the blue component + */ + void setColor(int theR, int theG, int theB); + /// \brief Assigns the width of the lines of shape void setWidth(const double& theWidth); diff --git a/src/SketchPlugin/CMakeLists.txt b/src/SketchPlugin/CMakeLists.txt index d45087849..2cbe3e324 100644 --- a/src/SketchPlugin/CMakeLists.txt +++ b/src/SketchPlugin/CMakeLists.txt @@ -39,6 +39,7 @@ SET(PROJECT_SOURCES ) SET(PROJECT_LIBRARIES + Config GeomAPI GeomAlgoAPI ModelAPI @@ -53,6 +54,7 @@ ADD_LIBRARY(SketchPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESO TARGET_LINK_LIBRARIES(SketchPlugin ${PROJECT_LIBRARIES}) INCLUDE_DIRECTORIES( + ../Config ../ModelAPI ../GeomAPI ../GeomAlgoAPI diff --git a/src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp b/src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp index de504f56e..de05942fe 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp @@ -14,6 +14,7 @@ #include #include +#include SketchPlugin_ConstraintDistance::SketchPlugin_ConstraintDistance() { @@ -115,6 +116,12 @@ boost::shared_ptr SketchPlugin_ConstraintDistance::getAISObje if (!anAIS) anAIS = boost::shared_ptr(new GeomAPI_AISObject); anAIS->createDistance(aPoint1, aPoint2, aFlyoutPnt, aPlane, aValue); + + // Set color from preferences + std::string aColor = Config_PropManager::value("Sketcher", "Visualization", + "distance_color", DISTANCE_COLOR); + std::vector aRGB = stringToRGB(aColor); + anAIS->setColor(aRGB[0], aRGB[1], aRGB[2]); return anAIS; } diff --git a/src/SketchPlugin/SketchPlugin_ConstraintDistance.h b/src/SketchPlugin/SketchPlugin_ConstraintDistance.h index afb687d09..b63c170c5 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintDistance.h +++ b/src/SketchPlugin/SketchPlugin_ConstraintDistance.h @@ -15,6 +15,8 @@ class SketchPlugin_Line; class GeomDataAPI_Point2D; +#define DISTANCE_COLOR "255, 0, 255" + /** \class SketchPlugin_ConstraintDistance * \ingroup DataModel * \brief Feature for creation of a new constraint which defines a distance diff --git a/src/SketchPlugin/SketchPlugin_ConstraintLength.cpp b/src/SketchPlugin/SketchPlugin_ConstraintLength.cpp index 28d2cf7d3..7e3ddfd5f 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintLength.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintLength.cpp @@ -16,6 +16,7 @@ #include #include +#include SketchPlugin_ConstraintLength::SketchPlugin_ConstraintLength() @@ -93,6 +94,12 @@ boost::shared_ptr SketchPlugin_ConstraintLength::getAISObject if (!anAIS) anAIS = boost::shared_ptr(new GeomAPI_AISObject); anAIS->createDistance(aPoint1, aPoint2, aFlyoutPnt, aPlane, aValue); + + // Set color from preferences + std::string aColor = Config_PropManager::value("Sketcher", "Visualization", + "length_color", LENGTH_COLOR); + std::vector aRGB = stringToRGB(aColor); + anAIS->setColor(aRGB[0], aRGB[1], aRGB[2]); return anAIS; } diff --git a/src/SketchPlugin/SketchPlugin_ConstraintLength.h b/src/SketchPlugin/SketchPlugin_ConstraintLength.h index cc96258e3..52d26854a 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintLength.h +++ b/src/SketchPlugin/SketchPlugin_ConstraintLength.h @@ -10,6 +10,8 @@ #include #include +#define LENGTH_COLOR "255, 0, 255" + /** \class SketchPlugin_ConstraintLength * \ingroup DataModel * \brief Feature for creation of a new constraint which defines a length of a line segment diff --git a/src/SketchPlugin/SketchPlugin_ConstraintParallel.cpp b/src/SketchPlugin/SketchPlugin_ConstraintParallel.cpp index e2cd9c53d..ea09ad9cf 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintParallel.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintParallel.cpp @@ -15,6 +15,8 @@ #include #include +#include + SketchPlugin_ConstraintParallel::SketchPlugin_ConstraintParallel() { } @@ -77,6 +79,12 @@ boost::shared_ptr SketchPlugin_ConstraintParallel::getAISObje if (!anAIS) anAIS = boost::shared_ptr(new GeomAPI_AISObject); anAIS->createParallel(aLine1, aLine2, aFlyoutPnt, aPlane); + + // Set color from preferences + std::string aColor = Config_PropManager::value("Sketcher", "Visualization", + "parallel_color", PARALLEL_COLOR); + std::vector aRGB = stringToRGB(aColor); + anAIS->setColor(aRGB[0], aRGB[1], aRGB[2]); return anAIS; } diff --git a/src/SketchPlugin/SketchPlugin_ConstraintParallel.h b/src/SketchPlugin/SketchPlugin_ConstraintParallel.h index 0da78ca64..9b0570fc0 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintParallel.h +++ b/src/SketchPlugin/SketchPlugin_ConstraintParallel.h @@ -9,6 +9,9 @@ #include #include "SketchPlugin_Constraint.h" + +#define PARALLEL_COLOR "255, 255, 0" + /** \class SketchPlugin_ConstraintParallel * \ingroup DataModel * \brief Feature for creation of a new constraint parallelism of two lines diff --git a/src/SketchPlugin/SketchPlugin_ConstraintPerpendicular.cpp b/src/SketchPlugin/SketchPlugin_ConstraintPerpendicular.cpp index 4f6a0b771..e844f559d 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintPerpendicular.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintPerpendicular.cpp @@ -15,6 +15,8 @@ #include #include +#include + SketchPlugin_ConstraintPerpendicular::SketchPlugin_ConstraintPerpendicular() { } @@ -73,6 +75,12 @@ boost::shared_ptr SketchPlugin_ConstraintPerpendicular::getAI if (!anAIS) anAIS = boost::shared_ptr(new GeomAPI_AISObject); anAIS->createPerpendicular(aLine1, aLine2, aPlane); + + // Set color from preferences + std::string aColor = Config_PropManager::value("Sketcher", "Visualization", + "perpendicular_color", PERPENDICULAR_COLOR); + std::vector aRGB = stringToRGB(aColor); + anAIS->setColor(aRGB[0], aRGB[1], aRGB[2]); return anAIS; } diff --git a/src/SketchPlugin/SketchPlugin_ConstraintPerpendicular.h b/src/SketchPlugin/SketchPlugin_ConstraintPerpendicular.h index 33ad334e0..d6d54b33b 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintPerpendicular.h +++ b/src/SketchPlugin/SketchPlugin_ConstraintPerpendicular.h @@ -9,6 +9,8 @@ #include #include "SketchPlugin_Constraint.h" +#define PERPENDICULAR_COLOR "255, 255, 0" + /** \class SketchPlugin_ConstraintPerpendicular * \ingroup DataModel * \brief Feature for creation of a new constraint for perpendicularity of two lines diff --git a/src/SketchPlugin/SketchPlugin_ConstraintRadius.cpp b/src/SketchPlugin/SketchPlugin_ConstraintRadius.cpp index b77103542..729564170 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintRadius.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintRadius.cpp @@ -19,6 +19,8 @@ #include #include +#include + SketchPlugin_ConstraintRadius::SketchPlugin_ConstraintRadius() { } @@ -119,6 +121,12 @@ boost::shared_ptr SketchPlugin_ConstraintRadius::getAISObject if (!anAIS) anAIS = boost::shared_ptr(new GeomAPI_AISObject); anAIS->createRadius(aCircle, aFlyoutPnt, aValue); + + // Set color from preferences + std::string aColor = Config_PropManager::value("Sketcher", "Visualization", + "radius_color", RADIUS_COLOR); + std::vector aRGB = stringToRGB(aColor); + anAIS->setColor(aRGB[0], aRGB[1], aRGB[2]); return anAIS; } diff --git a/src/SketchPlugin/SketchPlugin_ConstraintRadius.h b/src/SketchPlugin/SketchPlugin_ConstraintRadius.h index 829a15512..6950b9c0c 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintRadius.h +++ b/src/SketchPlugin/SketchPlugin_ConstraintRadius.h @@ -9,6 +9,8 @@ #include #include "SketchPlugin_Constraint.h" +#define RADIUS_COLOR "255, 0, 255" + /** \class SketchPlugin_ConstraintRadius * \ingroup DataModel * \brief Feature for creation of a new constraint which defines diff --git a/src/SketchPlugin/SketchPlugin_Plugin.cpp b/src/SketchPlugin/SketchPlugin_Plugin.cpp index 2a05d4564..28c20ff4e 100644 --- a/src/SketchPlugin/SketchPlugin_Plugin.cpp +++ b/src/SketchPlugin/SketchPlugin_Plugin.cpp @@ -15,6 +15,8 @@ #include #include +#include + using namespace std; // the only created instance of this plugin @@ -28,6 +30,23 @@ SketchPlugin_Plugin::SketchPlugin_Plugin() // register this plugin ModelAPI_PluginManager::get()->registerPlugin(this); + + // register sketcher properties + Config_PropManager::registerProp("Sketcher", "Visualization", + "parallel_color", "Parallel constraint color", + Config_Prop::Color, PARALLEL_COLOR); + Config_PropManager::registerProp("Sketcher", "Visualization", + "perpendicular_color", "Perpendicular constraint color", + Config_Prop::Color, PERPENDICULAR_COLOR); + Config_PropManager::registerProp("Sketcher", "Visualization", + "distance_color", "Distance color", + Config_Prop::Color, DISTANCE_COLOR); + Config_PropManager::registerProp("Sketcher", "Visualization", + "length_color", "Length color", + Config_Prop::Color, LENGTH_COLOR); + Config_PropManager::registerProp("Sketcher", "Visualization", + "radius_color", "Radius color", + Config_Prop::Color, RADIUS_COLOR); } FeaturePtr SketchPlugin_Plugin::createFeature(string theFeatureID) diff --git a/src/XGUI/XGUI_Preferences.cpp b/src/XGUI/XGUI_Preferences.cpp index 14fea9f98..b310ba7ce 100644 --- a/src/XGUI/XGUI_Preferences.cpp +++ b/src/XGUI/XGUI_Preferences.cpp @@ -79,10 +79,17 @@ XGUI_PreferencesDlg::~XGUI_PreferencesDlg() void XGUI_PreferencesDlg::createEditors() { int aLFpage = myPreferences->addItem("Desktop"); - myPreferences->setItemIcon(aLFpage, QIcon(":pictures/view_prefs.png")); + //myPreferences->setItemIcon(aLFpage, QIcon(":pictures/view_prefs.png")); createMenuPage(aLFpage); createViewerPage(aLFpage); + + std::list aOwners = Config_PropManager::getOwners(); + std::list::const_iterator aIt; + for (aIt = aOwners.cbegin(); aIt != aOwners.cend(); ++ aIt) { + int aPage = myPreferences->addItem((*aIt).c_str()); + createCustomPage(aPage, Config_PropManager::getProperties((*aIt))); + } } void XGUI_PreferencesDlg::createViewerPage(int thePageId) @@ -144,6 +151,50 @@ void XGUI_PreferencesDlg::createMenuPage(int thePageId) myPreferences->setItemProperty( "max", 10, aRowsNb ); } + +void XGUI_PreferencesDlg::createCustomPage(int thePageId, Config_Properties& theProps) +{ + SUIT_ResourceMgr* aResMgr = XGUI_Preferences::resourceMgr(); + bool isResModified = false; + + // Sort by sections + QMap aGroupMap; + Config_Properties::const_iterator aIt; + for (aIt = theProps.cbegin(); aIt != theProps.cend(); ++aIt) { + QString aGroup((*aIt)->section().c_str()); + if (aGroupMap.contains(aGroup)) { + aGroupMap[aGroup].push_back(*aIt); + } else { + Config_Properties aProps; + aProps.push_back(*aIt); + aGroupMap[aGroup] = aProps; + } + // check that the property is defined + QString aName((*aIt)->name().c_str()); + if (!aResMgr->hasValue(aGroup, aName)) { + aResMgr->setValue(aGroup, aName, QString((*aIt)->value().c_str())); + isResModified = true; + } + } + if (isResModified) + aResMgr->save(); + + // Make a Tab from each section + QMap::iterator it; + for (it = aGroupMap.begin(); it != aGroupMap.end(); ++it) { + int aTab = myPreferences->addItem(it.key(), thePageId ); + myPreferences->setItemProperty( "columns", 2, aTab ); + Config_Properties& aProps = it.value(); + for (aIt = aProps.cbegin(); aIt != aProps.cend(); ++aIt) { + myPreferences->addItem( QString((*aIt)->title().c_str()), aTab, + (SUIT_PreferenceMgr::PrefItemType)(*aIt)->type(), + QString((*aIt)->section().c_str()), + QString((*aIt)->name().c_str()) ); + } + } +} + + void XGUI_PreferencesDlg::accept() { myPreferences->store(); diff --git a/src/XGUI/XGUI_Preferences.h b/src/XGUI/XGUI_Preferences.h index 90150c67f..bd30a31a5 100644 --- a/src/XGUI/XGUI_Preferences.h +++ b/src/XGUI/XGUI_Preferences.h @@ -7,6 +7,7 @@ #include "XGUI.h" +#include #include #include @@ -75,6 +76,7 @@ private: void createEditors(); void createViewerPage(int thePageId); void createMenuPage(int thePageId); + void createCustomPage(int thePageId, Config_Properties& theProps); XGUI_PreferencesMgr* myPreferences; bool myIsChanged;