1-调整部分UI组件
2-调整背景颜色为有限度透明 提醒:OpenCAX由于商标已经被注册,所以本软件即日起改名NXEA
This commit is contained in:
parent
50bcf7b678
commit
45176b5d7e
@ -1,6 +1,6 @@
|
||||
{
|
||||
"app": {
|
||||
"bundleName": "com.example.opencax",
|
||||
"bundleName": "com.example.nxea",
|
||||
"vendor": "example",
|
||||
"versionCode": 1000000,
|
||||
"versionName": "1.0.0",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"string": [
|
||||
{
|
||||
"name": "app_name",
|
||||
"value": "OpenCAX"
|
||||
"value": "NXEA"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -5,13 +5,13 @@
|
||||
"name": "default",
|
||||
"type": "HarmonyOS",
|
||||
"material": {
|
||||
"certpath": "C:\\Users\\JackLee\\.ohos\\config\\default_OpenCAX_IBQbNZG6W5V0zTmQxRPojupy-F1gTlaQ6msiMPu4JRM=.cer",
|
||||
"certpath": "C:\\Users\\JackLee\\.ohos\\config\\default_NXEA_0s33e8rF_-eDfV9W_2q2am8R5niF3V4xhQxkUtRtaC0=.cer",
|
||||
"keyAlias": "debugKey",
|
||||
"keyPassword": "0000001B3A77593550E08B545C9DBACCC59B3C15B073167C67ECEF2B8B6B92A7FB893F9EF12C0B46F27F1D",
|
||||
"profile": "C:\\Users\\JackLee\\.ohos\\config\\default_OpenCAX_IBQbNZG6W5V0zTmQxRPojupy-F1gTlaQ6msiMPu4JRM=.p7b",
|
||||
"keyPassword": "0000001AA30759760D9D5D17A91BFB7147D9F271378B6316F13E50379FF23A4CF9A209064CA81F434E86",
|
||||
"profile": "C:\\Users\\JackLee\\.ohos\\config\\default_NXEA_0s33e8rF_-eDfV9W_2q2am8R5niF3V4xhQxkUtRtaC0=.p7b",
|
||||
"signAlg": "SHA256withECDSA",
|
||||
"storeFile": "C:\\Users\\JackLee\\.ohos\\config\\default_OpenCAX_IBQbNZG6W5V0zTmQxRPojupy-F1gTlaQ6msiMPu4JRM=.p12",
|
||||
"storePassword": "0000001BA261C4B798064E9B27EDF1ABE90DCBB63F196BE8922529410D84879CD4436A14ADCC49F3E6248D"
|
||||
"storeFile": "C:\\Users\\JackLee\\.ohos\\config\\default_NXEA_0s33e8rF_-eDfV9W_2q2am8R5niF3V4xhQxkUtRtaC0=.p12",
|
||||
"storePassword": "0000001A54288F3ED33A493359C0F43F9FDBB746AC483C30B3CCC3CDCD726910AFD3190EDD7ABC9D16BE"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
@ -6,13 +6,13 @@
|
||||
"lockfileVersion": 3,
|
||||
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
|
||||
"specifiers": {
|
||||
"libopencax.so@src/main/cpp/types/libopencax": "libopencax.so@src/main/cpp/types/libopencax"
|
||||
"libnxea.so@src/main/cpp/types/libnxea": "libnxea.so@src/main/cpp/types/libnxea"
|
||||
},
|
||||
"packages": {
|
||||
"libopencax.so@src/main/cpp/types/libopencax": {
|
||||
"name": "libopencax.so",
|
||||
"libnxea.so@src/main/cpp/types/libnxea": {
|
||||
"name": "libnxea.so",
|
||||
"version": "1.0.0",
|
||||
"resolved": "src/main/cpp/types/libopencax",
|
||||
"resolved": "src/main/cpp/types/libnxea",
|
||||
"registryType": "local"
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,6 +6,6 @@
|
||||
"author": "",
|
||||
"license": "",
|
||||
"dependencies": {
|
||||
"libopencax.so": "file:./src/main/cpp/types/libopencax"
|
||||
"libnxea.so": "file:./src/main/cpp/types/libnxea"
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
# the minimum version of CMake.
|
||||
cmake_minimum_required(VERSION 3.18.1)
|
||||
project(opencax)
|
||||
project(nxea)
|
||||
|
||||
set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
add_definitions(-DOHOS_PLATFORM)
|
||||
@ -43,7 +43,7 @@ foreach(LIB_NAME ${OCCT_3RD_LIBS})
|
||||
endforeach()
|
||||
|
||||
# 添加源文件
|
||||
add_library(opencax SHARED
|
||||
add_library(nxea SHARED
|
||||
napi_init.cpp
|
||||
# Header
|
||||
NativeEGLOCCT/EGLMgr/EGLCore.h
|
||||
@ -80,7 +80,7 @@ add_library(opencax SHARED
|
||||
NativeEGLOCCT/Visualization/Tri/V3dTri.cpp
|
||||
NativeEGLOCCT/Visualization/Tri/V3dWCSTri.cpp
|
||||
NativeEGLOCCT/Visualization/Tri/V3dTriCube.cpp
|
||||
NativeEGLOCCT/ViewController/V3dViewController.h NativeEGLOCCT/ViewController/V3dViewController.cpp)
|
||||
NativeEGLOCCT/ViewController/V3dViewController.h NativeEGLOCCT/ViewController/V3dViewController.cpp)
|
||||
|
||||
|
||||
# 查找系统库
|
||||
@ -95,8 +95,8 @@ set(SYSTEM_LIBS
|
||||
)
|
||||
|
||||
# 链接系统库
|
||||
target_link_libraries(opencax PUBLIC ${SYSTEM_LIBS})
|
||||
target_link_libraries(opencax PUBLIC
|
||||
target_link_libraries(nxea PUBLIC ${SYSTEM_LIBS})
|
||||
target_link_libraries(nxea PUBLIC
|
||||
# EGL Hilog 库
|
||||
${EGL-lib}
|
||||
${GLES-lib}
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#define NATIVE_TAG "EGLCore"
|
||||
#endif
|
||||
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
|
||||
// 配置EGL
|
||||
EGLint cfgAttribs[] = {
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#include "../common.h"
|
||||
#include <EGL/egl.h>
|
||||
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
class EGLCore {
|
||||
public:
|
||||
EGLCore();
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#define NATIVE_TAG "EGLSubCore"
|
||||
#endif
|
||||
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
|
||||
// 创建EGL context
|
||||
EGLint ctxAttribs[] = {EGL_CONTEXT_CLIENT_VERSION, 3, EGL_NONE};
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
#include <EGL/egl.h>
|
||||
#include <GLES3/gl3.h>
|
||||
#include <native_window/external_window.h>
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
|
||||
class EGLSubCore {
|
||||
public:
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
#endif
|
||||
#include "arkui/ui_input_event.h"
|
||||
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
// [Start plugin_manager_cpp]
|
||||
// plugin_manager.cpp
|
||||
std::unordered_map<std::string, ArkUI_NodeHandle> NativeMgr::nodeHandleMap_;
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
#include <arkui/native_node.h>
|
||||
#include <arkui/native_type.h>
|
||||
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
|
||||
constexpr const int ZERO_ARG = 0;
|
||||
constexpr const int FIRST_ARG = 1;
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
#define NATIVE_TAG "OCCTMgr"
|
||||
#endif
|
||||
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
|
||||
OCCTMgr::OCCTMgr():eglCore(nullptr)
|
||||
{
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
#include "../EGLMgr/EGLCore.h"
|
||||
#include "../EGLMgr/EGLSubCore.h"
|
||||
#include "RenderThread.h"
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
|
||||
|
||||
class OCCTMgr {
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
#endif
|
||||
|
||||
static std::mutex renderMutex;
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
|
||||
Render::Render(int w, int h):
|
||||
width(0),
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
#include "../ViewController/V3dViewController.h"
|
||||
//TextLabel_Dev
|
||||
#include <AIS_TextLabel.hxx>
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
|
||||
class Render {
|
||||
public:
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
#include <cstdio>
|
||||
#include <unistd.h>
|
||||
#include <hilog/log.h>
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
|
||||
RenderThread::RenderThread()
|
||||
: isRunning_(false)
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
#include <AIS_TextLabel.hxx>
|
||||
#include <Resource_Unicode.hxx>
|
||||
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
|
||||
struct ThreadInfo{
|
||||
int width;
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
// please include "napi/native_api.h".
|
||||
|
||||
#include "V3dViewController.h"
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
|
||||
V3dViewController::V3dViewController()
|
||||
{
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
#ifndef OPENCAX_V3DVIEWCONTROLLER_H
|
||||
#define OPENCAX_V3DVIEWCONTROLLER_H
|
||||
#include "AIS_ViewController.hxx"
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
class V3dViewController {
|
||||
public:
|
||||
V3dViewController();
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#define NATIVE_TAG "CAMERA"
|
||||
#endif
|
||||
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
|
||||
V3dCamera::V3dCamera() : camera(nullptr) {}
|
||||
V3dCamera::~V3dCamera() {}
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#include <V3d_View.hxx>
|
||||
#include <Graphic3d_Camera.hxx>
|
||||
#include <gp_Quaternion.hxx>
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
|
||||
class V3dCamera{
|
||||
public:
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#define NATIVE_TAG "CTX"
|
||||
#endif
|
||||
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
|
||||
V3dCtx::V3dCtx():
|
||||
ctx(nullptr)
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
#include "../Drawer/V3dDrawer.h"
|
||||
|
||||
namespace NativeOpenCAX{
|
||||
namespace NativeNXEA{
|
||||
|
||||
class V3dCtx{
|
||||
public:
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
#define NATIVE_TAG "V3DDRAWER"
|
||||
#endif
|
||||
#include "V3dDrawer.h"
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
|
||||
V3dDrawer::V3dDrawer() :
|
||||
drawer(nullptr),
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
#include <Prs3d_DatumAspect.hxx>
|
||||
#include <Prs3d_DimensionAspect.hxx>
|
||||
|
||||
namespace NativeOpenCAX{
|
||||
namespace NativeNXEA{
|
||||
|
||||
class V3dDrawer {
|
||||
public:
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#define NATIVE_TAG "GRAPHIC_DRIVER"
|
||||
#endif
|
||||
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
|
||||
V3dOGD::V3dOGD() : graphicDriver(nullptr), displayConnection(nullptr) {}
|
||||
V3dOGD::~V3dOGD() {}
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
#include <OpenGl_GraphicDriver.hxx>
|
||||
#include <Graphic3d_GraphicDriver.hxx>
|
||||
|
||||
namespace NativeOpenCAX{
|
||||
namespace NativeNXEA{
|
||||
class V3dOGD{
|
||||
public:
|
||||
V3dOGD();
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
#ifndef NATIVE_TAG
|
||||
#define NATIVE_TAG "V3DTRI"
|
||||
#endif
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
|
||||
V3dTri::V3dTri():
|
||||
axiPlam(nullptr),
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#include <AIS_Trihedron.hxx>
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <Geom_Axis2Placement.hxx>
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
|
||||
class V3dTri {
|
||||
public:
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#ifndef NATIVE_TAG
|
||||
#define NATIVE_TAG "V3DTRICUBE"
|
||||
#endif
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
|
||||
V3dTriCube::V3dTriCube():
|
||||
triCube(nullptr)
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
#include <Graphic3d_TransformPers.hxx>
|
||||
#include <AIS_ViewCube.hxx>
|
||||
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
|
||||
class V3dTriCube {
|
||||
public:
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
#ifndef NATIVE_TAG
|
||||
#define NATIVE_TAG "V3DWCSTRI"
|
||||
#endif
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
|
||||
V3dWCSTri::V3dWCSTri()
|
||||
{
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#include <AIS_Trihedron.hxx>
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <Geom_Axis2Placement.hxx>
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
|
||||
class V3dWCSTri {
|
||||
public:
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define NATIVE_TAG "VIEW"
|
||||
#endif
|
||||
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
|
||||
V3dView::V3dView() : view(nullptr) {}
|
||||
V3dView::~V3dView() {}
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
#include <AIS_AnimationCamera.hxx>
|
||||
#include <V3d.hxx>
|
||||
|
||||
namespace NativeOpenCAX{
|
||||
namespace NativeNXEA{
|
||||
|
||||
class V3dView{
|
||||
public:
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
#endif
|
||||
#include <V3d_DirectionalLight.hxx>
|
||||
#include <V3d_AmbientLight.hxx>
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
|
||||
V3dViewer::V3dViewer() : viewer(nullptr) {}
|
||||
V3dViewer::~V3dViewer() {}
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
#include <V3d_Viewer.hxx>
|
||||
#include <OpenGl_GraphicDriver.hxx>
|
||||
|
||||
namespace NativeOpenCAX{
|
||||
namespace NativeNXEA{
|
||||
|
||||
class V3dViewer{
|
||||
public:
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
#ifndef NATIVE_TAG
|
||||
#define NATIVE_TAG "WINDOW"
|
||||
#endif
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
|
||||
V3dWin::V3dWin():win(nullptr){
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#include "NativeEGLOCCT/common.h"
|
||||
#include <Aspect_NeutralWindow.hxx>
|
||||
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
|
||||
class V3dWin {
|
||||
public:
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
#include "NativeEGLOCCT/common.h"
|
||||
#include "NativeEGLOCCT/NativeMgr.h"
|
||||
|
||||
namespace NativeOpenCAX {
|
||||
namespace NativeNXEA {
|
||||
EXTERN_C_START
|
||||
static napi_value Init(napi_env env, napi_value exports) {
|
||||
OH_LOG_Print(LOG_APP, LOG_INFO, LOG_PRINT_DOMAIN, "Init", "Init begins");
|
||||
@ -31,18 +31,18 @@ static napi_value Init(napi_env env, napi_value exports) {
|
||||
EXTERN_C_END
|
||||
|
||||
// 编写接口的描述信息,根据实际需要可以修改对应参数
|
||||
static napi_module OpenCAXModel = {
|
||||
static napi_module NXEAModel = {
|
||||
.nm_version = 1,
|
||||
.nm_flags = 0,
|
||||
.nm_filename = nullptr,
|
||||
.nm_register_func = Init,
|
||||
.nm_modname = "opencax",
|
||||
.nm_modname = "nxea",
|
||||
.nm_priv = ((void*)0),
|
||||
.reserved = { 0 }
|
||||
};
|
||||
}
|
||||
extern "C" __attribute__((constructor))
|
||||
void RegisterOpenCAXModule(void)
|
||||
void RegisterNXEAModule(void)
|
||||
{
|
||||
napi_module_register(&NativeOpenCAX::OpenCAXModel);
|
||||
napi_module_register(&NativeNXEA::NXEAModel);
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
export interface NativeXOpenCAX {
|
||||
export interface NativeNXEA {
|
||||
setFrameRate(nodeId: string, min: number, max: number, expected: number): void;
|
||||
setNeedSoftKeyboard(nodeId: string, need: boolean): void;
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "libopencax.so",
|
||||
"name": "libnxea.so",
|
||||
"types": "./Index.d.ts",
|
||||
"version": "1.0.0",
|
||||
"description": "Please describe the basic information."
|
||||
@ -34,6 +34,12 @@ function SetWinSize (width:number,height:number){
|
||||
console.error(`MainWindow SetWinSize Error: win is nullptr!`);
|
||||
}
|
||||
}
|
||||
function SetBackgroundColor(){
|
||||
if(mdwInfo.win){
|
||||
mdwInfo.win.setWindowBackgroundColor('#B3FFFFFF');
|
||||
mdwInfo.win.setWindowContainerColor('#B3FFFFFF', '#FFFFFFFF');
|
||||
}
|
||||
}
|
||||
//窗口的事件监听
|
||||
function InitWinEventHub(ctx:common.UIAbilityContext){
|
||||
if(mdwInfo.win==undefined||mdwInfo.winStage==undefined){
|
||||
@ -63,13 +69,14 @@ export function InitLoadInfoPage(){
|
||||
hilog.error(DOMAIN, 'Tag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err));
|
||||
return;
|
||||
}
|
||||
SetWinSize(mdwInfo.winWidth,mdwInfo.winHeight)
|
||||
SetDisplayPosition((mdwInfo.displayWidth-InfoWinMargin[0])/4.16,(mdwInfo.displayHeight-InfoWinMargin[1])/4.16);
|
||||
SetBackgroundColor();
|
||||
hilog.info(DOMAIN, 'testTag', 'Succeeded in loading the content.');
|
||||
});
|
||||
}else{
|
||||
console.error(`InitLoadInfoPage winStage Error: win is nullptr!`);
|
||||
}
|
||||
SetWinSize(mdwInfo.winWidth,mdwInfo.winHeight)
|
||||
SetDisplayPosition((mdwInfo.displayWidth-InfoWinMargin[0])/4.16,(mdwInfo.displayHeight-InfoWinMargin[1])/4.16);
|
||||
}
|
||||
//WinStage加载软件Info页面
|
||||
export function InitLoadMainPage(rType:LoadPageType){
|
||||
@ -81,6 +88,11 @@ export function InitLoadMainPage(rType:LoadPageType){
|
||||
hilog.error(DOMAIN, 'Tag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err));
|
||||
return;
|
||||
}
|
||||
mdwInfo.winWidth=mdwInfo.displayWidth-MainWinMargin[0];
|
||||
mdwInfo.winHeight=mdwInfo.displayHeight-MainWinMargin[1]*2;
|
||||
SetWinSize(mdwInfo.winWidth,mdwInfo.winHeight)
|
||||
SetDisplayPosition(MainWinMargin[0]/2,MainWinMargin[1]/2);
|
||||
SetBackgroundColor();
|
||||
hilog.info(DOMAIN, 'testTag', 'Succeeded in loading the content.');
|
||||
});
|
||||
}else{
|
||||
@ -93,6 +105,11 @@ export function InitLoadMainPage(rType:LoadPageType){
|
||||
hilog.error(DOMAIN, 'Tag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err));
|
||||
return;
|
||||
}
|
||||
mdwInfo.winWidth=mdwInfo.displayWidth-MainWinMargin[0];
|
||||
mdwInfo.winHeight=mdwInfo.displayHeight-MainWinMargin[1]*2;
|
||||
SetWinSize(mdwInfo.winWidth,mdwInfo.winHeight)
|
||||
SetDisplayPosition(MainWinMargin[0]/2,MainWinMargin[1]/2);
|
||||
SetBackgroundColor();
|
||||
hilog.info(DOMAIN, 'testTag', 'Succeeded in loading the content.');
|
||||
});
|
||||
mdwInfo.win.showWindow();
|
||||
@ -100,10 +117,6 @@ export function InitLoadMainPage(rType:LoadPageType){
|
||||
console.error(`InitLoadInfoPage winStage Error: win is nullptr!`);
|
||||
}
|
||||
}
|
||||
mdwInfo.winWidth=mdwInfo.displayWidth-MainWinMargin[0];
|
||||
mdwInfo.winHeight=mdwInfo.displayHeight-MainWinMargin[1]*2;
|
||||
SetWinSize(mdwInfo.winWidth,mdwInfo.winHeight)
|
||||
SetDisplayPosition(MainWinMargin[0]/2,MainWinMargin[1]/2);
|
||||
}
|
||||
|
||||
//初始化显示信息页面
|
||||
@ -116,7 +129,6 @@ export function InitInfoWindow(winStage: window.WindowStage,ctx:common.UIAbility
|
||||
}
|
||||
InitGlobalDWI(winStage);
|
||||
InitLoadInfoPage();
|
||||
//InitLoadMainPage(LoadPageType.STAGE)
|
||||
InitWinEventHub(ctx);
|
||||
});
|
||||
}
|
||||
@ -70,8 +70,8 @@ struct Index {
|
||||
//OpenCAX主界面整体布局,采用多行布局
|
||||
Column() {
|
||||
//头部导航功能区
|
||||
//Blank().height(uiMode.state?'15%':'0%')
|
||||
TitleTab().height(uiMode.state?mdwInfo.displayHeight*0.07:0)
|
||||
Blank().height(uiMode.state?mdwInfo.displayHeight*0.07:0)
|
||||
//TitleTab().height(uiMode.state?mdwInfo.displayHeight*0.07:0)
|
||||
//分割线
|
||||
Divider().vertical(false).strokeWidth(1).lineCap(LineCapStyle.Round).width('100%').backgroundColor(Color.Grey)
|
||||
//工具栏
|
||||
@ -116,11 +116,9 @@ struct Index {
|
||||
}.width('100%')
|
||||
.justifyContent(FlexAlign.Start)
|
||||
.height(mdwInfo.displayHeight*0.02)
|
||||
.backgroundColor(Color.Transparent)
|
||||
}
|
||||
// TitleTab()
|
||||
// .height(uiMode.state?'15%':'0%')
|
||||
// .backgroundColor(Color.Transparent)
|
||||
// .backgroundBlurStyle(BlurStyle.Thin, { colorMode: ThemeColorMode.LIGHT, adaptiveColor: AdaptiveColor.DEFAULT, scale: 1.0 })
|
||||
TitleTab().height(uiMode.state?mdwInfo.displayHeight*0.07:0)
|
||||
|
||||
}.width('100%')
|
||||
.height('100%')
|
||||
|
||||
@ -4,9 +4,9 @@ import { common } from '@kit.AbilityKit';
|
||||
import { SWInfo } from './subpages/info/SWInfo';
|
||||
import { SWSrc } from './subpages/info/SWSrc';
|
||||
import { SWEnv } from './subpages/info/SWEnv';
|
||||
import { SegmentButtonV2Items,TabSegmentButtonV2 } from '@kit.ArkUI';
|
||||
|
||||
|
||||
const TabsBarStr:Array<string>=['运行检测','软件介绍','更新日志','开源信息','关于']
|
||||
@Entry
|
||||
@ComponentV2
|
||||
struct Info {
|
||||
@ -14,53 +14,23 @@ struct Info {
|
||||
private titleBarTabs: TabsController = new TabsController();
|
||||
//当前的顶部导航选择页
|
||||
@Local selectedIndex: number = 0; // 当前选中的索引
|
||||
@Local textItems: SegmentButtonV2Items = new SegmentButtonV2Items([
|
||||
{ text: '运行检测' },
|
||||
{ text: '软件介绍' },
|
||||
{ text: '更新日志' },
|
||||
{ text: '开源信息' },
|
||||
{ text: '关于' },
|
||||
]);
|
||||
build() {
|
||||
Flex({ direction: FlexDirection.Column }){
|
||||
Scroll() {
|
||||
Row({space:0}) {
|
||||
Blank().layoutWeight(1)
|
||||
ForEach(TabsBarStr, (item: string, index: number) => {
|
||||
Button(){
|
||||
Column(){
|
||||
Text(item)
|
||||
.height('95%')
|
||||
.fontSize(index === this.selectedIndex ? 20 : 16)
|
||||
.fontWeight(index === this.selectedIndex ? FontWeight.Bold : FontWeight.Normal)
|
||||
.backgroundColor(Color.Transparent)
|
||||
Divider()
|
||||
.height('5%')
|
||||
.vertical(false)
|
||||
.strokeWidth(2)
|
||||
.lineCap(LineCapStyle.Round)
|
||||
.color(Color.Grey)
|
||||
.align(Alignment.Top)
|
||||
.visibility(index === this.selectedIndex?Visibility.Visible:Visibility.Hidden)
|
||||
}.width('100%')
|
||||
.height('100%')
|
||||
}
|
||||
.width('7%')
|
||||
.backgroundColor(index === this.selectedIndex ? $r('sys.color.container_modal_button_normal_baseboard') : Color.Transparent)
|
||||
.type(ButtonType.Normal)
|
||||
.onClick(() => {
|
||||
this.titleBarTabs.changeIndex(index);
|
||||
this.selectedIndex = index;
|
||||
})
|
||||
})
|
||||
Blank().layoutWeight(1)
|
||||
}
|
||||
}
|
||||
.height('5%')
|
||||
.align(Alignment.Center)
|
||||
.scrollable(ScrollDirection.Horizontal)
|
||||
.scrollBar(BarState.Off)
|
||||
.margin({ top: 0,left:0,bottom:0,right:0})
|
||||
//分割线
|
||||
Divider()
|
||||
.vertical(false)
|
||||
.strokeWidth(1)
|
||||
.lineCap(LineCapStyle.Round)
|
||||
.width('100%')
|
||||
.backgroundColor(Color.Grey)
|
||||
Row(){
|
||||
Blank().layoutWeight(1)
|
||||
TabSegmentButtonV2({
|
||||
items: this.textItems,
|
||||
selectedIndex: this.selectedIndex!!,
|
||||
}).width('60%')
|
||||
Blank().layoutWeight(1)
|
||||
}.margin({ top: '1%'})
|
||||
|
||||
Tabs({barPosition: BarPosition.Start, index: this.selectedIndex,controller: this.titleBarTabs}){
|
||||
TabContent() {
|
||||
@ -90,7 +60,7 @@ struct Info {
|
||||
console.info('Checkbox1 change is'+ value);
|
||||
})
|
||||
Text('下次启动不再显示').fontSize(18)
|
||||
Button('确定')
|
||||
Button('确定', { buttonStyle: ButtonStyleMode.NORMAL, role: ButtonRole.NORMAL })
|
||||
.onClick(()=>{
|
||||
let ctx=this.getUIContext().getHostContext() as common.UIAbilityContext;
|
||||
ctx.eventHub.emit('EMIT_LOADMAINPAGE',LoadPageType.STAGE)
|
||||
@ -98,6 +68,8 @@ struct Info {
|
||||
Blank().layoutWeight(1)
|
||||
}.height('5%')
|
||||
.justifyContent(FlexAlign.Center)
|
||||
}.margin({ top:'1%', left: 0, bottom: '1%', right:0 })
|
||||
.margin({ bottom: '1%'})
|
||||
}.width('100%')
|
||||
.height('100%')
|
||||
}
|
||||
}
|
||||
@ -4,7 +4,7 @@ import { mdwInfo } from '../dispwininfo/DispWinInfo';
|
||||
import { window } from '@kit.ArkUI';
|
||||
import { common, StartOptions,Want } from "@kit.AbilityKit";
|
||||
import { picker } from '@kit.CoreFileKit';
|
||||
import NativeOpenCAX from 'libopencax.so';
|
||||
import NativeOpenCAX from 'libnxea.so';
|
||||
import {EventSubAbility} from './EventSubAbility'
|
||||
|
||||
import {
|
||||
|
||||
@ -7,7 +7,7 @@ import { SubWinInfo } from "./EventBase";
|
||||
export async function EventSubAbility(winInfo:SubWinInfo): Promise<boolean>{
|
||||
let ctx = mdwInfo.win?.getUIContext().getHostContext() as common.UIAbilityContext;
|
||||
let want: Want = {
|
||||
bundleName: 'com.example.opencax',
|
||||
bundleName: 'com.example.nxea',
|
||||
abilityName: 'SubAbility',
|
||||
parameters: {
|
||||
instanceKey: winInfo.subEventName as string
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { AppStorageV2, NodeContent } from "@kit.ArkUI";
|
||||
import {RndId} from './EventBase'
|
||||
import NativeOpenCAX from 'libopencax.so';
|
||||
import NativeOpenCAX from 'libnxea.so';
|
||||
|
||||
@ObservedV2
|
||||
export class XCompInfo{
|
||||
|
||||
@ -10,7 +10,7 @@ import {
|
||||
import {
|
||||
FreeWinMode,
|
||||
ExtractFonts
|
||||
} from '../../initEvent/InitEnv';
|
||||
} from '../../initevent/InitEnv';
|
||||
|
||||
export let DisplayMode:Array<TitleButton>=[
|
||||
{btnModel:[ModelType.BASE],btnName:"横屏",btnNamed:"",btnIcon:"",btnTips:"横屏",btnEvent:{uid:'',command:'',page:'',type:EventType.EVENT,args:[]}},
|
||||
@ -85,6 +85,7 @@ export struct SWEnv {
|
||||
Text('状态:')
|
||||
Checkbox().select(this.drivceState);
|
||||
}.height('10%')
|
||||
|
||||
Row(){
|
||||
TextComboBox({name:'屏幕支持方向:',menu:DisplayMode})
|
||||
Blank().layoutWeight(1)
|
||||
@ -93,6 +94,7 @@ export struct SWEnv {
|
||||
Text('状态:')
|
||||
Checkbox().select(this.winOriState);
|
||||
}.height('10%')
|
||||
|
||||
Row(){
|
||||
Text('沙箱字体状态:')
|
||||
Blank().layoutWeight(1)
|
||||
|
||||
@ -20,7 +20,7 @@ export struct SWSrc {
|
||||
.height('30%')
|
||||
Column(){
|
||||
TextArea({
|
||||
text: '源码开源地址:http://git.axibug.com/JackLee/OpenCAX.git \n ' +
|
||||
text: '源码开源地址:http://git.axibug.com/JackLee/NXEA.git \n ' +
|
||||
'开源麻本质就是一种抄所以大家一起抄.正所谓你不抄我不抄项目怎么交 \n' +
|
||||
'一杯茶,一包烟,一行代码写一天,上午写,中午改,晚上调又调 \n'+
|
||||
'东借借,西看看,月薪指定能过万 \n',
|
||||
|
||||
@ -69,7 +69,6 @@ export struct TitleColumnSub {
|
||||
Blank().layoutWeight(1)
|
||||
}.width('100%')
|
||||
.height('100%')
|
||||
.backgroundBlurStyle(BlurStyle.Thin,
|
||||
{ colorMode: ThemeColorMode.LIGHT, adaptiveColor: AdaptiveColor.DEFAULT, scale: 1.0 })
|
||||
.backgroundColor(Color.Transparent)
|
||||
}
|
||||
}
|
||||
@ -46,7 +46,7 @@ export struct TitleTab {
|
||||
.align(Alignment.Top)
|
||||
.visibility(index === this.selectedIndex?Visibility.Visible:Visibility.Hidden)
|
||||
}.width('100%')
|
||||
.height('100%')
|
||||
.height('100%')
|
||||
}
|
||||
.width('7%')
|
||||
.backgroundColor(index === this.selectedIndex ? $r('sys.color.container_modal_button_normal_baseboard') : Color.Transparent)
|
||||
@ -84,7 +84,6 @@ export struct TitleTab {
|
||||
.barHeight(0)
|
||||
.barMode(BarMode.Fixed)
|
||||
}.margin({ top:0, left: 0, bottom: 0, right: 0 })
|
||||
.backgroundBlurStyle(BlurStyle.Thin,
|
||||
{ colorMode: ThemeColorMode.LIGHT, adaptiveColor: AdaptiveColor.DEFAULT, scale: 1.0 })
|
||||
.backgroundColor(Color.Transparent)
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
"name": "ohos.permission.INPUT_MONITORING"
|
||||
},
|
||||
{
|
||||
"name": "ohos.permission.SET_WINDOW_TRANSPARENT"
|
||||
'name': "ohos.permission.SET_WINDOW_TRANSPARENT"
|
||||
}
|
||||
],
|
||||
"abilities": [
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
},
|
||||
{
|
||||
"name": "EntryAbility_label",
|
||||
"value": "OpenCAX"
|
||||
"value": "NXEA"
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 116 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 336 KiB After Width: | Height: | Size: 34 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 116 KiB |
BIN
image/background.xcf
Normal file
BIN
image/background.xcf
Normal file
Binary file not shown.
BIN
image/icon.xcf
Normal file
BIN
image/icon.xcf
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user