From: Sergey Belash Date: Mon, 31 Mar 2014 10:18:03 +0000 (+0400) Subject: Refactoring: Config_Message --> Config_FeatureMessage, field names changed according... X-Git-Tag: V_0.1~43^2~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=db5492dd0ee02cfff7abd5710332f43483968bfa;p=modules%2Fshaper.git Refactoring: Config_Message --> Config_FeatureMessage, field names changed according to the code style (m_ --> my) --- diff --git a/src/Config/CMakeLists.txt b/src/Config/CMakeLists.txt index 01be1d384..e971c39a0 100644 --- a/src/Config/CMakeLists.txt +++ b/src/Config/CMakeLists.txt @@ -7,14 +7,14 @@ INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/Event) SET(PROJECT_HEADERS Config.h - Config_Message.h + Config_FeatureMessage.h Config_XMLReader.h Config_ModuleReader.h Config_FeatureReader.h ) SET(PROJECT_SOURCES - Config_Message.cpp + Config_FeatureMessage.cpp Config_XMLReader.cpp Config_ModuleReader.cpp Config_FeatureReader.cpp diff --git a/src/Config/Config_FeatureMessage.cpp b/src/Config/Config_FeatureMessage.cpp new file mode 100644 index 000000000..896f62a13 --- /dev/null +++ b/src/Config/Config_FeatureMessage.cpp @@ -0,0 +1,88 @@ +/* + * + */ +#include "Config_FeatureMessage.h" + +Config_FeatureMessage::Config_FeatureMessage(const Event_ID theId, + const void* theParent) + : Event_Message(theId, theParent) +{ + myId = ""; + myText = ""; + myTooltip = ""; + myIcon = ""; + myKeysequence = ""; + + myGroupId = ""; + myWorkbenchId = ""; +} + +const std::string& Config_FeatureMessage::icon() const +{ + return myIcon; +} + +void Config_FeatureMessage::setIcon(const std::string& icon) +{ + myIcon = icon; +} + +const std::string& Config_FeatureMessage::id() const +{ + return myId; +} + +void Config_FeatureMessage::setId(const std::string& id) +{ + myId = id; +} + +const std::string& Config_FeatureMessage::keysequence() const +{ + return myKeysequence; +} + +void Config_FeatureMessage::setKeysequence(const std::string& keysequence) +{ + myKeysequence = keysequence; +} + +const std::string& Config_FeatureMessage::text() const +{ + return myText; +} + +void Config_FeatureMessage::setText(const std::string& text) +{ + myText = text; +} + +const std::string& Config_FeatureMessage::tooltip() const +{ + return myTooltip; +} + +const std::string& Config_FeatureMessage::groupId() const +{ + return myGroupId; +} + +void Config_FeatureMessage::setGroupId(const std::string& groupId) +{ + myGroupId = groupId; +} + +const std::string& Config_FeatureMessage::workbenchId() const +{ + return myWorkbenchId; +} + +void Config_FeatureMessage::setWorkbenchId(const std::string& workbenchId) +{ + myWorkbenchId = workbenchId; +} + +void Config_FeatureMessage::setTooltip(const std::string& tooltip) +{ + myTooltip = tooltip; +} diff --git a/src/Config/Config_FeatureMessage.h b/src/Config/Config_FeatureMessage.h new file mode 100644 index 000000000..ff14c46ae --- /dev/null +++ b/src/Config/Config_FeatureMessage.h @@ -0,0 +1,45 @@ +#ifndef CONFIG_MESSAGE_H +#define CONFIG_MESSAGE_H + +#include "Config.h" + +#include +#include + +class CONFIG_EXPORT Config_FeatureMessage : public Event_Message +{ + + std::string myId; + std::string myText; + std::string myTooltip; + std::string myIcon; + std::string myKeysequence; + + std::string myGroupId; + std::string myWorkbenchId; + +public: + //const Event_ID theID, const void* theSender = 0 + Config_FeatureMessage(const Event_ID theId, const void* theParent = 0); + + //Auto-generated getters/setters + const std::string& icon() const; + const std::string& id() const; + const std::string& keysequence() const; + const std::string& text() const; + const std::string& tooltip() const; + + const std::string& groupId() const; + const std::string& workbenchId() const; + + void setIcon(const std::string& icon); + void setId(const std::string& id); + void setKeysequence(const std::string& keysequence); + void setText(const std::string& text); + void setTooltip(const std::string& tooltip); + + void setGroupId(const std::string& groupId); + void setWorkbenchId(const std::string& workbenchId); +}; + +#endif // CONFIG_MESSAGE_H diff --git a/src/Config/Config_Message.cpp b/src/Config/Config_Message.cpp deleted file mode 100644 index 8dd2b4131..000000000 --- a/src/Config/Config_Message.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - * - */ -#include "Config_Message.h" - -Config_FeatureMessage::Config_FeatureMessage(const Event_ID theId, - const void* theParent) - : Event_Message(theId, theParent) -{ - m_id = ""; - m_text = ""; - m_tooltip = ""; - m_icon = ""; - m_keysequence = ""; - - m_groupId = ""; - m_groupText = ""; - m_workbenchId = ""; - m_workbenchText = ""; -} - -const std::string& Config_FeatureMessage::icon() const -{ - return m_icon; -} - -void Config_FeatureMessage::setIcon(const std::string& icon) -{ - m_icon = icon; -} - -const std::string& Config_FeatureMessage::id() const -{ - return m_id; -} - -void Config_FeatureMessage::setId(const std::string& id) -{ - m_id = id; -} - -const std::string& Config_FeatureMessage::keysequence() const -{ - return m_keysequence; -} - -void Config_FeatureMessage::setKeysequence(const std::string& keysequence) -{ - m_keysequence = keysequence; -} - -const std::string& Config_FeatureMessage::text() const -{ - return m_text; -} - -void Config_FeatureMessage::setText(const std::string& text) -{ - m_text = text; -} - -const std::string& Config_FeatureMessage::tooltip() const -{ - return m_tooltip; -} - -const std::string& Config_FeatureMessage::groupId() const -{ - return m_groupId; -} - -void Config_FeatureMessage::setGroupId(const std::string& groupId) -{ - m_groupId = groupId; -} - -const std::string& Config_FeatureMessage::groupText() const -{ - return m_groupText; -} - -void Config_FeatureMessage::setGroupText(const std::string& groupText) -{ - m_groupText = groupText; -} - -const std::string& Config_FeatureMessage::workbenchId() const -{ - return m_workbenchId; -} - -void Config_FeatureMessage::setWorkbenchId(const std::string& workbenchId) -{ - m_workbenchId = workbenchId; -} - -const std::string& Config_FeatureMessage::workbenchText() const -{ - return m_workbenchText; -} - -void Config_FeatureMessage::setWorkbenchText(const std::string& workbenchText) -{ - m_workbenchText = workbenchText; -} - -void Config_FeatureMessage::setTooltip(const std::string& tooltip) -{ - m_tooltip = tooltip; -} diff --git a/src/Config/Config_Message.h b/src/Config/Config_Message.h deleted file mode 100644 index 5f39cbc01..000000000 --- a/src/Config/Config_Message.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef CONFIG_MESSAGE_H -#define CONFIG_MESSAGE_H - -#include "Config.h" - -#include -#include - -class CONFIG_EXPORT Config_FeatureMessage : public Event_Message -{ - std::string m_id; - std::string m_text; - std::string m_tooltip; - std::string m_icon; - std::string m_keysequence; - - std::string m_groupId; - std::string m_groupText; - std::string m_workbenchId; - std::string m_workbenchText; - -public: - //const Event_ID theID, const void* theSender = 0 - Config_FeatureMessage(const Event_ID theId, const void* theParent = 0); - - //Auto-generated getters/setters - const std::string& icon() const; - const std::string& id() const; - const std::string& keysequence() const; - const std::string& text() const; - const std::string& tooltip() const; - const std::string& groupId() const; - const std::string& groupText() const; - const std::string& workbenchId() const; - const std::string& workbenchText() const; - - void setIcon(const std::string& icon); - void setId(const std::string& id); - void setKeysequence(const std::string& keysequence); - void setText(const std::string& text); - void setTooltip(const std::string& tooltip); - void setGroupId(const std::string& groupId); - void setGroupText(const std::string& groupText); - void setWorkbenchId(const std::string& workbenchId); - void setWorkbenchText(const std::string& workbenchText); -}; - -#endif // CONFIG_MESSAGE_H diff --git a/src/Config/Config_XMLReader.h b/src/Config/Config_XMLReader.h index 7a42fcb09..798a975d2 100644 --- a/src/Config/Config_XMLReader.h +++ b/src/Config/Config_XMLReader.h @@ -9,7 +9,7 @@ #define CONFIG_XMLREADER_H_ #include "Config.h" -#include "Config_Message.h" +#include "Config_FeatureMessage.h" #include #include diff --git a/src/Model/Model_PluginManager.cxx b/src/Model/Model_PluginManager.cxx index bf7a06fcd..da03f3150 100644 --- a/src/Model/Model_PluginManager.cxx +++ b/src/Model/Model_PluginManager.cxx @@ -6,7 +6,7 @@ #include #include #include -#include +#include using namespace std; diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 44620ea9f..48bc0c087 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -8,7 +8,7 @@ #include "XGUI_Workshop.h" #include "XGUI_Viewer.h" -#include +#include #include #include