OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
Painter2DEditButton.h
Go to the documentation of this file.
1
4// ###########################################################################################################################################################################################################################################################################################################################
5
6#pragma once
7
8// OpenTwin header
11
12// Qt header
13#include <QtWidgets/qframe.h>
14
15namespace ot{
16
17 class Painter2D;
18 class PushButton;
19 class Painter2DPreview;
20
22 Q_OBJECT
24 public:
27 Painter2DEditButton(Painter2D* _painter = (Painter2D*)nullptr, QWidget* _parent = (QWidget*)nullptr);
28
31 Painter2DEditButton(const Painter2D* _painter, QWidget* _parent = (QWidget*)nullptr);
32 virtual ~Painter2DEditButton();
33
34 virtual bool eventFilter(QObject* _obj, QEvent* _event) override;
35
36 virtual QWidget* getQWidget(void) override { return this; };
37 virtual const QWidget* getQWidget(void) const override { return this; };
38
39 PushButton* getPushButton(void) const { return m_btn; };
40
41 void setPainter(Painter2D* _painter);
42 void setPainter(const Painter2D* _painter);
43 const Painter2D* getPainter(void) { return m_painter; };
44
45 Q_SIGNALS:
46 void painter2DChanged(void);
47
48 private Q_SLOTS:
49 void slotClicked(void);
50
51 private:
52 Painter2D* m_painter;
53 PushButton* m_btn;
54 QString m_btnTip;
55 QString m_btnText;
56 Painter2DPreview* m_preview;
57
58 void ini(void);
59 void updateText(void);
60 };
61}
62
This file contains defines that may be used simplyfy class creation.
#define OT_DECL_NOCOPY(___class)
Removes the default copy constructor and assignment operator.
Definition OTClassHelper.h:14
#define OT_WIDGETS_API_EXPORT
Definition OTWidgetsAPIExport.h:12
Definition Painter2DEditButton.h:21
PushButton * getPushButton(void) const
Definition Painter2DEditButton.h:39
virtual QWidget * getQWidget(void) override
Returns a pointer to the root widget of this object.
Definition Painter2DEditButton.h:36
const Painter2D * getPainter(void)
Definition Painter2DEditButton.h:43
virtual const QWidget * getQWidget(void) const override
Definition Painter2DEditButton.h:37
Definition Painter2D.h:17
Definition Painter2DPreview.h:21
Definition PushButton.h:17
Definition QWidgetInterface.h:18
Definition Connector.h:8