SGL
gspacer.h
1 /*
2  * File: gspacer.h
3  * ---------------
4  *
5  * A GSpacer is just an empty blob of space that helps you pad layouts.
6  *
7  * @author Marty Stepp
8  * @version 2021/04/09
9  * - added sgl namespace
10  * @version 2018/10/06
11  * - initial version
12  */
13 
14 
15 #ifndef _gspacer_h
16 #define _gspacer_h
17 
18 #include <string>
19 
20 #include "ginteractor.h"
21 
22 namespace sgl {
23 
24 class _Internal_QSpacer;
25 
29 class GSpacer : public GInteractor {
30 public:
31  GSpacer(double width, double height, QWidget* parent = nullptr);
32 
36  ~GSpacer() override;
37 
38  /* @inherit */
39  _Internal_QWidget* getInternalWidget() const override;
40 
41  /* @inherit */
42  string getType() const override;
43 
44  /* @inherit */
45  QWidget* getWidget() const override;
46 
47 private:
48  Q_DISABLE_COPY(GSpacer)
49 
50  _Internal_QSpacer* _iqspacer;
51 
52  friend class _Internal_QSpacer;
53 };
54 
55 
60 class _Internal_QSpacer : public QWidget, public _Internal_QWidget {
61  Q_OBJECT
62 
63 public:
64  _Internal_QSpacer(GSpacer* gspacer, double width, double height, QWidget* parent = nullptr);
65  QSize sizeHint() const override;
66 
67 // private:
68  // GSpacer* _gspacer;
69 };
70 
71 } // namespace sgl
72 
73 #endif // _gspacer_h
GSpacer(double width, double height, QWidget* parent=nullptr)
Definition: gspacer.cpp:18
Definition: console.h:45
This abstract class is the superclass for all graphical interactors.
Definition: ginteractor.h:52
string getType() const override
Returns a string representing the class name of this interactor, such as "GButton" or "GCheckBox"...
Definition: gspacer.cpp:37
A GSpacer is just an empty blob of space that helps you pad layouts.
Definition: gspacer.h:29
_Internal_QWidget* getInternalWidget() const override
Returns a direct pointer to the internal Qt widget being wrapped by this interactor.
Definition: gspacer.cpp:33
~GSpacer() override
Frees memory allocated internally by the scroll pane.
Definition: gspacer.cpp:27
QWidget* getWidget() const override
Returns a direct pointer to the internal Qt widget being wrapped by this interactor.
Definition: gspacer.cpp:41