Commit Graph

19 Commits

Author SHA1 Message Date
Mat Sutcliffe
57ff07592a [AFV] CInputManager stores icon indexes instead of QPixmap instances
The GUI converts icon indexes to QPixmap indexes when needed.
This fixes the context unittest that was broken by audio context changes.
2019-10-11 19:00:52 +01:00
Roland Rossgotterer
563a69e3f5 Remember and ignore hotkey combination before capturing
When capturing a new hotkey combination, we want to get only the delta of the keys and buttons being pressed during the capturing. 

ref T585
2019-04-11 22:12:20 +01:00
Roland Rossgotterer
59c69e379a Change InputManager trigger behavior to subset triggering
Previously, InputManager triggered an action only for exact matching. If 'CTRL' was configured, the action would be released as soon as 'CTRL + R' was pressed.
The behavior is changed now that the action stays active as long as its configured combination is keeping pressed (ignoring any extra keys/buttons).

ref T595
2019-04-11 22:12:19 +01:00
Mat Sutcliffe
e9a4c49d68 Ref T547 Update license masthead in all source code files. 2019-02-22 20:36:43 +00:00
Roland Rossgotterer
e5c435f281 Add function to retrieve all available joystick buttons 2019-02-22 20:36:23 +00:00
Roland Winklmeier
1addcf631a Refactor the remote hotkeys to avoid round trips
The previous implementation was hard to follow and maintain. Instead of
doing intentional rounds trips, we use now a two way approach. GUI is
automatically forwarding remote actions by calling "callHotkeyActionRemotely"
through DBus. Core on the other hand, emits a signal "remoteHotkeyAction"
that is processed in a different function in GUI.
On both sides, actions from the same local machine are filtered.

ref T402
2018-11-04 17:42:42 +01:00
Roland Winklmeier
f6ea2a9107 Move CInputManager from singleton to CApplication member
The main reason why CInputManager was singleton is the easy access across
the code. That had the negative side effect that time of destruction was
at a very late stage of the shutdown and could not be controlled by us.
My moving it to CApplication, the access is equally easy (using sApp) and
allows to be cleaned up properly during graceful shutdown.

ref T391
2018-11-04 17:42:42 +01:00
Roland Winklmeier
832082c5bc Delay creating input devices to when required
Every first call to CInputManager::instance() was automatically creating
the low level input devices. This was not always desired and therefore
creation is now explicit via function.
Unit tests do not need the devices created. In contrast, Windows unit tests
failed since Windows didn't like the Jenkins service childs to allocate
DInput devices.

T391
2018-10-07 16:17:28 +02:00
Roland Winklmeier
c42900f959 Release input devices when application is shutdown
If they are released with the deallocation of CInputManager, we might
run into global deallocation hell.
Also on Windows release all DirectX devices before COM library is closed.

ref T391
2018-10-07 16:17:26 +02:00
Roland Winklmeier
b6180d33af Convert private slots to private functions 2018-08-31 20:08:17 +02:00
Roland Winklmeier
2856dad280 Fix hotkey settings not loaded during app start
CInputManager is listening for hotkey settings changes, but it never loaded
the current state during construction and kept an empty setting.

ref T318
2018-08-31 20:08:16 +02:00
Klaus Basan
48738c87ab Keyboard and input manager cleanup/style 2018-08-22 12:32:06 +02:00
Klaus Basan
a34be02e07 refs #617, CActionItem supports icon
* standard paths for applications
* support for Qt::DecorationRole
* QMap<QString, QPixmap> m_availableActions
* Constructor for icon only
* only leafs support actions
2017-02-24 15:20:54 +00:00
Klaus Basan
eeaed099f0 Formatting, typos 2017-02-24 15:20:39 +00:00
Mathew Sutcliffe
7a34cc6d9a refs #697 BlackCore settings renamed and reorganized. 2016-08-03 02:19:11 +01:00
Roland Winklmeier
933271b828 Fix BlackCore header includes
* Include only what is used
* Use forward declaration when possible
* Sorted includes

refs #598
2016-05-13 17:06:00 +02:00
Roland Winklmeier
bd251b5de6 Fix license headers 2016-02-16 20:01:21 +01:00
Klaus Basan
3ac32fa58e refs #559, adjustments cache/settings moved 2015-12-20 17:00:12 +01:00
Michał Garapich
1b06e15b61 refs #510 Remove underscores from all the source file names 2015-11-22 12:53:09 +01:00