diff --git a/components/fab.cpp b/components/fab.cpp index 5bb5416..347e67c 100644 --- a/components/fab.cpp +++ b/components/fab.cpp @@ -1,7 +1,7 @@ #include "fab.h" FloatingActionButton::FloatingActionButton(QWidget *parent) - : QWidget(parent) + : RaisedButton(parent) { } diff --git a/components/fab.h b/components/fab.h index b1fd028..cf3d61d 100644 --- a/components/fab.h +++ b/components/fab.h @@ -1,9 +1,9 @@ #ifndef FAB_H #define FAB_H -#include +#include "raisedbutton.h" -class FloatingActionButton : public QWidget +class FloatingActionButton : public RaisedButton { Q_OBJECT @@ -13,7 +13,7 @@ public: private: Q_DISABLE_COPY(FloatingActionButton) - //Q_DECLARE_PRIVATE(FloatingActionButton) + Q_DECLARE_PRIVATE(FloatingActionButton) }; #endif // FAB_H diff --git a/components/fab_p.h b/components/fab_p.h new file mode 100644 index 0000000..994f728 --- /dev/null +++ b/components/fab_p.h @@ -0,0 +1,26 @@ +#ifndef FAB_P_H +#define FAB_P_H + +#include "raisedbutton_p.h" + +class FloatingActionButtonPrivate : public RaisedButtonPrivate +{ + Q_DISABLE_COPY(FloatingActionButtonPrivate) + Q_DECLARE_PUBLIC(FloatingActionButton) + +public: + FloatingActionButtonPrivate(FloatingActionButton *q) + : RaisedButtonPrivate(q) + { + } + + ~FloatingActionButtonPrivate() + { + } + + void init() + { + } +}; + +#endif // FAB_P_H diff --git a/qt-material-widgets.pro b/qt-material-widgets.pro index c11d4f0..2c80951 100644 --- a/qt-material-widgets.pro +++ b/qt-material-widgets.pro @@ -119,7 +119,8 @@ HEADERS += mainwindow.h \ components/fab.h \ components/badge.h \ components/progress.h \ - components/selectfield.h + components/selectfield.h \ + components/fab_p.h RESOURCES += \ resources.qrc