qt_demoe/maskwidget/maskwidget.h

44 lines
1.1 KiB
C
Raw Normal View History

2019-10-20 02:04:02 +00:00
#ifndef MASKWIDGET_H
#define MASKWIDGET_H
/**
* :feiyangqingyun(QQ:517216493) 2016-12-26
2020-12-24 10:00:09 +00:00
* 1. ,
* 2. ,
* 3.
* 4.
* 5.
2019-10-20 02:04:02 +00:00
*/
#include <QWidget>
#ifdef quc
2020-12-24 10:00:09 +00:00
class Q_DECL_EXPORT MaskWidget : public QWidget
2019-10-20 02:04:02 +00:00
#else
class MaskWidget : public QWidget
#endif
{
Q_OBJECT
public:
static MaskWidget *Instance();
explicit MaskWidget(QWidget *parent = 0);
protected:
void showEvent(QShowEvent *);
bool eventFilter(QObject *obj, QEvent *event);
private:
static QScopedPointer<MaskWidget> self;
QWidget *mainWidget; //需要遮罩的主窗体
QStringList dialogNames; //可能弹窗的窗体对象名称集合链表
public Q_SLOTS:
void setMainWidget(QWidget *mainWidget);
void setDialogNames(const QStringList &dialogNames);
void setBgColor(const QColor &bgColor);
void setOpacity(double opacity);
};
#endif // MASKWIDGET_H