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 2018/10/06
9  * - initial version
10  */
11 
12 
13 #ifndef _gspacer_h
14 #define _gspacer_h
15 
16 #include <string>
17 
18 #include "ginteractor.h"
19 
20 class _Internal_QSpacer;
24 class GSpacer : public GInteractor {
25 public:
26  GSpacer(double width, double height, QWidget* parent = nullptr);
27 
31  ~GSpacer() override;
32 
33  /* @inherit */
34  _Internal_QWidget* getInternalWidget() const override;
35 
36  /* @inherit */
37  string getType() const override;
38 
39  /* @inherit */
40  QWidget* getWidget() const override;
41 
42 private:
43  Q_DISABLE_COPY(GSpacer)
44 
45  _Internal_QSpacer* _iqspacer;
46 
47  friend class _Internal_QSpacer;
48 };
49 
50 
55 class _Internal_QSpacer : public QWidget, public _Internal_QWidget {
56  Q_OBJECT
57 
58 public:
59  _Internal_QSpacer(GSpacer* gspacer, double width, double height, QWidget* parent = nullptr);
60  QSize sizeHint() const override;
61 
62 // private:
63  // GSpacer* _gspacer;
64 };
65 
66 #endif // _gspacer_h
string getType() const override
Returns a string representing the class name of this interactor, such as "GButton" or "GCheckBox"...
Definition: gspacer.cpp:33
GSpacer(double width, double height, QWidget* parent=nullptr)
Definition: gspacer.cpp:14
QWidget* getWidget() const override
Returns a direct pointer to the internal Qt widget being wrapped by this interactor.
Definition: gspacer.cpp:37
_Internal_QWidget* getInternalWidget() const override
Returns a direct pointer to the internal Qt widget being wrapped by this interactor.
Definition: gspacer.cpp:29
A GSpacer is just an empty blob of space that helps you pad layouts.
Definition: gspacer.h:24
This abstract class is the superclass for all graphical interactors.
Definition: ginteractor.h:48
~GSpacer() override
Frees memory allocated internally by the scroll pane.
Definition: gspacer.cpp:23