swift
keyboard.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2013 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #ifndef SWIFT_INPUT_KEYBOARD_H
7 #define SWIFT_INPUT_KEYBOARD_H
8 
9 #include <memory>
10 
11 #include <QObject>
12 
13 #include "input/swiftinputexport.h"
16 
17 namespace swift::input
18 {
22  class SWIFT_INPUT_EXPORT IKeyboard : public QObject
23  {
24  Q_OBJECT
25 
26  public:
28  IKeyboard(QObject *parent = nullptr);
29 
31  virtual ~IKeyboard() {}
32 
34  static std::unique_ptr<IKeyboard> create(QObject *parent = nullptr);
35 
36  signals:
39 
40  protected:
42  virtual bool init() = 0;
43  };
44 } // namespace swift::input
45 
46 #endif // SWIFT_INPUT_KEYBOARD_H
Abstract interface for native keyboard handling.
Definition: keyboard.h:23
virtual bool init()=0
Initializes the platform keyboard device.
virtual ~IKeyboard()
Destructor.
Definition: keyboard.h:31
void keyCombinationChanged(const swift::misc::input::CHotkeyCombination &)
Key combination changed.
Value object representing hotkey sequence.
#define SWIFT_INPUT_EXPORT
Export a class or function from the library.