Refactor code
This commit is contained in:
parent
8aea7dfc46
commit
c1ab9019d7
|
@ -2,11 +2,11 @@
|
|||
#define QTMATERIALCHECKABLE_H
|
||||
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
class QtMaterialCheckablePrivate;
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialCheckable : public QAbstractButton
|
||||
class QT_MATERIAL_EXPORT QtMaterialCheckable : public QAbstractButton
|
||||
{
|
||||
Q_OBJECT
|
||||
// Q_PROPERTY(LabelPosition labelPosition READ setLabelPosition WRITE labelPosition)
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
#define QTMATERIALCONST_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT MaterialConst: public QObject
|
||||
class QT_MATERIAL_EXPORT MaterialConst: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
#define QTMATERIALOVERLAYWIDGET_H
|
||||
|
||||
#include <QtWidgets/QWidget>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialOverlayWidget : public QWidget
|
||||
class QT_MATERIAL_EXPORT QtMaterialOverlayWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
#include <QPropertyAnimation>
|
||||
#include <QPoint>
|
||||
#include <QBrush>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
class QtMaterialRippleOverlay;
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialRipple : public QParallelAnimationGroup
|
||||
class QT_MATERIAL_EXPORT QtMaterialRipple : public QParallelAnimationGroup
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
|
||||
#include <QPainterPath>
|
||||
#include "lib/qtmaterialoverlaywidget.h"
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
class QtMaterialRipple;
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialRippleOverlay : public QtMaterialOverlayWidget
|
||||
class QT_MATERIAL_EXPORT QtMaterialRippleOverlay : public QtMaterialOverlayWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
|
||||
#include <QtWidgets/QCommonStyle>
|
||||
#include "lib/qtmaterialstyle_p.h"
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
#define MATERIAL_DISABLE_THEME_COLORS \
|
||||
if (d->useThemeColors == true) { d->useThemeColors = false; }
|
||||
|
||||
class QtMaterialTheme;
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialStyle : public QCommonStyle
|
||||
class QT_MATERIAL_EXPORT QtMaterialStyle : public QCommonStyle
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
#include <QColor>
|
||||
#include <QIcon>
|
||||
#include "qtmaterialconst.h"
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
class QtMaterialThemePrivate;
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialTheme : public QObject
|
||||
class QT_MATERIAL_EXPORT QtMaterialTheme : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
COMP_PATH=$$PWD
|
||||
|
||||
INCLUDEPATH += $$COMP_PATH
|
||||
DEFINES += QDESIGNER_EXPORT_WIDGETS
|
||||
DEFINES += QT_MATERIAL_LIBRARY
|
||||
|
||||
SOURCES += \
|
||||
$$COMP_PATH/qtmaterialavatar.cpp \
|
||||
|
@ -131,6 +131,7 @@ HEADERS += \
|
|||
$$COMP_PATH/qtmateriallistitem.h \
|
||||
$$COMP_PATH/qtmateriallistitem_p.h \
|
||||
$$PWD/lib/qtmaterialconst.h \
|
||||
$$PWD/qtmaterial_global.h \
|
||||
$$PWD/qtmaterialtabwidget.h
|
||||
|
||||
RESOURCES += \
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
#ifndef QTMATERIAL_GLOBAL_H
|
||||
#define QTMATERIAL_GLOBAL_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#if defined(QT_MATERIAL_LIBRARY)
|
||||
# define QT_MATERIAL_EXPORT Q_DECL_EXPORT
|
||||
#else
|
||||
# define QT_MATERIAL_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
||||
#endif // QTMATERIAL_GLOBAL_H
|
|
@ -3,11 +3,11 @@
|
|||
|
||||
#include <QtWidgets/QWidget>
|
||||
#include <QtWidgets/QHBoxLayout>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
class QtMaterialAppBarPrivate;
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialAppBar : public QWidget
|
||||
class QT_MATERIAL_EXPORT QtMaterialAppBar : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
#define QTMATERIALAUTOCOMPLETE_H
|
||||
|
||||
#include "qtmaterialtextfield.h"
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
class QtMaterialAutoCompletePrivate;
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialAutoComplete : public QtMaterialTextField
|
||||
class QT_MATERIAL_EXPORT QtMaterialAutoComplete : public QtMaterialTextField
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QStringList dataSource WRITE setDataSource READ dataSource)
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
|
||||
#include <QtWidgets/QWidget>
|
||||
#include "lib/qtmaterialtheme.h"
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
class QtMaterialAvatarPrivate;
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialAvatar : public QWidget
|
||||
class QT_MATERIAL_EXPORT QtMaterialAvatar : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
|
||||
#include "lib/qtmaterialoverlaywidget.h"
|
||||
#include <QIcon>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
class QtMaterialBadgePrivate;
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialBadge : public QtMaterialOverlayWidget
|
||||
class QT_MATERIAL_EXPORT QtMaterialBadge : public QtMaterialOverlayWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
#define QTMATERIALCHECKBOX_H
|
||||
|
||||
#include "lib/qtmaterialcheckable.h"
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
class QtMaterialCheckBoxPrivate;
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialCheckBox : public QtMaterialCheckable
|
||||
class QT_MATERIAL_EXPORT QtMaterialCheckBox : public QtMaterialCheckable
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
|
||||
#include <QtWidgets/QProgressBar>
|
||||
#include "lib/qtmaterialtheme.h"
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
class QtMaterialCircularProgressPrivate;
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialCircularProgress : public QProgressBar
|
||||
class QT_MATERIAL_EXPORT QtMaterialCircularProgress : public QProgressBar
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
|
||||
#include <QScopedPointer>
|
||||
#include "lib/qtmaterialoverlaywidget.h"
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
class QLayout;
|
||||
class QtMaterialDialogPrivate;
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialDialog : public QtMaterialOverlayWidget
|
||||
class QT_MATERIAL_EXPORT QtMaterialDialog : public QtMaterialOverlayWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
#define QTMATERIALDRAWER_H
|
||||
|
||||
#include "lib/qtmaterialoverlaywidget.h"
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
class QtMaterialDrawerPrivate;
|
||||
class QtMaterialDrawerStateMachine;
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialDrawer : public QtMaterialOverlayWidget
|
||||
class QT_MATERIAL_EXPORT QtMaterialDrawer : public QtMaterialOverlayWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
#define QTMATERIALFAB_H
|
||||
|
||||
#include "qtmaterialraisedbutton.h"
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
class QtMaterialFloatingActionButtonPrivate;
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialFloatingActionButton : public QtMaterialRaisedButton
|
||||
class QT_MATERIAL_EXPORT QtMaterialFloatingActionButton : public QtMaterialRaisedButton
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool mini WRITE setMini READ isMini)
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
#include <QtWidgets/QPushButton>
|
||||
#include <QScopedPointer>
|
||||
#include "lib/qtmaterialtheme.h"
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
class QtMaterialFlatButtonPrivate;
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialFlatButton : public QPushButton
|
||||
class QT_MATERIAL_EXPORT QtMaterialFlatButton : public QPushButton
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QColor foregroundColor WRITE setForegroundColor READ foregroundColor)
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
#define QTMATERIALICONBUTTON_H
|
||||
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
class QtMaterialIconButtonPrivate;
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialIconButton : public QAbstractButton
|
||||
class QT_MATERIAL_EXPORT QtMaterialIconButton : public QAbstractButton
|
||||
{
|
||||
Q_OBJECT
|
||||
// Q_PROPERTY(bool useThemeColors READ setUseThemeColors WRITE useThemeColors)
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
#define QTMATERIALMENU_H
|
||||
|
||||
#include <QtWidgets/QWidget>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialMenu : public QWidget
|
||||
class QT_MATERIAL_EXPORT QtMaterialMenu : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
|
||||
#include <QtWidgets/QProgressBar>
|
||||
#include "lib/qtmaterialtheme.h"
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
class QtMaterialProgressPrivate;
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialProgress : public QProgressBar
|
||||
class QT_MATERIAL_EXPORT QtMaterialProgress : public QProgressBar
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
#define QTMATERIALRADIOBUTTON_H
|
||||
|
||||
#include "lib/qtmaterialcheckable.h"
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
class QtMaterialRadioButtonPrivate;
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialRadioButton : public QtMaterialCheckable
|
||||
class QT_MATERIAL_EXPORT QtMaterialRadioButton : public QtMaterialCheckable
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
#define QTMATERIALRAISEDBUTTON_H
|
||||
|
||||
#include "qtmaterialflatbutton.h"
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
class QtMaterialRaisedButtonPrivate;
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialRaisedButton : public QtMaterialFlatButton
|
||||
class QT_MATERIAL_EXPORT QtMaterialRaisedButton : public QtMaterialFlatButton
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
#define QTMATERIALSCROLLBAR_H
|
||||
|
||||
#include <QtWidgets/QScrollBar>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
class QtMaterialScrollBarPrivate;
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialScrollBar : public QScrollBar
|
||||
class QT_MATERIAL_EXPORT QtMaterialScrollBar : public QScrollBar
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
|
||||
#include <QtWidgets/QAbstractSlider>
|
||||
#include <QScopedPointer>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
#define QT_MATERIAL_SLIDER_MARGIN 10
|
||||
|
||||
class QtMaterialSliderPrivate;
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialSlider : public QAbstractSlider
|
||||
class QT_MATERIAL_EXPORT QtMaterialSlider : public QAbstractSlider
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
#define QTMATERIALSNACKBAR_H
|
||||
|
||||
#include "lib/qtmaterialoverlaywidget.h"
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
class QtMaterialSnackbarPrivate;
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialSnackbar : public QtMaterialOverlayWidget
|
||||
class QT_MATERIAL_EXPORT QtMaterialSnackbar : public QtMaterialOverlayWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
#include <QtWidgets/QWidget>
|
||||
#include <QIcon>
|
||||
#include "lib/qtmaterialtheme.h"
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
class QtMaterialTabsPrivate;
|
||||
class QtMaterialTab;
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialTabs : public QWidget
|
||||
class QT_MATERIAL_EXPORT QtMaterialTabs : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
#define QTMATERIALTABWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QStackedWidget;
|
||||
QT_END_NAMESPACE
|
||||
class QtMaterialTabs;
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialTabWidget : public QWidget
|
||||
class QT_MATERIAL_EXPORT QtMaterialTabWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex)
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
|
||||
#include <QtWidgets/QLineEdit>
|
||||
#include <QColor>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
class QtMaterialTextFieldPrivate;
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialTextField : public QLineEdit
|
||||
class QT_MATERIAL_EXPORT QtMaterialTextField : public QLineEdit
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
#define QTMATERIALTOGGLE_H
|
||||
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qtmaterial_global.h"
|
||||
|
||||
class QtMaterialTogglePrivate;
|
||||
|
||||
class QDESIGNER_WIDGET_EXPORT QtMaterialToggle : public QAbstractButton
|
||||
class QT_MATERIAL_EXPORT QtMaterialToggle : public QAbstractButton
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
Loading…
Reference in New Issue