diff --git a/keyboard.cpp b/keyboard.cpp new file mode 100644 index 0000000..ccddeab --- /dev/null +++ b/keyboard.cpp @@ -0,0 +1,26 @@ +#include +#include +#include +#include +#include +#include "keyboard.h" + +keyboard::keyboard(void) +{ +} + +keyboard::~keyboard(void) +{ +} + +void keyboard::run() +{ + while (true) + { + char key = getchar(); + if (key == 'q') { + QCoreApplication::exit(0); + } + } + return; +} \ No newline at end of file diff --git a/keyboard.h b/keyboard.h new file mode 100644 index 0000000..1fab712 --- /dev/null +++ b/keyboard.h @@ -0,0 +1,11 @@ +#include +#include +#include +class keyboard : public QThread +{ + Q_OBJECT +public: + keyboard(void); + ~keyboard(void); + void run(); +}; diff --git a/main.cpp b/main.cpp index 8217ee9..7debf6e 100644 --- a/main.cpp +++ b/main.cpp @@ -1,5 +1,6 @@ #ifdef BUILD_WFSERVER #include +#include "keyboard.h" #else #include #endif @@ -47,18 +48,21 @@ void messageHandler(QtMsgType type, const QMessageLogContext& context, const QSt int main(int argc, char *argv[]) { + #ifdef BUILD_WFSERVER QCoreApplication a(argc, argv); + a.setOrganizationName("wfview"); + a.setOrganizationDomain("wfview.org"); + a.setApplicationName("wfserver"); + keyboard* kb = new keyboard(); + kb->start(); #else QApplication a(argc, argv); -#endif - - //a.setStyle( "Fusion" ); - a.setOrganizationName("wfview"); a.setOrganizationDomain("wfview.org"); a.setApplicationName("wfview"); a.setAttribute(Qt::AA_EnableHighDpiScaling); +#endif #ifdef QT_DEBUG debugMode = true; diff --git a/wfserver.pro b/wfserver.pro index 74215d5..009fa1f 100644 --- a/wfserver.pro +++ b/wfserver.pro @@ -147,6 +147,7 @@ SOURCES += main.cpp\ resampler/resample.c \ rigctld.cpp \ tcpserver.cpp \ + keyboard.cpp HEADERS += servermain.h \ commhandler.h \ @@ -166,4 +167,5 @@ HEADERS += servermain.h \ rigctld.h \ ulaw.h \ tcpserver.h \ - audiotaper.h + audiotaper.h \ + keyboard.h diff --git a/wfserver.vcxproj b/wfserver.vcxproj index cbfc961..e619017 100644 --- a/wfserver.vcxproj +++ b/wfserver.vcxproj @@ -16,7 +16,8 @@ QtVS_v304 10.0.19041.0 10.0.19041.0 - $(MSBuildProjectDirectory)\QtMsBuild + $(MSBuildProjectDirectory)\QtMsBuild + v142 @@ -36,7 +37,10 @@ debug\ wfserver - + + + + @@ -44,8 +48,34 @@ - debug\debug\wfservertruerelease\release\wfservertruefalsemsvc2019core;network;gui;multimedia;widgets;serialport;printsupportmsvc2019core;network;gui;multimedia;widgets;serialport;printsupport - + + + + + + debug\ + debug\ + wfserver + true + + + release\ + release\ + wfserver + true + false + + + msvc2019 + core;network;gui;multimedia;widgets;serialport;printsupport + + + msvc2019 + core;network;gui;multimedia;widgets;serialport;printsupport + + + + .;..\opus\include;..\eigen;..\r8brain-free-src;resampler;release;/include;%(AdditionalIncludeDirectories) @@ -59,12 +89,14 @@ MaxSpeed _CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WFVIEW_VERSION="1.2d";BUILD_WFSERVER;QT_DEPRECATED_WARNINGS;QCUSTOMPLOT_COMPILE_LIBRARY;USE_SSE;USE_SSE2;OUTSIDE_SPEEX;RANDOM_PREFIX=wf;EIGEN_MPL2_ONLY;EIGEN_DONT_VECTORIZE;EIGEN_VECTORIZE_SSE3;PREFIX="/usr/local";GITSHORT="47772a4";HOST="wfview.org";UNAME="build";NDEBUG;QT_NO_DEBUG;%(PreprocessorDefinitions) false - + + MultiThreadedDLL true true Level3 - true + true + ..\opus\win32\VS2015\Win32\Release\opus.lib;%(AdditionalDependencies) ..\opus\win32\VS2015\Win32\Release;%(AdditionalLibraryDirectories) @@ -87,7 +119,21 @@ _CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WFVIEW_VERSION=\"1.2d\";BUILD_WFSERVER;QT_DEPRECATED_WARNINGS;QCUSTOMPLOT_COMPILE_LIBRARY;USE_SSE;USE_SSE2;OUTSIDE_SPEEX;RANDOM_PREFIX=wf;EIGEN_MPL2_ONLY;EIGEN_DONT_VECTORIZE;EIGEN_VECTORIZE_SSE3;PREFIX=\"/usr/local\";GITSHORT=\"47772a4\";HOST=\"wfview.org\";UNAME=\"build\";NDEBUG;QT_NO_DEBUG;QT_MULTIMEDIA_LIB;QT_PRINTSUPPORT_LIB;QT_WIDGETS_LIB;QT_GUI_LIB;QT_SERIALPORT_LIB;QT_NETWORK_LIB;QT_CORE_LIB;%(PreprocessorDefinitions) - msvc./$(Configuration)/moc_predefs.hMoc'ing %(Identity)...output$(Configuration)moc_%(Filename).cppdefaultRcc'ing %(Identity)...$(Configuration)qrc_%(Filename).cpp + + msvc + ./$(Configuration)/moc_predefs.h + Moc'ing %(Identity)... + output + $(Configuration) + moc_%(Filename).cpp + + + default + Rcc'ing %(Identity)... + $(Configuration) + qrc_%(Filename).cpp + + .;..\opus\include;..\eigen;..\r8brain-free-src;resampler;debug;/include;%(AdditionalIncludeDirectories) @@ -105,7 +151,8 @@ true true Level3 - true + true + ..\opus\win32\VS2015\Win32\Debug\opus.lib;%(AdditionalDependencies) ..\opus\win32\VS2015\Win32\Debug;%(AdditionalLibraryDirectories) @@ -126,11 +173,26 @@ _CONSOLE;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WFVIEW_VERSION=\"1.2d\";BUILD_WFSERVER;QT_DEPRECATED_WARNINGS;QCUSTOMPLOT_COMPILE_LIBRARY;USE_SSE;USE_SSE2;OUTSIDE_SPEEX;RANDOM_PREFIX=wf;EIGEN_MPL2_ONLY;EIGEN_DONT_VECTORIZE;EIGEN_VECTORIZE_SSE3;PREFIX=\"/usr/local\";GITSHORT=\"47772a4\";HOST=\"wfview.org\";UNAME=\"build\";QT_MULTIMEDIA_LIB;QT_PRINTSUPPORT_LIB;QT_WIDGETS_LIB;QT_GUI_LIB;QT_SERIALPORT_LIB;QT_NETWORK_LIB;QT_CORE_LIB;_DEBUG;%(PreprocessorDefinitions) - msvc./$(Configuration)/moc_predefs.hMoc'ing %(Identity)...output$(Configuration)moc_%(Filename).cppdefaultRcc'ing %(Identity)...$(Configuration)qrc_%(Filename).cpp + + msvc + ./$(Configuration)/moc_predefs.h + Moc'ing %(Identity)... + output + $(Configuration) + moc_%(Filename).cpp + + + default + Rcc'ing %(Identity)... + $(Configuration) + qrc_%(Filename).cpp + + + @@ -144,112 +206,37 @@ + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Document true @@ -266,24 +253,6 @@ release\moc_predefs.h;%(Outputs) true - - - - - - - - - - - - - - - - - - @@ -316,30 +285,16 @@ - - - - - - - - - - resourcesresources + resources + resources + - - - - - - - - - - stylestyle + style + style + @@ -353,6 +308,9 @@ - + + + + \ No newline at end of file diff --git a/wfserver.vcxproj.filters b/wfserver.vcxproj.filters index 80cfac4..1a18943 100644 --- a/wfserver.vcxproj.filters +++ b/wfserver.vcxproj.filters @@ -79,6 +79,9 @@ Source Files + + Source Files + @@ -140,34 +143,12 @@ - - - - Generated Files Generated Files - - - - - - - - - - - - - - - - - - @@ -301,6 +282,11 @@ - + + + + + Header Files + \ No newline at end of file diff --git a/wfserver.vcxproj.user b/wfserver.vcxproj.user index 04ba52a..f4da9e5 100644 --- a/wfserver.vcxproj.user +++ b/wfserver.vcxproj.user @@ -2,9 +2,9 @@ - 2022-01-23T13:00:12.7440722Z + 2022-04-13T11:33:50.3607712Z - 2022-01-23T13:00:16.3164650Z + 2022-04-13T11:33:53.0745117Z \ No newline at end of file diff --git a/wfview.vcxproj.user b/wfview.vcxproj.user index ba3b589..1f25d96 100644 --- a/wfview.vcxproj.user +++ b/wfview.vcxproj.user @@ -7,9 +7,9 @@ PATH=$(QTDIR)\bin%3bC:\QT\5.15.2\MSVC2019\bin%3b$(QTDIR)\bin%3bC:\QT\5.15.2\MSVC2019\bin%3b$(PATH) - 2022-01-22T22:51:25.6471709Z + 2022-04-13T11:33:25.4527691Z - 2022-01-22T12:48:06.5160626Z + 2022-04-13T11:33:27.0112037Z \ No newline at end of file diff --git a/wfview_resource.aps b/wfview_resource.aps new file mode 100644 index 0000000..3e7faab Binary files /dev/null and b/wfview_resource.aps differ