代码拉取完成,页面将自动刷新
#ifndef QTMATERIALDIALOG_INTERNAL_H
#define QTMATERIALDIALOG_INTERNAL_H
#include <QWidget>
class QStackedLayout;
class QtMaterialDialog;
class QtMaterialDialogWindow;
class QtMaterialDialogProxy : public QWidget
{
Q_OBJECT
Q_PROPERTY(qreal opacity WRITE setOpacity READ opacity)
enum TransparencyMode
{
Transparent,
SemiTransparent,
Opaque,
};
public:
QtMaterialDialogProxy(QtMaterialDialogWindow *source, QStackedLayout *layout, QtMaterialDialog *dialog, QWidget *parent = nullptr);
~QtMaterialDialogProxy() override;
void setOpacity(qreal opacity);
inline qreal opacity() const;
public slots:
void makeOpaque();
void makeTransparent();
public:
QSize sizeHint() const override;
protected:
bool event(QEvent *event) override;
void paintEvent(QPaintEvent *event) override;
private:
Q_DISABLE_COPY(QtMaterialDialogProxy)
QtMaterialDialogWindow *const m_source;
QStackedLayout *const m_layout;
QtMaterialDialog *const m_dialog;
qreal m_opacity;
TransparencyMode m_mode;
};
inline qreal QtMaterialDialogProxy::opacity() const
{
return m_opacity;
}
class QtMaterialDialogWindow : public QWidget
{
Q_OBJECT
Q_PROPERTY(int offset WRITE setOffset READ offset)
public:
explicit QtMaterialDialogWindow(QtMaterialDialog *dialog, QWidget *parent = nullptr);
~QtMaterialDialogWindow() override;
void setOffset(int offset);
int offset() const;
protected:
void paintEvent(QPaintEvent *event) override;
private:
Q_DISABLE_COPY(QtMaterialDialogWindow)
QtMaterialDialog *const m_dialog;
};
#endif // QTMATERIALDIALOG_INTERNAL_H
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。