zhaohe 1 year ago
parent
commit
99b1d6d96e
  1. 2
      libxsync
  2. 9
      mainwindow.cpp
  3. 38
      mainwindow.ui

2
libxsync

@ -1 +1 @@
Subproject commit b6be16543ba31978f63fb73340b9fc66bef679ef
Subproject commit f8327e9440e782a383ca78c43ddec2d52ccf7ae9

9
mainwindow.cpp

@ -482,7 +482,14 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
updateUI_cameraSyncInfo_signal(QString(fmt("%d", camera_sync_data.frameIndex))); updateUI_cameraSyncInfo_signal(QString(fmt("%d", camera_sync_data.frameIndex)));
}); });
Xsync::Ins().registerOnWorkstateChangeMsgCallback([this](uint32_t workstate) { emit doinui_signal(QFunction([this, workstate]() { ui->WorkState->setText(QString::number(workstate)); })); });
Xsync::Ins().registerOnRecordSigChangeMsgCallback([this](uint32_t recordSig, XsyncTimecode_t *timecode_msg) { //
XsyncTimecode_t timecodecpy = *timecode_msg;
QString timecodeStr = QString(fmt("%02d:%02d:%02d:%02d", timecodecpy.hour, timecodecpy.minute, timecodecpy.second, timecodecpy.frame));
emit doinui_signal(QFunction([this, recordSig, timecodeStr]() {
ui->WorkState->setText(QString::number(recordSig));
ui->WorkState_Timecode->setText(timecodeStr);
}));
});
} }
MainWindow::~MainWindow() { delete ui; } MainWindow::~MainWindow() { delete ui; }

38
mainwindow.ui

@ -95,7 +95,7 @@
<widget class="QTextBrowser" name="TimecodeDisplayer"> <widget class="QTextBrowser" name="TimecodeDisplayer">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>150</width>
<width>100</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
@ -112,7 +112,7 @@
<widget class="QTextBrowser" name="CameraSyncIndex"> <widget class="QTextBrowser" name="CameraSyncIndex">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>150</width>
<width>50</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
@ -126,10 +126,38 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QTextBrowser" name="WorkState">
<widget class="QLineEdit" name="WorkState">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>150</width>
<width>50</width>
<height>16777215</height>
</size>
</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>
</item>
<item>
<widget class="QTextBrowser" name="WorkState_Timecode">
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
@ -147,7 +175,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>1</number>
<number>4</number>
</property> </property>
<widget class="QWidget" name="tab_8"> <widget class="QWidget" name="tab_8">
<attribute name="title"> <attribute name="title">

Loading…
Cancel
Save