add boilerplate code to Progress
This commit is contained in:
parent
75af97d4d3
commit
3cd3953629
|
@ -0,0 +1 @@
|
|||
#include "circularprogress.h"
|
|
@ -1,8 +1,24 @@
|
|||
#include "progress.h"
|
||||
#include "progress_p.h"
|
||||
|
||||
ProgressPrivate::ProgressPrivate(Progress *q)
|
||||
: q_ptr(q)
|
||||
{
|
||||
}
|
||||
|
||||
ProgressPrivate::~ProgressPrivate()
|
||||
{
|
||||
}
|
||||
|
||||
void ProgressPrivate::init()
|
||||
{
|
||||
}
|
||||
|
||||
Progress::Progress(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
: QWidget(parent),
|
||||
d_ptr(new ProgressPrivate(this))
|
||||
{
|
||||
d_func()->init();
|
||||
}
|
||||
|
||||
Progress::~Progress()
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include <QWidget>
|
||||
|
||||
class ProgressPrivate;
|
||||
|
||||
class Progress : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -11,9 +13,12 @@ public:
|
|||
explicit Progress(QWidget *parent = 0);
|
||||
~Progress();
|
||||
|
||||
protected:
|
||||
const QScopedPointer<ProgressPrivate> d_ptr;
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(Progress)
|
||||
//Q_DECLARE_PRIVATE(Progress)
|
||||
Q_DECLARE_PRIVATE(Progress)
|
||||
};
|
||||
|
||||
#endif // PROGRESS_H
|
||||
|
|
|
@ -1,4 +1,22 @@
|
|||
#ifndef PROGRESS_P_H
|
||||
#define PROGRESS_P_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class Progress;
|
||||
|
||||
class ProgressPrivate
|
||||
{
|
||||
Q_DISABLE_COPY(ProgressPrivate)
|
||||
Q_DECLARE_PUBLIC(Progress)
|
||||
|
||||
public:
|
||||
ProgressPrivate(Progress *q);
|
||||
~ProgressPrivate();
|
||||
|
||||
void init();
|
||||
|
||||
Progress *const q_ptr;
|
||||
};
|
||||
|
||||
#endif // PROGRESS_P_H
|
||||
|
|
|
@ -65,7 +65,8 @@ SOURCES += main.cpp\
|
|||
components/snackbar.cpp \
|
||||
components/textfield_internal.cpp \
|
||||
components/drawer.cpp \
|
||||
components/snackbar_internal.cpp
|
||||
components/snackbar_internal.cpp \
|
||||
components/circularprogress.cpp
|
||||
|
||||
HEADERS += mainwindow.h \
|
||||
components/appbar.h \
|
||||
|
@ -139,7 +140,10 @@ HEADERS += mainwindow.h \
|
|||
components/badge_p.h \
|
||||
components/drawer.h \
|
||||
components/avatar_p.h \
|
||||
components/snackbar_internal.h
|
||||
components/snackbar_internal.h \
|
||||
components/progress_p.h \
|
||||
components/circularprogress.h \
|
||||
components/circularprogress_p.h
|
||||
|
||||
RESOURCES += \
|
||||
resources.qrc
|
||||
|
|
Loading…
Reference in New Issue