Salome HOME
Avoid crash on closing a viewer and deactivation of the module
[modules/shaper.git] / src / Config / Config_FeatureMessage.cpp
1 // Copyright (C) 2014-2019  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #include "Config_FeatureMessage.h"
21
22 Config_FeatureMessage::Config_FeatureMessage(const Events_ID theId, const void* theParent)
23     : Events_Message(theId, theParent)
24 {
25   myId = "";
26   myText = "";
27   myTooltip = "";
28   myIcon = "";
29   myKeysequence = "";
30   myHelpFile = "";
31
32   myGroupId = "";
33   myWorkbenchId = "";
34   myToolBarId = "";
35   myPluginLibrary = "";
36
37   myInternal = false;
38   myUseInput = false;
39   myNestedFeatures = "";
40   myModal = false;
41   myIsTitleInToolbar = true;
42   myIsApplyContinue = false;
43 }
44
45 Config_FeatureMessage::~Config_FeatureMessage()
46 {
47
48 }
49
50 const std::string& Config_FeatureMessage::icon() const
51 {
52   return myIcon;
53 }
54
55 void Config_FeatureMessage::setIcon(const std::string& icon)
56 {
57   myIcon = icon;
58 }
59
60 const std::string& Config_FeatureMessage::id() const
61 {
62   return myId;
63 }
64
65 void Config_FeatureMessage::setId(const std::string& id)
66 {
67   myId = id;
68 }
69
70 const std::string& Config_FeatureMessage::keysequence() const
71 {
72   return myKeysequence;
73 }
74
75 void Config_FeatureMessage::setKeysequence(const std::string& keysequence)
76 {
77   myKeysequence = keysequence;
78 }
79
80 const std::string& Config_FeatureMessage::text() const
81 {
82   return myText;
83 }
84
85 void Config_FeatureMessage::setText(const std::string& text)
86 {
87   myText = text;
88 }
89
90 const std::string& Config_FeatureMessage::tooltip() const
91 {
92   return myTooltip;
93 }
94
95 const std::string& Config_FeatureMessage::groupId() const
96 {
97   return myGroupId;
98 }
99
100 void Config_FeatureMessage::setGroupId(const std::string& groupId)
101 {
102   myGroupId = groupId;
103 }
104
105 const std::string& Config_FeatureMessage::toolBarId() const
106 {
107   return myToolBarId;
108 }
109
110 void Config_FeatureMessage::setToolBarId(const std::string& aId)
111 {
112   myToolBarId = aId;
113 }
114
115 const std::string& Config_FeatureMessage::workbenchId() const
116 {
117   return myWorkbenchId;
118 }
119
120 void Config_FeatureMessage::setWorkbenchId(const std::string& workbenchId)
121 {
122   myWorkbenchId = workbenchId;
123 }
124
125 const std::string& Config_FeatureMessage::documentKind() const
126 {
127   return myDocumentKind;
128 }
129
130 void Config_FeatureMessage::setDocumentKind(const std::string& documentKind)
131 {
132   myDocumentKind = documentKind;
133 }
134
135 void Config_FeatureMessage::setTooltip(const std::string& tooltip)
136 {
137   myTooltip = tooltip;
138 }
139
140 const std::string& Config_FeatureMessage::pluginLibrary() const
141 {
142   return myPluginLibrary;
143 }
144
145 void Config_FeatureMessage::setPluginLibrary(const std::string& myPluginLibrary)
146 {
147   this->myPluginLibrary = myPluginLibrary;
148 }
149
150 // LCOV_EXCL_START
151 bool Config_FeatureMessage::isUseInput() const
152 {
153   return myUseInput;
154 }
155
156 bool Config_FeatureMessage::isInternal() const
157 {
158   return myInternal;
159 }
160
161 bool Config_FeatureMessage::isAutoPreview() const
162 {
163   return myIsAutoPreview;
164 }
165
166 bool Config_FeatureMessage::isTitleInToolbar() const
167 {
168   return myIsTitleInToolbar;
169 }
170
171 bool Config_FeatureMessage::isModal() const
172 {
173   return myModal;
174 }
175
176 bool Config_FeatureMessage::isApplyContinue() const
177 {
178   return myIsApplyContinue;
179 }
180 // LCOV_EXCL_STOP
181
182 void Config_FeatureMessage::setUseInput(bool isUseInput)
183 {
184   myUseInput = isUseInput;
185 }
186
187 void Config_FeatureMessage::setInternal(bool isInternal)
188 {
189   myInternal = isInternal;
190 }
191
192 void Config_FeatureMessage::setModal(bool isModal)
193 {
194   myModal = isModal;
195 }
196
197 const std::string& Config_FeatureMessage::nestedFeatures() const
198 {
199   return myNestedFeatures;
200 }
201
202 const std::string& Config_FeatureMessage::actionsWhenNested() const
203 {
204   return myActionsWhenNested;
205 }
206
207 void Config_FeatureMessage::setNestedFeatures(const std::string& theNestedFeatures)
208 {
209   myNestedFeatures = theNestedFeatures;
210 }
211
212 void Config_FeatureMessage::setActionsWhenNested(const std::string& theActions)
213 {
214   myActionsWhenNested = theActions;
215 }
216
217 void Config_FeatureMessage::setAutoPreview(bool isAutoPreview)
218 {
219   myIsAutoPreview = isAutoPreview;
220 }
221
222 void Config_FeatureMessage::setApplyContinue(bool isModal)
223 {
224   myIsApplyContinue = isModal;
225 }
226
227 const std::string& Config_FeatureMessage::helpFileName() const
228 {
229   return myHelpFile;
230 }
231
232 void Config_FeatureMessage::setHelpFileName(const std::string& aName)
233 {
234   myHelpFile = aName;
235 }
236
237 void Config_FeatureMessage::setTitleInToolbar(bool theValue)
238 {
239   myIsTitleInToolbar = theValue;
240 }