Canorus  0.0
Public Types | Public Slots | Public Member Functions | Static Public Member Functions | Protected Slots | Protected Member Functions | Private Attributes | List of all members
CAActionsEditor Class Reference

#include <actionseditor.h>

Inheritance diagram for CAActionsEditor:
Inheritance graph
[legend]

Public Types

enum  fileType { FT_SHORTCUT = 1, FT_MIDI = 2, FT_MIDISCUT = 3 }
 

Public Slots

void applyChanges ()
 
enum fileType getFType (const QString &suffix)
 
void saveActionsTable ()
 
bool saveActionsTable (const QString &filename, enum fileType type=FT_SHORTCUT)
 
void loadActionsTable ()
 
bool loadActionsTable (const QString &filename, enum fileType type=FT_SHORTCUT)
 
void updateView ()
 

Public Member Functions

 CAActionsEditor (QWidget *parent=0, Qt::WindowFlags f=0)
 
 ~CAActionsEditor ()
 
void clear ()
 
bool isEmpty ()
 
void addActions (const QList< CASingleAction * > &actionList)
 

Static Public Member Functions

static CASingleActionfindAction (QWidget *widget, const QString &name)
 
static QStringList actionsNames (QWidget *widget)
 
static void saveToConfig (QWidget *widget, QSettings *set)
 
static void loadFromConfig (QWidget *widget, QSettings *set)
 

Protected Slots

void recordAction (QTableWidgetItem *)
 
void validateAction (QTableWidgetItem *)
 
void editShortcut ()
 

Protected Member Functions

virtual void retranslateStrings ()
 
virtual void changeEvent (QEvent *event)
 
int findActionCommand (const QString &name)
 
int findActionAccel (const QString &accel, int ignoreRow=-1)
 
int findActionMidi (const QString &midi, int ignoreRow=-1)
 
bool hasConflicts (bool bMidi=false)
 

Private Attributes

QTableWidget * actionsTable
 
QList< CASingleAction * > m_actionsList
 
QPushButton * saveButton
 
QPushButton * loadButton
 
QString latest_dir
 
QPushButton * editButton
 
QString oldAccelText
 
QString oldMidiText
 
bool dont_validate
 

Member Enumeration Documentation

◆ fileType

Enumerator
FT_SHORTCUT 
FT_MIDI 
FT_MIDISCUT 

Constructor & Destructor Documentation

◆ CAActionsEditor()

CAActionsEditor::CAActionsEditor ( QWidget *  parent = 0,
Qt::WindowFlags  f = 0 
)

◆ ~CAActionsEditor()

CAActionsEditor::~CAActionsEditor ( )

Member Function Documentation

◆ actionsNames()

QStringList CAActionsEditor::actionsNames ( QWidget *  widget)
static

References CASingleAction::getAction().

Here is the call graph for this function:

◆ addActions()

void CAActionsEditor::addActions ( const QList< CASingleAction * > &  actionList)

References CASingleAction::getAction(), m_actionsList, and updateView().

Referenced by CASettingsDialog::buildActionsEditorPage().

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

◆ applyChanges

void CAActionsEditor::applyChanges ( )
slot

References actionsTable, COL_SHORTCUT, m_actionsList, and CASingleAction::setShortCutAsString().

Here is the call graph for this function:

◆ changeEvent()

void CAActionsEditor::changeEvent ( QEvent *  event)
protectedvirtual

References retranslateStrings().

Here is the call graph for this function:

◆ clear()

void CAActionsEditor::clear ( )

References m_actionsList.

◆ editShortcut

void CAActionsEditor::editShortcut ( )
protectedslot

References actionsTable, COL_SHORTCUT, ShortcutGetter::exec(), and hasConflicts().

Referenced by CAActionsEditor().

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

◆ findAction()

CASingleAction * CAActionsEditor::findAction ( QWidget *  widget,
const QString &  name 
)
static

References CASingleAction::getAction().

Here is the call graph for this function:

◆ findActionAccel()

int CAActionsEditor::findActionAccel ( const QString &  accel,
int  ignoreRow = -1 
)
protected

References actionsTable, and COL_SHORTCUT.

Referenced by hasConflicts().

Here is the caller graph for this function:

◆ findActionCommand()

int CAActionsEditor::findActionCommand ( const QString &  name)
protected

References actionsTable, and COL_COMMAND.

Referenced by loadActionsTable().

Here is the caller graph for this function:

◆ findActionMidi()

int CAActionsEditor::findActionMidi ( const QString &  midi,
int  ignoreRow = -1 
)
protected

References actionsTable, and COL_MIDI.

Referenced by hasConflicts().

Here is the caller graph for this function:

◆ getFType

CAActionsEditor::fileType CAActionsEditor::getFType ( const QString &  suffix)
slot

References FT_MIDI, FT_MIDISCUT, and FT_SHORTCUT.

Referenced by loadActionsTable(), and saveActionsTable().

Here is the caller graph for this function:

◆ hasConflicts()

bool CAActionsEditor::hasConflicts ( bool  bMidi = false)
protected

References actionsTable, COL_MIDI, COL_SHORTCUT, findActionAccel(), and findActionMidi().

Referenced by editShortcut(), loadActionsTable(), updateView(), and validateAction().

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

◆ isEmpty()

bool CAActionsEditor::isEmpty ( )

References m_actionsList.

◆ loadActionsTable [1/2]

void CAActionsEditor::loadActionsTable ( )
slot

References getFType(), and latest_dir.

Referenced by CAActionsEditor().

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

◆ loadActionsTable [2/2]

bool CAActionsEditor::loadActionsTable ( const QString &  filename,
enum fileType  type = FT_SHORTCUT 
)
slot

References actionsTable, COL_MIDI, COL_SHORTCUT, dont_validate, findActionCommand(), FT_MIDI, FT_SHORTCUT, and hasConflicts().

Here is the call graph for this function:

◆ loadFromConfig()

void CAActionsEditor::loadFromConfig ( QWidget *  widget,
QSettings set 
)
static

◆ recordAction

void CAActionsEditor::recordAction ( QTableWidgetItem *  i)
protectedslot

References COL_MIDI, COL_SHORTCUT, oldAccelText, and oldMidiText.

Referenced by CAActionsEditor().

Here is the caller graph for this function:

◆ retranslateStrings()

void CAActionsEditor::retranslateStrings ( )
protectedvirtual

References actionsTable, editButton, loadButton, and saveButton.

Referenced by CAActionsEditor(), and changeEvent().

Here is the caller graph for this function:

◆ saveActionsTable [1/2]

void CAActionsEditor::saveActionsTable ( )
slot

References getFType(), and latest_dir.

Referenced by CAActionsEditor().

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

◆ saveActionsTable [2/2]

bool CAActionsEditor::saveActionsTable ( const QString &  filename,
enum fileType  type = FT_SHORTCUT 
)
slot

◆ saveToConfig()

void CAActionsEditor::saveToConfig ( QWidget *  widget,
QSettings set 
)
static

References CASingleAction::getAction(), and CASingleAction::getShortCutAsString().

Here is the call graph for this function:

◆ updateView

void CAActionsEditor::updateView ( )
slot

◆ validateAction

void CAActionsEditor::validateAction ( QTableWidgetItem *  i)
protectedslot

References COL_MIDI, COL_SHORTCUT, dont_validate, hasConflicts(), oldAccelText, and oldMidiText.

Referenced by CAActionsEditor().

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

Member Data Documentation

◆ actionsTable

QTableWidget* CAActionsEditor::actionsTable
private

◆ dont_validate

bool CAActionsEditor::dont_validate
private

◆ editButton

QPushButton* CAActionsEditor::editButton
private

◆ latest_dir

QString CAActionsEditor::latest_dir
private

◆ loadButton

QPushButton* CAActionsEditor::loadButton
private

◆ m_actionsList

QList<CASingleAction *> CAActionsEditor::m_actionsList
private

◆ oldAccelText

QString CAActionsEditor::oldAccelText
private

Referenced by recordAction(), and validateAction().

◆ oldMidiText

QString CAActionsEditor::oldMidiText
private

Referenced by recordAction(), and validateAction().

◆ saveButton

QPushButton* CAActionsEditor::saveButton
private

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