#include <dsdstatustextdialog.h>
Inherits QDialog.
Definition at line 28 of file dsdstatustextdialog.h.
◆ DSDStatusTextDialog()
DSDStatusTextDialog::DSDStatusTextDialog |
( |
QWidget * |
parent = 0 | ) |
|
|
explicit |
◆ ~DSDStatusTextDialog()
DSDStatusTextDialog::~DSDStatusTextDialog |
( |
| ) |
|
◆ addLine()
void DSDStatusTextDialog::addLine |
( |
const QString & |
line | ) |
|
Definition at line 40 of file dsdstatustextdialog.cpp.
References arg(), m_lastLine, and ui.
Referenced by DSDDemodGUI::tick().
44 QDateTime dt = QDateTime::currentDateTime();
45 QString dateStr = dt.toString(
"HH:mm:ss");
46 QTextCursor cursor =
ui->logEdit->textCursor();
47 cursor.movePosition(QTextCursor::End, QTextCursor::MoveAnchor);
48 cursor.insertText(tr(
"%1 %2\n").
arg(dateStr).
arg(line));
49 if (
ui->pinToLastLine->isChecked()) {
50 ui->logEdit->verticalScrollBar()->setValue(
ui->logEdit->verticalScrollBar()->maximum());
Ui::DSDStatusTextDialog * ui
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
◆ on_clear_clicked
void DSDStatusTextDialog::on_clear_clicked |
( |
| ) |
|
|
privateslot |
◆ on_saveLog_clicked
void DSDStatusTextDialog::on_saveLog_clicked |
( |
| ) |
|
|
privateslot |
Definition at line 61 of file dsdstatustextdialog.cpp.
References ui.
63 QString fileName = QFileDialog::getSaveFileName(
this,
64 tr(
"Open log file"),
".", tr(
"Log files (*.log)"), 0, QFileDialog::DontUseNativeDialog);
68 QFileInfo fileInfo(fileName);
70 if (fileInfo.suffix() !=
"log") {
74 QFile exportFile(fileName);
76 if (exportFile.open(QIODevice::WriteOnly | QIODevice::Text))
78 QTextStream outstream(&exportFile);
79 outstream <<
ui->logEdit->toPlainText();
84 QMessageBox::information(
this, tr(
"Message"), tr(
"Cannot open file for writing"));
Ui::DSDStatusTextDialog * ui
◆ m_lastLine
QString DSDStatusTextDialog::m_lastLine |
|
private |
◆ ui
Ui::DSDStatusTextDialog* DSDStatusTextDialog::ui |
|
private |
The documentation for this class was generated from the following files: