12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- #ifndef QTMATERIALDRAWER_H
- #define QTMATERIALDRAWER_H
- #include "lib/qtmaterialoverlaywidget.h"
- class QtMaterialDrawerPrivate;
- class QtMaterialDrawerStateMachine;
- class QtMaterialDrawer : public QtMaterialOverlayWidget
- {
- Q_OBJECT
- public:
- explicit QtMaterialDrawer(QWidget *parent = 0);
- ~QtMaterialDrawer();
- void setDrawerWidth(int width);
- int drawerWidth() const;
- void setDrawerLayout(QLayout *layout);
- QLayout *drawerLayout() const;
- void setClickOutsideToClose(bool state);
- bool clickOutsideToClose() const;
- void setAutoRaise(bool state);
- bool autoRaise() const;
- void setOverlayMode(bool value);
- bool overlayMode() const;
- public slots:
- void openDrawer();
- void closeDrawer();
- protected:
- bool event(QEvent *event) Q_DECL_OVERRIDE;
- bool eventFilter(QObject *obj, QEvent *event) Q_DECL_OVERRIDE;
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
- const QScopedPointer<QtMaterialDrawerPrivate> d_ptr;
- private:
- Q_DISABLE_COPY(QtMaterialDrawer)
- Q_DECLARE_PRIVATE(QtMaterialDrawer)
- };
- #endif // QTMATERIALDRAWER_H
|