split p and q pointer
This commit is contained in:
parent
1e5caafa2b
commit
0b85eec397
|
@ -18,12 +18,18 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|||
find_package(Qt5 REQUIRED COMPONENTS Core)
|
||||
find_package(Qt5 REQUIRED COMPONENTS Widgets)
|
||||
|
||||
file(GLOB THELIB "lib/*")
|
||||
file(GLOB THELIB "materiallib/*")
|
||||
file(GLOB COMPONENTSHEADER "*.h")
|
||||
file(GLOB COMPONENTSSOURCE "*.cpp")
|
||||
file(GLOB HEADER "../include/qmetarial/*")
|
||||
file(GLOB HEADER2 "../include/qmetarial/lib/*")
|
||||
|
||||
set(RCC_FILES resources.qrc)
|
||||
add_library(${PROJECT_NAME} STATIC ${THELIB} ${COMPONENTSHEADER}
|
||||
${COMPONENTSSOURCE} ${RCC_FILES})
|
||||
${COMPONENTSSOURCE} ${RCC_FILES}
|
||||
${HEADER} ${HEADER2})
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Core Qt5::Widgets)
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC
|
||||
../include/qmetarial/
|
||||
)
|
||||
target_link_directories(${PROJECT_NAME} PUBLIC .)
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
#include "lib/qtmaterialcheckable.h"
|
||||
#include "lib/qtmaterialcheckable_internal.h"
|
||||
#include "lib/qtmaterialcheckable_p.h"
|
||||
#include "lib/qtmaterialripple.h"
|
||||
#include "lib/qtmaterialrippleoverlay.h"
|
||||
#include "lib/qtmaterialstyle.h"
|
||||
#include <lib/qtmaterialcheckable.h>
|
||||
#include <lib/qtmaterialcheckable_internal.h>
|
||||
#include <lib/qtmaterialripple.h>
|
||||
#include <lib/qtmaterialrippleoverlay.h>
|
||||
#include <lib/qtmaterialstyle.h>
|
||||
|
||||
#include "qtmaterialcheckable_p.h"
|
||||
|
||||
#include <QColor>
|
||||
#include <QCoreApplication>
|
||||
#include <QEvent>
|
|
@ -1,5 +1,6 @@
|
|||
#include "lib/qtmaterialcheckable_internal.h"
|
||||
#include "lib/qtmaterialcheckable.h"
|
||||
#include <lib/qtmaterialcheckable_internal.h>
|
||||
#include <lib/qtmaterialcheckable.h>
|
||||
|
||||
#include <QIcon>
|
||||
#include <QPainter>
|
||||
#include <QTransform>
|
|
@ -0,0 +1,43 @@
|
|||
#ifndef QTMATERIALCHECKABLE_P_H
|
||||
#define QTMATERIALCHECKABLE_P_H
|
||||
|
||||
#include <lib/qtmaterialcheckable.h>
|
||||
#include <QtGlobal>
|
||||
|
||||
class QStateMachine;
|
||||
class QState;
|
||||
class QSignalTransition;
|
||||
class QtMaterialRippleOverlay;
|
||||
class QtMaterialCheckableIcon;
|
||||
|
||||
class QtMaterialCheckablePrivate
|
||||
{
|
||||
Q_DISABLE_COPY(QtMaterialCheckablePrivate)
|
||||
Q_DECLARE_PUBLIC(QtMaterialCheckable)
|
||||
|
||||
public:
|
||||
QtMaterialCheckablePrivate(QtMaterialCheckable *q);
|
||||
virtual ~QtMaterialCheckablePrivate();
|
||||
|
||||
void init();
|
||||
|
||||
QtMaterialCheckable *const q_ptr;
|
||||
QtMaterialRippleOverlay *rippleOverlay;
|
||||
QtMaterialCheckableIcon *checkedIcon;
|
||||
QtMaterialCheckableIcon *uncheckedIcon;
|
||||
QStateMachine *stateMachine;
|
||||
QState *uncheckedState;
|
||||
QState *checkedState;
|
||||
QState *disabledUncheckedState;
|
||||
QState *disabledCheckedState;
|
||||
QSignalTransition *uncheckedTransition;
|
||||
QSignalTransition *checkedTransition;
|
||||
QtMaterialCheckable::LabelPosition labelPosition;
|
||||
QColor checkedColor;
|
||||
QColor uncheckedColor;
|
||||
QColor textColor;
|
||||
QColor disabledColor;
|
||||
bool useThemeColors;
|
||||
};
|
||||
|
||||
#endif // QTMATERIALCHECKABLE_P_H
|
|
@ -1,4 +1,4 @@
|
|||
#include "lib/qtmaterialoverlaywidget.h"
|
||||
#include <lib/qtmaterialoverlaywidget.h>
|
||||
#include <QEvent>
|
||||
|
||||
/*!
|
|
@ -1,5 +1,5 @@
|
|||
#include "qtmaterialripple.h"
|
||||
#include "lib/qtmaterialrippleoverlay.h"
|
||||
#include <lib/qtmaterialripple.h>
|
||||
#include <lib/qtmaterialrippleoverlay.h>
|
||||
|
||||
/*!
|
||||
* \class QtMaterialRipple
|
|
@ -1,5 +1,5 @@
|
|||
#include "lib/qtmaterialrippleoverlay.h"
|
||||
#include "lib/qtmaterialripple.h"
|
||||
#include <lib/qtmaterialrippleoverlay.h>
|
||||
#include <lib/qtmaterialripple.h>
|
||||
#include <QPainter>
|
||||
|
||||
/*!
|
|
@ -1,4 +1,4 @@
|
|||
#include "lib/qtmaterialstatetransition.h"
|
||||
#include <lib/qtmaterialstatetransition.h>
|
||||
|
||||
QtMaterialStateTransition::QtMaterialStateTransition(QtMaterialStateTransitionType type)
|
||||
: m_type(type)
|
|
@ -1,5 +1,5 @@
|
|||
#include "lib/qtmaterialstyle.h"
|
||||
#include "lib/qtmaterialtheme.h"
|
||||
#include <lib/qtmaterialstyle.h>
|
||||
#include <lib/qtmaterialtheme.h>
|
||||
#include <QFontDatabase>
|
||||
|
||||
/*!
|
|
@ -1,5 +1,7 @@
|
|||
#include "lib/qtmaterialtheme.h"
|
||||
#include "lib/qtmaterialtheme_p.h"
|
||||
#include <lib/qtmaterialtheme.h>
|
||||
|
||||
#include "qtmaterialtheme_p.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QString>
|
||||
#include <QStringBuilder>
|
|
@ -8,7 +8,9 @@
|
|||
|
||||
/*!
|
||||
* \class QtMaterialRadioButtonPrivate
|
||||
* \internal
|
||||
* @parma state private class
|
||||
* @internal
|
||||
*
|
||||
*/
|
||||
|
||||
QtMaterialRadioButtonPrivate::QtMaterialRadioButtonPrivate(QtMaterialRadioButton *q)
|
||||
|
@ -20,6 +22,7 @@ QtMaterialRadioButtonPrivate::~QtMaterialRadioButtonPrivate() {}
|
|||
|
||||
void QtMaterialRadioButtonPrivate::init()
|
||||
{
|
||||
// get the public button
|
||||
Q_Q(QtMaterialRadioButton);
|
||||
|
||||
q->setAutoExclusive(true);
|
||||
|
|
|
@ -29,7 +29,7 @@ add_executable(
|
|||
${RCC_FILES}
|
||||
)
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC
|
||||
../components/
|
||||
../include/qmetarial/
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
#ifndef QTMATERIALSTYLE_P_H
|
||||
#define QTMATERIALSTYLE_P_H
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
class QtMaterialStyle;
|
||||
class QtMaterialTheme;
|
||||
|
||||
class QtMaterialStylePrivate
|
||||
{
|
||||
Q_DISABLE_COPY(QtMaterialStylePrivate)
|
||||
Q_DECLARE_PUBLIC(QtMaterialStyle)
|
||||
|
||||
public:
|
||||
QtMaterialStylePrivate(QtMaterialStyle *q);
|
||||
~QtMaterialStylePrivate();
|
||||
|
||||
void init();
|
||||
|
||||
QtMaterialStyle *const q_ptr;
|
||||
QtMaterialTheme *theme;
|
||||
};
|
||||
|
||||
#endif // QTMATERIALSTYLE_P_H
|
|
@ -0,0 +1,24 @@
|
|||
#ifndef QTMATERIALTHEME_P_H
|
||||
#define QTMATERIALTHEME_P_H
|
||||
|
||||
#include <QColor>
|
||||
#include <QHash>
|
||||
|
||||
class QtMaterialTheme;
|
||||
|
||||
class QtMaterialThemePrivate
|
||||
{
|
||||
Q_DISABLE_COPY(QtMaterialThemePrivate)
|
||||
Q_DECLARE_PUBLIC(QtMaterialTheme)
|
||||
|
||||
public:
|
||||
QtMaterialThemePrivate(QtMaterialTheme *q);
|
||||
~QtMaterialThemePrivate();
|
||||
|
||||
QColor rgba(int r, int g, int b, qreal a) const;
|
||||
|
||||
QtMaterialTheme *const q_ptr;
|
||||
QHash<QString, QColor> colors;
|
||||
};
|
||||
|
||||
#endif // QTMATERIALTHEME_P_H
|
|
@ -1,8 +1,8 @@
|
|||
#ifndef QTMATERIALPROGRESS_INTERNAL_H
|
||||
#define QTMATERIALPROGRESS_INTERNAL_H
|
||||
|
||||
#include <QObject>
|
||||
#include "qtmaterialprogress.h"
|
||||
#include <QObject>
|
||||
|
||||
class QtMaterialProgressDelegate : public QObject
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ private:
|
|||
Q_DISABLE_COPY(QtMaterialProgressDelegate)
|
||||
|
||||
QtMaterialProgress *const m_progress;
|
||||
qreal m_offset;
|
||||
qreal m_offset;
|
||||
};
|
||||
|
||||
inline void QtMaterialProgressDelegate::setOffset(qreal offset)
|
||||
|
@ -35,4 +35,4 @@ inline qreal QtMaterialProgressDelegate::offset() const
|
|||
return m_offset;
|
||||
}
|
||||
|
||||
#endif // QTMATERIALPROGRESS_INTERNAL_H
|
||||
#endif // QTMATERIALPROGRESS_INTERNAL_H
|
Loading…
Reference in New Issue