chore: 格式化ElaWidgetTools代码
This commit is contained in:
@@ -7,32 +7,31 @@
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include <QGraphicsOpacityEffect>
|
||||
class ElaDrawerContainer : public QWidget
|
||||
{
|
||||
class ElaDrawerContainer : public QWidget {
|
||||
Q_OBJECT
|
||||
Q_PRIVATE_CREATE(int, BorderRadius)
|
||||
Q_PRIVATE_CREATE(QPixmap, ContainerPix)
|
||||
Q_PROPERTY_CREATE(qreal, Opacity)
|
||||
public:
|
||||
explicit ElaDrawerContainer(QWidget* parent = nullptr);
|
||||
explicit ElaDrawerContainer(QWidget *parent = nullptr);
|
||||
~ElaDrawerContainer() override;
|
||||
|
||||
void addWidget(QWidget* widget);
|
||||
void removeWidget(QWidget* widget);
|
||||
void addWidget(QWidget *widget);
|
||||
void removeWidget(QWidget *widget);
|
||||
|
||||
void doDrawerAnimation(bool isExpand);
|
||||
|
||||
protected:
|
||||
virtual void paintEvent(QPaintEvent* event) override;
|
||||
virtual void paintEvent(QPaintEvent *event) override;
|
||||
|
||||
private:
|
||||
bool _isShowBorder{true};
|
||||
bool _isShowBorder{true};
|
||||
ElaThemeType::ThemeMode _themeMode;
|
||||
QVBoxLayout* _mainLayout{nullptr};
|
||||
QVBoxLayout* _containerLayout{nullptr};
|
||||
QWidget* _containerWidget{nullptr};
|
||||
QList<QWidget*> _drawerWidgetList;
|
||||
int _calculateContainerMinimumHeight() const;
|
||||
QVBoxLayout *_mainLayout{nullptr};
|
||||
QVBoxLayout *_containerLayout{nullptr};
|
||||
QWidget *_containerWidget{nullptr};
|
||||
QList<QWidget *> _drawerWidgetList;
|
||||
int _calculateContainerMinimumHeight() const;
|
||||
};
|
||||
|
||||
#endif //ELAFRAMEWORK_ELAWIDGETTOOLS_DEVELOPERCOMPONENTS_ELADRAWERCONTAINER_H_
|
||||
#endif // ELAFRAMEWORK_ELAWIDGETTOOLS_DEVELOPERCOMPONENTS_ELADRAWERCONTAINER_H_
|
||||
|
||||
Reference in New Issue
Block a user