12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #ifndef CUSTOMGRIP_H
- #define CUSTOMGRIP_H
- #include <QFrame>
- #include <QHBoxLayout>
- class Widgets;
- class CustomGrip : public QWidget
- {
- Q_OBJECT
- public:
- explicit CustomGrip(QWidget *parent, Qt::Edge positon, bool disableColor = false);
- QPoint mousePos;
- private:
- Widgets *wi;
- // QWidget interface
- protected:
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
- bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE;
- };
- class Widgets : public QObject
- {
- public:
- Widgets(QObject *parent = nullptr);
- void top(QWidget *form);
- void bottom(QWidget *form);
- void left(QWidget *form);
- void right(QWidget *form);
- QFrame *m_containerTop;
- QHBoxLayout *m_topLayout;
- QFrame *m_topLeft;
- QFrame *m_top;
- QFrame *m_topRight;
- QFrame *m_containerBottom;
- QHBoxLayout *m_bottomLayout;
- QFrame *m_bottomLeft;
- QFrame *m_bottom;
- QFrame *m_bottomRight;
- QFrame *m_leftgrip;
- QFrame *m_rightgrip;
- };
- #endif // CUSTOMGRIP_H
|