diff options
Diffstat (limited to 'sdrgui')
-rw-r--r-- | sdrgui/CMakeLists.txt | 2 | ||||
-rw-r--r-- | sdrgui/mainwindow.cpp | 7 | ||||
-rw-r--r-- | sdrgui/mainwindow.h | 6 |
3 files changed, 15 insertions, 0 deletions
diff --git a/sdrgui/CMakeLists.txt b/sdrgui/CMakeLists.txt index e9e8e4846..b7ecc85d3 100644 --- a/sdrgui/CMakeLists.txt +++ b/sdrgui/CMakeLists.txt @@ -147,6 +147,7 @@ add_library(sdrgui SHARED include_directories( . ${CMAKE_SOURCE_DIR}/sdrbase + ${CMAKE_SOURCE_DIR}/logging ${CMAKE_CURRENT_BINARY_DIR} ${OPENGL_INCLUDE_DIR} ) @@ -155,6 +156,7 @@ target_link_libraries(sdrgui ${QT_LIBRARIES} ${OPENGL_LIBRARIES} sdrbase + logging ) set_target_properties(sdrgui PROPERTIES DEFINE_SYMBOL "sdrangel_EXPORTS") diff --git a/sdrgui/mainwindow.cpp b/sdrgui/mainwindow.cpp index 26e79b07d..552342956 100644 --- a/sdrgui/mainwindow.cpp +++ b/sdrgui/mainwindow.cpp @@ -50,6 +50,7 @@ #include "plugin/pluginapi.h" #include "gui/glspectrum.h" #include "gui/glspectrumgui.h" +#include "logger.h" #include "mainwindow.h" #include "ui_mainwindow.h" @@ -71,6 +72,9 @@ MainWindow::MainWindow(QWidget* parent) : m_centerFrequency(0), m_sampleFileName(std::string("./test.sdriq")) { + m_logger = new qtwebapp::Logger(this); + m_logger->installMsgHandler(); + qDebug() << "MainWindow::MainWindow: start"; m_instance = this; @@ -202,6 +206,9 @@ MainWindow::~MainWindow() delete m_showSystemWidget; delete ui; + + qDebug() << "MainWindow::~MainWindow: end"; + delete m_logger; } void MainWindow::addSourceDevice() diff --git a/sdrgui/mainwindow.h b/sdrgui/mainwindow.h index e5b37b832..e5ad95c02 100644 --- a/sdrgui/mainwindow.h +++ b/sdrgui/mainwindow.h @@ -50,6 +50,10 @@ class DeviceUISet; class PluginInterface; class QWidget; +namespace qtwebapp { + class Logger; +} + namespace Ui { class MainWindow; } @@ -110,6 +114,8 @@ private: quint64 m_centerFrequency; std::string m_sampleFileName; + qtwebapp::Logger *m_logger; + void loadSettings(); void loadPresetSettings(const Preset* preset, int tabIndex); void savePresetSettings(Preset* preset, int tabIndex); |