Browse Source

add timecode output module

master
zhaohe 2 years ago
parent
commit
62f8d7bc7e
  1. 2
      libxsync
  2. 64
      mainwindow.cpp
  3. 4
      mainwindow.h
  4. 241
      mainwindow.ui

2
libxsync

@ -1 +1 @@
Subproject commit 76e2707f5c6bd1297e135f41e55ade20f456678c
Subproject commit f0e204cec62237684d61dab803498d6403966a9b

64
mainwindow.cpp

@ -281,6 +281,28 @@ void MainWindow::UI_SigGeneratorConstruct() {
}
}
void MainWindow::UI_TimecodeOutputModuleConstruct() {
ui->TimecodeOutputModule_TimecodeSrcSelect->clear();
for (auto &str : timecode_output_module::TriggerSigTypeStrSet()) {
ui->TimecodeOutputModule_TimecodeSrcSelect->addItem(QString::fromStdString(str));
}
ui->TimecodeOutputModule_BncOutputLevel->clear();
for (auto &str : timecode_output_module::OutputSigLevelTypeStrSet()) {
ui->TimecodeOutputModule_BncOutputLevel->addItem(QString::fromStdString(str));
}
ui->TimecodeOutputModule_HeadphoneOutputLevel->clear();
for (auto &str : timecode_output_module::OutputSigLevelTypeStrSet()) {
ui->TimecodeOutputModule_HeadphoneOutputLevel->addItem(QString::fromStdString(str));
}
ui->TimecodeOutputModule_TimecodeFormat->clear();
for (auto &str : TimecodeFormatStrSet()) {
ui->TimecodeOutputModule_TimecodeFormat->addItem(QString::fromStdString(str));
}
}
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) {
ui->setupUi(this);
m_mainWindow = this;
@ -292,6 +314,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
qInstallMessageHandler(log_output);
UI_TTLOutputMoudleConstruct();
UI_SigGeneratorConstruct();
UI_TimecodeOutputModuleConstruct();
/*******************************************************************************
* *
@ -492,9 +515,40 @@ void MainWindow::on_SigGenerator_Update_clicked() {
DO_XSYNC_FUNC(Xsync::Ins().SigGenerator_setTimecode(timecode));
DO_XSYNC_FUNC(Xsync::Ins().SigGenerator_setAutoStartTimecode(autoStartTimecode));
}
void MainWindow::on_SigGenerator_Start_clicked() {
DO_XSYNC_FUNC(Xsync::Ins().SigGenerator_manualStart());
}
void MainWindow::on_SigGenerator_Stop_clicked() {
DO_XSYNC_FUNC(Xsync::Ins().SigGenerator_manualStop());
void MainWindow::on_SigGenerator_Start_clicked() { DO_XSYNC_FUNC(Xsync::Ins().SigGenerator_manualStart()); }
void MainWindow::on_SigGenerator_Stop_clicked() { DO_XSYNC_FUNC(Xsync::Ins().SigGenerator_manualStop()); }
void MainWindow::on_TimecodeOutputModule_Read_clicked() {
// TimecodeOutputModule_TimecodeSrcSelect
// TimecodeOutputModule_BncOutputLevel
// TimecodeOutputModule_HeadphoneOutputLevel
// TimecodeOutputModule_TimecodeFormat
// TimecodeOutputModule_TimecodeNow
timecode_output_module::TriggerSigType_t TimecodeSrcSelect;
timecode_output_module::OutputSigLevelType_t BncOutputLevel;
timecode_output_module::OutputSigLevelType_t HeadphoneOutputLevel;
TimecodeFormat_t TimecodeFormat;
XsyncTimecode_t TimecodeNow;
DO_XSYNC_FUNC(Xsync::Ins().TimecodeOutputModule_getTimecodeSrcSelect(TimecodeSrcSelect));
DO_XSYNC_FUNC(Xsync::Ins().TimecodeOutputModule_getBncOutputLevel(BncOutputLevel));
DO_XSYNC_FUNC(Xsync::Ins().TimecodeOutputModule_getHeadphoneOutputLevel(HeadphoneOutputLevel));
DO_XSYNC_FUNC(Xsync::Ins().TimecodeOutputModule_getTimecodeFormat(TimecodeFormat));
DO_XSYNC_FUNC(Xsync::Ins().TimecodeOutputModule_getTimecodeNow(TimecodeNow));
ui->TimecodeOutputModule_TimecodeSrcSelect->setCurrentText(QString::fromStdString(timecode_output_module::TriggerSigType2Str(TimecodeSrcSelect)));
ui->TimecodeOutputModule_BncOutputLevel->setCurrentText(QString::fromStdString(timecode_output_module::OutputSigLevelType2Str(BncOutputLevel)));
ui->TimecodeOutputModule_HeadphoneOutputLevel->setCurrentText(QString::fromStdString(timecode_output_module::OutputSigLevelType2Str(HeadphoneOutputLevel)));
ui->TimecodeOutputModule_TimecodeFormat->setCurrentText(QString::fromStdString(TimecodeFormatToStr(TimecodeFormat)));
ui->TimecodeOutputModule_TimecodeNow->setText(QString(XsyncTimecodeToStr(TimecodeNow).c_str()));
}
void MainWindow::on_TimecodeOutputModule_Update_clicked() {
auto TimecodeSrcSelect = timecode_output_module::Str2TriggerSigType(ui->TimecodeOutputModule_TimecodeSrcSelect->currentText().toStdString());
auto BncOutputLevel = timecode_output_module::Str2OutputSigLevelType(ui->TimecodeOutputModule_BncOutputLevel->currentText().toStdString());
auto HeadphoneOutputLevel = timecode_output_module::Str2OutputSigLevelType(ui->TimecodeOutputModule_HeadphoneOutputLevel->currentText().toStdString());
DO_XSYNC_FUNC(Xsync::Ins().TimecodeOutputModule_setTimecodeSrcSelect(TimecodeSrcSelect));
DO_XSYNC_FUNC(Xsync::Ins().TimecodeOutputModule_setBncOutputLevel(BncOutputLevel));
DO_XSYNC_FUNC(Xsync::Ins().TimecodeOutputModule_setHeadphoneOutputLevel(HeadphoneOutputLevel));
}

4
mainwindow.h

@ -107,6 +107,9 @@ class MainWindow : public QMainWindow {
void on_SigGenerator_Start_clicked();
void on_SigGenerator_Stop_clicked();
void on_TimecodeOutputModule_Read_clicked();
void on_TimecodeOutputModule_Update_clicked();
signals:
void append_log_signal(QString str);
void updateUI_timeCodeInfo_signal(QString);
@ -120,5 +123,6 @@ class MainWindow : public QMainWindow {
void UI_TTLOutputMoudleConstruct();
void UI_SigGeneratorConstruct();
void UI_TimecodeOutputModuleConstruct();
};
#endif // MAINWINDOW_H

241
mainwindow.ui

@ -102,7 +102,7 @@
</rect>
</property>
<property name="currentIndex">
<number>3</number>
<number>4</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
@ -385,84 +385,6 @@
<bool>false</bool>
</property>
</widget>
<widget class="QPushButton" name="SetGenlockFormat">
<property name="geometry">
<rect>
<x>490</x>
<y>20</y>
<width>131</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>SetGenlockFormat</string>
</property>
</widget>
<widget class="QPushButton" name="GetGenlockFormat">
<property name="geometry">
<rect>
<x>490</x>
<y>60</y>
<width>131</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>GetGenlockFormat</string>
</property>
</widget>
<widget class="QPushButton" name="SetTimecodeFormat">
<property name="geometry">
<rect>
<x>490</x>
<y>100</y>
<width>131</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>SetTimecodeFormat</string>
</property>
</widget>
<widget class="QPushButton" name="GetTimecodeFormat">
<property name="geometry">
<rect>
<x>490</x>
<y>140</y>
<width>131</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>GetTimecodeFormat</string>
</property>
</widget>
<widget class="QComboBox" name="GenlockFormat">
<property name="geometry">
<rect>
<x>630</x>
<y>40</y>
<width>241</width>
<height>31</height>
</rect>
</property>
<property name="currentIndex">
<number>-1</number>
</property>
</widget>
<widget class="QComboBox" name="TimecodeFormat">
<property name="geometry">
<rect>
<x>630</x>
<y>110</y>
<width>241</width>
<height>31</height>
</rect>
</property>
<property name="currentIndex">
<number>-1</number>
</property>
</widget>
</widget>
<widget class="QWidget" name="tab_3">
<attribute name="title">
@ -855,6 +777,167 @@
</property>
</widget>
</widget>
<widget class="QWidget" name="tab_5">
<attribute name="title">
<string>TIMECODE输出模块</string>
</attribute>
<widget class="QLabel" name="label_8">
<property name="geometry">
<rect>
<x>30</x>
<y>210</y>
<width>151</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>TimecodeFormat</string>
</property>
</widget>
<widget class="QLabel" name="label_12">
<property name="geometry">
<rect>
<x>30</x>
<y>60</y>
<width>101</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>TriggerSigType</string>
</property>
</widget>
<widget class="QPushButton" name="TimecodeOutputModule_Update">
<property name="geometry">
<rect>
<x>500</x>
<y>110</y>
<width>151</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string>Update</string>
</property>
</widget>
<widget class="QLabel" name="label_13">
<property name="geometry">
<rect>
<x>30</x>
<y>110</y>
<width>101</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>BncOutLevel</string>
</property>
</widget>
<widget class="QLabel" name="label_14">
<property name="geometry">
<rect>
<x>30</x>
<y>160</y>
<width>161</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>HeadphoneOutLevel</string>
</property>
</widget>
<widget class="QPushButton" name="TimecodeOutputModule_Read">
<property name="geometry">
<rect>
<x>500</x>
<y>60</y>
<width>151</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string>Read</string>
</property>
</widget>
<widget class="QComboBox" name="TimecodeOutputModule_TimecodeSrcSelect">
<property name="geometry">
<rect>
<x>220</x>
<y>60</y>
<width>241</width>
<height>31</height>
</rect>
</property>
<property name="currentIndex">
<number>-1</number>
</property>
</widget>
<widget class="QComboBox" name="TimecodeOutputModule_BncOutputLevel">
<property name="geometry">
<rect>
<x>220</x>
<y>110</y>
<width>241</width>
<height>31</height>
</rect>
</property>
</widget>
<widget class="QComboBox" name="TimecodeOutputModule_HeadphoneOutputLevel">
<property name="geometry">
<rect>
<x>220</x>
<y>160</y>
<width>241</width>
<height>31</height>
</rect>
</property>
</widget>
<widget class="QComboBox" name="TimecodeOutputModule_TimecodeFormat">
<property name="geometry">
<rect>
<x>220</x>
<y>210</y>
<width>241</width>
<height>31</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_15">
<property name="geometry">
<rect>
<x>30</x>
<y>260</y>
<width>151</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>Timecode</string>
</property>
</widget>
<widget class="QLineEdit" name="TimecodeOutputModule_TimecodeNow">
<property name="geometry">
<rect>
<x>220</x>
<y>260</y>
<width>241</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>false</bool>
</property>
</widget>
</widget>
</widget>
</widget>
<widget class="QMenuBar" name="menubar">

Loading…
Cancel
Save