Apply clang-format to Lts/Common and DTC/enum headers
- Formatted all CodeGen module files (9 files) - Formatted LtsAppDescriptor module files - Formatted LtsAppManager/AppChooser files - Applied clang-format to all DTC and enum headers across modules - Removed coordTransTests from CommonUnitTestsPlaceholder (moved to tests/) Cosmetic changes only, no functional modifications. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
848 files changed
+89305
-100020
No files matched your search
Executable → Regular
+60
-111
@@ -1,164 +1,113 @@
|
||||
|
||||
|
||||
|
||||
#pragma once
|
||||
#include <QObject>
|
||||
|
||||
#include "lts_base.h"
|
||||
#include "ltswidgets_export.h"
|
||||
|
||||
#include <QTabWidget>
|
||||
#include <QMap>
|
||||
#include <QAbstractButton>
|
||||
|
||||
#include <QMap>
|
||||
#include <QObject>
|
||||
#include <QTabWidget>
|
||||
|
||||
namespace LtsWidgets
|
||||
{
|
||||
class LtsDialogHelper;
|
||||
class LtsTabBar;
|
||||
|
||||
|
||||
|
||||
class LTSWIDGETS_EXPORT LtsTabWidget : public QTabWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit LtsTabWidget(QWidget* parent = nullptr, bool isSecondary = false);
|
||||
~LtsTabWidget();
|
||||
|
||||
explicit LtsTabWidget(QWidget *parent = nullptr, bool isSecondary = false);
|
||||
~LtsTabWidget();
|
||||
void setActuatorTabStyle(bool enable);
|
||||
|
||||
|
||||
void clearAll();
|
||||
|
||||
void setActuatorTabStyle(bool enable);
|
||||
void aboutToClose();
|
||||
|
||||
|
||||
LtsTabBar* tabBar();
|
||||
|
||||
void clearAll();
|
||||
void setTabBar(LtsTabBar* tabbar);
|
||||
|
||||
bool focusTab(const QString& menuGroup, const QString& identifier);
|
||||
|
||||
void aboutToClose();
|
||||
void setSubTabsVisible(bool visible);
|
||||
|
||||
|
||||
QWidget* getWidget(const QString& menuGroup, const QString& identifier);
|
||||
|
||||
LtsTabBar *tabBar();
|
||||
static bool hasUnsavedChanges(LtsTabWidget* tabWidget);
|
||||
|
||||
|
||||
signals:
|
||||
|
||||
void setTabBar(LtsTabBar *tabbar);
|
||||
void signalCheckTabBarVisibility();
|
||||
|
||||
|
||||
public slots:
|
||||
|
||||
bool focusTab(const QString &menuGroup, const QString &identifier);
|
||||
void addTab(const QString& menuGroup, const QString& identifier, QWidget* widget, bool setClosable = true,
|
||||
bool focusNewTab = true);
|
||||
|
||||
|
||||
bool removeWidget(QWidget* widget);
|
||||
|
||||
void setSubTabsVisible(bool visible);
|
||||
private slots:
|
||||
|
||||
|
||||
void onRemoveTab(QObject* object);
|
||||
|
||||
QWidget *getWidget(const QString &menuGroup, const QString &identifier);
|
||||
void onCheckTabBarVisibility();
|
||||
|
||||
|
||||
void slotTabCloseRequested(int index);
|
||||
|
||||
static bool hasUnsavedChanges(LtsTabWidget *tabWidget);
|
||||
void slotCurrentChanged(int newIdx);
|
||||
|
||||
void slotMaximizeButtonClicked();
|
||||
|
||||
private:
|
||||
void addWidget(const QString& fullName, QWidget* widget, bool setClosable, bool focusNewTab = true);
|
||||
|
||||
signals:
|
||||
|
||||
QWidget* getWidget(const QString& fullName);
|
||||
|
||||
void signalCheckTabBarVisibility();
|
||||
bool focusWidget(const QString& fullName);
|
||||
|
||||
void slotWindowTitleChanged(const QString& title);
|
||||
|
||||
public slots:
|
||||
|
||||
void closeRequestTabWidget(LtsTabWidget* tabWidget);
|
||||
|
||||
void addTab(const QString &menuGroup, const QString &identifier, QWidget *widget,
|
||||
bool setClosable = true, bool focusNewTab = true);
|
||||
QPoint startPos;
|
||||
LtsTabBar* m_tabbar = nullptr;
|
||||
QPalette m_palette;
|
||||
|
||||
|
||||
QMap<QString, QWidget*> m_tabMap;
|
||||
|
||||
bool removeWidget(QWidget * widget);
|
||||
bool m_hasSubTabs;
|
||||
bool m_isSecondary;
|
||||
|
||||
private slots:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void onRemoveTab(QObject *object);
|
||||
|
||||
|
||||
|
||||
void onCheckTabBarVisibility();
|
||||
|
||||
|
||||
|
||||
void slotTabCloseRequested(int index);
|
||||
|
||||
void slotCurrentChanged(int newIdx);
|
||||
|
||||
void slotMaximizeButtonClicked();
|
||||
|
||||
private:
|
||||
|
||||
|
||||
void addWidget(const QString &fullName, QWidget *widget, bool setClosable, bool focusNewTab = true);
|
||||
|
||||
|
||||
|
||||
QWidget *getWidget(const QString &fullName);
|
||||
|
||||
|
||||
|
||||
bool focusWidget(const QString &fullName);
|
||||
|
||||
|
||||
|
||||
void slotWindowTitleChanged(const QString &title);
|
||||
|
||||
void closeRequestTabWidget(LtsTabWidget *tabWidget);
|
||||
|
||||
QPoint startPos;
|
||||
LtsTabBar *m_tabbar = nullptr;
|
||||
QPalette m_palette;
|
||||
|
||||
|
||||
QMap<QString, QWidget *> m_tabMap;
|
||||
|
||||
|
||||
bool m_hasSubTabs;
|
||||
bool m_isSecondary;
|
||||
|
||||
QByteArray m_mainSplitterState;
|
||||
QByteArray m_mainSplitterState;
|
||||
};
|
||||
|
||||
|
||||
class CloseButton : public QAbstractButton
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
using QAbstractButton::QAbstractButton;
|
||||
public:
|
||||
using QAbstractButton::QAbstractButton;
|
||||
|
||||
void setFontColor(const QColor &fontColor) { m_fontColor = fontColor; }
|
||||
QRectF cross() const;
|
||||
QLineF line() const;
|
||||
void setFontColor(const QColor& fontColor)
|
||||
{
|
||||
m_fontColor = fontColor;
|
||||
}
|
||||
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent *e) override;
|
||||
void mouseReleaseEvent(QMouseEvent *e) override;
|
||||
void paintEvent(QPaintEvent *e) override;
|
||||
QSize sizeHint() const override;
|
||||
QRectF cross() const;
|
||||
QLineF line() const;
|
||||
|
||||
private:
|
||||
QColor m_fontColor;
|
||||
bool m_isPressed = false;
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent* e) override;
|
||||
void mouseReleaseEvent(QMouseEvent* e) override;
|
||||
void paintEvent(QPaintEvent* e) override;
|
||||
QSize sizeHint() const override;
|
||||
|
||||
private:
|
||||
QColor m_fontColor;
|
||||
bool m_isPressed = false;
|
||||
};
|
||||
}
|
||||
} // namespace LtsWidgets
|
||||
Reference in new issue
Block a user