2026-03-02 11:07:51 +08:00
|
|
|
#ifndef MAINWINDOW_H
|
|
|
|
|
#define MAINWINDOW_H
|
|
|
|
|
|
|
|
|
|
#include <QMainWindow>
|
|
|
|
|
#include <QMutex>
|
|
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
namespace Ui {
|
|
|
|
|
class MainWindow;
|
|
|
|
|
}
|
|
|
|
|
namespace ads {
|
|
|
|
|
class CDockManager;
|
|
|
|
|
class CDockAreaWidget;
|
|
|
|
|
class CDockWidget;
|
|
|
|
|
}
|
|
|
|
|
class QPlainTextEdit;
|
2026-03-05 20:48:07 +08:00
|
|
|
class MeasureAnalysisTreeView;
|
2026-03-02 11:07:51 +08:00
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
|
|
|
|
class MainWindow : public QMainWindow
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
enum OutputInfoType {
|
|
|
|
|
eInfo,
|
|
|
|
|
eWarning,
|
|
|
|
|
eError,
|
|
|
|
|
eDebug
|
|
|
|
|
};
|
|
|
|
|
Q_ENUM(OutputInfoType)
|
2026-03-20 00:24:07 +08:00
|
|
|
public:
|
2026-03-02 11:07:51 +08:00
|
|
|
static void OutputInfo(OutputInfoType out_type, const QString& ouput_info);
|
|
|
|
|
static void ShowStatusBarMsg(const QString& msg);
|
2026-03-20 00:24:07 +08:00
|
|
|
public slots:
|
|
|
|
|
void onOutputInfo(int out_type, const QString& ouput_info);
|
|
|
|
|
void onShowStatusBarMsg(const QString& msg);
|
2026-03-02 11:07:51 +08:00
|
|
|
private:
|
2026-03-20 00:24:07 +08:00
|
|
|
static MainWindow* _s_main_win;
|
2026-03-02 11:07:51 +08:00
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
MainWindow(QWidget *parent = nullptr);
|
|
|
|
|
~MainWindow();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
void initMainWindow();
|
|
|
|
|
void initAction();
|
|
|
|
|
void applyStyleSheet();
|
2026-03-12 20:23:55 +08:00
|
|
|
void closeProject(const QString &project_name);
|
2026-03-02 11:07:51 +08:00
|
|
|
|
2026-03-27 12:01:18 +08:00
|
|
|
signals:
|
|
|
|
|
void newProject(const QString &project_name);
|
|
|
|
|
|
2026-03-02 11:07:51 +08:00
|
|
|
protected:
|
2026-03-31 09:49:58 +08:00
|
|
|
virtual void showEvent(QShowEvent* event) override;
|
2026-03-02 11:07:51 +08:00
|
|
|
virtual void closeEvent(QCloseEvent* event) override;
|
|
|
|
|
|
2026-04-14 18:05:38 +08:00
|
|
|
private slots:
|
|
|
|
|
void on_action_nuclideLib_triggered();
|
|
|
|
|
|
2026-03-20 00:24:07 +08:00
|
|
|
private:
|
|
|
|
|
QMutex _mutex_info_output;
|
|
|
|
|
QPlainTextEdit* _plain_edit_info_output;
|
|
|
|
|
QStatusBar* _status_bar;
|
|
|
|
|
|
2026-03-02 11:07:51 +08:00
|
|
|
private:
|
|
|
|
|
Ui::MainWindow *ui;
|
|
|
|
|
ads::CDockManager* _dock_manager { nullptr };
|
|
|
|
|
ads::CDockAreaWidget* _central_dock_area { nullptr };
|
|
|
|
|
QAction* _action_central_dock_widget { nullptr };
|
2026-03-05 20:48:07 +08:00
|
|
|
MeasureAnalysisTreeView* _tree_measure_analysis { nullptr };
|
2026-03-02 18:56:21 +08:00
|
|
|
ads::CDockWidget* _dockw_measure_analysis_tree { nullptr };
|
2026-03-02 11:07:51 +08:00
|
|
|
QMenu* _menu_view_data_table_list { nullptr };
|
|
|
|
|
QMenu* _menu_view_analysis_view_list { nullptr };
|
|
|
|
|
};
|
|
|
|
|
#endif // MAINWINDOW_H
|