MaskDialogBase.h 852 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef MASKDIALOGBASE_H
  2. #define MASKDIALOGBASE_H
  3. #include <QDialog>
  4. #include <QHBoxLayout>
  5. #include <QFrame>
  6. class MaskDialogBase : public QDialog
  7. {
  8. Q_OBJECT
  9. public:
  10. explicit MaskDialogBase(QWidget *parent = nullptr);
  11. void setShadowEffect(float blurRadius = 60, const QPointF &offset = QPoint(0, 10),
  12. const QColor &color = QColor(0, 0, 0, 100));
  13. void setMaskColor(const QColor &color);
  14. QFrame *widget;
  15. QWidget *windowMask;
  16. // QWidget interface
  17. QHBoxLayout *hBoxLayout() const;
  18. protected:
  19. bool eventFilter(QObject *watched, QEvent *event) override;
  20. void resizeEvent(QResizeEvent *event) override;
  21. void closeEvent(QCloseEvent *event) override;
  22. void showEvent(QShowEvent *event) override;
  23. signals:
  24. private:
  25. QHBoxLayout *m_hBoxLayout;
  26. };
  27. #endif // MASKDIALOGBASE_H