1 Star 0 Fork 0

tongy boys/material-pri

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
qtmaterialdrawer.h 1.43 KB
一键复制 编辑 原始数据 按行查看 历史
木公大人 提交于 2024-06-25 22:58 . 为drawer增加方向选择功能
#ifndef QTMATERIALDRAWER_H
#define QTMATERIALDRAWER_H
#include "qtmaterialwidgets.h"
#include "lib/qtmaterialoverlaywidget.h"
class QtMaterialDrawerPrivate;
class QtMaterialDrawerStateMachine;
class QTMATERIALWIDGETS_EXPORT QtMaterialDrawer : public QtMaterialOverlayWidget
{
Q_OBJECT
Q_PROPERTY(bool clickOutsideToClose READ clickOutsideToClose WRITE setClickOutsideToClose)
Q_PROPERTY(bool autoRaise READ autoRaise WRITE setAutoRaise)
Q_PROPERTY(bool overlayMode READ overlayMode WRITE setOverlayMode)
public:
explicit QtMaterialDrawer(QWidget *parent = nullptr);
~QtMaterialDrawer() override;
int drawerWidth() const;
void setDrawerWidth(int width);
QLayout *drawerLayout() const;
void setDrawerLayout(QLayout *layout);
bool clickOutsideToClose() const;
void setClickOutsideToClose(bool state);
bool autoRaise() const;
void setAutoRaise(bool state);
bool overlayMode() const;
void setOverlayMode(bool value);
void setDirection(bool isLeft);
public slots:
void openDrawer();
void closeDrawer();
protected:
const QScopedPointer<QtMaterialDrawerPrivate> d_ptr;
private:
Q_DISABLE_COPY(QtMaterialDrawer)
Q_DECLARE_PRIVATE(QtMaterialDrawer)
// QWidget interface
protected:
bool event(QEvent *event) override;
bool eventFilter(QObject *obj, QEvent *event) override;
void paintEvent(QPaintEvent *event) override;
};
#endif // QTMATERIALDRAWER_H
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/tongynj/material-pri.git
git@gitee.com:tongynj/material-pri.git
tongynj
material-pri
material-pri
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385