mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-14 12:22:00 -05:00
Implemented GUI file dialog
This commit is contained in:
parent
5dc5485b86
commit
5b0cc63c72
@ -19,6 +19,7 @@
|
|||||||
#include <QTime>
|
#include <QTime>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
#include <QFileDialog>
|
||||||
#include "ui_filesourcegui.h"
|
#include "ui_filesourcegui.h"
|
||||||
#include "plugin/pluginapi.h"
|
#include "plugin/pluginapi.h"
|
||||||
#include "gui/colormapper.h"
|
#include "gui/colormapper.h"
|
||||||
@ -181,5 +182,15 @@ void FileSourceGui::updateHardware()
|
|||||||
|
|
||||||
void FileSourceGui::on_play_toggled(bool checked)
|
void FileSourceGui::on_play_toggled(bool checked)
|
||||||
{
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileSourceGui::on_showFileDialog_clicked(bool checked)
|
||||||
|
{
|
||||||
|
QString fileName = QFileDialog::getOpenFileName(this,
|
||||||
|
tr("Open I/Q record file"), ".", tr("SDR I/Q Files (*.sdriq)"));
|
||||||
|
if (fileName != "") {
|
||||||
|
m_settings.m_fileName = fileName;
|
||||||
|
ui->fileNameText->setText(m_settings.m_fileName);
|
||||||
|
sendSettings();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,6 +70,7 @@ private:
|
|||||||
private slots:
|
private slots:
|
||||||
void on_playLoop_toggled(bool checked);
|
void on_playLoop_toggled(bool checked);
|
||||||
void on_play_toggled(bool checked);
|
void on_play_toggled(bool checked);
|
||||||
|
void on_showFileDialog_clicked(bool checked);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDE_FILESOURCEGUI_H
|
#endif // INCLUDE_FILESOURCEGUI_H
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>198</width>
|
<width>198</width>
|
||||||
<height>88</height>
|
<height>133</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -106,6 +106,58 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="fileSelectionLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="showFileDialog">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../../../sdrbase/resources/res.qrc">
|
||||||
|
<normaloff>:/preset-load.png</normaloff>:/preset-load.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="fileNameText">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>8</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>...</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="Line" name="line_file">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="rateTimeLayout">
|
<layout class="QHBoxLayout" name="rateTimeLayout">
|
||||||
<item>
|
<item>
|
||||||
@ -212,7 +264,7 @@
|
|||||||
<activeoff>:/play.png</activeoff>
|
<activeoff>:/play.png</activeoff>
|
||||||
<activeon>:/pause.png</activeon>
|
<activeon>:/pause.png</activeon>
|
||||||
<selectedoff>:/play.png</selectedoff>
|
<selectedoff>:/play.png</selectedoff>
|
||||||
<selectedon>:/pause.png</selectedon>:/pause.png</iconset>
|
<selectedon>:/pause.png</selectedon>:/play.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
Loading…
Reference in New Issue
Block a user