Browse Source

update

master
zhaohe 1 year ago
parent
commit
f01a0d96c9
  1. 2
      libxsync
  2. 26
      mainwindow.cpp
  3. 133
      mainwindow.ui

2
libxsync

@ -1 +1 @@
Subproject commit f2cd0a7edfa77b2d4927acaeff2f60613858102f
Subproject commit 66f7b456ad321d5c0d02472444e2a5a18001abc6

26
mainwindow.cpp

@ -214,10 +214,6 @@ void MainWindow::construct_reg_table() { //
push_reg(ui->gridLayoutWidget, regoff++, "internal_timecode_data1", reg::internal_timecode_data1, 0, kreg_val_type_decimal); push_reg(ui->gridLayoutWidget, regoff++, "internal_timecode_data1", reg::internal_timecode_data1, 0, kreg_val_type_decimal);
push_reg(ui->gridLayoutWidget, regoff++, "external_timecode_module", reg::external_timecode_module, 0, kreg_val_type_hex); push_reg(ui->gridLayoutWidget, regoff++, "external_timecode_module", reg::external_timecode_module, 0, kreg_val_type_hex);
push_reg(ui->gridLayoutWidget, regoff++, "external_timecode_sig_selt", reg::external_timecode_sig_selt, 0, kreg_val_type_decimal);
push_reg(ui->gridLayoutWidget, regoff++, "external_timecode_format", reg::external_timecode_format, 0, kreg_val_type_decimal);
push_reg(ui->gridLayoutWidget, regoff++, "external_timecode_code0", reg::external_timecode_code0, 0, kreg_val_type_decimal);
push_reg(ui->gridLayoutWidget, regoff++, "external_timecode_code1", reg::external_timecode_code1, 0, kreg_val_type_decimal);
push_reg(ui->gridLayoutWidget, regoff++, "sys_timecode_module", reg::sys_timecode_module, 0, kreg_val_type_hex); push_reg(ui->gridLayoutWidget, regoff++, "sys_timecode_module", reg::sys_timecode_module, 0, kreg_val_type_hex);
push_reg(ui->gridLayoutWidget, regoff++, "sys_timecode_select", reg::sys_timecode_select, 0, kreg_val_type_decimal); push_reg(ui->gridLayoutWidget, regoff++, "sys_timecode_select", reg::sys_timecode_select, 0, kreg_val_type_decimal);
@ -357,6 +353,7 @@ void MainWindow::UI_TimecodePageConstruct() {
ui->ExternalTimecode_Source->clear(); ui->ExternalTimecode_Source->clear();
ui->ExternalTimecode_Source->addItem(QString::fromStdString(InputInterface2Str(INPUT_IF_TIMECODE_BNC))); ui->ExternalTimecode_Source->addItem(QString::fromStdString(InputInterface2Str(INPUT_IF_TIMECODE_BNC)));
ui->ExternalTimecode_Source->addItem(QString::fromStdString(InputInterface2Str(INPUT_IF_TIMECODE_HEADPHONE))); ui->ExternalTimecode_Source->addItem(QString::fromStdString(InputInterface2Str(INPUT_IF_TIMECODE_HEADPHONE)));
ui->ExternalTimecode_Source->addItem(QString::fromStdString(InputInterface2Str(INPUT_IF_OFF)));
ui->SysTimecode_Source->clear(); ui->SysTimecode_Source->clear();
ui->SysTimecode_Source->addItem(QString::fromStdString("0")); ui->SysTimecode_Source->addItem(QString::fromStdString("0"));
@ -580,30 +577,43 @@ void MainWindow::mainWindowsRun() { //
void MainWindow::on_TimecodePage_Read_clicked() { void MainWindow::on_TimecodePage_Read_clicked() {
TimecodeFormat_t InternalTimecode_Format; TimecodeFormat_t InternalTimecode_Format;
XsyncTimecode_t InternalTimecode_Code; XsyncTimecode_t InternalTimecode_Code;
float InternalTimecode_Freq;
TimecodeFormat_t ExternalTimecode_Format; TimecodeFormat_t ExternalTimecode_Format;
InputInterface_t ExternalTimecode_Source; InputInterface_t ExternalTimecode_Source;
XsyncTimecode_t ExternalTimecode_Code; XsyncTimecode_t ExternalTimecode_Code;
float ExternalTimecode_Freq;
uint32_t SysTimecode_Source; uint32_t SysTimecode_Source;
TimecodeFormat_t SysTimecode_Format; TimecodeFormat_t SysTimecode_Format;
XsyncTimecode_t SysTimecode_Code; XsyncTimecode_t SysTimecode_Code;
float SysTimecode_Freq;
DO_XSYNC_FUNC(XsyncIns()->InternalTimecode_getFormat(InternalTimecode_Format)); DO_XSYNC_FUNC(XsyncIns()->InternalTimecode_getFormat(InternalTimecode_Format));
DO_XSYNC_FUNC(XsyncIns()->InternalTimecode_getCode(InternalTimecode_Code)); DO_XSYNC_FUNC(XsyncIns()->InternalTimecode_getCode(InternalTimecode_Code));
DO_XSYNC_FUNC(XsyncIns()->ExternalTimecode_getFormat(ExternalTimecode_Format));
DO_XSYNC_FUNC(XsyncIns()->ExternalTimecode_getSource(ExternalTimecode_Source));
DO_XSYNC_FUNC(XsyncIns()->InternalTimecode_readFreq(InternalTimecode_Freq));
DO_XSYNC_FUNC(XsyncIns()->ExternalTimecode_readFormat(ExternalTimecode_Format));
DO_XSYNC_FUNC(XsyncIns()->ExternalTimecode_readSrc(ExternalTimecode_Source));
DO_XSYNC_FUNC(XsyncIns()->ExternalTimecode_readCode(ExternalTimecode_Code)); DO_XSYNC_FUNC(XsyncIns()->ExternalTimecode_readCode(ExternalTimecode_Code));
DO_XSYNC_FUNC(XsyncIns()->ExternalTimecode_readFreq(ExternalTimecode_Freq));
DO_XSYNC_FUNC(XsyncIns()->SysTimecode_getSource(SysTimecode_Source)); DO_XSYNC_FUNC(XsyncIns()->SysTimecode_getSource(SysTimecode_Source));
DO_XSYNC_FUNC(XsyncIns()->SysTimecode_readFormat(SysTimecode_Format)); DO_XSYNC_FUNC(XsyncIns()->SysTimecode_readFormat(SysTimecode_Format));
DO_XSYNC_FUNC(XsyncIns()->SysTimecode_readCode(SysTimecode_Code)); DO_XSYNC_FUNC(XsyncIns()->SysTimecode_readCode(SysTimecode_Code));
DO_XSYNC_FUNC(XsyncIns()->SysTimecode_readFreq(SysTimecode_Freq));
ui->InternalTimecode_Format->setCurrentText(QString::fromStdString(TimecodeFormatToStr(InternalTimecode_Format))); ui->InternalTimecode_Format->setCurrentText(QString::fromStdString(TimecodeFormatToStr(InternalTimecode_Format)));
ui->InternalTimecode_Code->setText(QString(XsyncTimecodeToStr(InternalTimecode_Code).c_str())); ui->InternalTimecode_Code->setText(QString(XsyncTimecodeToStr(InternalTimecode_Code).c_str()));
ui->InternalTimecode_Freq->setText(QString::number(InternalTimecode_Freq, 'f', 2));
ui->ExternalTimecode_Format->setCurrentText(QString::fromStdString(TimecodeFormatToStr(ExternalTimecode_Format))); ui->ExternalTimecode_Format->setCurrentText(QString::fromStdString(TimecodeFormatToStr(ExternalTimecode_Format)));
ui->ExternalTimecode_Source->setCurrentText(QString::fromStdString(InputInterface2Str(ExternalTimecode_Source))); ui->ExternalTimecode_Source->setCurrentText(QString::fromStdString(InputInterface2Str(ExternalTimecode_Source)));
ui->ExternalTimecode_Code->setText(QString(XsyncTimecodeToStr(ExternalTimecode_Code).c_str())); ui->ExternalTimecode_Code->setText(QString(XsyncTimecodeToStr(ExternalTimecode_Code).c_str()));
ui->ExternalTimecode_Freq->setText(QString::number(ExternalTimecode_Freq, 'f', 2));
ui->SysTimecode_Source->setCurrentText(QString::number(SysTimecode_Source)); ui->SysTimecode_Source->setCurrentText(QString::number(SysTimecode_Source));
ui->SysTimecode_Format->setText(QString::fromStdString(TimecodeFormatToStr(SysTimecode_Format))); ui->SysTimecode_Format->setText(QString::fromStdString(TimecodeFormatToStr(SysTimecode_Format)));
ui->SysTimecode_Code->setText(QString(XsyncTimecodeToStr(SysTimecode_Code).c_str())); ui->SysTimecode_Code->setText(QString(XsyncTimecodeToStr(SysTimecode_Code).c_str()));
ui->SysTimecode_Freq->setText(QString::number(SysTimecode_Freq, 'f', 2));
} }
void MainWindow::on_TimecodePage_Update_clicked() { void MainWindow::on_TimecodePage_Update_clicked() {
TimecodeFormat_t InternalTimecode_Format = Str2TimecodeFormat(ui->InternalTimecode_Format->currentText().toStdString()); TimecodeFormat_t InternalTimecode_Format = Str2TimecodeFormat(ui->InternalTimecode_Format->currentText().toStdString());
@ -614,8 +624,8 @@ void MainWindow::on_TimecodePage_Update_clicked() {
DO_XSYNC_FUNC(XsyncIns()->InternalTimecode_setFormat(InternalTimecode_Format)); DO_XSYNC_FUNC(XsyncIns()->InternalTimecode_setFormat(InternalTimecode_Format));
DO_XSYNC_FUNC(XsyncIns()->InternalTimecode_setCode(InternalTimecode_Code)); DO_XSYNC_FUNC(XsyncIns()->InternalTimecode_setCode(InternalTimecode_Code));
DO_XSYNC_FUNC(XsyncIns()->ExternalTimecode_setFormat(ExternalTimecode_Format));
DO_XSYNC_FUNC(XsyncIns()->ExternalTimecode_setSource(ExternalTimecode_Source));
// DO_XSYNC_FUNC(XsyncIns()->ExternalTimecode_setFormat(ExternalTimecode_Format));
// DO_XSYNC_FUNC(XsyncIns()->ExternalTimecode_setSource(ExternalTimecode_Source));
DO_XSYNC_FUNC(XsyncIns()->SysTimecode_setSource(SysTimecode_Source)); DO_XSYNC_FUNC(XsyncIns()->SysTimecode_setSource(SysTimecode_Source));
} }

133
mainwindow.ui

@ -204,7 +204,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>6</number>
<number>1</number>
</property> </property>
<widget class="QWidget" name="tab_8"> <widget class="QWidget" name="tab_8">
<attribute name="title"> <attribute name="title">
@ -1140,9 +1140,9 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>30</x> <x>30</x>
<y>40</y>
<y>10</y>
<width>251</width> <width>251</width>
<height>111</height>
<height>181</height>
</rect> </rect>
</property> </property>
<property name="title"> <property name="title">
@ -1152,7 +1152,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>20</x> <x>20</x>
<y>20</y>
<y>50</y>
<width>81</width> <width>81</width>
<height>31</height> <height>31</height>
</rect> </rect>
@ -1165,7 +1165,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>20</x> <x>20</x>
<y>60</y>
<y>90</y>
<width>81</width> <width>81</width>
<height>31</height> <height>31</height>
</rect> </rect>
@ -1178,7 +1178,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>100</x> <x>100</x>
<y>20</y>
<y>50</y>
<width>141</width> <width>141</width>
<height>31</height> <height>31</height>
</rect> </rect>
@ -1188,7 +1188,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>100</x> <x>100</x>
<y>60</y>
<y>90</y>
<width>141</width> <width>141</width>
<height>31</height> <height>31</height>
</rect> </rect>
@ -1206,6 +1206,41 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
</widget> </widget>
<widget class="QLabel" name="label_70">
<property name="geometry">
<rect>
<x>20</x>
<y>130</y>
<width>51</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>频率</string>
</property>
</widget>
<widget class="QLineEdit" name="InternalTimecode_Freq">
<property name="geometry">
<rect>
<x>100</x>
<y>130</y>
<width>141</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string/>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</widget> </widget>
<widget class="QGroupBox" name="groupBox_3"> <widget class="QGroupBox" name="groupBox_3">
<property name="geometry"> <property name="geometry">
@ -1213,7 +1248,7 @@
<x>120</x> <x>120</x>
<y>260</y> <y>260</y>
<width>301</width> <width>301</width>
<height>151</height>
<height>211</height>
</rect> </rect>
</property> </property>
<property name="title"> <property name="title">
@ -1312,14 +1347,49 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QLabel" name="label_71">
<property name="geometry">
<rect>
<x>30</x>
<y>140</y>
<width>51</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>频率</string>
</property>
</widget>
<widget class="QLineEdit" name="SysTimecode_Freq">
<property name="geometry">
<rect>
<x>130</x>
<y>140</y>
<width>141</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string/>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</widget> </widget>
<widget class="QGroupBox" name="groupBox_4"> <widget class="QGroupBox" name="groupBox_4">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>320</x> <x>320</x>
<y>40</y>
<y>10</y>
<width>251</width> <width>251</width>
<height>151</height>
<height>181</height>
</rect> </rect>
</property> </property>
<property name="title"> <property name="title">
@ -1406,6 +1476,41 @@
<string>时码源</string> <string>时码源</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" name="label_69">
<property name="geometry">
<rect>
<x>20</x>
<y>140</y>
<width>51</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>频率</string>
</property>
</widget>
<widget class="QLineEdit" name="ExternalTimecode_Freq">
<property name="geometry">
<rect>
<x>100</x>
<y>140</y>
<width>141</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string/>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</widget> </widget>
<widget class="Line" name="line"> <widget class="Line" name="line">
<property name="geometry"> <property name="geometry">
@ -1424,9 +1529,9 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>140</x> <x>140</x>
<y>150</y>
<y>190</y>
<width>20</width> <width>20</width>
<height>91</height>
<height>51</height>
</rect> </rect>
</property> </property>
<property name="cursor"> <property name="cursor">
@ -1472,8 +1577,8 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>160</x> <x>160</x>
<y>170</y>
<width>16</width>
<y>200</y>
<width>20</width>
<height>21</height> <height>21</height>
</rect> </rect>
</property> </property>

Loading…
Cancel
Save