Salome HOME
Merge branch 'BR_PYTHON_PLUGIN' of newgeom:newgeom.git into Dev_0.6.1
[modules/shaper.git] / src / Config / Config_Prop.cpp
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        Config_Prop.cpp
4 // Created:     18 Sep 2014
5 // Author:      Mikhail PONIKAROV
6
7
8 #include "Config_Prop.h"
9 #include "Events_Loop.h"
10 #include "Events_Message.h"
11
12 void Config_Prop::setValue(const std::string& theValue)
13 {
14   if (theValue != myValue) {
15     myValue = theValue;
16     static const Events_ID aChangedEvent = Events_Loop::loop()->eventByName("PreferenceChanged");
17     Events_Loop::loop()->send(std::shared_ptr<Events_Message>(
18       new Events_Message(aChangedEvent, this)));
19   }
20 }
21
22 void Config_Prop::setDefaultValue(const std::string& theValue)
23 {
24   if (theValue != myDefaultValue) {
25     myDefaultValue = theValue;
26   }
27 }