23 #ifndef SUIT_FINDACTIONDIALOG_H
24 #define SUIT_FINDACTIONDIALOG_H
30 #include <QTreeWidget>
63 void executeAction(
const QString& theModuleID,
const QString& theInModuleActionID);
77 const std::function<
void(
const QString&,
const QString&)> theCallback,
78 const QString& theActionItemToolTip,
79 bool theEnableItemsOfUnavailableActions =
false,
80 bool theShowKeySequenceColumn =
false,
81 const std::function<std::pair<QString, bool>(
const QString&,
const QString&)>& theKeySequenceGetter = std::function<std::pair<QString, bool>(
const QString&,
const QString&)>()
87 void showOptions(
bool theToShow);
90 void setIncludedModuleIDs(
const std::set<QString>& theModuleIDs = {},
bool doNotUpdateResults =
false);
91 const std::set<QString>& getIncludedModuleIDs()
const;
95 void setColumnWidth(
int theColumnIdx,
int theColumnWidth);
98 void onQueryChanged(
const QString& theKeyword);
99 void onSearchOptionUnavailableActionsChanged(
int);
100 void onSearchOptionInactiveModulesChanged(
int);
113 const std::function<void(
const QString&,
const QString&)>
myCallback;
142 static std::pair<QString, bool> getKeySequenceFromShortcutMgr(
const QString& theModuleID,
const QString& theInModuleActionID);
146 const QString& theActionItemToolTip,
147 bool theEnableItemsOfUnavailableActions =
false,
148 bool theShowKeySequenceColumn =
false,
149 const std::function<std::pair<QString, bool>(
const QString&,
const QString&)>& theKeySequenceGetter = std::function<std::pair<QString, bool>(
const QString&,
const QString&)>()
155 void updateItems(
const std::map<QString, std::map<QString, SUIT_ActionSearcher::AssetsAndSearchData>>& theActionAssetsAndSD);
159 void keyPressEvent(QKeyEvent* theEvent);
165 std::pair<SUIT_FoundActionTreeModule*, int> findModuleItem(
const QString& theModuleID)
const;
203 QString
name()
const;
#define SUIT_EXPORT
Definition: SUIT.h:36
Action
Action of splitting corresponding to QtxWorkstack::SplitType enumeration.
Definition: SalomePyQt.h:143
For more information see QT documentation.
Definition: SUIT_Application.h:42
Definition: SUIT_ShortcutMgr.h:970
Searches in data, provided in action asset files and shortcut preferences.
Definition: SUIT_ShortcutMgr.h:960
Definition: SUIT_FindActionDialog.h:51
SUIT_FindActionDialog(const SUIT_FindActionDialog &)=delete
SUIT_FindActionWidget * myFindActionWidget
Definition: SUIT_FindActionDialog.h:66
virtual ~SUIT_FindActionDialog()=default
SUIT_FindActionDialog & operator=(const SUIT_FindActionDialog &)=delete
Definition: SUIT_FindActionDialog.h:229
void styleAsKeySequenceModified(bool theIsModified)
Definition: SUIT_FindActionDialog.cxx:598
bool isEnabledBufferedValue() const
Definition: SUIT_FindActionDialog.h:248
virtual SUIT_FoundActionTreeItem::Type type() const
Definition: SUIT_FindActionDialog.h:236
void setToolTip(const QString &theToolTip)
Definition: SUIT_FindActionDialog.cxx:571
double matchMetrics() const
Definition: SUIT_FindActionDialog.h:245
virtual bool isEnabled() const
Definition: SUIT_FindActionDialog.cxx:626
void setKeySequence(const QString &theKeySequence)
Definition: SUIT_FindActionDialog.cxx:588
virtual ~SUIT_FoundActionTreeAction()=default
const QString myInModuleActionID
Definition: SUIT_FindActionDialog.h:248
virtual QVariant getValue(SUIT_FoundActionTree::SortKey theKey) const
Definition: SUIT_FindActionDialog.cxx:608
void setAssetsAndSearchData(const SUIT_ActionSearcher::AssetsAndSearchData &theAssetsAndSD, const QString &theLang)
Definition: SUIT_FindActionDialog.cxx:560
SUIT_FoundActionTreeAction(const QString &theModuleID, const QString &theInModuleActionID)
Definition: SUIT_FindActionDialog.cxx:543
bool myIsEnabledBufferedValue
Definition: SUIT_FindActionDialog.h:254
double myMatchMetrics
Definition: SUIT_FindActionDialog.h:253
static SUIT_FoundActionTreeAction * create(const QString &theModuleID, const QString &theInModuleActionID)
Definition: SUIT_FindActionDialog.cxx:550
QString keySequence() const
Definition: SUIT_FindActionDialog.cxx:593
Definition: SUIT_FindActionDialog.h:189
SUIT_FoundActionTreeItem(const QString &theModuleID)
Definition: SUIT_FindActionDialog.cxx:490
Type
Definition: SUIT_FindActionDialog.h:191
@ Module
Definition: SUIT_FindActionDialog.h:192
virtual QVariant getValue(SUIT_FoundActionTree::SortKey theKey) const =0
virtual ~SUIT_FoundActionTreeItem()=default
virtual void styleAsDimmed()
Definition: SUIT_FindActionDialog.cxx:504
virtual SUIT_FoundActionTreeItem::Type type() const =0
QString name() const
Definition: SUIT_FindActionDialog.cxx:494
const QString myModuleID
Definition: SUIT_FindActionDialog.h:211
QString toolTip() const
Definition: SUIT_FindActionDialog.cxx:499
Definition: SUIT_FindActionDialog.h:216
void setAssets(const SUIT_ShortcutModuleAssets &theAssets, const QString &theLang)
Definition: SUIT_FindActionDialog.cxx:520
virtual QVariant getValue(SUIT_FoundActionTree::SortKey theKey) const
Definition: SUIT_FindActionDialog.cxx:526
SUIT_FoundActionTreeModule(const QString &theModuleID)
Definition: SUIT_FindActionDialog.cxx:511
virtual ~SUIT_FoundActionTreeModule()=default
virtual SUIT_FoundActionTreeItem::Type type() const
Definition: SUIT_FindActionDialog.h:220
Definition: SUIT_FindActionDialog.h:123
const bool myEnableItemsOfUnavailableActions
Definition: SUIT_FindActionDialog.h:180
ColumnIdx
Definition: SUIT_FindActionDialog.h:127
@ ToolTip
Definition: SUIT_FindActionDialog.h:129
@ Name
Definition: SUIT_FindActionDialog.h:128
SUIT_FoundActionTree::SortKey mySortKey
Definition: SUIT_FindActionDialog.h:172
const std::function< std::pair< QString, bool >const QString &, const QString &)> myKeySequenceGetter
std::pair<QString, bool> getKeySequence(theModuleID, theInModuleActionID).
Definition: SUIT_FindActionDialog.h:184
Qt::SortOrder mySortOrder
Definition: SUIT_FindActionDialog.h:173
SortKey
Definition: SUIT_FindActionDialog.h:133
SUIT_FoundActionTree(const SUIT_FoundActionTree &)=delete
SUIT_FoundActionTree & operator=(const SUIT_FoundActionTree &)=delete
const bool myShowKeySequenceColumn
Definition: SUIT_FindActionDialog.h:181
static const QList< std::pair< SUIT_FoundActionTree::SortKey, Qt::SortOrder > > DEFAULT_SORT_SCHEMA
Definition: SUIT_FindActionDialog.h:141
const QString myActionItemToolTip
Definition: SUIT_FindActionDialog.h:179
virtual ~SUIT_FoundActionTree()=default
std::map< QString, bool > myModuleItemExpansionStates
{moduleID, isExpanded}[]
Definition: SUIT_FindActionDialog.h:176
static const QString ROOT_MODULE_ID
Definition: SUIT_ShortcutMgr.h:494
GUI-related module assets.
Definition: SUIT_ShortcutMgr.h:294