Version: 9.15.0
SUIT_FoundActionTree Class Reference

#include <SUIT_FindActionDialog.h>

Inheritance diagram for SUIT_FoundActionTree:
Inheritance graph

Public Types

enum  ColumnIdx { Name , ToolTip , KeySequence }
 
enum class  SortKey {
  MatchMetrics , ID , Name , ToolTip ,
  KeySequence
}
 

Public Member Functions

 SUIT_FoundActionTree (SUIT_FindActionWidget *theParent, const QString &theActionItemToolTip, bool theEnableItemsOfUnavailableActions=false, bool theShowKeySequenceColumn=false, const std::function< std::pair< QString, bool >(const QString &, const QString &)> &theKeySequenceGetter=std::function< std::pair< QString, bool >(const QString &, const QString &)>())
 
 SUIT_FoundActionTree (const SUIT_FoundActionTree &)=delete
 
SUIT_FoundActionTreeoperator= (const SUIT_FoundActionTree &)=delete
 
virtual ~SUIT_FoundActionTree ()=default
 
void updateItems (const std::map< QString, std::map< QString, SUIT_ActionSearcher::AssetsAndSearchData >> &theActionAssetsAndSD)
 
void sort (SUIT_FoundActionTree::SortKey theKey, Qt::SortOrder theOrder)
 
void keyPressEvent (QKeyEvent *theEvent)
 

Static Public Member Functions

static std::pair< QString, bool > getKeySequenceFromShortcutMgr (const QString &theModuleID, const QString &theInModuleActionID)
 Default key sequence getter. More...
 

Public Attributes

const QString myActionItemToolTip
 
const bool myEnableItemsOfUnavailableActions
 
const bool myShowKeySequenceColumn
 
const std::function< std::pair< QString, bool >const QString &, const QString &)> myKeySequenceGetter
 std::pair<QString, bool> getKeySequence(theModuleID, theInModuleActionID). More...
 

Static Public Attributes

static const QList< std::pair< SUIT_FoundActionTree::SortKey, Qt::SortOrder > > DEFAULT_SORT_SCHEMA
 

Protected Member Functions

bool eventFilter (QObject *theQObject, QEvent *theEvent)
 

Private Slots

void onItemExecuted (QTreeWidgetItem *theWidgetItem, int theColIdx)
 

Private Member Functions

std::pair< SUIT_FoundActionTreeModule *, int > findModuleItem (const QString &theModuleID) const
 
std::set< SUIT_FoundActionTreeAction *, std::function< bool(SUIT_FoundActionTreeAction *, SUIT_FoundActionTreeAction *)> > createActionSetWithComparator () const
 

Private Attributes

SUIT_FoundActionTree::SortKey mySortKey
 
Qt::SortOrder mySortOrder
 
std::map< QString, bool > myModuleItemExpansionStates
 {moduleID, isExpanded}[] More...
 

Member Enumeration Documentation

◆ ColumnIdx

Enumerator
Name 
ToolTip 
KeySequence 

◆ SortKey

Enumerator
MatchMetrics 
ID 
Name 
ToolTip 
KeySequence 

Constructor & Destructor Documentation

◆ SUIT_FoundActionTree() [1/2]

SUIT_FoundActionTree::SUIT_FoundActionTree ( SUIT_FindActionWidget theParent,
const QString &  theActionItemToolTip,
bool  theEnableItemsOfUnavailableActions = false,
bool  theShowKeySequenceColumn = false,
const std::function< std::pair< QString, bool >(const QString &, const QString &)> &  theKeySequenceGetter = std::function<std::pair<QString, bool>(const QString&, const QString&)>() 
)
Parameters
theKeySequenceGetterIf default or empty, SUIT_FoundActionTree::getKeySequenceFromShortcutMgr is used.

References MatchMetrics, myShowKeySequenceColumn, mySortKey, mySortOrder, and onItemExecuted().

◆ SUIT_FoundActionTree() [2/2]

SUIT_FoundActionTree::SUIT_FoundActionTree ( const SUIT_FoundActionTree )
delete

◆ ~SUIT_FoundActionTree()

virtual SUIT_FoundActionTree::~SUIT_FoundActionTree ( )
virtualdefault

Member Function Documentation

◆ createActionSetWithComparator()

std::set< SUIT_FoundActionTreeAction *, std::function< bool(SUIT_FoundActionTreeAction *, SUIT_FoundActionTreeAction *)> > SUIT_FoundActionTree::createActionSetWithComparator ( ) const
private

◆ eventFilter()

bool SUIT_FoundActionTree::eventFilter ( QObject theQObject,
QEvent theEvent 
)
protected

References keyPressEvent().

◆ findModuleItem()

std::pair< SUIT_FoundActionTreeModule *, int > SUIT_FoundActionTree::findModuleItem ( const QString &  theModuleID) const
private

◆ getKeySequenceFromShortcutMgr()

std::pair< QString, bool > SUIT_FoundActionTree::getKeySequenceFromShortcutMgr ( const QString &  theModuleID,
const QString &  theInModuleActionID 
)
static

Default key sequence getter.

Returns
{keySequence, false}

References SUIT_ShortcutMgr::get().

◆ keyPressEvent()

void SUIT_FoundActionTree::keyPressEvent ( QKeyEvent *  theEvent)

References onItemExecuted().

◆ onItemExecuted

void SUIT_FoundActionTree::onItemExecuted ( QTreeWidgetItem theWidgetItem,
int  theColIdx 
)
privateslot

◆ operator=()

SUIT_FoundActionTree& SUIT_FoundActionTree::operator= ( const SUIT_FoundActionTree )
delete

◆ sort()

void SUIT_FoundActionTree::sort ( SUIT_FoundActionTree::SortKey  theKey,
Qt::SortOrder  theOrder 
)

◆ updateItems()

Member Data Documentation

◆ DEFAULT_SORT_SCHEMA

const QList< std::pair< SUIT_FoundActionTree::SortKey, Qt::SortOrder > > SUIT_FoundActionTree::DEFAULT_SORT_SCHEMA
static

◆ myActionItemToolTip

const QString SUIT_FoundActionTree::myActionItemToolTip

◆ myEnableItemsOfUnavailableActions

const bool SUIT_FoundActionTree::myEnableItemsOfUnavailableActions

◆ myKeySequenceGetter

const std::function<std::pair<QString, bool>const QString&, const QString&)> SUIT_FoundActionTree::myKeySequenceGetter

std::pair<QString, bool> getKeySequence(theModuleID, theInModuleActionID).

Returns true, if KeySequence column of an action item must be styled as modified.

◆ myModuleItemExpansionStates

std::map<QString, bool> SUIT_FoundActionTree::myModuleItemExpansionStates
private

{moduleID, isExpanded}[]

◆ myShowKeySequenceColumn

const bool SUIT_FoundActionTree::myShowKeySequenceColumn

◆ mySortKey

SUIT_FoundActionTree::SortKey SUIT_FoundActionTree::mySortKey
private

◆ mySortOrder

Qt::SortOrder SUIT_FoundActionTree::mySortOrder
private

The documentation for this class was generated from the following files: