From 209d3efe02e60bf89e9cfb07c445c4537ae8db8c Mon Sep 17 00:00:00 2001 From: brige Date: Sat, 11 Oct 2025 08:17:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Dyt.qrc | 5 ++- src/config/skin/default.qss | 15 +++++++- src/res/default/menu_light_file.png | Bin 0 -> 973 bytes src/res/default/menu_surface_file.png | Bin 0 -> 1054 bytes src/res/default/menu_table_file.png | Bin 0 -> 326 bytes src/res/default/menu_wave_file.png | Bin 0 -> 662 bytes src/translations/Dyt_zh_CN.ts | 24 +++++++++++-- src/ui/EntityBrowser.cpp | 48 ++++++++++++++++++++++++++ src/ui/EntityBrowser.h | 24 +++++++++++++ src/ui/Menu/FileManagerMenu.ui | 40 +++++++++++++++++++++ 10 files changed, 152 insertions(+), 4 deletions(-) create mode 100644 src/res/default/menu_light_file.png create mode 100644 src/res/default/menu_surface_file.png create mode 100644 src/res/default/menu_table_file.png create mode 100644 src/res/default/menu_wave_file.png create mode 100644 src/ui/EntityBrowser.cpp create mode 100644 src/ui/EntityBrowser.h diff --git a/src/Dyt.qrc b/src/Dyt.qrc index 53582c31..5f8096ca 100644 --- a/src/Dyt.qrc +++ b/src/Dyt.qrc @@ -11,7 +11,10 @@ res/default/menu_new_file.png res/default/menu_open_file.png res/default/menu_save_file.png - res/default/menu_save_as_file.png + res/default/menu_wave_file.png + res/default/menu_light_file.png + res/default/menu_table_file.png + res/default/menu_surface_file.png res/default/menu_save_shape_file.png res/default/menu_save_store_file.png res/default/menu_report_mesh.png diff --git a/src/config/skin/default.qss b/src/config/skin/default.qss index d4c2f311..122b0a08 100644 --- a/src/config/skin/default.qss +++ b/src/config/skin/default.qss @@ -219,6 +219,18 @@ QWidget#FileManagerMenu > QToolButton#menu_save_shape_file { QWidget#FileManagerMenu > QToolButton#menu_save_shape_file { qproperty-icon: url(:/res/default/menu_report_mesh.png); } +QWidget#FileManagerMenu > QToolButton#menu_wave_file { + qproperty-icon: url(:/res/default/menu_wave_file.png); +} +QWidget#FileManagerMenu > QToolButton#menu_surface_file { + qproperty-icon: url(:/res/default/menu_surface_file.png); +} +QWidget#FileManagerMenu > QToolButton#menu_table_file { + qproperty-icon: url(:/res/default/menu_table_file.png); +} +QWidget#FileManagerMenu > QToolButton#menu_light_file { + qproperty-icon: url(:/res/default/menu_light_file.png); +} QWidget#SystemManagerMenu > QToolButton#menu_exit { qproperty-icon: url(:/res/default/menu_exit.png); @@ -322,6 +334,7 @@ QMenu { background: #212F3C; color: #e0e0e0; padding: 4px; + border-radius: 3px; } QMenu::item { padding: 6px 30px 6px 20px; @@ -340,4 +353,4 @@ QMenu::separator { height: 1px; background: #555; margin: 5px 10px; -} +} \ No newline at end of file diff --git a/src/res/default/menu_light_file.png b/src/res/default/menu_light_file.png new file mode 100644 index 0000000000000000000000000000000000000000..c0279ec819ebf72ed62edfa70a3ab6ae98abc282 GIT binary patch literal 973 zcmV;;12X)HP)+#s%*j`UE z8SU|Tcz8H|dU~2ecaM*cFYt|AVy|UlIedZR8~ETMh-S}15Nw=x)kGD5MZ~5Edt=DQUfOm-I&Rq%b#Zib zRIP_90CH&Vt?+9M3>rG8Sg%TDBLRr8@$vC7HLc~k^A>>27ol5m`re#tM8f$J;D4Q$ zBnX}(3h>|1x6uMHnM^_nV^;k)<*o-#W_T^yu045>>9&m)07In`09vO}zDq&?1Vbr>E5jRRM^U)5iw*EUS3ifzPaG&G`65IM=bH%Ki?B*5q^mf1Nnhv&ObOLadjfOVvbQ_GaAw&;}+98Fj<{+Khb^>r0 z@46w5+iXZZ5PFMlN@~_!dDm`IF97QS5K#}j$B|QOLPsSj(Od=DtEfN$5tp@pSBvRMmS`^%7X5EB`(| zJ~oak-K*PG1U^4M_cu2;TL<&^udlDi8gb@iHUR+lU_Ac({A?Y}m%R5>;{_s1KF@k4 z6EJuIC-bNK`}=1H^9Kl6jWutHZ00bSL_lzYzZ3Woz}4;T?T&do%#TcJ=In1FYFpN< zUwkeSXuuP}1wXV=0aFix9q#V#q8jc)_+?64E)pjb14*m9D_p zN**2W_Dy`?A0TF*u6 zvitd0C4fm(paD$;6v*8S*;wgR=Bd^Qt>ncAwb9&3Or&?3}5pFQvTbXCFr*Cz;&K?J1= z>ylCS@>KW*l0T+IRYEI>@6|rzqfjMo0+Q|QtK*qT5FkS{@#y)jWoF*(kr6;|tuKI~ z3w#6>(0e1YrV0wMHNQ9y0$Lf6jM^SYRZ7O%O;@~ zqAhXNYKMSFtK#02@hgE6AQSOw_JWDF@ardjph714kF5lG&3h&hC?O%@DT%hQrWnhQ z&o~XN&32}+2a2_ zLHGvC3>LRW%U_9;+N?X>-|X@dy}Gb}!JJE1_PwaunECkO`TcqetQBM=jvH=ui2Ls3 zAeT{^%O%mKSaG0ABe-Gei_-l0OaUF?{1JM3mIcn6*f*?|S&yZ{ghh9 zpmKJV%y&Nq_UE%KET3?%5o2JllID87ElNlBVAyZ*?=P8r*e`6}obOz6u(|G0{evK3 zb(nG7j1|c{Yq($4er6Y9`sA?swcdfdjh6!J7#SG;|DSVbb1N_y*g(O+%y8-Wlzo*X&+9VdX!H-jPz`pGS5 zoIWpVcOO)IAuV0qlz@uAj(co+#R-sG7&Nk=Z|;28>a%g)eUR}wFYdm&IRT!mH+DV( wTK7O*H2(kq0RR6s2%s?l000I_L_t&o0L-z#Q10|7O#lD@07*qoM6N<$f(suJUjP6A literal 0 HcmV?d00001 diff --git a/src/translations/Dyt_zh_CN.ts b/src/translations/Dyt_zh_CN.ts index d83e8bd1..9fd52a0a 100644 --- a/src/translations/Dyt_zh_CN.ts +++ b/src/translations/Dyt_zh_CN.ts @@ -381,6 +381,26 @@ save workspace + + + new wave file + + + + + new surface file + + + + + new table file + + + + + new light file + + Dyt (*.dyt) @@ -711,12 +731,12 @@ OsgWidget - + warning - + open dyt file failed diff --git a/src/ui/EntityBrowser.cpp b/src/ui/EntityBrowser.cpp new file mode 100644 index 00000000..404b8348 --- /dev/null +++ b/src/ui/EntityBrowser.cpp @@ -0,0 +1,48 @@ +#include "EntityBrowser.h" + +#include +#include + +#include "DockTitleBar.h" +#include "DockWidget.h" +// #include "ModelBrowser/ModelTreeWidget.h" +#include "workspace/WorkSpaceManager.h" + +EntityBrowser::EntityBrowser(QWidget *parent) : + QWidget(parent) { + + InitUI(); +} + +EntityBrowser::~EntityBrowser() { + +} + +void EntityBrowser::AttachDock(DockWidget* dockWidget) { + if (nullptr == dockWidget) { + qDebug() << __FUNCTION__ << "dockwidget is nullptr"; + return; + } + + dockWidget->SetDockWidgetTitleBar(nullptr); + dockWidget->setWidget(this); + + DockTitleBar* dockTitleBar = new DockTitleBar; + dockWidget->SetDockWidgetTitleBar(dockTitleBar); +} + +void EntityBrowser::InitUI() { + // QBoxLayout* layout = new QVBoxLayout(this); + // layout->setContentsMargins(0, 0, 0, 0); + + // treeWidget_ = new ModelTreeWidget; + // treeWidget_->setHeaderHidden(true); + // layout->addWidget(treeWidget_); + + // connect(&WorkSpaceManager::Get(), &WorkSpaceManager::WorkSpaceChanged, + // treeWidget_, &ModelTreeWidget::OnWorkspaceChange); + + // //ModelTreeWidget* treeWidget = modelBrowserPannal_->GetModelTreeWidget(); + // connect(treeWidget_, &ModelTreeWidget::WorkSpaceChange, this, &ModelBrowser::WorkSpaceChange); + // connect(treeWidget_, &ModelTreeWidget::EntityChange, this, &ModelBrowser::EntityChange); +} diff --git a/src/ui/EntityBrowser.h b/src/ui/EntityBrowser.h new file mode 100644 index 00000000..07412fae --- /dev/null +++ b/src/ui/EntityBrowser.h @@ -0,0 +1,24 @@ +#pragma once + +#include + +class EntityBrowser : public QWidget { + Q_OBJECT + +public: + explicit EntityBrowser(QWidget *parent = nullptr); + ~EntityBrowser() override; + + void AttachDock(class DockWidget* dockWidget); + +Q_SIGNALS: + void WorkSpaceChange(const QVariant& workSpace); + void EntityChange(const QVariant& workSpace); + +private: + void InitUI(); + +private: + // class ModelTreeWidget* treeWidget_; +}; + diff --git a/src/ui/Menu/FileManagerMenu.ui b/src/ui/Menu/FileManagerMenu.ui index d356a9e2..0aa0b80b 100644 --- a/src/ui/Menu/FileManagerMenu.ui +++ b/src/ui/Menu/FileManagerMenu.ui @@ -54,6 +54,46 @@ + + + + new wave file + + + + + + + + + + new surface file + + + + + + + + + + new table file + + + + + + + + + + new light file + + + + + +