10 changed files with 456 additions and 105 deletions
@ -0,0 +1,55 @@
@@ -0,0 +1,55 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2018 F4EXB //
|
||||
// written by Edouard Griffiths //
|
||||
// //
|
||||
// This program is free software; you can redistribute it and/or modify //
|
||||
// it under the terms of the GNU General Public License as published by //
|
||||
// the Free Software Foundation as version 3 of the License, or //
|
||||
// //
|
||||
// This program is distributed in the hope that it will be useful, //
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||
// GNU General Public License V3 for more details. //
|
||||
// //
|
||||
// You should have received a copy of the GNU General Public License //
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "dsdstatustextdialog.h" |
||||
#include "ui_dsdstatustextdialog.h" |
||||
|
||||
#include <QDateTime> |
||||
#include <QScrollBar> |
||||
|
||||
DSDStatusTextDialog::DSDStatusTextDialog(QWidget* parent) : |
||||
QDialog(parent), |
||||
ui(new Ui::DSDStatusTextDialog) |
||||
{ |
||||
ui->setupUi(this); |
||||
} |
||||
|
||||
DSDStatusTextDialog::~DSDStatusTextDialog() |
||||
{ |
||||
delete ui; |
||||
} |
||||
|
||||
void DSDStatusTextDialog::addLine(const QString& line) |
||||
{ |
||||
if ((line.size() > 0) && (line != m_lastLine)) |
||||
{ |
||||
QDateTime dt = QDateTime::currentDateTime(); |
||||
QString dateStr = dt.toString("hh:mm:ss"); |
||||
QTextCursor cursor = ui->logEdit->textCursor(); |
||||
cursor.movePosition(QTextCursor::End, QTextCursor::MoveAnchor); |
||||
cursor.insertText(tr("%1 %2\n").arg(dateStr).arg(line)); |
||||
if (ui->pinToLastLine->isChecked()) { |
||||
ui->logEdit->verticalScrollBar()->setValue(ui->logEdit->verticalScrollBar()->maximum()); |
||||
} |
||||
m_lastLine = line; |
||||
} |
||||
} |
||||
|
||||
void DSDStatusTextDialog::on_clear_clicked() |
||||
{ |
||||
ui->logEdit->clear(); |
||||
} |
||||
@ -0,0 +1,45 @@
@@ -0,0 +1,45 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2018 F4EXB //
|
||||
// written by Edouard Griffiths //
|
||||
// //
|
||||
// This program is free software; you can redistribute it and/or modify //
|
||||
// it under the terms of the GNU General Public License as published by //
|
||||
// the Free Software Foundation as version 3 of the License, or //
|
||||
// //
|
||||
// This program is distributed in the hope that it will be useful, //
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||
// GNU General Public License V3 for more details. //
|
||||
// //
|
||||
// You should have received a copy of the GNU General Public License //
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef PLUGINS_CHANNELRX_DEMODDSD_DSDSTATUSTEXTDIALOG_H_ |
||||
#define PLUGINS_CHANNELRX_DEMODDSD_DSDSTATUSTEXTDIALOG_H_ |
||||
|
||||
#include <QDialog> |
||||
|
||||
namespace Ui { |
||||
class DSDStatusTextDialog; |
||||
} |
||||
|
||||
class DSDStatusTextDialog : public QDialog { |
||||
Q_OBJECT |
||||
|
||||
public: |
||||
explicit DSDStatusTextDialog(QWidget* parent = 0); |
||||
~DSDStatusTextDialog(); |
||||
|
||||
void addLine(const QString& line); |
||||
|
||||
private: |
||||
Ui::DSDStatusTextDialog* ui; |
||||
QString m_lastLine; |
||||
|
||||
private slots: |
||||
void on_clear_clicked(); |
||||
}; |
||||
|
||||
|
||||
#endif /* PLUGINS_CHANNELRX_DEMODDSD_DSDSTATUSTEXTDIALOG_H_ */ |
||||
@ -0,0 +1,178 @@
@@ -0,0 +1,178 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<ui version="4.0"> |
||||
<class>DSDStatusTextDialog</class> |
||||
<widget class="QDialog" name="DSDStatusTextDialog"> |
||||
<property name="geometry"> |
||||
<rect> |
||||
<x>0</x> |
||||
<y>0</y> |
||||
<width>740</width> |
||||
<height>380</height> |
||||
</rect> |
||||
</property> |
||||
<property name="font"> |
||||
<font> |
||||
<family>Sans Serif</family> |
||||
<pointsize>9</pointsize> |
||||
</font> |
||||
</property> |
||||
<property name="windowTitle"> |
||||
<string>Status text log</string> |
||||
</property> |
||||
<property name="windowIcon"> |
||||
<iconset resource="../../../sdrgui/resources/res.qrc"> |
||||
<normaloff>:/sdrangel_icon.png</normaloff>:/sdrangel_icon.png</iconset> |
||||
</property> |
||||
<layout class="QVBoxLayout" name="verticalLayout"> |
||||
<item> |
||||
<layout class="QHBoxLayout" name="processLayout"> |
||||
<item> |
||||
<widget class="QPushButton" name="clear"> |
||||
<property name="maximumSize"> |
||||
<size> |
||||
<width>24</width> |
||||
<height>24</height> |
||||
</size> |
||||
</property> |
||||
<property name="toolTip"> |
||||
<string>Clear log</string> |
||||
</property> |
||||
<property name="text"> |
||||
<string/> |
||||
</property> |
||||
<property name="icon"> |
||||
<iconset resource="../../../sdrgui/resources/res.qrc"> |
||||
<normaloff>:/sweep.png</normaloff>:/sweep.png</iconset> |
||||
</property> |
||||
<property name="autoDefault"> |
||||
<bool>false</bool> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="ButtonSwitch" name="pinToLastLine"> |
||||
<property name="toolTip"> |
||||
<string>Pin to last line</string> |
||||
</property> |
||||
<property name="text"> |
||||
<string/> |
||||
</property> |
||||
<property name="icon"> |
||||
<iconset resource="../../../sdrgui/resources/res.qrc"> |
||||
<normaloff>:/pin_last.png</normaloff>:/pin_last.png</iconset> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QPushButton" name="pushButton"> |
||||
<property name="maximumSize"> |
||||
<size> |
||||
<width>24</width> |
||||
<height>24</height> |
||||
</size> |
||||
</property> |
||||
<property name="toolTip"> |
||||
<string>Save log to file</string> |
||||
</property> |
||||
<property name="text"> |
||||
<string/> |
||||
</property> |
||||
<property name="icon"> |
||||
<iconset resource="../../../sdrgui/resources/res.qrc"> |
||||
<normaloff>:/save.png</normaloff>:/save.png</iconset> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<spacer name="horizontalSpacer"> |
||||
<property name="orientation"> |
||||
<enum>Qt::Horizontal</enum> |
||||
</property> |
||||
<property name="sizeHint" stdset="0"> |
||||
<size> |
||||
<width>40</width> |
||||
<height>20</height> |
||||
</size> |
||||
</property> |
||||
</spacer> |
||||
</item> |
||||
</layout> |
||||
</item> |
||||
<item> |
||||
<widget class="QPlainTextEdit" name="logEdit"> |
||||
<property name="enabled"> |
||||
<bool>true</bool> |
||||
</property> |
||||
<property name="font"> |
||||
<font> |
||||
<family>Monospace</family> |
||||
</font> |
||||
</property> |
||||
<property name="toolTip"> |
||||
<string>Log</string> |
||||
</property> |
||||
<property name="readOnly"> |
||||
<bool>true</bool> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QDialogButtonBox" name="buttonBox"> |
||||
<property name="orientation"> |
||||
<enum>Qt::Horizontal</enum> |
||||
</property> |
||||
<property name="standardButtons"> |
||||
<set>QDialogButtonBox::Close</set> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
<customwidgets> |
||||
<customwidget> |
||||
<class>ButtonSwitch</class> |
||||
<extends>QToolButton</extends> |
||||
<header>gui/buttonswitch.h</header> |
||||
</customwidget> |
||||
</customwidgets> |
||||
<tabstops> |
||||
<tabstop>buttonBox</tabstop> |
||||
</tabstops> |
||||
<resources> |
||||
<include location="../../../sdrgui/resources/res.qrc"/> |
||||
</resources> |
||||
<connections> |
||||
<connection> |
||||
<sender>buttonBox</sender> |
||||
<signal>accepted()</signal> |
||||
<receiver>DSDStatusTextDialog</receiver> |
||||
<slot>accept()</slot> |
||||
<hints> |
||||
<hint type="sourcelabel"> |
||||
<x>257</x> |
||||
<y>194</y> |
||||
</hint> |
||||
<hint type="destinationlabel"> |
||||
<x>157</x> |
||||
<y>203</y> |
||||
</hint> |
||||
</hints> |
||||
</connection> |
||||
<connection> |
||||
<sender>buttonBox</sender> |
||||
<signal>rejected()</signal> |
||||
<receiver>DSDStatusTextDialog</receiver> |
||||
<slot>reject()</slot> |
||||
<hints> |
||||
<hint type="sourcelabel"> |
||||
<x>314</x> |
||||
<y>194</y> |
||||
</hint> |
||||
<hint type="destinationlabel"> |
||||
<x>286</x> |
||||
<y>203</y> |
||||
</hint> |
||||
</hints> |
||||
</connection> |
||||
</connections> |
||||
</ui> |
||||
|
After Width: | Height: | Size: 341 B |
@ -1,95 +1,97 @@
@@ -1,95 +1,97 @@
|
||||
<RCC> |
||||
<qresource prefix="/"> |
||||
<file>minusrx.png</file> |
||||
<file>plusrx.png</file> |
||||
<file>microphone.png</file> |
||||
<file>checkmark.png</file> |
||||
<file>questionmark.png</file> |
||||
<file>export.png</file> |
||||
<file>import.png</file> |
||||
<file>compressed.png</file> |
||||
<file>locked.png</file> |
||||
<file>appicon.png</file> |
||||
<file>unlocked.png</file> |
||||
<file>histogram.png</file> |
||||
<file>waterfall.png</file> |
||||
<file>preset-load.png</file> |
||||
<file>preset-save.png</file> |
||||
<file>preset-update.png</file> |
||||
<file>preset-delete.png</file> |
||||
<file>horizontal.png</file> |
||||
<file>vertical.png</file> |
||||
<file>maxhold.png</file> |
||||
<file>grid.png</file> |
||||
<file>invertspectrum.png</file> |
||||
<file>preset-last.png</file> |
||||
<file>display1.png</file> |
||||
<file>display2.png</file> |
||||
<file>slopen_icon.png</file> |
||||
<file>slopep_icon.png</file> |
||||
<file>display1_w.png</file> |
||||
<file>display2_w.png</file> |
||||
<file>horizontal_w.png</file> |
||||
<file>vertical_w.png</file> |
||||
<file>current.png</file> |
||||
<file>slopeb_icon.png</file> |
||||
<file>clear.png</file> |
||||
<file>playloop.png</file> |
||||
<file>play.png</file> |
||||
<file>pause.png</file> |
||||
<file>stop.png</file> |
||||
<file>sdrangel_logo.png</file> |
||||
<file>sdrangel_icon.png</file> |
||||
<file>minus.png</file> |
||||
<file>plus.png</file> |
||||
<file>record_off.png</file> |
||||
<file>record_on.png</file> |
||||
<file>mem.png</file> |
||||
<file>minusw.png</file> |
||||
<file>plusw.png</file> |
||||
<file>mono.png</file> |
||||
<file>stereo.png</file> |
||||
<file>sound_off.png</file> |
||||
<file>sound_on.png</file> |
||||
<file>dsb.png</file> |
||||
<file>usb.png</file> |
||||
<file>flip_lr.png</file> |
||||
<file>flip_rl.png</file> |
||||
<file>carrier.png</file> |
||||
<file>rds.png</file> |
||||
<file>recycle.png</file> |
||||
<file>lsb.png</file> |
||||
<file>constellation.png</file> |
||||
<file>slot1_off.png</file> |
||||
<file>slot1_on.png</file> |
||||
<file>slot2_off.png</file> |
||||
<file>slot2_on.png</file> |
||||
<file>iambickey.png</file> |
||||
<file>morsekey.png</file> |
||||
<file>txoff.png</file> |
||||
<file>txon.png</file> |
||||
<file>arrow_down.png</file> |
||||
<file>arrow_up.png</file> |
||||
<file>film_reel.png</file> |
||||
<file>film.png</file> |
||||
<file>picture.png</file> |
||||
<file>camera.png</file> |
||||
<file>filter_bandpass.png</file> |
||||
<file>stream.png</file> |
||||
<file>antenna.png</file> |
||||
<file>link.png</file> |
||||
<file>choose.png</file> |
||||
<file>clocksource.png</file> |
||||
<file>flip_sidebands.png</file> |
||||
<file>filter_highpass.png</file> |
||||
<file>edit.png</file> |
||||
<file>listing.png</file> |
||||
<file>create.png</file> |
||||
<file>duplicate.png</file> |
||||
<file>bin.png</file> |
||||
<file>save.png</file> |
||||
<file>load.png</file> |
||||
<file>keyboard.png</file> |
||||
<file>kill.png</file> |
||||
</qresource> |
||||
<qresource prefix="/"> |
||||
<file>pin_last.png</file> |
||||
<file>sweep.png</file> |
||||
<file>minusrx.png</file> |
||||
<file>plusrx.png</file> |
||||
<file>microphone.png</file> |
||||
<file>checkmark.png</file> |
||||
<file>questionmark.png</file> |
||||
<file>export.png</file> |
||||
<file>import.png</file> |
||||
<file>compressed.png</file> |
||||
<file>locked.png</file> |
||||
<file>appicon.png</file> |
||||
<file>unlocked.png</file> |
||||
<file>histogram.png</file> |
||||
<file>waterfall.png</file> |
||||
<file>preset-load.png</file> |
||||
<file>preset-save.png</file> |
||||
<file>preset-update.png</file> |
||||
<file>preset-delete.png</file> |
||||
<file>horizontal.png</file> |
||||
<file>vertical.png</file> |
||||
<file>maxhold.png</file> |
||||
<file>grid.png</file> |
||||
<file>invertspectrum.png</file> |
||||
<file>preset-last.png</file> |
||||
<file>display1.png</file> |
||||
<file>display2.png</file> |
||||
<file>slopen_icon.png</file> |
||||
<file>slopep_icon.png</file> |
||||
<file>display1_w.png</file> |
||||
<file>display2_w.png</file> |
||||
<file>horizontal_w.png</file> |
||||
<file>vertical_w.png</file> |
||||
<file>current.png</file> |
||||
<file>slopeb_icon.png</file> |
||||
<file>clear.png</file> |
||||
<file>playloop.png</file> |
||||
<file>play.png</file> |
||||
<file>pause.png</file> |
||||
<file>stop.png</file> |
||||
<file>sdrangel_logo.png</file> |
||||
<file>sdrangel_icon.png</file> |
||||
<file>minus.png</file> |
||||
<file>plus.png</file> |
||||
<file>record_off.png</file> |
||||
<file>record_on.png</file> |
||||
<file>mem.png</file> |
||||
<file>minusw.png</file> |
||||
<file>plusw.png</file> |
||||
<file>mono.png</file> |
||||
<file>stereo.png</file> |
||||
<file>sound_off.png</file> |
||||
<file>sound_on.png</file> |
||||
<file>dsb.png</file> |
||||
<file>usb.png</file> |
||||
<file>flip_lr.png</file> |
||||
<file>flip_rl.png</file> |
||||
<file>carrier.png</file> |
||||
<file>rds.png</file> |
||||
<file>recycle.png</file> |
||||
<file>lsb.png</file> |
||||
<file>constellation.png</file> |
||||
<file>slot1_off.png</file> |
||||
<file>slot1_on.png</file> |
||||
<file>slot2_off.png</file> |
||||
<file>slot2_on.png</file> |
||||
<file>iambickey.png</file> |
||||
<file>morsekey.png</file> |
||||
<file>txoff.png</file> |
||||
<file>txon.png</file> |
||||
<file>arrow_down.png</file> |
||||
<file>arrow_up.png</file> |
||||
<file>film_reel.png</file> |
||||
<file>film.png</file> |
||||
<file>picture.png</file> |
||||
<file>camera.png</file> |
||||
<file>filter_bandpass.png</file> |
||||
<file>stream.png</file> |
||||
<file>antenna.png</file> |
||||
<file>link.png</file> |
||||
<file>choose.png</file> |
||||
<file>clocksource.png</file> |
||||
<file>flip_sidebands.png</file> |
||||
<file>filter_highpass.png</file> |
||||
<file>edit.png</file> |
||||
<file>listing.png</file> |
||||
<file>create.png</file> |
||||
<file>duplicate.png</file> |
||||
<file>bin.png</file> |
||||
<file>save.png</file> |
||||
<file>load.png</file> |
||||
<file>keyboard.png</file> |
||||
<file>kill.png</file> |
||||
</qresource> |
||||
</RCC> |
||||
|
||||
|
After Width: | Height: | Size: 371 B |
Loading…
Reference in new issue