UIShortcutPool.h revision d34409ad02ea0d28e08a6c4b089a412fdb3b4c9c
/** @file
* VBox Qt GUI - UIShortcutPool class declaration.
*/
/*
* Copyright (C) 2011-2013 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#ifndef __UIShortcutPool_h__
#define __UIShortcutPool_h__
/* Qt includes: */
#include <QMap>
/* GUI includes: */
#include "VBoxGlobal.h"
#include "QIWithRetranslateUI.h"
/* Forward declarations: */
/* Shortcut descriptor: */
{
/* Constructors: */
: m_strDescription(QString())
, m_sequence(QKeySequence())
{}
const QKeySequence &sequence,
const QKeySequence &defaultSequence)
{}
/* API: Description stuff: */
const QString& description() const;
/* API: Sequence stuff: */
const QKeySequence& sequence() const;
/* API: Default sequence stuff: */
const QKeySequence& defaultSequence() const;
/* API: Conversion stuff: */
/* Variables: */
};
/* Singleton shortcut pool: */
{
/* Notifiers: Extra-data stuff: */
void sigSelectorShortcutsReloaded();
void sigMachineShortcutsReloaded();
/* API: Singleton stuff: */
static UIShortcutPool* instance();
static void create();
static void destroy();
/* API: Shortcut stuff: */
/* API: Action-pool stuff: */
/* Handlers: Extra-data stuff: */
void sltReloadSelectorShortcuts();
void sltReloadMachineShortcuts();
/* Constructor/destructor: */
~UIShortcutPool();
/* Helpers: Prepare stuff: */
void prepare();
void prepareConnections();
/* Helper: Cleanup stuff: */
void cleanup() {}
/** Translation handler. */
void retranslateUi();
/* Helpers: Shortcuts stuff: */
void loadDefaults();
void loadOverrides();
void saveOverrides();
/* Helper: Shortcut stuff: */
/* Variables: */
static UIShortcutPool *m_pInstance;
/** Shortcut key template. */
static const QString m_sstrShortcutKeyTemplate;
/** Shortcut key template for Runtime UI. */
static const QString m_sstrShortcutKeyTemplateRuntime;
};
#endif /* __UIShortcutPool_h__ */