diff --git a/QHotkey/qhotkey.h b/QHotkey/qhotkey.h index 411b00d..133ef25 100644 --- a/QHotkey/qhotkey.h +++ b/QHotkey/qhotkey.h @@ -20,6 +20,7 @@ class QHOTKEY_SHARED_EXPORT QHotkey : public QObject { Q_OBJECT + //! @private friend class QHotkeyPrivate; //! Specifies whether this hotkey is currently registered or not @@ -53,40 +54,40 @@ public: bool valid; }; + //! Adds a global mapping of a key sequence to a replacement native shortcut static void addGlobalMapping(const QKeySequence &shortcut, const NativeShortcut &nativeShortcut); - //! Constructor - explicit QHotkey(QObject *parent = Q_NULLPTR); + //! Default Constructor + explicit QHotkey(QObject *parent = nullptr); //! Constructs a hotkey with a shortcut and optionally registers it - explicit QHotkey(const QKeySequence &shortcut, bool autoRegister = false, QObject *parent = Q_NULLPTR); + explicit QHotkey(const QKeySequence &shortcut, bool autoRegister = false, QObject *parent = nullptr); //! Constructs a hotkey with a key and modifiers and optionally registers it - explicit QHotkey(Qt::Key keyCode, Qt::KeyboardModifiers modifiers, bool autoRegister = false, QObject *parent = Q_NULLPTR); + explicit QHotkey(Qt::Key keyCode, Qt::KeyboardModifiers modifiers, bool autoRegister = false, QObject *parent = nullptr); //! Constructs a hotkey from a native shortcut and optionally registers it - explicit QHotkey(const NativeShortcut &shortcut, bool autoRegister = false, QObject *parent = Q_NULLPTR); - //! Destructor + explicit QHotkey(const NativeShortcut &shortcut, bool autoRegister = false, QObject *parent = nullptr); ~QHotkey(); - //! READ-Accessor for QHotkey::registered + //! @readAcFn{QHotkey::registered} bool isRegistered() const; - //! READ-Accessor for QHotkey::shortcut - the key and modifiers as a QKeySequence + //! @readAcFn{QHotkey::shortcut} QKeySequence shortcut() const; - //! READ-Accessor for QHotkey::shortcut - the key only + //! @readAcFn{QHotkey::shortcut} - the key only Qt::Key keyCode() const; - //! READ-Accessor for QHotkey::shortcut - the modifiers only + //! @readAcFn{QHotkey::shortcut} - the modifiers only Qt::KeyboardModifiers modifiers() const; //! Get the current native shortcut NativeShortcut currentNativeShortcut() const; public slots: - //! WRITE-Accessor for QHotkey::registered + //! @writeAcFn{QHotkey::registered} bool setRegistered(bool registered); - //! WRITE-Accessor for QHotkey::shortcut + //! @writeAcFn{QHotkey::shortcut} bool setShortcut(const QKeySequence &shortcut, bool autoRegister = false); - //! WRITE-Accessor for QHotkey::shortcut + //! @writeAcFn{QHotkey::shortcut} bool setShortcut(Qt::Key keyCode, Qt::KeyboardModifiers modifiers, bool autoRegister = false); - //! RESET-Accessor for QHotkey::shortcut + //! @resetAcFn{QHotkey::shortcut} bool resetShortcut(); //! Set this hotkey to a native shortcut @@ -96,7 +97,7 @@ signals: //! Will be emitted if the shortcut is pressed void activated(QPrivateSignal); - //! NOTIFY-Accessor for QHotkey::registered + //! @notifyAcFn{QHotkey::registered} void registeredChanged(bool registered); private: diff --git a/README.md b/README.md index 3574799..e4f3f78 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,16 @@ The QHotkey is a class that can be used to create hotkeys/global shortcuts, aka **Note:** For now Wayland is not supported, as it is simply not possible to register a global shortcut with wayland. For more details, or possible Ideas on how to get Hotkeys working on wayland, see [Issue #14](https://github.com/Skycoder42/QHotkey/issues/14). ## Installation -The package is providet as qpm package, [`de.skycoder42.qhotkey`](https://www.qpm.io/packages/de.skycoder42.qhotkey/index.html). To install: +The package is providet as qpm package, [`de.skycoder42.qhotkey`](https://www.qpm.io/packages/de.skycoder42.qhotkey/index.html). You can install it either via qpmx (preferred) or directly via qpm. + +### Via qpmx +[qpmx](https://github.com/Skycoder42/qpmx) is a frontend for qpm (and other tools) with additional features, and is the preferred way to install packages. To use it: + +1. Install qpmx (See [GitHub - Installation](https://github.com/Skycoder42/qpmx#installation)) +2. Install qpm (See [GitHub - Installing](https://github.com/Cutehacks/qpm/blob/master/README.md#installing), for **windows** see below) +3. In your projects root directory, run `qpmx install de.skycoder42.qhotkey` + +### Via qpm 1. Install qpm (See [GitHub - Installing](https://github.com/Cutehacks/qpm/blob/master/README.md#installing), for **windows** see below) 2. In your projects root directory, run `qpm install de.skycoder42.qhotkey` @@ -39,17 +48,17 @@ The following example shows a simple application that will run without a window int main(int argc, char *argv[]) { - QApplication a(argc, argv); + QApplication a(argc, argv); - QHotkey hotkey(QKeySequence("ctrl+alt+Q"), true);//The hotkey will be automatically registered - qDebug() << "Is Registered: " << hotkey.isRegistered(); + auto hotkey = new QHotkey(QKeySequence("ctrl+alt+Q"), true, &a);//The hotkey will be automatically registered + qDebug() << "Is Registered: " << hotkey->isRegistered(); - QObject::connect(&hotkey, &QHotkey::activated, qApp, [&](){ - qDebug() << "Hotkey Activated - the application will quit now"; - qApp->quit(); - }); + QObject::connect(hotkey, &QHotkey::activated, qApp, [&](){ + qDebug() << "Hotkey Activated - the application will quit now"; + qApp->quit(); + }); - return a.exec(); + return a.exec(); } ``` @@ -60,7 +69,7 @@ By running the example in `./HotkeyTest` you can test out the QHotkey class. The - **Playground:** You can enter some sequences here and try it out with different key combinations. - **Testings:** A list of selected hotkeys. Activate it and try out which ones work for you (*Hint:* Depending on OS and keyboard layout, it's very possible that a few don't work). - **Threading:** Activate the checkbox to move 2 Hotkeys of the playground to seperate threads. It should work without a difference. -- **Native Shortcut**: Allows you to try out the direct usage of native shortcuts +- **Native Shortcut**: Allows you to try out the direct usage of native shortcuts ### Logging By default, QHotkey prints some warning messages if something goes wrong (For example, a key that cannot be translated). All messages of QHotkey are grouped into the [QLoggingCategory](https://doc.qt.io/qt-5/qloggingcategory.html) `"QHotkey"`. If you want to simply disable the logging, call the folling function somewhere in your code: @@ -83,7 +92,7 @@ The documentation was created using [doxygen](http://www.doxygen.org). It includ ## Technical ### Requirements - - I built it with Qt 5.7, but may work with earlier versions, too + - Explicit support is only given down to the latest Qt LTS, but may work with earlier versions, too - At least the QtGui-Module (a QGuiApplication). Hotkeys on console based applications are not supported (By the operating systems). You can however create a gui application without any visible window. - C++11 diff --git a/doc/qhotkey.doxy b/doc/Doxyfile similarity index 92% rename from doc/qhotkey.doxy rename to doc/Doxyfile index da809e6..e65e660 100644 --- a/doc/qhotkey.doxy +++ b/doc/Doxyfile @@ -1,4 +1,4 @@ -# Doxyfile 1.8.12 +# Doxyfile 1.8.14 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. @@ -20,8 +20,8 @@ # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all text # before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv -# for the list of possible encodings. +# built into libc) for the transcoding. See +# https://www.gnu.org/software/libiconv/ for the list of possible encodings. # The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 @@ -38,7 +38,7 @@ PROJECT_NAME = QHotkey # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.1.0 +PROJECT_NUMBER = 1.2.2 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a @@ -58,7 +58,7 @@ PROJECT_LOGO = # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. -OUTPUT_DIRECTORY = ../../QHotkey_doc_generated +OUTPUT_DIRECTORY = /tmp/qthotkeydoc # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and @@ -236,7 +236,8 @@ TAB_SIZE = 4 # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading # "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines. +# newlines (in the resulting output). You can put ^^ in the value part of an +# alias to insert a newline as if a physical newline was in the original file. ALIASES = "accessors{1}=\1
Accessors
" \ readAc{1}=READ\1 \ @@ -252,10 +253,13 @@ ALIASES = "accessors{1}=< "constantAc=" \ "finalAc=" \ "default{1}=Default: \1
" \ - overloads{1}=Overloads: \ - ovElem{1}=
  • \1
  • \ - "overload=This is an overloaded function." \ - "povElem{1}=
  • \1 (primary, check for more details)
  • " + "readAcFn{1}=READ accessor for \1" \ + "writeAcFn{1}=WRITE accessor for \1" \ + "notifyAcFn{1}=NOTIFY accessor for \1" \ + "resetAcFn{1}=RESET accessor for \1" \ + "memberAcFn{1}=MEMBER accessor for \1" \ + "inherit{1}=Inherits \1" \ + "privsig=This is a private signal. It can be connect to as usual, but can only be emitted by the class it belongs to" # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" @@ -354,7 +358,7 @@ BUILTIN_STL_SUPPORT = NO CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. @@ -725,7 +729,7 @@ LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. @@ -773,7 +777,7 @@ WARN_IF_DOC_ERROR = YES # parameter documentation, but not about the absence of documentation. # The default value is: NO. -WARN_NO_PARAMDOC = YES +WARN_NO_PARAMDOC = NO # If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when # a warning is encountered. @@ -814,7 +818,7 @@ INPUT = ../QHotkey/qhotkey.h \ # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# documentation (see: https://www.gnu.org/software/libiconv/) for the list of # possible encodings. # The default value is: UTF-8. @@ -921,12 +925,21 @@ EXCLUDE_PATTERNS = moc_* \ # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* -EXCLUDE_SYMBOLS = QBasicAtomicInteger \ +EXCLUDE_SYMBOLS = QAbstractAspect \ + QBasicAtomicInteger \ QBasicAtomicPointer \ + QBasicMutex \ + QComponent \ + QEntity \ QFutureWatcherBase \ - QListSpecialMethods \ + QGeometry \ + QGeometryRenderer \ + QMaterial \ + QNode \ + QNodeCreatedChangeBase \ QPaintEngineEx \ - QQmlExtensionInterface + QQmlExtensionInterface \ + QTechniqueFilter # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include @@ -1069,7 +1082,7 @@ SOURCE_TOOLTIPS = YES # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version +# (see https://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: @@ -1096,25 +1109,6 @@ USE_HTAGS = NO VERBATIM_HEADERS = YES -# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the -# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the -# cost of reduced performance. This can be particularly helpful with template -# rich C++ code for which doxygen's built-in parser lacks the necessary type -# information. -# Note: The availability of this option depends on whether or not doxygen was -# generated with the -Duse-libclang=ON option for CMake. -# The default value is: NO. - -CLANG_ASSISTED_PARSING = NO - -# If clang assisted parsing is enabled you can provide the compiler with command -# line options that you would normally use when invoking the compiler. Note that -# the include paths will already be set by doxygen for the files and directories -# specified with INPUT and INCLUDE_PATH. -# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. - -CLANG_OPTIONS = - #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- @@ -1233,7 +1227,7 @@ HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# https://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. @@ -1269,6 +1263,17 @@ HTML_COLORSTYLE_GAMMA = 89 HTML_TIMESTAMP = YES +# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML +# documentation will contain a main index with vertical navigation menus that +# are dynamically created via Javascript. If disabled, the navigation index will +# consists of multiple levels of tabs that are statically embedded in every HTML +# page. Disable this option to support browsers that do not have Javascript, +# like the Qt help browser. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_MENUS = YES + # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. @@ -1292,12 +1297,12 @@ HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# environment (see: https://developer.apple.com/tools/xcode/), introduced with # OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a # Makefile in the HTML output directory. Running make will produce the docset in # that directory and running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# startup. See https://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1413,40 +1418,37 @@ QCH_FILE = QHotkeyHelp.qch # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# (see: http://doc.qt.io/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. -QHP_NAMESPACE = com.Skycoder42.QHotkey.110 +QHP_NAMESPACE = de.skycoder42.QHotkey.122 # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- -# folders). +# Folders (see: http://doc.qt.io/qt-4.8/qthelpproject.html#virtual-folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. -QHP_VIRTUAL_FOLDER = doc_QHotkey +QHP_VIRTUAL_FOLDER = doc_qhotkey # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). +# Filters (see: http://doc.qt.io/qt-4.8/qthelpproject.html#custom-filters). # This tag requires that the tag GENERATE_QHP is set to YES. -QHP_CUST_FILTER_NAME = +QHP_CUST_FILTER_NAME = "QHotkey 1.2.2" # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). +# Filters (see: http://doc.qt.io/qt-4.8/qthelpproject.html#custom-filters). # This tag requires that the tag GENERATE_QHP is set to YES. -QHP_CUST_FILTER_ATTRS = +QHP_CUST_FILTER_ATTRS = "qhotkey 1.2.2" # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# http://doc.qt.io/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = @@ -1456,7 +1458,7 @@ QHP_SECT_FILTER_ATTRS = # generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. -QHG_LOCATION = C:/Qt/5.7/msvc2015_64/bin/qhelpgenerator.exe +QHG_LOCATION = /usr/bin/qhelpgenerator # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # generated, together with the HTML files, they form an Eclipse help plugin. To @@ -1539,7 +1541,7 @@ EXT_LINKS_IN_WINDOW = YES FORMULA_FONTSIZE = 10 -# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# Use the FORMULA_TRANSPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are not # supported properly for IE 6.0, but are supported on all modern browsers. # @@ -1551,7 +1553,7 @@ FORMULA_FONTSIZE = 10 FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering +# https://www.mathjax.org) which uses client side Javascript for the rendering # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path @@ -1578,8 +1580,8 @@ MATHJAX_FORMAT = HTML-CSS # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. +# MathJax from https://www.mathjax.org before deployment. +# The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest @@ -1640,7 +1642,7 @@ SERVER_BASED_SEARCH = NO # # Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library -# Xapian (see: http://xapian.org/). +# Xapian (see: https://xapian.org/). # # See the section "External Indexing and Searching" for details. # The default value is: NO. @@ -1653,7 +1655,7 @@ EXTERNAL_SEARCH = NO # # Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library -# Xapian (see: http://xapian.org/). See the section "External Indexing and +# Xapian (see: https://xapian.org/). See the section "External Indexing and # Searching" for details. # This tag requires that the tag SEARCHENGINE is set to YES. @@ -1840,7 +1842,7 @@ LATEX_SOURCE_CODE = NO # The LATEX_BIB_STYLE tag can be used to specify the style to use for the # bibliography, e.g. plainnat, or ieeetr. See -# http://en.wikipedia.org/wiki/BibTeX and \cite for more info. +# https://en.wikipedia.org/wiki/BibTeX and \cite for more info. # The default value is: plain. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -2023,9 +2025,9 @@ DOCBOOK_PROGRAMLISTING = NO #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an -# AutoGen Definitions (see http://autogen.sf.net) file that captures the -# structure of the code including all documentation. Note that this feature is -# still experimental and incomplete at the moment. +# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures +# the structure of the code including all documentation. Note that this feature +# is still experimental and incomplete at the moment. # The default value is: NO. GENERATE_AUTOGEN_DEF = NO @@ -2107,7 +2109,7 @@ SEARCH_INCLUDES = YES # preprocessor. # This tag requires that the tag SEARCH_INCLUDES is set to YES. -INCLUDE_PATH = C:/Qt/5.7/msvc2015_64/include +INCLUDE_PATH = /usr/include/qt # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the @@ -2127,7 +2129,7 @@ INCLUDE_FILE_PATTERNS = *.h \ # recursively expanded use the := operator instead of the = operator. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -PREDEFINED = +PREDEFINED = __cplusplus=201402L # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The @@ -2165,37 +2167,50 @@ SKIP_FUNCTION_MACROS = YES # the path). If a tag file is not located in the directory in which doxygen is # run, you must also specify the path to the tagfile here. -TAGFILES = C:/Qt/Docs/Qt-5.7/qtwebengine/qtwebengine.tags=http://doc.qt.io/qt-5 \ - C:/Qt/Docs/Qt-5.7/qtgraphicaleffects/qtgraphicaleffects.tags=http://doc.qt.io/qt-5 \ - C:/Qt/Docs/Qt-5.7/qtwebchannel/qtwebchannel.tags=http://doc.qt.io/qt-5 \ - C:/Qt/Docs/Qt-5.7/qtwebsockets/qtwebsockets.tags=http://doc.qt.io/qt-5 \ - C:/Qt/Docs/Qt-5.7/qtbluetooth/qtbluetooth.tags=http://doc.qt.io/qt-5 \ - C:/Qt/Docs/Qt-5.7/qtnfc/qtnfc.tags=http://doc.qt.io/qt-5 \ - C:/Qt/Docs/Qt-5.7/qtsensors/qtsensors.tags=http://doc.qt.io/qt-5 \ - C:/Qt/Docs/Qt-5.7/qtlocation/qtlocation.tags=http://doc.qt.io/qt-5 \ - C:/Qt/Docs/Qt-5.7/qtpositioning/qtpositioning.tags=http://doc.qt.io/qt-5 \ - C:/Qt/Docs/Qt-5.7/activeqt/activeqt.tags=http://doc.qt.io/qt-5 \ - C:/Qt/Docs/Qt-5.7/qtquickcontrols/qtquickcontrols.tags=http://doc.qt.io/qt-5 \ - C:/Qt/Docs/Qt-5.7/qtqml/qtqml.tags=http://doc.qt.io/qt-5 \ - C:/Qt/Docs/Qt-5.7/qtquick/qtquick.tags=http://doc.qt.io/qt-5 \ - C:/Qt/Docs/Qt-5.7/qtxmlpatterns/qtxmlpatterns.tags=http://doc.qt.io/qt-5 \ - C:/Qt/Docs/Qt-5.7/qtsvg/qtsvg.tags=http://doc.qt.io/qt-5 \ - C:/Qt/Docs/Qt-5.7/qdoc/qdoc.tags=http://doc.qt.io/qt-5 \ - C:/Qt/Docs/Qt-5.7/qtprintsupport/qtprintsupport.tags=http://doc.qt.io/qt-5 \ - C:/Qt/Docs/Qt-5.7/qtconcurrent/qtconcurrent.tags=http://doc.qt.io/qt-5 \ - C:/Qt/Docs/Qt-5.7/qtgui/qtgui.tags=http://doc.qt.io/qt-5 \ - C:/Qt/Docs/Qt-5.7/qttestlib/qttestlib.tags=http://doc.qt.io/qt-5 \ - C:/Qt/Docs/Qt-5.7/qtwidgets/qtwidgets.tags=http://doc.qt.io/qt-5 \ - C:/Qt/Docs/Qt-5.7/qtcore/qtcore.tags=http://doc.qt.io/qt-5 \ - C:/Qt/Docs/Qt-5.7/qtnetwork/qtnetwork.tags=http://doc.qt.io/qt-5 \ - C:/Qt/Docs/Qt-5.7/qtsql/qtsql.tags=http://doc.qt.io/qt-5 \ - C:/Qt/Docs/Qt-5.7/qtxml/qtxml.tags=http://doc.qt.io/qt-5 +TAGFILES = "/home/sky/Qt/Docs/Qt-5.10.1/qdoc/qdoc.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtlabsplatform/qtlabsplatform.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtqml/qtqml.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtprintsupport/qtprintsupport.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qttestlib/qttestlib.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtautoupdater/qtautoupdater.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtlabscalendar/qtlabscalendar.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtdatasync/qtdatasync.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtwebchannel/qtwebchannel.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtpositioning/qtpositioning.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtrestclient/qtrestclient.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtcore/qtcore.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtnfc/qtnfc.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtquickcontrols/qtquickcontrols.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtwidgets/qtwidgets.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtgraphicaleffects/qtgraphicaleffects.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtlocation/qtlocation.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtgui/qtgui.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtwebengine/qtwebengine.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtnetwork/qtnetwork.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtxml/qtxml.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtscxml/qtscxml.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/activeqt/activeqt.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtjsonserializer/qtjsonserializer.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtsensors/qtsensors.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtnetworkauth/qtnetworkauth.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtxmlpatterns/qtxmlpatterns.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtspeech/qtspeech.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtsvg/qtsvg.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtserialbus/qtserialbus.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtbluetooth/qtbluetooth.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtsql/qtsql.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtwebsockets/qtwebsockets.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtquick/qtquick.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qt3d/qt3d.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtquickcontrols2/qtquickcontrols2.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtremoteobjects/qtremoteobjects.tags=https://doc.qt.io/qt-5" \ + "/home/sky/Qt/Docs/Qt-5.10.1/qtconcurrent/qtconcurrent.tags=https://doc.qt.io/qt-5" # When a file name is specified after GENERATE_TAGFILE, doxygen will create a # tag file that is based on the input files it reads. See section "Linking to # external documentation" for more information about the usage of tag files. -GENERATE_TAGFILE = ../../QHotkey_doc_generated/QHotkey.tag +GENERATE_TAGFILE = /tmp/qthotkeydoc/QHotkey.tag # If the ALLEXTERNALS tag is set to YES, all external class will be listed in # the class index. If set to NO, only the inherited external classes will be @@ -2473,6 +2488,11 @@ DIAFILE_DIRS = PLANTUML_JAR_PATH = +# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a +# configuration file for plantuml. + +PLANTUML_CFG_FILE = + # When using plantuml, the specified paths are searched for files specified by # the !include statement in a plantuml block. diff --git a/doc/qhotkey.dox b/doc/qhotkey.dox index f6624c1..fe184f3 100644 --- a/doc/qhotkey.dox +++ b/doc/qhotkey.dox @@ -22,9 +22,9 @@ thread until the applications eventloop has the time to handle it. If the loop i it does. This does not happen if used from the main thread. @accessors{ - @readAc{isRegistered()} - @writeAc{setRegistered()} - @notifyAc{registeredChanged()} + @readAc{isRegistered()} + @writeAc{setRegistered()} + @notifyAc{registeredChanged()} } In addition to the normal accessors, a modification of the QHotkey::shortcut property can change this property, too. @@ -49,15 +49,15 @@ thread until the applications eventloop has the time to handle it. If the loop i it does. This does not happen if used from the main thread. @accessors{ - @readAc{ - shortcut()
    - keyCode()
    - modifiers() - } - @writeAc{ - setShortcut(const QKeySequence &, bool)
    - setShortcut(Qt::Key, Qt::KeyboardModifiers, bool) - } + @readAc{ + shortcut()
    + keyCode()
    + modifiers() + } + @writeAc{ + setShortcut(const QKeySequence &, bool)
    + setShortcut(Qt::Key, Qt::KeyboardModifiers, bool) + } } @sa QHotkey::registered, QHotkey::isKeyCaptured, QHotkey::currentNativeShortcut, QHotkey::setNativeShortcut @@ -66,71 +66,39 @@ it does. This does not happen if used from the main thread. /*! @fn QHotkey::QHotkey(QObject *) -@overload @param parent The parent object - -@overloads{ - @povElem{QHotkey::QHotkey(QObject *)} - @ovElem{QHotkey::QHotkey(const QKeySequence &, bool, QObject *)} - @ovElem{QHotkey::QHotkey(Qt::Key, Qt::KeyboardModifiers, bool, QObject *)} - @ovElem{QHotkey::QHotkey(const NativeShortcut &, bool, QObject *)} -} */ /*! @fn QHotkey::QHotkey(const QKeySequence &, bool, QObject *) -@overload @param parent The parent object @param shortcut The shortcut this hotkey should be registered for @param autoRegister Specifies, whether the hotkey should be automatically registered or not -@overloads{ - @povElem{QHotkey::QHotkey(QObject *)} - @ovElem{QHotkey::QHotkey(const QKeySequence &, bool, QObject *)} - @ovElem{QHotkey::QHotkey(Qt::Key, Qt::KeyboardModifiers, bool, QObject *)} - @ovElem{QHotkey::QHotkey(const NativeShortcut &, bool, QObject *)} -} - @sa QHotkey::shortcut, QHotkey::registered */ /*! @fn QHotkey::QHotkey(Qt::Key, Qt::KeyboardModifiers, bool, QObject *) -@overload @param parent The parent object -@param key The key this hotkey should be registered for +@param keyCode The key this hotkey should be registered for @param modifiers The modifiers that have to be pressed together with the `key` @param autoRegister Specifies, whether the hotkey should be automatically registered or not -@overloads{ - @povElem{QHotkey::QHotkey(QObject *)} - @ovElem{QHotkey::QHotkey(const QKeySequence &, bool, QObject *)} - @ovElem{QHotkey::QHotkey(Qt::Key, Qt::KeyboardModifiers, bool, QObject *)} - @ovElem{QHotkey::QHotkey(const NativeShortcut &, bool, QObject *)} -} - @sa QHotkey::shortcut, QHotkey::registered */ /*! @fn QHotkey::QHotkey(const NativeShortcut &, bool, QObject *) -@overload @param parent The parent object @param shortcut The native shortcut this hotkey should be registered for @param autoRegister Specifies, whether the hotkey should be automatically registered or not @note Please check QHotkey::setNativeShortcut for important hints! -@overloads{ - @povElem{QHotkey::QHotkey(QObject *)} - @ovElem{QHotkey::QHotkey(const QKeySequence &, bool, QObject *)} - @ovElem{QHotkey::QHotkey(Qt::Key, Qt::KeyboardModifiers, bool, QObject *)} - @ovElem{QHotkey::QHotkey(const NativeShortcut &, bool, QObject *)} -} - @sa QHotkey::setNativeShortcut, QHotkey::registered */ @@ -168,6 +136,22 @@ from the thread this instance lives on. @note This is a private signal. It can be used in signal connections but cannot be emitted by the user. */ +/*! +@fn QHotkey::addGlobalMapping + +@param shortcut The keysequence to add the mapping for +@param nativeShortcut The native shortcut to overwrite the sequence with + +This method can be used to remap specific hotkey to a different native representation than the +one that would be used by default. This can be useful if specific key combinations work fine +on allmost all platforms, but on one you need a different keycode for the same effect. See +[Issue #15](https://github.com/Skycoder42/QHotkey/issues/15) for an example where this is the +case. + +The advantage of using this approach via simply registering it as native key directly, is that +these mappings work for cases where users input their own hotkeys. +*/ + /*! @class QHotkey::NativeShortcut
    Accessors
    CONSTANT
    FINAL