#include <ModelAPI_Document.h>
#include <ModelAPI_Feature.h>
+#include <ModuleBase_ActionInfo.h>
+
#include <QObject>
#include <QMap>
#include <QKeySequence>
//! Delete features
void deleteObjects(const QObjectPtrList& theList);
+ //! Returns true if there is at least one selected body/construction/group result
+ //! \return boolean value
+ bool canChangeColor() const;
+
+ //! Change color of the features if it is possible
+ //! The operation is available for construction, body and group results
+ //! theObjects a list of selected objects
+ void changeColor(const QObjectPtrList& theObjects);
+
//! Show the given features in 3d Viewer
void showObjects(const QObjectPtrList& theList, bool isVisible);
//! the application is started
void applicationStarted();
- void updateUndoHistory(const QList<QAction*>&);
- void updateRedoHistory(const QList<QAction*>&);
+ //! Signal to update Undo history list
+ void updateUndoHistory(const QList<ActionInfo>&);
+ //! Signal to update Redo history list
+ void updateRedoHistory(const QList<ActionInfo>&);
public slots:
/// Update of commands status
/// \param isChecked a state of toggle if the action is checkable
void onContextMenuCommand(const QString& theId, bool isChecked);
- /// Processing of values changed in model widget
- void onWidgetValuesChanged();
-
/// Set waiting cursor
void onStartWaiting();
/// Displaus object and fit all viewer if the object is first (update viewer will not be called)
void displayObject(ObjectPtr theObj);
+ //! Extends undo/redo toolbutton's with history menu
+ //! \param theObject - in the OpenParts it is a QToolButton by itself,
+ //! in salome mode - QAction that creates a button.
+ //! \param theSignal - void "updateUndoHistory" or "updateRedoHistory" SIGNAL;
+ //! \param theSlot - onUndo(int) or onRedo(int) SLOT
+ void addHistoryMenu(QObject* theObject, const char* theSignal, const char* theSlot);
+
+ //! Creates list of actions (commands) by given history list from session
+ QList<ActionInfo> processHistoryList(const std::list<std::string>&) const;
+
private:
AppElements_MainWindow* myMainWindow;
ModuleBase_IModule* myModule;