+
+QList<ActionInfo>
+ ModuleBase_WidgetMultiSelector::actionsList(ModuleBase_ActionType theActionType) const
+{
+ QList<ActionInfo> aList;
+ if (myCurrentHistoryIndex > -1) {
+ int i = 0;
+ QString aTitle("Selection %1 items");
+ QString aTit("Selection %1 item");
+ QIcon aIcon(":pictures/selection.png");
+ int aNb;
+ switch (theActionType) {
+ case ActionUndo:
+ i = 1;
+ while (i <= myCurrentHistoryIndex) {
+ aNb = mySelectedHistoryValues.at(i).count();
+ if (aNb == 1) {
+ ActionInfo aInfo(aIcon, aTit.arg(aNb));
+ aList.insert(0, aInfo);
+ } else {
+ ActionInfo aInfo(aIcon, aTitle.arg(aNb));
+ aList.insert(0, aInfo);
+ }
+ i++;
+ }
+ break;
+ case ActionRedo:
+ i = mySelectedHistoryValues.length() - 1;
+ while (i > myCurrentHistoryIndex) {
+ aNb = mySelectedHistoryValues.at(i).count();
+ if (aNb == 1) {
+ ActionInfo aInfo(aIcon, aTit.arg(mySelectedHistoryValues.at(i).count()));
+ aList.insert(0, aInfo);
+ } else {
+ ActionInfo aInfo(aIcon, aTitle.arg(mySelectedHistoryValues.at(i).count()));
+ aList.insert(0, aInfo);
+ }
+ i--;
+ }
+ break;
+ }
+ }
+ return aList;
+}
\ No newline at end of file