Salome HOME
[bos #40644][CEA](2024-T1) Feature search.
[modules/gui.git] / src / Qtx / QtxPagePrefMgr.cxx
index b81bcfb19d7b9e654fa316390ffc01092352c936..a561c46a4c9eec16eeb9c4ea9bcbb4059b7cac64 100644 (file)
 #include "QtxColorButton.h"
 #include "QtxBiColorTool.h"
 #include "QtxDoubleSpinBox.h"
-#include "QtxShortcutEdit.h"
 #include "QtxBackgroundTool.h"
 #include "QtxResourceMgr.h"
 
-#include "SUIT_ShortcutMgr.h"
-
 #include <QEvent>
 #include <QLayout>
 #include <QToolBox>
@@ -4457,67 +4454,6 @@ void QtxPagePrefDateTimeItem::updateDateTime()
 }
 
 
-/*!
-  \brief Creates preference item for editing of key bindings
-  \param theParent parent preference item. Must not be nullptr.
-*/
-QtxPagePrefShortcutTreeItem::QtxPagePrefShortcutTreeItem(QtxPreferenceItem* theParent)
- : QtxPagePrefItem(QString(), theParent)
-{
-  auto container = std::shared_ptr<SUIT_ShortcutContainer>();
-  const auto itContainers = QtxPagePrefShortcutTreeItem::shortcutContainers.find(rootItem());
-  if (itContainers == QtxPagePrefShortcutTreeItem::shortcutContainers.end()) {
-    container.reset(new SUIT_ShortcutContainer());
-    QtxPagePrefShortcutTreeItem::shortcutContainers.emplace(rootItem(), container);
-  }
-  else {
-    container = itContainers->second.lock();
-    if (!container) {
-      container.reset(new SUIT_ShortcutContainer());
-      itContainers->second = container;
-    }
-  }
-
-  QtxShortcutTree* tree = new QtxShortcutTree(container);
-  tree->myModuleIDs = SUIT_ShortcutMgr::get()->getShortcutModuleIDs();
-  setWidget(tree);
-}
-
-/*!
-  \brief Retrieves shortcut preferences from ShortcutMgr.
-  Updates UI of controlling widget.
-  \sa store()
-*/
-void QtxPagePrefShortcutTreeItem::retrieve()
-{
-  static_cast<QtxShortcutTree*>(widget())->setShortcutsFromManager();
-}
-
-/*!
-  \brief Retrieves shortcut preferences from resource files, ignoring user preferences.
-  Updates UI of controlling widget.
-  \sa store()
-*/
-void QtxPagePrefShortcutTreeItem::retrieveDefault()
-{
-  static_cast<QtxShortcutTree*>(widget())->setDefaultShortcuts();
-}
-
-/*!
-  \brief Applies modified shortcut preferences to ShortcutMgr.
-  Updates UI of controlling widget.
-  And ShortcutMgr, in turn, serilizes shortcut preferences using the resource manager.
-  \sa retrieve()
-*/
-void QtxPagePrefShortcutTreeItem::store()
-{
-  static_cast<QtxShortcutTree*>(widget())->applyChangesToShortcutMgr();
-}
-
-/*static*/ std::map<QtxPreferenceItem*, std::weak_ptr<SUIT_ShortcutContainer>> QtxPagePrefShortcutTreeItem::shortcutContainers =
-std::map<QtxPreferenceItem*, std::weak_ptr<SUIT_ShortcutContainer>>();
-
-
 /*!
   \class QtxPagePrefBackgroundItem
   \brief GUI implementation of the resources item to store background data.