kopia lustrzana https://gitlab.com/eliggett/wfview
Added debug logging button, however, it doesn't propagate the debug
signal through all the modules yet. So, for now, it is hidden.knobtest
rodzic
95994ed737
commit
2225953d03
|
@ -27,6 +27,8 @@ loggingWindow::loggingWindow(QWidget *parent) :
|
||||||
connect(socket, SIGNAL(disconnected()), this, SLOT(disconnectedFromHost()));
|
connect(socket, SIGNAL(disconnected()), this, SLOT(disconnectedFromHost()));
|
||||||
connect(socket, SIGNAL(readyRead()), this, SLOT(handleDataFromLoggingHost()));
|
connect(socket, SIGNAL(readyRead()), this, SLOT(handleDataFromLoggingHost()));
|
||||||
connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(handleLoggingHostError(QAbstractSocket::SocketError)));
|
connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(handleLoggingHostError(QAbstractSocket::SocketError)));
|
||||||
|
|
||||||
|
ui->debugBtn->setHidden(true); // this button doesn't work yet.
|
||||||
}
|
}
|
||||||
|
|
||||||
loggingWindow::~loggingWindow()
|
loggingWindow::~loggingWindow()
|
||||||
|
@ -169,3 +171,8 @@ void loggingWindow::on_copyPathBtn_clicked()
|
||||||
{
|
{
|
||||||
clipboard->setText(logFilename);
|
clipboard->setText(logFilename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void loggingWindow::on_debugBtn_clicked(bool checked)
|
||||||
|
{
|
||||||
|
emit setDebugMode(checked);
|
||||||
|
}
|
||||||
|
|
|
@ -45,6 +45,8 @@ private slots:
|
||||||
|
|
||||||
void on_copyPathBtn_clicked();
|
void on_copyPathBtn_clicked();
|
||||||
|
|
||||||
|
void on_debugBtn_clicked(bool checked);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void setDebugMode(bool debugOn);
|
void setDebugMode(bool debugOn);
|
||||||
|
|
||||||
|
|
|
@ -106,6 +106,16 @@
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="debugBtn">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Enable or disable debug logging</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Debug</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="clearDisplayBtn">
|
<widget class="QPushButton" name="clearDisplayBtn">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
|
|
|
@ -39,6 +39,7 @@ wfmain::wfmain(const QString serialPortCL, const QString hostCL, const QString s
|
||||||
|
|
||||||
setWindowTitle(QString("wfview"));
|
setWindowTitle(QString("wfview"));
|
||||||
|
|
||||||
|
logWindow = new loggingWindow();
|
||||||
initLogging();
|
initLogging();
|
||||||
qInfo(logSystem()) << version;
|
qInfo(logSystem()) << version;
|
||||||
|
|
||||||
|
@ -51,7 +52,6 @@ wfmain::wfmain(const QString serialPortCL, const QString hostCL, const QString s
|
||||||
trxadj = new transceiverAdjustments();
|
trxadj = new transceiverAdjustments();
|
||||||
abtBox = new aboutbox();
|
abtBox = new aboutbox();
|
||||||
selRad = new selectRadio();
|
selRad = new selectRadio();
|
||||||
logWindow = new loggingWindow();
|
|
||||||
|
|
||||||
qRegisterMetaType<udpPreferences>(); // Needs to be registered early.
|
qRegisterMetaType<udpPreferences>(); // Needs to be registered early.
|
||||||
qRegisterMetaType<rigCapabilities>();
|
qRegisterMetaType<rigCapabilities>();
|
||||||
|
@ -6975,6 +6975,8 @@ void wfmain::initLogging()
|
||||||
// Set handler
|
// Set handler
|
||||||
qInstallMessageHandler(messageHandler);
|
qInstallMessageHandler(messageHandler);
|
||||||
|
|
||||||
|
connect(logWindow, SIGNAL(setDebugMode(bool)), this, SLOT(setDebugLogging(bool)));
|
||||||
|
|
||||||
// Interval timer for log window updates:
|
// Interval timer for log window updates:
|
||||||
logCheckingTimer.setInterval(100);
|
logCheckingTimer.setInterval(100);
|
||||||
connect(&logCheckingTimer, SIGNAL(timeout()), this, SLOT(logCheck()));
|
connect(&logCheckingTimer, SIGNAL(timeout()), this, SLOT(logCheck()));
|
||||||
|
@ -7000,6 +7002,11 @@ void wfmain::handleLogText(QString text)
|
||||||
logWindow->acceptLogText(text);
|
logWindow->acceptLogText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wfmain::setDebugLogging(bool debugModeOn)
|
||||||
|
{
|
||||||
|
this->debugMode = debugModeOn;
|
||||||
|
}
|
||||||
|
|
||||||
void wfmain::messageHandler(QtMsgType type, const QMessageLogContext& context, const QString& msg)
|
void wfmain::messageHandler(QtMsgType type, const QMessageLogContext& context, const QString& msg)
|
||||||
{
|
{
|
||||||
// Open stream file writes
|
// Open stream file writes
|
||||||
|
|
1
wfmain.h
1
wfmain.h
|
@ -296,6 +296,7 @@ private slots:
|
||||||
|
|
||||||
void setRadioTimeDateSend();
|
void setRadioTimeDateSend();
|
||||||
void logCheck();
|
void logCheck();
|
||||||
|
void setDebugLogging(bool debugModeOn);
|
||||||
|
|
||||||
|
|
||||||
// void on_getFreqBtn_clicked();
|
// void on_getFreqBtn_clicked();
|
||||||
|
|
Ładowanie…
Reference in New Issue