Ref T30, added font shortcuts to CShortcut and allow to pass context shortcut

This commit is contained in:
Klaus Basan
2017-07-15 03:21:55 +02:00
committed by Mathew Sutcliffe
parent 7370b6f33b
commit fcdf238512
4 changed files with 48 additions and 12 deletions

View File

@@ -25,7 +25,7 @@ namespace BlackGui
{
namespace Menus
{
//! Standard font (size, style) menus for fonts.
//! Standard font (size, style) menus.
//! Can be used as nested menu or via getActions added manually
class CFontMenu : public IMenuDelegate
{
@@ -33,7 +33,7 @@ namespace BlackGui
public:
//! Constructor
CFontMenu(QWidget *widget, bool separator = true);
CFontMenu(QWidget *widget, bool separator = true, Qt::ShortcutContext shortcutContext = Qt::WidgetShortcut);
//! Log.categories
static const BlackMisc::CLogCategoryList &getLogCategories();
@@ -44,6 +44,9 @@ namespace BlackGui
//! Allow to use the actions directly
QList<QAction *> getActions() const;
//! The shortcus owned by QWidget
QList<QShortcut *> getShortcuts() const;
private:
void changeFontDialog();
void fontSizePlus();