oopapidocs  2.0
ActionTableEditor Class Reference

Dialog for editing shortcuts in a table view. More...

#include <actiontableeditor.h>

List of all members.

Public Member Functions

 ActionTableEditor (QWidget *parent=0)
 Constructs a list of actions based on what it can find from qApp->findChildren and top level widgets children.
 ActionTableEditor (QList< QAction * > actions, QWidget *parent=0)

Static Public Member Functions

static QList< QAction * > allActions ()
static void restoreShortcuts (QList< QAction * > actions=allActions())
 Restores shortcuts that were saved previously by this table.

Protected Slots

void accept ()
 Save changed shortcuts to QSettings.

Detailed Description

Dialog for editing shortcuts in a table view.

Inspired by a Qt3 example from qq14. Usage: call restoreShortcuts() once at program startup, to restore previously edited shortcuts from QSettings. Next, call ActionTableEditor::exec(), and it handles the rest, including saving changed shortcuts to QSettings.

Author:
alan ezust

Definition at line 25 of file actiontableeditor.h.


Constructor & Destructor Documentation

ActionTableEditor::ActionTableEditor ( QWidget *  parent = 0) [explicit]

Constructs a list of actions based on what it can find from qApp->findChildren and top level widgets children.

Definition at line 13 of file actiontableeditor.cpp.

References allActions().

Here is the call graph for this function:

ActionTableEditor::ActionTableEditor ( QList< QAction * >  actions,
QWidget *  parent = 0 
) [explicit]
Parameters:
actions- list of actions to present in table

Definition at line 22 of file actiontableeditor.cpp.


Member Function Documentation

QList< QAction * > ActionTableEditor::allActions ( ) [static]
Returns:
a list of QActions that can be found by traversing the QObject trees from the qApp and topLevelWidget roots.

Definition at line 29 of file actiontableeditor.cpp.

Referenced by ActionTableEditor().

void ActionTableEditor::restoreShortcuts ( QList< QAction * >  actions = allActions()) [static]

Restores shortcuts that were saved previously by this table.

Parameters:
actionslist of QActions to restore

Definition at line 70 of file actiontableeditor.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Enumerations