Reorganizing and fix the headers/include.

This commit is contained in:
Achraf k 2022-02-17 13:21:27 +01:00
parent 5a044e1220
commit 4215a79689
48 changed files with 172 additions and 127 deletions

View File

@ -44,7 +44,7 @@ set(PROJECT_SOURCES
qtmaterialslider.cpp
qtmaterialsnackbar_internal.cpp
qtmaterialsnackbar.cpp
qtmaterialradiobutton.cpp
# qtmaterialradiobutton.cpp
qtmaterialtoggle_internal.cpp
qtmaterialtoggle.cpp
qtmaterialtextfield_internal.cpp
@ -106,8 +106,8 @@ set(PROJECT_SOURCES
qtmaterialsnackbar_internal.h
qtmaterialsnackbar_p.h
qtmaterialsnackbar.h
qtmaterialradiobutton_p.h
qtmaterialradiobutton.h
# qtmaterialradiobutton_p.h
# qtmaterialradiobutton.h
qtmaterialtoggle_internal.h
qtmaterialtoggle_p.h
qtmaterialtoggle.h

View File

@ -1,12 +1,5 @@
#include "lib/qtmaterialcheckable.h"
#include "lib/qtmaterialcheckable_p.h"
#include <QPainter>
#include <QEvent>
#include <QStateMachine>
#include <QSignalTransition>
#include <QEventTransition>
#include <QColor>
#include <QCoreApplication>
#include "lib/qtmaterialrippleoverlay.h"
#include "lib/qtmaterialripple.h"
#include "lib/qtmaterialstyle.h"

View File

@ -2,13 +2,18 @@
#define QTMATERIALCHECKABLE_P_H
#include <QtGlobal>
#include <QPainter>
#include <QEvent>
#include <QStateMachine>
#include <QSignalTransition>
#include <QEventTransition>
#include <QColor>
#include <QCoreApplication>
#include "lib/qtmaterialcheckable.h"
namespace md
{
class QStateMachine;
class QState;
class QSignalTransition;
class RippleOverlay;
class CheckableIcon;

View File

@ -1,13 +1,5 @@
#include "qtmaterialautocomplete.h"
#include "qtmaterialautocomplete_p.h"
#include <QtWidgets/QGraphicsDropShadowEffect>
#include <QtWidgets/QVBoxLayout>
#include <QEvent>
#include <QTimer>
#include <QPainter>
#include <QDebug>
#include "qtmaterialautocomplete_internal.h"
#include "qtmaterialflatbutton.h"
namespace md
{

View File

@ -1,13 +1,21 @@
#ifndef QTMATERIALAUTOCOMPLETE_P_H
#define QTMATERIALAUTOCOMPLETE_P_H
#include <QtWidgets/QGraphicsDropShadowEffect>
#include <QtWidgets/QVBoxLayout>
#include <QEvent>
#include <QTimer>
#include <QPainter>
#include <QDebug>
#include "qtmaterialautocomplete.h"
#include "qtmaterialautocomplete_internal.h"
#include "qtmaterialflatbutton.h"
#include "qtmaterialtextfield_p.h"
namespace md
{
class QWidget;
class QVBoxLayout;
class AutoCompleteOverlay;
class AutoCompleteStateMachine;

View File

@ -1,9 +1,5 @@
#include "qtmaterialcheckbox.h"
#include "qtmaterialcheckbox_p.h"
#include <QPropertyAnimation>
#include <QSignalTransition>
#include <QState>
#include "lib/qtmaterialcheckable_internal.h"
namespace md
{

View File

@ -1,7 +1,14 @@
#ifndef QTMATERIALCHECKBOX_P_H
#define QTMATERIALCHECKBOX_P_H
#include <QPropertyAnimation>
#include <QSignalTransition>
#include <QState>
#include "qtmaterialcheckbox.h"
#include "lib/qtmaterialcheckable_internal.h"
#include "lib/qtmaterialcheckable_p.h"
namespace md
{

View File

@ -1,19 +1,10 @@
#include "qtmaterialdialog.h"
#include "qtmaterialdialog_p.h"
#include <QtWidgets/QStackedLayout>
#include <QtWidgets/QGraphicsDropShadowEffect>
#include <QStateMachine>
#include <QState>
#include <QtWidgets/QApplication>
#include <QPropertyAnimation>
#include <QPainter>
#include "qtmaterialdialog_internal.h"
#include "lib/qtmaterialstatetransition.h"
namespace md
{
/*!
* \class QtMaterialDialogPrivate
* \class DialogPrivate
* \internal
*/
@ -106,7 +97,7 @@ void DialogPrivate::init()
}
/*!
* \class QtMaterialDialog
* \class Dialog
*/
Dialog::Dialog(QWidget *parent)

View File

@ -2,11 +2,16 @@
#define QTMATERIALDIALOG_H
#include <QScopedPointer>
#include <QLayout>
#include "qtmaterialdialog_p.h"
#include "qtmaterialdialog_internal.h"
#include "lib/qtmaterialstatetransition.h"
#include "lib/qtmaterialoverlaywidget.h"
namespace md
{
class QLayout;
class DialogPrivate;
class Dialog : public OverlayWidget

View File

@ -1,9 +1,5 @@
#include "qtmaterialdialog_internal.h"
#include <QPainter>
#include <QPixmap>
#include <QEvent>
#include <QtWidgets/QStackedLayout>
#include "qtmaterialdialog.h"
namespace md
{

View File

@ -2,10 +2,16 @@
#define QTMATERIALDIALOG_INTERNAL_H
#include <QtWidgets/QWidget>
#include <QPainter>
#include <QPixmap>
#include <QEvent>
#include <QtWidgets/QStackedLayout>
#include "qtmaterialdialog.h"
namespace md
{
class QStackedLayout;
class Dialog;
class DialogWindow;
@ -77,6 +83,7 @@ private:
Dialog *const m_dialog;
};
}
#endif // QTMATERIALDIALOG_INTERNAL_H
}

View File

@ -2,12 +2,18 @@
#define QTMATERIALDIALOG_P_H
#include <QtGlobal>
#include <QtWidgets/QStackedLayout>
#include <QtWidgets/QGraphicsDropShadowEffect>
#include <QtWidgets/QApplication>
#include <QStateMachine>
#include <QState>
#include <QPropertyAnimation>
#include <QPainter>
namespace md
{
class QStateMachine;
class Dialog;
class QStackedLayout;
class DialogWindow;
class DialogProxy;

View File

@ -1,14 +1,5 @@
#include "qtmaterialdrawer.h"
#include "qtmaterialdrawer_p.h"
#include <QPainter>
#include <QEvent>
#include <QDebug>
#include <QMouseEvent>
#include <QtWidgets/QApplication>
#include <QtWidgets/QLayout>
#include <QLinearGradient>
#include <QtWidgets/QVBoxLayout>
#include "qtmaterialdrawer_internal.h"
namespace md
{

View File

@ -1,7 +1,19 @@
#ifndef QTMATERIALDRAWER_H
#define QTMATERIALDRAWER_H
#include <QtWidgets/QApplication>
#include <QtWidgets/QLayout>
#include <QtWidgets/QVBoxLayout>
#include <QPainter>
#include <QEvent>
#include <QDebug>
#include <QMouseEvent>
#include <QLinearGradient>
#include "qtmaterialdrawer_p.h"
#include "qtmaterialdrawer_internal.h"
#include "lib/qtmaterialoverlaywidget.h"
namespace md
{

View File

@ -1,10 +1,4 @@
#include "qtmaterialflatbutton_internal.h"
#include <QEventTransition>
#include <QPropertyAnimation>
#include <QFocusEvent>
#include <QSequentialAnimationGroup>
#include "qtmaterialflatbutton.h"
#include "lib/qtmaterialstatetransition.h"
namespace md
{

View File

@ -3,12 +3,18 @@
#include <QStateMachine>
#include <QColor>
#include <QEventTransition>
#include <QPropertyAnimation>
#include <QFocusEvent>
#include <QSequentialAnimationGroup>
#include "qtmaterialflatbutton.h"
#include "lib/qtmaterialstatetransition.h"
namespace md
{
class FlatButton;
class QSequentialAnimationGroup;
class FlatButton;
class FlatButtonStateMachine : public QStateMachine
{
Q_OBJECT

View File

@ -2,13 +2,12 @@
#define QTMATERIALICONBUTTON_P_H
#include <QtGlobal>
#include <QColor>
namespace md
{
class IconButton;
class RippleOverlay;
class QColor;
class IconButtonPrivate
{

View File

@ -1,5 +1,7 @@
#include "qtmaterialprogress_internal.h"
namespace md
{
/*!
* \class QtMaterialProgressDelegate
* \internal
@ -16,3 +18,4 @@ ProgressBarDelegate::ProgressBarDelegate(ProgressBar *parent)
ProgressBarDelegate::~ProgressBarDelegate()
{
}
}

View File

@ -3,6 +3,7 @@
#include <QObject>
#include "qtmaterialprogress.h"
namespace md
{

View File

@ -1,16 +1,11 @@
#include "qtmaterialradiobutton.h"
#include "qtmaterialradiobutton_p.h"
#include <QStateMachine>
#include <QState>
#include <QPropertyAnimation>
#include <QColor>
#include "lib/qtmaterialcheckable_internal.h"
namespace md
{
/*!
* \class QtMaterialRadioButtonPrivate
* \class RadioButtonPrivate
* \internal
*/

View File

@ -1,7 +1,10 @@
#ifndef QTMATERIALRADIOBUTTON_H
#define QTMATERIALRADIOBUTTON_H
#include "qtmaterialradiobutton_p.h"
#include "lib/qtmaterialcheckable_internal.h"
#include "lib/qtmaterialcheckable.h"
namespace md
{

View File

@ -1,7 +1,14 @@
#ifndef QTMATERIALRADIOBUTTON_P_H
#define QTMATERIALRADIOBUTTON_P_H
#include <QStateMachine>
#include <QState>
#include <QPropertyAnimation>
#include <QColor>
#include "qtmaterialradiobutton.h"
#include "lib/qtmaterialcheckable_p.h"
namespace md
{

View File

@ -1,9 +1,5 @@
#include "qtmaterialraisedbutton.h"
#include "qtmaterialraisedbutton_p.h"
#include <QStateMachine>
#include <QtWidgets/QGraphicsDropShadowEffect>
#include <QPropertyAnimation>
#include <QEventTransition>
namespace md
{

View File

@ -2,6 +2,7 @@
#define QTMATERIALRAISEDBUTTON_H
#include "qtmaterialflatbutton.h"
namespace md
{

View File

@ -1,13 +1,17 @@
#ifndef QTMATERIALRAISEDBUTTON_P_H
#define QTMATERIALRAISEDBUTTON_P_H
#include <QtWidgets/QGraphicsDropShadowEffect>
#include <QStateMachine>
#include <QPropertyAnimation>
#include <QEventTransition>
#include "qtmaterialflatbutton_p.h"
#include "qtmaterialraisedbutton.h"
namespace md
{
class QStateMachine;
class QState;
class QGraphicsDropShadowEffect;
class RaisedButton;
class RaisedButtonPrivate : public FlatButtonPrivate

View File

@ -1,10 +1,5 @@
#include "qtmaterialscrollbar.h"
#include "qtmaterialscrollbar_p.h"
#include <QPainter>
#include <QPainterPath>
#include <QDebug>
#include "qtmaterialscrollbar_internal.h"
#include "lib/qtmaterialstyle.h"
namespace md
{

View File

@ -2,6 +2,14 @@
#define QTMATERIALSCROLLBAR_H
#include <QtWidgets/QScrollBar>
#include <QPainter>
#include <QPainterPath>
#include <QDebug>
#include "qtmaterialscrollbar_p.h"
#include "qtmaterialscrollbar_internal.h"
#include "lib/qtmaterialstyle.h"
namespace md
{

View File

@ -3,9 +3,12 @@
#include <QStateMachine>
#include "qtmaterialscrollbar.h"
namespace md
{
class ScrollBar;
class ScrollBarStateMachine : public QStateMachine
{
Q_OBJECT
@ -31,7 +34,7 @@ private:
inline void ScrollBarStateMachine::setOpacity(qreal opacity)
{
m_opacity = opacity;
m_scrollBar->update();
// m_scrollBar->update(); // FIXME: incomplete type 'class md::ScrollBar'
}
inline qreal ScrollBarStateMachine::opacity() const

View File

@ -3,6 +3,7 @@
#include <QtGlobal>
#include <QColor>
namespace md
{

View File

@ -5,6 +5,7 @@
#include "qtmaterialslider_internal.h"
#include "lib/qtmaterialstyle.h"
#include "lib/qtmaterialstatetransitionevent.h"
namespace md
{

View File

@ -5,6 +5,7 @@
#include <QScopedPointer>
#define QT_MATERIAL_SLIDER_MARGIN 30
namespace md
{

View File

@ -4,6 +4,7 @@
#include <QtGlobal>
#include <QColor>
#include <QRectF>
namespace md
{

View File

@ -2,6 +2,7 @@
#define QTMATERIALSNACKBAR_H
#include "lib/qtmaterialoverlaywidget.h"
namespace md
{

View File

@ -3,6 +3,7 @@
#include <QStateMachine>
#include <QTimer>
namespace md
{

View File

@ -3,6 +3,7 @@
#include <QObject>
#include <QColor>
namespace md
{
@ -12,7 +13,7 @@ class SnackBarStateMachine;
class SnackBarPrivate
{
Q_DISABLE_COPY(SnackBarPrivate)
Q_DECLARE_PUBLIC(Snackbar)
Q_DECLARE_PUBLIC(SnackBar)
public:
SnackBarPrivate(SnackBar *q);

View File

@ -1,13 +1,10 @@
#include "qtmaterialtabs.h"
#include "qtmaterialtabs_p.h"
#include <QtWidgets/QHBoxLayout>
#include "qtmaterialtabs_internal.h"
#include "lib/qtmaterialstyle.h"
namespace md
{
/*!
* \QtMaterialTabsPrivate
* \TabsPrivate
* \internal
*/
@ -35,7 +32,8 @@ void TabsPrivate::TabsPrivate::init()
q->setStyle(&Style::instance());
tabLayout->setSpacing(0);
tabLayout->setMargin(0);
// tabLayout->setMargin(0); // FIXME: throwing an error
}
/*!

View File

@ -2,8 +2,14 @@
#define QTMATERIALTABS_H
#include <QtWidgets/QWidget>
#include <QtWidgets/QHBoxLayout>
#include <QIcon>
#include "qtmaterialtabs_p.h"
#include "qtmaterialtabs_internal.h"
#include "lib/qtmaterialstyle.h"
#include "lib/qtmaterialtheme.h"
namespace md
{

View File

@ -1,11 +1,5 @@
#include "qtmaterialtabs_internal.h"
#include <QPainter>
#include <QPropertyAnimation>
#include <QtWidgets/QLayout>
#include <QtWidgets/QLayoutItem>
#include <QEvent>
#include "qtmaterialtabs.h"
#include <QDebug>
namespace md
{

View File

@ -1,13 +1,20 @@
#ifndef QTMATERIALTABS_INTERNAL_H
#define QTMATERIALTABS_INTERNAL_H
#include <QPainter>
#include <QPropertyAnimation>
#include <QtWidgets/QLayout>
#include <QtWidgets/QLayoutItem>
#include <QEvent>
#include <QDebug>
#include "qtmaterialtabs.h"
#include "lib/qtmaterialoverlaywidget.h"
#include "qtmaterialflatbutton.h"
namespace md
{
class QPropertyAnimation;
class Tabs;
class TabsInkBar : public OverlayWidget

View File

@ -2,11 +2,13 @@
#define QTMATERIALTABS_P_H
#include <QtGlobal>
#include <QtWidgets/QHBoxLayout>
#include "lib/qtmaterialtheme.h"
namespace md
{
class QHBoxLayout;
class Tabs;
class TabsInkBar;

View File

@ -3,6 +3,7 @@
#include <QtWidgets/QLineEdit>
#include <QColor>
namespace md
{

View File

@ -1,13 +1,10 @@
#include "qtmaterialtextfield_internal.h"
#include <QPropertyAnimation>
#include <QEventTransition>
#include <QPainter>
#include "qtmaterialtextfield.h"
namespace md
{
/*!
* \class QtMaterialTextFieldStateMachine
* \class TextFieldStateMachine
* \internal
*/

View File

@ -1,13 +1,17 @@
#ifndef QTMATERIALTEXTFIELD_INTERNAL_H
#define QTMATERIALTEXTFIELD_INTERNAL_H
#include <QStateMachine>
#include <QtWidgets/QWidget>
#include <QStateMachine>
#include <QPropertyAnimation>
#include <QEventTransition>
#include <QPainter>
#include "qtmaterialtextfield.h"
namespace md
{
class QPropertyAnimation;
class TextFieldLabel;
class TextFieldStateMachine : public QStateMachine

View File

@ -1,11 +1,9 @@
#include "qtmaterialtoggle.h"
#include "qtmaterialtoggle_p.h"
#include <QtWidgets/QApplication>
#include <QStateMachine>
#include <QSignalTransition>
#include <QPropertyAnimation>
#include "qtmaterialtoggle_internal.h"
#include "lib/qtmaterialstyle.h"
namespace md
{

View File

@ -2,6 +2,7 @@
#define QTMATERIALTOGGLE_H
#include <QtWidgets/QAbstractButton>
namespace md
{

View File

@ -1,9 +1,8 @@
#include "qtmaterialtoggle_internal.h"
#include <QPainter>
#include <QEvent>
#include <QtWidgets/QGraphicsDropShadowEffect>
#include "qtmaterialtoggle.h"
#include "lib/qtmaterialripple.h"
namespace md
{

View File

@ -2,7 +2,12 @@
#define QTMATERIALTOGGLE_INTERNAL_H
#include <QtWidgets/QWidget>
#include <QtWidgets/QGraphicsDropShadowEffect>
#include <QPainter>
#include <QEvent>
#include "lib/qtmaterialrippleoverlay.h"
namespace md
{

View File

@ -1,13 +1,15 @@
#ifndef QTMATERIALTOGGLE_P_H
#define QTMATERIALTOGGLE_P_H
#include <Qt>
#include <QtWidgets/QApplication>
#include <QStateMachine>
#include <QSignalTransition>
#include <QPropertyAnimation>
#include <QColor>
namespace md
{
class QStateMachine;
class QState;
class QColor;
class Toggle;
class ToggleTrack;
class ToggleThumb;