# undefined via #undef or recursively expanded use the := operator
# instead of the = operator.
-PREDEFINED =
+PREDEFINED = Standard_EXPORT __Standard_API __Draw_API Handle(a):=Handle DEFINE_STANDARD_ALLOC DEFINE_NCOLLECTION_ALLOC DEFINE_STANDARD_HANDLE DEFINE_STANDARD_RTTI
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.
//#include <BRepBuilderAPI_MakeShape.hxx>
/**\class GeomAlgoAPI_MakeShape
* \ingroup DataModel
- * \Interface to the root class of all topological shapes constructions
+ * \brief Interface to the root class of all topological shapes constructions
*/
class GeomAlgoAPI_MakeShape : public GeomAPI_Interface
{
/**\class Model_ValidatorsFactory
* \ingroup DataModel
- * \breif Manages the registered validators
+ * \brief Manages the registered validators
*
* Allows to get a validator by the feature identifier and
* the attribute identifier (if attribute is validated).
/**\class ModelAPI_ValidatorsFactory
* \ingroup DataModel
- * \breif Manages the registered validators
+ * \brief Manages the registered validators
*
* Allows to get a validator by the feature identifier and
* the attribute identifier (if attribute is validated).
SUIT_PreferenceMgr::PrefItemType theType,
const QString& theSection, const QString& theName ) = 0;
+ /**
+ * \brief Set property of an item
+ * \param thePropName the property name
+ * \param theValue the value of the property
+ * \param theId id of the property
+ */
virtual void setItemProperty(const QString& thePropName,
const QVariant& theValue,
const int theId = -1) = 0;
class ModuleBase_ModelWidget;
+/**
+* A class for Property panel object definition
+*/
class MODULEBASE_EXPORT ModuleBase_IPropertyPanel : public QDockWidget
{
Q_OBJECT
public:
+ /// Constructor
+ /// \param theParent is a parent of the property panel
ModuleBase_IPropertyPanel(QWidget* theParent) : QDockWidget(theParent), myIsEditing(false) {}
/// Returns currently active widget
virtual const QList<ModuleBase_ModelWidget*>& modelWidgets() const = 0;
/// Editing mode depends on mode of current operation. This value is defined by it.
+ /// \param isEditing state of editing mode flag
virtual void setEditingMode(bool isEditing) { myIsEditing = isEditing; }
+
+ /// \return State of editing mode flag
bool isEditingMode() const { return myIsEditing; }
/// Set Enable/Disable state of Ok button
+ /// \param theEnabled Enable/Disable state of Ok button
virtual void setOkEnabled(bool theEnabled) = 0;
- /// Returns state of Ok button
+ /// \return Enable/disable state of Ok button
virtual bool isOkEnabled() const = 0;
- /// Set Enable/Disable state of Ok button
+ /// Set Enable/Disable state of Cancel button
+ /// \param theEnabled Enable/Disable state of Cancel button
virtual void setCancelEnabled(bool theEnabled) = 0;
- /// Returns state of Ok button
+ /// \return Enable/Disable state of Cancel button
virtual bool isCancelEnabled() const = 0;
signals:
/// Activate the next from current widget in the property panel
virtual void activateNextWidget() = 0;
- // Makes the given widget active, highlights it and removes
- // highlighting from the previous active widget
- // emits widgetActivated(theWidget) signal
+ /**
+ * Makes the given widget active, highlights it and removes
+ * highlighting from the previous active widget
+ * emits widgetActivated(theWidget) signal
+ * \param theWidget which has to be activated
+ */
virtual void activateWidget(ModuleBase_ModelWidget* theWidget) = 0;
protected:
+
+ /// Flag which shows that current operation is in editing mode
bool myIsEditing;
};
Q_OBJECT
public:
/// Constructor
- /// \theParent the parent object
- /// \theData the widget configuation. The attribute of the model widget is obtained from
+ /// \param theParent the parent object
+ /// \param theData the widget configuation. The attribute of the model widget is obtained from
+ /// \param theParentId is Id of a parent of the current attribute
ModuleBase_ModelWidget(QWidget* theParent, const Config_WidgetAPI* theData,
const std::string& theParentId);
/// Destructor
}
/// Saves the internal parameters to the given feature
- /// \param theObject a model feature to be changed
virtual bool storeValue() const = 0;
+ /// Restore value from attribute data to the widget's control
virtual bool restoreValue() = 0;
/// Set focus to the first control of the current widget. The focus policy of the control is checked.
/// \return a control list
virtual QList<QWidget*> getControls() const = 0;
-
/// FocusIn events processing
virtual bool eventFilter(QObject* theObject, QEvent *theEvent);
-
+ //! \brief Enables processing of focus event on all controls by the widget
void enableFocusProcessing();
+ //! Switch On/Off highlighting of the widget
void setHighlighted(bool isHighlighted);
/// Returns the attribute name
return myParentId;
}
+ /// \return Current feature
FeaturePtr feature() const
{
return myFeature;
}
+ /// Set feature which is processing by active operation
void setFeature(const FeaturePtr& theFeature)
{
myFeature = theFeature;
/// Editing mode depends on mode of current operation. This value is defined by it.
void setEditingMode(bool isEditing) { myIsEditing = isEditing; }
+
+ /// \return Current Editing mode
bool isEditingMode() const { return myIsEditing; }
signals:
/// The signal about widget values changed
void valuesChanged();
+
/// The signal about key release on the control, that corresponds to the attribute
- /// \param theAttributeName a name of the attribute
/// \param theEvent key release event
void keyReleased(QKeyEvent* theEvent);
+
/// The signal about the widget is get focus
/// \param theWidget the model base widget
void focusInWidget(ModuleBase_ModelWidget* theWidget);
+
/// The signal about the widget is lost focus
/// \param theWidget the model base widget
void focusOutWidget(ModuleBase_ModelWidget* theWidget);
protected:
- /// Returns the attribute name
- /// \returns the string value
+ /// \brief Set the attribute name
+ /// \param theAttribute the string value with attribute name
void setAttributeID(const std::string& theAttribute)
{
myAttributeID = theAttribute;
}
+ /// Sends Update and Redisplay for the given object
+ /// \param theObj is updating object
void updateObject(ObjectPtr theObj) const;
+
+ /// Sends Move event for the given object
+ /// \param theObj is object for moving
void moveObject(ObjectPtr theObj) const;
protected:
- std::string myAttributeID; /// the attribute name of the model feature
- std::string myParentId; /// name of parent
- FeaturePtr myFeature;
- bool myIsComputedDefault; /// Value should be computed on execute,
- /// like radius for circle's constraint (can not be zero)
+ /// The attribute name of the model feature
+ std::string myAttributeID;
+
+ /// Name of parent
+ std::string myParentId;
+
+ /// A feature which is processing by active operation
+ FeaturePtr myFeature;
- bool myIsEditing;
+ /// Value should be computed on execute, like radius for circle's constraint (can not be zero)
+ bool myIsComputedDefault;
+
+ /// Flag which shows that current operation is in editing mode
+ bool myIsEditing;
};
#endif
*/
virtual bool isGranted(QString theId) const;
- /// Sets a list of model widgets, according to the operation feature xml definition
- /// \param theXmlRepresentation an xml feature definition
- /// \param theWidgets a list of widgets
- //void setModelWidgets(const std::string& theXmlRepresentation,
- // QList<ModuleBase_ModelWidget*> theWidgets);
/// Returns True if data of its feature was modified during operation
virtual bool isModified() const { return myIsModified; }
void setNestedFeatures(const QStringList& theList) { myNestedFeatures = theList; }
- // Returns operations Id from it's description
+ /// Returns operations Id from it's description
QString id() const;
/// Returns the operation feature
/// Returns True if the current operation works with the given object (feature or result)
virtual bool hasObject(ObjectPtr theObj) const;
- //virtual void keyReleased(const int theKey) {};
-
- /// If operation needs to redisplay its result during operation
- /// then this method has to return True
- //virtual bool hasPreview() const { return false; }
-
/// Initialisation of operation with preliminary selection
- /// \param theSelected the list of selected presentations
- /// \param theHighlighted the list of highlighted presentations
+ /// \param theSelection an instance of Selection class
/// \param theViewer a viewer to have the viewer the eye position
virtual void initSelection(ModuleBase_ISelection* theSelection,
- ModuleBase_IViewer* /* theViewer*/);
+ ModuleBase_IViewer* theViewer);
+ /// \brief Set property pane to the operation
+ /// \param theProp a property panel instance
virtual void setPropertyPanel(ModuleBase_IPropertyPanel* theProp);
+ /// \return Currently installed property panel
ModuleBase_IPropertyPanel* propertyPanel() const { return myPropertyPanel; }
/// Activates widgets by preselection if it is accepted. Emits signal if the activation is correct
/// then this variable has to be initialised by parent feature
/// before operation feature creating
void setParentFeature(CompositeFeaturePtr theParent) { myParentFeature = theParent; }
+
+ /// \return Installed parent feature (can be NULL)
CompositeFeaturePtr parentFeature() const { return myParentFeature; }
signals:
- void started(); /// the operation is started
- void aborted(); /// the operation is aborted
- void committed(); /// the operation is committed
- void stopped(); /// the operation is aborted or committed
- void resumed(); /// the operation is resumed
- void postponed(); /// the operation is postponed
- void activatedByPreselection(); /// the operation is filled with existing preselection
+ /// The operation is started
+ void started();
+
+ /// The operation is aborted
+ void aborted();
+
+ /// The operation is committed
+ void committed();
+
+ /// The operation is aborted or committed
+ void stopped();
+
+ /// The operation is resumed
+ void resumed();
+
+ /// The operation is postponed
+ void postponed();
+
+ /// The operation is filled with existing preselection
+ void activatedByPreselection();
public slots:
/// Starts operation
/// \param theState th flag to abort, if it is true, do nothing, overwise abort
void setRunning(bool theState);
- // Data model methods.
- /// Stores a custom value in model.
- //virtual void storeCustomValue();
-
- /// Slots which listen the mode widget activation
- /// \param theWidget the model widget
- //virtual void onWidgetActivated(ModuleBase_ModelWidget* theWidget);
-
protected:
/// Virtual method called when operation started (see start() method for more description)
/// Default impl calls corresponding slot and commits immediately.
/// Creates an operation new feature
/// \param theFlushMessage the flag whether the create message should be flushed
- /// \param theCompositeFeature the feature that must be used for adding the created object or null
- /// \returns the created
+ /// \returns the created feature
virtual FeaturePtr createFeature(const bool theFlushMessage = true);
/// Verifies whether this operator can be commited.
/// Returns pointer to the root document.
std::shared_ptr<ModelAPI_Document> document() const;
- /// Set value to the active widget
- /// \param theFeature the feature
- /// \param theX the horizontal coordinate
- /// \param theY the vertical coordinate
- /// \return true if the point is set
- //virtual bool setWidgetValue(ObjectPtr theFeature, double theX, double theY);
-
/// Return a widget value point by the selection and the viewer position
/// The default realization returns false
/// \param thePrs the presentation
ModuleBase_IViewer* theViewer,
double& theX, double& theY);
- // Removes the preselection information and clears the map of preselection
+ /// Removes the preselection information and clears the map of preselection
void clearPreselection();
protected:
- FeaturePtr myFeature; /// the operation feature to be handled
+ /// The operation feature to be handled
+ FeaturePtr myFeature;
/// the container to have the operation description
ModuleBase_OperationDescription* myDescription;
class QLabel;
class QTimer;
+/**
+* A class of property panel widget for double value input
+* It can be defined with "doublevalue" keyword. For example:
+* "<doublevalue id="x" label="X:" icon=":pictures/x_point.png" tooltip="X coordinate"/>"
+*/
class MODULEBASE_EXPORT ModuleBase_WidgetDoubleValue : public ModuleBase_ModelWidget
{
Q_OBJECT
public:
/// Constructor
- /// \theParent the parent object
- /// \theData the widget configuation. The attribute of the model widget is obtained from
+ /// \param theParent the parent object
+ /// \param theData the widget configuation. The attribute of the model widget is obtained from
+ /// \param theParentId is Id of a parent structure (widget, operation, group)
ModuleBase_WidgetDoubleValue(QWidget* theParent, const Config_WidgetAPI* theData,
const std::string& theParentId);
virtual ~ModuleBase_WidgetDoubleValue();
- /// Saves the internal parameters to the given feature
- /// \param theObject a model feature to be changed
+ //! Saves the internal parameters to the given feature
+ // \return True in success
virtual bool storeValue() const;
+ //! Read value of corresponded attribute from data model to the input control
+ // \return True in success
virtual bool restoreValue();
/// Returns list of widget controls
}
public slots:
- /// Delayed value chnged: when user starts typing something,
+ // Delayed value chnged: when user starts typing something,
// it gives him a 0,5 second to finish typing, when sends valueChnaged() signal
// void onValueChanged();
protected:
+ /// Container for thw widget controls
QWidget* myContainer;
+
+ /// Label of the widget
QLabel* myLabel;
+
+ /// Input value control
ModuleBase_DoubleSpinBox* mySpinBox;
};
}
}
+/**
+* Class for preferences management
+*/
class NewGeom_PrefMgr: public ModuleBase_IPrefMgr
{
public:
+ /// Constructor
+ /// \param theMgr preferences manager of SALOME
+ /// \param theModName name of the module
NewGeom_PrefMgr(LightApp_Preferences* theMgr, const QString& theModName):myMgr(theMgr), myModName(theModName) {}
virtual int addPreference(const QString& theLbl, int pId,
virtual ~NewGeom_Module();
//----- LightAPP_Module interface ---------------
+
+ /// \brief Initializing of the module
+ /// \param theApp application instance
virtual void initialize(CAM_Application* theApp);
+
+ /// \brief Definition of module standard windows
virtual void windows(QMap<int, int>& theWndMap) const;
+
+ /// \brief Definition of module viewer
virtual void viewManagers(QStringList& theList) const;
+
+ /// \brief The method is called on selection changed event
virtual void selectionChanged();
//--- XGUI connector interface -----
+
virtual QAction* addFeature(const QString& theWBName, const QString& theId,
const QString& theTitle, const QString& theTip, const QIcon& theIcon,
const QKeySequence& theKeys = QKeySequence(),
//! Returns list of Ids of defined actions (just by NewGeom module)
virtual QStringList commandIdList() const;
+ /// Redefinition of virtual function.
+ /// \param theClient name of pop-up client
+ /// \param theMenu popup menu instance
+ /// \param theTitle menu title.
virtual void contextMenuPopup(const QString& theClient, QMenu* theMenu, QString& theTitle);
+ /// Redefinition of virtual function for preferences creation.
virtual void createPreferences();
- virtual void preferencesChanged(const QString& theSection, const QString& theParam);
+ /// Redefinition of virtual function for preferences changed event.
+ virtual void preferencesChanged(const QString& theSection, const QString& theParam);
+
+ /// \return Workshop class instance
XGUI_Workshop* workshop() const { return myWorkshop; }
+ /// \brief Set flag about opened document state
void setIsOpened(bool theOpened) { myIsOpened = theOpened; }
+ /// Register current modules of SALOME
void inspectSalomeModules();
public slots:
+ /// \brief The method is called on the module activation
+ /// \param theStudy current study
virtual bool activateModule(SUIT_Study* theStudy);
+
+ /// \brief The method is called on the module activation
+ /// \param theStudy current study
virtual bool deactivateModule(SUIT_Study* theStudy);
protected slots:
+ /// Redefinition of virtual function
+ /// \param theMgr view manager
virtual void onViewManagerAdded(SUIT_ViewManager* theMgr);
+
+ /// Redefinition of virtual function
+ /// \param theMgr view manager
virtual void onViewManagerRemoved(SUIT_ViewManager* theMgr);
+ /// Set preferences to default
void onDefaultPreferences();
- // Obtains the current application and updates its actions
+
+ /// Obtains the current application and updates its actions
void onUpdateCommandStatus();
protected:
+ /// Create data model
CAM_DataModel* createDataModel();
+
+ /// Create popup menu manager
virtual QtxPopupMgr* popupMgr();
private:
+ /// Create selector for OCC Viewer
+ /// \param theMgr view manager
NewGeom_OCCSelector* createSelector(SUIT_ViewManager* theMgr);
+ /// List of registered actions
QStringList myActionsList;
+ /// Reference to workshop
XGUI_Workshop* myWorkshop;
+ /// OCC viewer selector instance
NewGeom_OCCSelector* mySelector;
+ /// Proxy viewer for connection to OCC Viewer in SALOME
NewGeom_SalomeViewer* myProxyViewer;
+ /// Map of nested actions [ActionID: list of nested actions Id]
QMap<QString, QStringList> myNestedActions;
+
+ /// Map of document types
QMap<QString, QString> myDocumentType;
+ /// Flag of opened document state
bool myIsOpened;
+
// the next parameters should be restored after this module deactivation
- bool myIsStorePositions; // the application value of the preferences parameter
- bool myIsEditEnabled; // the application value
+ /// The application value of the preferences parameter
+ bool myIsStorePositions;
+
+ /// The application value
+ bool myIsEditEnabled;
+
+ /// Popup manager
QtxPopupMgr* myPopupMgr;
};
class XGUI_EXPORT XGUI_Displayer
{
public:
- enum DisplayMode { NoMode = -1, Wireframe, Shading };
+ /// Enumeration of possible display mode
+ enum DisplayMode {
+ NoMode = -1, /// Mode is not defined
+ Wireframe, /// Wireframe display mode
+ Shading /// Shading display mode
+ };
/// Constructor
- /// \param theViewer the viewer
+ /// \param theWorkshop a workshop instance
XGUI_Displayer(XGUI_Workshop* theWorkshop);
+
/// Destructor
virtual ~XGUI_Displayer();
/// Returns the feature visibility state.
- /// \param theFeature a feature instance
+ /// \param theObject an object instance
bool isVisible(ObjectPtr theObject) const;
/// Display the feature. Obtain the visualized object from the feature.
- /// \param theFeature a feature instance
+ /// \param theObject an object to display
/// \param isUpdateViewer the parameter whether the viewer should be update immediatelly
/// Returns true if the Feature succesfully displayed
void display(ObjectPtr theObject, bool isUpdateViewer = true);
/// Display the given AIS object. To hide this object use corresponde erase method
+ /// \param theAIS AIOS object to display
+ /// \param isUpdate the parameter whether the viewer should be update immediatelly
void displayAIS(AISObjectPtr theAIS, bool isUpdate = true);
/**
* Add presentations which corresponds to the given features to current selection
* \param theFeatures a list of features to be selected
- * isUpdateViewer the parameter whether the viewer should be update immediatelly
+ * \param isUpdateViewer the parameter whether the viewer should be update immediatelly
*/
void setSelected(const QObjectPtrList& theFeatures, bool isUpdateViewer = true);
- /// Un select all objects
+ /// Unselect all objects
void clearSelected();
/// Erase the feature and a shape.
- /// \param theFeature a feature instance
+ /// \param theObject an object instance
/// \param isUpdateViewer the parameter whether the viewer should be update immediatelly
void erase(ObjectPtr theObject, const bool isUpdateViewer = true);
/// Erase the given AIS object displayed by corresponded display method
+ /// \param theAIS instance of AIS object
+ /// \param isUpdate the parameter whether the viewer should be update immediatelly
void eraseAIS(AISObjectPtr theAIS, const bool isUpdate = true);
/// Erase all presentations
/// \param isUpdateViewer the parameter whether the viewer should be update immediatelly
void closeLocalContexts(const bool isUpdateViewer = true);
+ /// \brief Add selection filter
+ /// \param theFilter a filter instance
void addSelectionFilter(const Handle(SelectMgr_Filter)& theFilter);
+ /// \brief Remove selection filter
+ /// \param theFilter a filter instance
void removeSelectionFilter(const Handle(SelectMgr_Filter)& theFilter);
+ /// Remove all selection filters
void removeFilters();
/**
void updateViewer();
/// Searches the interactive object by feature
- /// \param theFeature the object or presentable feature
+ /// \param theObject the object or presentable feature
/// \return theIO an interactive object
- AISObjectPtr getAISObject(ObjectPtr theFeature) const;
+ AISObjectPtr getAISObject(ObjectPtr theObject) const;
/// Searches the feature by interactive object
/// \param theIO an interactive object
/// \return feature the feature or NULL if it not visualized
ObjectPtr getObject(const AISObjectPtr& theIO) const;
+
+ /// Searches the feature by interactive object
+ /// \param theIO an interactive object
+ /// \return corresponded object or NULL if it not found
ObjectPtr getObject(const Handle(AIS_InteractiveObject)& theIO) const;
/// Deactivates the given object (not allow selection)
- void deactivate(ObjectPtr theFeature);
+ /// \param theObject object to deactivate
+ void deactivate(ObjectPtr theObject);
/// Activates the given object (it can be selected)
+ /// \param theObject object to activate
/// \param theModes - modes on which it has to be activated (can be empty)
- void activate(ObjectPtr theFeature, const QIntList& theModes);
+ void activate(ObjectPtr theObject, const QIntList& theModes);
/// Returns the modes of activation
- /// \param theFeature the feature or NULL if it not visualized
+ /// \param theObject the feature or NULL if it not visualized
/// \param theModes - modes on which it is activated (can be empty)
void getModesOfActivation(ObjectPtr theObject, QIntList& theModes);
/// Activates the given object with default modes
- void activate(ObjectPtr theFeature);
+ /// \param theObject object to activate
+ void activate(ObjectPtr theObject);
/// Returns true if the given object can be selected
+ /// \param theObject object to check
bool isActive(ObjectPtr theObject) const;
/// Activates in local context displayed outside of the context.
/// Returns current display mode for the given object.
/// If object is not dis played then returns NoMode.
+ /// \param theObject object to check
DisplayMode displayMode(ObjectPtr theObject) const;
-
/// Displays only objects listed in the list
+ /// \param theList list of objects
void showOnly(const QObjectPtrList& theList);
/// Returns number of displayed objects
int objectsCount() const { return myResult2AISObjectMap.size(); }
+ /// Returns list of displayed objects
QObjectPtrList displayedObjects() const { return myResult2AISObjectMap.keys(); }
/// Returns true if the given object can be shown in shaded mode
+ /// \param theObject object to check
bool canBeShaded(ObjectPtr theObject) const;
protected:
Handle(SelectMgr_AndFilter) GetFilter();
/// Display the feature and a shape. This shape would be associated to the given feature
- /// \param theFeature a feature instance
+ /// \param theObject an object instance
/// \param theAIS AIS presentation
+ /// \param isShading flag to show in shading mode
/// \param isUpdateViewer the parameter whether the viewer should be update immediatelly
- /// Returns true if the Feature succesfully displayed
+ /// \return true if the object is succesfully displayed
void display(ObjectPtr theObject, AISObjectPtr theAIS, bool isShading,
bool isUpdateViewer = true);
- /// Display the shape and activate selection of sub-shapes
- /// \param theFeature a feature instance
- /// \param theAIS an AIS object
- /// \param isUpdateViewer the parameter whether the viewer should be update immediatelly
- /// \returns true if the presentation is created
- //bool redisplay(ObjectPtr theObject,
- // AISObjectPtr theAIS,
- // const bool isUpdateViewer = true);
-
/** Redisplay the shape if it was displayed
- * \param theFeature a feature instance
+ * \param theObject an object instance
* \param isUpdateViewer the parameter whether the viewer should be update immediatelly
*/
void redisplay(ObjectPtr theObject, bool isUpdateViewer = true);
void openLocalContext();
protected:
+ /// Reference to workshop
XGUI_Workshop* myWorkshop;
+ /// A container for selection filters
Handle(SelectMgr_AndFilter) myAndFilter;
+ /// Definition of a type of map which defines correspondance between objects and presentations
typedef QMap<ObjectPtr, AISObjectPtr> ResultToAISMap;
+
+ /// A map of displayed objects
ResultToAISMap myResult2AISObjectMap;
- // A flag of initialization of external objects selection
- //bool myUseExternalObjects;
- // Selection modes installed for external objects in local context
+ /// Selection modes installed for external objects in local context
QIntList myActiveSelectionModes;
- bool myEnableUpdateViewer; /// the enable update viewer flag
+ /// the enable update viewer flag
+ bool myEnableUpdateViewer;
};
#endif
class QKeyEvent;
class QVBoxLayout;
+/// Internal name of property panel widget
const static char* PROP_PANEL = "property_panel_dock";
+
+/// Internal name of Ok button
const static char* PROP_PANEL_OK = "property_panel_ok";
+
+/// Internal name of Cancel button
const static char* PROP_PANEL_CANCEL = "property_panel_cancel";
+/**
+* Realization of Property panel object.
+*/
class XGUI_EXPORT XGUI_PropertyPanel : public ModuleBase_IPropertyPanel
{
Q_OBJECT
public:
-
+ /// Constructor
+ /// \param theParent is a parent of the property panel
XGUI_PropertyPanel(QWidget* theParent);
+
virtual ~XGUI_PropertyPanel();
/// Returns main widget of the property panel, which children will be created
/// Activate the next from current widget in the property panel
virtual void activateNextWidget();
+ /// \brief Enable/Disable stretch area in the panel
void setStretchEnabled(bool isEnabled);
/// Set Enable/Disable state of Ok button
+ /// \param theEnabled Enable/Disable state of Ok button
virtual void setOkEnabled(bool theEnabled);
- /// Returns state of Ok button
+ /// \return Enable/disable state of Ok button
virtual bool isOkEnabled() const;
- /// Set Enable/Disable state of Ok button
+ /// Set Enable/Disable state of Cancel button
+ /// \param theEnabled Enable/Disable state of Cancel button
virtual void setCancelEnabled(bool theEnabled);
- /// Returns state of Ok button
+ /// \return Enable/Disable state of Cancel button
virtual bool isCancelEnabled() const;
/// Editing mode depends on mode of current operation. This value is defined by it.
+ /// \param isEditing state of editing mode flag
virtual void setEditingMode(bool isEditing);
public slots:
+
+ /// \brief Update all widgets in property panel with values from the given feature
+ /// \param theFeature a Feature to update values in widgets
void updateContentWidget(FeaturePtr theFeature);
- // Enables / disables "ok" ("accept") button
- void setAcceptEnabled(bool);
- // Makes the given widget active, highlights it and removes
- // highlighting from the previous active widget
- // emits widgetActivated(theWidget) signal
+ /// Enables / disables "ok" ("accept") button
+ /// \param toEnable enable/disable state of button
+ void setAcceptEnabled(bool toEnable);
+
+ /**
+ * Makes the given widget active, highlights it and removes
+ * highlighting from the previous active widget
+ * emits widgetActivated(theWidget) signal
+ * \param theWidget which has to be activated
+ */
virtual void activateWidget(ModuleBase_ModelWidget* theWidget);
private:
QWidget* myCustomWidget;
QList<ModuleBase_ModelWidget*> myWidgets;
QVBoxLayout* myMainLayout;
+
+ /// Currently active widget
ModuleBase_ModelWidget* myActiveWidget;
};