qt-material-widgets/components/drawer.h

43 lines
792 B
C
Raw Normal View History

2016-06-17 11:45:27 +00:00
#ifndef DRAWER_H
#define DRAWER_H
2016-06-24 04:50:24 +00:00
#include "lib/overlaywidget.h"
2016-06-17 11:45:27 +00:00
2016-06-24 04:50:24 +00:00
class DrawerPrivate;
class DrawerStateMachine;
class Drawer : public OverlayWidget
2016-06-17 11:45:27 +00:00
{
Q_OBJECT
public:
explicit Drawer(QWidget *parent = 0);
~Drawer();
2016-06-24 04:50:24 +00:00
void setDrawerWidth(int width);
int drawerWidth() const;
void setDrawerLayout(QLayout *layout);
QLayout *drawerLayout() const;
protected slots:
void openDrawer();
void closeDrawer();
protected:
bool eventFilter(QObject *obj, QEvent *event) Q_DECL_OVERRIDE;
void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
QRect overlayGeometry() const;
const QScopedPointer<DrawerPrivate> d_ptr;
2016-06-17 11:45:27 +00:00
private:
Q_DISABLE_COPY(Drawer)
Q_DECLARE_PRIVATE(Drawer)
2016-06-24 04:50:24 +00:00
// friend class DrawerStateMachine;
2016-06-17 11:45:27 +00:00
};
#endif // DRAWER_H