add boilerplate for drawer private class

This commit is contained in:
laserpants 2016-06-23 10:18:43 +03:00
parent 9fc482e42a
commit 412fb61a8f
4 changed files with 28 additions and 2 deletions

View File

@ -1,4 +1,10 @@
#include "drawer.h"
#include "drawer_p.h"
DrawerPrivate(Drawer *q)
: q_ptr(q)
{
}
Drawer::Drawer(QWidget *parent)
: QWidget(parent)

View File

@ -11,9 +11,11 @@ public:
explicit Drawer(QWidget *parent = 0);
~Drawer();
Drawer *const q_ptr;
private:
Q_DISABLE_COPY(Drawer)
//Q_DECLARE_PRIVATE(Drawer)
Q_DECLARE_PRIVATE(Drawer)
};
#endif // DRAWER_H

17
components/drawer_p.h Normal file
View File

@ -0,0 +1,17 @@
#ifndef DRAWER_P_H
#define DRAWER_P_H
#include <QtGlobal>
class Drawer;
class DrawerPrivate
{
Q_DISABLE_COPY(DrawerPrivate)
Q_DECLARE_PUBLIC(Drawer)
public:
DrawerPrivate(Drawer *q);
};
#endif // DRAWER_P_H

View File

@ -158,7 +158,8 @@ HEADERS += mainwindow.h \
components/dialog_internal.h \
lib/transparencyproxy.h \
lib/transparencyproxy_p.h \
lib/transparencyproxy_internal.h
lib/transparencyproxy_internal.h \
components/drawer_p.h
RESOURCES += \
resources.qrc