Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://astro.uni-altai.ru/~aw/stellarium/api/classStelShortcutMgr.html
Дата изменения: Unknown Дата индексирования: Fri Feb 28 07:34:59 2014 Кодировка: Поисковые слова: propulsion |
![]() |
Stellarium 0.12.3
|
Manager of the keyboard shortcuts tied to different features. More...
#include <StelShortcutMgr.hpp>
Public Slots | |
void | setAllActionsEnabled (bool enable) |
Enable/disable all actions of application. More... | |
void | restoreDefaultShortcuts () |
Restore the default combinations by reloading and resaving. More... | |
Signals | |
void | shortcutChanged (StelShortcut *shortcut) |
Public Member Functions | |
void | init () |
bool | loadShortcuts (const QString &filePath, bool overload=false) |
Load shortcuts from an existing file. More... | |
void | loadShortcuts () |
Search for file with shortcuts, load shortcuts from it. More... | |
void | saveShortcuts () |
Save current shortcuts to file. More... | |
void | saveShortcuts (QIODevice *output) const |
QAction * | addGuiAction (const QString &actionId, bool temporary, const QString &text, const QString &primaryKey, const QString &altKey, const QString &groupId, bool checkable=true, bool autoRepeat=false, bool global=false) |
Add a new action managed by the GUI. More... | |
void | changeActionPrimaryKey (const QString &actionId, const QString &groupId, QKeySequence newKey) |
void | changeActionAltKey (const QString &actionId, const QString &groupId, QKeySequence newKey) |
void | setShortcutText (const QString &actionId, const QString &groupId, const QString &description) |
QAction * | getGuiAction (const QString &actionName) |
Get a pointer to an action managed by the GUI. More... | |
QAction * | addScriptToAction (const QString &actionId, const QString &script, const QString &scriptAction=QString()) |
Bind script evaluation to given action. More... | |
QList< StelShortcutGroup * > | getGroupList () const |
Get a list of all shortcut groups. More... | |
Manager of the keyboard shortcuts tied to different features.
At the moment, the vast majority of QActions used in Stellarium are defined in a JSON file copied to the user data directory on the first run, similar to the configuration file.
Definition at line 34 of file StelShortcutMgr.hpp.
QAction* StelShortcutMgr::addGuiAction | ( | const QString & | actionId, |
bool | temporary, | ||
const QString & | text, | ||
const QString & | primaryKey, | ||
const QString & | altKey, | ||
const QString & | groupId, | ||
bool | checkable = true , |
||
bool | autoRepeat = false , |
||
bool | global = false |
||
) |
Add a new action managed by the GUI.
This method should be used to add new shortcuts to the program.
text | Short human-readable description in English. Mark the string for translation with the N_() macro and it will be translated when displayed in ShortcutsDialog or HelpDialog. |
QAction* StelShortcutMgr::addScriptToAction | ( | const QString & | actionId, |
const QString & | script, | ||
const QString & | scriptAction = QString() |
||
) |
Bind script evaluation to given action.
QList<StelShortcutGroup*> StelShortcutMgr::getGroupList | ( | ) | const |
Get a list of all shortcut groups.
QAction* StelShortcutMgr::getGuiAction | ( | const QString & | actionName | ) |
Get a pointer to an action managed by the GUI.
Directly queryies the StelAppGraphicsWidget instance for a child with the given name.
actionName | Qt object name for this action |
bool StelShortcutMgr::loadShortcuts | ( | const QString & | filePath, |
bool | overload = false |
||
) |
Load shortcuts from an existing file.
filePath | full path to the file. |
overload | if true, if a shortcut in the file already exists, replace its keys with the ones in the file. |
void StelShortcutMgr::loadShortcuts | ( | ) |
Search for file with shortcuts, load shortcuts from it.
|
slot |
Restore the default combinations by reloading and resaving.
void StelShortcutMgr::saveShortcuts | ( | ) |
Save current shortcuts to file.
|
slot |
Enable/disable all actions of application.
need for editing shortcuts without trigging any actions