diff --git a/Makefile b/Makefile
index 5e09eeb..b7da336 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,7 @@ clean:
rm -rf src/backup
rm -f -v src/richmemo/*.o src/richmemo/*.ppu src/richmemo/gtk2/*.ppu src/richmemo/gtk2/*.o
rm -f -v tools/adif_hash_generator tools/adif_hash_generator.lpi tools/adif_hash_generator.lps
+ rm -rf /tmp/.lazarus
install:
install -d -v $(bindir)
diff --git a/README.md b/README.md
index 13c3316..19b80c2 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,13 @@
+About this "Alpha" version by OH1KH
+---------------
+This is a clone of Cqrlog source with some additons of my own.
+From folder "compiled" you find ready compiled binary files against official Cqrlog and for this "local_testing" source.
+There is also "newupdate.zip" that includes "newupdate.sh", a script that does Cqrlog backup and update for you with selected binary file.
+Same folder has also README.md that holds further informations.
+
+
+
+
What is CQRLOG?
---------------
diff --git a/compiled/README.md b/compiled/README.md
new file mode 100755
index 0000000..eb258f3
--- /dev/null
+++ b/compiled/README.md
@@ -0,0 +1,228 @@
+
+ #### NOTE: Upgrading to 2.6.0.(115) ,or higer, will change database table "cqrlog_common" to version 6.
+ If you return back to previous cqrlog version you need to restore the database.
+( if you used newupdate.sh it is to copy backup foder ~/.config/cqrlog-YYYYMMDD-HHMMSS to name ~/.config/cqrlog )
+
+ #### NOTE: For now on alpha test binaries beginning from 2.6.0.(107) are compiled using system that has GLIBC version 2.35.
+If you can not start Cqrlog after update check your GLIBC version with command console: ***ldd --version***
+Update GLIBC if it is below 2.3.5.
+If you do not want to do that you can compile this source (see 1 folder up) with your current OS version and get it running.
+Note that the source version is usually one step higher than ready compiled versions.
+
+ #### NOTE: At the moment there is no new official version source release. That is why Alpha (119) is ***VERY far ahead*** from official.
+From [Changelog](https://htmlpreview.github.io/?https://github.com/OH1KH/cqrlog/blob/loc_testing/src/changelog.html)
+you can see all changes. It appears also at first start of (119), and can be accessed via "Help" when Cqrlog is running.
+
+
+Latest cqrlog alpha test binaries can be found from this folder.
+This folder holds ready compiled binary files of source "loc_testing" that is the version of cqrlog that I am using myself daily.
+They contain all accepted pull requests from official source (that may not be released offically yet) plus some test code that is not pull requested yet (and may not be pull requested ever)
+
+## ABOUT THESE BINARIES:
+ These binaries (cqr0,cqr1,cqr4 zips) include latest official source having updates up to commit:
+
+ Commits on Jul 24, 2022 Merge pull request #529 from OH1KH/direct_load_filter
+
+ Binaries (cqr2,cqr3,cqr5,cqr6 zips) include latest official source ***WITH alpha additions and Pull Requests that have not yet applied***.
+
+ To see what are the latest official updates look at You will find contest selection from NewQSO/Window dropdown menu.
- You will find contest selection from NewQSO/Window dropdown menu. Contest support of Cqrlog is very limited, but will serve you well if you just
+like to take a part to contest without winning in mind.
+
+
-RECOMMENDATION: Make new log for each contest, consider not to allow qrz/hamqth search, it may slow down qso feed.
-Note: This is NOT a contest logging add-on!!! It is a contest-notepad.
-It is meant to be a tool for "Sunday contesters working in Tourist Class". Do not expect wonders!
+RECOMMENDATION:
-Contest window is just a "child form" for NewQSO to make qso logging faster when working in contests.
-With Tru and Msg is Loc setting it is useful also in VHF, UHF, SHF Tropo, Es etc. openings for fast qso
-logging. Perhaps also in some other operations like WWFF activations.
-
-HOTKEYS work like with New QSO window.
+Contest support
-
When contest window is open NewQSO has contest exchange fields visible. You may have to stretch NewQSO window horizontally to see them.
-
You do not normally need NewQSO window during contest. Only need for NewQSO is in case you have to edit an already worked qso.
-
Select qso normally via QSO list and press edit QSO button and you are able to edit qso, also the contest message part of it.
-
NewQSO is not meant to be used during contest qso feeds. All new qsos are entered via contest window.
Contest window is just a "child form" for NewQSO to make qso logging faster when working in contests.
+With Tru and Msg is Loc setting it is useful also in VHF, UHF, SHF Tropo, Es etc. openings for fast qso
+logging. Perhaps also in some other operations like WWFF activations.
+
Note: This is NOT a contest logging add-on!!! It is a contest-notepad.
+It is meant to be a tool for "Sunday contesters working in Tourist Class". Do not expect wonders!
+
When contest window is open NewQSO has contest exchange fields visible. You may have to stretch NewQSO window horizontally to see them.
+You do not normally need NewQSO window during contest.
+
Only need for NewQSO is in case you have to edit an already worked qso.
+Select qso normally via QSO list and press edit QSO button and you are able to edit qso, also the contest message part of it.
+
Repeat: NewQSO is not meant to be used during contest qso feeds. All new qsos are entered via contest window.
Make new log for each contest, consider not to allow qrz/hamqth search, it may slow down qso feed.
+
It might be a good idea to have two logs the "contest" that is used during a contest and then cleared for new contest and the other as
+"contest archive" where contents of "contest" are moved with adif export after Cabrillo log is sent.
+
Benefit of having "contest" log with one contest is also that you get DXCC statistic right after cursor leaves callsign column. You can place contest window just above NewQSO/DXCC statistic.(see pic above).
-Contest window has a simple dupe check that turns typed duplicate callsign bold red printed. If you save a duplicate qso it is marked as "Dupe" in "Comment to qso" field.
-
To get this working properly you must either create a new log for every contest or set dupe start date (I.E. contest starting day) with button "from YYYY-MM-DD"
+
+Contest window has a simple dupe check that turns typed duplicate callsign bold red printed. If you save a duplicate qso it is marked as "/D" in "RST sent" field.
+When doing Cabrillo export it is operator's duty to decide what to do with "/D" reports
+
To get duplication check working properly you must either create a new log for every contest or set dupe start date (I.E. contest starting day) with button "from YYYY-MM-DD"
Hotkeys:
+Hotkeys work same way as with New QSO window.
It also halts CW memory output if it is just running.
-Contest window has following fields and checkboxes:
+
Typical contest qso goes like this:
Type callsign->press TAB->type contest rxnumber->press TAB->type contest message->press ENTER.
-Or hit ENTER after rxnumber if no additional message is exchanged.
+Or hit ENTER after rxnumber if no additional message is exchanged. When S&P is checked you maybe need to launch some Cw messages manually.
Remember that pressing ENTER key at any field saves qso with existing values. How ever there must be -callsign of least three characters long. Sent/Received number and message are not needed. +
Remember that pressing ENTER key at any column saves qso with existing values. How ever there must be
+callsign of least three characters long. Sent/Received number and message(s) are not needed.
There is no need to use the mouse. Keep your hands on keyboard (and possible on CW key / PTT (if not foot pedal in use)). It is faster.
-Contest numbers and messages are saved in log into their own columns. Use preferences/Visible columns to show them in Qso list.
+Contest numbers and messages are saved in log in their own columns. Use preferences/Visible columns to show them in Qso list.
-CW macros can be used for sending contest meessages. Look them from help section CW Operation
+CW messages can be used for sending contest messages. Look at help section CW Operation
+ how to use macros in messages.
+
NOTE: If you use macro that sends whole contest message (%xrs = RST, STX, STXString) message will skip empty ones. This way %xrs works for all contests.
+
OK1WC memorial contest status is supported. +
+
-ADIF exports fields to right tags.
+If contest name has "mwc" or "ok1wc" included (no case sensitive) then status counting is activated. At the start of contest (and any oher time when no qso to save) it can be seen by pressing 2xESC.
+After saving a qso Status view is updated.
+
TRXControl must show that rig is on 80m or 40m band. If you do not have cat controlled rig select "Hamlib dummy #1" as rig and set correct band and mode from TRXControl's band buttons.
+
Only bands 80M and 40M and mode CW are counted (See rules of contest).
+
+
Nordic Activity Contest (NAC) status is supported. +
+ +
+
+If contest name has "nac" included (no case sensitive) then status counting is activated. At the start of contest (and any oher time when no qso to save) it can be seen by pressing 2xESC.
+After saving a qso Status view is updated.
+
+
+
Common status is supported. +
+ +
+
+If contest name has any name that does not fit rules of two above status counting is activated. At the start of contest (and any oher time when no qso to save) it can be seen by pressing 2xESC.
+After saving a qso Status view is updated.
+
There are several items shown in Status display. You can control them by left click below text Status (but above status display itself).
+
The DX and own continent counts (EU in picture) are defined against your callsign in preferences/station/call.
+
To see Status section you may need to stretch the bottom part of Contest window.
+
NOTE: Status counting may have errors! It is just for showing progress of contest, not to show final score.
+
+
+ +I found nice adif2cabrillo program for Linux from http://users.telenet.be/on4qz/ that supports ADIF importing. +
Starting is bit complicated: +You need to compile it from source. Qt5 with qmake (called qmake-qt5 if your distro is Fedora) is needed to be able to compile +it. +Then there are no templates for different contests. You have to create them, but after that it serves you well! +It accepts nicely exported ADIF format from cqrlog and dig out STX and SRX as expected. + ++
-
-Most contests expect Cabrillo log format. Cqrlog has a limited support of Cabrillo exports. Mostly enough for a Sunday contester.
-
In case you want to use external Cabrillo program you have to make ADIF export of qsos
-and then use another program.
- -I found nice adif2cabrillo program for Linux from http://users.telenet.be/on4qz/ that supports ADIF importing. -
Starting is bit complicated: -You need to compile it from source. Qt5 with qmake (called qmake-qt5 if your distro is Fedora) is needed to be able to compile -it. -Then there are no templates for different contests. You have to create them, but after that it serves you well! -It accepts nicely exported ADIF format from cqrlog and dig out STX and SRX as expected. - +
-Callsign alert - allows you to enter callsigns that you are interested in. Eg. some special station for an award etc.
-Run this command when callsign is spotted: will run select command when any of callsigns you've enter appears in the cluster.
+Callsign alert
Allows you to enter callsigns that you are interested in. Eg. some special station for an award etc.
+Run this command when callsign is spotted
Will run select command when any of callsigns you've enter appears in the cluster.
E.g. use this if you want to see small window with information:
zenity --info --text='Callsign $CALLSIGN detected at $FREQ $MODE' --title=Info
You have to install zenity, first. (Thans to SV2RCK for the tip!)
@@ -424,10 +488,11 @@ This is also possible with "notify-send". The display duration is set in ms (-t
-Show country name in the DX cluster spot - next to every spot, you will se the coutry name of the DX station
-Send these commands to telnet DXCluster when connected - one or several commands with comma separated can be sent to DXCluster after connect is initialized.
- If your command(s) have space(s) between, like "acc/spot by_zone 14,15,16 and not (on hf/data or on hf/rtty)" it is recommended to close each command between double quotes.
-Connect to DX cluster after program startup - after log is opened, cqrlog will connect to your default cluster. Please remember that
+Show country name in the DX cluster spot
Next to every spot, you will se the coutry name of the DX station
+Send these commands to telnet DXCluster when connected
One or several commands with comma separated can be sent to DXCluster after connect is initialized.
+ If your command(s) have space(s) between,
+
like "acc/spot by_zone 14,15,16 and not (on hf/data or on hf/rtty)" it is recommended to close each command between double quotes.
+Connect to DX cluster after program startup
After log is opened, cqrlog will connect to your default cluster. Please remember that
username and password(if needed) have to be filled in the cluster list.
+ | + The "Contest" is the screen for fast qso input and some contest related properties + | +
ESC |
+ 1x Stops CW memory sending 2x Returns cursor to Call column 3x Empty all fields and prepare program for a new QSO |
+
F1..F10 |
+ Sends CW memories 1..10 when rig is in CW mode Call voice keyer script 1..10 when rig is in phone mode |
+
Shift+F1 |
+ Starts/stops Memory1 (CW or phone) repeat timer when S&P is enabled Writing to call column or 1xESC stops repeat sending (in case of CW memory) |
+
PgUp | +CW Speed +2 WPM (QRQ) | +
PgDn | +CW Speed -2 WPM (QRS) | +
Ctrl-1...Ctrl-9 |
+ Set split using XIT if rig supports it. Value 0 - 9999Hz UP/DOWN
+ Ctrl-9 will add random value 0 - 990Hz to setting. Subtract if split is DOWN |
+
Ctrl-0 |
+ Disables XIT | +
Ctrl-A |
+ Sets callsign to Band map (for later return with double click) | +
+The BIG SQUARE and COUNTY gives you band based report of worked Squares or Counties.
+With County the column filling must be excactly same with all similar counties. Count is based to compare and even one space in county name can make different results.
+The 'Save to...' button exports the statistics to a HTML file.
+
+
+
+
+ Send hex bytes to keyer. Will send hex bytes to Winkeyer or K3NG allowing non charcter bytes to be sent from Cqrlog in case there sudden need to change some of keyer's settings.
+
Consult your keyer's manual to find needed commands.
+
Memory keys form has buttons PgUp and PgDn that are not configurable. They alter CW speed in same way as keyboard keys PgUp and PgDn that some, specially laptop computers, may not even have.
When using Memory keys-form with mouse, or keyboard, you are able to lauch memories by mouse click or by F-key press from keyboard keys. Same with PgUp and PgDn, both are working, keys and mouse click.
diff --git a/help/h30.html b/help/h30.html
index 9a781b7..e4d4290 100644
--- a/help/h30.html
+++ b/help/h30.html
@@ -1,4 +1,4 @@
-
+OS
-TRX Control window Shows current frequency and buttons allow change of Band, mode, memory and rig. Additional selections are User defined buttons, Power buttons, Vfo A and B buttons and memory information field.
+TRX Control window shows current frequency and buttons that allow change of band, mode, memory and rig.
+
Additional selections are User defined buttons, Power buttons, Vfo A and B buttons and memory information field.
When pressing band selection button rig moves to that band using predefined frequency of currently active mode. Default frequencies and User buttons can be defined in preferecences/TRX control.
-
You can select rig vfo with buttons A and B but there is no feedback what vfo is currenty used as Icom brand rigs do not support "Get_vfo" command.
-
If M_up or M_dwn are pressed or memory is selected by double click of memory list, the information text will show up to Mem Info field. If frequency is changed manually after that info text will disappear.
-
If memory does not have info text (max 25chr) just x of y is displayed where x refers to memory order in Add/Modify memory list and y total amount of memories.
-None (in red) indicates that there are no memory lines.
-
With P-on/off/stb buttons current rig can be set ON, OFF or STANDBY (if it supports rigctld power commands).
-
Default setting for power buttons is hidden. You can change it via dropdown menu "Preferences".
-
M_up and M_dwn buttons select next/previous entry from memory list. M_Wri adds entry to memory list from current rig frequency and mode and info field shows "MW ok".
-
You can change rig frequency by clicking frequency display. Then you can enter a new MHz value and press enter.
-
You can also use mouse wheel to change frequency. One wheel step is 100Hz, Keeping Shift key pressed the step is 1kHz. Keeping Ctrl key pressed the step is 10kHz.
+
+By clicking frequency display you can set a new frequency and click again (or press enter) to send command to rig.
+
You can also use mouse roll to move frequency after first clicking the frequency display.
+
+
If M_up or M_dwn are pressed or memory is selected by double click of memory list, the information text will show up to Mem Info field. If frequency is changed manually after that info text will disappear.
+
If memory does not have info text (max 25chr) just x of y is displayed where x refers to memory order in Add/Modify memory list and y total amount of memories.
+None (in red) indicates that there are no memory lines.
+
With P-on/off/stb buttons current rig can be set ON, OFF or STANDBY (if it supports rigctld power commands).
+
Default setting for power buttons is hidden. You can change it via dropdown menu "Preferences". They are also hidden if rig can not support power commands.
+
M_up and M_dwn buttons select next/previous entry from memory list. M_Wri adds entry to memory list from current rig frequency and mode and info field shows "MW ok".
+
You can change rig frequency by clicking frequency display. Then you can enter a new MHz value and press enter.
+
You can also use mouse wheel to change frequency. One wheel step is 100Hz, Keeping Shift key pressed the step is 1kHz. Keeping Ctrl key pressed the step is 10kHz.
Keeping both keys pressed the step is 1MHz.
If you use mouse wheel the rig frequency is changed while turning. There is no need to press enter then. Just move mouse cursor away from frequency display.
-
NOTE!!!
Check pereferences/TRXcontrol/Switch only between mode related memories
Cqrlog TRXcontrol memories are categorized by mode (groups). CW, SSB(=AM+USB+LSB+FM), RTTY(=RTTY+DATA+PKTLSB+PKTUSB+PKTFM)[no mode selector for PKT* but you may "M wri" them anyway].
-So do not wonder if you get smaller amount of memories than in your list when pressing M_up and M_dwn with "Show mode related" checked.
-
+
See also setting up TRX/ROTControl
@@ -76,23 +87,24 @@ From NewQSO/Window you can open Rotor control window.-Window shows current position of rotor with numerical display, Short and Long path Buttons and radio buttons to select rotor 1 or rotor 2. -
Progress bar displays Az value relative to AzLimits (if Use \dump_state is checked in preferences) so do not wonder if it in some cases may look different than numerical true direction display.
If error message is received from rotctld button area turns red. If requested turn command is ok, but az_min or az_maz limits change requested direction from true direction
(then antenna may not always reach requested direction) button area will turn yellow as warning sign.
The length of color flash depends on poll rate and is error permanent or not.
-
If you make changes to preferences/Rot Control after that just select another rotor (even if not existing) from radio buttons Rotor 1 , Rotor 2. Then select back the previous rotor and new values are read. It is possible also reload settings from NewQSO/File/Refresh TRX/ROT control.
See also setting up TRX/ROTControl
+ | + WARNING! + Backup your data often! BACKUP your log directory at the end of EVERY session! + All that you need to backup and store in a safe place is the log database directory + located in the ~/.config/cqrlog/database folder, or you can enable the autobackup function + in Preferences. This autobackup function creates an ADIF file with a backup of your log. + /td> + |
[Menu] | +
You will find contest selection from NewQSO/Window dropdown menu. Contest support of Cqrlog is very limited, but will serve you well if you just
+like to take a part to contest without winning in mind.
+
+
Contest window is just a "child form" for NewQSO to make qso logging faster when working in contests.
+With Tru and Msg is Loc setting it is useful also in VHF, UHF, SHF Tropo, Es etc. openings for fast qso
+logging. Perhaps also in some other operations like WWFF activations.
+
Note: This is NOT a contest logging add-on!!! It is a contest-notepad.
+It is meant to be a tool for "Sunday contesters working in Tourist Class". Do not expect wonders!
+
When contest window is open NewQSO has contest exchange fields visible. You may have to stretch NewQSO window horizontally to see them.
+You do not normally need NewQSO window during contest.
+
Only need for NewQSO is in case you have to edit an already worked qso.
+Select qso normally via QSO list and press edit QSO button and you are able to edit qso, also the contest message part of it.
+
Repeat: NewQSO is not meant to be used during contest qso feeds. All new qsos are entered via contest window.
+ +
+
+RECOMMENDATION:
Make new log for each contest, consider not to allow qrz/hamqth search, it may slow down qso feed.
+
It might be a good idea to have two logs the "contest" that is used during a contest and then cleared for new contest and the other as
+"contest archive" where contents of "contest" are moved with adif export after Cabrillo log is sent.
+
Benefit of having "contest" log with one contest is also that you get DXCC statistic right after cursor leaves callsign column. You can place contest window just above NewQSO/DXCC statistic.(see pic above).
+
+
+Contest window has a simple dupe check that turns typed duplicate callsign bold red printed. If you save a duplicate qso it is marked as "/D" in "RST sent" field.
+When doing Cabrillo export it is operator's duty to decide what to do with "/D" reports
+
To get duplication check working properly you must either create a new log for every contest or set dupe start date (I.E. contest starting day) with button "from YYYY-MM-DD"
+
+
+
+Typical contest qso goes like this:
+Type callsign->press TAB->type contest rxnumber->press TAB->type contest message->press ENTER.
+Or hit ENTER after rxnumber if no additional message is exchanged. When S&P is checked you maybe need to launch some Cw messages manually.
+
Remember that pressing ENTER key at any column saves qso with existing values. How ever there must be
+callsign of least three characters long. Sent/Received number and message(s) are not needed.
+
There is no need to use the mouse. Keep your hands on keyboard (and possible on CW key / PTT (if not foot pedal in use)). It is faster.
+Contest numbers and messages are saved in log in their own columns. Use preferences/Visible columns to show them in Qso list.
+
+CW messages can be used for sending contest messages. Look at help section CW Operation
+ how to use macros in messages.
+
NOTE: If you use macro that sends whole contest message (%xrs = RST, STX, STXString) message will skip empty ones. This way %xrs works for all contests.
+
OK1WC memorial contest status is supported. +
+ +
+
+If contest name has "mwc" or "ok1wc" included (no case sensitive) then status counting is activated. At the start of contest (and any oher time when no qso to save) it can be seen by pressing 2xESC.
+After saving a qso Status view is updated.
+
TRXControl must show that rig is on 80m or 40m band. If you do not have cat controlled rig select "Hamlib dummy #1" as rig and set correct band and mode from TRXControl's band buttons.
+
Only bands 80M and 40M and mode CW are counted (See rules of contest).
+
+
Nordic Activity Contest (NAC) status is supported. +
+ +
+
+If contest name has "nac" included (no case sensitive) then status counting is activated. At the start of contest (and any oher time when no qso to save) it can be seen by pressing 2xESC.
+After saving a qso Status view is updated.
+
+
+
Common status is supported. +
+ +
+
+If contest name has any name that does not fit rules of two above status counting is activated. At the start of contest (and any oher time when no qso to save) it can be seen by pressing 2xESC.
+After saving a qso Status view is updated.
+
There are several items shown in Status display. You can control them by left click below text Status (but above status display itself).
+
The DX and own continent counts (EU in picture) are defined against your callsign in preferences/station/call.
+
To see Status section you may need to stretch the bottom part of Contest window.
+
NOTE: Status counting may have errors! It is just for showing progress of contest, not to show final score.
+
+
+ +I found nice adif2cabrillo program for Linux from http://users.telenet.be/on4qz/ that supports ADIF importing. +
Starting is bit complicated: +You need to compile it from source. Qt5 with qmake (called qmake-qt5 if your distro is Fedora) is needed to be able to compile +it. +Then there are no templates for different contests. You have to create them, but after that it serves you well! +It accepts nicely exported ADIF format from cqrlog and dig out STX and SRX as expected. + ++
+HTML export will look like this:
+
+
[Menu] | +
'+LineEnding+''+ll+''+LineEnding+' | '); writeln(f,'');
writeln(f,'');
dmData.Q1.Close;
- dmData.Q1.SQL.Text := 'select upper(left(loc,4)) as lll FROM cqrlog_main where loc like '+
- QuotedStr(ll+'%')+' and band = '+QuotedStr(cmbBands.Text)+
- ' group by lll order by loc';
+ dmData.Q1.SQL.Text := 'select upper(left(loc,4)) as lll FROM '+TableName+' where loc like '+
+ QuotedStr(ll+'%')+bnd+' group by lll order by loc';
dmData.Q1.Open;
db := TBufDataset.Create(nil); //I was not able to clear all records from TBufDataset without this workaround
@@ -179,9 +196,8 @@ begin
if tmp <> '' then
begin
dmData.Q1.Close;
- dmData.Q1.SQL.Text := 'select upper(left(loc,4)) as lll FROM cqrlog_main where loc like '+
- QuotedStr(ll+'%')+' and band = '+QuotedStr(cmbBands.Text)+
- 'and ('+tmp+') group by lll order by loc';
+ dmData.Q1.SQL.Text := 'select upper(left(loc,4)) as lll FROM '+TableName+' where loc like '+
+ QuotedStr(ll+'%')+bnd+'and ('+tmp+') group by lll order by loc';
dmData.Q1.Open;
cfm := 0;
while not dmData.Q1.Eof do
@@ -237,11 +253,26 @@ begin
Writeln(f,' '); Writeln(f,''+LineEnding+'Total: '); Writeln(f,'Worked:',sum_wkd,' '); - Writeln(f,'Confirmed:',sum_cfm); + Writeln(f,'Confirmed:',sum_cfm,' '); + Writeln(f,'Different squares: '); + if cmbBands.Text<>'ALL' then Writeln(f,'On this band:',thiswkd,' '); + Writeln(f,'On all bands:',allwkdBig,'/',allwkd); Writeln(f,''); Writeln(f,''); Writeln(f,''); - CloseFile(f) + CloseFile(f); + + if dmData.IsFilter then + begin + try + dmData.Q.Close; + dmData.Q.SQL.Text:='DROP VIEW IF EXISTS '+TableName; + dmData.Q.ExecSQL; + dmData.trQ.Commit; + Finally + end; + end; + finally dmData.trQ.Rollback; dmData.trQ1.Rollback @@ -263,6 +294,12 @@ begin end end; +procedure TfrmBigSquareStat.cmbBandsChange(Sender: TObject); +begin + tmrBlink.Enabled:=True; + pbTot.Position:=0; +end; + procedure TfrmBigSquareStat.WriteHMTLHeader; begin AssignFile(f,TmpFile); @@ -286,6 +323,7 @@ begin TmpFile := GetTempFileNameUTF8(dmData.HomeDir,'square'); dmUtils.LoadForm(frmBigSquareStat); dmUtils.FillBandCombo(cmbBands); + cmbBands.Items.Insert(0,'ALL'); if cqrini.ReadInteger('SquareStat','Band',0) > cmbBands.Items.Count-1 then cmbBands.ItemIndex := 0 else @@ -297,7 +335,49 @@ begin dlgSave.InitialDir := cqrini.ReadString('SquareStat','Directory',dmData.UsrHomeDir); IpHtmlPanel1.Font.Color := clBlack; - btnRefresh.Click + pbTot.Min:=0; + pbTot.Max:=1; + pbTot.Smooth:=True; + pbTot.Step:=1; + pbTot.Enabled:=True; + pbTot.Position:=0; + tmrBlink.Enabled:=False; + lblFilterActive.Visible:= dmData.IsFilter; + cmbBandsChange(nil); +end; + +procedure TfrmBigSquareStat.tmrBlinkStartTimer(Sender: TObject); +begin + btnRefresh.Caption:='Press to'; + btnRefresh.Font.Color:=clGreen; + btnRefresh.Repaint; +end; + +procedure TfrmBigSquareStat.tmrBlinkStopTimer(Sender: TObject); +begin + btnRefresh.Caption:='Refresh statistic'; + btnRefresh.Font.Color:=clDefault; + btnRefresh.Repaint; +end; + +procedure TfrmBigSquareStat.tmrBlinkTimer(Sender: TObject); +var + C :Tcolor; + t:String; +begin + case odd(SecondOf(Now)) of + True: Begin + C := clGreen; + T :='run statistic' + end; + False: Begin + C := clGreen; + T :='Press to' + end; + end; + btnRefresh.Caption:= T; + btnRefresh.Font.Color:=C; + btnRefresh.Repaint; end; end. diff --git a/src/fCWType.pas b/src/fCWType.pas index 27fa705..922727c 100644 --- a/src/fCWType.pas +++ b/src/fCWType.pas @@ -91,7 +91,7 @@ implementation {$R *.lfm} { TfrmCWType } -uses fNewQSO,dUtils,dData, uMyIni; +uses fTRXControl,fNewQSO,dUtils,dData, uMyIni, fContest; function TfrmCWType.PassedKey(key:char):boolean; Begin @@ -140,6 +140,7 @@ procedure TfrmCWType.btnF1MouseEnter(Sender: TObject); begin frmCWType.lblToShowMouseOverText.Caption:=dmUtils.GetCWMessage('F1',frmNewQSO.edtCall.Text, frmNewQSO.edtHisRST.Text, frmNewQSO.edtContestSerialSent.Text,frmNewQSO.edtContestExchangeMessageSent.Text, + frmNewQSO.edtContestSerialReceived.Text,frmNewQSO.edtContestExchangeMessageReceived.Text, frmNewQSO.edtName.Text,frmNewQSO.lblGreeting.Caption,''); end; @@ -154,6 +155,7 @@ begin if Assigned(frmNewQSO.CWint) and (frmNewQSO.cmbMode.Text='CW') then frmNewQSO.CWint.SendText(dmUtils.GetCWMessage('F2',frmNewQSO.edtCall.Text, frmNewQSO.edtHisRST.Text, frmNewQSO.edtContestSerialSent.Text,frmNewQSO.edtContestExchangeMessageSent.Text, + frmNewQSO.edtContestSerialReceived.Text,frmNewQSO.edtContestExchangeMessageReceived.Text, frmNewQSO.edtName.Text,frmNewQSO.lblGreeting.Caption,'')) else ShowMessage('Radio: Not in CW mode!'+LineEnding+'or'+LineEnding+'CW interface: No keyer defined! '); end; @@ -162,6 +164,7 @@ procedure TfrmCWType.btnF10MouseEnter(Sender: TObject); begin frmCWType.lblToShowMouseOverText.Caption:=dmUtils.GetCWMessage('F10',frmNewQSO.edtCall.Text, frmNewQSO.edtHisRST.Text, frmNewQSO.edtContestSerialSent.Text,frmNewQSO.edtContestExchangeMessageSent.Text, + frmNewQSO.edtContestSerialReceived.Text,frmNewQSO.edtContestExchangeMessageReceived.Text, frmNewQSO.edtName.Text,frmNewQSO.lblGreeting.Caption,''); end; @@ -171,6 +174,7 @@ begin if Assigned(frmNewQSO.CWint) and (frmNewQSO.cmbMode.Text='CW') then frmNewQSO.CWint.SendText(dmUtils.GetCWMessage('F10',frmNewQSO.edtCall.Text, frmNewQSO.edtHisRST.Text, frmNewQSO.edtContestSerialSent.Text,frmNewQSO.edtContestExchangeMessageSent.Text, + frmNewQSO.edtContestSerialReceived.Text,frmNewQSO.edtContestExchangeMessageReceived.Text, frmNewQSO.edtName.Text,frmNewQSO.lblGreeting.Caption,'')) else ShowMessage('Radio: Not in CW mode!'+LineEnding+'or'+LineEnding+'CW interface: No keyer defined! '); end; @@ -184,9 +188,17 @@ procedure TfrmCWType.btnF1Click(Sender: TObject); begin m.SetFocus; //after click focus back to memo if Assigned(frmNewQSO.CWint) and (frmNewQSO.cmbMode.Text='CW') then - frmNewQSO.CWint.SendText(dmUtils.GetCWMessage('F1',frmNewQSO.edtCall.Text, + begin + frmNewQSO.CWint.SendText(dmUtils.GetCWMessage('F1',frmNewQSO.edtCall.Text, frmNewQSO.edtHisRST.Text, frmNewQSO.edtContestSerialSent.Text,frmNewQSO.edtContestExchangeMessageSent.Text, - frmNewQSO.edtName.Text,frmNewQSO.lblGreeting.Caption,'')) + frmNewQSO.edtContestSerialReceived.Text,frmNewQSO.edtContestExchangeMessageReceived.Text, + frmNewQSO.edtName.Text,frmNewQSO.lblGreeting.Caption,'')); + if frmContest.Showing then //set the "lastCqFreq" @contest window + Begin + frmContest.lblCqMode.Caption:=frmTRXControl.GetRawMode; + frmContest.lblCqFreq.Caption := FormatFloat('0.00',frmTRXControl.GetFreqkHz); + end; + end else ShowMessage('Radio: Not in CW mode!'+LineEnding+'or'+LineEnding+'CW interface: No keyer defined! '); end; @@ -194,6 +206,7 @@ procedure TfrmCWType.btnF2MouseEnter(Sender: TObject); begin frmCWType.lblToShowMouseOverText.Caption:=dmUtils.GetCWMessage('F2',frmNewQSO.edtCall.Text, frmNewQSO.edtHisRST.Text, frmNewQSO.edtContestSerialSent.Text,frmNewQSO.edtContestExchangeMessageSent.Text, + frmNewQSO.edtContestSerialReceived.Text,frmNewQSO.edtContestExchangeMessageReceived.Text, frmNewQSO.edtName.Text,frmNewQSO.lblGreeting.Caption,''); end; @@ -208,6 +221,7 @@ begin if Assigned(frmNewQSO.CWint) and (frmNewQSO.cmbMode.Text='CW') then frmNewQSO.CWint.SendText(dmUtils.GetCWMessage('F3',frmNewQSO.edtCall.Text, frmNewQSO.edtHisRST.Text, frmNewQSO.edtContestSerialSent.Text,frmNewQSO.edtContestExchangeMessageSent.Text, + frmNewQSO.edtContestSerialReceived.Text,frmNewQSO.edtContestExchangeMessageReceived.Text, frmNewQSO.edtName.Text,frmNewQSO.lblGreeting.Caption,'')) else ShowMessage('Radio: Not in CW mode!'+LineEnding+'or'+LineEnding+'CW interface: No keyer defined! '); end; @@ -216,6 +230,7 @@ procedure TfrmCWType.btnF3MouseEnter(Sender: TObject); begin frmCWType.lblToShowMouseOverText.Caption:=dmUtils.GetCWMessage('F3',frmNewQSO.edtCall.Text, frmNewQSO.edtHisRST.Text, frmNewQSO.edtContestSerialSent.Text,frmNewQSO.edtContestExchangeMessageSent.Text, + frmNewQSO.edtContestSerialReceived.Text,frmNewQSO.edtContestExchangeMessageReceived.Text, frmNewQSO.edtName.Text,frmNewQSO.lblGreeting.Caption,''); end; @@ -230,6 +245,7 @@ begin if Assigned(frmNewQSO.CWint) and (frmNewQSO.cmbMode.Text='CW') then frmNewQSO.CWint.SendText(dmUtils.GetCWMessage('F4',frmNewQSO.edtCall.Text, frmNewQSO.edtHisRST.Text, frmNewQSO.edtContestSerialSent.Text,frmNewQSO.edtContestExchangeMessageSent.Text, + frmNewQSO.edtContestSerialReceived.Text,frmNewQSO.edtContestExchangeMessageReceived.Text, frmNewQSO.edtName.Text,frmNewQSO.lblGreeting.Caption,'')) else ShowMessage('Radio: Not in CW mode!'+LineEnding+'or'+LineEnding+'CW interface: No keyer defined! '); end; @@ -238,6 +254,7 @@ procedure TfrmCWType.btnF4MouseEnter(Sender: TObject); begin frmCWType.lblToShowMouseOverText.Caption:=dmUtils.GetCWMessage('F4',frmNewQSO.edtCall.Text, frmNewQSO.edtHisRST.Text, frmNewQSO.edtContestSerialSent.Text,frmNewQSO.edtContestExchangeMessageSent.Text, + frmNewQSO.edtContestSerialReceived.Text,frmNewQSO.edtContestExchangeMessageReceived.Text, frmNewQSO.edtName.Text,frmNewQSO.lblGreeting.Caption,''); end; @@ -252,6 +269,7 @@ begin if Assigned(frmNewQSO.CWint) and (frmNewQSO.cmbMode.Text='CW') then frmNewQSO.CWint.SendText(dmUtils.GetCWMessage('F5',frmNewQSO.edtCall.Text, frmNewQSO.edtHisRST.Text, frmNewQSO.edtContestSerialSent.Text,frmNewQSO.edtContestExchangeMessageSent.Text, + frmNewQSO.edtContestSerialReceived.Text,frmNewQSO.edtContestExchangeMessageReceived.Text, frmNewQSO.edtName.Text,frmNewQSO.lblGreeting.Caption,'')) else ShowMessage('Radio: Not in CW mode!'+LineEnding+'or'+LineEnding+'CW interface: No keyer defined! '); end; @@ -260,6 +278,7 @@ procedure TfrmCWType.btnF5MouseEnter(Sender: TObject); begin frmCWType.lblToShowMouseOverText.Caption:=dmUtils.GetCWMessage('F5',frmNewQSO.edtCall.Text, frmNewQSO.edtHisRST.Text, frmNewQSO.edtContestSerialSent.Text,frmNewQSO.edtContestExchangeMessageSent.Text, + frmNewQSO.edtContestSerialReceived.Text,frmNewQSO.edtContestExchangeMessageReceived.Text, frmNewQSO.edtName.Text,frmNewQSO.lblGreeting.Caption,''); end; @@ -274,6 +293,7 @@ begin if Assigned(frmNewQSO.CWint) and (frmNewQSO.cmbMode.Text='CW') then frmNewQSO.CWint.SendText(dmUtils.GetCWMessage('F6',frmNewQSO.edtCall.Text, frmNewQSO.edtHisRST.Text, frmNewQSO.edtContestSerialSent.Text,frmNewQSO.edtContestExchangeMessageSent.Text, + frmNewQSO.edtContestSerialReceived.Text,frmNewQSO.edtContestExchangeMessageReceived.Text, frmNewQSO.edtName.Text,frmNewQSO.lblGreeting.Caption,'')) else ShowMessage('Radio: Not in CW mode!'+LineEnding+'or'+LineEnding+'CW interface: No keyer defined! '); end; @@ -282,6 +302,7 @@ procedure TfrmCWType.btnF6MouseEnter(Sender: TObject); begin frmCWType.lblToShowMouseOverText.Caption:=dmUtils.GetCWMessage('F6',frmNewQSO.edtCall.Text, frmNewQSO.edtHisRST.Text, frmNewQSO.edtContestSerialSent.Text,frmNewQSO.edtContestExchangeMessageSent.Text, + frmNewQSO.edtContestSerialReceived.Text,frmNewQSO.edtContestExchangeMessageReceived.Text, frmNewQSO.edtName.Text,frmNewQSO.lblGreeting.Caption,''); end; @@ -296,6 +317,7 @@ begin if Assigned(frmNewQSO.CWint) and (frmNewQSO.cmbMode.Text='CW') then frmNewQSO.CWint.SendText(dmUtils.GetCWMessage('F7',frmNewQSO.edtCall.Text, frmNewQSO.edtHisRST.Text, frmNewQSO.edtContestSerialSent.Text,frmNewQSO.edtContestExchangeMessageSent.Text, + frmNewQSO.edtContestSerialReceived.Text,frmNewQSO.edtContestExchangeMessageReceived.Text, frmNewQSO.edtName.Text,frmNewQSO.lblGreeting.Caption,'')) else ShowMessage('Radio: Not in CW mode!'+LineEnding+'or'+LineEnding+'CW interface: No keyer defined! '); end; @@ -304,6 +326,7 @@ procedure TfrmCWType.btnF7MouseEnter(Sender: TObject); begin frmCWType.lblToShowMouseOverText.Caption:=dmUtils.GetCWMessage('F7',frmNewQSO.edtCall.Text, frmNewQSO.edtHisRST.Text, frmNewQSO.edtContestSerialSent.Text,frmNewQSO.edtContestExchangeMessageSent.Text, + frmNewQSO.edtContestSerialReceived.Text,frmNewQSO.edtContestExchangeMessageReceived.Text, frmNewQSO.edtName.Text,frmNewQSO.lblGreeting.Caption,''); end; @@ -318,6 +341,7 @@ begin if Assigned(frmNewQSO.CWint) and (frmNewQSO.cmbMode.Text='CW') then frmNewQSO.CWint.SendText(dmUtils.GetCWMessage('F8',frmNewQSO.edtCall.Text, frmNewQSO.edtHisRST.Text, frmNewQSO.edtContestSerialSent.Text,frmNewQSO.edtContestExchangeMessageSent.Text, + frmNewQSO.edtContestSerialReceived.Text,frmNewQSO.edtContestExchangeMessageReceived.Text, frmNewQSO.edtName.Text,frmNewQSO.lblGreeting.Caption,'')) else ShowMessage('Radio: Not in CW mode!'+LineEnding+'or'+LineEnding+'CW interface: No keyer defined! '); end; @@ -326,6 +350,7 @@ procedure TfrmCWType.btnF8MouseEnter(Sender: TObject); begin frmCWType.lblToShowMouseOverText.Caption:=dmUtils.GetCWMessage('F8',frmNewQSO.edtCall.Text, frmNewQSO.edtHisRST.Text, frmNewQSO.edtContestSerialSent.Text,frmNewQSO.edtContestExchangeMessageSent.Text, + frmNewQSO.edtContestSerialReceived.Text,frmNewQSO.edtContestExchangeMessageReceived.Text, frmNewQSO.edtName.Text,frmNewQSO.lblGreeting.Caption,''); end; @@ -340,6 +365,7 @@ begin if Assigned(frmNewQSO.CWint) and (frmNewQSO.cmbMode.Text='CW') then frmNewQSO.CWint.SendText(dmUtils.GetCWMessage('F9',frmNewQSO.edtCall.Text, frmNewQSO.edtHisRST.Text, frmNewQSO.edtContestSerialSent.Text,frmNewQSO.edtContestExchangeMessageSent.Text, + frmNewQSO.edtContestSerialReceived.Text,frmNewQSO.edtContestExchangeMessageReceived.Text, frmNewQSO.edtName.Text,frmNewQSO.lblGreeting.Caption,'')) else ShowMessage('Radio: Not in CW mode!'+LineEnding+'or'+LineEnding+'CW interface: No keyer defined! '); end; @@ -348,6 +374,7 @@ procedure TfrmCWType.btnF9MouseEnter(Sender: TObject); begin frmCWType.lblToShowMouseOverText.Caption:=dmUtils.GetCWMessage('F9',frmNewQSO.edtCall.Text, frmNewQSO.edtHisRST.Text, frmNewQSO.edtContestSerialSent.Text,frmNewQSO.edtContestExchangeMessageSent.Text, + frmNewQSO.edtContestSerialReceived.Text,frmNewQSO.edtContestExchangeMessageReceived.Text, frmNewQSO.edtName.Text,frmNewQSO.lblGreeting.Caption,''); end; @@ -392,6 +419,8 @@ begin end; procedure TfrmCWType.FormShow(Sender: TObject); +var + n:string; begin dmUtils.LoadWindowPos(frmCWType); rgMode.ItemIndex := cqrini.ReadInteger('CW','Mode',1); @@ -400,6 +429,15 @@ begin m.Clear; Switch2Word :=false; WasMemoLen := length(m.lines.text); + n:=IntToStr(frmTRXControl.cmbRig.ItemIndex); + if (cqrini.ReadInteger('CW'+n,'Type',0)=1) and cqrini.ReadBool('CW'+n,'PotSpeed',False) then + Begin + frmNewQSO.sbNewQSO.Panels[4].Text := 'Pot WPM'; + edtSpeed.Enabled:=False; + end + else + edtSpeed.Enabled:=True; + //set debug rules for this form LocalDbg := dmData.DebugLevel >= 1 ; if dmData.DebugLevel < 0 then @@ -412,9 +450,18 @@ begin end; procedure TfrmCWType.edtSpeedChange(Sender: TObject); +var + n:string; begin + if Assigned(frmNewQSO.CWint) then + begin + n:=IntToStr(frmTRXControl.cmbRig.ItemIndex); frmNewQSO.CWint.SetSpeed(edtSpeed.Value); - frmNewQSO.sbNewQSO.Panels[4].Text := IntToStr(edtSpeed.Value)+'WPM'; + if (cqrini.ReadInteger('CW'+n,'Type',0)=1) and cqrini.ReadBool('CW'+n,'PotSpeed',False) then + frmNewQSO.sbNewQSO.Panels[4].Text := 'Pot WPM' + else + frmNewQSO.sbNewQSO.Panels[4].Text := IntToStr(edtSpeed.Value)+'WPM'; + end; end; procedure TfrmCWType.fraCWKeys1Resize(Sender: TObject); var @@ -556,12 +603,17 @@ end; procedure TfrmCWType.SetSpeed(change:integer); var speed : Integer = 0; -Begin + n : string; +begin if Assigned(frmNewQSO.CWint) then begin + n:=IntToStr(frmTRXControl.cmbRig.ItemIndex); speed := frmNewQSO.CWint.GetSpeed+change; frmNewQSO.CWint.SetSpeed(speed); - frmNewQSO.sbNewQSO.Panels[4].Text := IntToStr(speed)+'WPM'; + if (cqrini.ReadInteger('CW'+n,'Type',0)=1) and cqrini.ReadBool('CW'+n,'PotSpeed',False) then + frmNewQSO.sbNewQSO.Panels[4].Text := 'Pot WPM' + else + frmNewQSO.sbNewQSO.Panels[4].Text := IntToStr(speed)+'WPM'; edtSpeed.Value := speed; end; end; diff --git a/src/fCabrilloExport.lfm b/src/fCabrilloExport.lfm index 36233f6..abd1630 100644 --- a/src/fCabrilloExport.lfm +++ b/src/fCabrilloExport.lfm @@ -11,12 +11,12 @@ object frmCabrilloExport: TfrmCabrilloExport OnClose = FormClose OnCreate = FormCreate OnShow = FormShow - LCLVersion = '2.0.12.0' + LCLVersion = '2.2.4.0' object lblCabfileName: TLabel AnchorSideLeft.Control = Owner AnchorSideTop.Control = Owner Left = 6 - Height = 15 + Height = 17 Top = 6 Width = 126 BorderSpacing.Left = 6 @@ -29,9 +29,9 @@ object frmCabrilloExport: TfrmCabrilloExport AnchorSideTop.Control = lblCabfileName AnchorSideTop.Side = asrBottom Left = 6 - Height = 33 + Height = 34 Hint = 'Write export file name and path or press Browse' - Top = 33 + Top = 35 Width = 421 BorderSpacing.Top = 12 TabOrder = 0 @@ -44,7 +44,7 @@ object frmCabrilloExport: TfrmCabrilloExport AnchorSideRight.Side = asrBottom Left = 435 Height = 25 - Top = 37 + Top = 40 Width = 75 Anchors = [akTop, akRight] BorderSpacing.Right = 6 @@ -66,7 +66,7 @@ object frmCabrilloExport: TfrmCabrilloExport Cancel = True Caption = 'Close' ModalResult = 2 - TabOrder = 14 + TabOrder = 15 end object btnCabExport: TButton AnchorSideTop.Control = pbCabExport @@ -80,7 +80,7 @@ object frmCabrilloExport: TfrmCabrilloExport BorderSpacing.Right = 6 Caption = 'Export' OnClick = btnCabExportClick - TabOrder = 12 + TabOrder = 13 end object pbCabExport: TProgressBar AnchorSideLeft.Control = lblCabfileName @@ -93,8 +93,7 @@ object frmCabrilloExport: TfrmCabrilloExport Anchors = [akLeft, akBottom] BorderSpacing.Bottom = 21 Step = 1 - TabOrder = 13 - TabStop = True + TabOrder = 17 end object lblCabDone: TLabel AnchorSideLeft.Control = pbCabExport @@ -102,8 +101,8 @@ object frmCabrilloExport: TfrmCabrilloExport AnchorSideTop.Control = pbCabExport AnchorSideTop.Side = asrCenter Left = 282 - Height = 15 - Top = 649 + Height = 17 + Top = 648 Width = 34 BorderSpacing.Left = 12 Caption = 'Done' @@ -115,8 +114,8 @@ object frmCabrilloExport: TfrmCabrilloExport AnchorSideTop.Control = cmbCabContestName AnchorSideTop.Side = asrCenter Left = 6 - Height = 15 - Top = 75 + Height = 17 + Top = 78 Width = 95 BorderSpacing.Top = 6 Caption = 'Contest name:' @@ -126,23 +125,23 @@ object frmCabrilloExport: TfrmCabrilloExport AnchorSideLeft.Control = lblCabfileName AnchorSideBottom.Control = pbCabExport Left = 6 - Height = 15 - Top = 619 + Height = 17 + Top = 617 Width = 94 Anchors = [akLeft, akBottom] BorderSpacing.Bottom = 12 Caption = 'Error message' ParentColor = False - OnClick = lblCabErrorClick Visible = False + OnClick = lblCabErrorClick end object lblCabPower: TLabel AnchorSideLeft.Control = lblCabfileName AnchorSideTop.Control = cmbCabPower AnchorSideTop.Side = asrCenter Left = 6 - Height = 15 - Top = 106 + Height = 17 + Top = 109 Width = 44 Caption = 'Power:' ParentColor = False @@ -154,7 +153,7 @@ object frmCabrilloExport: TfrmCabrilloExport Left = 123 Height = 29 Hint = 'Select category-power' - Top = 99 + Top = 103 Width = 100 ItemHeight = 0 Items.Strings = ( @@ -163,15 +162,15 @@ object frmCabrilloExport: TfrmCabrilloExport 'QRP' ) Style = csDropDownList - TabOrder = 3 + TabOrder = 4 end object lblCabLocation: TLabel AnchorSideLeft.Control = lblCabfileName AnchorSideTop.Control = edtCabLocation AnchorSideTop.Side = asrCenter Left = 6 - Height = 15 - Top = 137 + Height = 17 + Top = 141 Width = 59 Caption = 'Location:' ParentColor = False @@ -181,8 +180,8 @@ object frmCabrilloExport: TfrmCabrilloExport AnchorSideTop.Control = gbCabQsoTail AnchorSideTop.Side = asrBottom Left = 6 - Height = 15 - Top = 529 + Height = 17 + Top = 544 Width = 76 BorderSpacing.Top = 15 Caption = 'Statistics:' @@ -196,9 +195,9 @@ object frmCabrilloExport: TfrmCabrilloExport AnchorSideRight.Control = edtCabFileName AnchorSideRight.Side = asrBottom Left = 123 - Height = 33 + Height = 34 Hint = 'Select or type contest name' - Top = 66 + Top = 69 Width = 304 Anchors = [akTop, akRight] AutoComplete = True @@ -267,14 +266,14 @@ object frmCabrilloExport: TfrmCabrilloExport AnchorSideRight.Side = asrBottom Left = 6 Height = 80 - Top = 286 + Top = 292 Width = 504 Anchors = [akTop, akLeft, akRight] BorderSpacing.Top = 6 Caption = 'info sent' ClientHeight = 62 ClientWidth = 502 - TabOrder = 7 + TabOrder = 8 object chkCabInfoSrst: TCheckBox AnchorSideLeft.Control = gbCabInfoSent AnchorSideTop.Control = gbCabInfoSent @@ -283,9 +282,8 @@ object frmCabrilloExport: TfrmCabrilloExport Height = 23 Hint = 'Include RST, normally YES' Top = 20 - Width = 78 + Width = 23 BorderSpacing.Left = 12 - Caption = 'inc. RST' Checked = True ParentShowHint = False ShowHint = True @@ -293,31 +291,31 @@ object frmCabrilloExport: TfrmCabrilloExport TabOrder = 0 end object cmbCabInfoSEx1: TComboBox - AnchorSideLeft.Control = chkCabInfoSrst + AnchorSideLeft.Control = edtCabInfoSrstWdt AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = lblCabSEx1Cmb AnchorSideTop.Side = asrBottom - Left = 96 - Height = 32 + Left = 100 + Height = 33 Hint = 'Exhange1 selection' - Top = 21 + Top = 23 Width = 100 - BorderSpacing.Left = 6 + BorderSpacing.Left = 21 BorderSpacing.Top = 6 ItemHeight = 0 ParentShowHint = False ShowHint = True Style = csDropDownList - TabOrder = 1 + TabOrder = 2 end object edtCabInfoSEx1Wdt: TEdit AnchorSideLeft.Control = cmbCabInfoSEx1 AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = cmbCabInfoSEx1 - Left = 202 - Height = 33 + Left = 206 + Height = 34 Hint = 'Width of stx field ' - Top = 21 + Top = 23 Width = 38 BorderSpacing.Left = 6 MaxLength = 2 @@ -325,7 +323,7 @@ object frmCabrilloExport: TfrmCabrilloExport OnExit = edtCabInfoSEx1WdtExit ParentShowHint = False ShowHint = True - TabOrder = 2 + TabOrder = 3 Text = '6' end object cmbCabInfoSEx2: TComboBox @@ -335,7 +333,7 @@ object frmCabrilloExport: TfrmCabrilloExport Left = 318 Height = 29 Hint = 'Exhange2 selection' - Top = 21 + Top = 23 Width = 100 Anchors = [akTop, akRight] BorderSpacing.Right = 6 @@ -348,16 +346,16 @@ object frmCabrilloExport: TfrmCabrilloExport ParentShowHint = False ShowHint = True Style = csDropDownList - TabOrder = 3 + TabOrder = 4 end object edtCabInfoSEx2Wdt: TEdit AnchorSideTop.Control = cmbCabInfoSEx1 AnchorSideRight.Control = gbCabInfoSent AnchorSideRight.Side = asrBottom Left = 424 - Height = 33 + Height = 34 Hint = 'Width of stx_string field ' - Top = 21 + Top = 23 Width = 38 Anchors = [akTop, akRight] BorderSpacing.Right = 40 @@ -366,14 +364,14 @@ object frmCabrilloExport: TfrmCabrilloExport OnExit = edtCabInfoSEx2WdtExit ParentShowHint = False ShowHint = True - TabOrder = 4 + TabOrder = 5 Text = '6' end object lblCabSEx1Cmb: TLabel AnchorSideLeft.Control = cmbCabInfoSEx1 AnchorSideTop.Control = gbCabInfoSent - Left = 96 - Height = 15 + Left = 100 + Height = 17 Top = 0 Width = 143 Caption = 'Exchange1 and width ' @@ -383,12 +381,40 @@ object frmCabrilloExport: TfrmCabrilloExport AnchorSideLeft.Control = cmbCabInfoSEx2 AnchorSideTop.Control = gbCabInfoSent Left = 318 - Height = 15 + Height = 17 Top = 0 Width = 143 Caption = 'Exchange2 and width ' ParentColor = False end + object edtCabInfoSrstWdt: TEdit + AnchorSideLeft.Control = chkCabInfoSrst + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = cmbCabInfoSEx1 + Left = 41 + Height = 34 + Hint = 'Width of stx field ' + Top = 23 + Width = 38 + BorderSpacing.Left = 6 + MaxLength = 2 + NumbersOnly = True + OnExit = edtCabInfoSrstWdtExit + ParentShowHint = False + ShowHint = True + TabOrder = 1 + Text = '3' + end + object lblCabInfoSrst: TLabel + AnchorSideLeft.Control = chkCabInfoSrst + AnchorSideTop.Control = lblCabSEx1Cmb + Left = 12 + Height = 17 + Top = 0 + Width = 65 + Caption = 'RST width' + ParentColor = False + end end object gbCabInfoRcvd: TGroupBox AnchorSideLeft.Control = lblCabfileName @@ -398,14 +424,14 @@ object frmCabrilloExport: TfrmCabrilloExport AnchorSideRight.Side = asrBottom Left = 6 Height = 80 - Top = 372 + Top = 378 Width = 504 Anchors = [akTop, akLeft, akRight] BorderSpacing.Top = 6 Caption = 'info rcvd' ClientHeight = 62 ClientWidth = 502 - TabOrder = 8 + TabOrder = 9 object chkCabInfoRrst: TCheckBox AnchorSideLeft.Control = gbCabInfoRcvd AnchorSideTop.Control = gbCabInfoRcvd @@ -414,9 +440,8 @@ object frmCabrilloExport: TfrmCabrilloExport Height = 23 Hint = 'Include RST, normally YES' Top = 20 - Width = 78 + Width = 23 BorderSpacing.Left = 12 - Caption = 'inc. RST' Checked = True ParentShowHint = False ShowHint = True @@ -424,16 +449,16 @@ object frmCabrilloExport: TfrmCabrilloExport TabOrder = 0 end object cmbCabInfoREx1: TComboBox - AnchorSideLeft.Control = chkCabInfoRrst + AnchorSideLeft.Control = edtCabInfoRrstWdt AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = lblCabSrxCmb AnchorSideTop.Side = asrBottom - Left = 96 + Left = 100 Height = 29 Hint = 'Exhange1 selection' - Top = 21 + Top = 23 Width = 100 - BorderSpacing.Left = 6 + BorderSpacing.Left = 21 BorderSpacing.Top = 6 ItemHeight = 0 Items.Strings = ( @@ -444,25 +469,7 @@ object frmCabrilloExport: TfrmCabrilloExport ParentShowHint = False ShowHint = True Style = csDropDownList - TabOrder = 1 - end - object edtCabInfoREx1Wdt: TEdit - AnchorSideLeft.Control = cmbCabInfoREx1 - AnchorSideLeft.Side = asrBottom - AnchorSideTop.Control = cmbCabInfoREx1 - Left = 202 - Height = 33 - Hint = 'Width of stx field ' - Top = 21 - Width = 38 - BorderSpacing.Left = 6 - MaxLength = 2 - NumbersOnly = True - OnExit = edtCabInfoREx1WdtExit - ParentShowHint = False - ShowHint = True TabOrder = 2 - Text = '6' end object cmbCabInfoREx2: TComboBox AnchorSideLeft.Side = asrBottom @@ -471,7 +478,7 @@ object frmCabrilloExport: TfrmCabrilloExport Left = 318 Height = 29 Hint = 'Exhange2 selection' - Top = 21 + Top = 23 Width = 100 Anchors = [akTop, akRight] BorderSpacing.Right = 6 @@ -484,16 +491,16 @@ object frmCabrilloExport: TfrmCabrilloExport ParentShowHint = False ShowHint = True Style = csDropDownList - TabOrder = 3 + TabOrder = 4 end object edtCabInfoREx2Wdt: TEdit AnchorSideTop.Control = cmbCabInfoREx1 AnchorSideRight.Control = gbCabInfoRcvd AnchorSideRight.Side = asrBottom Left = 424 - Height = 33 + Height = 34 Hint = 'Width of stx_string field ' - Top = 21 + Top = 23 Width = 38 Anchors = [akTop, akRight] BorderSpacing.Right = 40 @@ -502,14 +509,14 @@ object frmCabrilloExport: TfrmCabrilloExport OnExit = edtCabInfoREx2WdtExit ParentShowHint = False ShowHint = True - TabOrder = 4 + TabOrder = 5 Text = '6' end object lblCabSrxCmb: TLabel AnchorSideLeft.Control = cmbCabInfoREx1 AnchorSideTop.Control = gbCabInfoRcvd - Left = 96 - Height = 15 + Left = 100 + Height = 17 Top = 0 Width = 143 Caption = 'Exchange1 and width ' @@ -519,12 +526,58 @@ object frmCabrilloExport: TfrmCabrilloExport AnchorSideLeft.Control = cmbCabInfoREx2 AnchorSideTop.Control = gbCabInfoRcvd Left = 318 - Height = 15 + Height = 17 Top = 0 Width = 143 Caption = 'Exchange2 and width ' ParentColor = False end + object edtCabInfoREx1Wdt: TEdit + AnchorSideLeft.Control = cmbCabInfoREx1 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = cmbCabInfoREx1 + Left = 206 + Height = 34 + Hint = 'Width of stx field ' + Top = 23 + Width = 38 + BorderSpacing.Left = 6 + MaxLength = 2 + NumbersOnly = True + OnExit = edtCabInfoREx1WdtExit + ParentShowHint = False + ShowHint = True + TabOrder = 3 + Text = '6' + end + object edtCabInfoRrstWdt: TEdit + AnchorSideLeft.Control = chkCabInfoRrst + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = cmbCabInfoREx1 + Left = 41 + Height = 34 + Hint = 'Width of rst field ' + Top = 23 + Width = 38 + BorderSpacing.Left = 6 + MaxLength = 2 + NumbersOnly = True + OnExit = edtCabInfoRrstWdtExit + ParentShowHint = False + ShowHint = True + TabOrder = 1 + Text = '3' + end + object lblCabInfoRrst: TLabel + AnchorSideLeft.Control = chkCabInfoRrst + AnchorSideTop.Control = lblCabSrxCmb + Left = 12 + Height = 17 + Top = 0 + Width = 65 + Caption = 'RST width' + ParentColor = False + end end object gbCabQsoHeader: TGroupBox AnchorSideLeft.Control = lblCabfileName @@ -534,20 +587,20 @@ object frmCabrilloExport: TfrmCabrilloExport AnchorSideRight.Side = asrBottom Left = 6 Height = 80 - Top = 200 + Top = 206 Width = 504 Anchors = [akTop, akLeft, akRight] BorderSpacing.Top = 6 Caption = 'QSO: common header' ClientHeight = 62 ClientWidth = 502 - TabOrder = 6 + TabOrder = 7 object lblCabQsoHeader: TLabel AnchorSideLeft.Control = gbCabQsoHeader AnchorSideTop.Control = edtCabCallWdt AnchorSideTop.Side = asrCenter Left = 6 - Height = 15 + Height = 17 Top = 9 Width = 280 BorderSpacing.Left = 6 @@ -559,7 +612,7 @@ object frmCabrilloExport: TfrmCabrilloExport AnchorSideRight.Control = gbCabQsoHeader AnchorSideRight.Side = asrBottom Left = 458 - Height = 33 + Height = 34 Hint = 'Width of sent and rcvd callsign field' Top = 0 Width = 38 @@ -578,7 +631,7 @@ object frmCabrilloExport: TfrmCabrilloExport AnchorSideTop.Side = asrCenter AnchorSideRight.Control = edtCabCallWdt Left = 373 - Height = 15 + Height = 17 Top = 9 Width = 82 Anchors = [akTop, akRight] @@ -594,7 +647,7 @@ object frmCabrilloExport: TfrmCabrilloExport AnchorSideTop.Side = asrBottom Left = 6 Height = 23 - Top = 28 + Top = 30 Width = 277 BorderSpacing.Top = 4 Caption = 'Use UpCase letters for all QSO records' @@ -610,20 +663,20 @@ object frmCabrilloExport: TfrmCabrilloExport AnchorSideRight.Side = asrBottom Left = 6 Height = 65 - Top = 458 + Top = 464 Width = 194 BorderSpacing.Top = 6 Caption = 'QSO: tail' ClientHeight = 47 ClientWidth = 192 - TabOrder = 9 + TabOrder = 10 object lblCabQsoTail: TLabel AnchorSideTop.Control = gbCabQsoTail AnchorSideTop.Side = asrCenter AnchorSideRight.Control = cmbCabTailTxCount Left = 20 - Height = 15 - Top = 16 + Height = 17 + Top = 15 Width = 54 Anchors = [akTop, akRight] BorderSpacing.Right = 6 @@ -663,19 +716,19 @@ object frmCabrilloExport: TfrmCabrilloExport AnchorSideRight.Control = cmbCabContestName AnchorSideRight.Side = asrBottom Left = 123 - Height = 33 - Top = 128 + Height = 34 + Top = 132 Width = 304 Anchors = [akTop, akLeft, akRight] - TabOrder = 4 + TabOrder = 5 end object lblCabSoapBox: TLabel AnchorSideLeft.Control = lblCabfileName AnchorSideTop.Control = edtCabSoapBox AnchorSideTop.Side = asrCenter Left = 6 - Height = 15 - Top = 170 + Height = 17 + Top = 175 Width = 61 Caption = 'SoapBox:' ParentColor = False @@ -687,11 +740,11 @@ object frmCabrilloExport: TfrmCabrilloExport AnchorSideRight.Control = cmbCabContestName AnchorSideRight.Side = asrBottom Left = 123 - Height = 33 - Top = 161 + Height = 34 + Top = 166 Width = 304 Anchors = [akTop, akLeft, akRight] - TabOrder = 5 + TabOrder = 6 end object gbCabLayout: TGroupBox AnchorSideLeft.Side = asrBottom @@ -701,7 +754,7 @@ object frmCabrilloExport: TfrmCabrilloExport Left = 336 Height = 65 Hint = 'Save(/Load) all settings to file' - Top = 458 + Top = 464 Width = 174 Anchors = [akTop, akRight] BorderSpacing.Left = 6 @@ -710,7 +763,7 @@ object frmCabrilloExport: TfrmCabrilloExport ClientWidth = 172 ParentShowHint = False ShowHint = True - TabOrder = 11 + TabOrder = 12 object btCabSave: TButton AnchorSideLeft.Control = gbCabLayout AnchorSideTop.Control = gbCabLayout @@ -748,7 +801,7 @@ object frmCabrilloExport: TfrmCabrilloExport AnchorSideRight.Control = gbCabLayout Left = 206 Height = 65 - Top = 458 + Top = 464 Width = 124 Anchors = [akTop, akLeft, akRight] BorderSpacing.Left = 6 @@ -756,16 +809,16 @@ object frmCabrilloExport: TfrmCabrilloExport ClientHeight = 47 ClientWidth = 122 ParentShowHint = False - TabOrder = 10 + TabOrder = 11 object edtCabCountC: TEdit AnchorSideLeft.Control = gbCabCoCount AnchorSideLeft.Side = asrCenter AnchorSideTop.Control = gbCabCoCount AnchorSideTop.Side = asrCenter Left = 26 - Height = 33 + Height = 34 Hint = 'Type prefix for qsos to count' - Top = 7 + Top = 6 Width = 70 CharCase = ecUppercase OnExit = edtCabCountCExit @@ -782,15 +835,16 @@ object frmCabrilloExport: TfrmCabrilloExport AnchorSideRight.Side = asrBottom AnchorSideBottom.Control = lblCabError Left = 6 - Height = 63 - Top = 550 + Height = 44 + Top = 567 Width = 504 Anchors = [akTop, akLeft, akRight, akBottom] BorderSpacing.Top = 6 BorderSpacing.Bottom = 6 ReadOnly = True ScrollBars = ssAutoBoth - TabOrder = 15 + TabOrder = 16 + TabStop = False Visible = False end object btnCabFrmFlt: TButton @@ -801,40 +855,40 @@ object frmCabrilloExport: TfrmCabrilloExport AnchorSideRight.Side = asrBottom Left = 435 Height = 25 - Top = 70 + Top = 74 Width = 75 Anchors = [akTop, akRight] BorderSpacing.Right = 6 Caption = 'Frm Flt' OnClick = btnCabFrmFltClick - TabOrder = 16 + TabOrder = 3 end object btnResultFile: TButton AnchorSideRight.Control = btnCabClose AnchorSideRight.Side = asrBottom AnchorSideBottom.Control = mCabStatistics - Left = 364 + Left = 354 Height = 25 - Top = 528 + Top = 536 Width = 156 Anchors = [akRight, akBottom] BorderSpacing.Bottom = 2 Caption = 'Open exported file' OnClick = btnResultFileClick - TabOrder = 17 + TabOrder = 14 end object dlgCabSave: TSaveDialog Title = 'Save with file name' DefaultExt = '.cbr' Filter = 'Cabrillo file|*.cbr' - left = 448 - top = 112 + Left = 448 + Top = 112 end object dlgCabOpen: TOpenDialog Title = 'Open file' DefaultExt = '.templ' Filter = 'Cabrillo template|*.templ' - left = 448 - top = 160 + Left = 448 + Top = 160 end end diff --git a/src/fCabrilloExport.pas b/src/fCabrilloExport.pas index eb2cd64..b98b6ac 100644 --- a/src/fCabrilloExport.pas +++ b/src/fCabrilloExport.pas @@ -45,12 +45,14 @@ type dlgCabSave: TSaveDialog; edtCabCountC: TEdit; edtCabCallWdt: TEdit; + edtCabInfoREx1Wdt: TEdit; + edtCabInfoRrstWdt: TEdit; + edtCabInfoSrstWdt: TEdit; edtCabLocation: TEdit; edtCabInfoREx2Wdt: TEdit; edtCabInfoSEx1Wdt: TEdit; edtCabInfoSEx2Wdt: TEdit; edtCabFileName: TEdit; - edtCabInfoREx1Wdt: TEdit; edtCabSoapBox: TEdit; gbCabInfoRcvd: TGroupBox; gbCabInfoSent: TGroupBox; @@ -58,6 +60,8 @@ type gbCabQsoTail: TGroupBox; gbCabLayout: TGroupBox; gbCabCoCount: TGroupBox; + lblCabInfoRrst: TLabel; + lblCabInfoSrst: TLabel; lblCabQsoHeader1: TLabel; lblCabSoapBox: TLabel; lblCabQsoHeader: TLabel; @@ -88,9 +92,11 @@ type procedure edtCabCallWdtExit(Sender: TObject); procedure edtCabInfoREx2WdtExit(Sender: TObject); procedure edtCabInfoREx1WdtExit(Sender: TObject); + procedure edtCabInfoRrstWdtExit(Sender: TObject); procedure edtCabInfoSEx2WdtExit(Sender: TObject); procedure edtCabInfoSEx1WdtExit(Sender: TObject); procedure edtCabCountCExit(Sender: TObject); + procedure edtCabInfoSrstWdtExit(Sender: TObject); procedure FormClose(Sender : TObject; var CloseAction : TCloseAction); procedure FormCreate(Sender: TObject); procedure FormShow(Sender : TObject); @@ -136,12 +142,14 @@ begin edtCabCallWdt.Text:= cqrini.ReadString('CabrilloExport','CallsWidth', '13'); chkCabInfoSrst.Checked:= cqrini.ReadBool('CabrilloExport','incRSTs',True); + edtCabInfoSrstWdt.Text := cqrini.ReadString('CabrilloExport','SRSTWidth', '3'); cmbCabInfoSEx1.ItemIndex:= cqrini.ReadInteger('CabrilloExport','StxOrder',0); edtCabInfoSEx1Wdt.Text:= cqrini.ReadString('CabrilloExport','StxWidth','6'); cmbCabInfoSEx2.ItemIndex := cqrini.ReadInteger('CabrilloExport','StxStringOrder',0); edtCabInfoSEx2Wdt.Text := cqrini.ReadString('CabrilloExport','StxStringWidth', '6'); chkCabInfoRrst.Checked:= cqrini.ReadBool('CabrilloExport','incRSTr',True); + edtCabInfoRrstWdt.Text := cqrini.ReadString('CabrilloExport','RRSTWidth', '3'); cmbCabInfoREx1.ItemIndex:= cqrini.ReadInteger('CabrilloExport','SrxOrder',0); edtCabInfoREx1Wdt.Text:= cqrini.ReadString('CabrilloExport','SrxWidth','6'); cmbCabInfoREx2.ItemIndex := cqrini.ReadInteger('CabrilloExport','SrxStringOrder',0); @@ -189,12 +197,14 @@ begin cqrini.WriteString('CabrilloExport','CallsWidth', edtCabCallWdt.Text); cqrini.WriteBool('CabrilloExport','incRSTs',chkCabInfoSrst.Checked); + cqrini.WriteString('CabrilloExport','SRSTWidth', edtCabInfoSrstWdt.Text); cqrini.WriteInteger('CabrilloExport','StxOrder',cmbCabInfoSEx1.ItemIndex); cqrini.WriteString('CabrilloExport','StxWidth', edtCabInfoSEx1Wdt.Text); cqrini.WriteInteger('CabrilloExport','StxStringOrder',cmbCabInfoSEx2.ItemIndex); cqrini.WriteString('CabrilloExport','StxStringWidth', edtCabInfoSEx2Wdt.Text); cqrini.WriteBool('CabrilloExport','incRSTr',chkCabInfoRrst.Checked); + cqrini.WriteString('CabrilloExport','RRSTWidth', edtCabInfoRrstWdt.Text); cqrini.WriteInteger('CabrilloExport','SrxOrder',cmbCabInfoREx1.ItemIndex); cqrini.WriteString('CabrilloExport','SrxWidth', edtCabInfoREx1Wdt.Text); cqrini.WriteInteger('CabrilloExport','SrxStringOrder',cmbCabInfoREx2.ItemIndex); @@ -291,6 +301,7 @@ end; procedure TfrmCabrilloExport.btnCabBrowseClick(Sender : TObject); begin dlgCabSave.InitialDir:=dmData.UsrHomeDir; + dlgCabSave.DefaultExt:='.cbr'; if dlgCabSave.Execute then edtCabFileName.Text := dlgCabSave.FileName end; @@ -391,6 +402,11 @@ Begin end end; +procedure TfrmCabrilloExport.edtCabInfoSrstWdtExit(Sender: TObject); +begin + edtCabInfoSrstWdt.Text:=NonZero(edtCabInfoSrstWdt.Text); +end; + procedure TfrmCabrilloExport.edtCabInfoSEx2WdtExit(Sender: TObject); begin edtCabInfoSEx2Wdt.Text:=NonZero(edtCabInfoSEx2Wdt.Text); @@ -400,6 +416,12 @@ procedure TfrmCabrilloExport.edtCabInfoREx1WdtExit(Sender: TObject); begin edtCabInfoREx1Wdt.Text:=NonZero(edtCabInfoREx1Wdt.Text); end; + +procedure TfrmCabrilloExport.edtCabInfoRrstWdtExit(Sender: TObject); +begin + edtCabInfoRrstWdt.Text:=NonZero(edtCabInfoRrstWdt.Text); +end; + procedure TfrmCabrilloExport.edtCabInfoREx2WdtExit(Sender: TObject); begin edtCabInfoREx2Wdt.Text:=NonZero(edtCabInfoREx2Wdt.Text); @@ -520,16 +542,17 @@ begin try try AssignFile(r,'/tmp/CabrilloReject.log'); Rewrite(r); - pbCabExport.Max := dmData.qCQRLOG.RecordCount; dmData.qCQRLOG.Last; + pbCabExport.Max := dmData.qCQRLOG.RecordCount; + while not dmData.qCQRLOG.bof do begin tmp:=''; // Check for missing mandatory fields if (dmData.qCQRLOG.FieldByName('qsodate').AsString = '') then tmp:=tmp+'Missing qsodate, '; - if (dmData.qCQRLOG.FieldByName('time_on').AsString = '') then - tmp:=tmp+'Missing time_on, '; + if (dmData.qCQRLOG.FieldByName('time_off').AsString = '') then + tmp:=tmp+'Missing time_off, '; if (dmData.qCQRLOG.FieldByName('callsign').AsString = '') then tmp:=tmp+'Missing callsign, '; if (CabrilloBandToFreq(dmData.qCQRLOG.FieldByName('band').AsString) = '') then @@ -617,46 +640,46 @@ begin tmp:=tmp + CabrilloMode(dmData.qCQRLOG.FieldByName('mode').AsString)+' '+ dmData.qCQRLOG.FieldByName('qsodate').AsString+' '+ - StringReplace(dmData.qCQRLOG.FieldByName('time_on').AsString,':','',[rfReplaceAll, rfIgnoreCase])+' '+ - Format('%-'+edtCabCallWdt.Text+'.'+edtCabCallWdt.Text+'s', [mycall]); + StringReplace(dmData.qCQRLOG.FieldByName('time_off').AsString,':','',[rfReplaceAll, rfIgnoreCase])+' '+ + Format('%0:-'+edtCabCallWdt.Text+'s', [mycall]); //end of common header - if chkCabInfoSrst.Checked then tmp:=tmp+' '+ Format('%-3s', [dmData.qCQRLOG.FieldByName('rst_s').AsString]); + if chkCabInfoSrst.Checked then tmp:=tmp+' '+ Format('%0:-'+edtCabInfoSrstWdt.Text+'s', [dmData.qCQRLOG.FieldByName('rst_s').AsString]); if (cmbCabInfoSEx1.ItemIndex > 0) then Begin if (cmbCabInfoSEx1.Text = 'my_name') then - tmp:=tmp+' '+Format('%-'+edtCabInfoSEx1Wdt.Text+'.'+edtCabInfoSEx1Wdt.Text+'s', [myname]) + tmp:=tmp+' '+Format('%0:-'+edtCabInfoSEx1Wdt.Text+'s', [myname]) else - tmp:=tmp+' '+Format('%-'+edtCabInfoSEx1Wdt.Text+'.'+edtCabInfoSEx1Wdt.Text+'s',[dmData.qCQRLOG.FieldByName( + tmp:=tmp+' '+Format('%0:-'+edtCabInfoSEx1Wdt.Text+'s',[dmData.qCQRLOG.FieldByName( cmbCabInfoSEx1.Text).AsString]) ; end; if (cmbCabInfoSEx2.ItemIndex > 0) then Begin if (cmbCabInfoSEx2.Text = 'my_name') then - tmp:=tmp+' '+Format('%-'+edtCabInfoSEx2Wdt.Text+'.'+edtCabInfoSEx2Wdt.Text+'s', [myname]) + tmp:=tmp+' '+Format('%0:-'+edtCabInfoSEx2Wdt.Text+'s', [myname]) else - tmp:=tmp+' '+Format('%-'+edtCabInfoSEx2Wdt.Text+'.'+edtCabInfoSEx2Wdt.Text+'s',[dmData.qCQRLOG.FieldByName( + tmp:=tmp+' '+Format('%0:-'+edtCabInfoSEx2Wdt.Text+'s',[dmData.qCQRLOG.FieldByName( cmbCabInfoSEx2.Text).AsString]) ; end; //end of info sent tmp:=tmp+' '+ call; - if chkCabInfoRrst.Checked then tmp:=tmp+' '+ Format('%-3s', [dmData.qCQRLOG.FieldByName('rst_r').AsString]); + if chkCabInfoRrst.Checked then tmp:=tmp+' '+ Format('%0:-'+edtCabInfoRrstWdt.Text+'s', [dmData.qCQRLOG.FieldByName('rst_r').AsString]); if (cmbCabInfoREx1.ItemIndex > 0) then Begin - tmp:=tmp+' '+Format('%-'+edtCabInfoREx1Wdt.Text+'.'+edtCabInfoREx1Wdt.Text+'s',[dmData.qCQRLOG.FieldByName( + tmp:=tmp+' '+Format('%0:-'+edtCabInfoREx1Wdt.Text+'s',[dmData.qCQRLOG.FieldByName( cmbCabInfoREx1.Text).AsString]) ; end; if (cmbCabInfoREx2.ItemIndex > 0) then Begin - tmp:=tmp+' '+Format('%-'+edtCabInfoREx2Wdt.Text+'.'+edtCabInfoREx2Wdt.Text+'s',[dmData.qCQRLOG.FieldByName( + tmp:=tmp+' '+Format('%0:-'+edtCabInfoREx2Wdt.Text+'s',[dmData.qCQRLOG.FieldByName( cmbCabInfoREx2.Text).AsString]) ; end; //end of info rcvd - if (cmbCabTailTxCount.Text<>'') then tmp:=tmp+' '+Format('%1s',[ cmbCabTailTxCount.Text]); + if (cmbCabTailTxCount.Text<>'') then tmp:=tmp+' '+Format('%0:1s',[ cmbCabTailTxCount.Text]); if chkUpCase.Checked then tmp:=UpperCase(tmp); @@ -800,7 +823,11 @@ end; procedure TfrmCabrilloExport.btCabLoadClick(Sender: TObject); begin dlgCabOpen.InitialDir := dmData.HomeDir; - if dlgCabOpen.Execute then loadCabLay(dlgCabOpen.FileName); + if dlgCabOpen.Execute then + if FileExists(dlgCabOpen.FileName) then //with QT5 opendialog user can enter filename that may not exist + loadCabLay(dlgCabOpen.FileName) + else + ShowMessage('File not found!'); end; procedure TfrmCabrilloExport.saveCabLay(filename:String); var @@ -816,12 +843,14 @@ begin filini.WriteString('CabrilloExport','CallsWidth', edtCabCallWdt.Text); filini.WriteBool('CabrilloExport','incRSTs',chkCabInfoSrst.Checked); + filini.WriteString('CabrilloExport','SRSTWidth', edtCabInfoSrstWdt.Text); filini.WriteInteger('CabrilloExport','StxOrder',cmbCabInfoSEx1.ItemIndex); filini.WriteString('CabrilloExport','StxWidth', edtCabInfoSEx1Wdt.Text); filini.WriteInteger('CabrilloExport','StxStringOrder',cmbCabInfoSEx2.ItemIndex); filini.WriteString('CabrilloExport','StxStringWidth', edtCabInfoSEx2Wdt.Text); filini.WriteBool('CabrilloExport','incRSTr',chkCabInfoRrst.Checked); + filini.WriteString('CabrilloExport','RRSTWidth', edtCabInfoRrstWdt.Text); filini.WriteInteger('CabrilloExport','SrxOrder',cmbCabInfoREx1.ItemIndex); filini.WriteString('CabrilloExport','SrxWidth', edtCabInfoREx1Wdt.Text); filini.WriteInteger('CabrilloExport','SrxStringOrder',cmbCabInfoREx2.ItemIndex); @@ -854,12 +883,14 @@ var edtCabCallWdt.Text:= filini.ReadString('CabrilloExport','CallsWidth', '13'); chkCabInfoSrst.Checked:= filini.ReadBool('CabrilloExport','incRSTs',True); + edtCabInfoSrstWdt.Text := filini.ReadString('CabrilloExport','SRSTWidth', '3'); cmbCabInfoSEx1.ItemIndex:= filini.ReadInteger('CabrilloExport','StxOrder',0); edtCabInfoSEx1Wdt.Text:= filini.ReadString('CabrilloExport','StxWidth','6'); cmbCabInfoSEx2.ItemIndex := filini.ReadInteger('CabrilloExport','StxStringOrder',0); edtCabInfoSEx2Wdt.Text := filini.ReadString('CabrilloExport','StxStringWidth', '6'); chkCabInfoRrst.Checked:= filini.ReadBool('CabrilloExport','incRSTr',True); + edtCabInfoRrstWdt.Text := filini.ReadString('CabrilloExport','RRSTWidth', '3'); cmbCabInfoREx1.ItemIndex:= filini.ReadInteger('CabrilloExport','SrxOrder',0); edtCabInfoREx1Wdt.Text:= filini.ReadString('CabrilloExport','SrxWidth','6'); cmbCabInfoREx2.ItemIndex := filini.ReadInteger('CabrilloExport','SrxStringOrder',0); diff --git a/src/fChangeFreq.lfm b/src/fChangeFreq.lfm index d2332ea..8bc0930 100644 --- a/src/fChangeFreq.lfm +++ b/src/fChangeFreq.lfm @@ -42,7 +42,7 @@ object frmChangeFreq: TfrmChangeFreq Height = 17 Top = 72 Width = 32 - Caption = 'RTTY' + Caption = 'DATA' ParentColor = False end object Label5: TLabel @@ -77,7 +77,7 @@ object frmChangeFreq: TfrmChangeFreq OnKeyPress = ChkKeyPress TabOrder = 2 end - object edtRTTY: TEdit + object edtData: TEdit Left = 168 Height = 34 Top = 89 diff --git a/src/fChangeFreq.pas b/src/fChangeFreq.pas index f540d51..5ff6230 100644 --- a/src/fChangeFreq.pas +++ b/src/fChangeFreq.pas @@ -17,7 +17,7 @@ type btnCancel: TButton; edtRXOffset : TEdit; edtCW: TEdit; - edtRTTY: TEdit; + edtData: TEdit; edtEnd: TEdit; edtBegin: TEdit; edtTXOffset : TEdit; @@ -70,10 +70,10 @@ begin exit end; - if NOT TryStrToCurr(edtRTTY.Text,f) then + if NOT TryStrToCurr(edtData.Text,f) then begin Application.MessageBox('You must enter correct frequency!','Error',mb_OK+mb_IconError); - edtRTTY.SetFocus; + edtData.SetFocus; exit end; diff --git a/src/fConfigStorage.pas b/src/fConfigStorage.pas index 31846da..4c4e6c1 100644 --- a/src/fConfigStorage.pas +++ b/src/fConfigStorage.pas @@ -118,7 +118,7 @@ begin cmbStoreZipCode.ItemIndex := SectionExists('ZipCode',Sections); cmbStoreLoTW.ItemIndex := SectionExists('LoTW',Sections); - cmbStoreCWInterface.ItemIndex := SectionExists('CW',Sections); + cmbStoreCWInterface.ItemIndex := SectionExists('CW1',Sections); cmbStoreFldigiInterface.ItemIndex := SectionExists('fldigi',Sections); cmbStoreAutoBackup.ItemIndex := SectionExists('Backup',Sections); cmbStoreExtViewers.ItemIndex := SectionExists('ExtView',Sections); @@ -146,11 +146,11 @@ begin if cmbStoreVisColumns.ItemIndex>0 then Sections := Sections + 'Columns,'; if cmbStoreTRXControl.ItemIndex>0 then - Sections := Sections + 'TRX,TRX1,TRX2,'; + Sections := Sections + 'TRX,TRX1,TRX2,TRX3,TRX4,TRX5,TRX6,'; if cmbStoreRotorControl.ItemIndex>0 then Sections := Sections + 'ROT,ROT1,ROT2,'; - if cmbStoreModes.ItemIndex>=0 then - Sections := Sections + 'Band1,Band2,Modes,'; + if cmbStoreModes.ItemIndex>0 then + Sections := Sections + 'Band1,Band2,Band3,Band4,Band5,Band6,Modes,'; if cmbStoreExport.ItemIndex>0 then Sections := Sections + 'Export,'; if cmbStoreCluster.ItemIndex>0 then @@ -168,7 +168,7 @@ begin if cmbStoreLoTW.ItemIndex>0 then Sections := Sections + 'LoTW,'; if cmbStoreCWInterface.ItemIndex>0 then - Sections := Sections + 'CW,'; + Sections := Sections + 'CW,CW1,CW2,CW3,CW4,CW5,CW6'; if cmbStoreFldigiInterface.ItemIndex>0 then Sections := Sections + 'fldigi,wsjt,n1mm'; if cmbStoreAutoBackup.ItemIndex>0 then @@ -182,7 +182,7 @@ begin if cmbStoreOnlineLog.ItemIndex>0 then Sections := Sections + 'OnlineLog,'; if cmbStoreWindowSize.ItemIndex>0 then - Sections := Sections + 'WindowSize, Window,Grayline,'; + Sections := Sections + 'WindowSize,Window,Grayline,'; if cmbStoreColumnSize.ItemIndex>0 then Sections := Sections + 'ColumnSize,'; cqrini.WriteString('ConfigStorage','Items',Sections); diff --git a/src/fContest.lfm b/src/fContest.lfm index 664145c..0a56c99 100644 --- a/src/fContest.lfm +++ b/src/fContest.lfm @@ -1,26 +1,26 @@ object frmContest: TfrmContest - Left = 370 - Height = 178 - Top = 281 - Width = 706 + Left = 378 + Height = 367 + Top = 156 + Width = 685 HelpType = htKeyword HelpKeyword = 'help/contest.html' Caption = 'Contest' - ClientHeight = 178 - ClientWidth = 706 + ClientHeight = 367 + ClientWidth = 685 OnClose = FormClose OnCreate = FormCreate OnHide = FormHide OnKeyDown = FormKeyDown OnShow = FormShow - LCLVersion = '2.0.12.0' + LCLVersion = '2.2.6.0' object edtCall: TEdit AnchorSideLeft.Control = lblContestName AnchorSideTop.Control = lblCall AnchorSideTop.Side = asrBottom - Left = 17 + Left = 6 Height = 34 - Top = 59 + Top = 124 Width = 140 AutoSelect = False CharCase = ecUppercase @@ -29,28 +29,28 @@ object frmContest: TfrmContest OnExit = edtCallExit OnKeyDown = edtCallKeyDown OnKeyPress = edtCallKeyPress - TabOrder = 0 + TabOrder = 1 end object edtRSTs: TEdit AnchorSideLeft.Control = edtCall AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = edtCall - Left = 157 + Left = 146 Height = 34 - Top = 59 + Top = 124 Width = 50 MaxLength = 20 OnKeyDown = edtCallKeyDown - TabOrder = 7 + TabOrder = 8 end object edtSTX: TEdit AnchorSideLeft.Control = edtRSTs AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = edtRSTs - Left = 207 + Left = 196 Height = 34 - Hint = 'contest serial number sent, max 6 characters' - Top = 59 + Hint = 'Contest serial number sent, max 6 characters' + Top = 124 Width = 50 MaxLength = 6 OnExit = edtSTXExit @@ -58,16 +58,16 @@ object frmContest: TfrmContest OnKeyPress = edtSTXKeyPress ParentShowHint = False ShowHint = True - TabOrder = 8 + TabOrder = 15 end object edtSTXStr: TEdit AnchorSideLeft.Control = edtSTX AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = edtSTX - Left = 257 + Left = 246 Height = 34 - Hint = 'contest exchange message sent, max 50 characters' - Top = 59 + Hint = 'Contest exchange message sent, max 50 characters' + Top = 124 Width = 100 MaxLength = 50 OnEnter = edtSTXStrEnter @@ -75,122 +75,131 @@ object frmContest: TfrmContest OnKeyDown = edtCallKeyDown ParentShowHint = False ShowHint = True - TabOrder = 13 + TabOrder = 14 end object edtRSTr: TEdit AnchorSideLeft.Control = edtSTXStr AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = edtSTXStr - Left = 373 + Left = 362 Height = 34 - Top = 59 + Top = 124 Width = 50 BorderSpacing.Left = 16 MaxLength = 20 + OnEnter = edtRSTrEnter OnKeyDown = edtCallKeyDown - TabOrder = 1 + TabOrder = 2 end object edtSRX: TEdit AnchorSideLeft.Control = edtRSTr AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = edtRSTr - Left = 423 + Left = 412 Height = 34 - Hint = 'contest serial number received, max 6 characters' - Top = 59 + Hint = 'Contest serial number received, max 6 characters' + Top = 124 Width = 50 MaxLength = 6 + OnChange = edtSRXChange + OnEnter = edtRSTrEnter OnExit = edtSRXExit OnKeyDown = edtCallKeyDown OnKeyPress = edtSTXKeyPress ParentShowHint = False ShowHint = True - TabOrder = 2 + TabOrder = 3 end object btSave: TButton AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = lblMSGr AnchorSideRight.Control = Owner AnchorSideRight.Side = asrBottom - Left = 609 + Left = 588 Height = 30 - Top = 42 + Top = 107 Width = 80 Anchors = [akTop, akRight] BorderSpacing.Right = 17 Caption = 'Save QSO' OnClick = btSaveClick - TabOrder = 4 + TabOrder = 5 end object edtSRXStr: TEdit AnchorSideLeft.Control = edtSRX AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = edtRSTr - Left = 473 + Left = 462 Height = 34 - Hint = 'contest exchange message sent, max 50 characters' - Top = 59 + Hint = 'Contest exchange message sent, max 50 characters' + Top = 124 Width = 100 MaxLength = 50 OnChange = edtSRXStrChange + OnEnter = edtRSTrEnter OnKeyDown = edtCallKeyDown ParentShowHint = False ShowHint = True - TabOrder = 3 + TabOrder = 4 end object lblCall: TLabel AnchorSideLeft.Control = lblContestName - AnchorSideTop.Control = chkTabAll + AnchorSideTop.Control = CQpanel AnchorSideTop.Side = asrBottom - Left = 17 + Left = 6 Height = 17 - Top = 42 + Top = 107 Width = 25 - BorderSpacing.Top = 1 + BorderSpacing.Top = 3 Caption = 'Call' ParentColor = False end object lblRSTs: TLabel + AnchorSideLeft.Control = edtRSTs AnchorSideTop.Control = lblCall - Left = 161 + Left = 146 Height = 17 - Top = 42 + Top = 107 Width = 36 Caption = 'RST s' ParentColor = False end object lblMSGs: TLabel + AnchorSideLeft.Control = edtSTXStr AnchorSideTop.Control = lblNRs - Left = 257 + Left = 246 Height = 17 - Top = 42 + Top = 107 Width = 41 Caption = 'MSG s' ParentColor = False end object lblRSTr: TLabel + AnchorSideLeft.Control = edtRSTr AnchorSideTop.Control = lblMSGs - Left = 377 + Left = 362 Height = 17 - Top = 42 + Top = 107 Width = 34 Caption = 'RST r' ParentColor = False end object lblNRr: TLabel + AnchorSideLeft.Control = edtSRX AnchorSideTop.Control = lblRSTr - Left = 425 + Left = 412 Height = 17 - Top = 42 + Top = 107 Width = 28 Caption = 'NR r' ParentColor = False end object lblMSGr: TLabel + AnchorSideLeft.Control = edtSRXStr AnchorSideTop.Control = lblNRr - Left = 481 + Left = 462 Height = 17 - Top = 42 + Top = 107 Width = 39 Caption = 'MSG r' ParentColor = False @@ -198,21 +207,25 @@ object frmContest: TfrmContest object chkNRInc: TCheckBox AnchorSideLeft.Control = edtSTX AnchorSideTop.Control = chkTrueRST - Left = 207 + Left = 196 Height = 23 - Top = 93 + Hint = 'When cheked STX number is created from 001.'#10'Number can be edited in case of wrong entry and counting'#10'increases from number shown when QSO is saved.' + Top = 158 Width = 45 Caption = 'Inc' OnChange = chkNRIncChange OnClick = chkNRIncClick + ParentShowHint = False + ShowHint = True TabOrder = 9 TabStop = False end object lblNRs: TLabel + AnchorSideLeft.Control = edtSTX AnchorSideTop.Control = lblRSTs - Left = 209 + Left = 196 Height = 17 - Top = 42 + Top = 107 Width = 30 Caption = 'NR s' ParentColor = False @@ -220,72 +233,85 @@ object frmContest: TfrmContest object chkLoc: TCheckBox AnchorSideLeft.Control = edtSRXStr AnchorSideTop.Control = chkNoNr - Left = 473 + Left = 462 Height = 23 - Top = 93 + Hint = 'Several options to choose with right mouse click.'#10'When one of them checked saving QSO will copy '#10'received message to that column of log'#10'.'#10'If you select option, remember also check the chkbox!'#10'.'#10'Received message is, of course, always saved to SRX_String'#10'column too.' + Top = 158 Width = 102 Caption = 'MSG is Grid' + ParentShowHint = False PopupMenu = popSetMsg - TabOrder = 14 + ShowHint = True + TabOrder = 10 TabStop = False end object chkSpace: TCheckBox AnchorSideLeft.Control = lblContestName AnchorSideTop.Control = edtCall AnchorSideTop.Side = asrBottom - Left = 17 + Left = 6 Height = 23 - Top = 93 + Hint = 'When checked spacebar works like Tab key.'#10'NOTE: prevents space(s) in MSG received' + Top = 158 Width = 113 Caption = 'SPACE is TAB' - TabOrder = 11 + ParentShowHint = False + ShowHint = True + TabOrder = 18 TabStop = False end object chkNoNr: TCheckBox AnchorSideLeft.Control = edtSRX AnchorSideTop.Control = chkNRInc - Left = 423 + Left = 412 Height = 23 - Top = 93 + Hint = 'When checked Tab skips this column (contest has no serial Nr)' + Top = 158 Width = 44 Caption = 'No' OnChange = chkNoNrChange - TabOrder = 15 + ParentShowHint = False + ShowHint = True + TabOrder = 12 TabStop = False end object chkTrueRST: TCheckBox AnchorSideLeft.Control = edtRSTs AnchorSideTop.Control = chkSpace - Left = 157 + Left = 146 Height = 23 - Top = 93 + Hint = 'When checked Tab stops to RST(s) allowing entering of true reports' + Top = 158 Width = 46 Caption = 'Tru' OnChange = chkTrueRSTChange - TabOrder = 12 + ParentShowHint = False + ShowHint = True + TabOrder = 13 TabStop = False end object btClearQso: TButton AnchorSideLeft.Control = btSave AnchorSideTop.Control = btSave AnchorSideTop.Side = asrBottom - Left = 609 + Left = 588 Height = 30 - Top = 74 + Top = 139 Width = 80 BorderSpacing.Top = 2 Caption = 'Clear QSO' OnClick = btClearQsoClick - TabOrder = 6 + TabOrder = 7 end object btnHelp: TSpeedButton - AnchorSideTop.Control = Owner + AnchorSideTop.Control = cmbContestName + AnchorSideTop.Side = asrCenter AnchorSideRight.Control = Owner AnchorSideRight.Side = asrBottom - Left = 678 + Left = 657 Height = 25 Hint = 'Help' - Top = 3 + Top = 11 Width = 25 Anchors = [akTop, akRight] BorderSpacing.Top = 3 @@ -329,11 +355,11 @@ object frmContest: TfrmContest object lblContestName: TLabel AnchorSideLeft.Control = Owner AnchorSideTop.Control = cmbContestName - Left = 17 + Left = 6 Height = 17 - Top = 1 + Top = 6 Width = 91 - BorderSpacing.Left = 17 + BorderSpacing.Left = 6 Caption = 'Contest name' ParentColor = False end @@ -342,16 +368,15 @@ object frmContest: TfrmContest AnchorSideTop.Control = Owner AnchorSideRight.Control = edtSRXStr AnchorSideRight.Side = asrBottom - Left = 141 + Left = 130 Height = 34 - Hint = 'contestname, choose ADIF contest_id via combobox or type freestyle max 40 characters' - Top = 1 + Hint = 'Contestname, choose ADIF contest_id via combobox '#10'or type free text max 40 characters.'#10'Recommended to add contest year(week/month/day) if several'#10'contests are kept in same log. Helps Contest filter usage'#10'.'#10'If contest name combo box has name "Status" view is updated by '#10'CommonStatus rules. User can adjust that view.'#10'There are also predefined strings that cause contest specific '#10'Status displayed' + Top = 6 Width = 432 Anchors = [akTop, akRight] AutoComplete = True AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending] - BorderSpacing.Left = 30 - BorderSpacing.Top = 1 + BorderSpacing.Top = 6 ItemHeight = 0 Items.Strings = ( '070-160M-SPRINT' @@ -580,33 +605,42 @@ object frmContest: TfrmContest 'YUDXC' ) MaxLength = 40 + OnExit = cmbContestNameExit ParentShowHint = False ShowHint = True - TabOrder = 10 + TabOrder = 11 TabStop = False end object chkQsp: TCheckBox AnchorSideLeft.Control = edtSTXStr AnchorSideTop.Control = chkNRInc - Left = 257 + Left = 246 Height = 23 - Top = 93 + Hint = 'When checked allows circulating STX_String.'#10'I.E. set MSG_s at start, after 1st QSO is saved your MSG_s'#10'changes to MSG_r received from last logged QSO.' + Top = 158 Width = 51 Caption = 'Qsp' OnChange = chkQspChange + ParentShowHint = False + ShowHint = True TabOrder = 16 TabStop = False end object chkTabAll: TCheckBox - AnchorSideLeft.Control = lblContestName - AnchorSideTop.Control = lblContestName + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = cmbContestName AnchorSideTop.Side = asrBottom - Left = 17 + Left = 6 Height = 23 - Top = 18 + Hint = 'When checked TAB will move through all columns in order' + Top = 43 Width = 106 + BorderSpacing.Left = 6 + BorderSpacing.Top = 3 Caption = 'TAB in order' OnChange = chkTabAllChange + ParentShowHint = False + ShowHint = True TabOrder = 17 TabStop = False end @@ -616,8 +650,8 @@ object frmContest: TfrmContest AnchorSideBottom.Control = Owner Left = 0 Height = 19 - Top = 159 - Width = 706 + Top = 348 + Width = 685 Panels = < item Text = '0' @@ -646,11 +680,12 @@ object frmContest: TfrmContest AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = cmbContestName AnchorSideTop.Side = asrCenter - Left = 591 - Height = 1 - Top = 18 - Width = 1 - BorderSpacing.Left = 18 + Left = 571 + Height = 17 + Top = 15 + Width = 33 + BorderSpacing.Left = 9 + Caption = 'WPM' ParentColor = False end object rbDupeCheck: TRadioButton @@ -659,51 +694,60 @@ object frmContest: TfrmContest AnchorSideTop.Side = asrBottom Left = 17 Height = 23 - Top = 124 + Hint = 'Dupe = station already worked in this band.'#10'When selected, with date, duplicate cheking starts from set date.'#10'Date is needed if you have several contests in same log'#10'.'#10'With own log for every contest date is not needed to be set'#10'.'#10'Turns call column text to bold red. If QSO is how ever logged '#10'adds "/D" to RSTsend if "Mark dupe" is cheked.'#10' ' + Top = 189 Width = 102 BorderSpacing.Left = 17 BorderSpacing.Top = 8 Caption = 'Dupe check' Checked = True - TabOrder = 21 + ParentShowHint = False + ShowHint = True + TabOrder = 22 TabStop = True end object rbNoMode4Dupe: TRadioButton AnchorSideLeft.Control = btDupChkStart AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = rbDupeCheck - Left = 156 + Left = 144 Height = 23 - Top = 124 + Hint = 'This selection allows same station to be worked in same band'#10' if QSO mode is different.'#10#10'Otherwise like "Dupe check" selction.' + Top = 189 Width = 122 - BorderSpacing.Left = 18 + BorderSpacing.Left = 6 Caption = 'NoMode4Dupe' - TabOrder = 19 + ParentShowHint = False + ShowHint = True + TabOrder = 20 end object rbIgnoreDupes: TRadioButton AnchorSideLeft.Control = rbNoMode4Dupe AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = rbDupeCheck - Left = 296 + Left = 272 Height = 23 - Top = 124 + Hint = 'No duplicate cheking' + Top = 189 Width = 110 - BorderSpacing.Left = 18 + BorderSpacing.Left = 6 Caption = 'Ignore dupes' OnChange = rbIgnoreDupesChange - TabOrder = 20 + ParentShowHint = False + ShowHint = True + TabOrder = 21 end object btClearAll: TButton AnchorSideLeft.Control = btSave AnchorSideTop.Control = rbDupeCheck AnchorSideTop.Side = asrCenter - Left = 609 + Left = 588 Height = 30 - Top = 120 + Top = 185 Width = 80 Caption = 'Clear All' OnClick = btClearAllClick - TabOrder = 5 + TabOrder = 6 TabStop = False end object btDupChkStart: TButton @@ -713,29 +757,309 @@ object frmContest: TfrmContest AnchorSideTop.Side = asrCenter Left = 122 Height = 33 - Hint = 'When using common log, set date of dupe check begin (contest start date)' - Top = 119 + Hint = 'When using common log for all contests set date of '#10'dupe check begin (I.E. contest start date)' + Top = 184 Width = 16 AutoSize = True BorderSpacing.Left = 3 Constraints.MaxHeight = 35 Constraints.MaxWidth = 180 OnClick = btDupChkStartClick - TabOrder = 22 + ParentShowHint = False + ShowHint = True + TabOrder = 23 TabStop = False end - object Label1: TLabel - Left = 270 - Height = 1 - Top = 150 - Width = 1 + object chkSP: TCheckBox + AnchorSideLeft.Control = edtSTXStr + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = chkQsp + AnchorSideTop.Side = asrCenter + Left = 346 + Height = 23 + Hint = 'When cheked form is in Search and Pounce mode where operator'#10'needs to launch all memory contents using function keys (F1-F9)'#10'With CW Messages this means "S&P(default)" set of memories.'#10'.'#10'When NOT checked message F2 is launched when cursor enters to'#10'one of RSTr, NRr or MSGr (F2 must be defined by operator)'#10'In case of duplicate call is found message F3 is launced instead'#10'of F2 when cursor leaves CALL column (F3 must be defined by operator)'#10'When QSO is saved message F4 is lauched. (F4 must be defined by operator)'#10'With CW Messages this means "Run" set of memories.'#10'.'#10'When S&P checkbox changes state also CW message sets are switched.'#10'.'#10'CW messages can be stopped with one 1xESC key as usual.'#10#10'Suggestions for CW "Run" set message macros (NewQSO/File/CW messages):'#10'F1 = cq %mc test (%mc is station call)'#10'F2 = %c %xrs (%c call %xrs sends CALL+ RST+STX+STXStr in short form.)'#10'F3 = %c QSO'#10'F4 = tu %mc test' + Top = 158 + Width = 52 + Caption = 'S&&P' + OnClick = chkSPClick + ParentShowHint = False + ShowHint = True + TabOrder = 24 + TabStop = False + end + object gbStatus: TGroupBox + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = rbDupeCheck + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + AnchorSideBottom.Control = sbContest + Left = 6 + Height = 130 + Top = 218 + Width = 673 + Anchors = [akTop, akLeft, akRight, akBottom] + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 + BorderSpacing.Right = 6 + Caption = 'Status' + ClientHeight = 112 + ClientWidth = 671 + TabOrder = 25 + OnClick = gbStatusClick + object mStatus: TMemo + AnchorSideLeft.Control = gbStatus + AnchorSideTop.Control = gbStatus + AnchorSideRight.Control = gbStatus + AnchorSideRight.Side = asrBottom + AnchorSideBottom.Control = gbStatus + AnchorSideBottom.Side = asrBottom + Left = 3 + Height = 91 + Hint = 'Shows status of contest.'#10'If contest has any name common status counting is used. That'#10'includes QSO counts for all, dx and own continent with lists of'#10'DX and own continent prefixes.'#10'Also received messages are counted and listed allowing msg'#10'multiplier count.'#10'Use can control these with left click of mouse pointing between'#10'text "Status" and status display area'#10'.'#10'Currently if there are contest names that include "mwc"or "ok1wc"'#10'and "nac" those statuses are counted by MWC or NAC rules'#10'.'#10'Update is done evey time QSO is saved or 2xESC is pressed.' + Top = 18 + Width = 665 + Anchors = [akTop, akLeft, akRight, akBottom] + BorderSpacing.Left = 3 + BorderSpacing.Top = 18 + BorderSpacing.Right = 3 + BorderSpacing.Bottom = 3 + ParentShowHint = False + ReadOnly = True + ScrollBars = ssAutoBoth + ShowHint = True + TabOrder = 0 + TabStop = False + end + end + object chkMarkDupe: TCheckBox + AnchorSideLeft.Control = rbIgnoreDupes + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = rbDupeCheck + Left = 400 + Height = 23 + Hint = 'If duplicate QSO is logged adds "/D" to RSTsend when cheked.' + Top = 189 + Width = 95 + BorderSpacing.Left = 18 + Caption = 'Mark dupe' + ParentShowHint = False + ShowHint = True + TabOrder = 26 + TabStop = False + end + object chkHint: TCheckBox + AnchorSideLeft.Control = chkTabAll + AnchorSideTop.Control = chkTabAll + AnchorSideTop.Side = asrBottom + Left = 6 + Height = 23 + Hint = 'Turn hint help texts showing ON/OFF ' + Top = 66 + Width = 90 + Caption = 'Show hint' + Checked = True + OnChange = chkHintChange + ParentShowHint = False + ShowHint = True + State = cbChecked + TabOrder = 27 + TabStop = False + end + object CQpanel: TPanel + AnchorSideLeft.Control = cmbContestName + AnchorSideTop.Control = cmbContestName + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = cmbContestName + AnchorSideRight.Side = asrBottom + Left = 130 + Height = 61 + Top = 43 + Width = 432 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Top = 3 + ClientHeight = 61 + ClientWidth = 432 + TabOrder = 0 + object spCQperiod: TSpinEdit + AnchorSideLeft.Control = lblCQperiod + AnchorSideTop.Control = lblCQperiod + AnchorSideTop.Side = asrBottom + AnchorSideBottom.Side = asrBottom + Left = 7 + Height = 34 + Hint = 'Timer repeat period for sending F1 (CQ).'#10'Value is milliseconds 5000 -50000 (5 -50 sec)'#10'As there is no indication how long F1 sending'#10'takes value should be adjusted manually.'#10' Set repeats=1, press CQ start and check that'#10' F1 has time to complete+listening time.'#10'CW sending and timer will stop when ESC is '#10'pressed or someting is written to Call column. ' + Top = 19 + Width = 90 + BorderSpacing.Right = 6 + Increment = 250 + MaxValue = 30000 + MinValue = 5000 + OnChange = spCQperiodChange + ParentShowHint = False + ShowHint = True + TabStop = False + TabOrder = 1 + Value = 5000 + end + object spCQrepeat: TSpinEdit + AnchorSideLeft.Control = spCQperiod + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = spCQperiod + Left = 103 + Height = 34 + Hint = 'Dead operator counter.'#10'How many times CQ (F1) is repeated before repeat stops.'#10'Value 1 - 20 times.' + Top = 19 + Width = 90 + BorderSpacing.Right = 6 + MaxValue = 30 + MinValue = 1 + ParentShowHint = False + ShowHint = True + TabStop = False + TabOrder = 2 + Value = 1 + end + object lblCQperiod: TLabel + AnchorSideLeft.Control = CQpanel + AnchorSideTop.Control = CQpanel + Left = 7 + Height = 17 + Top = 2 + Width = 64 + BorderSpacing.Left = 6 + BorderSpacing.Top = 1 + Caption = 'CQ period' + ParentColor = False + end + object lblCQrepeat: TLabel + AnchorSideLeft.Control = spCQperiod + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = lblCQperiod + Left = 109 + Height = 17 + Top = 2 + Width = 72 + BorderSpacing.Left = 12 + Caption = 'CQ repeats' + ParentColor = False + end + object btnCQstart: TButton + AnchorSideLeft.Control = spCQrepeat + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = spCQrepeat + AnchorSideTop.Side = asrCenter + AnchorSideRight.Side = asrBottom + Left = 205 + Height = 30 + Hint = 'Start CQ (F1) timer.'#10'Shorcut key: Shift+F1'#10'Stop with same key, 1xESC or'#10'write to call column.' + Top = 21 + Width = 80 + BorderSpacing.Left = 12 + Caption = 'CQ start' + Font.Color = clGreen + OnClick = btnCQstartClick + ParentFont = False + ParentShowHint = False + ShowHint = True + TabOrder = 0 + TabStop = False + end + object lblCqFreq: TLabel + AnchorSideTop.Control = btnCQstart + AnchorSideTop.Side = asrCenter + Left = 297 + Height = 1 + Hint = 'Shows Frequency last used for CQ calling (F1 memory).'#10'Double click on Frequency or Ctrl+L sets rig to that frequency and mode.' + Top = 36 + Width = 1 + BorderSpacing.Left = 12 + Color = clYellow + ParentColor = False + ParentFont = False + ParentShowHint = False + ShowHint = True + Transparent = False + OnClick = lblCqFreqClick + end + object lblCQLbl: TLabel + AnchorSideLeft.Control = lblCqFreq + AnchorSideTop.Control = lblCQrepeat + Left = 297 + Height = 17 + Top = 2 + Width = 82 + Caption = 'Last CQ Freq' + ParentColor = False + end + object lblCqMode: TLabel + AnchorSideLeft.Control = lblCqFreq + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = btnCQstart + AnchorSideTop.Side = asrCenter + Left = 304 + Height = 1 + Hint = 'Shows Mode last used for CQ calling (F1 memory).'#10'Double click on mode or Ctrl+L sets rig to that frequency and mode.' + Top = 36 + Width = 1 + BorderSpacing.Left = 6 + Color = clYellow + ParentColor = False + ParentFont = False + ParentShowHint = False + ShowHint = True + Transparent = False + OnClick = lblCqFreqClick + end + end + object lblQSOSince: TLabel + AnchorSideLeft.Control = lblSpeed + AnchorSideTop.Control = chkTabAll + Left = 571 + Height = 17 + Hint = 'Shows time (MM:SS) since last logged Qso' + Top = 43 + Width = 22 + Caption = 'QS:' ParentColor = False + ParentShowHint = False + ShowHint = True + end + object lblRate10: TLabel + AnchorSideLeft.Control = lblQSOSince + AnchorSideTop.Control = chkHint + Left = 571 + Height = 17 + Hint = 'Total QSO rate / 10 minutes' + Top = 66 + Width = 50 + AutoSize = False + Caption = 'q/10' + ParentColor = False + ParentShowHint = False + ShowHint = True + end + object lblRate60: TLabel + AnchorSideLeft.Control = lblRate10 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = lblRate10 + Left = 624 + Height = 17 + Hint = 'Total QSO rate / 1 hour' + Top = 66 + Width = 50 + AutoSize = False + BorderSpacing.Left = 3 + Caption = 'q/60' + ParentColor = False + ParentShowHint = False + ShowHint = True end object tmrESC2: TTimer Enabled = False OnTimer = tmrESC2Timer Left = 536 - Top = 120 + Top = 264 end object cdDupeDate: TCalendarDialog Title = 'Set start date' @@ -744,11 +1068,11 @@ object frmContest: TfrmContest OKCaption = 'OK' CancelCaption = 'Cancel' Left = 488 - Top = 120 + Top = 264 end object popSetMsg: TPopupMenu - Left = 440 - Top = 120 + Left = 448 + Top = 264 object mnuName: TMenuItem Caption = 'MSG is Name' OnClick = mnuNameClick @@ -782,4 +1106,72 @@ object frmContest: TfrmContest OnClick = mnuCommentClick end end + object popCommonStatus: TPopupMenu + Left = 408 + Top = 264 + object mnuQSOcount: TMenuItem + Caption = 'QSO count' + Checked = True + OnClick = mnuQSOcountClick + end + object mnuDXQSOCount: TMenuItem + Caption = 'DX QSO count' + Checked = True + OnClick = mnuDXQSOCountClick + end + object mnuCountyrCountAll: TMenuItem + Caption = 'Country count all' + Checked = True + OnClick = mnuCountyrCountAllClick + end + object mnuDXCountryCount: TMenuItem + Caption = 'DX country count' + Checked = True + OnClick = mnuDXCountryCountClick + end + object mnuDXCountryList: TMenuItem + Caption = 'DX country list' + Checked = True + OnClick = mnuDXCountryListClick + end + object mnuOwnCountryCount: TMenuItem + Caption = 'Own country count' + Checked = True + OnClick = mnuOwnCountryCountClick + end + object mnuOwnCountryList: TMenuItem + Caption = 'Own country list' + Checked = True + OnClick = mnuOwnCountryListClick + end + object mnuMsgMultipCount: TMenuItem + Caption = 'Msg multip count' + Checked = True + OnClick = mnuMsgMultipCountClick + end + object mnuMsgMultipList: TMenuItem + Caption = 'Msg multip list' + Checked = True + OnClick = mnuMsgMultipListClick + end + object mnuReSetAll: TMenuItem + Caption = 'Re/Set All' + OnClick = mnuReSetAllClick + end + object mnuExit: TMenuItem + Caption = 'Exit (Esc key)' + end + end + object tmrCQ: TTimer + Enabled = False + Interval = 3000 + OnTimer = tmrCQTimer + Left = 584 + Top = 264 + end + object tmrScore: TTimer + OnTimer = tmrScoreTimer + Left = 624 + Top = 264 + end end diff --git a/src/fContest.pas b/src/fContest.pas index 41a918a..43a0070 100644 --- a/src/fContest.pas +++ b/src/fContest.pas @@ -6,7 +6,7 @@ interface uses Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, - StdCtrls, ExtCtrls, LCLType, Buttons, ComCtrls, ExtDlgs, Menus, uMyIni; + StdCtrls, ExtCtrls, LCLType, Buttons, ComCtrls, ExtDlgs, Menus, Spin, strutils, fscp; type @@ -17,7 +17,11 @@ type btSave: TButton; btClearQso : TButton; btDupChkStart: TButton; + btnCQstart: TButton; cdDupeDate: TCalendarDialog; + chkHint: TCheckBox; + chkMarkDupe: TCheckBox; + chkSP: TCheckBox; chkTabAll: TCheckBox; chkQsp: TCheckBox; chkTrueRST: TCheckBox; @@ -33,7 +37,15 @@ type edtRSTr: TEdit; edtSRX: TEdit; edtSRXStr: TEdit; - Label1: TLabel; + gbStatus: TGroupBox; + lblQSOSince: TLabel; + lblRate10: TLabel; + lblRate60: TLabel; + lblCqFreq: TLabel; + lblCqMode: TLabel; + lblCQLbl: TLabel; + lblCQperiod: TLabel; + lblCQrepeat: TLabel; lblSpeed: TLabel; lblContestName: TLabel; lblCall: TLabel; @@ -44,6 +56,18 @@ type lblMSGr: TLabel; lblNRs: TLabel; btnHelp : TSpeedButton; + mnuReSetAll: TMenuItem; + mnuExit: TMenuItem; + mnuQSOcount: TMenuItem; + mnuDXQSOCount: TMenuItem; + mnuCountyrCountAll: TMenuItem; + mnuDXCountryCount: TMenuItem; + mnuDXCountryList: TMenuItem; + mnuOwnCountryCount: TMenuItem; + mnuOwnCountryList: TMenuItem; + mnuMsgMultipCount: TMenuItem; + mnuMsgMultipList: TMenuItem; + mStatus: TMemo; mnuGrid: TMenuItem; mnyIOTA: TMenuItem; mnuState: TMenuItem; @@ -52,26 +76,44 @@ type mnuQSLvia: TMenuItem; mnuComment: TMenuItem; mnuName: TMenuItem; + CQpanel: TPanel; popSetMsg: TPopupMenu; + popCommonStatus: TPopupMenu; rbDupeCheck: TRadioButton; rbNoMode4Dupe: TRadioButton; rbIgnoreDupes: TRadioButton; sbContest: TStatusBar; + spCQperiod: TSpinEdit; + spCQrepeat: TSpinEdit; + tmrScore: TTimer; + tmrCQ: TTimer; tmrESC2: TTimer; procedure btClearAllClick(Sender: TObject); procedure btDupChkStartClick(Sender: TObject); + procedure btnCQstartClick(Sender: TObject); procedure btSaveClick(Sender: TObject); procedure btClearQsoClick(Sender : TObject); + procedure chkHintChange(Sender: TObject); procedure chkNoNrChange(Sender: TObject); procedure chkNRIncChange(Sender: TObject); procedure chkNRIncClick(Sender : TObject); procedure chkQspChange(Sender: TObject); + procedure chkSPClick(Sender: TObject); procedure chkTrueRSTChange(Sender: TObject); procedure chkTabAllChange(Sender: TObject); + procedure cmbContestNameExit(Sender: TObject); + procedure edtRSTrEnter(Sender: TObject); + procedure lblCqFreqClick(Sender: TObject); + procedure mnuReSetAllClick(Sender: TObject); + procedure mnuCountyrCountAllClick(Sender: TObject); + procedure mnuDXCountryCountClick(Sender: TObject); + procedure mnuDXCountryListClick(Sender: TObject); + procedure mnuDXQSOCountClick(Sender: TObject); procedure edtCallChange(Sender: TObject); procedure edtCallExit(Sender: TObject); procedure edtCallKeyDown(Sender: TObject; var Key: word; Shift: TShiftState); procedure edtCallKeyPress(Sender: TObject; var Key: char); + procedure edtSRXChange(Sender: TObject); procedure edtSRXStrChange(Sender: TObject); procedure edtSRXExit(Sender: TObject); procedure edtSTXStrEnter(Sender: TObject); @@ -84,6 +126,12 @@ type procedure FormKeyDown(Sender: TObject; var Key: word; Shift: TShiftState); procedure FormShow(Sender: TObject); procedure btnHelpClick(Sender : TObject); + procedure gbStatusClick(Sender: TObject); + procedure mnuMsgMultipCountClick(Sender: TObject); + procedure mnuMsgMultipListClick(Sender: TObject); + procedure mnuOwnCountryCountClick(Sender: TObject); + procedure mnuOwnCountryListClick(Sender: TObject); + procedure mnuQSOcountClick(Sender: TObject); procedure mnuGridClick(Sender: TObject); procedure mnyIOTAClick(Sender: TObject); procedure mnuStateClick(Sender: TObject); @@ -93,9 +141,20 @@ type procedure mnuCommentClick(Sender: TObject); procedure mnuNameClick(Sender: TObject); procedure rbIgnoreDupesChange(Sender: TObject); + procedure spCQperiodChange(Sender: TObject); + procedure tmrCQTimer(Sender: TObject); procedure tmrESC2Timer(Sender: TObject); + procedure tmrScoreTimer(Sender: TObject); private { private declarations } + AllQsos, + AllDx, + AllOwnC, + AllCountries, + QsoRate10, + QsoRate60, + QsoSince : integer; + procedure SetActualReportForModeFromRadio; procedure InitInput; procedure ChkSerialNrUpd(IncNr: boolean); procedure SetTabOrders; @@ -104,7 +163,13 @@ type procedure ClearStatusBar; procedure ShowStatusBarInfo; procedure MsgIsPopChk(nr:integer); - + procedure MWCStatus; + procedure NACStatus; + procedure CommonStatus; + procedure Rates; + procedure SendFmemory(key:word); + function CheckDupe(call:string):boolean; + procedure CQstart(start:boolean); public { public declarations } procedure SaveSettings; @@ -115,15 +180,33 @@ var RSTstx: string = ''; //contest mode serial numbers store RSTstxAdd: string = ''; //contest mode additional string store //RSTsrx :string = ''; - EscFirstTime: boolean = False; + EscTimes :integer = 0; DupeFromDate :string = '1900-01-01'; MsgIs :integer = 0; + MWC40,MWC80 :integer; + UseStatus :integer; //can be used for status procedure specific operations + //-1:no status, 0:common status, 1..x specific status procedures + + MyAdif : word; //These will be filled in FormShow + Mypfx : String = ''; + Mycont : String = ''; + Mycountry: String = ''; + Mywaz : String = ''; + Myposun : String = ''; + Myitu : String = ''; + Mylat : String = ''; + Mylong : String = ''; + + FmemorySent: Boolean; //for semiAuto sending + + CQcount : integer; + implementation {$R *.lfm} -uses dData, dUtils, fNewQSO, fWorkedGrids, strutils, fscp, fTRXControl; +uses dData, dUtils, dDXCC, fNewQSO, fMain, fWorkedGrids, fTRXControl, fCWKeys, fCWType, uMyIni; procedure TfrmContest.FormKeyDown(Sender: TObject; var Key: word; Shift: TShiftState); var @@ -135,17 +218,27 @@ begin // enter anywhere if key = VK_RETURN then begin - if (length(edtCall.Text) > 2) then //must be some kind of call + if (length(edtCall.Text) > 2) and (not edtCall.Focused) then //must be some kind of call and cursor away from edtCall btSave.Click; key := 0; end; - //esc and double esc + //Ctrl+esc + if ((Shift = [ssShift]) and (key = VK_ESCAPE)) then + EscTimes:=2; //removes callsing on following "case EscTimes of" + + //esc, double and triple esc if key = VK_ESCAPE then begin - if EscFirstTime then - begin - //if edtCall.Text = '' then + case EscTimes of + + 0:Begin //1st press stops CW; + if Assigned(frmNewQSO.CWint) then + frmNewQSO.CWint.StopSending; + inc(EscTimes); + tmrESC2.Enabled := True; + end; + 1:Begin //2nd returns to callsign column frmNewQSO.old_call:=''; //this is stupid hack but only way to reproduce frmNewQSO.edtName.Text :=''; //new seek from log (important to see if wkd before, frmNewQSO.edtQth.Text :=''; //and qrz, if one wants) @@ -153,36 +246,50 @@ begin edtCall.SetFocus; edtCall.SelStart:=length(edtCall.Text); edtCall.SelLength:=0; - //else - if Assigned(frmNewQSO.CWint) then - frmNewQSO.CWint.StopSending; - EscFirstTime := False; - tmrESC2.Enabled := True; - end - else begin // esc second time - frmNewQSO.ClearAll; - if dmData.DebugLevel >= 1 then - writeln('Clear all done next focus'); - initInput; - tmrESC2Timer(nil); - end; + FmemorySent:=false; + CQstart(false); + inc(EscTimes); + end; + 2:Begin // 3rd removes callsign + frmNewQSO.ClearAll; + if dmData.DebugLevel >= 1 then + writeln('Clear all done next focus'); + initInput; + tmrESC2Timer(nil); + end; + end; //case + key := 0; end; - //cw memories + //memory keys if (Key >= VK_F1) and (Key <= VK_F10) and (Shift = []) then begin + SendFmemory(key); + if key=VK_F1 then + Begin + lblCqMode.Caption:=frmTRXControl.GetRawMode; + lblCqFreq.Caption := FormatFloat('0.00',frmTRXControl.GetFreqkHz); + end; + key := 0; if (frmNewQSO.cmbMode.Text = 'SSB') then frmNewQSO.RunVK(dmUtils.GetDescKeyFromCode(Key)) else if Assigned(frmNewQSO.CWint) then frmNewQSO.CWint.SendText(dmUtils.GetCWMessage( dmUtils.GetDescKeyFromCode(Key),edtCall.Text, - edtRSTs.Text, edtSTX.Text,edtSTXStr.Text, + edtRSTs.Text, edtSTX.Text,edtSTXStr.Text,edtSRX.Text,edtSRXStr.Text, frmNewQSO.edtName.Text,frmNewQSO.lblGreeting.Caption,'')); key := 0; end; + //CQ timer + if (Key = VK_F1) and (Shift = [ssShift]) and (CQpanel.Enabled=True)then + begin + CQstart(true); + key:=0; + end; + if (key = 33) then//pgup begin if Assigned(frmNewQSO.CWint) then @@ -195,6 +302,21 @@ begin key := 0; end; + //S&P mode + if (key = VK_Tab) then + begin + if (Shift = [ssShift]) then //off + Begin + chkSP.Checked:= False; + key:=0; + end; + if (Shift = [ssCTRL]) then //on + Begin + chkSP.Checked:= True; + key:=0; + end; + end; + if (key = 34) then//pgup begin if Assigned(frmNewQSO.CWint) then @@ -218,13 +340,19 @@ begin if key in [VK_1..VK_9] then frmNewQSO.SetSplit(chr(key)); if ((Shift = [ssCTRL]) and (key = VK_0)) then frmTRXControl.DisableSplit; -end; + //Jump to last CQ freq,mode + if ((Shift = [ssCTRL]) and (key = VK_L)) then + lblCqFreqClick(nil); +end; procedure TfrmContest.edtCallExit(Sender: TObject); var dupe : Integer; begin + //be sure report is ok for radio mode; + frmContest.SetActualReportForModeFromRadio; + // if frmNewQSO is in viewmode or editmode it overwrites old data or will not save // because saving is disabled in view mode. this if statement starts a fresh newqso form if frmNewQSO.ViewQSO or frmNewQSO.EditQSO then @@ -238,41 +366,6 @@ begin frmNewQSO.edtCall.Text := edtCall.Text; - if not (rbIgnoreDupes.Checked) then - begin - //dupe check - dupe := frmWorkedGrids.WkdCall(edtCall.Text, dmUtils.GetBandFromFreq(frmNewQSO.cmbFreq.Text) ,frmNewQSO.cmbMode.Text); - // 1= wkd this band and mode - // 2= wkd this band but NOT this mode - if ( (rbNoMode4Dupe.Checked) and (dupe = 1) ) - or ( (not rbNoMode4Dupe.Checked) and ((dupe = 1) or (dupe=2)) )then - Begin - edtCall.Font.Color:=clRed; - edtCall.Font.Style:= [fsBold]; - frmNewQSO.edtRemQSO.Caption:='Dupe'; - end - else - Begin - edtCall.Font.Color:=clDefault; - edtCall.Font.Style:= []; - frmNewQSO.edtRemQSO.Caption:=''; - end; - end; - //report in NEwQSO changes to 59 to late (after passing cmbMode) - //NOTE! if mode is not in list program dies! In that case skip next - if frmNewQSO.cmbMode.ItemIndex >=0 then - begin - case frmNewQSO.cmbMode.Items[frmNewQSO.cmbMode.ItemIndex] of - 'SSB', - 'AM', - 'FM' : - begin - edtRSTs.Text := copy(edtRSTs.Text,0,2); - edtRSTr.Text := copy(edtRSTr.Text,0,2); - end; - end; - end; - frmNewQSO.edtHisRST.Text := edtRSTs.Text; frmNewQSO.edtContestSerialSent.Text := edtSTX.Text; frmNewQSO.edtContestExchangeMessageSent.Text := edtSTXStr.Text; @@ -281,11 +374,27 @@ begin frmContest.ShowOnTop; frmContest.SetFocus; - ShowStatusBarInfo(); + if CheckDupe(edtCall.Text) then + Begin + //send macro F3 + if ((not chkSP.Checked) and (length(edtCall.Text)>2)) then + Begin + FmemorySent:=true; + SendFmemory(VK_F3); + end; + end; + + ShowStatusBarInfo; end; procedure TfrmContest.btSaveClick(Sender: TObject); begin + if frmNewQSO.AnyRemoteOn then + begin + Application.MessageBox('Log is in remote mode, please disable it.','Info ...',mb_ok + mb_IconInformation); + exit + end; + tmrScore.Enabled:=false; if chkLoc.Checked then begin case MsgIs of @@ -302,28 +411,54 @@ begin 4: frmNewQSO.edtCounty.Caption:= edtSRXStr.Text; //County 5: frmNewQSO.edtAward.Caption:= edtSRXStr.Text; //Award 6: frmNewQSO.edtQSL_VIA.Caption:= edtSRXStr.Text; //QSL via - 7: frmNewQSO.edtRemQSO.Caption:=frmNewQSO.edtRemQSO.Caption+' '+edtSRXStr.Text; //Comment. Preserves "DUPE" + 7: frmNewQSO.edtRemQSO.Caption:=edtSRXStr.Text; //Comment. end; end; + //NOTE! if mode is not in list program dies! In that case skip next + if frmNewQSO.cmbMode.ItemIndex >=0 then + begin + case frmNewQSO.cmbMode.Items[frmNewQSO.cmbMode.ItemIndex] of + 'SSB','AM','FM' : begin + edtRSTs.Text := copy(edtRSTs.Text,0,2); + edtRSTr.Text := copy(edtRSTr.Text,0,2); + end; + else + begin + edtRSTs.Text := copy(edtRSTs.Text,0,3); + edtRSTr.Text := copy(edtRSTr.Text,0,3); + end; + end; + end; + frmNewQSO.edtHisRST.Text := edtRSTs.Text; + if chkMarkDupe.Checked and CheckDupe(edtCall.Text) then + frmNewQSO.edtHisRST.Text:=frmNewQSO.edtHisRST.Text+'/D'; frmNewQSO.edtMyRST.Text := edtRSTr.Text; frmNewQSO.edtContestSerialReceived.Text := edtSRX.Text; frmNewQSO.edtContestSerialSent.Text := edtSTX.Text; frmNewQSO.edtContestExchangeMessageReceived.Text := edtSRXStr.Text; frmNewQSO.edtContestExchangeMessageSent.Text := edtSTXStr.Text; - frmNewQSO.edtContestName.Text := ExtractWord(1,cmbContestName.Text,['|']); + frmNewQSO.edtContestName.Text := cmbContestName.Text; + if (not chkSP.Checked) then + SendFmemory(VK_F4); frmNewQSO.btnSave.Click; if dmData.DebugLevel >= 1 then Writeln('input finale'); ChkSerialNrUpd(chkNRInc.Checked); initInput; - + QsoSince:=0; + tmrScore.Enabled:=true; end; procedure TfrmContest.btClearAllClick(Sender: TObject); +var + f:integer; begin + chkTabAll.Checked:=False; + chkHint.Checked:=True; + rbDupeCheck.Checked := True; rbNoMode4Dupe.Checked := False; rbIgnoreDupes.Checked := False; @@ -332,12 +467,16 @@ begin chkTrueRST.Checked := False; chkNRInc.Checked := False; chkQsp.Checked := False; + chkSP.Checked:=True; //this prevents automated release of Messages F2..F4 by accident chkNoNr.Checked := False; chkLoc.Checked := False; edtSTX.Text := ''; edtSTXStr.Text := ''; cmbContestName.Text:= ''; + + for f:=0 to 8 do + popCommonStatus.Items[f].Checked:=True; end; procedure TfrmContest.btDupChkStartClick(Sender: TObject); @@ -352,12 +491,101 @@ begin end; +procedure TfrmContest.btnCQstartClick(Sender: TObject); +begin + if btnCQstart.Font.Color = clGreen then + begin + CQstart(true); + lblCqMode.Caption:=frmTRXControl.GetRawMode; + lblCqFreq.Caption := FormatFloat('0.00',frmTRXControl.GetFreqkHz); + edtCall.SetFocus; + end + else + Cqstart(false); +end; + +procedure TfrmContest.CQstart(start:boolean); +begin + if start and (tmrCQ.Enabled=False) then + Begin + btnCQstart.Font.Color:=clRed; + btnCQstart.Repaint; + tmrCQ.Enabled:=True; + tmrCQTimer(nil); + end + else + Begin + if (tmrCQ.Enabled=True) then + begin + btnCQstart.Font.Color:=clGreen; + btnCQstart.Repaint; + tmrCQ.Enabled:=false; + CQcount:=0; + btnCQstart.Caption:='CQ start'; + if Assigned(frmNewQSO.CWint) then + frmNewQSO.CWint.StopSending; + end; + end; +end; + +procedure TfrmContest.tmrCQTimer(Sender: TObject); +begin + if (CQcount
'); + Writeln(f,''+LineEnding+'Total: '); + Writeln(f,'Worked:',sum_wkd,' '); + Writeln(f,'Confirmed:',sum_cfm,' '); + Writeln(f,'Different counties: '); + if cmbBands.Text<>'ALL' then Writeln(f,'On this band:',thiswkd,' '); + Writeln(f,'On all bands:',allwkd); + Writeln(f,''); + Writeln(f,' |