chore: 格式化ElaWidgetTools代码
This commit is contained in:
@@ -7,29 +7,35 @@
|
||||
#include "ElaProperty.h"
|
||||
|
||||
class ElaNavigationBarPrivate;
|
||||
class ELA_EXPORT ElaNavigationBar : public QWidget
|
||||
{
|
||||
class ELA_EXPORT ElaNavigationBar : public QWidget {
|
||||
Q_OBJECT
|
||||
Q_Q_CREATE(ElaNavigationBar)
|
||||
Q_PROPERTY_CREATE_Q_H(bool, IsTransparent)
|
||||
Q_PROPERTY_CREATE_Q_H(bool, IsAllowPageOpenInNewWindow)
|
||||
Q_PROPERTY_CREATE_Q_H(int, NavigationBarWidth)
|
||||
public:
|
||||
explicit ElaNavigationBar(QWidget* parent = nullptr);
|
||||
explicit ElaNavigationBar(QWidget *parent = nullptr);
|
||||
~ElaNavigationBar() override;
|
||||
void setUserInfoCardVisible(bool isVisible);
|
||||
void setUserInfoCardPixmap(QPixmap pix);
|
||||
void setUserInfoCardTitle(QString title);
|
||||
void setUserInfoCardSubTitle(QString subTitle);
|
||||
|
||||
ElaNavigationType::NodeOperateReturnType addExpanderNode(QString expanderTitle, QString& expanderKey, ElaIconType::IconName awesome = ElaIconType::None);
|
||||
ElaNavigationType::NodeOperateReturnType addExpanderNode(QString expanderTitle, QString& expanderKey, QString targetExpanderKey, ElaIconType::IconName awesome = ElaIconType::None);
|
||||
ElaNavigationType::NodeOperateReturnType addPageNode(QString pageTitle, QWidget* page, ElaIconType::IconName awesome = ElaIconType::None);
|
||||
ElaNavigationType::NodeOperateReturnType addPageNode(QString pageTitle, QWidget* page, QString targetExpanderKey, ElaIconType::IconName awesome = ElaIconType::None);
|
||||
ElaNavigationType::NodeOperateReturnType addPageNode(QString pageTitle, QWidget* page, int keyPoints = 0, ElaIconType::IconName awesome = ElaIconType::None);
|
||||
ElaNavigationType::NodeOperateReturnType addPageNode(QString pageTitle, QWidget* page, QString targetExpanderKey, int keyPoints = 0, ElaIconType::IconName awesome = ElaIconType::None);
|
||||
ElaNavigationType::NodeOperateReturnType addFooterNode(QString footerTitle, QString& footerKey, int keyPoints = 0, ElaIconType::IconName awesome = ElaIconType::None);
|
||||
ElaNavigationType::NodeOperateReturnType addFooterNode(QString footerTitle, QWidget* page, QString& footerKey, int keyPoints = 0, ElaIconType::IconName awesome = ElaIconType::None);
|
||||
ElaNavigationType::NodeOperateReturnType addExpanderNode(QString expanderTitle, QString &expanderKey,
|
||||
ElaIconType::IconName awesome = ElaIconType::None);
|
||||
ElaNavigationType::NodeOperateReturnType addExpanderNode(QString expanderTitle, QString &expanderKey, QString targetExpanderKey,
|
||||
ElaIconType::IconName awesome = ElaIconType::None);
|
||||
ElaNavigationType::NodeOperateReturnType addPageNode(QString pageTitle, QWidget *page, ElaIconType::IconName awesome = ElaIconType::None);
|
||||
ElaNavigationType::NodeOperateReturnType addPageNode(QString pageTitle, QWidget *page, QString targetExpanderKey,
|
||||
ElaIconType::IconName awesome = ElaIconType::None);
|
||||
ElaNavigationType::NodeOperateReturnType addPageNode(QString pageTitle, QWidget *page, int keyPoints = 0,
|
||||
ElaIconType::IconName awesome = ElaIconType::None);
|
||||
ElaNavigationType::NodeOperateReturnType addPageNode(QString pageTitle, QWidget *page, QString targetExpanderKey, int keyPoints = 0,
|
||||
ElaIconType::IconName awesome = ElaIconType::None);
|
||||
ElaNavigationType::NodeOperateReturnType addFooterNode(QString footerTitle, QString &footerKey, int keyPoints = 0,
|
||||
ElaIconType::IconName awesome = ElaIconType::None);
|
||||
ElaNavigationType::NodeOperateReturnType addFooterNode(QString footerTitle, QWidget *page, QString &footerKey, int keyPoints = 0,
|
||||
ElaIconType::IconName awesome = ElaIconType::None);
|
||||
|
||||
bool getNavigationNodeIsExpanded(QString expanderKey) const;
|
||||
void expandNavigationNode(QString expanderKey);
|
||||
@@ -37,7 +43,7 @@ public:
|
||||
void removeNavigationNode(QString nodeKey);
|
||||
|
||||
void setNodeKeyPoints(QString nodeKey, int keyPoints);
|
||||
int getNodeKeyPoints(QString nodeKey) const;
|
||||
int getNodeKeyPoints(QString nodeKey) const;
|
||||
|
||||
void navigation(QString pageKey, bool isLogClicked = true, bool isRouteBack = false);
|
||||
void setDisplayMode(ElaNavigationType::NavigationDisplayMode displayMode, bool isAnimation = true);
|
||||
@@ -48,11 +54,11 @@ Q_SIGNALS:
|
||||
Q_SIGNAL void pageOpenInNewWindow(QString nodeKey);
|
||||
Q_SIGNAL void userInfoCardClicked();
|
||||
Q_SIGNAL void navigationNodeClicked(ElaNavigationType::NavigationNodeType nodeType, QString nodeKey, bool isRouteBack);
|
||||
Q_SIGNAL void navigationNodeAdded(ElaNavigationType::NavigationNodeType nodeType, QString nodeKey, QWidget* page);
|
||||
Q_SIGNAL void navigationNodeAdded(ElaNavigationType::NavigationNodeType nodeType, QString nodeKey, QWidget *page);
|
||||
Q_SIGNAL void navigationNodeRemoved(ElaNavigationType::NavigationNodeType nodeType, QString nodeKey);
|
||||
|
||||
protected:
|
||||
virtual void paintEvent(QPaintEvent* event) override;
|
||||
virtual void paintEvent(QPaintEvent *event) override;
|
||||
};
|
||||
|
||||
#endif // ELANAVIGATIONBAR_H
|
||||
|
||||
Reference in New Issue
Block a user