#define HYDROGUI_OPERATION_H
#include <LightApp_Operation.h>
+#include <Standard_DefineHandle.hxx>
+#include <QCursor>
class HYDROGUI_Module;
class HYDROGUI_InputPanel;
class SUIT_SelectionMgr;
class OCCViewer_ViewManager;
-class Handle_HYDROData_Document;
-class Handle_HYDROData_Object;
+class HYDROData_Document;
+class HYDROData_Object;
class HYDROGUI_Operation : public LightApp_Operation
{
void abortDocOperation();
void commitDocOperation();
- Handle_HYDROData_Document doc() const;
+ Handle(HYDROData_Document) doc() const;
virtual bool isToAbortOnApply() const { return true; }
void printErrorMessage( const QString& theErrorMsg );
void setPrintErrorMessage( const bool theIsPrint );
- void browseObjects( const QStringList& theBrowseObjectsEntries );
+ void browseObjects( const QStringList& theBrowseObjectsEntries,
+ const bool theIsApplyAndClose = true );
protected slots:
+ virtual void onApplyAndClose();
virtual void onApply();
virtual void onCancel();
virtual void onHelp();
OCCViewer_ViewManager* getPreviewManager();
void setPreviewManager( OCCViewer_ViewManager* theManager );
+ /**
+ * Set specific cursor chosen in preferences for edition operations.
+ */
+ virtual void setCursor();
+ /**
+ * Restore the default cursor.
+ */
+ virtual void restoreCursor();
+
+ /**
+ * Set flag indicating, if 'Apply and Close' button is clicked on input panel.
+ * @param theFlag a flag value to be set
+ */
+ virtual void setIsApplyAndClose( const bool theFlag );
+ /**
+ * Get flag indicating, if 'Apply and Close' button is clicked on input panel.
+ * \return a flag value
+ */
+ virtual bool isApplyAndClose() const;
+
+ /**
+ * Apply changes done by this operation.
+ */
+ virtual void apply();
+
private:
HYDROGUI_Module* myModule;
bool myIsPrintErrorMessage;
bool myIsTransactionOpened;
int myPreviewZLayer;
+
+ QCursor myCursor;
+
+ bool myIsApplyAndClose;
};
#endif