SHAPER  9.12.0
Config_FeatureMessage.h
1 // Copyright (C) 2014-2023 CEA, EDF
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 #ifndef CONFIG_FEATUREMESSAGE_H
21 #define CONFIG_FEATUREMESSAGE_H
22 
23 #include <Config_def.h>
24 #include <Events_Message.h>
25 
26 #include <string>
27 
39 {
40  std::string myId;
41  std::string myText;
42  std::string myTooltip;
43  std::string myIcon;
44  std::string myKeysequence;
45  std::string myHelpFile;
46 
47  std::string myGroupId;
48  std::string myWorkbenchId;
49  std::string myToolBarId;
50  std::string myDocumentKind;
51  std::string myPluginLibrary;
52 
53  bool myUseInput;
54  bool myInternal;
55  bool myModal;
56  bool myIsAutoPreview;
57  bool myIsTitleInToolbar;
58  bool myHideFacesPanel;
59  bool myAbortConfirmation;
60 
62  bool myIsApplyContinue;
63 
64  std::string myNestedFeatures;
65  std::string myActionsWhenNested;
66 
67  public:
69  inline static const char* GUI_EVENT()
70  {
71  static const char * MY_GUI_EVENT_ID("WorkshopFeatureLoaded");
72  return MY_GUI_EVENT_ID;
73  }
75  inline static const char* MODEL_EVENT()
76  {
77  static const char * MY_MODEL_EVENT_ID("ModelFeatureLoaded");
78  return MY_MODEL_EVENT_ID;
79  }
80 
82  CONFIG_EXPORT Config_FeatureMessage(const Events_ID theId, const void* theParent = 0);
84  CONFIG_EXPORT virtual ~Config_FeatureMessage();
85 
86  //Auto-generated getters/setters
88  CONFIG_EXPORT const std::string& id() const;
90  CONFIG_EXPORT const std::string& icon() const;
92  CONFIG_EXPORT const std::string& keysequence() const;
94  CONFIG_EXPORT const std::string& text() const;
96  CONFIG_EXPORT const std::string& tooltip() const;
98  CONFIG_EXPORT const std::string& groupId() const;
100  CONFIG_EXPORT const std::string& toolBarId() const;
102  CONFIG_EXPORT const std::string& helpFileName() const;
104  CONFIG_EXPORT const std::string& workbenchId() const;
106  CONFIG_EXPORT const std::string& documentKind() const;
108  CONFIG_EXPORT const std::string& pluginLibrary() const;
110  CONFIG_EXPORT const std::string& nestedFeatures() const;
112  CONFIG_EXPORT const std::string& actionsWhenNested() const;
114  CONFIG_EXPORT bool isUseInput() const;
116  CONFIG_EXPORT bool isInternal() const;
118  CONFIG_EXPORT bool isModal() const;
120  CONFIG_EXPORT bool isApplyContinue() const;
122  CONFIG_EXPORT bool isAutoPreview() const;
124  CONFIG_EXPORT bool isTitleInToolbar() const;
126  CONFIG_EXPORT bool isHideFacesPanel() const;
127  CONFIG_EXPORT bool isAbortConfirmation() const;
128 
130  CONFIG_EXPORT void setId(const std::string& id);
132  CONFIG_EXPORT void setIcon(const std::string& icon);
134  CONFIG_EXPORT void setKeysequence(const std::string& keysequence);
136  CONFIG_EXPORT void setText(const std::string& text);
138  CONFIG_EXPORT void setTooltip(const std::string& tooltip);
140  CONFIG_EXPORT void setGroupId(const std::string& groupId);
142  CONFIG_EXPORT void setToolBarId(const std::string& aId);
144  CONFIG_EXPORT void setHelpFileName(const std::string& aName);
146  CONFIG_EXPORT void setWorkbenchId(const std::string& workbenchId);
148  CONFIG_EXPORT void setDocumentKind(const std::string& documentKind);
150  CONFIG_EXPORT void setPluginLibrary(const std::string& thePluginLibrary);
152  CONFIG_EXPORT void setNestedFeatures(const std::string& theNestedFeatures);
154  CONFIG_EXPORT void setActionsWhenNested(const std::string& theActions);
156  CONFIG_EXPORT void setUseInput(bool isUseInput);
158  CONFIG_EXPORT void setInternal(bool isInternal);
160  CONFIG_EXPORT void setAutoPreview(bool isAutoPreview);
162  CONFIG_EXPORT void setModal(bool isModal);
164  CONFIG_EXPORT void setTitleInToolbar(bool theValue);
166  CONFIG_EXPORT void setHideFacesPanel(bool theValue);
168  CONFIG_EXPORT void setAbortConfirmation(bool theValue);
171  CONFIG_EXPORT void setApplyContinue(bool isModal);
172 };
173 
174 #endif // CONFIG_MESSAGE_H
Class to pass a feature entry extracted from xml file.
Definition: Config_FeatureMessage.h:39
CONFIG_EXPORT void setPluginLibrary(const std::string &thePluginLibrary)
Set name of a library which contains the feature.
Definition: Config_FeatureMessage.cpp:147
CONFIG_EXPORT const std::string & toolBarId() const
Id of Feature's Toolbar.
Definition: Config_FeatureMessage.cpp:107
CONFIG_EXPORT bool isUseInput() const
If false - feature has no Property panel representation.
Definition: Config_FeatureMessage.cpp:153
CONFIG_EXPORT void setInternal(bool isInternal)
Set internal state; If true - feature will not be added into the workbench.
Definition: Config_FeatureMessage.cpp:189
CONFIG_EXPORT const std::string & actionsWhenNested() const
Space separated list of actions.
Definition: Config_FeatureMessage.cpp:204
CONFIG_EXPORT const std::string & workbenchId() const
Id of Feature's Workbench.
Definition: Config_FeatureMessage.cpp:117
CONFIG_EXPORT const std::string & documentKind() const
Kind of a document which contains the feature.
Definition: Config_FeatureMessage.cpp:127
CONFIG_EXPORT const std::string & tooltip() const
Feature's tooltip.
Definition: Config_FeatureMessage.cpp:92
CONFIG_EXPORT bool isModal() const
If true - the feature will be represented by modal dialog box GUI.
Definition: Config_FeatureMessage.cpp:173
CONFIG_EXPORT void setToolBarId(const std::string &aId)
Set id of Feature's Group.
Definition: Config_FeatureMessage.cpp:112
CONFIG_EXPORT const std::string & nestedFeatures() const
Space separated list of nested features.
Definition: Config_FeatureMessage.cpp:199
CONFIG_EXPORT void setText(const std::string &text)
Set feature's text.
Definition: Config_FeatureMessage.cpp:87
CONFIG_EXPORT void setId(const std::string &id)
Set feature's Id.
Definition: Config_FeatureMessage.cpp:67
CONFIG_EXPORT void setNestedFeatures(const std::string &theNestedFeatures)
Set space separated list of nested features.
Definition: Config_FeatureMessage.cpp:209
CONFIG_EXPORT const std::string & pluginLibrary() const
Name of a library which contains the feature.
Definition: Config_FeatureMessage.cpp:142
CONFIG_EXPORT void setAutoPreview(bool isAutoPreview)
Set auto preview state; If true - preview of the feature is computed automatically.
Definition: Config_FeatureMessage.cpp:219
CONFIG_EXPORT const std::string & icon() const
Feature's Icon.
Definition: Config_FeatureMessage.cpp:52
virtual CONFIG_EXPORT ~Config_FeatureMessage()
Deletes Config_FeatureMessage.
Definition: Config_FeatureMessage.cpp:47
CONFIG_EXPORT void setHelpFileName(const std::string &aName)
Set help file name.
Definition: Config_FeatureMessage.cpp:234
CONFIG_EXPORT const std::string & id() const
Feature's Id.
Definition: Config_FeatureMessage.cpp:62
CONFIG_EXPORT void setHideFacesPanel(bool theValue)
Set flag to display title in toolbar.
Definition: Config_FeatureMessage.cpp:250
static const char * MODEL_EVENT()
Event ID that feature is loaded in workbench (Model)
Definition: Config_FeatureMessage.h:75
CONFIG_EXPORT void setModal(bool isModal)
Set modality state; If true - the feature will be represented by modal dialog box GUI.
Definition: Config_FeatureMessage.cpp:194
CONFIG_EXPORT void setWorkbenchId(const std::string &workbenchId)
Set id of Feature's Workbench.
Definition: Config_FeatureMessage.cpp:122
CONFIG_EXPORT bool isInternal() const
If true - feature will not be added into the workbench.
Definition: Config_FeatureMessage.cpp:158
CONFIG_EXPORT void setTitleInToolbar(bool theValue)
Set flag to display title in toolbar.
Definition: Config_FeatureMessage.cpp:239
CONFIG_EXPORT bool isTitleInToolbar() const
If true - title should normally be displayed in the toolbar.
Definition: Config_FeatureMessage.cpp:168
CONFIG_EXPORT bool isAutoPreview() const
If true - preview of the feature is done by any modification of the feature attributes.
Definition: Config_FeatureMessage.cpp:163
CONFIG_EXPORT bool isApplyContinue() const
If true - the feature can have Apply/Continue button in its property panel.
Definition: Config_FeatureMessage.cpp:178
CONFIG_EXPORT void setUseInput(bool isUseInput)
Set use input state; If false - feature has no Property panel representation.
Definition: Config_FeatureMessage.cpp:184
CONFIG_EXPORT void setKeysequence(const std::string &keysequence)
Set feature's shortcut.
Definition: Config_FeatureMessage.cpp:77
CONFIG_EXPORT const std::string & text() const
Feature's text.
Definition: Config_FeatureMessage.cpp:82
CONFIG_EXPORT const std::string & helpFileName() const
Returns help file name for the feature.
Definition: Config_FeatureMessage.cpp:229
CONFIG_EXPORT void setApplyContinue(bool isModal)
Set Apply/Continue state; If true - the feature can have Apply/Continue button in its property panel.
Definition: Config_FeatureMessage.cpp:224
CONFIG_EXPORT void setTooltip(const std::string &tooltip)
Set feature's tooltip.
Definition: Config_FeatureMessage.cpp:137
CONFIG_EXPORT void setDocumentKind(const std::string &documentKind)
Set kind of a document which contains the feature.
Definition: Config_FeatureMessage.cpp:132
CONFIG_EXPORT bool isHideFacesPanel() const
If true - then HideFaces panel has to be shown.
Definition: Config_FeatureMessage.cpp:244
CONFIG_EXPORT const std::string & keysequence() const
Feature's shortcut.
Definition: Config_FeatureMessage.cpp:72
CONFIG_EXPORT void setGroupId(const std::string &groupId)
Set id of Feature's Group.
Definition: Config_FeatureMessage.cpp:102
static const char * GUI_EVENT()
Event ID that feature is loaded in workbench (GUI)
Definition: Config_FeatureMessage.h:69
CONFIG_EXPORT void setActionsWhenNested(const std::string &theActions)
Set space separated list of nested features.
Definition: Config_FeatureMessage.cpp:214
CONFIG_EXPORT Config_FeatureMessage(const Events_ID theId, const void *theParent=0)
Constructs Config_FeatureMessage.
Definition: Config_FeatureMessage.cpp:22
CONFIG_EXPORT void setAbortConfirmation(bool theValue)
Set flag to display title in toolbar.
Definition: Config_FeatureMessage.cpp:260
CONFIG_EXPORT const std::string & groupId() const
Id of Feature's Group.
Definition: Config_FeatureMessage.cpp:97
CONFIG_EXPORT void setIcon(const std::string &icon)
Set feature's Icon.
Definition: Config_FeatureMessage.cpp:57
Identifier of the event kind.
Definition: Events_Message.h:36
Message for communication between sender and listener of event.
Definition: Events_Message.h:65