SGL
gclipboard.h
1 /*
2  * File: gclipboard.h
3  * ------------------
4  *
5  * @author Marty Stepp
6  * @version 2021/04/09
7  * - added sgl namespace
8  * @version 2018/09/07
9  * - added doc comments for new documentation generation
10  * @version 2018/08/23
11  * - renamed to gclipboard.h to replace Java version
12  * @version 2018/07/19
13  * - initial version
14  */
15 
16 #ifndef _gclipboard_h
17 #define _gclipboard_h
18 
19 #include <QKeyEvent>
20 #include <string>
21 
22 namespace sgl {
23 
28 class GClipboard {
29 public:
33  static string get();
34 
39  static bool isCopy(QKeyEvent* event);
40 
45  static bool isCut(QKeyEvent* event);
46 
51  static bool isPaste(QKeyEvent* event);
52 
57  static void set(const string& text);
58 
59 private:
60  GClipboard(); // prevent construction
61 };
62 
63 } // namespace sgl
64 
65 #endif // _gclipboard_h
Definition: console.h:45
static bool isCut(QKeyEvent *event)
Returns true if the given event represents a "cut" operation.
Definition: gclipboard.cpp:45
static bool isCopy(QKeyEvent *event)
Returns true if the given event represents a "copy" operation.
Definition: gclipboard.cpp:38
static bool isPaste(QKeyEvent *event)
Returns true if the given event represents a "paste" operation.
Definition: gclipboard.cpp:54
The GClipboard class contains static methods you can use to get and set the contents of the system cl...
Definition: gclipboard.h:28