qt-material-widgets/components/fab.h

44 lines
908 B
C
Raw Normal View History

2016-06-12 08:21:58 +00:00
#ifndef FAB_H
#define FAB_H
2016-06-12 10:26:38 +00:00
#include "raisedbutton.h"
2016-06-12 08:21:58 +00:00
2016-06-12 11:05:31 +00:00
class FloatingActionButtonPrivate;
2016-06-12 10:26:38 +00:00
class FloatingActionButton : public RaisedButton
2016-06-12 08:21:58 +00:00
{
Q_OBJECT
public:
explicit FloatingActionButton(const QIcon &icon, QWidget *parent = 0);
2016-06-12 08:21:58 +00:00
~FloatingActionButton();
2016-06-12 11:05:31 +00:00
QSize sizeHint() const Q_DECL_OVERRIDE;
void setMini(bool state);
bool isMini() const;
void setCorner(Qt::Corner corner);
Qt::Corner corner() const;
2016-06-12 15:17:27 +00:00
void setOffset(int x, int y);
QSize offset() const;
void setXOffset(int x);
int xOffset() const;
void setYOffset(int y);
int yOffset() const;
2016-06-12 11:05:31 +00:00
protected:
bool event(QEvent *event) Q_DECL_OVERRIDE;
bool eventFilter(QObject *obj, QEvent *event) Q_DECL_OVERRIDE;
2016-06-12 11:05:31 +00:00
void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
2016-06-12 08:21:58 +00:00
private:
Q_DISABLE_COPY(FloatingActionButton)
2016-06-12 10:26:38 +00:00
Q_DECLARE_PRIVATE(FloatingActionButton)
2016-06-12 08:21:58 +00:00
};
#endif // FAB_H