diff --git a/libxsync b/libxsync index ae847b4..511a571 160000 --- a/libxsync +++ b/libxsync @@ -1 +1 @@ -Subproject commit ae847b48f919205f4a8330b35f318e4adb766f82 +Subproject commit 511a5714c7e4c1ab867e1258da2a77fbc030de6a diff --git a/mainwindow.cpp b/mainwindow.cpp index 4306e12..4e5f898 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -377,6 +377,10 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi xysnc_camera_sync_data_t camera_sync_data = *camera_sync_msg; updateUI_cameraSyncInfo_signal(QString(fmt("%d", camera_sync_data.frameIndex))); }); + + Xsync::Ins().Basic_registerOnWorkstateChangeMsgCallback([this](uint32_t workstate) { + emit doinui_signal(QFunction([this, workstate]() { ui->WorkState->setText(QString::number(workstate)); })); + }); } MainWindow::~MainWindow() { delete ui; } @@ -660,3 +664,27 @@ void MainWindow::on_TimecodeInputModule_Update_clicked() { DO_XSYNC_FUNC(Xsync::Ins().TimecodeInputModule_setSrcSelect(TriggerSig)); DO_XSYNC_FUNC(Xsync::Ins().TimecodeInputModule_setTimecodeFormat(Format)); } + +void MainWindow::on_tabWidget_currentChanged(int index) { + index = index + 1; + if (index == 0) { + } else if (index == 1) { + on_RefreshRegsButton_clicked(); + } else if (index == 2) { + } else if (index == 3) { + on_TTLOutputMoudle_Read_clicked(); + } else if (index == 4) { + on_SigGenerator_Read_clicked(); + } else if (index == 5) { + on_TimecodeOutputModule_Read_clicked(); + } else if (index == 6) { + on_CameraSyncPacketGeneratorModule_Read_clicked(); + } else if (index == 7) { + on_TimecodeInputModule_Read_clicked(); + } else if (index == 8) { + on_TTLInputModule_Read_clicked(); + } +} + +void MainWindow::on_TTLInputModule_Index_currentIndexChanged(int index) { on_TTLInputModule_Read_clicked(); } +void MainWindow::on_TTLOutputMoudle_ID_currentIndexChanged(int index) { on_TTLOutputMoudle_Read_clicked(); } diff --git a/mainwindow.h b/mainwindow.h index d6e5e92..9391e01 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -120,7 +120,13 @@ class MainWindow : public QMainWindow { void on_TimecodeInputModule_Read_clicked(); void on_TimecodeInputModule_Update_clicked(); - signals: + void on_tabWidget_currentChanged(int index); + + void on_TTLInputModule_Index_currentIndexChanged(int index); + + void on_TTLOutputMoudle_ID_currentIndexChanged(int index); + +signals: void append_log_signal(QString str); void updateUI_timeCodeInfo_signal(QString); void updateUI_cameraSyncInfo_signal(QString); diff --git a/mainwindow.ui b/mainwindow.ui index 3d1ab11..cef272a 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -75,7 +75,7 @@ - 470 + 480 10 141 31 @@ -85,9 +85,9 @@ - 620 + 720 10 - 141 + 111 31 @@ -102,7 +102,7 @@ - 6 + 2 @@ -195,7 +195,7 @@ - 基础功能 + 基础功能2 @@ -388,7 +388,7 @@ - TTL输出模块 + TTL输出模块3 @@ -551,7 +551,7 @@ - 信号生成器 + 信号生成器4 @@ -779,7 +779,7 @@ - TIMECODE输出模块 + TIMECODE输出模块5 @@ -901,6 +901,9 @@ 31 + + true + @@ -940,7 +943,7 @@ - 相机同步消息上报 + 相机同步消息上报6 @@ -1068,7 +1071,7 @@ - 时码输入模块 + 时码输入模块7 @@ -1183,7 +1186,7 @@ - TTL输入 + TTL输入8 @@ -1331,6 +1334,55 @@ + + + + 910 + 10 + 61 + 31 + + + + + + + 410 + 10 + 71 + 31 + + + + timecode: + + + + + + 630 + 10 + 81 + 31 + + + + camera_sync: + + + + + + 840 + 10 + 61 + 31 + + + + workstate: + +