master 0.71
g8bpq 3 years ago
parent 601377db04
commit a3362dbe68

63
.gitattributes vendored

@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain

261
.gitignore vendored

@ -0,0 +1,261 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# DNX
project.lock.json
project.fragment.lock.json
artifacts/
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
#*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignoreable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush
.cr/
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc

Binary file not shown.

Binary file not shown.

@ -1062,7 +1062,7 @@ void on_AGW_C_frame(AGWUser * AGW, struct AGWHeader * Frame, byte * Msg)
setMenus(true); setMenus(true);
if (ConnectBeep) if (ConnectBeep)
myBeep(); myBeep(&ConnectWAV);
// Send CText if defined // Send CText if defined

@ -0,0 +1,353 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AlertDialog</class>
<widget class="QDialog" name="AlertDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>558</width>
<height>461</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>86</x>
<y>373</y>
<width>351</width>
<height>33</height>
</rect>
</property>
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="okButton">
<property name="text">
<string>OK</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QCheckBox" name="InboundBeep">
<property name="geometry">
<rect>
<x>24</x>
<y>40</y>
<width>201</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Beep on Inbound connect</string>
</property>
</widget>
<widget class="QCheckBox" name="InactivityBeep">
<property name="geometry">
<rect>
<x>24</x>
<y>65</y>
<width>221</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>Beep on message after inactivity</string>
</property>
</widget>
<widget class="QCheckBox" name="KeywordBeep">
<property name="geometry">
<rect>
<x>24</x>
<y>90</y>
<width>201</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Beep on keyword</string>
</property>
</widget>
<widget class="QLineEdit" name="Interval">
<property name="geometry">
<rect>
<x>350</x>
<y>65</y>
<width>51</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QLineEdit" name="keywordFile">
<property name="geometry">
<rect>
<x>350</x>
<y>95</y>
<width>137</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QRadioButton" name="useBeep">
<property name="geometry">
<rect>
<x>24</x>
<y>204</y>
<width>82</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Use Beep</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>
</attribute>
</widget>
<widget class="QRadioButton" name="useFiles">
<property name="geometry">
<rect>
<x>148</x>
<y>204</y>
<width>193</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Use Audio Files</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>
</attribute>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>258</x>
<y>65</y>
<width>47</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Interval</string>
</property>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>24</x>
<y>267</y>
<width>107</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Interval .wav File</string>
</property>
</widget>
<widget class="QLineEdit" name="intervalFile">
<property name="geometry">
<rect>
<x>200</x>
<y>267</y>
<width>207</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>24</x>
<y>292</y>
<width>169</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Inbound Connect .wav File</string>
</property>
</widget>
<widget class="QLabel" name="label_4">
<property name="geometry">
<rect>
<x>24</x>
<y>317</y>
<width>165</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Keyword Alert .wav File</string>
</property>
</widget>
<widget class="QLabel" name="label_5">
<property name="geometry">
<rect>
<x>258</x>
<y>95</y>
<width>89</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Keyword File</string>
</property>
</widget>
<widget class="QLineEdit" name="connectFile">
<property name="geometry">
<rect>
<x>200</x>
<y>292</y>
<width>207</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QLineEdit" name="keywordWAV">
<property name="geometry">
<rect>
<x>200</x>
<y>317</y>
<width>207</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_6">
<property name="geometry">
<rect>
<x>20</x>
<y>130</y>
<width>465</width>
<height>65</height>
</rect>
</property>
<property name="text">
<string>The System Beep function doesn't work on all platform, so you can configure QtTermTCP to play a sound file instead of using Beep. You can set different files for each event if you wish. Some sample wav files are provided. </string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
<widget class="QPushButton" name="chooseInterval">
<property name="geometry">
<rect>
<x>416</x>
<y>267</y>
<width>61</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Choose</string>
</property>
</widget>
<widget class="QPushButton" name="chooseInbound">
<property name="geometry">
<rect>
<x>416</x>
<y>292</y>
<width>61</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Choose</string>
</property>
</widget>
<widget class="QPushButton" name="chooseKeyAlert">
<property name="geometry">
<rect>
<x>416</x>
<y>317</y>
<width>61</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Choose</string>
</property>
</widget>
<widget class="QCheckBox" name="Bells">
<property name="geometry">
<rect>
<x>24</x>
<y>15</y>
<width>289</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Use Bells (ascii BELL char makes a sound)</string>
</property>
</widget>
<widget class="QLineEdit" name="bellsFile">
<property name="geometry">
<rect>
<x>200</x>
<y>242</y>
<width>207</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QPushButton" name="chooseBells">
<property name="geometry">
<rect>
<x>416</x>
<y>242</y>
<width>61</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Choose</string>
</property>
</widget>
<widget class="QLabel" name="label_7">
<property name="geometry">
<rect>
<x>24</x>
<y>242</y>
<width>107</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Bells .wav File</string>
</property>
</widget>
</widget>
<resources/>
<connections/>
<buttongroups>
<buttongroup name="buttonGroup"/>
</buttongroups>
</ui>

Binary file not shown.

File diff suppressed because it is too large Load Diff

@ -1,6 +1,6 @@
// Qt Version of BPQTermTCP // Qt Version of BPQTermTCP
#define VersionString "0.0.0.68" #define VersionString "0.0.0.69"
// .12 Save font weight // .12 Save font weight
@ -76,8 +76,17 @@
// .67 Add config Yapp RX Size dialog July 2023 // .67 Add config Yapp RX Size dialog July 2023
// Fix 63 port montoring // Fix 63 port montoring
// .68 Remember last used host on restart Sept 2023 // .68 Sept 2023
// Add AutoConnect in Tabbed Mode
// Remember last used host on restart
// Add AutoConnect in Tabbed Mode
// Fix auto copy when QtTerm not active window
// .69 October 2023
// Options related to sound alerts moved to a separte menu in Setup
// Allow use of WAV files instead of Beep sound for sound alerts
// Enable an alarm to be sounded when one of a list of words or phrases is received.
#define _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS
@ -222,6 +231,17 @@ extern int AlertBeep;
extern int AlertFreq; extern int AlertFreq;
extern int AlertDuration; extern int AlertDuration;
extern int ConnectBeep; extern int ConnectBeep;
bool useBeep; // use wav files if not set
extern int UseKeywords;
extern QString KeyWordsFile;
QString ConnectWAV("");
QString AlertWAV("");
QString BellWAV("");
QString IntervalWAV("");
extern int MaxRXSize; extern int MaxRXSize;
extern int AutoTeletext; extern int AutoTeletext;
@ -879,6 +899,7 @@ Ui_ListenSession * newWindow(QObject * parent, int Type, const char * Label)
Sess->TTActive = 0; Sess->TTActive = 0;
Sess->TTFlashToggle = 0; Sess->TTFlashToggle = 0;
Sess->pageBuffer[0] = 0; Sess->pageBuffer[0] = 0;
Sess->Tab = 0;
_sessions.push_back(Sess); _sessions.push_back(Sess);
@ -1078,6 +1099,8 @@ QtTermTCP::QtTermTCP(QWidget *parent) : QMainWindow(parent)
GetSettings(); GetSettings();
GetKeyWordFile();
// Set background colours // Set background colours
sprintf(monStyleSheet, "background-color: rgb(%d, %d, %d);", sprintf(monStyleSheet, "background-color: rgb(%d, %d, %d);",
@ -1340,9 +1363,15 @@ QtTermTCP::QtTermTCP(QWidget *parent) : QMainWindow(parent)
setupMenu->addAction(singleAct2); setupMenu->addAction(singleAct2);
setupMenu->addAction(MDIAct); setupMenu->addAction(MDIAct);
setupMenu->addAction(tabbedAct); setupMenu->addAction(tabbedAct);
setupMenu->addSeparator();
AlertAction = new QAction("Sound Alerts Setup", this);
setupMenu->addAction(AlertAction);
connect(AlertAction, SIGNAL(triggered()), this, SLOT(AlertSlot()));
AlertAction->setFont(*menufont);
setupMenu->addSeparator(); setupMenu->addSeparator();
actFonts = new QAction("Terminal Font", this); actFonts = new QAction("Terminal Font", this);
setupMenu->addAction(actFonts); setupMenu->addAction(actFonts);
connect(actFonts, SIGNAL(triggered()), this, SLOT(doFonts())); connect(actFonts, SIGNAL(triggered()), this, SLOT(doFonts()));
@ -1358,6 +1387,8 @@ QtTermTCP::QtTermTCP(QWidget *parent) : QMainWindow(parent)
connect(actColours, SIGNAL(triggered()), this, SLOT(doColours())); connect(actColours, SIGNAL(triggered()), this, SLOT(doColours()));
actColours->setFont(*menufont); actColours->setFont(*menufont);
setupMenu->addSeparator();
AGWAction = new QAction("AGW Setup", this); AGWAction = new QAction("AGW Setup", this);
setupMenu->addAction(AGWAction); setupMenu->addAction(AGWAction);
connect(AGWAction, SIGNAL(triggered()), this, SLOT(AGWSlot())); connect(AGWAction, SIGNAL(triggered()), this, SLOT(AGWSlot()));
@ -1373,13 +1404,13 @@ QtTermTCP::QtTermTCP(QWidget *parent) : QMainWindow(parent)
connect(KISSAction, SIGNAL(triggered()), this, SLOT(KISSSlot())); connect(KISSAction, SIGNAL(triggered()), this, SLOT(KISSSlot()));
KISSAction->setFont(*menufont); KISSAction->setFont(*menufont);
setupMenu->addSeparator();
actChatMode = setupMenuLine(setupMenu, (char *)"Chat Terminal Mode (Send Keepalives)", this, ChatMode); actChatMode = setupMenuLine(setupMenu, (char *)"Chat Terminal Mode (Send Keepalives)", this, ChatMode);
actAutoTeletext = setupMenuLine(setupMenu, (char *)"Auto switch to Teletext", this, AutoTeletext); actAutoTeletext = setupMenuLine(setupMenu, (char *)"Auto switch to Teletext", this, AutoTeletext);
actBells = setupMenuLine(setupMenu, (char *)"Enable Bells", this, Bells);
actStripLF = setupMenuLine(setupMenu, (char *)"Strip Line Feeds", this, StripLF); actStripLF = setupMenuLine(setupMenu, (char *)"Strip Line Feeds", this, StripLF);
actIntervalBeep = setupMenuLine(setupMenu, (char *)"Beep after inactivity", this, AlertBeep);
actConnectBeep = setupMenuLine(setupMenu, (char *)"Beep on inbound connect", this, ConnectBeep); setupMenu->addSeparator();
setupMenu->addAction(new QAction("Interpret non-UTF8 input as:", this)); setupMenu->addAction(new QAction("Interpret non-UTF8 input as:", this));
setupMenu->setFont(*menufont); setupMenu->setFont(*menufont);
@ -2871,7 +2902,7 @@ extern "C" void WritetoOutputWindowEx(Ui_ListenSession * Sess, unsigned char * B
if (AlertInterval && (NOW - LastWrite) > AlertInterval) if (AlertInterval && (NOW - LastWrite) > AlertInterval)
{ {
if (AlertBeep) if (AlertBeep)
myBeep(); myBeep(&IntervalWAV);
} }
// if tabbed and not active tab set tab label red // if tabbed and not active tab set tab label red
@ -3011,7 +3042,7 @@ lineloop:
if (ptr) if (ptr)
{ {
*(ptr) = 32; *(ptr) = 32;
myBeep(); myBeep(&BellWAV);
} }
} while (ptr); } while (ptr);
} }
@ -3321,8 +3352,18 @@ void GetSettings()
AutoTeletext = settings->value("AutoTeletext", 0).toInt(); AutoTeletext = settings->value("AutoTeletext", 0).toInt();
Bells = settings->value("Bells", 1).toInt(); Bells = settings->value("Bells", 1).toInt();
StripLF = settings->value("StripLF", 1).toInt(); StripLF = settings->value("StripLF", 1).toInt();
useBeep = settings->value("useBeep", true).toBool();
AlertBeep = settings->value("AlertBeep", 1).toInt(); AlertBeep = settings->value("AlertBeep", 1).toInt();
AlertInterval = settings->value("AlertInterval", 300).toInt();
ConnectBeep = settings->value("ConnectBeep", 1).toInt(); ConnectBeep = settings->value("ConnectBeep", 1).toInt();
ConnectWAV = settings->value("ConnectWAV", "").toString().toUtf8();
AlertWAV = settings->value("AlertWAV", "").toString().toUtf8();
BellWAV = settings->value("BellWAV", "").toString().toUtf8();
IntervalWAV = settings->value("IntervalWAV", "").toString().toUtf8();
UseKeywords = settings->value("UseKeywords", 0).toInt();
KeyWordsFile = settings->value("KeyWordsFile", "keywords.sys").toString().toUtf8();
SavedHost = settings->value("CurrentHost", 0).toInt(); SavedHost = settings->value("CurrentHost", 0).toInt();
strcpy(YAPPPath, settings->value("YAPPPath", "").toString().toUtf8()); strcpy(YAPPPath, settings->value("YAPPPath", "").toString().toUtf8());
MaxRXSize = settings->value("MaxRXSize", 100000).toInt(); MaxRXSize = settings->value("MaxRXSize", 100000).toInt();
@ -3495,7 +3536,17 @@ extern "C" void SaveSettings()
settings->setValue("Bells", Bells); settings->setValue("Bells", Bells);
settings->setValue("StripLF", StripLF); settings->setValue("StripLF", StripLF);
settings->setValue("AlertBeep", AlertBeep); settings->setValue("AlertBeep", AlertBeep);
settings->setValue("useBeep", useBeep);
settings->setValue("ConnectBeep", ConnectBeep); settings->setValue("ConnectBeep", ConnectBeep);
settings->setValue("BellWAV", BellWAV);
settings->setValue("AlertWAV", AlertWAV);
settings->setValue("IntervalWAV", IntervalWAV);
settings->setValue("ConnectWAV", ConnectWAV);
settings->setValue("UseKeywords", UseKeywords);
settings->setValue("KeyWordsFile", KeyWordsFile);
settings->setValue("AlertInterval", AlertInterval);
settings->setValue("CurrentHost", SavedHost); settings->setValue("CurrentHost", SavedHost);
settings->setValue("YAPPPath", YAPPPath); settings->setValue("YAPPPath", YAPPPath);
@ -3748,9 +3799,17 @@ void QtTermTCP::MyTimerSlot()
} }
extern "C" void myBeep() extern "C" void myBeep(QString * WAV)
{ {
QApplication::beep(); if (useBeep)
{
QApplication::beep();
return;
}
// Using .wav files
QSound::play(*WAV);
} }
void QtTermTCP::ListenSlot() void QtTermTCP::ListenSlot()
@ -3770,6 +3829,7 @@ void QtTermTCP::AGWSlot()
} }
Ui_Dialog * Dev; Ui_Dialog * Dev;
Ui_AlertDialog * Alert;
static Ui_KISSDialog * KISS; static Ui_KISSDialog * KISS;
static Ui_ColourDialog * COLOURS; static Ui_ColourDialog * COLOURS;
@ -3923,6 +3983,113 @@ void QtTermTCP::KISSreject()
} }
void QtTermTCP::AlertSlot()
{
// This runs the VARA Configuration dialog
Alert = new(Ui_AlertDialog);
QDialog UI;
Alert->setupUi(&UI);
UI.setFont(*menufont);
deviceUI = &UI;
Alert->Bells->setChecked(Bells);
Alert->InboundBeep->setChecked(ConnectBeep);
Alert->InactivityBeep->setChecked(AlertBeep);
Alert->Interval->setText(QString::number(AlertInterval));
Alert->KeywordBeep->setChecked(UseKeywords);
Alert->keywordFile->setText(KeyWordsFile);
Alert->useBeep->setChecked(useBeep);
Alert->useFiles->setChecked(!useBeep);
Alert->connectFile->setText(ConnectWAV);
Alert->bellsFile->setText(BellWAV);
Alert->intervalFile->setText(IntervalWAV);
Alert->keywordWAV->setText(AlertWAV);
QObject::connect(Alert->chooseInbound, SIGNAL(clicked()), this, SLOT(chooseInboundWAV()));
QObject::connect(Alert->chooseBells, SIGNAL(clicked()), this, SLOT(chooseBellsWAV()));
QObject::connect(Alert->chooseInterval, SIGNAL(clicked()), this, SLOT(chooseIntervalWAV()));
QObject::connect(Alert->chooseKeyAlert, SIGNAL(clicked()), this, SLOT(chooseAlertWAV()));
QObject::connect(Alert->okButton, SIGNAL(clicked()), this, SLOT(alertAccept()));
QObject::connect(Alert->cancelButton, SIGNAL(clicked()), this, SLOT(alertReject()));
UI.exec();
}
void QtTermTCP::chooseInboundWAV()
{
ConnectWAV = QFileDialog::getOpenFileName(this,
tr("Select Wav"), "", tr("Sound Files (*.wav)"));
Alert->connectFile->setText(ConnectWAV);
}
void QtTermTCP::chooseBellsWAV()
{
BellWAV = QFileDialog::getOpenFileName(this,
tr("Select Wav"), "", tr("Sound Files (*.wav)"));
Alert->bellsFile->setText(BellWAV);
}
void QtTermTCP::chooseIntervalWAV()
{
IntervalWAV = QFileDialog::getOpenFileName(this,
tr("Select Wav"), "", tr("Sound Files (*.wav)"));
Alert->intervalFile->setText(IntervalWAV);
}
void QtTermTCP::chooseAlertWAV()
{
AlertWAV = QFileDialog::getOpenFileName(this,
tr("Select Wav"), "", tr("Sound Files (*.wav)"));
Alert->keywordWAV->setText(AlertWAV);
}
void QtTermTCP::alertAccept()
{
QVariant Q;
useBeep = Alert->useBeep->isChecked();
Bells = Alert->Bells->isChecked();
ConnectBeep = Alert->InboundBeep->isChecked();
AlertBeep = Alert->InactivityBeep->isChecked();
AlertInterval = Alert->Interval->text().toInt();
UseKeywords = Alert->KeywordBeep->isChecked();
KeyWordsFile = Alert->keywordFile->text();
ConnectWAV = Alert->connectFile->text();
BellWAV = Alert->bellsFile->text();
IntervalWAV = Alert->intervalFile->text();
AlertWAV = Alert->keywordWAV->text();
delete(Alert);
SaveSettings();
deviceUI->accept();
}
void QtTermTCP::alertReject()
{
delete(Alert);
deviceUI->reject();
}
@ -4289,7 +4456,7 @@ void QtTermTCP::onNewConnection()
WritetoOutputWindow(Sess, (unsigned char *)Msg, (int)strlen(Msg)); WritetoOutputWindow(Sess, (unsigned char *)Msg, (int)strlen(Msg));
if (ConnectBeep) if (ConnectBeep)
myBeep(); myBeep(&ConnectWAV);
} }
void QtTermTCP::onSocketStateChanged(QAbstractSocket::SocketState socketState) void QtTermTCP::onSocketStateChanged(QAbstractSocket::SocketState socketState)
@ -6419,7 +6586,7 @@ extern "C" Ui_ListenSession * ax25IncommingConnect(TAX25Port * AX25Sess)
setMenus(true); setMenus(true);
if (ConnectBeep) if (ConnectBeep)
myBeep(); myBeep(&ConnectWAV);
// Send CText if defined // Send CText if defined
@ -7198,34 +7365,37 @@ void DecodeTeleText(Ui_ListenSession * Sess, char * page)
// Just write char at current col and line // Just write char at current col and line
isText: isText:
char s[5] = " "; char s[5];
unsigned char su[5] = "";
// Some chars are in wrong char set // Some chars are in wrong char set
s[0] = ch; su[0] = ch;
if (ch == '_') if (ch == '_')
s[0] = '#'; su[0] = '#';
else if (ch == 0x7e) // division else if (ch == 0x7e) // division
{ {
s[0] = 0xC3; su[0] = 0xC3;
s[1] = 0xB7; su[1] = 0xB7;
} }
else if (ch == 0x5e) // up arrow else if (ch == 0x5e) // up arrow
{ {
s[0] = 0xF0; su[0] = 0xF0;
s[1] = 0x9F; su[1] = 0x9F;
s[2] = 0xA0; su[2] = 0xA0;
s[3] = 0x95; su[3] = 0x95;
} }
else if (ch == 0x7f) // up arrow else if (ch == 0x7f) // up arrow
{ {
s[0] = 0xE2; su[0] = 0xE2;
s[1] = 0x96; su[1] = 0x96;
s[2] = 0x88; su[2] = 0x88;
} }
memcpy(s, su, 5);
// if (doubleHeight) // if (doubleHeight)
// p.drawText(col * 15, line * 19 + 25, s); // p.drawText(col * 15, line * 19 + 25, s);
// else // else

@ -2,7 +2,7 @@
#include <QMainWindow> #include <QMainWindow>
#include "ui_QtTermTCP.h" #include "ui_QtTermTCP.h"
//#include "ui_AGWParams.h" #include "ui_AlertSetup.h"
#include "ui_YAPPRxSize.h" #include "ui_YAPPRxSize.h"
#include "ui_ColourConfig.h" #include "ui_ColourConfig.h"
#include "ui_VARAConfig.h" #include "ui_VARAConfig.h"
@ -28,6 +28,7 @@
#include <QMenuBar> #include <QMenuBar>
#include <QProcess> #include <QProcess>
#include <QtSerialPort/QSerialPort> #include <QtSerialPort/QSerialPort>
#include <QtMultimedia/QSound>
#define MAXHOSTS 16 #define MAXHOSTS 16
#define MAXPORTS 64 #define MAXPORTS 64
@ -152,6 +153,13 @@ private slots:
void KISSTimerSlot(); void KISSTimerSlot();
void ListenSlot(); void ListenSlot();
void AGWSlot(); void AGWSlot();
void AlertSlot();
void chooseInboundWAV();
void chooseBellsWAV();
void chooseIntervalWAV();
void chooseAlertWAV();
void alertAccept();
void alertReject();
void VARASlot(); void VARASlot();
void KISSSlot(); void KISSSlot();
void deviceaccept(); void deviceaccept();
@ -248,6 +256,7 @@ private:
QAction *AGWAction; QAction *AGWAction;
QAction *VARAAction; QAction *VARAAction;
QAction *KISSAction; QAction *KISSAction;
QAction *AlertAction;
QAction *quitAction; QAction *quitAction;
QList<myTcpSocket*> _sockets; QList<myTcpSocket*> _sockets;
@ -269,15 +278,19 @@ extern "C"
void setTraceOff(Ui_ListenSession * Sess); void setTraceOff(Ui_ListenSession * Sess);
void SetPortMonLine(int i, char * Text, int visible, int enabled); void SetPortMonLine(int i, char * Text, int visible, int enabled);
void SaveSettings(); void SaveSettings();
void myBeep(); void myBeep(QString * WAV);
void YAPPSendFile(Ui_ListenSession * Sess, char * FN); void YAPPSendFile(Ui_ListenSession * Sess, char * FN);
int SocketSend(Ui_ListenSession * Sess, char * Buffer, int len); int SocketSend(Ui_ListenSession * Sess, char * Buffer, int len);
void SendTraceOptions(Ui_ListenSession * Sess); void SendTraceOptions(Ui_ListenSession * Sess);
int SocketFlush(Ui_ListenSession * Sess); int SocketFlush(Ui_ListenSession * Sess);
extern void mySleep(int ms); extern void mySleep(int ms);
extern void setTraceOff(Ui_ListenSession * Sess); extern void setTraceOff(Ui_ListenSession * Sess);
void GetKeyWordFile();
} }
extern QString ConnectWAV;
extern QString BellWAV;
extern QString AlertWAV;
char * strlop(char * buf, char delim); char * strlop(char * buf, char delim);
extern "C" void setMenus(int State); extern "C" void setMenus(int State);

@ -1,123 +0,0 @@
[General]
HostParams0=nottm.g8bpq.net|8011|gm8bpq|password|5 1 1 0 1 0 0 1\r|Pogo4
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\xb6\0\0\0w\0\0\x4J\0\0\x3.\0\0\0\xb6\0\0\0w\0\0\x4J\0\0\x3.\0\0\0\0\0\0\0\0\x5\0\0\0\0\xb6\0\0\0w\0\0\x4J\0\0\x3.)
HostParams1=192.168.1.63|8011|john|password||Pogo2
windowState=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\0\0\0\x3\x95\0\0\x2\xa2\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\x1\0\0\0\x3\0\0\0\x1\0\0\0\x16\0m\0\x61\0i\0n\0T\0o\0o\0l\0\x62\0\x61\0r\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0)
HostParams2=127.0.0.1|8011|john|password|1 1 1 0 1 0 0 1\r|
HostParams3=192.168.1.44|8011|john|password|1 1 1 0 1 0 0 1\r|Pogo4
HostParams4=127.0.0.1|8021|john|password|c000000100000006 1 1 0 1 0 0 1\r|LinBPQ
HostParams5=192.168.1.14|8011|john|password|c00000010000002e 1 1 0 1 0 0 1\r|
HostParams6=127.0.0.1|8121|john|password|3 1 1 0 1 0 0 1\r|CB
HostParams7=|0||||
HostParams8=|0||||
HostParams9=|0||||
HostParams10=|0||||
HostParams11=|0||||
HostParams12=|0||||
HostParams13=|0||||
HostParams14=|0||||
HostParams15=|0||||
Split=58
ChatMode=1
AutoTeletext=1
Bells=1
StripLF=1
AlertBeep=1
ConnectBeep=1
CurrentHost=3 2 3 2 0 0 0 0 0 0
YAPPPath=
listenPort=8015
listenEnable=1
listenCText=[PMS-2.3-C]\rHello>\r
convUTF8=0
PTT=None
PTTBAUD=0
PTTMode=1
CATHex=1
PTTOffString=
PTTOnString=
pttGPIOPin=17
pttGPIOPinR=17
CM108Addr=0xD8C:0x08
HamLibPort=4532
HamLibHost=127.0.0.1
FLRigPort=12345
FLRigHost=127.0.0.1
AGWEnable=0
AGWMonEnable=1
AGWTermCall=G8BPQ
AGWBeaconDest=
AGWBeaconPath=
AGWBeaconInterval=0
AGWBeaconPorts=
AGWBeaconText=
AGWHost=127.0.0.1
AGWPort=8001
AGWPaclen=80
AGWToCalls=G8BPQ-2, SWITCH,
KISSEnable=0
MYCALL=GM8BPQ
KISSHost=127.0.0.1
KISSMode=0
KISSPort=8110
KISSSerialPort=TCP
KISSBAUD=19200
VARAEnable=0
VARATermCall=G8BPQ
VARAHost=127.0.0.1
VARAPort=8310
VARAPath=C:\\VARA\\VARA.exe
VARAHostHF=127.0.0.1
VARAPortHF=8310
VARAPathHF=C:\\VARA\\VARA.exe
VARAHostFM=127.0.0.1
VARAPortFM=8300
VARAPathFM=C:\\VARA\\VARAFM.exe
VARAHostSAT=127.0.0.1
VARAPortSAT=8300
VARAPathSAT=C:\\VARA\\VARASAT.exe
VARA500=0
VARA2300=1
VARA2750=0
VARAHF=1
VARAFM=0
VARASAT=0
monBackground=@Variant(\0\0\0\x43\x1\xff\xff\xff\xff\xff\xff\xff\xff\0\0)
monRxText=@Variant(\0\0\0\x43\x1\xff\xff\0\0\0\0\xff\xff\0\0)
monTxText=@Variant(\0\0\0\x43\x1\xff\xff\xff\xff\0\0\0\0\0\0)
monOtherText=@Variant(\0\0\0\x43\x1\xff\xff\0\0\0\0\0\0\0\0)
termBackground=@Variant(\0\0\0\x43\x1\xff\xff\xff\xff\xff\xff\xff\xff\0\0)
outputText=@Variant(\0\0\0\x43\x1\xff\xff\0\0\0\0\xff\xff\0\0)
EchoText=@Variant(\0\0\0\x43\x1\xff\xff\0\0\0\0\0\0\0\0)
WarningText=@Variant(\0\0\0\x43\x1\xff\xff\xff\xff\0\0\0\0\0\0)
inputBackground=@Variant(\0\0\0\x43\x1\xff\xff\xff\xff\xff\xff\xff\xff\0\0)
inputText=@Variant(\0\0\0\x43\x1\xff\xff\0\0\0\0\0\0\0\0)
TermMode=2
singlemodeFormat=3
FontFamily=Courier
PointSize=10
Weight=50
Sessions="4|1, 3, 57, 19, 633, 795|2, 2, 18, 42, 605, 833|1, 3, 20, 410, 611, 1201|3, 2, 32, 598, 623, 1389|"
VARAInit="P2P SESSION,WINLINK SESSION"
MaxRXSize=100000
AutoConnect=1 1 1 0 0 0 0 0 0 0
TabType=1 3 3 1 1 1 1 2 2 0
[AX25_A]
Retries=10
Maxframe=4
Paclen=128
FrackTime=8
IdleTime=180
SlotTime=100
Persist=128
RespTime=1500
TXFrmMode=1
FrameCollector=6
ExcludeCallsigns=
ExcludeAPRSFrmType=
KISSOptimization=0
DynamicFrack=0
BitRecovery=0
IPOLL=80
MyDigiCall=

@ -3,6 +3,7 @@ QT += core gui
QT += network QT += network
QT += widgets QT += widgets
QT += serialport QT += serialport
QT += multimedia
TARGET = QtTermTCP TARGET = QtTermTCP
@ -41,7 +42,8 @@ FORMS += QtTermTCP.ui\
KISSConfig.ui \ KISSConfig.ui \
ColourConfig.ui \ ColourConfig.ui \
YAPPRxSize.ui \ YAPPRxSize.ui \
AGWConnect.ui AGWConnect.ui \
AlertSetup.ui
RESOURCES += QtTermTCP.qrc RESOURCES += QtTermTCP.qrc

@ -22,7 +22,7 @@
<ProjectGuid>{14F3B24E-473C-324E-A99D-3B679FCF5F67}</ProjectGuid> <ProjectGuid>{14F3B24E-473C-324E-A99D-3B679FCF5F67}</ProjectGuid>
<RootNamespace>QtTermTCP</RootNamespace> <RootNamespace>QtTermTCP</RootNamespace>
<Keyword>QtVS_v304</Keyword> <Keyword>QtVS_v304</Keyword>
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion> <WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.19041.0</WindowsTargetPlatformMinVersion> <WindowsTargetPlatformMinVersion>10.0.19041.0</WindowsTargetPlatformMinVersion>
<QtMsBuild Condition="'$(QtMsBuild)'=='' or !Exists('$(QtMsBuild)\qt.targets')">$(MSBuildProjectDirectory)\QtMsBuild</QtMsBuild> <QtMsBuild Condition="'$(QtMsBuild)'=='' or !Exists('$(QtMsBuild)\qt.targets')">$(MSBuildProjectDirectory)\QtMsBuild</QtMsBuild>
</PropertyGroup> </PropertyGroup>
@ -153,7 +153,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalDependencies>shell32.lib;setupapi.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>shell32.lib;setupapi.lib;C:\Qt\5.14.2\msvc2017\lib\Qt5Multimedia.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.7.25-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.7.25-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>-no-pie "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>-no-pie "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
<DataExecutionPrevention>true</DataExecutionPrevention> <DataExecutionPrevention>true</DataExecutionPrevention>
@ -279,7 +279,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalDependencies>shell32.lib;setupapi.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>shell32.lib;setupapi.lib;%(AdditionalDependencies);C:\Qt\5.14.2\msvc2017\lib\Qt5Multimediad.lib</AdditionalDependencies>
<AdditionalLibraryDirectories>C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.7.25-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.7.25-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>-no-pie "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>-no-pie "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
<DataExecutionPrevention>true</DataExecutionPrevention> <DataExecutionPrevention>true</DataExecutionPrevention>
@ -435,6 +435,7 @@
</QtUic> </QtUic>
<QtUic Include="AGWParams.ui"> <QtUic Include="AGWParams.ui">
</QtUic> </QtUic>
<QtUic Include="AlertSetup.ui" />
<QtUic Include="ColourConfig.ui" /> <QtUic Include="ColourConfig.ui" />
<QtUic Include="KISSConfig.ui"> <QtUic Include="KISSConfig.ui">
</QtUic> </QtUic>

@ -83,7 +83,7 @@
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</QtMoc> </QtMoc>
<QtMoc Include="TabDialog.h"> <QtMoc Include="TabDialog.h">
<Filter>Header Files</Filter> <Filter>Generated Files</Filter>
</QtMoc> </QtMoc>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -95,28 +95,31 @@
</CustomBuild> </CustomBuild>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<QtUic Include="AGWConnect.ui"> <QtUic Include="AGWParams.ui">
<Filter>Form Files</Filter> <Filter>Form Files</Filter>
</QtUic> </QtUic>
<QtUic Include="AGWParams.ui"> <QtUic Include="QtTermTCP.ui">
<Filter>Form Files</Filter> <Filter>Form Files</Filter>
</QtUic> </QtUic>
<QtUic Include="KISSConfig.ui"> <QtUic Include="VARAConfig.ui">
<Filter>Form Files</Filter> <Filter>Form Files</Filter>
</QtUic> </QtUic>
<QtUic Include="ListenPort.ui"> <QtUic Include="ColourConfig.ui">
<Filter>Form Files</Filter> <Filter>Form Files</Filter>
</QtUic> </QtUic>
<QtUic Include="QtTermTCP.ui"> <QtUic Include="YAPPRxSize.ui">
<Filter>Form Files</Filter> <Filter>Form Files</Filter>
</QtUic> </QtUic>
<QtUic Include="VARAConfig.ui"> <QtUic Include="AGWConnect.ui">
<Filter>Form Files</Filter> <Filter>Form Files</Filter>
</QtUic> </QtUic>
<QtUic Include="ColourConfig.ui"> <QtUic Include="ListenPort.ui">
<Filter>Form Files</Filter> <Filter>Form Files</Filter>
</QtUic> </QtUic>
<QtUic Include="YAPPRxSize.ui"> <QtUic Include="KISSConfig.ui">
<Filter>Form Files</Filter>
</QtUic>
<QtUic Include="AlertSetup.ui">
<Filter>Form Files</Filter> <Filter>Form Files</Filter>
</QtUic> </QtUic>
</ItemGroup> </ItemGroup>

@ -1,6 +1,13 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerWorkingDirectory>..\..\bpq32\CommonSource</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerWorkingDirectory>..\..\..\..\..\DevProgs\BPQ32</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<QtLastBackgroundBuild>2022-05-19T07:28:47.9186341Z</QtLastBackgroundBuild> <QtLastBackgroundBuild>2022-05-19T07:28:47.9186341Z</QtLastBackgroundBuild>
</PropertyGroup> </PropertyGroup>
@ -8,15 +15,15 @@
<QtLastBackgroundBuild>2022-05-19T07:28:58.9302359Z</QtLastBackgroundBuild> <QtLastBackgroundBuild>2022-05-19T07:28:58.9302359Z</QtLastBackgroundBuild>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<QtLastBackgroundBuild>2023-08-17T19:39:18.4928536Z</QtLastBackgroundBuild> <QtLastBackgroundBuild>2023-10-09T09:12:25.3524292Z</QtLastBackgroundBuild>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="QtSettings"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="QtSettings">
<QtLastBackgroundBuild>2023-08-17T19:39:18.5988572Z</QtLastBackgroundBuild> <QtLastBackgroundBuild>2023-10-09T09:12:25.6116327Z</QtLastBackgroundBuild>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<QtLastBackgroundBuild>2023-08-17T19:39:18.2968480Z</QtLastBackgroundBuild> <QtLastBackgroundBuild>2023-10-09T09:12:25.0706672Z</QtLastBackgroundBuild>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
<QtLastBackgroundBuild>2023-08-17T19:39:18.3758517Z</QtLastBackgroundBuild> <QtLastBackgroundBuild>2023-10-09T09:12:25.2024312Z</QtLastBackgroundBuild>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

Binary file not shown.

@ -56,12 +56,12 @@ TCHAR AlertFileName[256] = { 0 };
int ConnectBeep = TRUE; int ConnectBeep = TRUE;
int UseKeywords = TRUE; int UseKeywords = TRUE;
char KeyWordsName[MAX_PATH] = "Keywords.sys"; QString KeyWordsFile = "Keywords.sys";
char ** KeyWords = NULL; char ** KeyWords = NULL;
int NumberofKeyWords = 0; int NumberofKeyWords = 0;
// YAPP stuff // YAPP stuff
#define SOH 1 #define SOH 1
@ -112,6 +112,97 @@ char * strlop(char * buf, char delim)
return ptr; return ptr;
} }
#ifdef WIN32
char * strcasestr(char *ch1, char *ch2)
{
char *chN1, *chN2;
char *chNdx;
char *chRet = NULL;
chN1 = _strdup(ch1);
chN2 = _strdup(ch2);
if (chN1 && chN2)
{
chNdx = chN1;
while (*chNdx)
{
*chNdx = (char)tolower(*chNdx);
chNdx++;
}
chNdx = chN2;
while (*chNdx)
{
*chNdx = (char)tolower(*chNdx);
chNdx++;
}
chNdx = strstr(chN1, chN2);
if (chNdx)
chRet = ch1 + (chNdx - chN1);
}
free(chN1);
free(chN2);
return chRet;
}
#endif
void GetKeyWordFile()
{
DWORD FileSize;
char * ptr1, *ptr2;
char * KeyWordFile;
QFile file(KeyWordsFile);
if (!file.open(QIODevice::ReadOnly))
{
if (UseKeywords) // Don't need to alert if not being used
{
QMessageBox msgBox;
msgBox.setText("Keyword File " + KeyWordsFile + " not found");
msgBox.exec();
}
return;
}
FileSize = file.size();
KeyWordFile = (char *)malloc(FileSize + 1);
file.read(KeyWordFile, FileSize);
file.close();
KeyWordFile[FileSize] = 0;
ptr1 = KeyWordFile;
while (ptr1)
{
if (*ptr1 == '\n') ptr1++;
ptr2 = strtok_s(NULL, "\r\n", &ptr1);
if (ptr2)
{
if (*ptr2 != '#')
{
KeyWords = (char **)realloc(KeyWords, (++NumberofKeyWords + 1) * 4);
KeyWords[NumberofKeyWords] = ptr2;
}
}
else
break;
}
}
int CheckKeyWord(char * Word, char * Msg) int CheckKeyWord(char * Word, char * Msg)
{ {
char * ptr1 = Msg, *ptr2; char * ptr1 = Msg, *ptr2;
@ -119,7 +210,7 @@ int CheckKeyWord(char * Word, char * Msg)
while (*ptr1) // Stop at end while (*ptr1) // Stop at end
{ {
ptr2 = strstr(ptr1, Word); ptr2 = strcasestr(ptr1, Word);
if (ptr2 == NULL) if (ptr2 == NULL)
return FALSE; // OK return FALSE; // OK
@ -140,21 +231,16 @@ int CheckKeyWord(char * Word, char * Msg)
int CheckKeyWords(UCHAR * Msg, int len) int CheckKeyWords(UCHAR * Msg, int len)
{ {
char dupMsg[2048];
int i; int i;
if (UseKeywords == 0 || NumberofKeyWords == 0) if (UseKeywords == 0 || NumberofKeyWords == 0)
return FALSE; return FALSE;
memcpy(dupMsg, Msg, len);
dupMsg[len] = 0;
//_strlwr(dupMsg);
for (i = 1; i <= NumberofKeyWords; i++) for (i = 1; i <= NumberofKeyWords; i++)
{ {
if (CheckKeyWord(KeyWords[i], dupMsg)) if (CheckKeyWord(KeyWords[i], (char *)Msg))
{ {
// Beep(660, 250); myBeep(&AlertWAV);
return TRUE; // Alert return TRUE; // Alert
} }
} }

@ -1,7 +1,7 @@
#define _MSC_EXTENSIONS #define _MSC_EXTENSIONS
#define _INTEGRAL_MAX_BITS 64 #define _INTEGRAL_MAX_BITS 64
#define _MSC_VER 1916 #define _MSC_VER 1916
#define _MSC_FULL_VER 191627043 #define _MSC_FULL_VER 191627045
#define _MSC_BUILD 0 #define _MSC_BUILD 0
#define _WIN32 #define _WIN32
#define _M_IX86 600 #define _M_IX86 600

Binary file not shown.

@ -0,0 +1,297 @@
#pragma once
#include <QMainWindow>
#include "ui_QtTermTCP.h"
#include "ui_AlertSetup.h"
#include "ui_YAPPRxSize.h"
#include "ui_ColourConfig.h"
#include "ui_VARAConfig.h"
#include "ui_KISSConfig.h"
#include "QTextEdit"
#include "QSplitter"
#include "QLineEdit"
#include "QTcpSocket"
#include <QDataStream>
#include <QKeyEvent>
#include "QThread"
#include "QTcpServer"
#include "QMdiArea"
#include <QMdiSubWindow>
#include "QMessageBox"
#include "QTimer"
#include "QSettings"
#include "QThread"
#include <QFontDialog>
#include <QScrollBar>
#include <QFileDialog>
#include <QTabWidget>
#include <QMenuBar>
#include <QProcess>
#include <QtSerialPort/QSerialPort>
#include <QtMultiMedia/QSound>
#define MAXHOSTS 16
#define MAXPORTS 64
QT_BEGIN_NAMESPACE
class QComboBox;
class QLabel;
class QLineEdit;
class QPushButton;
class QTcpSocket;
class QNetworkSession;
class myTcpSocket : public QTcpSocket
{
public:
QWidget * Sess;
};
class Ui_ListenSession : public QMainWindow
{
Q_OBJECT
public:
explicit Ui_ListenSession(QWidget *Parent = 0) : QMainWindow(Parent) {}
~Ui_ListenSession();
int SessionType; // Type Mask - Term, Mon, Listen
int CurrentWidth;
int CurrentHeight; // Saved so can be restored after Cascade
QTextEdit *termWindow;
QTextEdit *monWindow;
QLineEdit *inputWindow;
QLabel * TTLabel;
myTcpSocket *clientSocket;
QAction * actActivate; // From active Windows menu
char * KbdStack[50];
int StackIndex;
QMdiSubWindow *sw; // The MdiSubwindow is the container for this session
int InputMode;
int SlowTimer;
int MonData;
int OutputSaveLen;
char OutputSave[16384];
int MonSaveLen;
char MonSave[4096];
char PortMonString[2048]; // 64 ports 32 Bytes
uint64_t portmask;
int mtxparam;
int mcomparam;
int monUI;
int MonitorNODES;
int MonitorColour;
int CurrentHost;
int Tab; // Tab Index if Tabbed Mode
void * AGWSession; // Terinal sess - Need to cast to TAGWPort to use it
void * AGWMonSession;
void * KISSSession;
int KISSMode; // Connected or UI
char UIDEST[32];
char UIPATH[128];
// For Teletext Emulator
QImage * TTBitmap; // TT Image buffer
QDialog TTUI;
int TTActive;
int TTFlashToggle;
char pageBuffer[4096];
QBasicTimer timer;
protected:
void timerEvent(QTimerEvent *event) override;
private:
private slots:
};
class QtTermTCP : public QMainWindow
{
Q_OBJECT
public:
QtTermTCP(QWidget *parent = NULL);
void closeEvent(QCloseEvent * event);
static void setFonts();
~QtTermTCP();
private slots:
void Disconnect();
void doYAPPSend();
void doYAPPSetRX();
void doYAPPSetSize();
void sizeaccept();
void sizereject();
void menuChecked();
void Connect();
void displayError(QAbstractSocket::SocketError socketError);
void readyRead();
void showContextMenu(const QPoint & point);
void autoConnectChecked();
void LreturnPressed(Ui_ListenSession * LUI);
void LDisconnect(Ui_ListenSession * LUI);
void SetupHosts();
void MyTimerSlot();
void KISSTimerSlot();
void ListenSlot();
void AGWSlot();
void AlertSlot();
void chooseInboundWAV();
void chooseBellsWAV();
void chooseIntervalWAV();
void chooseAlertWAV();
void alertAccept();
void alertReject();
void VARASlot();
void KISSSlot();
void deviceaccept();
void KISSaccept();
void KISSreject();
void devicereject();
void showContextMenuM(const QPoint &pt);
void showContextMenuT(const QPoint &pt);
void showContextMenuL();
void doQuit();
void onTEselectionChanged();
void onLEselectionChanged();
void setSplit();
void ClearScreen();
void setVDMode();
void showContextMenuMT(const QPoint & pt);
void showContextMenuMOnly(const QPoint & pt);
void onNewConnection();
void onSocketStateChanged(QAbstractSocket::SocketState socketState);
void updateWindowMenu();
void doNewTerm();
void doNewMon();
void doNewCombined();
void doCascade();
void actActivate();
void xon_mdiArea_changed();
void doFonts();
void doMFonts();
void ConnecttoVARA();
void VARATimer();
void AGWdisplayError(QAbstractSocket::SocketError socketError);
void AGWreadyRead();
void onAGWSocketStateChanged(QAbstractSocket::SocketState socketState);
void VARAdisplayError(QAbstractSocket::SocketError socketError);
void VARAreadyRead();
void onVARASocketStateChanged(QAbstractSocket::SocketState socketState);
void KISSdisplayError(QAbstractSocket::SocketError socketError);
void KISSreadyRead();
void onKISSSocketStateChanged(QAbstractSocket::SocketState socketState);
int openSerialPort();
void readSerialData();
void handleError(QSerialPort::SerialPortError serialPortError);
void doColours();
void ColourPressed();
void Colouraccept();
void Colourreject();
QColor setColor(QColor Colour);
void VARADatadisplayError(QAbstractSocket::SocketError socketError);
void VARADatareadyRead();
void onVARADataSocketStateChanged(QAbstractSocket::SocketState socketState);
void HAMLIBdisplayError(QAbstractSocket::SocketError socketError);
void HAMLIBreadyRead();
void onHAMLIBSocketStateChanged(QAbstractSocket::SocketState socketState);
void ConnecttoHAMLIB();
void HAMLIBSetPTT(int PTTState);
void FLRigdisplayError(QAbstractSocket::SocketError socketError);
void FLRigreadyRead();
void onFLRigSocketStateChanged(QAbstractSocket::SocketState socketState);
void ConnecttoFLRig();
void FLRigSetPTT(int PTTState);
void CATChanged(bool State);
void PTTPortChanged(int Selected);
void OpenPTTPort();
void RadioPTT(bool PTTState);
void tabSelected(int);
void VARAHFChanged(bool state);
void VARAFMChanged(bool State);
void VARASATChanged(bool State);
void SetVARAParams();
protected:
bool eventFilter(QObject* obj, QEvent *event);
private:
void ConnecttoAGW();
void AGWTimer();
Ui::QtTermTCPClass ui;
QMenu *hostsubMenu;
QAction *closeAct;
QAction *closeAllAct;
QAction *tileAct;
QAction *cascadeAct;
QAction *nextAct;
QAction *previousAct;
QAction *windowMenuSeparatorAct;
QAction *newTermAct;
QAction *newMonAct;
QAction *newCombinedAct;
QAction *AGWAction;
QAction *VARAAction;
QAction *KISSAction;
QAction *AlertAction;
QAction *quitAction;
QList<myTcpSocket*> _sockets;
QWidget *centralWidget;
void ConnecttoKISS();
void KISSTimer();
};
extern "C"
{
void EncodeSettingsLine(int n, char * String);
void DecodeSettingsLine(int n, char * String);
void WritetoOutputWindow(Ui_ListenSession * Sess, unsigned char * Buffer, int Len);
void WritetoOutputWindowEx(Ui_ListenSession * Sess, unsigned char * Buffer, int len, QTextEdit * termWindow, int *OutputSaveLen, char * OutputSave, QColor Colour);
void WritetoMonWindow(Ui_ListenSession * Sess, unsigned char * Buffer, int Len);
void ProcessReceivedData(Ui_ListenSession * Sess, unsigned char * Buffer, int len);
void SendTraceOptions(Ui_ListenSession * LUI);
void setTraceOff(Ui_ListenSession * Sess);
void SetPortMonLine(int i, char * Text, int visible, int enabled);
void SaveSettings();
void myBeep(QString * WAV);
void YAPPSendFile(Ui_ListenSession * Sess, char * FN);
int SocketSend(Ui_ListenSession * Sess, char * Buffer, int len);
void SendTraceOptions(Ui_ListenSession * Sess);
int SocketFlush(Ui_ListenSession * Sess);
extern void mySleep(int ms);
extern void setTraceOff(Ui_ListenSession * Sess);
void GetKeyWordFile();
}
extern QString ConnectWAV;
extern QString BellWAV;
extern QString AlertWAV;
char * strlop(char * buf, char delim);
extern "C" void setMenus(int State);
void Send_AGW_Ds_Frame(void * AGW);

@ -1,10 +1,10 @@
cp --preserve /mnt/Source/QT/QtTermTCP/*.cpp ./ cp --preserve /mnt/Source/QT/QtTermTCP2/*.cpp ./
cp --preserve /mnt/Source/QT/QtTermTCP/*.c ./ cp --preserve /mnt/Source/QT/QtTermTCP2/*.c ./
cp --preserve /mnt/Source/QT/QtTermTCP/*.h ./ cp --preserve /mnt/Source/QT/QtTermTCP2/*.h ./
cp --preserve /mnt/Source/QT/QtTermTCP/*.ui ./ cp --preserve /mnt/Source/QT/QtTermTCP2/*.ui ./
cp --preserve /mnt/Source/QT/QtTermTCP/*.pro ./ cp --preserve /mnt/Source/QT/QtTermTCP2/*.pro ./
cp --preserve /mnt/Source/QT/QtTermTCP/*.qrc ./ cp --preserve /mnt/Source/QT/QtTermTCP2/*.qrc ./
cp --preserve /mnt/Source/QT/QtTermTCP/*.ico ./ cp --preserve /mnt/Source/QT/QtTermTCP2/*.ico ./
qmake qmake
make -j4 make -j4

@ -1,7 +1,7 @@
#define _MSC_EXTENSIONS #define _MSC_EXTENSIONS
#define _INTEGRAL_MAX_BITS 64 #define _INTEGRAL_MAX_BITS 64
#define _MSC_VER 1916 #define _MSC_VER 1916
#define _MSC_FULL_VER 191627043 #define _MSC_FULL_VER 191627045
#define _MSC_BUILD 0 #define _MSC_BUILD 0
#define _WIN32 #define _WIN32
#define _M_IX86 600 #define _M_IX86 600

Loading…
Cancel
Save

Powered by TurnKey Linux.