QElectroTech 0.200.1-dev
Loading...
Searching...
No Matches
ShortcutsConfigPage Class Reference

The ShortcutsConfigPage class Configuration page listing every shortcut registered with ShortcutManager, letting the user rebind, reset and search them. Bindings are only persisted (via ShortcutManager::setSequence()) when applyConf() runs, i.e. when the user validates the surrounding ConfigDialog. More...

#include <shortcutsconfigpage.h>

Inheritance diagram for ShortcutsConfigPage:
Inheritance graph
Collaboration diagram for ShortcutsConfigPage:
Collaboration graph

Classes

struct  Row

Public Member Functions

 ShortcutsConfigPage (QWidget *parent=nullptr)
 ShortcutsConfigPage::ShortcutsConfigPage.
 ~ShortcutsConfigPage () override
void applyConf () override
 ShortcutsConfigPage::applyConf Persist every row's shortcut edit through ShortcutManager, which also applies it immediately to every currently live QAction sharing that id.
QString title () const override
QIcon icon () const override
Public Member Functions inherited from ConfigPage
 ConfigPage (QWidget *parent)
 ~ConfigPage () override
 Destructor.

Private Types

enum  QuickFilter { ShowAll = 0 , BoundOnly , UnboundOnly , ConflictsOnly }

Private Slots

void filterRows (const QString &filter_text)
 ShortcutsConfigPage::filterRows Re-run the combined text + quick filter whenever the search box changes.
void quickFilterChanged (int index)
 ShortcutsConfigPage::quickFilterChanged Re-run the combined text + quick filter whenever the quick filter changes.
void checkConflicts ()
 ShortcutsConfigPage::checkConflicts Highlight every row whose currently-edited sequence is shared, non-empty, with another row, and explain the conflict in the shortcut editor's tooltip.
void resetAllRows ()

Private Member Functions

void populateTable ()
 ShortcutsConfigPage::populateTable Fill the tree with one collapsible top-level node per category and one child per shortcut known to ShortcutManager, sorted by category then action name.
void applyFilter ()
 ShortcutsConfigPage::applyFilter Hide every row that doesn't match both the search box and the quick filter. The text query is split on whitespace and every term must match the category, action name or current sequence (accent- and case-insensitively). Matching category nodes are expanded so hits are not hidden inside collapsed groups, and the "N actions" label tracks how many actions remain visible.
void resetRow (int row_index)
 ShortcutsConfigPage::resetRow Reset the shortcut editor at row_index to its default sequence.

Private Attributes

QLineEdit * m_filter_edit
QComboBox * m_quick_filter
QLabel * m_count_label
QTreeWidget * m_tree
QList< Rowm_rows

Detailed Description

The ShortcutsConfigPage class Configuration page listing every shortcut registered with ShortcutManager, letting the user rebind, reset and search them. Bindings are only persisted (via ShortcutManager::setSequence()) when applyConf() runs, i.e. when the user validates the surrounding ConfigDialog.

Member Enumeration Documentation

◆ QuickFilter

Enumerator
ShowAll 
BoundOnly 
UnboundOnly 
ConflictsOnly 

Constructor & Destructor Documentation

◆ ShortcutsConfigPage()

ShortcutsConfigPage::ShortcutsConfigPage ( QWidget * parent = nullptr)
explicit

ShortcutsConfigPage::ShortcutsConfigPage.

Parameters
parent
Here is the call graph for this function:

◆ ~ShortcutsConfigPage()

ShortcutsConfigPage::~ShortcutsConfigPage ( )
override

Member Function Documentation

◆ applyConf()

void ShortcutsConfigPage::applyConf ( )
overridevirtual

ShortcutsConfigPage::applyConf Persist every row's shortcut edit through ShortcutManager, which also applies it immediately to every currently live QAction sharing that id.

Implements ConfigPage.

Here is the call graph for this function:

◆ applyFilter()

void ShortcutsConfigPage::applyFilter ( )
private

ShortcutsConfigPage::applyFilter Hide every row that doesn't match both the search box and the quick filter. The text query is split on whitespace and every term must match the category, action name or current sequence (accent- and case-insensitively). Matching category nodes are expanded so hits are not hidden inside collapsed groups, and the "N actions" label tracks how many actions remain visible.

Here is the caller graph for this function:

◆ checkConflicts

void ShortcutsConfigPage::checkConflicts ( )
privateslot

ShortcutsConfigPage::checkConflicts Highlight every row whose currently-edited sequence is shared, non-empty, with another row, and explain the conflict in the shortcut editor's tooltip.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ filterRows

void ShortcutsConfigPage::filterRows ( const QString & filter_text)
privateslot

ShortcutsConfigPage::filterRows Re-run the combined text + quick filter whenever the search box changes.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ icon()

QIcon ShortcutsConfigPage::icon ( ) const
overridevirtual
Returns
the configuration page icon

Implements ConfigPage.

◆ populateTable()

void ShortcutsConfigPage::populateTable ( )
private

ShortcutsConfigPage::populateTable Fill the tree with one collapsible top-level node per category and one child per shortcut known to ShortcutManager, sorted by category then action name.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ quickFilterChanged

void ShortcutsConfigPage::quickFilterChanged ( int index)
privateslot

ShortcutsConfigPage::quickFilterChanged Re-run the combined text + quick filter whenever the quick filter changes.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetAllRows

void ShortcutsConfigPage::resetAllRows ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetRow()

void ShortcutsConfigPage::resetRow ( int row_index)
private

ShortcutsConfigPage::resetRow Reset the shortcut editor at row_index to its default sequence.

Here is the call graph for this function:

◆ title()

QString ShortcutsConfigPage::title ( ) const
overridevirtual
Returns
the configuration page title

Implements ConfigPage.

Here is the caller graph for this function:

Member Data Documentation

◆ m_count_label

QLabel* ShortcutsConfigPage::m_count_label
private

◆ m_filter_edit

QLineEdit* ShortcutsConfigPage::m_filter_edit
private

◆ m_quick_filter

QComboBox* ShortcutsConfigPage::m_quick_filter
private

◆ m_rows

QList<Row> ShortcutsConfigPage::m_rows
private

◆ m_tree

QTreeWidget* ShortcutsConfigPage::m_tree
private

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