diff --git a/components/lib/qtmaterialcheckable.h b/components/lib/qtmaterialcheckable.h index 3b4b608..eeeb5b1 100644 --- a/components/lib/qtmaterialcheckable.h +++ b/components/lib/qtmaterialcheckable.h @@ -2,11 +2,11 @@ #define QTMATERIALCHECKABLE_H #include -#include +#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) diff --git a/components/lib/qtmaterialconst.h b/components/lib/qtmaterialconst.h index 6690ffe..eac158e 100644 --- a/components/lib/qtmaterialconst.h +++ b/components/lib/qtmaterialconst.h @@ -2,9 +2,9 @@ #define QTMATERIALCONST_H #include -#include +#include "qtmaterial_global.h" -class QDESIGNER_WIDGET_EXPORT MaterialConst: public QObject +class QT_MATERIAL_EXPORT MaterialConst: public QObject { Q_OBJECT diff --git a/components/lib/qtmaterialoverlaywidget.h b/components/lib/qtmaterialoverlaywidget.h index 4f1697d..56b9fa0 100644 --- a/components/lib/qtmaterialoverlaywidget.h +++ b/components/lib/qtmaterialoverlaywidget.h @@ -2,9 +2,9 @@ #define QTMATERIALOVERLAYWIDGET_H #include -#include +#include "qtmaterial_global.h" -class QDESIGNER_WIDGET_EXPORT QtMaterialOverlayWidget : public QWidget +class QT_MATERIAL_EXPORT QtMaterialOverlayWidget : public QWidget { Q_OBJECT diff --git a/components/lib/qtmaterialripple.h b/components/lib/qtmaterialripple.h index ad80047..37d66b7 100644 --- a/components/lib/qtmaterialripple.h +++ b/components/lib/qtmaterialripple.h @@ -6,11 +6,11 @@ #include #include #include -#include +#include "qtmaterial_global.h" class QtMaterialRippleOverlay; -class QDESIGNER_WIDGET_EXPORT QtMaterialRipple : public QParallelAnimationGroup +class QT_MATERIAL_EXPORT QtMaterialRipple : public QParallelAnimationGroup { Q_OBJECT diff --git a/components/lib/qtmaterialrippleoverlay.h b/components/lib/qtmaterialrippleoverlay.h index 90fc1fc..3206dbf 100644 --- a/components/lib/qtmaterialrippleoverlay.h +++ b/components/lib/qtmaterialrippleoverlay.h @@ -3,11 +3,11 @@ #include #include "lib/qtmaterialoverlaywidget.h" -#include +#include "qtmaterial_global.h" class QtMaterialRipple; -class QDESIGNER_WIDGET_EXPORT QtMaterialRippleOverlay : public QtMaterialOverlayWidget +class QT_MATERIAL_EXPORT QtMaterialRippleOverlay : public QtMaterialOverlayWidget { Q_OBJECT diff --git a/components/lib/qtmaterialstyle.h b/components/lib/qtmaterialstyle.h index e1f7506..2db4117 100644 --- a/components/lib/qtmaterialstyle.h +++ b/components/lib/qtmaterialstyle.h @@ -3,14 +3,14 @@ #include #include "lib/qtmaterialstyle_p.h" -#include +#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 diff --git a/components/lib/qtmaterialtheme.h b/components/lib/qtmaterialtheme.h index a522861..0137cb0 100644 --- a/components/lib/qtmaterialtheme.h +++ b/components/lib/qtmaterialtheme.h @@ -6,11 +6,11 @@ #include #include #include "qtmaterialconst.h" -#include +#include "qtmaterial_global.h" class QtMaterialThemePrivate; -class QDESIGNER_WIDGET_EXPORT QtMaterialTheme : public QObject +class QT_MATERIAL_EXPORT QtMaterialTheme : public QObject { Q_OBJECT diff --git a/components/link_components.pri b/components/link_components.pri index 561f257..a45baa6 100644 --- a/components/link_components.pri +++ b/components/link_components.pri @@ -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 += \ diff --git a/components/qtmaterial_global.h b/components/qtmaterial_global.h new file mode 100644 index 0000000..bd2d5a7 --- /dev/null +++ b/components/qtmaterial_global.h @@ -0,0 +1,12 @@ +#ifndef QTMATERIAL_GLOBAL_H +#define QTMATERIAL_GLOBAL_H + +#include + +#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 diff --git a/components/qtmaterialappbar.h b/components/qtmaterialappbar.h index f6782b7..a4581a9 100644 --- a/components/qtmaterialappbar.h +++ b/components/qtmaterialappbar.h @@ -3,11 +3,11 @@ #include #include -#include +#include "qtmaterial_global.h" class QtMaterialAppBarPrivate; -class QDESIGNER_WIDGET_EXPORT QtMaterialAppBar : public QWidget +class QT_MATERIAL_EXPORT QtMaterialAppBar : public QWidget { Q_OBJECT diff --git a/components/qtmaterialautocomplete.h b/components/qtmaterialautocomplete.h index 623950d..3c5a048 100644 --- a/components/qtmaterialautocomplete.h +++ b/components/qtmaterialautocomplete.h @@ -2,11 +2,11 @@ #define QTMATERIALAUTOCOMPLETE_H #include "qtmaterialtextfield.h" -#include +#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) diff --git a/components/qtmaterialavatar.h b/components/qtmaterialavatar.h index 71a9794..98c1aa8 100644 --- a/components/qtmaterialavatar.h +++ b/components/qtmaterialavatar.h @@ -3,11 +3,11 @@ #include #include "lib/qtmaterialtheme.h" -#include +#include "qtmaterial_global.h" class QtMaterialAvatarPrivate; -class QDESIGNER_WIDGET_EXPORT QtMaterialAvatar : public QWidget +class QT_MATERIAL_EXPORT QtMaterialAvatar : public QWidget { Q_OBJECT diff --git a/components/qtmaterialbadge.h b/components/qtmaterialbadge.h index 76bbc9c..8f7c282 100644 --- a/components/qtmaterialbadge.h +++ b/components/qtmaterialbadge.h @@ -3,11 +3,11 @@ #include "lib/qtmaterialoverlaywidget.h" #include -#include +#include "qtmaterial_global.h" class QtMaterialBadgePrivate; -class QDESIGNER_WIDGET_EXPORT QtMaterialBadge : public QtMaterialOverlayWidget +class QT_MATERIAL_EXPORT QtMaterialBadge : public QtMaterialOverlayWidget { Q_OBJECT diff --git a/components/qtmaterialcheckbox.h b/components/qtmaterialcheckbox.h index 80580b3..a2b1ebc 100644 --- a/components/qtmaterialcheckbox.h +++ b/components/qtmaterialcheckbox.h @@ -2,11 +2,11 @@ #define QTMATERIALCHECKBOX_H #include "lib/qtmaterialcheckable.h" -#include +#include "qtmaterial_global.h" class QtMaterialCheckBoxPrivate; -class QDESIGNER_WIDGET_EXPORT QtMaterialCheckBox : public QtMaterialCheckable +class QT_MATERIAL_EXPORT QtMaterialCheckBox : public QtMaterialCheckable { Q_OBJECT diff --git a/components/qtmaterialcircularprogress.h b/components/qtmaterialcircularprogress.h index a487414..1610d7c 100644 --- a/components/qtmaterialcircularprogress.h +++ b/components/qtmaterialcircularprogress.h @@ -3,11 +3,11 @@ #include #include "lib/qtmaterialtheme.h" -#include +#include "qtmaterial_global.h" class QtMaterialCircularProgressPrivate; -class QDESIGNER_WIDGET_EXPORT QtMaterialCircularProgress : public QProgressBar +class QT_MATERIAL_EXPORT QtMaterialCircularProgress : public QProgressBar { Q_OBJECT diff --git a/components/qtmaterialdialog.h b/components/qtmaterialdialog.h index 38dbe8a..b276a17 100644 --- a/components/qtmaterialdialog.h +++ b/components/qtmaterialdialog.h @@ -3,12 +3,12 @@ #include #include "lib/qtmaterialoverlaywidget.h" -#include +#include "qtmaterial_global.h" class QLayout; class QtMaterialDialogPrivate; -class QDESIGNER_WIDGET_EXPORT QtMaterialDialog : public QtMaterialOverlayWidget +class QT_MATERIAL_EXPORT QtMaterialDialog : public QtMaterialOverlayWidget { Q_OBJECT diff --git a/components/qtmaterialdrawer.h b/components/qtmaterialdrawer.h index 8f1cf56..d9c4b94 100644 --- a/components/qtmaterialdrawer.h +++ b/components/qtmaterialdrawer.h @@ -2,12 +2,12 @@ #define QTMATERIALDRAWER_H #include "lib/qtmaterialoverlaywidget.h" -#include +#include "qtmaterial_global.h" class QtMaterialDrawerPrivate; class QtMaterialDrawerStateMachine; -class QDESIGNER_WIDGET_EXPORT QtMaterialDrawer : public QtMaterialOverlayWidget +class QT_MATERIAL_EXPORT QtMaterialDrawer : public QtMaterialOverlayWidget { Q_OBJECT diff --git a/components/qtmaterialfab.h b/components/qtmaterialfab.h index a2eeaaf..855f554 100644 --- a/components/qtmaterialfab.h +++ b/components/qtmaterialfab.h @@ -2,11 +2,11 @@ #define QTMATERIALFAB_H #include "qtmaterialraisedbutton.h" -#include +#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) diff --git a/components/qtmaterialflatbutton.h b/components/qtmaterialflatbutton.h index c70a6c5..6122fbf 100644 --- a/components/qtmaterialflatbutton.h +++ b/components/qtmaterialflatbutton.h @@ -4,11 +4,11 @@ #include #include #include "lib/qtmaterialtheme.h" -#include +#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) diff --git a/components/qtmaterialiconbutton.h b/components/qtmaterialiconbutton.h index db86f26..5c7decc 100644 --- a/components/qtmaterialiconbutton.h +++ b/components/qtmaterialiconbutton.h @@ -2,11 +2,11 @@ #define QTMATERIALICONBUTTON_H #include -#include +#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) diff --git a/components/qtmaterialmenu.h b/components/qtmaterialmenu.h index 77aba08..066073b 100644 --- a/components/qtmaterialmenu.h +++ b/components/qtmaterialmenu.h @@ -2,10 +2,10 @@ #define QTMATERIALMENU_H #include -#include -#include +#include "qtmaterial_global.h" +#include "qtmaterial_global.h" -class QDESIGNER_WIDGET_EXPORT QtMaterialMenu : public QWidget +class QT_MATERIAL_EXPORT QtMaterialMenu : public QWidget { Q_OBJECT diff --git a/components/qtmaterialprogress.h b/components/qtmaterialprogress.h index abbc639..efa7534 100644 --- a/components/qtmaterialprogress.h +++ b/components/qtmaterialprogress.h @@ -3,11 +3,11 @@ #include #include "lib/qtmaterialtheme.h" -#include +#include "qtmaterial_global.h" class QtMaterialProgressPrivate; -class QDESIGNER_WIDGET_EXPORT QtMaterialProgress : public QProgressBar +class QT_MATERIAL_EXPORT QtMaterialProgress : public QProgressBar { Q_OBJECT diff --git a/components/qtmaterialradiobutton.h b/components/qtmaterialradiobutton.h index 83dd366..44cda8d 100644 --- a/components/qtmaterialradiobutton.h +++ b/components/qtmaterialradiobutton.h @@ -2,11 +2,11 @@ #define QTMATERIALRADIOBUTTON_H #include "lib/qtmaterialcheckable.h" -#include +#include "qtmaterial_global.h" class QtMaterialRadioButtonPrivate; -class QDESIGNER_WIDGET_EXPORT QtMaterialRadioButton : public QtMaterialCheckable +class QT_MATERIAL_EXPORT QtMaterialRadioButton : public QtMaterialCheckable { Q_OBJECT diff --git a/components/qtmaterialraisedbutton.h b/components/qtmaterialraisedbutton.h index 6a1ea56..6e89d92 100644 --- a/components/qtmaterialraisedbutton.h +++ b/components/qtmaterialraisedbutton.h @@ -2,11 +2,11 @@ #define QTMATERIALRAISEDBUTTON_H #include "qtmaterialflatbutton.h" -#include +#include "qtmaterial_global.h" class QtMaterialRaisedButtonPrivate; -class QDESIGNER_WIDGET_EXPORT QtMaterialRaisedButton : public QtMaterialFlatButton +class QT_MATERIAL_EXPORT QtMaterialRaisedButton : public QtMaterialFlatButton { Q_OBJECT diff --git a/components/qtmaterialscrollbar.h b/components/qtmaterialscrollbar.h index f245a9c..0234c63 100644 --- a/components/qtmaterialscrollbar.h +++ b/components/qtmaterialscrollbar.h @@ -2,11 +2,11 @@ #define QTMATERIALSCROLLBAR_H #include -#include +#include "qtmaterial_global.h" class QtMaterialScrollBarPrivate; -class QDESIGNER_WIDGET_EXPORT QtMaterialScrollBar : public QScrollBar +class QT_MATERIAL_EXPORT QtMaterialScrollBar : public QScrollBar { Q_OBJECT diff --git a/components/qtmaterialslider.h b/components/qtmaterialslider.h index 8c73b19..bf19eae 100644 --- a/components/qtmaterialslider.h +++ b/components/qtmaterialslider.h @@ -3,13 +3,13 @@ #include #include -#include +#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 diff --git a/components/qtmaterialsnackbar.h b/components/qtmaterialsnackbar.h index 7ebecb6..d1a1d18 100644 --- a/components/qtmaterialsnackbar.h +++ b/components/qtmaterialsnackbar.h @@ -2,11 +2,11 @@ #define QTMATERIALSNACKBAR_H #include "lib/qtmaterialoverlaywidget.h" -#include +#include "qtmaterial_global.h" class QtMaterialSnackbarPrivate; -class QDESIGNER_WIDGET_EXPORT QtMaterialSnackbar : public QtMaterialOverlayWidget +class QT_MATERIAL_EXPORT QtMaterialSnackbar : public QtMaterialOverlayWidget { Q_OBJECT diff --git a/components/qtmaterialtabs.h b/components/qtmaterialtabs.h index e1b1c35..a4f3be3 100644 --- a/components/qtmaterialtabs.h +++ b/components/qtmaterialtabs.h @@ -4,12 +4,12 @@ #include #include #include "lib/qtmaterialtheme.h" -#include +#include "qtmaterial_global.h" class QtMaterialTabsPrivate; class QtMaterialTab; -class QDESIGNER_WIDGET_EXPORT QtMaterialTabs : public QWidget +class QT_MATERIAL_EXPORT QtMaterialTabs : public QWidget { Q_OBJECT diff --git a/components/qtmaterialtabwidget.h b/components/qtmaterialtabwidget.h index d100f24..1aea123 100644 --- a/components/qtmaterialtabwidget.h +++ b/components/qtmaterialtabwidget.h @@ -2,14 +2,14 @@ #define QTMATERIALTABWIDGET_H #include -#include +#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) diff --git a/components/qtmaterialtextfield.h b/components/qtmaterialtextfield.h index 674ac30..96ef50e 100644 --- a/components/qtmaterialtextfield.h +++ b/components/qtmaterialtextfield.h @@ -3,11 +3,11 @@ #include #include -#include +#include "qtmaterial_global.h" class QtMaterialTextFieldPrivate; -class QDESIGNER_WIDGET_EXPORT QtMaterialTextField : public QLineEdit +class QT_MATERIAL_EXPORT QtMaterialTextField : public QLineEdit { Q_OBJECT diff --git a/components/qtmaterialtoggle.h b/components/qtmaterialtoggle.h index ec9b48d..bf8c551 100644 --- a/components/qtmaterialtoggle.h +++ b/components/qtmaterialtoggle.h @@ -2,11 +2,11 @@ #define QTMATERIALTOGGLE_H #include -#include +#include "qtmaterial_global.h" class QtMaterialTogglePrivate; -class QDESIGNER_WIDGET_EXPORT QtMaterialToggle : public QAbstractButton +class QT_MATERIAL_EXPORT QtMaterialToggle : public QAbstractButton { Q_OBJECT