mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-08-01 05:22:26 -04:00
File source plugin: added passive navigation slider
This commit is contained in:
parent
d5ddd5c9a1
commit
f153325ec0
@ -50,6 +50,7 @@ FileSourceGui::FileSourceGui(PluginAPI* pluginAPI, QWidget* parent) :
|
|||||||
connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware()));
|
connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware()));
|
||||||
connect(&(m_pluginAPI->getMainWindow()->getMasterTimer()), SIGNAL(timeout()), this, SLOT(tick()));
|
connect(&(m_pluginAPI->getMainWindow()->getMasterTimer()), SIGNAL(timeout()), this, SLOT(tick()));
|
||||||
displaySettings();
|
displaySettings();
|
||||||
|
ui->navTimeSlider->setEnabled(false);
|
||||||
|
|
||||||
m_sampleSource = new FileSourceInput(m_pluginAPI->getMainWindow()->getMasterTimer());
|
m_sampleSource = new FileSourceInput(m_pluginAPI->getMainWindow()->getMasterTimer());
|
||||||
connect(m_sampleSource->getOutputMessageQueueToGUI(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
connect(m_sampleSource->getOutputMessageQueueToGUI(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
||||||
@ -227,8 +228,9 @@ void FileSourceGui::updateWithStreamTime()
|
|||||||
QTime t(0, 0, 0, 0);
|
QTime t(0, 0, 0, 0);
|
||||||
t = t.addSecs(t_sec);
|
t = t.addSecs(t_sec);
|
||||||
t = t.addMSecs(t_msec);
|
t = t.addMSecs(t_msec);
|
||||||
QString s_time = t.toString("hh:mm:ss.zzz");
|
QString s_timems = t.toString("hh:mm:ss.zzz");
|
||||||
ui->relTimeText->setText(s_time);
|
QString s_time = t.toString("hh:mm:ss");
|
||||||
|
ui->relTimeText->setText(s_timems);
|
||||||
|
|
||||||
quint64 startingTimeStampMsec = m_startingTimeStamp * 1000;
|
quint64 startingTimeStampMsec = m_startingTimeStamp * 1000;
|
||||||
QDateTime dt = QDateTime::fromMSecsSinceEpoch(startingTimeStampMsec);
|
QDateTime dt = QDateTime::fromMSecsSinceEpoch(startingTimeStampMsec);
|
||||||
@ -236,6 +238,9 @@ void FileSourceGui::updateWithStreamTime()
|
|||||||
dt = dt.addMSecs(t_msec);
|
dt = dt.addMSecs(t_msec);
|
||||||
QString s_date = dt.toString("yyyy-MM-dd hh:mm:ss.zzz");
|
QString s_date = dt.toString("yyyy-MM-dd hh:mm:ss.zzz");
|
||||||
ui->absTimeText->setText(s_date);
|
ui->absTimeText->setText(s_date);
|
||||||
|
float posRatio = (float) t_sec / (float) m_recordLength;
|
||||||
|
ui->navTimeSlider->setValue((int) (posRatio * 100.0));
|
||||||
|
ui->navTimeText->setText(s_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileSourceGui::tick()
|
void FileSourceGui::tick()
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>289</width>
|
<width>289</width>
|
||||||
<height>133</height>
|
<height>227</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -362,6 +362,69 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="Line" name="line_rate2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_nav">
|
||||||
|
<item>
|
||||||
|
<widget class="QSlider" name="navTimeSlider">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Time navigator</string>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>100</number>
|
||||||
|
</property>
|
||||||
|
<property name="pageStep">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="Line" name="line">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="navTimeText">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>60</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Navigate time</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>00:00:00</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="Line" name="line_nav">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user