Browse Source

update

master
zhaohe 2 years ago
parent
commit
1c697db3e2
  1. 2
      libxsync
  2. 28
      mainwindow.cpp
  3. 8
      mainwindow.h
  4. 74
      mainwindow.ui

2
libxsync

@ -1 +1 @@
Subproject commit ae847b48f919205f4a8330b35f318e4adb766f82
Subproject commit 511a5714c7e4c1ab867e1258da2a77fbc030de6a

28
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(); }

8
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);

74
mainwindow.ui

@ -75,7 +75,7 @@
<widget class="QTextBrowser" name="TimecodeDisplayer">
<property name="geometry">
<rect>
<x>470</x>
<x>480</x>
<y>10</y>
<width>141</width>
<height>31</height>
@ -85,9 +85,9 @@
<widget class="QTextBrowser" name="CameraSyncIndex">
<property name="geometry">
<rect>
<x>620</x>
<x>720</x>
<y>10</y>
<width>141</width>
<width>111</width>
<height>31</height>
</rect>
</property>
@ -102,7 +102,7 @@
</rect>
</property>
<property name="currentIndex">
<number>6</number>
<number>2</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
@ -195,7 +195,7 @@
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>基础功能</string>
<string>基础功能2</string>
</attribute>
<widget class="QPushButton" name="GenNewMac">
<property name="geometry">
@ -388,7 +388,7 @@
</widget>
<widget class="QWidget" name="tab_3">
<attribute name="title">
<string>TTL输出模块</string>
<string>TTL输出模块3</string>
</attribute>
<widget class="QComboBox" name="TTLOutputMoudle_ID">
<property name="geometry">
@ -551,7 +551,7 @@
</widget>
<widget class="QWidget" name="tab_4">
<attribute name="title">
<string>信号生成器</string>
<string>信号生成器4</string>
</attribute>
<widget class="QLabel" name="label_5">
<property name="geometry">
@ -779,7 +779,7 @@
</widget>
<widget class="QWidget" name="tab_5">
<attribute name="title">
<string>TIMECODE输出模块</string>
<string>TIMECODE输出模块5</string>
</attribute>
<widget class="QLabel" name="label_8">
<property name="geometry">
@ -901,6 +901,9 @@
<height>31</height>
</rect>
</property>
<property name="editable">
<bool>true</bool>
</property>
</widget>
<widget class="QLabel" name="label_15">
<property name="geometry">
@ -940,7 +943,7 @@
</widget>
<widget class="QWidget" name="tab_6">
<attribute name="title">
<string>相机同步消息上报</string>
<string>相机同步消息上报6</string>
</attribute>
<widget class="QComboBox" name="CameraSyncPacketGeneratorModule_TriggerSig">
<property name="geometry">
@ -1068,7 +1071,7 @@
</widget>
<widget class="QWidget" name="tab_7">
<attribute name="title">
<string>时码输入模块</string>
<string>时码输入模块7</string>
</attribute>
<widget class="QComboBox" name="TimecodeInputModule_Format">
<property name="geometry">
@ -1183,7 +1186,7 @@
</widget>
<widget class="QWidget" name="tab_8">
<attribute name="title">
<string>TTL输入</string>
<string>TTL输入8</string>
</attribute>
<widget class="QLabel" name="label_23">
<property name="geometry">
@ -1331,6 +1334,55 @@
</widget>
</widget>
</widget>
<widget class="QTextBrowser" name="WorkState">
<property name="geometry">
<rect>
<x>910</x>
<y>10</y>
<width>61</width>
<height>31</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_19">
<property name="geometry">
<rect>
<x>410</x>
<y>10</y>
<width>71</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>timecode:</string>
</property>
</widget>
<widget class="QLabel" name="label_26">
<property name="geometry">
<rect>
<x>630</x>
<y>10</y>
<width>81</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>camera_sync:</string>
</property>
</widget>
<widget class="QLabel" name="label_27">
<property name="geometry">
<rect>
<x>840</x>
<y>10</y>
<width>61</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>workstate:</string>
</property>
</widget>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">

Loading…
Cancel
Save