Skip to content

Commit c037038

Browse files
committed
split p and q pointer
1 parent 735d402 commit c037038

File tree

63 files changed

+131
-26
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+131
-26
lines changed

components/CMakeLists.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,18 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
1818
find_package(Qt5 REQUIRED COMPONENTS Core)
1919
find_package(Qt5 REQUIRED COMPONENTS Widgets)
2020

21-
file(GLOB THELIB "lib/*")
21+
file(GLOB THELIB "materiallib/*")
2222
file(GLOB COMPONENTSHEADER "*.h")
2323
file(GLOB COMPONENTSSOURCE "*.cpp")
24+
file(GLOB HEADER "../include/qmetarial/*")
25+
file(GLOB HEADER2 "../include/qmetarial/lib/*")
26+
2427
set(RCC_FILES resources.qrc)
2528
add_library(${PROJECT_NAME} STATIC ${THELIB} ${COMPONENTSHEADER}
26-
${COMPONENTSSOURCE} ${RCC_FILES})
29+
${COMPONENTSSOURCE} ${RCC_FILES}
30+
${HEADER} ${HEADER2})
2731
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Core Qt5::Widgets)
28-
32+
target_include_directories(${PROJECT_NAME} PUBLIC
33+
../include/qmetarial/
34+
)
2935
target_link_directories(${PROJECT_NAME} PUBLIC .)

components/lib/qtmaterialcheckable.cpp renamed to components/materiallib/qtmaterialcheckable.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
#include "lib/qtmaterialcheckable.h"
2-
#include "lib/qtmaterialcheckable_internal.h"
3-
#include "lib/qtmaterialcheckable_p.h"
4-
#include "lib/qtmaterialripple.h"
5-
#include "lib/qtmaterialrippleoverlay.h"
6-
#include "lib/qtmaterialstyle.h"
1+
#include <lib/qtmaterialcheckable.h>
2+
#include <lib/qtmaterialcheckable_internal.h>
3+
#include <lib/qtmaterialripple.h>
4+
#include <lib/qtmaterialrippleoverlay.h>
5+
#include <lib/qtmaterialstyle.h>
6+
7+
#include "qtmaterialcheckable_p.h"
8+
79
#include <QColor>
810
#include <QCoreApplication>
911
#include <QEvent>

components/lib/qtmaterialcheckable_internal.cpp renamed to components/materiallib/qtmaterialcheckable_internal.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
#include "lib/qtmaterialcheckable_internal.h"
2-
#include "lib/qtmaterialcheckable.h"
1+
#include <lib/qtmaterialcheckable_internal.h>
2+
#include <lib/qtmaterialcheckable.h>
3+
34
#include <QIcon>
45
#include <QPainter>
56
#include <QTransform>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#ifndef QTMATERIALCHECKABLE_P_H
2+
#define QTMATERIALCHECKABLE_P_H
3+
4+
#include <lib/qtmaterialcheckable.h>
5+
#include <QtGlobal>
6+
7+
class QStateMachine;
8+
class QState;
9+
class QSignalTransition;
10+
class QtMaterialRippleOverlay;
11+
class QtMaterialCheckableIcon;
12+
13+
class QtMaterialCheckablePrivate
14+
{
15+
Q_DISABLE_COPY(QtMaterialCheckablePrivate)
16+
Q_DECLARE_PUBLIC(QtMaterialCheckable)
17+
18+
public:
19+
QtMaterialCheckablePrivate(QtMaterialCheckable *q);
20+
virtual ~QtMaterialCheckablePrivate();
21+
22+
void init();
23+
24+
QtMaterialCheckable *const q_ptr;
25+
QtMaterialRippleOverlay *rippleOverlay;
26+
QtMaterialCheckableIcon *checkedIcon;
27+
QtMaterialCheckableIcon *uncheckedIcon;
28+
QStateMachine *stateMachine;
29+
QState *uncheckedState;
30+
QState *checkedState;
31+
QState *disabledUncheckedState;
32+
QState *disabledCheckedState;
33+
QSignalTransition *uncheckedTransition;
34+
QSignalTransition *checkedTransition;
35+
QtMaterialCheckable::LabelPosition labelPosition;
36+
QColor checkedColor;
37+
QColor uncheckedColor;
38+
QColor textColor;
39+
QColor disabledColor;
40+
bool useThemeColors;
41+
};
42+
43+
#endif // QTMATERIALCHECKABLE_P_H

components/lib/qtmaterialoverlaywidget.cpp renamed to components/materiallib/qtmaterialoverlaywidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "lib/qtmaterialoverlaywidget.h"
1+
#include <lib/qtmaterialoverlaywidget.h>
22
#include <QEvent>
33

44
/*!

components/lib/qtmaterialripple.cpp renamed to components/materiallib/qtmaterialripple.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#include "qtmaterialripple.h"
2-
#include "lib/qtmaterialrippleoverlay.h"
1+
#include <lib/qtmaterialripple.h>
2+
#include <lib/qtmaterialrippleoverlay.h>
33

44
/*!
55
* \class QtMaterialRipple

components/lib/qtmaterialrippleoverlay.cpp renamed to components/materiallib/qtmaterialrippleoverlay.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#include "lib/qtmaterialrippleoverlay.h"
2-
#include "lib/qtmaterialripple.h"
1+
#include <lib/qtmaterialrippleoverlay.h>
2+
#include <lib/qtmaterialripple.h>
33
#include <QPainter>
44

55
/*!

components/lib/qtmaterialstatetransition.cpp renamed to components/materiallib/qtmaterialstatetransition.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "lib/qtmaterialstatetransition.h"
1+
#include <lib/qtmaterialstatetransition.h>
22

33
QtMaterialStateTransition::QtMaterialStateTransition(QtMaterialStateTransitionType type)
44
: m_type(type)

components/lib/qtmaterialstyle.cpp renamed to components/materiallib/qtmaterialstyle.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#include "lib/qtmaterialstyle.h"
2-
#include "lib/qtmaterialtheme.h"
1+
#include <lib/qtmaterialstyle.h>
2+
#include <lib/qtmaterialtheme.h>
33
#include <QFontDatabase>
44

55
/*!
File renamed without changes.

0 commit comments

Comments
 (0)