OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
aCheckBoxWidget.h
Go to the documentation of this file.
1/*
2 * File: aCheckBoxWidget.h
3 * Package: akWidgets
4 *
5 * Created on: March 19, 2020
6 * Author: Alexander Kuester
7 * Copyright (c) 2022 Alexander Kuester
8 * This file is part of the uiCore component.
9 * This file is subject to the terms and conditions defined in
10 * file 'LICENSE', which is part of this source code package.
11 */
12
13#pragma once
14
15// Qt header
16#include <qcheckbox.h> // base class
17#include <qstring.h> // QString
18
19// AK header
20#include <akWidgets/aWidget.h>
22
23// Forward declaration
24class QKeyEvent;
25
26namespace ak {
27
29 class UICORE_API_EXPORT aCheckBoxWidget : public QCheckBox, public aWidget
30 {
31 Q_OBJECT
32 public:
36 QWidget * _parent = (QWidget *) nullptr
37 );
38
43 const QString & _text,
44 QWidget * _parent = (QWidget *) nullptr
45 );
46
48 virtual ~aCheckBoxWidget();
49
50 // #######################################################################################################
51
52 // Event handling
53
55 virtual void keyPressEvent(
56 QKeyEvent * _event
57 ) override;
58
60 virtual void keyReleaseEvent(
61 QKeyEvent * _event
62 ) override;
63
64 // #######################################################################################################
65
66 // Base class functions
67
69 virtual QWidget * widget(void) override;
70
71 // #######################################################################################################
72
73 void setPaintBackground(bool _paint);
74
75 Q_SIGNALS:
76 void keyPressed(QKeyEvent *);
77 void keyReleased(QKeyEvent *);
78
79 private:
80 bool m_paintBackground;
81 };
82} // namespace ak
#define UICORE_API_EXPORT
Definition globalDataTypes.h:20
This class combines the functionallity of a QCheckBox and a ak::object.
Definition aCheckBoxWidget.h:30
void keyPressed(QKeyEvent *)
void keyReleased(QKeyEvent *)
This class provides a interface that represents a widget. Every class derived from this class must be...
Definition aWidget.h:27
Definition uiAPI.h:45