#include <QObject>
#include <QString>
-#include <memory>
+#include <boost/shared_ptr.hpp>
class SUIT_Study;
class XGUI_Workshop;
enum OperationState
{
Waiting, //!< Operation is not used (it is not run or suspended)
- Running, //!< Operation is started
+ Running //!< Operation is started
};
/*!
// Operation processing.
virtual QString operationId() const;
+ boost::shared_ptr<ModelAPI_Feature> feature() const;
+
OperationState state() const;
bool isRunning() const;
virtual bool isValid(ModuleBase_Operation* theOtherOp) const;
int execStatus() const;
- // Widget processing.
- const QString& xmlRepresentation() const;
- void setXmlRepresentation(const QString& xmlRepr);
-
signals:
void started();
void aborted();
public slots:
void start();
+ void resume();
void abort();
void commit();
+ //true = do nothing, false = abort()
+ //Provided for S/S compatibility with QAction's toggle(bool)
+ void setRunning(bool);
+
// Data model operations.
void storeReal(double);
+ // Data model operations.
+ void storeCustomValue();
+
protected:
virtual bool isReadyToStart() const;
void setExecStatus(const int);
void setState(const OperationState);
- std::shared_ptr<ModelAPI_Document> document() const;
+ boost::shared_ptr<ModelAPI_Document> document() const;
private:
int myFlags; //!< Operation flags
//!< Next fields could be extracted into a subclass;
QString myOperationId;
- QString myXmlRepr;
- std::shared_ptr<ModelAPI_Feature> myFeature;
+ boost::shared_ptr<ModelAPI_Feature> myFeature;
};
#endif