Merge pull request #561 from OH1KH/squash_Alpha119

Squash alpha119
This commit is contained in:
Petr Hlozek 2023-10-14 08:01:51 +02:00 committed by GitHub
commit 09e661463a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
137 changed files with 16161 additions and 9819 deletions

View File

@ -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)

View File

@ -20,12 +20,14 @@ ARISS|ARISS
Arsene|OSCAR 24
BO-102|BIT Progress-OSCAR 102 (CAS-7B)
BY70-1|Bayi Kepu Weixing 1
CAS-2T|CAS-2T
CAS-3H|LilacSat-2
CAS-4A|CAMSAT 4A (CAS-4A)
CAS-4B|CAMSAT 4B (CAS-4B)
DO-64|Delfi OSCAR-64
EO-79|FUNcube-3
EO-88|Emirates-OSCAR 88 (Nayif-1)
FO-118|CAS-5A
FO-12|Fuji-OSCAR 12
FO-20|Fuji-OSCAR 20
FO-29|Fuji-OSCAR 29
@ -34,6 +36,7 @@ FS-3|FalconSAT 3
HO-107|HuskySat OSCAR 107
HO-113|HO-113
HO-68|Hope-Oscar 68
IO-117|GreenCube
IO-86|Indonesia-OSCAR 86 (LAPAN-ORARI)
JO-97|Jordan-OSCAR 97(JY1Sat)
KEDR|ARISSat-1
@ -44,6 +47,7 @@ LO-90|LilacSat-OSCAR 90 (LilacSat-1)
MAYA-3|Cubesat
MAYA-4|Cubesat
MIREX|MIR Packet Digipeater
MO-112|Mirsat-1
NO-103|Navy-OSCAR 103 (BRICSAT 2)
NO-104|Navy-OSCAR 104 (PSAT 2)
NO-44|Navy-OSCAR 44

View File

@ -30,66 +30,103 @@
<div style="text-align: left;"><strong>CQRLOG for LINUX by OK2CQR &amp; OK1RR</strong></div>
<p align=center><img src=img/line.png></p>
<a name=co1><h2><strong>Contest support</strong></h2></a>
<p>You will find contest selection from <b>NewQSO/Window</b> dropdown menu.
<br><br>When contest window is open <b>NewQSO</b> has contest exchange fields visible. You may have to stretch <b>NewQSO </b> window horizontally to see them.
<br>You <b>do not</b> normally need <b>NewQSO</b> window during contest. Only need for <b>NewQSO</b> is in case you have to edit an already worked qso.
<br> Select qso normally via <b>QSO list</b> and press <b>edit QSO button</b> and you are able to edit qso, also the contest message part of it.
<br><br><b>NewQSO</b> is not meant to be used during contest qso feeds. <b>All new qsos are entered via contest window.</b></p>
<p>You will find contest selection from <b>NewQSO/Window</b> 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.
<br>Contest window is just a "child form" for <b>NewQSO</b> to make qso logging faster when working in contests.
With <b>Tru</b> and <b>Msg is Loc</b> 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.
<br><br><b>Note:</b> This is <b>NOT</b> 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!
<br><br>When contest window is open NewQSO</b> has contest exchange fields visible. You may have to stretch <b>NewQSO </b> window horizontally to see them.
You <b>do not normally need NewQSO</b> window during contest.
<br><b>Only need for <i>NewQSO</i> is in case you have to edit an already worked qso.</b>
Select qso normally via <b>QSO list</b> and press <b>edit QSO button</b> and you are able to edit qso, also the contest message part of it.
<br><br><b>Repeat: <i> NewQSO</i></b> is not meant to be used during contest qso feeds. <b>All new qsos are entered via contest window.</b></p>
<p align="center">
<img src="img/contest.png">
</p>
<p>
<b>RECOMMENDATION:</b> Make new log for each contest, consider not to allow qrz/hamqth search, it may slow down qso feed.
<b>Note:</b> This is <b>NOT</b> 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!
<b>RECOMMENDATION:</b><br> Make new log for each contest, consider not to allow qrz/hamqth search, it may slow down qso feed.
<br> 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.
<br>Benefit of having "contest" log with one contest is also that you get <b>DXCC statistic</b> right after cursor leaves callsign column. You can place contest window just above NewQSO/DXCC statistic.(see pic above).
</p><p>
Contest window is just a "child form" for <b>NewQSO</b> to make qso logging faster when working in contests.
With <b>Tru</b> and <b>Msg is Loc</b> 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.
<br><br>
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.
<br>To get this working properly you must <b>either</b> create a new log for every contest <b>or</b> set dupe start date (I.E. contest starting day) with button <b>"from YYYY-MM-DD"</b>
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 "<b>/D</b>" in "<b>RST sent</b>" field.
When doing Cabrillo export it is operator's duty to decide what to do with "/D" reports
<br>To get duplication check working properly you must <b>either</b> create a new log for every contest <b>or</b> set dupe start date (I.E. contest starting day) with button <b>"from YYYY-MM-DD"</b>
</p>
<p>
<b>HOTKEYS</b> work like with <a href="h20.html">New QSO window</a>.
<h4>Hotkeys:</h4>
Hotkeys work same way as with <a href="h20.html">New QSO window</a>.
<ul><li> <b>2x ESC</b> clears all fileds</li>
<li>Note: <b>1x ESC</b> returns cursor back to Call-field (if cursor is in some of the other fields like RSTr) and places cursor at the end of callsign for possible repairs.<br>
It also halts CW memory output if it is just running.</li>
<li> <b> F1..F10 </b>send CW macros etc.</li>
<li> <b> F1..F10 </b>send CW or VOICE messages depending on used mode.</li>
<li> <b>TAB-key</b> moves cursor between fields. (may also be SPACE key, if set) </li>
<li> <b>Ctrl+Tab</b> will set <b>S&P</b> mode</li>
<li> <b>Shift+Tab</b> will reset <b>S&P</b> mode</li>
</ul>
</p>
<p>
Contest window has following fields and checkboxes:<br>
<h4>Contest window has following fields and checkboxes:</h4>
<ul>
<li><b>Tab in order</b> when checked overrides all other Tab settings (below) and Tab Order is Call-RSTs-NRs-MSGs-RSTr-NRr-MSGr-SaveQSO-ClearAll</li>
<li><b>Call</b> when you leave this field callsign is moved to NewQSO. Callsign turns BOLD RED if it is duplicate.</li>
<li><b>Contest name</b> Selection box has a list of predefined contest names. When selecting one and leaving <b>Contest name</b> combo box name will be cut from "|"(including it) that separates contest name and explanation.
You can also type contest name here if it is not in list. Be sure you do not use "|" character(s) in name because program will cut name from the first one found.
<br><b>RECOMMENDATION:</b><br>
Add date to contest name if you keep many contests in same log. That way <b>QSO list/Filter/Contest filter</b> can separate contests by name.</li>
<li><b>Tab in order</b> when checked overrides all other Tab settings (see below) and Tab Order is: Call-RSTs-NRs-MSGs-RSTr-NRr-MSGr-SaveQSO-ClearAll</li>
<li><b>Show hint</b> when checked shows help text of object that mouse cursor currently points</li>
<li><b>CQ panel</b> is visible when <b>S&P</b> is not checked (CQ calling mode)</li>
<ul><li><b>CQ period</b> timer period in millisecons to send one CQ+listen (5000 - 50000, 5-50sec)
<br> To adjust: Set repeats=1, press CQ start, adjust period value so that F1 has time to run + listening time</li>
<li><b>CQ repeats</b> repeat period how many times CQ period is repeated (1 - 20)s</li>
<li><b>CQ start</b> start/stop repeated CQ calling. <b>Shorcut key: Shift+F1</b>.
<br>Pressing <b>ESC</b> stops timer and CW send. It can not stop voice keyer script.
<br>Also writing anyting to <b>Call</b> will stop running timer and CW sending.</li>
</li>
<li><b>Last Cq Freq</b> will show last used CQ frequency and mode. CQ frequency and mode is stored when F1 memory is launched either from keybord or from Memory keys F1 button.
Click on frequency or mode reading or Ctrl+L will restore rig to that frequency and mode. This value is not stored and clears when contest window is closed.</li></ul>
<li><b>Call</b> when you leave this field callsign is moved to NewQSO. Callsign <b>turns BOLD RED</b> while typing if it is duplicate (and duplicate check is active).</li>
<li><b>SPACE is TAB</b> when checked space bar acts like TAB-key moving to next field. <b>Note:</b>This prevents typing space (perhaps needed in MSG fields).</li>
<li><b>Dupe check</b> Default checked.
<li><b>from YY-MM-DD</b> Button to set duplicate check start date (I.E. contest start date). Must be set if you have all qsos in same log.
<br>If every contest has it's own log can be as default (1900-01-01). Button is not visible if <b>Ignore dupes</b> is set.
<li><b>NoMode4Dupe</b> Means that same callsign can be worked again on same band if mode is different.
</li>
<li><b>Ignore dupes</b> Do not check duplicate qsos at all.</li>
<li><b>Dupe check</b> Default checked. If you use same log for several contests, and/or other working, set the contest start date with <b>from YY-MM-DD</b> button.
<br> if <b>NoMode4Dupe</b> is selected duplicate check allows qso with same station in same band if mode differs.
<br> if <b>Ignore dupes</b> is selected it will ignore duplication check completely.
<br> When dupe check is active and callsign is found as duplicate, but still saved, program will add <b>/D</b> to <b>RST sent</b>.
It is then operator's duty to clean or leave <b>/D</b> to exported Cabrillo log.</li>
<br>
<li><b>RST s</b> copied from NewQSO, so should correspond used mode. Can be changed.
<br><b> Note:</b> defaults to 599 (as NewQSO) If mode is not CW it will change after cursor leaves callsign column. So do not worry when working non-cw contest!</li>
<li><b>RST s</b> RST sent. Can be changed.
<br><b> Note:</b> defaults to 599 (CW) 59(phone). If rig mode is changed you get corresponding RST with 2xESC.
<br>It also changes when cursol leaves <b>call</b> column. So do not worry when working mixed mode contest!</li>
<li><b>Tru</b> means you like to exchange true reports. Makes Tab order to stop at RST (s & r) fields. Useful in some high band contests, Es and tropo openings.</li>
<br>
<li><b>NR s</b> serial number to send.
<li><b>NR s</b> serial number to send.
<br><b> Note:</b> you can type only numbers to NR s field.</li>
<li> <b>Inc</b> if checked it will auto increment serial number. You may change this number at any time. Increment goes on from typed number.</li>
<br>
<li><b>MSG s</b> sometimes you may need an additional message with number, or just a message with no number. On high band contests you may type your locator here.</li>
<li><b>Qsp</b> if checked makes TAB order stop at MSG s. Content of MSG s is taken from last logged MSG r. Cursor is placed at the end of message for possible edit. For contests where you have circulating message: At 1st qso you set your own word to send, after that you send previously received word as your next own message. </li>
<li><b>MSG s</b> sometimes you may need an additional message with number, or just a message with no number.
On high band contests you may type your locator here.</li>
<li><b>Qsp</b> if checked makes TAB order stop at MSG s. Content of MSG s is taken from last logged MSG r. Cursor is placed at the end of message for possible edit.
For contests where you have circulating message: At 1st qso you set your own word to send, after that you send previously received word as your next own message. </li>
<li><b>S&P</b> When Search & Pounce is checked operator launces all CW/Voice messages manually.
<br>When S&P is not checked (in RUN mode) program launches message F2 when cursor enters one of RSTr, NRr, or MSGr columns. This way also if true reports are selected F2 is sent after your message is ready.
<br>In case duplicate checking is enabled and callsign is duplicate, message F3 is launched instead of F2 and it happens always when cursor leaves callsign column.
<br>When <i>Enter</i> or <i>Save qso</i> button is pressed program will send message F4.
<br>Message F1 can be used for CQ that is manually launched.
<br>When phone modes are used messages are lauched same way but you need very special voice script if you want to include worked station's callsign into F2 and F3 messages, but launcing F4 at QSO save may be useful.
<br><b>NOTE:</b> When S&P checkbox changes state then also CW memory sets are switched between "S&P" and "Run".
<br>See more about <a href="/h26.html">CW messages</a> how to define messages with macros and save/load different setups of CW messages.</li>
<br>
<li><b>RST r</b> copied from NewQSO, so should correspond used mode. Can be changed.</li>
<li><b>RST r</b> RST received. Default to 599 (CW) 59 (phone). Can be changed.
<br>Default rst for CW and phone is created from rig's current mode. 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.
</li>
<br>
<li><b>NR r</b> serial number you receive.
<br><b> Note:</b> you can type only numbers to NR r field. </li>
<li><b>No </b> if no serial number then setting this changes tab order so that it jumps directly to MSG r. </li>
<li><b>No </b> if thre is no serial number in contest this setting changes tab order so that it jumps over, directly to MSG r. </li>
<br>
<li><b>MSG r</b> message you receive</li>
<li> <b>MSG is Grid</b> If '<b>MSG is ...</b>' is checked then message will be logged in <i> SRX_String </i><b>AND ALSO</b> to <i>selected NewQSO column</i>.
@ -98,13 +135,16 @@ Contest window has following fields and checkboxes:<br>
<br>If <b>MSG is Grid</b> but the entered locator is <b>not valid</b> it will <b>NOT</b> be copied to <i>NewQSO/Grid column</i> and stays only in <i>Srx_String</i>.
<br>
<br>In case of <b>MSG is State</b> and callsign is detected by prefix to be a Germany callsign srx_string is copied to <b>DarcDOC</b> column, orherwise to <b>State</b> column.
<br>In case of <b>MSG is Comment</b> and dupe checking is allowed, and dupe found, Comment to QSO contains first "Dupe " and then the copied message.</li>
<br>
<br>In other cases MSG is copied to correspondig NewQSO column.
<br><b>NOTE: </b>After selecting '<b>MSG is ...</b>' remember also to check the checkbox to get it activated!</b></li>
</ul>
<h4>Buttons you really do not need (you should <b>NOT use mouse</b> when working contest!):</h4>
<ul>
<li><b>Save QSO</b> Save QSO button at NewQSO, increments NR and clears all fields.
<br><b> Note:</b> pressing <b>ENTER at any time</b> after Call field is filled does the same.</li>
<li><b>Clear QSO</b> Clear all QSO information.
<br><b> Note:</b> pressing <b>ENTER at any time after cursor is out from Call column</b> does the same.</li>
<br><li><b>Clear QSO</b> Clear all QSO information.
<br><b> Note:</b> Pressing 2x ESC key does the same.</li>
<br><li><b>Clear all</b> Clear all fields. Usefull when starting a new contest to remove saved settings.</li>
<br><li><b>Clear all</b> Clear all fields. Usefull when starting a new contest to remove all saved settings.</li>
</ul>
<br>
All settings, including contest name, are saved when closing contest form. When opening cqrlog and contest form again after rest period you can directly continue contest working.
@ -113,18 +153,72 @@ All settings, including contest name, are saved when closing contest form. When
<p>
<b>Typical contest qso goes like this:</b><br>
Type callsign-&gt;press TAB-&gt;type contest rxnumber-&gt;press TAB-&gt;type contest message-&gt;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.
</p>
<p>Remember that pressing <b>ENTER</b> 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.
<p>Remember that pressing <b>ENTER</b> 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.
<br><b>There is no need to use the mouse.</b> Keep your hands on keyboard (and possible on CW key / PTT (if not foot pedal in use)). It is faster.</p>
<p>
Contest numbers and messages are saved in log into their own columns. Use <b>preferences/Visible columns</b> to show them in <b>Qso list</b>.
Contest numbers and messages are saved in log in their own columns. Use <b>preferences/Visible columns</b> to show them in <b>Qso list</b>.
<br><br>
<b>CW macros</b> can be used for sending contest meessages. Look them from help section <a href="h26.html">CW Operation</a>
<b>CW messages</b> can be used for sending contest messages. Look at help section <a href="h26.html">CW Operation</a>
how to use macros in messages.
<br><b>NOTE:</b> 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.
</p>
<h4>Status view support</h4>
<b>NOTE:</b> If you have one log called <b>contest</b> that you clear always before contest, to have just qsos of that contest, and after contest you move all qsos
with adif export to another log called <b>archive</b> you can view contest status afterwards from that log if you have used <b>unique contest names</b> I.E. added contest start date to name.
<br> Find contest with <b>Filter/Contest filter</b> and copy name from selection list box and paste it to Contest window. You do not have to activate contest filter to see the status of that contest.
<p><b>OK1WC memorial contest</b> status is supported.
<p align="center">
<img src="img/contest_mwc.png">
</p>
<p>
ADIF exports fields to right tags.<br><br>
If contest name has "<b>mwc</b>" or "<b>ok1wc</b>" 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 <b>2xESC</b>.
After saving a qso Status view is updated.
<br>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.
<br>Only bands 80M and 40M and mode CW are counted (See rules of contest).
<br><br>
</p>
<br>
<p><b>Nordic Activity Contest (NAC)</b> status is supported.
<p align="center">
<img src="img/contest_nac.png">
</p>
<p>
If contest name has "<b>nac</b>" 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 <b>2xESC</b>.
After saving a qso Status view is updated.
<br>
<br><br>
</p>
<p><b>Common</b> status is supported.
<p align="center">
<img src="img/contest_cmn.png">
</p>
<p>
If contest name has <b>any name that does not fit rules of two above</b> status counting is activated. At the start of contest (and any oher time when no qso to save) it can be seen by pressing <b>2xESC</b>.
After saving a qso Status view is updated.
<br>There are several items shown in Status display. You can control them by left click below text <b>Status</b> (but above status display itself).
<br>The DX and own continent counts (EU in picture) are defined against your callsign in preferences/station/call.
<br><br> To see Status section you may need to stretch the bottom part of Contest window.
<br><b>NOTE:</b><i> Status counting may have errors! It is just for showing progress of contest, not to show final score.</i>
</p>
<p>
<H4>After contest</h4>
Most contests expect <b>Cabrillo</b> log format. Cqrlog has a limited support of Cabrillo exports. Mostly enough for a Sunday contester.
<br>In case you want to use external Cabrillo program you have to make ADIF export of qsos</b>
and then use another program.</p><p>
</br>
I found nice <b>adif2cabrillo</b> program for Linux from <a href="http://users.telenet.be/on4qz/a2c/index.html" target="_blank">http://users.telenet.be/on4qz/</a> that supports ADIF importing.
</p></p>Starting is bit complicated:
</br>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.</br>
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.
</p>
<p>
<h5>ADIF exports fields to right tags.</h5>
&lt;RST_SENT:3&gt;599&lt;STX:3&gt;001<br>
&lt;RST_RCVD:3&gt;599&lt;SRX:3&gt;002<br>
&lt;RST_SENT:3&gt;599&lt;STX:3&gt;003&lt;STX_STRING:2&gt;SA<br>
@ -138,19 +232,7 @@ ADIF exports fields to right tags.<br><br>
HTML export will look like this:<br>
<img src="img/contest_html_export.png">
</p>
<p>
</br>
Most contests expect <b>Cabrillo</b> log format. Cqrlog has a limited support of Cabrillo exports. Mostly enough for a Sunday contester.
<br>In case you want to use external Cabrillo program you have to make ADIF export of qsos</b>
and then use another program.</p><p>
</br>
I found nice <b>adif2cabrillo</b> program for Linux from <a href="http://users.telenet.be/on4qz/a2c/index.html" target="_blank">http://users.telenet.be/on4qz/</a> that supports ADIF importing.
</p></p>Starting is bit complicated:
</br>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.</br>
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.
</p>
<p align=center><img src=img/line.png></p>
<br>
<table width="100%" border="0" cellpadding="2" cellspacing="2">

View File

@ -34,9 +34,9 @@
<br>There are some additional startup parameters that you can use with command terminal, or add them to your startup menu parameters of cqrlog.
Those parameters can be listed in command terminal starting cqrlog as: cqrlog -h , or: cqrlog --help
<br><br><img src=img/h0.png border=0>
<br><br>Starting with <b>--remote</b> or <b>-r</b> takes one letter argument <b>J</b>,<b> M</b> or <b>K</b> that is not case sensitive. Letters correspond quick control keys in NewQSO/File to start three remote modes.
<br><br>Starting with <strong>--remote</strong> or <strong>-r</strong> takes one letter argument <strong>J</strong>,<strong> M</strong> or <strong>K</strong> that is not case sensitive. Letters correspond quick control keys in NewQSO/File to start three remote modes.
<br>When one of these are assigned cqrlog will jump to selected remote mode 10 seconds after startup is complete.
<br><br>Starting with <b>--debug</b> takes one number (NR) usually<b> 1</b> to see full debug. Thtere are also some negative numbers in use to limit debug prints to certain functions. Mainly for developer usage.
<br><br>Starting with <strong>--debug</strong> takes one number (NR) usually<strong> 1</strong> to see full debug. Thtere are also some negative numbers in use to limit debug prints to certain functions. Mainly for developer usage.
</p>
<a name=ah1><h2><strong>Preferences</strong></h2>
@ -101,9 +101,11 @@
<strong>Grayline offset</strong> - sometimes the gray line position is not accurate.
You can set your own correction.
<br><br>
<strong>Great circle </strong> Short and Long path line plotting may be adjusted here. Plotting step is decimal degrees &gt; 0.0 and &lt; 40.0. In polar areas where distance/degree is smaller this value is divided by integer divisor value &gt; 0 and &lt; 40.
<strong>Great circle </strong> Short and Long path line plotting on Grayline map may be adjusted here. Plotting step is decimal degrees &gt; 0.0 and &lt; 40.0. In polar areas where distance/degree is smaller this value is divided by integer divisor value &gt; 0 and &lt; 40.
<br>You may test different values if you like. If Columns are left empty the default values 0.1 and 10 are replaced.
<br>Color for Short- and Longpath lines can be selected, as well as the line plot width (1 -5 pixels)
<br>If rotor control is used also beam heading path may be plotted on Grayline map. Color, plot line width and length may be adjusted.
<br><b>Note:</b>At N and S polar areas beam length may be cutted to avoid false plotting. Then reduce the lenght of beam line (fixes to calculation routine are welcome)
<br><br>
<strong>Check for newer version of DXCC tables after program startup</strong></a> - if checked,
CQRLOG will check if any update of the country files is available. If a new version is found,
@ -171,7 +173,7 @@
QSO appears in this list immediately after logging, however the refresh procedure is
quite slow. To save time, keep this box unchecked. </br>
The <strong>'Skip over mode and frequency when radio is connected'</strong> is very important if the radio control is active.</br>
The <strong>'Enable auto search on HamQTH.com/QRZ.COM'</strong> switches on the automated search
The <strong>'Enable auto search on HamQTH.com/QRZ.COM/QRZCQ.com'</strong> switches on the automated search
for HamQTH/QRZ callbook data for any worked station. This option does the same as F6 on the
logging screen, however it can be rather slow depending on the HamQTH.com/QRZ.COM server
availability.</br>
@ -208,48 +210,92 @@
Checked bands are visible in both statistics appearing at the bottom of logging screen
(bands/modes of the actual logged station) and main DXCC, WAZ and ITU zones statistics.
It also affects the Challenge points at the bottom of the DXCC statistics.<br>
Pressing button <b>frequencies</b> band, and mode limits within bands, can be set.
Pressing button <strong>frequencies</strong> band, and mode limits within bands, can be set.
</div><br>
<img src=img/h9b.png border=0><br><br>
<p align=center><img src=img/line.png></p>
<a name=ah7><h2><strong>TRX Control</strong></h2></a>
<img src=img/h10.png border=0><br><br>
<div align=justify>
<br><br><b> Note: </b>Running same time CQRLOG and other software that uses rig's CAT control can not be done by just setting rig same parameters to both programs.
<br>That causes problems. See this document for more information: <a href="https://github.com/OH1KH/cqrlog/blob/loc_testing/compiled/setting_rigctld_for_all_programs.pdf">https://github.com/OH1KH/cqrlog/blob/loc_testing/compiled/setting_rigctld_for_all_programs.pdf</a>
<br><br><b>Note: </b>CQRLOG supports operating with two TRX radios but only one can be active at a time.
<br><br>
<strong>Radio one, desc:</strong> is a description you'll see in TRX control window. It is only
descriptive text, you can write whatever you want.<br><br>
<strong>Host:</strong> computer where rigctld is running, localhost is fine for most cases. <br><br>
<br>Running same time CQRLOG and other software that uses same rig's CAT control can not be done by just setting rig same parameters to both programs.
That causes problems. See this document for more information: <a href="https://github.com/OH1KH/cqrlog/blob/loc_testing/compiled/setting_rigctld_for_all_programs.pdf">https://github.com/OH1KH/cqrlog/blob/loc_testing/compiled/setting_rigctld_for_all_programs.pdf</a>
<ul><li><strong>Note: </strong>CQRLOG supports operating with six Rigs but only one can be active at a time.
</li></ul>
<strong>Path to rigctld binary</strong> This tells Cqrlog from where to find rigctld that is a part of Hamlib. That is important for two
reasons.
<br>1st The rig model list is loaded from rigctld when preferences open. That makes model list to be always up to date and Cqrlog
supports always all rigs that current rigctld can support.
<br>2nd rigctld is started when Cqrlog starts (most of cases). Writing whole path makes rigctld to be found also the when it is not found
from default path.
<ul><li><strong> Note: </strong>Usuallly rigctld is found from /usr/bin, but if you have compiled it by yourself from source it may default to /usr/local/bin
</li></ul>
<strong>Nr of radios:</strong> With this you can select how many radios Cqrlog will support (Max 6, now).
<br><br>
<strong>Name:</strong>This is the radio name that you will see in combo box selector lists: TRXControl, Prefrences/TRXControl, Modes, CW interface.
If rig is not defined, means rig Model is empty, you will see "None" here. If you want to remove existing rig definition select it from selector, then clear
rig Model manually using delete key and change selector to another rig, or close prfereces with "OK" button.
<br>This will remove also rig's Modes and CW interface definition from configuration file. Next time you select deleted rig Cqrlog will load all defaults to settings.
<ul><li><strong>Note: </strong>If you have 3 rigs and you delete rig #2 Cqrlog does not reorder selection list. Your rig #3 stays as 3rd in
selector list and #2 becomes "None"
</ul></li>
<strong>Host:</strong> computer where rigctld is running, localhost is fine for most cases but can be IP address of another computer where
rigctld is running (I.E. even over local network or internet) <br><br>
<strong>RIG model:</strong> choose your radio model from the list.
<br> Rig models below 10 (Dummy, NET rigctld, FLRig, TRXManager) are using TCP communication and so the <strong>Device</strong> as well
as <strong>Radio serial parameters</strong> do not need settings.<br><br>
as <strong>Radio serial parameters</strong> do not need settings.
<br><br>
<strong>Device:</strong> device which the radio is connected to. /dev/ttyS0 is COM1, /dev/ttyS1
is COM2 etc. If you use USB to serial interface, the device will usually be /dev/ttyUSB0
for COM1 etc. If you are using Ubuntu or Debian, <strong>you have to be member of the dialout users
group</strong> to have rights to the serial ports.<br><br>
<strong>Poll rate:</strong> specifies how often CQRLOG should read data from rigctld. 500 milliseconds
is fine.<br><br>
group</strong> to have rights to the serial ports.
<ul><li><strong> Note: </strong>When connecting to rigctld emulator that imitates a rig via TCP connection the IPaddress and port may be written here like: 192.168.60.1:1234
</li><li><strong> Note: </strong>With recent rigctlds you can use also names in /dev/serial/by-id/ folder. That way the device name does not change
like it often happens if you reorder USB wires in PS's sokets.
<br>(I.E my ci7300 shows out as /dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_IC-7300_03003483-if00-port0 )
</li></ul>
<strong>Poll rate:</strong> specifies how often CQRLOG should read data from rigctld. 500 milliseconds is defaut.
If your rig is old and slow values 1000 - 3000 may work better.
<br><br>
<strong>Port number</strong> is the number of the port used to communicate with rigctld.
Default value is 4532. The second radio, has to have a different port e.g. 4533.<br>
<br><strong>Extra command line arguments</strong> usefull when you have to specify more parameters to
rigctld. E.g. CIV address (--civaddr=ID, where ID is the CIV address).<br><br>
<strong>Run rigctld when program starts</strong> is usually checked but when rig model #2 <strong>Hamlib Net Rigctld</strong> is used then it is unchecked and disabled because with that rig setting we are trying to connect external rigctld. Either in same PC or in network.
<br>If rig model #1 <b>Hamlib Dummy</b> is selected <strong>Run rigctld when program starts</strong> is forced to be checked. This allows testing and simulated operations without rig CAT control.
<br><br><strong>Use \chkvfo</strong> is normally checked. Then cqrlog tries to find out is rigctld started with parameter "--vfo" because that changes rigctld command format. Uncheck of this disables this function. Use it in case of problems.
<br><br><strong>Serial port parameters</strong> Use the manual of your rig, please choose the correct options.
Default value of rigctld is 4532.
<br><br>
<strong>Extra command line arguments</strong> usefull when you have to specify more parameters to
rigctld. E.g. CIV address (--civaddr=ID, where ID is the CIV address) or similars. See rigctld man page for supported parameters.
<br><br>
<strong>Use CWR insted of CW</strong> means that mode CW will use reverse sideband in receive.
<br><br>
<strong>Run rigctld when program starts</strong> is usually checked but when rig model #2 <strong>Hamlib Net Rigctld</strong> is used then
it is unchecked and disabled because with that rig model we are trying to connect externally running rigctld. Either in same PC or in network.
<br>If rig model #1 <strong>Hamlib Dummy</strong> is selected <strong>Run rigctld when program starts</strong> is forced to be checked.
This allows testing and simulated operations without rig with CAT control.
<ul><li><strong> Note: </strong>If you use Cqrlog without connected rig it may be usefull to select rig model #1. Then you can open TRXConrol
window and set bands, modes and frequency from there that might be more convinient than selecting them from NewQSO window.
<br>Model Hamlib Dummy starts default from 145MHz frequency. Seeing that in TRXControl window tells you that Dummy rig is running.
</li></ul>
<strong>Use \chkvfo</strong> is normally checked. Then cqrlog tries to find out is rigctld started with parameter "--vfo" because
that changes rigctld command format. Uncheck of this disables this function. Use it in case of problems. This may be default ON in future
Hamlibs version > 5.
<br><br>
<strong>Serial port parameters</strong> Use the manual of your rig, please choose the correct options.
Very often it is much better to specify only serial speed and leave other options as default.
Default value means that the settings from HamLib will be used.<br>
<br>
<strong>User defined TRXControl buttons</strong> can be defined here. Your defined buttons will shown in the TRX Control window after
you drop select this option in using the <strong>Preferences tab in the TRXControl</strong> window. For setting up buttons use
<strong>preferences</strong> option from TRXControl drop select option <strong>Preferences</strong>. From TRX Control tab you will find group
box named <strong>User defined TRX control buttons</strong>.
The first column is button name shown (4char max). In the same area the second column is the command(s) to execute. Definition can consist one
command or several in a queue, rigctld commands may be used or if definition starts with word "<strong>run</strong>" (without quotes) it can be a program or
script name with full file path for your computer.
Default value means that the default settings from HamLib will be used. That should be fine in normal cases.
<br><br>
<strong>Rig pwr ON cmd</strong> When checked Cqrlog will send power ON command at startup to rig if rig can support power commands.
<br><br>
<strong>Set UTC to Rig</strong> When checked Cqrlog will send "set_clock" command with current UTC time to rig on next full minute change after initialization.
<br><strong>Note:</strong> All rigs do not support set_clock command.
<br><br>
<strong>Compound poll</strong> When checked Cqrlog will send rig poll command as one line "+f +m +v". That is Cqrlog default.
<br>When unchecked every command will be sent with LineEnding, I.E. in it's own line. This may help poor rigctld emulators like WFview.
<br><br>
<strong>User defined TRXControl buttons</strong> can be defined here. Your defined buttons will be shown in the TRX Control window after
you select this option using the <strong>Preferences menu/Show Usr buttons</strong> in the <strong>TRXControl window.</strong>
<br>
The first column is button name shown (4char max). In the same area the second column is for the command(s) to execute.
Definition can consist one command or several ones in a queue.
<br> rigctld commands may be used directly or if definition starts with word "<strong>run</strong>" (without quotes)
it can be a program or script name with full file path.
<br><ul> <li>
<strong>Note:</strong> Rigctld supports raw command <strong>W</strong>. Parameter for it is the rig cat command in bytes. Prefix<strong> \0x</strong> must be added for Hex values. Usr1 command in picture Sets IC7300 to 60m CW with 500Hz filter and reduces output power to leagal limit with raw command.
</li> <li>
@ -279,7 +325,6 @@
<br>Ctrl-0 will disable XIT.
<br>Ctrl-9 has a random value 0-990Hz that is added to setting if split is up. If split is down it is subtracted.<br>
</div>
<br>
<img src=img/h100.png border=0> <img src=img/h100b.png border=0><br>
@ -289,11 +334,11 @@
Setting up Rotator control is very similar to setting up Rig control. Rotor models 1 and 2 (Dummy, NET rotctld ) are using TCP communication and so the <strong>Device</strong> as well
as <strong>Rotor serial parameters</strong> do not need settings.<br><br>
<br>
<br>If <b>Use rotctld \dump_state info for limits</b> cheked rotctld asks turning limits AzMin and AzMax values from rotctld with command <strong>'+\dump_state'</strong>.
<br>If <strong>Use rotctld \dump_state info for limits</strong> cheked rotctld asks turning limits AzMin and AzMax values from rotctld with command <strong>'+\dump_state'</strong>.
That makes user possible to set turning limits other than rotator default turn with
<strong>Extra command line arguments</strong>. Using string <strong> --set-conf=min_az=10,max_az=355</strong> you can set rotator so that cqrlog will never turn it below 10deg or over 355deg.
<br>Using negative value at az_min causes Cqrlog set it's 0degrees "P"-command to given negative value (while still displaying 0). I.E if az_min=-180 Cqrlog will use turning commands from "P-180" to "P180".
<br>Without negative az_min or when checkbox <b>Use rotctld \dump_state info for limits</b> is not set Cqrlog sends commands in usual range "P0 to "P360".
<br>Without negative az_min or when checkbox <strong>Use rotctld \dump_state info for limits</strong> is not set Cqrlog sends commands in usual range "P0 to "P360".
</p><p>Some rotators have turn from -180deg-0deg-180deg (south stop), like Hamlib Dummy test rotator.
<br>Most of rotators have turn 0deg - 360deg.
<br>Some may turn 0deg - >360 deg. With them cqrlog never drives values over 360, but reads position right if rotor sends over 360 deg value (sent_value-360 = cqrlog display).
@ -305,32 +350,45 @@ Setting up Rotator control is very similar to setting up Rig control. Rotor mode
You can define your own favourite frequencis and swich between them directly in New QSO window using ALT+V (Mem down)
and
ALT+B (Mem up). These keys are used in N6TR clones to switch between bands.<br>
You can also switch between memory frequencies with TRXControl's <b>M up</b> and <b>M dwn</b> buttons and set rig frequencies
You can also switch between memory frequencies with TRXControl's <strong>M up</strong> and <strong>M dwn</strong> buttons and set rig frequencies
by double clicking rows in TRXControl's Add/Modify memory list.
</p>
<img src="img/h121.png"><br><br>
<a name=ah8><h2><strong>Modes</strong></h2></a>
<img src=img/h11.png border=0><br><br>
<p>Here you can set up the default bandwidth for any of the supported modes (CW - SSB - RTTY - AM - FM).
If your radio is tuned to the corresponding band segment or if you switch the mode on the radio
control panel, CQRLOG will change the bandwidth to the desired value. The bandwidth can be
changed at any time, however a program restart will probably be needed to make the changes
take effect.<br>
Some <strong>TRX like ICOM don't have support for this in HamLib. To get mode settings work, set
all values to 0 (zero).</strong>
</p><p><strong>User definable digital modes</strong> can be set up in a separate box. Use comma
as a separator, ie. MYMODE1,MYMODE2 etc.<br>
user should add digital modes (submode names) exactly as written in this table <a href="https://adif.org/312/ADIF_312.htm#Mode_Enumeration">ADIF.org: Mode_Enumeration</a>
<p>Here you can set up the default bandwidth for any of the supported modes (CW - SSB - DATA - AM - FM) for rig selectd from <strong>Radio </strong>
selector list box.
If your rig is tuned to the corresponding band segment or if you switch the mode from TRXControl buttons CQRLOG will change the bandwidth
to the defined value.
<br>Setting 0 (zero) to values means that rig should use default bandwidth. This is good selection also when rig can not support bandwidth
settings (like some ICOM rigs).
<br>Setting -1 here means that bandwidth setting must be kept as it was. This also needs that rigctld supports negative value (version >= 4).
<br><br>
<strong>Log mode </strong>This is the data mode you most often use. Defaulting to RTTY. From mode selector you can select another mode.
If mode does not exist you have to define it in <strong>User defined digital modes</strong> and then come back to mode selector.
<br>
This mode efftects to DXCluster window's spot line coloring (See <a href="h1.html#ah11">DX Cluster</a> ) and also sets defined mode if DX spot line
is double clicked.
<br><br>
<strong>CAT cmd </strong>This is the rigctld mode command that needs to be sent to rig to get rig to proper mode for <strong>Log mode</strong>.
<br><br>
<strong>Use also reverse (cat -> rig) </strong>This defines if Cqrlog should show <strong>Log mode</strong> when rig is set to <strong>CAT cmd </strong>
mode. This may have a pitfall. If your settings are for example SSTV and USB then Cqrlog will select mode as SSTV also when you are working USB fone qsos.
<br>Usually this needs not to be set if DATA qsos are worked with external program using Cqrlog remote modes.
<br><br>
<strong>User defined digital modes</strong> can be set up in a separate box. Use comma as a separator, ie. MYMODE1,MYMODE2 etc.<br>
User should add digital modes (submode names) exactly as written in this table <a href="https://adif.org/312/ADIF_312.htm#Mode_Enumeration">ADIF.org: Mode_Enumeration</a>
If mode is missing from <strong>NewQSO/mode</strong> selection list and not added to <strong>User defined digital modes</strong> it may prevent ADIF import causing "wrong mode" error.
</p><p>
<strong>Note:</strong><br>
Cqrlog uses internally modefied mode name. We call it here <strong>CqrMode</strong>. CqrMode is created from ADIF mode and submode with conversion table. CqrMode is mainly ADIF submode if it exist, with some exceptions.
<ul><li>
<strong>Note:</strong> Cqrlog uses internally modified mode name. We call it here <strong>CqrMode</strong>. CqrMode is created from ADIF mode and
submode with conversion table. CqrMode is mainly ADIF submode if it exist, with some exceptions.
<br>Cqrlog will create four files in ~/.config/cqrlog folder for this use if they do not exist. One is a brief <strong>README_modefiles</strong> explaining three other files purposes.
<br><br>If files exist they are not overwritten keeping possible user changes there. How ever user must do backups by himself if files are edited from original format.
</li></ul>
If files exist they are not overwritten keeping possible user changes there. How ever user must do backups by himself if files are edited from original format.
These files apply to all logs created. They are not log based.
<ul>
<li><strong>submode_mode.txt</strong>
<ul><li>
<strong>submode_mode.txt</strong>
<br> This file holds submode=mode pairs used to convert incoming mode+submode pair to CqrMode that mainly is the submode.
<br><br> All pairs must be in uppercase format. User can add or delete mode pairs with text editor if definition at
<br> <a href="https://adif.org/312/ADIF_312.htm#Mode_Enumeration">ADIF.org: Mode_Enumeration</a> changes.
@ -391,23 +449,29 @@ for each operation.
</table>
<br><br>
This option allows an easy setup of the log fields to be exported into ADIF or HTML format.
Only checked fields are exported. The 'Column' option names columns at header line. 'Width' option denotes the column width in approx. count of 16px characters.
<br>Only checked fields are exported. The 'Column' option names columns at header line. 'Width' option denotes the column width in approx. count of 16px characters.
Both options affect only for the HTML export.
<br>The SAT mode field is not stored in the database but instead calculated on the fly from frequency and RX frequency and for SAT QSOs only.
<br>Width setting is ignored if "HTML auto column width" is checked when longest text in column (column name or data) sets the column width.
<br>Distances are not exported when doing log backup at cqlog closing phase. They will be calculated and exported (if selected) in ADIF, HTML and QSL label printing.
<br><br>Distances are not exported when doing log backup at cqlog closing phase. They will be calculated and exported (if selected) in ADIF, HTML and QSL label printing.
Calculation of distances requires that preferences/station/locator is set and applied (automatic) to every qso and that at least 4 digit locator
(in case "ll" is added as 5 and 6th char to get the center of grid) of destination station logged. Sometimes importing logs from other logging program may leave own station locator unset. In this case QSO list/File/Group edit must be used for updating "my locator" field.
(in case "ll" is added as 5 and 6th char to get the center of grid) of destination station logged.
<br>Sometimes importing logs from other logging program may leave own station locator unset. In this case QSO list/File/Group edit must be used for updating "my locator" field.
<br><br>
<a name=ah11><h2><strong>DX cluster</strong></h2></a>
<img src=img/h14.png border=0><br><br>
This dialog allows an easy setup of the DX cluster spot filtering. Check the bands you want
to display. If you want to supress (ie. filter out) spots for some DX countries, put
its prefixes in the box below. Use a semicolon as a separator.
<strong>Show only spots</strong><br>
This dialog allows an easy setup of the DX cluster spot filtering. Check the bands and modes you want
to display.
<br><br><strong>Note: </strong>Mode checkboxes here refer to <a href="h1.html#ah8">Preferences/Modes</a> set for every rig separately, and DATA refers to setting of "Log mode" there.
<br>Each mode's frequency limits are set at <a href="h1.html#ah6">Preferences/Bands/Frequencies</a>.
<br>Without proper setting of these spot filtering can not work and may not drop Spots you wish to disable, or may not show Spots you want to see.
<br><br> If you want to supress (ie. filter out) spots for some DX countries, put
those prefixes in the box below. Use a semicolon as a separator.
<p>
<strong>Callsign alert</strong> - allows you to enter callsigns that you are interested in. Eg. some special station for an award etc.<br>
<strong>Run this command when callsign is spotted:</strong> will run select command when any of callsigns you've enter appears in the cluster.<br>
<strong>Callsign alert</strong><br>Allows you to enter callsigns that you are interested in. Eg. some special station for an award etc.<br>
<strong>Run this command when callsign is spotted</strong><br>Will run select command when any of callsigns you've enter appears in the cluster.<br>
E.g. use this if you want to see small window with information:<br><br>
<i> zenity --info --text='Callsign $CALLSIGN detected at $FREQ $MODE' --title=Info</i><br><br>
You have to install zenity, first. <i>(Thans to SV2RCK for the tip!)</i>
@ -424,10 +488,11 @@ This is also possible with "notify-send". The display duration is set in ms (-t
</p>
<p>
<strong>Show country name in the DX cluster spot</strong> - next to every spot, you will se the coutry name of the DX station<br>
<strong>Send these commands to telnet DXCluster when connected</strong> - 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 "<strong>acc/spot by_zone 14,15,16 and not (on hf/data or on hf/rtty)</strong>" it is recommended to close each command between double quotes.<br>
<strong>Connect to DX cluster after program startup</strong> - after log is opened, cqrlog will connect to your default cluster. Please remember that
<strong>Show country name in the DX cluster spot</strong><br>Next to every spot, you will se the coutry name of the DX station<br>
<strong>Send these commands to telnet DXCluster when connected</strong><br>One or several commands with comma separated can be sent to DXCluster after connect is initialized.
If your command(s) have space(s) between,
<br>like "<strong>acc/spot by_zone 14,15,16 and not (on hf/data or on hf/rtty)</strong>" it is recommended to close each command between double quotes.<br>
<strong>Connect to DX cluster after program startup</strong><br>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.
</p>
<p align=center><img src=img/line.png></p>
@ -639,18 +704,22 @@ There are no known dependencies issues.<br><br>
<br>Normally you do not need to touch eQSL addresses. But in case something changes at eQSL web pages it might be possible to fix it here without rebuilding cqrlog program.<br><br>
<a name=ch1><h2><strong>CW interface</strong></h2></a>
<img src="img/h95.png"><br><br>
Choose your preferred CW interface for radios you have. There are 5 options: None, WinKeyer USB,
cwdaemon, K3NG keyer and HamLib. We strongly recommend Winkey USB by Steve Elliot, K1EL,
which provides 'all in one' keying, including one of most advanced paddle keyers available.
cwdaemon should be seen as a backup option with many limitations, which may need
a custom linux kernel to avoid sloppy CW at speeds above 25 WPM. If cwdaemon is used,
only keyboard keying is possible.
<br>If you use <strong>same keyer for both rigs</strong>, and it is not HamLib, you can check <strong>Do not reset when switch radios</strong> to prevent keyer reset (that sets CW speed to default).
Choose your preferred CW interface for radio you have selected from <strong>Radio</strong> selector list.
<br>There are 5 options: None, WinKeyer ,cwdaemon, K3NG keyer and HamLib in <strong>CW interface type</strong> selector list.
<br>We strongly recommend <strong>Winkeyer</strong> by Steve Elliot, K1EL, which provides 'all in one' keying, including one of most
advanced paddle keyers available.
<br>When checking <strong>Use potentiometer's CW speed</strong> Cqrlog does not send <strong>Default CW speed</strong> command to keyer
when it is initialized.
<br><br>
Detailed setup of the CW devices is here:
<strong>cwdaemon</strong> should be seen as a backup option with many limitations, which may need a custom linux kernel to avoid
sloppy CW at speeds above 25 WPM. If cwdaemon is used, only keyboard keying is possible.
<br><br>If you use <strong>Do not reset when switching radios</strong> it prevents keyer reset (that sets CW speed to default).
This option does not apply with Hamlib keyer in use.
<br><br>
Detailed setup of the CW devices are here:
<ul>
<li><a href=wkusb.html><strong>Winkeyer</strong></a></li>
<li><a href=cwd.html><strong>cwdaemon</strong></a>
<li><a href=wkusb.html><strong>Winkey USB</strong></a></li>
<li><a href="http://blog.radioartisan.com/arduino-cw-keyer/" target="_blank">
<strong>K3NG</strong></a></li>
<li><a href=cwh.html><strong>HamLib</strong></a>
@ -683,9 +752,9 @@ There are no known dependencies issues.<br><br>
Setting wsjt-x interface is mainly same as setting fldigi. How ever communication is done via UDP frames and so the IP address and Port must be specified.
<br>Default values are <strong>127.0.0.1</strong> or <strong>localhost</strong> for address and <strong>2237</strong> for port. These are set in wsjt-x settings/reporting and if changed there, must also to be changed here.
<br>
Address can also be other PC's IP address if wsjt-x is running in different networked PC than cqrlog, or even<b> 0.0.0.0</b> when cqrlog listens all transmits from every wsjt-x in network.
Address can also be other PC's IP address if wsjt-x is running in different networked PC than cqrlog, or even<strong> 0.0.0.0</strong> when cqrlog listens all transmits from every wsjt-x in network.
<br><br>You can also use a multicast address for both <b>wsjt-x/settings/Reporting/UDP Server</b> and <b>cqrlog/preferences/fldigi/wsjt interface/wsjt addr</b>. Cqrlog will handle ip addresses starting with "239." as multicast addresses.
<br><br>You can also use a multicast address for both <strong>wsjt-x/settings/Reporting/UDP Server</strong> and <strong>cqrlog/preferences/fldigi/wsjt interface/wsjt addr</strong>. Cqrlog will handle ip addresses starting with "239." as multicast addresses.
<br>With multicast you are able to run several programs listening to wsjt-x udp broadcasts at same time. To start with multicast try multicast group address "239.255.0.0" for both cqrlog and wsjt-x (and also other programs needed to listen wsjt-x)
<br><br>
Using <strong> WB4 chk starts from</strong> it is possible to limit log search starting from given date for callsign and/or locator.
@ -734,9 +803,9 @@ There are no known dependencies issues.<br><br>
<br><strong>Note:</strong> Setting html browser here affects only to call attachments and it can be different than system default, or different than selected at preferences/program tab.
<br><strong>Hint:</strong> If you click Web browser name edit box a file open dialog opens and you can navigate to your browser. If you place cursor on Web browser name edit box, press left button and keep it down, you can paint exisiting text and use delete button to clear it and type new text.
<a name=ch5><h2><strong>Callbook support</strong></h2></a>
CQRLOG supports <a href="http://HamQTH.com">HamQTH</a> and <a href="http://qrz.com">QRZ.com</a>
CQRLOG supports <a href="http://HamQTH.com">HamQTH</a>, <a href="http://qrz.com">QRZ.com</a> and <a href="http://qrzcq.com">QRZCQ.com</a>
callbooks but only access through the XML interface is supported. HamQTH has a free interface,
for QRZ.com you have to pay an annual fee.<br><br>
for QRZ.com and QRZCQ.com you have to pay an annual fee.<br><br>
<img src="img/h1112.png"><br><br>
<a name=ch6><h2><strong>RBN support</strong></h2></a>
@ -767,17 +836,19 @@ There are no known dependencies issues.<br><br>
</ul>
<li><strong>Delete old information after XX seconds</strong> The dots won't stay on the map forever.
180 seconds (3 minutes) is a good default value.
<br><b>Note:</b> Dots also depend on the band, if you change band, dots will always be deleted. All data is band related.</li>
<br><strong>Note:</strong> Dots also depend on the band, if you change band, dots will always be deleted. All data is band related.</li>
</ul>
<br><br>
<a name=ch7><h2><strong>Online log upload support</strong></h2></a>
CQRLOG supports online log upload to <a href="http://HamQTH.com">HamQTH</a>,
<a href="https://secure.clublog.org/loginform.php">ClubLog.org</a> and
<a href="http://hrdlog.net/">HRDLOG.net</a><br>
<a href="https://secure.clublog.org/loginform.php">ClubLog.org</a>,
<a href="http://hrdlog.net/">HRDLOG.net</a> and
<a href="https://n1mmwp.hamdocs.com/appendices/external-udp-broadcasts/#contact">N1MM+ UDP contact messages</a><br>
<img src="img/h1116.png"><br><br>
Both ClubLog and HamQTH need a username and password, Clublog also needs the email address
used when you registered. HRDLog.net needs only user name and the code you got by e-mail.
N1MM+ format UDP messages require a hostname/IP and port number in format <i>hostname:port</i> (e.g. 127.0.0.1:5444).
You can set different color for each service. This color will be used for status messages
which will inform you about upload progress.
<strong>Upload QSO data immediately after save, update or delete</strong> means that every
@ -789,6 +860,7 @@ There are no known dependencies issues.<br><br>
<a name=ch8><h3>How to get it to work?</h3></a>
<ul>
<li>check if you have set correct username, password (email, Code)</li>
<li>in case Url address of online log API has changed you are able to change it here</li>
<li>export all data from the log to ADIF file</li>
<li>import this adif file to the website of online log you are going to use
(if you are using HamQTH, please wait untill the email about a successful import arrives)

View File

@ -60,13 +60,13 @@
<td> </td>
</tr>
<tr>
<td width="35%">Ctrl-1...Ctrl-9</td>
<td width="35%">Ctrl-1...Ctrl-9<br><br></td>
<td width="65%">Set split using XIT if rig supports it. Value 0 - 9999Hz UP/DOWN
<br>Ctrl-9 will add random value 0 - 990Hz to setting. Subtract if split is DOWN
<br>Keys work also when TRXcontrol window is active</td>
</tr>
<tr>
<td width="35%">Ctrl-0</td>
<td width="35%">Ctrl-0<br></td>
<td width="65%">Disables XIT
<br>Key works also when TRXcontrol window is active</td>
</tr>
@ -293,6 +293,54 @@
</tbody>
</table>
<p align=center><img src=img/line.png></p>
<strong>When "Contest" window is active:</strong><br><br>
<table>
<tr>
<td valign="top"><img src="img/bulb.png"></td>
<td bgcolor=ccffff width="100%">
<strong><font color="blue">The "Contest" is the screen for fast qso input and some contest related properties</font></strong>
</td>
</tr>
</table>
<br><br>
<table width="100%" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td width="35%">ESC<br><br></td>
<td width="65%">1x Stops CW memory sending<br>2x Returns cursor to Call column<br>3x Empty all fields and prepare program for a new QSO</td>
</tr>
<tr>
<td width="35%">F1..F10<br></td>
<td width="65%">Sends CW memories 1..10 when rig is in CW mode<br>Call voice keyer script 1..10 when rig is in phone mode</td>
</tr>
<tr>
<td width="35%">Shift+F1<br></td>
<td width="65%">Starts/stops Memory1 (CW or phone) repeat timer when S&amp;P is enabled<br>Writing to call column or 1xESC stops repeat sending (in case of CW memory)</td>
</tr>
<tr>
<td width="35%">PgUp</td>
<td width="65%">CW Speed +2 WPM (QRQ)</td>
</tr>
<tr>
<td width="35%">PgDn</td>
<td width="65%">CW Speed -2 WPM (QRS)</td>
</tr>
<tr>
<td width="35%">Ctrl-1...Ctrl-9<br><br></td>
<td width="65%">Set split using XIT if rig supports it. Value 0 - 9999Hz UP/DOWN
<br>Ctrl-9 will add random value 0 - 990Hz to setting. Subtract if split is DOWN</td>
</tr>
<tr>
<td width="35%">Ctrl-0<br></td>
<td width="65%">Disables XIT</td>
</tr>
<tr>
<td width="35%">Ctrl-A<br></td>
<td width="65%">Sets callsign to Band map (for later return with double click)</td>
</tr>
</tbody>
</table>
<p align=center><img src=img/line.png></p>
<a name="ah17"><h2><strong>New QSO (online logging)</strong></h2></a>
While logging online (during your QSO), date, start and end time are

View File

@ -31,10 +31,10 @@
<a name="ah19"><h2><strong>DX Cluster Operation</strong></h2></a>
<img src="img/h4.png" border="0"><br><br>
There are two basic options - web cluster and the usual DX cluster with
telnet options. The web cluster method is good for monitoring. There is no
internal node setup, but you can't spot. CQRLOG downloads the spots at
telnet options. The <b>web cluster</b> method is <b>good for monitoring</b>. There is no
internal node setup, <b>you can not spot</b>. CQRLOG downloads the spots at
regular intervals, the interval is fixed and cannot be changed.
<br><br>Telnet cluster is fully featured. You can also set up your
<br><br>Telnet cluster is <b>fully featured</b>. You can also set up your
preferences on the node. The Command line box is used for all commands,
settings etc. with one exception - the Tilde key (~) is used for spotting.
The color coding and spot filtering is set up in the
@ -42,6 +42,10 @@ The color coding and spot filtering is set up in the
Cluster node by simply clicking the 'Connect' button. You should see the cluster node
messages indicating progress. You can enter any command into the 'Command' field
(ie. SH/DX to display last spots, SH/U to see the users connected to the node etc.).
<br><br><img src="img/h4f.png" border="0"><br><br>
When Telnet connection is active the "F-keys" tab becomes visible. There you can define 10 commands to be sent to DXCluster by pressing corresponding
<b>F1 -F10 key while keeping also Shift key pressed</b>.
<br>
<br> Double click with mouse left on DX spot line applies DX callsign to NewQSO and sets rig frequency to spot QRG.
If you have checked <b>NewQSO/Auto</b> checkbox and set mode frequencies at <b>preferences/bands/frequencies</b> also right mode will be set to rig.
<br>If there is additional info available on spot line it is copied to clipboard. You can set cursor to desired NewQSO field and apply info from clipboard with Ctrl-V.

View File

@ -115,22 +115,26 @@ The 'Save' button exports the statistics to an ASCII text file.
The DOK statistics give you an overview of your collected German DOKs.
These statistic is derived from the DOK field of each logged contact.<br>
If a QSO record does not contain DOK information, the statistics do not reflect this fact.<br><br>
To resolve the DOK into a readable name, please activate in menu preferences - program the setting "Check for newer version of DOK database after program startup". This will download dok.csv and sdok.csv files to ~/.config/cqrlog/dok_data<br><br>
The option 'Show logged (S)DOKs only' will reduce the list, to show only worked DOKs and not all known DOks.<br><br>
The ComboBox 'DOK & SDOK' give you the option to see DOK&SDOK, only DOK and only SDOK.<br><br>
To resolve the DOK into a readable name, please activate in menu preferences - program the setting "Check for newer version of DOK database after program startup". This will download dok.csv and sdok.csv files to ~/.config/cqrlog/dok_data<br>
The option 'Show logged (S)DOKs only' will reduce the list, to show only worked DOKs and not all known DOks.<br>
The ComboBox 'DOK & SDOK' give you the option to see DOK&SDOK, only DOK and only SDOK.<br>
<strong>Caution: </strong> Be aware that the DOK statistic window will not open, when dok.csv and sdok.csv files are missing on ~/.config/cqrlog/dok_data.<br><br>
The 'Export to HTML' button exports the statistics to a HTML table file.<br><br>
The 'Export to HTML' button exports the statistics to a HTML table file.<br>
The 'Show station list' button will show a list of all stations behind the selected and confirmed DOKs.<br><br>
<img src="img/StationList.png" border="0">
<p>
The BIG SQUARE and COUNTY gives you band based report of worked Squares or Counties.<br>
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.<br>
The 'Save to...' button exports the statistics to a HTML file.<br><br>
<img src="img/SquareStat.png" border="0">
<img src="img/CountyStat.png" border="0"><br>
</p>
<p align=center><img src=img/line.png></p>
<table style="text-align: left; width: 100%;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>

View File

@ -32,12 +32,13 @@
<p>Assuming that your CW interface is properly set up and working,
you can add and/or edit your CW messages.<br><br>
Set up your CW messages via Preferences/CW inteface/CW messages button.
<br> You can also access CW messages from the upper menu bar of the New QSO window.
<br> You can also access CW messages from the top menu of the New QSO window.
Click on the 'File' item and select CW Messages.<br><br>
<img src=img/h96b.png>&nbsp;&nbsp;<img src=img/h96.png><br><br>
Choose the <strong>CW Messages</strong> option. By using the form opened you can edit your CW messages that
will be sent when you press the corresponding <strong>F</strong>-key(s).
You can set up to 10 predefined messages. Save and load them from file for quick change of all messages.<br><br>
CW messages will be sent when you press the corresponding <strong>F</strong>-key(s) or click message buttons in <b> Memory keys </b> or <b> CW type </b> windows.
You can set up to 10 predefined messages in two sets.<br>
Set1 <b>"S&P"</b> is always default. Set2 <b>"Run"</b> is active when contest window is opened and checkbox "S&P" is <b>NOT</b> checked.<br>
Use buttons <b>Save</b> and <b>Load</b> for save/load both sets to/from file.<br><br>
<img src=img/h97.png><br><br><a name="predef">
There are some predefined macros which you can use in your messages:</a><br><br>
<table border="0" cellpadding="5" cellspacing="2" width="50%">
@ -57,8 +58,11 @@
<li>%h - greeting GM/GA/GE calculated from the %c station location time</li>
<br>
<li>%xn - contest exchange serial number</li>
<li>%xm - contest exchange message</li>
<li>%xns - contest exchenge serial number sends 9->N and 0->T</li>
<li>%xnr - contest exchange serial number received</li>
<li>%xnrs- contest exchenge serial number received sends 9->N and 0->T</li>
<li>%xm - contest exchange message</li>
<li>%xmr - contest exchange message received</li>
<li>%xrs - full contest exchange RST+SerialNR+Message sends 9->N and 0->T.<br>
(May be used always instead of %rs as if serNR and Message are empty just sends plain report.)</li>
</li><li> + or - in macro text will increase/decrease CW speed by 5WPM/one mark.
@ -67,7 +71,7 @@
<br> 1) Version of Hamlib must be at least Hamlib 4.1~git Last commit 2020-10-20 03:22:59 2020 +0000 SHA=8a769c
<br> 2) Do not use space(s) between text and +(or -) rigctld will add them I.E. "TU+++599---001"
<br> 3) Speed change works only with BKIN mode (not F-BKIN) and at the moment new Icom rigs (tested only ic7300)
</li>
<br> 4) Does not work if Hamlib CW buffering is used</li>
</ul>
@ -75,7 +79,14 @@
</tr>
</tbody>
</table>
</p><a name=mk1><br></a> <img src="img/misc8.png" name="8" width="500" height="85">
</p>
<p>
<img src=img/h96a.png><br>
<strong>Send hex bytes to keyer</strong>. 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.
<br>Consult your keyer's manual to find needed commands.
</p>
<a name=mk1><br></a> <img src="img/misc8.png" name="8" width="500" height="85">
</img>
<p><strong>Memory keys</strong> 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.
<br>When using <strong>Memory keys</strong>-form with mouse, or keyboard, you are able to lauch memories by mouse click or by <strong>F</strong>-key press from keyboard keys. Same with PgUp and PgDn, both are working, keys and mouse click.

View File

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
OS<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<head>
@ -36,34 +36,45 @@
<img src="img/h118b.png" name="8" width="320" height="360">
</img>
<p>
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.
<br>Additional selections are User defined buttons, Power buttons, Vfo A and B buttons and memory information field.
<br>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 <a href="h1.html#ah7">preferecences/TRX control</a>.
<br><br>You can select rig vfo with buttons <b>A</b> and <b>B</b> but there is no feedback what vfo is currenty used as Icom brand rigs do not support "Get_vfo" command.
</p><a name="m4"></a><p>If <b>M_up</b> or <b>M_dwn</b> are pressed or memory is selected by double click of memory list, the information text will show up to <b>Mem Info</b> field. If frequency is changed manually after that info text will disappear.
<br>If memory does not have info text (max 25chr) just <b>x of y</b> is displayed where x refers to memory order in Add/Modify memory list and y total amount of memories.
<b>None</b> (in red) indicates that there are no memory lines.
<br>With <b>P-on/off/stb</b> buttons current rig can be set ON, OFF or STANDBY (if it supports rigctld power commands).
<br>Default setting for power buttons is hidden. You can change it via dropdown menu "Preferences".
<br><br><b>M_up</b> and <b>M_dwn</b> buttons select next/previous entry from memory list. <b>M_Wri</b> adds entry to memory list from current rig frequency and mode and info field shows<b> "MW ok"</b>.
<br><br>You can change rig frequency by clicking frequency display. Then you can enter a new <b>MHz value</b> and press enter.
<br>You can also use mouse wheel to change frequency. One wheel step is 100Hz, Keeping <b>Shift key</b> pressed the step is 1kHz. Keeping <b>Ctrl key</b> pressed the step is 10kHz.
<br><br>
By clicking frequency display you can set a new frequency and click again (or press enter) to send command to rig.
<br>You can also use mouse roll to move frequency after first clicking the frequency display.
<ul><li>By default steps are 100Hz
</li><li>Keeping <strong>Shift key</strong> pressed while turning the roll steps are 1kHz
</li><li>Keeping <strong>Ctrl key</strong> pressed while turning the roll steps are 10kHz
</li><li>Keeping both <strong>Shift key</strong> and <strong>Ctrl key</strong> pressed while turning the roll steps are 1MHz
</li></ul>
You can select rig vfo with buttons <strong>A</strong> and <strong>B</strong> but there may be no feedback what vfo is currenty used (Icom brand rigs do not support "Get_vfo" command).
</p><a name="m4"></a><p>If <strong>M_up</strong> or <strong>M_dwn</strong> are pressed or memory is selected by double click of memory list, the information text will show up to <strong>Mem Info</strong> field. If frequency is changed manually after that info text will disappear.
<br>If memory does not have info text (max 25chr) just <strong>x of y</strong> is displayed where x refers to memory order in Add/Modify memory list and y total amount of memories.
<strong>None</strong> (in red) indicates that there are no memory lines.
<br>With <strong>P-on/off/stb</strong> buttons current rig can be set ON, OFF or STANDBY (if it supports rigctld power commands).
<br>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.
<br><br><strong>M_up</strong> and <strong>M_dwn</strong> buttons select next/previous entry from memory list. <strong>M_Wri</strong> adds entry to memory list from current rig frequency and mode and info field shows<strong> "MW ok"</strong>.
<br><br>You can change rig frequency by clicking frequency display. Then you can enter a new <strong>MHz value</strong> and press enter.
<br>You can also use mouse wheel to change frequency. One wheel step is 100Hz, Keeping <strong>Shift key</strong> pressed the step is 1kHz. Keeping <strong>Ctrl key</strong> pressed the step is 10kHz.
Keeping both keys pressed the step is 1MHz.
<br>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.
<br><br><b>NOTE!!!</b> <br>Check <b>pereferences/TRXcontrol/Switch only between mode related memories</b><br>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 <b>M_up</b> and <b>M_dwn</b> with "Show mode related" checked.
<br><br>
<ul><li><strong>NOTE: </strong>Check <strong>pereferences/TRXcontrol/Switch only between mode related memories</strong><br>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 <strong>M_up</strong> and <strong>M_dwn</strong> with "Show mode related" checked.
</li></ul>
<img src="img/h122.png" name="9" width="393" height="367">
<img src="img/h121.png" name="10" width="373" height="367">
</img>
<br/>
<br>You can set rig by double click of an memory row in <b>Open memory list</b>. Similar action happen also in <b>Add/Modify memories</b>. The differense is that you can keep
<b>Open memory list</b> open while loggeing qsos etc. Where as <b>Add/Modify memories</b>, when open, blocks other functionality.
<br>While <b>Add/Modify memories</b> is open you can use buttons in right frame. Texts of buttons are quite self explaining.
<br>Deleting a memory line, or all lines, do not have any further warning questions (Are you sure?). In case you deleted something wrong just close window with <b>Cancel</b>. No changes are recorded then.
<br>Closing <b>Add/Modify memories</b> is done with buttons <b>OK</b> or <b>Cancel</b>. Closing <b> Open memory list</b> window must be done using <b>x</b> at top right corner of window.
<br> <b> Open memory list</b> closes also if <b>Add/Modify memories</b> is opened. They can not be open at same time.
<br><br> If you make changes to <b>preferences/TRXControl</b> after that just select another radio (even if not existing) from radio buttons <b>Radio 1</b> , <b>Radio 2</b>. Then select back the previous radio and new values are read. It is possible also reload settings from <b>NewQSO/File/Refresh TRX/ROT control</b>.</p>
<br>You can <b>search a memory</b> by clicking the first (header) line of grid. Search is done against the column you clicked.
<br>You can set rig by double click of an memory row in <strong>Open memory list</strong>. Similar action happen also in <strong>Add/Modify memories</strong>. The differense is that you can keep
<strong>Open memory list</strong> open while loggeing qsos etc. Where as <strong>Add/Modify memories</strong>, when open, blocks other functionality.
<br>While <strong>Add/Modify memories</strong> is open you can use buttons in right frame. Texts of buttons are quite self explaining.
<br>Deleting a memory line, or all lines, do not have any further warning questions (Are you sure?). In case you deleted something wrong just close window with <strong>Cancel</strong>. No changes are recorded then.
<br>Closing <strong>Add/Modify memories</strong> is done with buttons <strong>OK</strong> or <strong>Cancel</strong>. Closing <strong> Open memory list</strong> window must be done using <strong>x</strong> at top right corner of window.
<br> <strong> Open memory list</strong> closes also if <strong>Add/Modify memories</strong> is opened. They can not be open at same time.
<br><br> If you make changes to <strong>preferences/TRXControl</strong> after that just select another radio (even if not existing) from radio buttons <strong>Radio 1</strong> , <strong>Radio 2</strong>. Then select back the previous radio and new values are read. It is possible also reload settings from <strong>NewQSO/File/Refresh TRX/ROT control</strong>.</p>
</p><p>See also <a href="h1.html#ah7">setting up TRX/ROTControl</a>
</p>
@ -76,23 +87,24 @@ From NewQSO/Window you can open <strong>Rotor control</strong> window.
<p><img src="img/h121a.png" name="121a"><img src="img/h121aa.png" name="121aa"><img src="img/h121b.png" name="121b">
<img src="img/h121e.png" name="121e"><img src="img/h121c.png" name="121c"><img src="img/h121d.png" name="121d">
</p>
Window shows current position of rotor with <b>numerical display, Short and Long path Buttons and radio buttons to select rotor 1 or rotor 2</b>.
<br>User can resize window and select <b>additional bar display, direction and stop buttons</b>.
Window shows current position of rotor with <strong>numerical display, Short and Long path Buttons and radio buttons to select rotor 1 or rotor 2</strong>.
<br>User can resize window and select <strong>additional bar display, direction and stop buttons</strong>.
<br>Small numbers on top of bar display shows current rotor limits. Usually this is 0..360, but may be also -180..180 depending on rotor model, or other user defined limits.
<br>Direction drive buttons run rotor until stop button is pressed or maximum 15sec time limit is reached.
<br><br> When a call is entered to <b>NewQSO</b> callsign field and cursor is moved away from that field <b>DXCC info</b> part gets filled against call prefix and/or locator grid,
then, when <b>DXCC/AZIM</b> shows a value, it is possible to press <b>Short Path</b> or <b>Long Path buttons</b> and your ro
<br><br> When a call is entered to <strong>NewQSO</strong> callsign field and cursor is moved away from that field <strong>DXCC info</strong> part gets filled against call prefix and/or locator grid,
then, when <strong>DXCC/AZIM</strong> shows a value, it is possible to press <strong>Short Path</strong> or <strong>Long Path buttons</strong> and your ro
tor will turn your antenna to that direction.
<br><br>It is also possible to set new direction by a click on <b>Azimuth display</b>, type a new direction value and press <b>Enter</b> or use <b>mouse wheel</b> to select degrees.
<br>One wheel step is one degree. If you keep <b>Shift key</b> pressed while turning mouse wheel the step will be 10 degrees. If <b> Ctrl key</b> is pressed instead step will be 100 degrees.
<br><br>It is also possible to set new direction by a click on <strong>Azimuth display</strong>, type a new direction value and press <strong>Enter</strong> or use <strong>mouse wheel</strong> to select degrees.
<br>One wheel step is one degree. If you keep <strong>Shift key</strong> pressed while turning mouse wheel the step will be 10 degrees. If <strong> Ctrl key</strong> is pressed instead step will be 100 degrees.
<br>If you have used mouse wheel it is enough to move mouse away from Azimuth reading to get rotor turning. No enter keypress is needed then.
<br><br>Pressing <b>Stop button</b> stops rotor turning started either with path or turn buttons.</p>
<br><br>Pressing <strong>Stop button</strong> stops rotor turning started either with path or turn buttons.</p>
<p>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.
<br>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.
<br>The length of color flash depends on poll rate and is error permanent or not.
<br>
<br>If you make changes to <b>preferences/Rot Control</b> after that just select another rotor (even if not existing) from radio buttons <b>Rotor 1</b> , <b>Rotor 2</b>. Then select back the previous rotor and new values are read. It is possible also reload settings from <b>NewQSO/File/Refresh TRX/ROT control</b>.</p>
<br>If you make changes to <strong>preferences/Rot Control</strong> after that just select another rotor (even if not existing) from radio buttons <strong>Rotor 1</strong> , <strong>Rotor 2</strong>. Then select back the previous rotor and new values are read. It is possible also reload settings from <strong>
NewQSO/File/Refresh TRX/ROT control</strong>.</p>
</p><p>See also <a href="h1.html#ah7">setting up TRX/ROTControl</a>
</p><table width="100%" border="0" cellpadding="2" cellspacing="2">
<tbody>

View File

@ -40,15 +40,17 @@
<li> <b>Show ShortPath</b> By default Grayline map will show straight line from your station (from your locator defined) to station you enter to NewQSO/callsign.
With this selection you can switch the straight line to plotted great circle short path. </li>
<li> <b>Show LongPath</b> As another option you can select great circle longpath. This can be selected with, or without short path.
<li> <b>Show BeamPath</b> If you use ROT control you can select to show Beam path heading.
<li> <b>Clear all spots</b> Clears all RBN spots from map.
<br><b> Note:</b> Dots also depend on the band, if you change band, dots will always be deleted. All data is band related.</li>
<li> <b>Watch for</b> Opens an edit window where you can change callsign or prefix watched without opening preferences. see: <a href="h1.html#ch6">RBN support</a></li>
</ul>
<img src="img/h1114d.png"><br><br>
<img src="img/h1114b.png"><br><br>
<img src="img/h11141.png"><br>
<img src="img/h11142.png"><br>
<img src="img/h11143.png"><br>
<img src="img/h11144.png"><br><br>
<p align="center"><img src=img/line.png></p>
<br>

BIN
help/img/CountyStat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
help/img/SquareStat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 84 KiB

BIN
help/img/contest_cmn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

BIN
help/img/contest_mwc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

BIN
help/img/contest_nac.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 41 KiB

BIN
help/img/h11141.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

BIN
help/img/h11142.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

BIN
help/img/h11143.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

BIN
help/img/h11144.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 453 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 19 KiB

BIN
help/img/h4f.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 38 KiB

BIN
help/img/h96a.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 52 KiB

BIN
help/img/wsjt21b.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
help/img/wsjt37.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -12,6 +12,7 @@
<h2><a name="aa"><strong>Contents:</strong></a></h2>
<h3><strong>Quick start</strong></h3>
<ul>
<li><a target="right" href="/usr/share/cqrlog/changelog.html">Changelog</a></li>
<li><a target="right" href="h1.html">Starting cqrlog</a></li>
<li><a target="right" href="firsttime.html">Running first time</a></li>
<li><a target="right" href="h1.html#ah1">Preferences</a></li>

View File

@ -98,8 +98,8 @@ and
at <a href="http://hamlib.sourceforge.net/"><strong>http://hamlib.sourceforge.net/</strong></a>, however
precompiled packages are available for almost all major Linux distributions.
</li>
<li><strong>MySQL server and client</strong> - The MySQL client must be installed,
without this the program will not work at all. A MySQL server must be reachable,
<li><strong>MariaDB mysql server and client</strong> - The MariaDB client must be installed,
without this the program will not work at all. A MariaDB server must be reachable,
either on the local machine or via a network.
</li>
<li><strong>libssl-devel</strong> needed if you want to use LoTW and/or online log upload

View File

@ -1,3 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<head>
@ -76,6 +77,14 @@ Top line will show band and mode that is in use, Checking <b>"noHst”</b> (no h
</br>If there are no CQ lines during period then old monitor lines will turn to silver gray indicating that right period of possible answer is passed. This happens ONLY if <b>"noHst”</b> is checked. If not, colors stay as they are.
</br>CQ-lines turning to silver gray does not disable double click answering property. It is just informative color change.
</br>If not checked form will show also older CQs (scrolling) to see what you missed while having a coffee break :). Only 20 lines, how ever.
<p ><img src="img/wsjt37.png" name="22" width="353" height="282"></p>
</br></br>Checking <b>"USt”</b> (USA states) will show US states of CQ callers. Color of text is based to same formula against your logged qsos as described below with callsigns and locators.
<br>State is checked against a list of callsigns=states that is created from file EN.dat wich is a part of zip file from http://wireless.fcc.gov/uls/data/complete/l_amat.zip
<br>This list is named as <b>fcc_states.tab</b> and created into <b>~/.config/cqrlog/ctyfiles</b> folder. Creation needs command line programs <b>wget</b> and <b>unzip</b>. You can test existense of those by simply writing those names, one by one, to command terminal.
If they exist response should be some kind of help text. If they do not exist use your package manager to install them.
<br>Cqrlog will inform you about <b>fcc_states.tab</b> when you check the <b>"USt"</b> checkbox (if file is over 90d ays old or missing). File holds all US calls with states and is over 10Mb in size amd that size is taken from computers RAM memory when <b>USt</b> is checked. It should not be problem with modern computers, but may be it with small one card computers like Raspberry Pi (specially older versions).
</br></br>Checking <b>"sTx”</b> (Stop TX) will fix missing Wsjt-x property: If you answer to someone's CQ at same frequency Wsjt-x will stop your TX if CQ-caller answers to someone else than you. How ever Wsjt-x developing team has
decided that if you anśwer to CQ caller on other frequency (split) your TX remains on even if the answer was directed to someone else.
To reduce band QRM caused by you, you may check <b>sTx</b> to stop your TX if answer was not for you.
@ -88,13 +97,35 @@ In some cases your TX may be shut down after you have first tried to answer some
</img>
<img src="img/wsjt30.png" name="30" width="353" height="83">
</img></p><p>
If you do not want any information texts, just alerts, you can check <b>nTxt</b> to prevent richmemo text updates and minimize window size horizontal or drop it completely down with (<b>_</b>) while alerts and follow are still working.
</br>
If you have Wsjt-x devel version 1.9.0-rc3 r8592 (or higher) <strong>color</strong>ing is sent <strong>back</strong> to Wsjt-x with same choosed colours as CQ-monitor uses.
How ever there are some limitations compared to CQ-monitor:
</br><li><strong>color back</strong> can not change lower case letters of Band Activity line in case call or locator is worked. Just font color is changed</li>
<li><strong>color back</strong> can not print locator with 2 colors in case main grid is worked, but subgrid(numerical part) is not. In that case locator will have maingrid color and yellow background.</li>
<li><strong>color back</strong> will paint both "CQ" and cq-direction with "CQ ext" color if CQ is not directed to you.</li>
</br>
With older versions of wsjt-x this causes unkonwn command error and then <b>nTxt</b> should not be checked until you get newer version of Wsjt-x.
</br></p><p>
<img src="img/wsjt34.png" name="34" width="353" height="282">
</img>
<img src="img/wsjt33.png" name="33" width="353" height="282">
</img></p><p>
If you are able to use <strong>color back</strong> feature you may want to change some Wsjt-x color settings and maybe check "CQ only" checbox at Main window. Selecting also font to some of "mono"+ "bold" ones from "Configuration/General/Decoded Text Font" could make a better view.</p>
<p>
<ul><strong>A word of warning:</strong></ul> In Wsjt-x selecting <strong>CQ only</strong> will <strong>disable Generating of Std messages</strong> by double click either <strong>followed</strong> message line or Wsjt-x <strong>map's non-cq lines</strong>.
</br>This <strong>does not</strong> happen if <strong>CQ only</strong> is <strong>uncheked</strong>. Unchecking it after not working double click does not help if Band Activiy window does not contain that line from which <strong>Wsjt map</strong> or <strong>follow</strong> line was created.
</br>That is because Wsjt-x must found equal line from Band activity and UDP command that produces Std General messages creation.
</br> This may change in future devel versions or in official release of 1.9.0, but at the moment you should be aware of that.</p>
<p><strong>Hint:</strong> If you have had <strong>CQ only</strong> checked and you want to load Std message from just appeared line from <strong>Wsjt map</strong> or <strong>follow line</strong> uncheck <strong>CQ only immediately</strong> during time that entry is not grayed (ongoing period).
Wsjtx will produce again last periods decode (wsjt map will show it double) and after that you can have effect for double click.
If you do not want any information texts, just alerts, you can check <b>nTxt</b> to prevent text updates and minimize window size horizontal or drop it completely down with (<b>_</b>) while alerts and follow are still working.
</br></br>
Selecting <b>DX</b> checkbox cqrlog fiters away all calls that are from same continent as you are. This works both in Cq monitor and MAP mode<br>
Checking <b>Show LoTW, eQSL usage in CQ-monitor</b> from <b>preferences/fldigi- wsjt interface</b> L &amp; E will show up in front of continent in CQ-monitor<br>
</p><p><img src="img/wsjt21.png" name="21" width="363" height="282">
</img><img src="img/wsjt21b.png" name="21" width="363" height="282">
</img></p>
Checking <b>“flw”</b> new part of monitor opens. This will make easier to follow a DX who does not stay on same frequency, but jumps around answering to callers.
</br>Type in a callsing. The callsign is checked to be written in upcase letters and spaces are trimmed away. Pressing RETURN at the end of typing turns <strong>Follow</strong> button ON (green).

View File

@ -4,9 +4,233 @@
<title>List of changes in CQRLOG</title>
</head>
<body>
<strong>New user?</strong> Please look at <strong>Help -> Keys and shortcuts</strong> to find out how to operate CQRLOG from keyboard.
<strong>New user?</strong> Please look at <strong>Help -> Keys and shortcuts</strong> to find out how to operate CQRLOG from keyboard.<br>
You can return to this changelog via <strong>Help</strong> after Cqrlog has started.
<hr>
<br>
<ul style="list-style: square;text-align:left; color: green;" >
<li>eQSL download: Fixed the stuck up caused by eQSL starting to add one more empty line at the end of downloaded file</li>
<li>Contest: Inform remote mode 'on' when saving manual entered qso. Multimode contests like<br>
NAC (CW,Phone,MGM) it may happen that remote is left on when jump from FT8 to CW/Phone.<br>
Then entering qso manually looks like saved, but will never appear into log.
<li>Makefile: Clean fix (by Bill, WK2X)</li>
<li>Contest filter: If Contest window is open contest name is copied to filter</li>
<li>(118)</li>
<li>CW Messages: Fix to open/close when Contest window open and S&P not checked</li>
<li>CW Messages: Added another set F1-F10 for Contest RUN mode</li>
<li>RigControl: Update Hamlib error codes list </li>
<li>Log Upload: Add UDP Log Uploader based on N1MM+ format(by Steven, M1SDH)</li>
<li>Preferences:CWinterface: Layout fixes</li>
<li>Hammlib:CW and Voice keying: Changes for latest Hamlib w34/2023</li>
<li>DBConnection:Utils:Configuration:Export: Force file extension to be '.ini' as Configuration:Import lists only '.ini' files </li>
<li>NewQSO: Details has new Tab 'Call statistic' After call entered shows wkd/L/E status on band grid</li>
<li>RigControl: rigctld parameter '-C auto_power=1' is added only if user checks 'Rig pwr ON cmd' in TRXControl preferences.
This should help old Hamlibs that claim auto_power is wrong parameter and refude to start</li>
<li>NewQSO: Details Tab selected remembered even when satellite mode enabled</li>
<li>RigControl: Fix to set_powerstat at init</li>
<li>Group edit: QSL sent and received date can be cleared</li>
<li>Fixed date format checking routine</li>
<li>HRDUpload: Fix to error codes</li>
<li>NewQSO+Contest: Use rigctld:\send_voice_mem instead of voice_keyer script if rig supports it</li>
<li>eQSL Import: Checkbox to change Rcvd date to current date -1 after successfull download</li>
<li>Added HamQTH & Clublog error hanling code by phl0 that can be found from<br>
https://github.com/ok2cqr/cqrlog/compare/master...phl0:moreDetailedErrorHandlingForOnlineLogs</li>
<li>Group edit warning color change for readability</li>
<li>CW:Hamlib keyer: Should now detect Hamlib>=Jul-2023 that differs with CW commands</li>
<li>Cabrillo export: Sets now suffix '.cbr' for filename as default</li>
<li>(117)</li>
<li>Preferences:TRXControl: Added checkbox 'compound poll' (default checked) When unchecked rig polling commands are sent each one on it's own line. This may help poor emulators like WFview.</li>
<li>HamlibCW: Fixed StopSending procedure. Has now '+\stop_morse currVFO' that should work also other rigs than ts480 and Icoms and is implemented in rigctld at least from Jan2023</li>
<li>Callbook: CQRZCQ XML fixd and tested. Should be mostly ok now.</li>
<li>Callbook: Added support to QRZCQ, not tested at all yet because of lack of premium account</li>
<li>Preferences:TRXControl:#1 Dummy rig: Starting rigctld can be changed (was disabled) </li>
<li>HamlibCW: Added checkbox to use Hamlib (past Jul-2023) 1k CW buffer.(Sends memory as string despite length)</li>
<li>QsoList:Fix:Return cursor to last worked qso when saving edited Qso should not happen</li>
<li>CWkeying:Hamlib: Quick fix for sending because new Hamlib is not backward compatible</li>
<li>Grayline+CWkeying:Fix: Some debug print fixes</li>
<li>NewQso+QsoList:Statistics:Big squares+County:Add: Filter(F12) is now effective if used</li>
<li>NewQso+QsoList:Statistics:Big squares+County:Fix: Totals printing</li>
<li>NewQso+QsoList:Statistics:Big squares+County: Added 'ALL band'. Fixed layouts</li>
<li>Fix: Broken Group edit</li>
<li>NewQso+QsoList:Statistics: Added County statistic. Fixed Help.</li>
<li>Grayline: Removed some unconditional debug prints</li>
<li>Wsjtx:Map:fix: dB view at Map init now read</li>
<li>NewQSO:Contest:Fix: Fixed keep propagation also when contest window used</li>
<li>NewQSO:Fix:Keep propagation mode when 2xESC even when no qsos saved yet</li>
<li>Preferences:NewQSO: Added default operator setting (if different that station callsign)</li>
<li>Grayline: Show also rotor beam path if in use and selected</li>
<li>ROT control: Fix: Remember used rotor (1 or 2) over Cqrlog restart.</li>
<li>WSJTremote, Map mode: '*' appear fixed when line ends ' 73'</li>
<li>Preferences/TRXControl: Added checkbox 'Set UTC to Rig'. Uses rigctld '\set_clock' command on next full minute after rig initialization</li>
<li>WSJTremote, Map mode: '*' appeared when CQ-callers locator ended '73' (should appear only 'RR73' or ' 73' endings). Fixed</li>
<li>Contest: Set TX column lables Green/Red by state of S&P to indicate CW memory auto sending on/off</li>
<li>Contest: Enable CQ panel also when in S&P</li>
<li>Contest: Increase size between status panel and status view for easier acces to status settings (click area)</li>
<li>Fixed: 8M & 5M frequency add to bands when 1st start of Cqrlog. (DB upgrade was ok before)</li>
<li>Contest: pressing 'CQ start' moves focus to Call column</li>
<li>Added hint texts to first start DB selection window</li>
<li>Cabrillo export: Changed export to use time_off instead of time_on.
<br>With CW and Phone qsos this does not matter as times are usually same.
<br>With FT8 qso takes longer and WSTX's (and N1MM's) exports are using time_off.
<br>Now Cqrlog's export is equal to others.</li>
<li>(116)</li>
<li>Preferences: wsjt/fldigi: fixed hidden checkbox</li>
<li>DXCluster: Added user defined command keys F1-F10 See help for details.</li>
<li>WSJT remote: fixed contest logging. Remote name should have WSJT instead of being exactly WSJT-X.<br>
Remote name changes when using special configs.(wsjtx -r cfg_name)</li>
<li>Contest: counter HH:MM since last logged qso, QSO rate /10min and /1hour(these need testing)</li>
<li>Contest: Shift+ESC removes callsign (same as 3x ESC)</li>
<li>LoTW inport: changed date to be (today-1day) to be sure</li>
<li>LoTW Import: Checkbox to change Rcvd date to current date after successfull download (tu: 4X6GP)</li>
<li>When creating a new log it is now possible to copy configuration automated from existing log<br>
(FYI: Configuration is log based)</li>
<li>(115)</li>
<li>Moved also solar data (propagation window) text address to user editable in preferences.</li>
<li>Fixed solar data (propagation window) addresses from 'http' to 'https'</li>
<li>Contest: Stores last used CQ frequency and mode when in Run. Click (or Ctrl+L) over reading resets rig to that freq+mode</li>
<li>Added checbox 'DATA' to 'show only spots' at /preferences/DXCluster. Help files fixed</li>
<li>DXCluster: fixed response missing for "sh/he e6" (all prefixes E1..E9)</li>
<li>Small view fix in RBN monitor header</li>
<li>Small view fix in adif errorfile import</li>
<li>(114)</li>
<li>Added 8M and 5M bands</li>
<li>Fixed radio memory loading/saving (tested with 12000 memories)</li>
<li>Added search to radio memory list</li>
<li>Fixes several SQL query record count requests in many units</li>
<li>Fixed file open dialogs to check file exists. QT5 opendialog allowsuser to type filename and it needs checking</li>
<li>Fixed DXCluster spot:Any of QSL, LoTW, eQSL received prints with confirmed color</li>
<li>Fixed DXCluster font style saving/loading</li>
<li>(113)</li>
<li>Fixed wsjtx std messages clean when remote was set active</li>
<li> Added option (from preferences) to show LoTW/eQSL users in wsjtx CQ-monitor</li>
<li>(112)</li>
<li>Fixed spot splitter a bit and cleaned DXCluster code too</li>
<li>Clicking DXSpot line now sets wsjt std messages if wsjt-remote is active</li>
<li>Rewritten DXCluster spot splitter because of faulty call grep</li>
<li>Wsjtx remote:<br>
Cqrlog will clear wsjt-x DXcall, DXgrid and StdMessages when band changes<br>
HamQTH/QRZ info is now looked when Wsjtx/DXCall changes on RX and TX period<br>
(Was before only on TX period)</li>
<li>Contest window:<br>
Fixed ESC key: 1x stops Cw sending, 2x returns cursor to Call column, 3x clears qso entry<br>
Fixed F2 memory sending in S&amp;P mode when exit from Call column after callisgn was fixed (using 2xESC)<br>
Fixed Call entry so that CW macro %c (callsign) works also with partial callsigns (when in Call column)</li>
<li>Fixed shortcut keys help page: Added Contest window shortcuts</li>
<li>Fixed warning splash and help that you can not spot with WebDXluster</li>
<li>Added missing 'OR' to Qso list/Qsl selection </li>
<li>Fixed update QSO list view when Preferences/Visible columns change</li>
<li>Fixed bug in Qsolist/View/Show Details checbox visibility</li>
<li>(111)</li>
<li>Fixed bug in preferences/Online log edited and saved urls could not be loaded</li>
<li>(110)</li>
<li>Added numeric divide-key to work in contest/call column</li>
<li>Added End-key to work in contest/call column</li>
<li>Added Home-key to work in contest/call column</li>
<li>Changed CQmonitor/Mapmode worked locator color printing<br>
Should now respond better to true situation of current band</li>
<li>Removed one debug print from rigcontrol</li>
<li>(109)</li>
<li>Fixed numkeypad in contest/callsign/gtk2, QT5 was already working</li>
<li>RBNmonitor: Added source callsign filter</li>
<li>Removed small change to "remove all upload triggers". No good<br>
Instead added warnings for use with more than on online log</li>
<li>(108)</li>
<li>Very small change to "remove all upload triggers". Helps? </li>
<li>Fixed startup rig power on with rig models below 10, mainly for mod #2</li>
<li>Fixed Cabrillo export to have adjustable RST fields</li>
<li>Fixed TAB key funtion in Contest window</li>
<li>Added Contest/msg multipliers count and list by contest bands</li>
<li>(107)</li>
<li>Added cache write while preferences closing. Speeds up %50</li>
<li>Added retry counter for rigctld connecting.</li>
<li>Updated sat_names.tab (from Florian,DF2ET)</li>
<li>Made Online logs Urls defineable</li>
<li>Fix for DXCCRef edit/save. Now user changes are saved</li>
<li>Fixed unwanted chars filter in contest/callsign that cause SQL error</li>
<li>Fixed bug in "Fixed ver(104) bug where rig did not initialize"
<li>Set default values for TRX and rotor port and poll</li>
<li>Fixed some rig and rot parameter readings</li>
<li>Fixed ver(104) bug where rig did not initialize if TRXControl window
<br> stayed closed during Cqrlog start</li>
<li>(105)</li>
<li>Added macros:
<br>%xnr - contest exchange serial number received
<br>%xnrs- contest exchenge serial number received sends 9->N and 0->T
<br>%xmr - contest exchange message received</li>
<li>Fixed offline qso feed. When qso is saved returns to QsoDate column.
<br>This makes qso manual feed from paper log easier as things start
<br>from date and tabulation continues in chronological order:
<br>date,start,end,call,freq, mode .. etc and when qso is saved
<br>focus returns again to date column.
<br>When typing in Date and times in Offline Cqrlog will add punctuation
<br>marks ('-' or ':') automatic. This way only number keys need to be typed.
<br>When not valid locator is entered (usually odd number of characters)
<br>NewQSO/GRID label will turn bold red as warning sign when exit from
<br>grid column.</li>
<li>Added support for 1-6 rigs. User can define how many rigs he want to use
<br>As before, only one rig can be active at time.
<br>This change affects also mode/bandwidths settings and CW keyer settings.
<br>All rigs can have their own settings for BW and CW keyer.</li>
<li>Fix for quick split settings.
<br>Fixed all edtboxes value limits to 0..9999. Fixed tabulation orders</li>
<li>Added serial CW keyer commanding menu item.
<br>Menuitem: NewQSO/File/Send hex bytes to keyer (W or K)
<br>Item is visible with winkeyer or K3NG keyer and allows non text
<br>hex bytes to be sent to serial line. </li>
<li>Fix for contest name in contests that have all modes in use
<br>CW/SSB/FM/MGM like NAC has.
<br>Then MGM qsos coming from WSJT-X will get name from Cqrlog contest
<br>name currently in contest window if it is open during remote.
<br>This overwrites WSJT-X predefined 4 contest names making all
<br>qsos in contest to have same contest name defined in contest window. </li>
<li>Upgrade to Contest window
<br>-Has now checkbox "S&P". When checked works as before.
<br> When not checked launches memories F2,F3,F4 automated when
<br> moving on columns.
<br> F1 for sending CQ. Can be auto-repeated
<br> F2 for sending call, rst and message
<br> F3 for sending duplicate qso warning
<br> F4 for sending after qso is logged with button or enter key
<br>-Has now hint texts added. They can be turned off with checkbox.
<br>-Has now status display to see how contest progress.
<br> procedure MWC will show OK1WC memorial status
<br> procedure NAC will show Nordic VUSHf activiy contest status
<br> Common status will show status of other (unspecified) contest statuses
<br> with user defined view.
<br> More status procedures can be added later.
<br>-Duplicate check will work now while typing in callsign. (before worked
<br> after cursor left callsign column)
<br>-Added "Mark Dupe" checbox. When checked with duplicate check ON
<br> saved dupicate qso is marked to "RST send" with "/D". It is operator's
<br> duty to do something (or not) with this after Cabrillo log is produced.
<br>
<br>For more specific information see revised contest help file, please!</li>
<li>Misc bug fixes.
<br>-Changed Contest Filter to show contest names in order from A to Z (acs)
<br>-Adjusted Contest Filter maxlines to default (8). This has effect when
<br> QT5 widgets are used (shows more contest names at time).
<br>-Fixed typo in Group edit field selector. Had "ŕ" in "operator"
<br>-Fixed TRXControl's button "70cm". If no previous settings for 70cm
<br> defaults were done loaded 80m band settings when pressed.
<br>-Fixed double usage of query qBands. Preferences/bands/Frequencies list
<br>loose it's grid contents if Wsjt-x remote is on (behind) and CQ-monitor selected.
<br>-Updated help files</li>
<li>WSJT-C CQ monitor shows US states
<br>CQ-monitor checbox "USt" that allows USA states to monitored wsjt-CQs
<br>When you check it at first time it suggests loading from fcc.gov it should
<br>suggest same after 90 days of usage to update data.
<br>US callsign=state (fcc_states.tab) file is over 10Mb and ist is loaded
<br>to RAM for runtime. Seeking a callsingn from there takes some time.</li>
<li>RTTY mode is now DATA
<br>At preferences/Modes you will see a new "DATA" that replaces the old "RTTY".
<br>Defaults for that are rig cmd:RTTY data mode:RTTY that acts like previous Cqrlogs.
<br>Setting data mode affects DXSpots coloring and double clicking: You can set other
<br>mode than RTTY to be used. </li>
<li>Online log upload
<br>Bottom of Preferences/Online log upload has some checkboxes to affect
<br>to online log upload.
<br>See help/Quick start/Online log upload support for more information. </li>
</ul>
<strong>CQRLOG 2.6.0 (2022-05-29)</strong><br>
<ul style="list-style: square;text-align:left; color: blue;">
<li>new button "URL" to row below "Comment to callsign" (Saku, OH1KH)</li>
@ -292,6 +516,6 @@
<li>QSO count with active filter was wrong after delete or update</li>
<li>Remove dupes from the log didn't work - fixed</li>
<li>QTH profile was not imported from ADIF - fixed</li>
</ul>
</ul>
</body>
</html>

245
src/contest.html Normal file
View File

@ -0,0 +1,245 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<head>
<title>CQRLOG - Contest</title>
</head>
<body>
<table border="0" cellpadding="5" cellspacing="2" width="100%">
<tbody>
<tr>
<td valign="top"><img src="img/exc.png"></td>
<td bgcolor=ffffcc valign="top" align="justify"><strong>
<font color="red">WARNING!</font></strong>
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>
</tr>
</tbody>
</table>
<table style="text-align: left; width: 100%;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td width="33%" align="center">[<a href="index.html" target="_top">Menu</a>]</td>
</tr>
</tbody>
</table>
<br>
<div style="text-align: left;"><strong>CQRLOG for LINUX by OK2CQR &amp; OK1RR</strong></div>
<p align=center><img src=img/line.png></p>
<a name=co1><h2><strong>Contest support</strong></h2></a>
<p>You will find contest selection from <b>NewQSO/Window</b> 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.
<br>Contest window is just a "child form" for <b>NewQSO</b> to make qso logging faster when working in contests.
With <b>Tru</b> and <b>Msg is Loc</b> 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.
<br><br><b>Note:</b> This is <b>NOT</b> 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!
<br><br>When contest window is open NewQSO</b> has contest exchange fields visible. You may have to stretch <b>NewQSO </b> window horizontally to see them.
You <b>do not normally need NewQSO</b> window during contest.
<br><b>Only need for <i>NewQSO</i> is in case you have to edit an already worked qso.</b>
Select qso normally via <b>QSO list</b> and press <b>edit QSO button</b> and you are able to edit qso, also the contest message part of it.
<br><br><b>Repeat: <i> NewQSO</i></b> is not meant to be used during contest qso feeds. <b>All new qsos are entered via contest window.</b></p>
<p align="center">
<img src="img/contest.png">
</p>
<p>
<b>RECOMMENDATION:</b><br> Make new log for each contest, consider not to allow qrz/hamqth search, it may slow down qso feed.
<br> 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.
<br>Benefit of having "contest" log with one contest is also that you get <b>DXCC statistic</b> right after cursor leaves callsign column. You can place contest window just above NewQSO/DXCC statistic.(see pic above).
</p><p>
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 "<b>/D</b>" in "<b>RST sent</b>" field.
When doing Cabrillo export it is operator's duty to decide what to do with "/D" reports
<br>To get duplication check working properly you must <b>either</b> create a new log for every contest <b>or</b> set dupe start date (I.E. contest starting day) with button <b>"from YYYY-MM-DD"</b>
</p>
<p>
<h4>Hotkeys:</h4>
Hotkeys work same way as with <a href="h20.html">New QSO window</a>.
<ul><li> <b>2x ESC</b> clears all fileds</li>
<li>Note: <b>1x ESC</b> returns cursor back to Call-field (if cursor is in some of the other fields like RSTr) and places cursor at the end of callsign for possible repairs.<br>
It also halts CW memory output if it is just running.</li>
<li> <b> F1..F10 </b>send CW or VOICE messages depending on used mode.</li>
<li> <b>TAB-key</b> moves cursor between fields. (may also be SPACE key, if set) </li>
<li> <b>Ctrl+Tab</b> will set <b>S&P</b> mode</li>
<li> <b>Shift+Tab</b> will reset <b>S&P</b> mode</li>
</ul>
</p>
<p>
<h4>Contest window has following fields and checkboxes:</h4>
<ul>
<li><b>Contest name</b> Selection box has a list of predefined contest names. When selecting one and leaving <b>Contest name</b> combo box name will be cut from "|"(including it) that separates contest name and explanation.
You can also type contest name here if it is not in list. Be sure you do not use "|" character(s) in name because program will cut name from the first one found.
<br><b>RECOMMENDATION:</b><br>
Add date to contest name if you keep many contests in same log. That way <b>QSO list/Filter/Contest filter</b> can separate contests by name.</li>
<li><b>Tab in order</b> when checked overrides all other Tab settings (see below) and Tab Order is: Call-RSTs-NRs-MSGs-RSTr-NRr-MSGr-SaveQSO-ClearAll</li>
<li><b>Show hint</b> when checked shows help text of object that mouse cursor currently points</li>
<li><b>CQ panel</b> is visible when <b>S&P</b> is not checked (CQ calling mode)</li>
<ul><li><b>CQ period</b> timer period in millisecons to send one CQ+listen (5000 - 50000, 5-50sec)
<br> To adjust: Set repeats=1, press CQ start, adjust period value so that F1 has time to run + listening time</li>
<li><b>CQ repeats</b> repeat period how many times CQ period is repeated (1 - 20)s</li>
<li><b>CQ start</b> start/stop repeated CQ calling. <b>Shorcut key: Shift+F1</b>.
<br>Pressing <b>ESC</b> stops timer and CW send. It can not stop voice keyer script.
<br>Also writing anyting to <b>Call</b> will stop running timer and CW sending.</li>
</li></ul>
<li><b>Call</b> when you leave this field callsign is moved to NewQSO. Callsign <b>turns BOLD RED</b> while typing if it is duplicate (and duplicate check is active).</li>
<li><b>SPACE is TAB</b> when checked space bar acts like TAB-key moving to next field. <b>Note:</b>This prevents typing space (perhaps needed in MSG fields).</li>
<li><b>Dupe check</b> Default checked. If you use same log for several contests, and/or other working, set the contest start date with <b>from YY-MM-DD</b> button.
<br> if <b>NoMode4Dupe</b> is selected duplicate check allows qso with same station in same band if mode differs.
<br> if <b>Ignore dupes</b> is selected it will ignore duplication check completely.
<br> When dupe check is active and callsign is found as duplicate, but still saved, program will add <b>/D</b> to <b>RST sent</b>.
It is then operator's duty to clean or leave <b>/D</b> to exported Cabrillo log.</li>
<br>
<li><b>RST s</b> RST sent. Can be changed.
<br><b> Note:</b> defaults to 599 (CW) 59(phone). If rig mode is changed you get corresponding RST with 2xESC.
<br>It also changes when cursol leaves <b>call</b> column. So do not worry when working mixed mode contest!</li>
<li><b>Tru</b> means you like to exchange true reports. Makes Tab order to stop at RST (s & r) fields. Useful in some high band contests, Es and tropo openings.</li>
<br>
<li><b>NR s</b> serial number to send.
<br><b> Note:</b> you can type only numbers to NR s field.</li>
<li> <b>Inc</b> if checked it will auto increment serial number. You may change this number at any time. Increment goes on from typed number.</li>
<br>
<li><b>MSG s</b> sometimes you may need an additional message with number, or just a message with no number.
On high band contests you may type your locator here.</li>
<li><b>Qsp</b> if checked makes TAB order stop at MSG s. Content of MSG s is taken from last logged MSG r. Cursor is placed at the end of message for possible edit.
For contests where you have circulating message: At 1st qso you set your own word to send, after that you send previously received word as your next own message. </li>
<li><b>S&P</b> When Search & Pounce is checked operator launces all CW/Voice messages manually.
<br>When S&P is not checked program launches message F2 when cursor enters one of RSTr, NRr, or MSGr columns. This way also if true reports are selected F2 is sent after your message is ready.
<br>In case duplicate checking is enabled and callsign is duplicate, message F3 is launched instead of F2 and it happens always when cursor leaves callsign column.
<br>When <i>Enter</i> or <i>Save qso</i> button is pressed program will send message F4.
<br>Message F1 can be used for CQ that is manually launched.
<br>When phone modes are used messages are lauched same way but you need very special voice script if you want to include worked station's callsign into F2 and F3 messages, but launcing F4 at QSO save may be useful.
<br><b>RECOMMENDATION:</b><br> Reserve memory macros F1-F5 for calling operation and F6-F9 for S&P operation.
<br>See more about <a href="/h26.html">CW messages</a> how to define messages with macros and save/load different setups of CW messages.</li>
<br>
<li><b>RST r</b> RST received. Default to 599 (CW) 59 (phone). Can be changed.
<br>Default rst for CW and phone is created from rig's current mode. 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.
</li>
<br>
<li><b>NR r</b> serial number you receive.
<br><b> Note:</b> you can type only numbers to NR r field. </li>
<li><b>No </b> if thre is no serial number in contest this setting changes tab order so that it jumps over, directly to MSG r. </li>
<br>
<li><b>MSG r</b> message you receive</li>
<li> <b>MSG is Grid</b> If '<b>MSG is ...</b>' is checked then message will be logged in <i> SRX_String </i><b>AND ALSO</b> to <i>selected NewQSO column</i>.
<br><br> By default <b>Msg is Grid</b>. It can be changed with right mouse click on the text.
If <b>checked</b> then input will turn red if character count is odd. Maximum of 6 characters locator can be entered.
<br>If <b>MSG is Grid</b> but the entered locator is <b>not valid</b> it will <b>NOT</b> be copied to <i>NewQSO/Grid column</i> and stays only in <i>Srx_String</i>.
<br>
<br>In case of <b>MSG is State</b> and callsign is detected by prefix to be a Germany callsign srx_string is copied to <b>DarcDOC</b> column, orherwise to <b>State</b> column.
<br>In other cases MSG is copied to correspondig NewQSO column.
<br><b>NOTE: </b>After selecting '<b>MSG is ...</b>' remember also to check the checkbox to get it activated!</b></li>
</ul>
<h4>Buttons you really do not need (you should <b>NOT use mouse</b> when working contest!):</h4>
<ul>
<li><b>Save QSO</b> Save QSO button at NewQSO, increments NR and clears all fields.
<br><b> Note:</b> pressing <b>ENTER at any time after cursor is out from Call column</b> does the same.</li>
<br><li><b>Clear QSO</b> Clear all QSO information.
<br><b> Note:</b> Pressing 2x ESC key does the same.</li>
<br><li><b>Clear all</b> Clear all fields. Usefull when starting a new contest to remove all saved settings.</li>
</ul>
<br>
All settings, including contest name, are saved when closing contest form. When opening cqrlog and contest form again after rest period you can directly continue contest working.
</p>
<p>
<b>Typical contest qso goes like this:</b><br>
Type callsign-&gt;press TAB-&gt;type contest rxnumber-&gt;press TAB-&gt;type contest message-&gt;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.
</p>
<p>Remember that pressing <b>ENTER</b> 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.
<br><b>There is no need to use the mouse.</b> Keep your hands on keyboard (and possible on CW key / PTT (if not foot pedal in use)). It is faster.</p>
<p>
Contest numbers and messages are saved in log in their own columns. Use <b>preferences/Visible columns</b> to show them in <b>Qso list</b>.
<br><br>
<b>CW messages</b> can be used for sending contest messages. Look at help section <a href="h26.html">CW Operation</a>
how to use macros in messages.
<br><b>NOTE:</b> 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.
</p>
<h4>Status view support</h4>
<b>NOTE:</b> If you have one log called <b>contest</b> that you clear always before contest, to have just qsos of that contest, and after contest you move all qsos
with adif export to another log called <b>archive</b> you can view contest status afterwards from that log if you have used <b>unique contest names</b> I.E. added contest start date to name.
<br> Find contest with <b>Filter/Contest filter</b> and copy name from selection list box and paste it to Contest window. You do not have to activate contest filter to see the status of that contest.
<p><b>OK1WC memorial contest</b> status is supported.
<p align="center">
<img src="img/contest_mwc.png">
</p>
<p>
If contest name has "<b>mwc</b>" or "<b>ok1wc</b>" 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 <b>2xESC</b>.
After saving a qso Status view is updated.
<br>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.
<br>Only bands 80M and 40M and mode CW are counted (See rules of contest).
<br><br>
</p>
<br>
<p><b>Nordic Activity Contest (NAC)</b> status is supported.
<p align="center">
<img src="img/contest_nac.png">
</p>
<p>
If contest name has "<b>nac</b>" 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 <b>2xESC</b>.
After saving a qso Status view is updated.
<br>
<br><br>
</p>
<p><b>Common</b> status is supported.
<p align="center">
<img src="img/contest_cmn.png">
</p>
<p>
If contest name has <b>any name that does not fit rules of two above</b> status counting is activated. At the start of contest (and any oher time when no qso to save) it can be seen by pressing <b>2xESC</b>.
After saving a qso Status view is updated.
<br>There are several items shown in Status display. You can control them by left click below text <b>Status</b> (but above status display itself).
<br>The DX and own continent counts (EU in picture) are defined against your callsign in preferences/station/call.
<br><br> To see Status section you may need to stretch the bottom part of Contest window.
<br><b>NOTE:</b><i> Status counting may have errors! It is just for showing progress of contest, not to show final score.</i>
</p>
<p>
<H4>After contest</h4>
Most contests expect <b>Cabrillo</b> log format. Cqrlog has a limited support of Cabrillo exports. Mostly enough for a Sunday contester.
<br>In case you want to use external Cabrillo program you have to make ADIF export of qsos</b>
and then use another program.</p><p>
</br>
I found nice <b>adif2cabrillo</b> program for Linux from <a href="http://users.telenet.be/on4qz/a2c/index.html" target="_blank">http://users.telenet.be/on4qz/</a> that supports ADIF importing.
</p></p>Starting is bit complicated:
</br>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.</br>
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.
</p>
<p>
<h5>ADIF exports fields to right tags.</h5>
&lt;RST_SENT:3&gt;599&lt;STX:3&gt;001<br>
&lt;RST_RCVD:3&gt;599&lt;SRX:3&gt;002<br>
&lt;RST_SENT:3&gt;599&lt;STX:3&gt;003&lt;STX_STRING:2&gt;SA<br>
&lt;RST_RCVD:3&gt;599&lt;SRX:3&gt;003&lt;SRX_STRING:2&gt;dd<br>
&lt;RST_SENT:3&gt;599&lt;STX:3&gt;002&lt;STX_STRING:2&gt;SA<br>
&lt;RST_RCVD:3&gt;599&lt;SRX:3&gt;003&lt;SRX_STRING:2&gt;kb<br>
&lt;RST_SENT:3&gt;599&lt;STX:3&gt;001&lt;STX_STRING:2&gt;SA<br>
&lt;RST_RCVD:3&gt;599&lt;SRX:3&gt;002&lt;SRX_STRING:2&gt;SB<br>
</p>
<p>
HTML export will look like this:<br>
<img src="img/contest_html_export.png">
</p>
<p align=center><img src=img/line.png></p>
<br>
<table width="100%" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td width="33%" align="center">[<a href="index.html" target="_top">Menu</a>]</td>
</tr>
</tbody>
</table>
<br>
</body>
</html>

BIN
src/contest.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

BIN
src/contest_cmn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

BIN
src/contest_html_export.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
src/contest_mwc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

BIN
src/contest_nac.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="11"/>
<Version Value="12"/>
<General>
<Flags>
<LRSInOutputDirectory Value="False"/>
<CompatibilityMode Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<AutoCreateForms Value="False"/>
<Title Value="cqrlog"/>
<Icon Value="0"/>
@ -19,7 +19,7 @@
<AutoIncrementBuild Value="True"/>
<MinorVersionNr Value="3"/>
<RevisionNr Value="1"/>
<BuildNr Value="2201"/>
<BuildNr Value="2202"/>
<StringTable ProductVersion="0.3.1.2026"/>
</VersionInfo>
<MacroValues Count="1">
@ -40,7 +40,7 @@
<RunParams>
<local>
<CommandLineParams Value="--debug=0"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T &apos;Lazarus Run Output&apos; -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
<environment>
<UserOverrides Count="2">
@ -53,7 +53,7 @@
<Mode0 Name="default">
<local>
<CommandLineParams Value="--debug=0"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T &apos;Lazarus Run Output&apos; -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
<environment>
<UserOverrides Count="2">
@ -105,7 +105,7 @@
<MinVersion Major="1" Minor="2" Release="1" Valid="True"/>
</Item10>
</RequiredPackages>
<Units Count="122">
<Units Count="125">
<Unit0>
<Filename Value="cqrlog.lpr"/>
<IsPartOfProject Value="True"/>
@ -163,6 +163,7 @@
<Filename Value="fMarkQSL.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="frmMarkQSL"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit8>
<Unit9>
@ -896,10 +897,28 @@
<ResourceBaseClass Value="Form"/>
</Unit120>
<Unit121>
<Filename Value="fProgress.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="frmProgress"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit121>
<Unit122>
<Filename Value="fDbError.pas"/>
<IsPartOfProject Value="True"/>
<HasResources Value="True"/>
</Unit121>
</Unit122>
<Unit123>
<Filename Value="fCountyStat.lfm"/>
<IsPartOfProject Value="True"/>
</Unit123>
<Unit124>
<Filename Value="fCountyStat.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="frmCountyStat"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit124>
</Units>
</ProjectOptions>
<CompilerOptions>
@ -920,6 +939,7 @@
</CodeGeneration>
<Linking>
<Debugging>
<GenerateDebugInfo Value="False"/>
<DebugInfoType Value="dsDwarf2Set"/>
</Debugging>
</Linking>
@ -928,6 +948,7 @@
<ShowNotes Value="False"/>
<ShowHints Value="False"/>
<ShoLineNum Value="True"/>
<ShowDebugInfo Value="True"/>
</Verbosity>
<CustomOptions Value="-dNO_CONTEST"/>
<CreateMakefileOnBuild Value="True"/>

View File

@ -26,7 +26,7 @@ uses
fWorkedGrids, fPropDK0WCY, fRemind, fContest, fMonWsjtx, fXfldigi,
dMembership, dSatellite, uRigControl, uRotControl, azidis3, aziloc, fDOKStat,
fCabrilloExport, uDbUtils, dQTHProfile, uConnectionInfo, znacmech, gline2,
fDbSqlSel, fDbError;
fDbSqlSel, fProgress, fDbError, fCountyStat;
var
Splash : TfrmSplash;
@ -99,6 +99,7 @@ begin
Application.CreateForm(Tfrmxfldigi, frmxfldigi);
Application.CreateForm(TdmMembership, dmMembership);
Application.CreateForm(TdmSatellite, dmSatellite);
Application.CreateForm(TfrmProgress, frmProgress);
Splash.Update;
application.ProcessMessages;

View File

@ -91,7 +91,6 @@ type
function CountryFromADIF(adif : Word) : String;
function GetBandFromFreq(freq : string; kHz : Boolean=false): String;
function IsAlertCall(const call,band,mode : String;RegExp :Boolean) : Boolean;
function GetfreeTextFromSpot(ua:String):String;
procedure AddToMarkFile(prefix,call : String;sColor : Integer;Max,lat,long : String);
procedure GetRealCoordinate(lat,long : String; var latitude, longitude: Currency);
@ -99,6 +98,7 @@ type
procedure LoadDXCCRefArray;
procedure LoadExceptionArray;
procedure RunCallAlertCmd(call,band,mode,freq,freeText : String);
procedure GetSplitSpot(Spot:String;var call,freq,info:String);
end;
@ -110,7 +110,7 @@ implementation
{$R *.lfm}
{ TdmDXCluster }
uses dUtils, dData, znacmech, uMyini;
uses dUtils, dData, znacmech, uMyini, fTRXControl;
type Tchyb1 = object(Tchyby) // podedim objekt a prepisu "hlaseni"
//procedure hlaseni(vzkaz,kdo:string);virtual;
@ -129,65 +129,54 @@ begin
Writeln(vzkaz);
end;
}
function TdmDXCluster.GetfreeTextFromSpot(ua:String):String;
Procedure TdmDXCluster.GetSplitSpot(Spot:String;var call,freq,info:String);
var
a:longint;
uz:string;
p,l:integer;
i,n,r : integer;
s,t : String;
Begin
Result:='';
if pos('DX de',ua)=1 then //normal DX spot
Spot:=trim(Spot); //to be sure
//remove extra spaces
repeat
Begin
Spot:=StringReplace(Spot,' ',' ',[rfReplaceAll],i);
end;
until i=0;
if (pos('DX DE ',UpperCase(Spot))=1) then //normal cluster spot format
Begin
call := UpperCase(ExtractDelimited(5,Spot,[' '])); //to be sure case
freq := ExtractDelimited(4,Spot,[' ']);
s:=trim(copy(Spot,pos(call,Spot)+length(call),length(Spot)));
n:=0;
r:=0;
for i:=1 to length(s) do //find zulu time works with telnet and web
Begin
ExtractWordPos(6,ua,[' '],p); //info part starts at 6th word
if p>0 then
begin
ua := copy(ua,p,length(ua));
for l:=1 to wordCount(ua,[' ']) do
Begin
uz:= ExtractWordPos(l,ua,[' '],p);
if ((length(uz)=5) and (uz[5]='Z')) then //Z is lastchr, length is 5
if TryStrToInt(copy(uz,1,4 ),a ) then
if ((a>=0) and (a<=2400)) then //must be zulu time
Begin // we do not take Zulu time or anything after that
if (p>1) then //something to copy
begin
ua:=trim(copy(ua,1,p-1));
Result:=ua;
if dmData.DebugLevel >=1 then writeln ('DX spot info: ',ua);
break;
end;
end;
end;
end;
end
else
Begin // from command 'sh/dx'
if TryStrToInt( copy(ua,1,pos('.',ExtractWordPos(1,ua,[' '],p))-1),a) then //1st have number (frq) with dot
if ((n=4) and (s[i]='Z')) then
Begin
ExtractWordPos(5,ua,[' '],p); //info part starts at 5th word
if p>0 then
begin
ua := copy(ua,p,length(ua)); //2nd cut from 5th word
a:=0;
for l:=length(ua) downto 1 do
Begin
if ((a=0) and (ua[l]='>')) then a:=1;
if ((a=1) and (ua[l]='<')) then //search word that starts '<' ends '>' start from end of line
begin
if l>1 then
begin
ua := trim(copy(ua,1,l-1)); //cut form start to that word pos
Result:=ua;
if dmData.DebugLevel >=1 then writeln ('sh/dx spot info: ',ua);
break; // that is info
end;
end;
end;
end;
end;
r:= i-5;
break;
end;
if (s[i] in ['0'..'9']) then
inc(n)
else
n:=0;
end;
if (r=0) then r:=i; //r points chars before zulu time, if not found points end of s
info := trim(copy(s,1,r));
end
else //format from sh/dx command
Begin
call := UpperCase(ExtractDelimited(2,Spot,[' '])); //to be sure case
freq := ExtractDelimited(1,Spot,[' ']);
t := ExtractDelimited(4,Spot,[' ']); //zulu time
s:=trim(copy(Spot,pos(t,Spot)+length(t),length(Spot)));
i:=Rpos('<',s);
if (i > 0) then
info:= copy(s,1,i-1)
else //should not happen
info:=s;
end;
end;
function TdmDXCluster.MyTryStrToInt(s : String; var i : Integer) : Boolean;
@ -209,6 +198,7 @@ function TdmDXCluster.BandModFromFreq(freq : String;var mode,band : String) : Bo
var
tmp : Extended;
cw, ssb : Extended;
n :String;
begin
EnterCriticalsection(csDX);
try
@ -229,6 +219,7 @@ begin
trBands.RollBack;
trBands.StartTransaction;
qBands.Open;
//qBands.Last; //to get proper count
//Writeln('qBands.RecorfdCount: ',qBands.RecordCount);
if qBands.RecordCount = 0 then
exit;
@ -243,8 +234,12 @@ begin
if (tmp >= ssb) then
mode := 'SSB'
else
mode := 'RTTY';
Begin
n:=IntToStr(frmTRXControl.cmbRig.ItemIndex);
mode := cqrini.ReadString('Band'+n, 'Datamode', 'RTTY')
end;
end;
//Writeln('TdmDXCluster.BandModFromFreq:',Result,' cw ',FloatToStr(cw),' ssb ',FloatToStr(ssb))
finally
LeaveCriticalsection(csDX)
@ -282,12 +277,14 @@ begin
if lotw then
Q.SQL.Text := 'SELECT id_cqrlog_main FROM '+dmData.DBName+'.cqrlog_main WHERE adif='+
sAdif+' AND band='+QuotedStr(band)+' AND ((qsl_r='+
QuotedStr('Q')+') OR (lotw_qslr='+QuotedStr('L')+')) AND mode='+
QuotedStr('Q')+') OR (lotw_qslr='+ QuotedStr('L')+
') OR (eqsl_qsl_rcvd='+ QuotedStr('E')+')) AND mode='+
QuotedStr(mode)+' LIMIT 1'
else
Q.SQL.Text := 'SELECT id_cqrlog_main FROM '+dmData.DBName+'.cqrlog_main WHERE adif='+
sAdif+' AND band='+QuotedStr(band)+' AND qsl_r='+
QuotedStr('Q')+ ' AND mode='+QuotedStr(mode)+' LIMIT 1';
trQ.StartTransaction;
Q.Open;
if Q.Fields[0].AsInteger > 0 then
@ -1214,6 +1211,7 @@ begin
qCallAlert.Open;
if qCallAlert.RecordCount > 0 then
begin
qCallAlert.Last; //to get proper count
if dmData.DebugLevel>=1 then Writeln('Alert: Call hits with ', qCallAlert.RecordCount,' records');
qCallAlert.First;
while ( (not qCallAlert.Eof) and (not Result) ) do

View File

@ -2,68 +2,69 @@ object dmData: TdmData
OnCreate = DataModuleCreate
OnDestroy = DataModuleDestroy
OldCreateOrder = False
Height = 606
HorizontalOffset = 381
VerticalOffset = 87
Width = 822
PPI = 96
Height = 654
HorizontalOffset = 153
VerticalOffset = 39
Width = 1050
object dsrMain: TDataSource
DataSet = qCQRLOG
left = 304
top = 24
Left = 304
Top = 24
end
object dsrQSOBefore: TDataSource
DataSet = qQSOBefore
left = 304
top = 360
Left = 216
Top = 368
end
object dsrImport: TDataSource
left = 728
top = 528
Left = 728
Top = 528
end
object dsrBands: TDataSource
DataSet = qBands
left = 88
top = 360
Left = 112
Top = 552
end
object dsrWorkedContests: TDataSource
DataSet = qWorkedContests
left = 416
top = 424
Left = 416
Top = 424
end
object dsrProfiles: TDataSource
DataSet = qProfiles
left = 88
top = 24
Left = 88
Top = 24
end
object dsrDXCluster: TDataSource
DataSet = qDXClusters
left = 224
top = 24
Left = 224
Top = 24
end
object dsrQSLMgr: TDataSource
AutoEdit = False
DataSet = qQSLMgr
left = 152
top = 360
Left = 32
Top = 552
end
object mQ: TSQLQuery
FieldDefs = <>
BeforeOpen = mQBeforeOpen
Transaction = trmQ
Params = <>
Macros = <>
ParseSQL = False
left = 632
top = 80
Left = 632
Top = 80
end
object trmQ: TSQLTransaction
Active = False
Action = caNone
left = 632
top = 144
Left = 632
Top = 144
end
object scCommon: TSQLScript
Transaction = trmQ
AutoCommit = False
UseDollarString = False
Directives.Strings = (
'SET TERM'
@ -158,11 +159,12 @@ object dmData: TdmData
UseSetTerm = True
UseCommit = True
UseDefines = True
left = 304
top = 472
Left = 304
Top = 472
end
object scLog: TSQLScript
Transaction = trmQ
AutoCommit = False
UseDollarString = False
Directives.Strings = (
'SET TERM'
@ -401,9 +403,6 @@ object dmData: TdmData
'ALTER TABLE log_changes'
'ADD INDEX id_cqrlog_main (id_cqrlog_main);'
''
'ALTER TABLE log_changes'
'ADD FOREIGN KEY (id_cqrlog_main) REFERENCES cqrlog_main (id_cqrlog_main) ON DELETE SET NULL ON UPDATE CASCADE;'
''
'CREATE TABLE upload_status ('
' id int NOT NULL AUTO_INCREMENT PRIMARY KEY,'
' logname varchar(30) NOT NULL,'
@ -436,243 +435,258 @@ object dmData: TdmData
UseCommit = False
UseDefines = False
OnException = scLogException
left = 152
top = 472
Left = 152
Top = 472
end
object dsrmQ: TDataSource
DataSet = mQ
left = 632
top = 24
Left = 632
Top = 24
end
object qLogList: TSQLQuery
FieldDefs = <>
BeforeOpen = qLogListBeforeOpen
Transaction = trLogList
Params = <>
Macros = <>
ParseSQL = False
left = 528
top = 216
Left = 528
Top = 216
end
object trLogList: TSQLTransaction
Active = False
Action = caNone
left = 528
top = 288
Left = 528
Top = 288
end
object dsrLogList: TDataSource
DataSet = qLogList
left = 528
top = 360
Left = 368
Top = 368
end
object qSQLConsole: TSQLQuery
PacketRecords = 100
FieldDefs = <>
Transaction = trmQ
Params = <>
Macros = <>
ParseSQL = False
left = 632
top = 216
Left = 632
Top = 216
end
object trSQLConsole: TSQLTransaction
Active = False
Action = caNone
left = 632
top = 288
Left = 632
Top = 288
end
object dsrSQLConsole: TDataSource
DataSet = qSQLConsole
left = 632
top = 360
Left = 632
Top = 360
end
object qQSLMgr: TSQLQuery
FieldDefs = <>
Transaction = trQSLMgr
Params = <>
Macros = <>
ParseSQL = False
left = 152
top = 216
Left = 152
Top = 216
end
object trQSLMgr: TSQLTransaction
Active = False
Action = caNone
left = 152
top = 288
Left = 152
Top = 288
end
object qCallBook: TSQLQuery
FieldDefs = <>
Transaction = trCallBook
Params = <>
left = 24
top = 80
Macros = <>
Left = 24
Top = 80
end
object trCallBook: TSQLTransaction
Active = False
Action = caNone
left = 24
top = 144
Left = 24
Top = 144
end
object trLongNote: TSQLTransaction
Active = False
Action = caNone
left = 728
top = 144
Left = 728
Top = 144
end
object qLongNote: TSQLQuery
FieldDefs = <>
BeforeOpen = qLongNoteBeforeOpen
Transaction = trLongNote
Params = <>
left = 728
top = 80
Macros = <>
Left = 728
Top = 80
end
object qProfiles: TSQLQuery
FieldDefs = <>
Transaction = trProfiles
Params = <>
Macros = <>
ParseSQL = False
left = 88
top = 80
Left = 88
Top = 80
end
object trProfiles: TSQLTransaction
Active = False
Action = caNone
left = 88
top = 144
Left = 88
Top = 144
end
object qIOTAList: TSQLQuery
FieldDefs = <>
Transaction = trIOTAList
Params = <>
Macros = <>
ParseSQL = False
left = 24
top = 216
Left = 24
Top = 216
end
object trIOTAList: TSQLTransaction
Active = False
Action = caNone
left = 24
top = 288
Left = 24
Top = 288
end
object trBands: TSQLTransaction
Active = False
Action = caNone
left = 88
top = 288
Left = 88
Top = 288
end
object trWorkedContests: TSQLTransaction
Active = False
Action = caNone
left = 416
top = 360
Left = 304
Top = 368
end
object qBands: TSQLQuery
FieldDefs = <>
BeforeOpen = qBandsBeforeOpen
Transaction = trBands
Params = <>
Macros = <>
ParseSQL = False
left = 88
top = 216
Left = 88
Top = 216
end
object qWorkedContests: TSQLQuery
FieldDefs = <>
Transaction = trWorkedContests
Params = <>
Macros = <>
ParseSQL = False
left = 122
top = 216
Left = 122
Top = 216
end
object trDXClusters: TSQLTransaction
Active = False
Action = caNone
left = 224
top = 144
Left = 224
Top = 144
end
object qDXClusters: TSQLQuery
FieldDefs = <>
Transaction = trDXClusters
Params = <>
Macros = <>
ParseSQL = False
left = 224
top = 80
Left = 224
Top = 80
end
object trComment: TSQLTransaction
Active = False
Action = caNone
left = 224
top = 288
Left = 224
Top = 288
end
object qComment: TSQLQuery
FieldDefs = <>
Transaction = trComment
Params = <>
Macros = <>
ParseSQL = False
left = 224
top = 216
Left = 224
Top = 216
end
object trException: TSQLTransaction
Active = False
Action = caNone
left = 472
top = 288
Left = 472
Top = 288
end
object qException: TSQLQuery
FieldDefs = <>
Transaction = trException
Params = <>
Macros = <>
ParseSQL = False
left = 472
top = 216
Left = 472
Top = 216
end
object trQSOBefore: TSQLTransaction
Active = False
Action = caNone
left = 304
top = 288
Left = 304
Top = 288
end
object qQSOBefore: TSQLQuery
FieldDefs = <>
Transaction = trQSOBefore
Params = <>
Macros = <>
ParseSQL = False
left = 299
top = 216
Left = 299
Top = 216
end
object trQ1: TSQLTransaction
Active = False
Action = caNone
left = 528
top = 144
Left = 528
Top = 144
end
object Q1: TSQLQuery
FieldDefs = <>
BeforeOpen = Q1BeforeOpen
Transaction = trQ1
Params = <>
Macros = <>
ParseSQL = False
left = 528
top = 80
Left = 528
Top = 80
end
object trQ: TSQLTransaction
Active = False
Action = caNone
left = 472
top = 144
Left = 472
Top = 144
end
object Q: TSQLQuery
FieldDefs = <>
BeforeOpen = QBeforeOpen
Transaction = trQ
Params = <>
Macros = <>
ParseSQL = False
left = 472
top = 80
Left = 472
Top = 80
end
object trCQRLOG: TSQLTransaction
Active = False
Action = caNone
left = 304
top = 144
Left = 304
Top = 144
end
object qCQRLOG: TSQLQuery
PacketRecords = 100
@ -680,12 +694,14 @@ object dmData: TdmData
BeforeOpen = qCQRLOGBeforeOpen
Transaction = trCQRLOG
Params = <>
Macros = <>
ParseSQL = False
left = 304
top = 80
Left = 304
Top = 80
end
object scViews: TSQLScript
Transaction = trmQ
AutoCommit = False
UseDollarString = False
Directives.Strings = (
'SET TERM'
@ -715,16 +731,17 @@ object dmData: TdmData
UseCommit = True
UseDefines = True
OnException = scViewsException
left = 224
top = 472
Left = 224
Top = 472
end
object tmrDBPing: TTimer
Enabled = False
OnTimer = tmrDBPingTimer
left = 16
top = 24
Left = 16
Top = 24
end
object scQSLExport: TSQLScript
AutoCommit = False
UseDollarString = False
Directives.Strings = (
'SET TERM'
@ -781,11 +798,12 @@ object dmData: TdmData
UseSetTerm = True
UseCommit = True
UseDefines = True
left = 528
top = 472
Left = 528
Top = 472
end
object scOnlineLogTriggers: TSQLScript
Transaction = trmQ
AutoCommit = False
UseDollarString = False
Directives.Strings = (
'SET TERM'
@ -818,10 +836,11 @@ object dmData: TdmData
UseSetTerm = True
UseCommit = True
UseDefines = True
left = 416
top = 472
Left = 416
Top = 472
end
object scMySQLConfig: TSQLScript
AutoCommit = False
UseDollarString = False
Directives.Strings = (
'SET TERM'
@ -907,84 +926,140 @@ object dmData: TdmData
UseSetTerm = True
UseCommit = True
UseDefines = True
left = 40
top = 472
Left = 40
Top = 472
end
object qBandMapFil: TSQLQuery
FieldDefs = <>
Params = <>
left = 728
top = 216
Macros = <>
Left = 728
Top = 216
end
object trBandMapFil: TSQLTransaction
Active = False
left = 728
top = 288
Left = 728
Top = 288
end
object qRbnMon: TSQLQuery
FieldDefs = <>
Params = <>
left = 152
top = 80
Macros = <>
Left = 152
Top = 80
end
object trRbnMon: TSQLTransaction
Active = False
left = 152
top = 144
Left = 152
Top = 144
end
object qFreqMem: TSQLQuery
FieldDefs = <>
Transaction = trFreqMem
Params = <>
left = 368
top = 216
Macros = <>
Left = 600
Top = 544
end
object trFreqMem: TSQLTransaction
Active = False
left = 368
top = 288
Left = 528
Top = 544
end
object W: TSQLQuery
FieldDefs = <>
BeforeOpen = WBeforeOpen
Transaction = trW
Params = <>
left = 368
top = 80
Macros = <>
Left = 368
Top = 80
end
object trW: TSQLTransaction
Active = False
Action = caNone
left = 368
top = 144
Left = 368
Top = 144
end
object W1: TSQLQuery
FieldDefs = <>
BeforeOpen = W1BeforeOpen
Transaction = trW1
Params = <>
left = 416
top = 80
Macros = <>
Left = 416
Top = 80
end
object trW1: TSQLTransaction
Active = False
Action = caNone
left = 416
top = 144
Left = 416
Top = 144
end
object Q2: TSQLQuery
FieldDefs = <>
BeforeOpen = Q2BeforeOpen
Transaction = trQ2
Params = <>
Macros = <>
ParseSQL = False
left = 576
top = 80
Left = 576
Top = 80
end
object trQ2: TSQLTransaction
Active = False
Action = caNone
left = 576
top = 144
Left = 576
Top = 144
end
object CQ: TSQLQuery
FieldDefs = <>
BeforeOpen = QBeforeOpen
Transaction = trCQ
Params = <>
Macros = <>
ParseSQL = False
Left = 680
Top = 80
end
object trCQ: TSQLTransaction
Active = False
Action = caNone
Left = 680
Top = 144
end
object dsrFreqs: TDataSource
DataSet = qFreqs
Left = 24
Top = 368
end
object trFreqs: TSQLTransaction
Active = False
Action = caNone
Left = 144
Top = 368
end
object qFreqs: TSQLQuery
FieldDefs = <>
BeforeOpen = qBandsBeforeOpen
Transaction = trFreqs
Params = <>
Macros = <>
ParseSQL = False
Left = 88
Top = 368
end
object qFreqMemGrid: TSQLQuery
FieldDefs = <>
Transaction = trFreqMemGrid
Params = <>
Macros = <>
Left = 352
Top = 552
end
object trFreqMemGrid: TSQLTransaction
Active = False
Left = 440
Top = 552
end
end

View File

@ -24,8 +24,8 @@ uses
const
cDB_LIMIT = 500;
cDB_MAIN_VER = 18;
cDB_COMN_VER = 5;
cDB_MAIN_VER = 19;
cDB_COMN_VER = 6;
cDB_PING_INT = 300; //ping interval for database connection in seconds
//program crashed after long time of inactivity
//so now after cDB_PING_INT will be run simple sql query
@ -55,11 +55,17 @@ type
{ TdmData }
TdmData = class(TDataModule)
dsrFreqs: TDataSource;
dsrSQLConsole: TDatasource;
dsrLogList: TDatasource;
dsrmQ: TDatasource;
mQ: TSQLQuery;
Q2: TSQLQuery;
CQ: TSQLQuery;
qFreqMemGrid: TSQLQuery;
qFreqs: TSQLQuery;
trFreqMemGrid: TSQLTransaction;
trFreqs: TSQLTransaction;
trQ2: TSQLTransaction;
qSQLConsole: TSQLQuery;
scCommon: TSQLScript;
@ -86,7 +92,9 @@ type
qBandMapFil: TSQLQuery;
qRbnMon: TSQLQuery;
qFreqMem: TSQLQuery;
trCQ: TSQLTransaction;
trW: TSQLTransaction;
trWorkedContests: TSQLTransaction;
W1: TSQLQuery;
trW1: TSQLTransaction;
W: TSQLQuery;
@ -160,12 +168,14 @@ type
MySQLProcess : TProcess;
csPreviousQSO : TRTLCriticalSection;
fMySQLVersion : Currency;
FreqMemCount : integer;
function FindLib(const Path,LibName : String) : String;
function GetMysqldPath : String;
function TableExists(TableName : String) : Boolean;
function GetDebugLevel : Integer;
function FieldExists(TableName, FieldName : String) : Boolean;
function ConstraintExists(TableName, ConstraintName : String) : Boolean;
procedure CreateDBConnections;
procedure CreateViews;
@ -192,6 +202,7 @@ type
eQSLUsers : Array of ShortString;
CallArray : Array of String[20];
IsFilterSQL : String; //String that is created with Filter settings. Isvalid if isfilter is valid, no cleanups.
IsFilter : Boolean;
IsSFilter : Boolean; //Search filter
//search function uses filter function but user doesn't need to know about it
@ -766,7 +777,11 @@ begin
dmUtils.LoadBandsSettings;
frmTRXControl.InicializeRig;
frmTRXControl.cmbRig.ItemIndex:=cqrini.ReadInteger('TRX', 'RigInUse', 1);
frmTRXControl.cmbRigCloseUp(nil);
frmTRXControl.InitializeRig;
frmRotControl.rbRotor1.Checked:= cqrini.ReadBool('ROT','Use1',True);
frmRotControl.rbRotor2.Checked:= not(cqrini.ReadBool('ROT','Use1',True));
frmRotControl.InicializeRot;
OpenFreqMemories('');
@ -1675,10 +1690,18 @@ begin
QuotedStr('10M')+',28.000,30.000,28.070,28.070,28.300)';
Q.ExecSQL;
Q.SQL.Text := 'INSERT INTO cqrlog_common.bands (band,b_begin,b_end,cw,rtty,ssb) VALUES (' +
QuotedStr('8M')+',40.0000,45.0000,40.3000,40.3000,40.6800)';
Q.ExecSQL;
Q.SQL.Text := 'INSERT INTO cqrlog_common.bands (band,b_begin,b_end,cw,rtty,ssb) VALUES (' +
QuotedStr('6M')+',50.000,52.000,50.110,50.110,50.120)';
Q.ExecSQL;
Q.SQL.Text := 'INSERT INTO cqrlog_common.bands (band,b_begin,b_end,cw,rtty,ssb) VALUES (' +
QuotedStr('5M')+',54.0000,69.9000,59.5000,59.6000,59.6000)';
Q.ExecSQL;
Q.SQL.Text := 'INSERT INTO cqrlog_common.bands (band,b_begin,b_end,cw,rtty,ssb) VALUES (' +
QuotedStr('4M')+',70.000,71.000,70.150,70.150,70.150)';
Q.ExecSQL;
@ -2583,8 +2606,8 @@ begin
try
Q.Open;
Q.Last;
Q.First;
Result := dmData.Q.RecordCount
//Q.First;
finally
Q.Close;
trQ.RollBack
@ -2753,6 +2776,18 @@ begin
Q1.ExecSQL;
end;
if old_version < 6 then
begin
Q1.SQL.Text := 'INSERT INTO cqrlog_common.bands (band,b_begin,b_end,cw,rtty,ssb) VALUES (' +
QuotedStr('8M')+',40.0000,45.0000,40.3000,40.3000,40.6800)';
if fDebugLevel>=1 then Writeln(Q1.SQL.Text);
Q1.ExecSQL;
Q1.SQL.Text := 'INSERT INTO cqrlog_common.bands (band,b_begin,b_end,cw,rtty,ssb) VALUES (' +
QuotedStr('5M')+',54.0000,69.9000,59.5000,59.6000,59.6000)';
if fDebugLevel>=1 then Writeln(Q1.SQL.Text);
Q1.ExecSQL;
end;
Q1.SQL.Text := 'update cqrlog_common.db_version set nr='+IntToStr(cDB_COMN_VER);
if fDebugLevel>=1 then Writeln(Q1.SQL.Text);
Q1.ExecSQL
@ -2774,6 +2809,7 @@ end;
procedure TdmData.UpgradeMainDatabase(old_version : Integer);
var
err : Boolean = False;
max : Integer;
begin
if fDebugLevel>=1 then Writeln('[UpgradeMainDatabase] Old version: ', old_version, ' cDB_MAIN_VER: ', cDB_MAIN_VER);
@ -3160,6 +3196,33 @@ begin
end;
end;
if (old_version < 19) then
begin
if (ConstraintExists('log_changes', 'log_changes_ibfk_1')) then
begin
trQ1.StartTransaction;
Q1.SQL.Text := 'ALTER TABLE log_changes DROP FOREIGN KEY log_changes_ibfk_1';
if fDebugLevel>=1 then Writeln(Q1.SQL.Text);
Q1.ExecSQL;
trQ1.Commit;
end;
// PrepareEmptyLogUploadStatusTables() would have been called
// for older versions
if (old_version >= 8) then
begin
trQ1.StartTransaction;
Q1.SQL.Text := 'select max(id) from log_changes';
Q1.Open;
max := Q1.Fields[0].AsInteger;
Q1.Close;
Q1.SQL.Text := 'insert into upload_status (logname, id_log_changes) values ('+QuotedStr(C_UDPLOG)+','+IntToStr(max)+')';
if fDebugLevel>=1 then Writeln(Q1.SQL.Text);
Q1.ExecSQL;
trQ1.Commit;
end;
end;
if TableExists('view_cqrlog_main_by_callsign') then
begin
trQ1.StartTransaction;
@ -3435,9 +3498,11 @@ begin
trBands.RollBack;
trBands.StartTransaction;
qBands.Open;
qBands.Last; //to get proper record count
if dmData.DebugLevel>=1 then Writeln('qBands.RecorfdCount: ',qBands.RecordCount);
if qBands.RecordCount = 0 then
exit;
qBands.First;
band := qBands.Fields[1].AsString;
cw := qBands.Fields[4].AsFloat;
ssb := qBands.Fields[6].AsFloat;
@ -3665,6 +3730,33 @@ begin
end
end;
function TdmData.ConstraintExists(TableName, ConstraintName : String) : Boolean;
const
C_SEL = 'select constraint_name from information_schema.table_constraints where table_schema=%s and table_name=%s and constraint_name=%s';
var
t : TSQLQuery;
tr : TSQLTransaction;
begin
Result := True;
t := TSQLQuery.Create(nil);
tr := TSQLTransaction.Create(nil);
try
t.Transaction := tr;
tr.DataBase := MainCon;
t.DataBase := MainCon;
t.SQL.Text := Format(C_SEL,[QuotedStr(fDBName),QuotedStr(TableName), QuotedStr(ConstraintName)]);
if fDebugLevel>=1 then Writeln(t.SQL.Text);
t.Open;
Result := t.RecordCount>0
finally
t.Close;
tr.Rollback;
FreeAndNil(t);
FreeAndNil(tr)
end
end;
procedure TdmData.PrepareEmptyLogUploadStatusTables(lQ : TSQLQuery;lTr : TSQLTransaction);
var
@ -3691,6 +3783,10 @@ begin
if fDebugLevel>=1 then Writeln(lQ.SQL.Text);
lQ.ExecSQL;
lQ.SQL.Text := 'insert into upload_status (logname, id_log_changes) values ('+QuotedStr(C_UDPLOG)+',1)';
if fDebugLevel>=1 then Writeln(lQ.SQL.Text);
lQ.ExecSQL;
if Commit then
lTr.Commit
end;
@ -3932,52 +4028,61 @@ var
i : Integer;
begin
try try
dmData.trQ.StartTransaction;
dmData.Q.SQL.Text := C_DEL;
dmData.Q.ExecSQL;
dmData.Q.SQL.Text := C_INS;
dmData.qFreqMemGrid.Close;
if dmData.trFreqMemGrid.Active then dmData.trFreqMemGrid.Rollback;
dmData.trFreqMemGrid.StartTransaction;
dmData.qFreqMemGrid.SQL.Text := C_DEL;
dmData.qFreqMemGrid.ExecSQL;
dmData.trFreqMemGrid.Commit;
dmData.trFreqMemGrid.StartTransaction;
dmData.qFreqMemGrid.SQL.Text := C_INS;
for i:= 1 to grid.RowCount-1 do
begin
Q.Prepare;
Q.Params[0].AsFloat := StrToFloat(grid.Cells[0,i]);
Q.Params[1].AsString := grid.Cells[1,i];
Q.Params[2].AsInteger := StrToInt(grid.Cells[2,i]);
Q.Params[3].AsString := grid.Cells[3,i];
Q.ExecSQL
qFreqMemGrid.Prepare;
qFreqMemGrid.Params[0].AsFloat := StrToFloat(grid.Cells[0,i]);
qFreqMemGrid.Params[1].AsString := grid.Cells[1,i];
qFreqMemGrid.Params[2].AsInteger := StrToInt(grid.Cells[2,i]);
qFreqMemGrid.Params[3].AsUTF8String := grid.Cells[3,i];
qFreqMemGrid.ExecSQL;
end
except
dmData.trQ.Rollback
dmData.trFreqMemGrid.Rollback
end
finally
dmData.Q.Close;
if dmData.trQ.Active then
dmData.trQ.Commit;
dmData.qFreqMemGrid.Close;
if dmData.trFreqMemGrid.Active then
dmData.trFreqMemGrid.Commit;
OpenFreqMemories(frmTRXControl.GetRawMode)
end
end;
procedure TdmData.LoadFreqMemories(grid : TStringGrid);
const
C_SEL = 'select freq,mode,bandwidth,info from freqmem order by id';
C_SEL = 'select freq,mode,bandwidth,info from freqmem order by freq';
begin
try
grid.clear;
grid.RowCount := 1;
dmData.trQ.StartTransaction;
dmData.Q.SQL.Text := C_SEL;
dmData.Q.Open;
while not dmData.Q.Eof do
dmData.qFreqMemGrid.Close;
if dmData.trFreqMemGrid.Active then dmData.trFreqMemGrid.Rollback;
dmData.trFreqMemGrid.StartTransaction;
dmData.qFreqMemGrid.SQL.Text := C_SEL;
dmData.qFreqMemGrid.Open;
while not dmData.qFreqMemGrid.Eof do
begin
grid.RowCount := grid.RowCount + 1;
grid.Cells[0,grid.RowCount-1] := FloatToStrF(Q.Fields[0].AsFloat,ffFixed,15,3);
grid.Cells[1,grid.RowCount-1] := Q.Fields[1].AsString;
grid.Cells[2,grid.RowCount-1] := IntToStr(Q.Fields[2].AsInteger);
grid.Cells[3,grid.RowCount-1] := Q.Fields[3].AsString;
Q.Next
grid.Cells[0,grid.RowCount-1] := FloatToStrF(qFreqMemGrid.Fields[0].AsFloat,ffFixed,15,3);
grid.Cells[1,grid.RowCount-1] := qFreqMemGrid.Fields[1].AsString;
grid.Cells[2,grid.RowCount-1] := IntToStr(qFreqMemGrid.Fields[2].AsInteger);
grid.Cells[3,grid.RowCount-1] := qFreqMemGrid.Fields[3].AsUTF8String;
qFreqMemGrid.Next
end
finally
dmData.Q.Close;
dmData.trQ.Rollback
dmData.qFreqMemGrid.Close;
dmData.trFreqMemGrid.Rollback
end
end;
procedure TdmData.OpenFreqMemories(mode : String);
@ -3987,8 +4092,7 @@ var
c : integer;
begin
qFreqMem.Close;
if trFreqMem.Active then
trFreqMem.Rollback;
if trFreqMem.Active then trFreqMem.Rollback;
if not cqrini.ReadBool('TRX','MemModeRelated',False) then mode:=''; //use related settings!!
@ -4007,21 +4111,24 @@ begin
qFreqMem.SQL.Text := C_SEL + ' where (mode = ' + QuotedStr(mode) +') order by id'
end;
end;
if fDebugLevel>=1 then Writeln('FreqmemSql:',qFreqMem.SQL.Text);
if fDebugLevel>=1 then
Writeln('FreqmemSql:',qFreqMem.SQL.Text);
trFreqMem.StartTransaction;
qFreqMem.Open;
qFreqMem.Last; //to get proper record count
FreqMemCount:=qFreqMem.RecordCount;
setLength(MemNR,(FreqMemCount)+1);
qFreqMem.First;
qFreqMem.prior;
fFirstMemId := qFreqMem.Fields[0].AsInteger;
c:=-1;
setLength(MemNR,qFreqMem.RecordCount+1);
repeat
begin
inc(c);
MemNR[c]:= qFreqMem.Fields[0].AsInteger;
if fDebugLevel>=1 then Writeln('FreqmemNR:',c,'=',MemNR[c]);
if fDebugLevel>=1 then
Writeln('FreqmemNR:',c,'=',MemNR[c]);
qFreqMem.Next;
end;
until qFreqMem.Eof;
@ -4030,14 +4137,15 @@ begin
fLastMemId := qFreqMem.Fields[0].AsInteger;
if fDebugLevel>=1 then Writeln('FreqmemFirst:',fFirstMemId,' FreqmemLast:',fLastMemId);
if fDebugLevel>=1 then
Writeln('FreqmemFirst:',fFirstMemId,' FreqmemLast:',fLastMemId);
end;
procedure TdmData.GetCurrentFreqFromMem(var freq : Double; var mode : String; var bandwidth : Integer; var info : String);
var
c: integer;
begin
if qFreqMem.Active and (qFreqMem.RecordCount > 0) then
if qFreqMem.Active and (FreqMemCount > 0) then
begin
freq := qFreqMem.Fields[1].AsFloat;
mode := qFreqMem.Fields[2].AsString;
@ -4046,9 +4154,9 @@ begin
frmTRXControl.edtMemNr.Font.Color:= clDefault; // May be red if previous was "None"
if info='' then
begin
for c:=0 to qFreqMem.RecordCount do
for c:=0 to FreqMemCount do
if MemNR[c]= qFreqMem.Fields[0].AsInteger then break;
frmTRXControl.edtMemNr.Text := IntToStr(c+1)+' of '+ IntToStr(qFreqMem.RecordCount );
frmTRXControl.edtMemNr.Text := IntToStr(c+1)+' of '+ IntToStr(FreqMemCount);
end
else frmTRXControl.edtMemNr.Text := info;
frmTRXControl.infosetstage :=1;

View File

@ -8,16 +8,18 @@ uses
Classes, SysUtils, sqldb, FileUtil, LResources,
dynlibs, lcltype, ExtCtrls, sqlscript, process, mysql51dyn, ssl_openssl_lib,
mysql55dyn, mysql55conn, mysql51conn, db, httpsend, blcksock, synautil, Forms,
Graphics, mysql56conn, mysql56dyn, mysql57dyn, mysql57conn;
Graphics, mysql56conn, mysql56dyn, mysql57dyn, mysql57conn,
lNet, lNetComponents, laz2_DOM, laz2_XMLWrite, md5;
const
C_HAMQTH = 'HamQTH';
C_CLUBLOG = 'ClubLog';
C_HRDLOG = 'HRDLog';
C_UDPLOG = 'UDPLog';
C_ALLDONE = 'ALLDONE';
C_CLUBLOG_API = '21507885dece41ca049fec7fe02a813f2105aff2';
type
TWhereToUpload = (upHamQTH, upClubLog, upHrdLog);
TWhereToUpload = (upHamQTH, upClubLog, upHrdLog, upUDPLog);
type
@ -40,22 +42,26 @@ type
function RemoveSpaces(s : String) : String;
function GetQSOInAdif(id_cqrlog_main : Integer) : String;
function EncodeBandForClubLog(band : String) : String;
function EncodeBandForUDPLog(band : String) : String;
function ParseHrdLogOutput(Output : String; var Response : String) : Integer;
procedure AddQSOKeyValue(id_cqrlog_main : Integer; data : TStringList);
public
csLogUpload : TRTLCriticalSection;
function UploadLogData(Url : String; data : TStringList; var Response : String; var ResultCode : Integer) : Boolean;
function UploadLogData(where : TWhereToUpload; cmd: String; data : TStringList; var Response : String; var ResultCode : Integer) : Boolean;
function UploadLogDataHTTP(Url : String; data : TStringList; var Response : String; var ResultCode : Integer) : Boolean;
function UploadLogDataUDP(cmd : String; data : TStringList; var Response : String; var ResultCode : Integer) : Boolean;
function CheckUserUploadSettings(where : TWhereToUpload) : String;
function GetLogUploadColor(where : TWhereToUpload) : Integer;
function GetUploadUrl(where : TWhereToUpload; cmd : String) : String;
function GetResultMessage(where : TWhereToUpload; Response : String; ResultCode : Integer; var FatalError : Boolean) : String;
function GetResultMessage(where : TWhereToUpload; Response : String; ResultCode : Integer; var ErrorCode : Integer) : String;
function LogUploadEnabled : Boolean;
procedure MarkAsUploadedToAllOnlineLogs;
procedure MarkAsUploaded(LogName : String);
procedure PrepareUserInfoHeader(where : TWhereToUpload; data : TStringList);
procedure PrepareInsertHeader(where : TWhereToUpload; id_log_changes,id_cqrlog_main : Integer; data : TStringList);
procedure PrepareDeleteHeader(where : TWhereToUpload; id_log_changes : Integer; data : TStringList);
procedure PrepareDeleteHeader(where : TWhereToUpload; id_log_changes,id_cqrlog_main : Integer; data : TStringList);
procedure MarkAsUploaded(LogName : String; id_log_changes : Integer);
procedure MarkAsUpDeleted(id_log_upload : Integer);
procedure DisableOnlineLogSupport;
@ -106,8 +112,16 @@ begin
if dmData.DebugLevel >=1 then Writeln(Q.SQL.Text)
end;
function TdmLogUpload.UploadLogData(where : TWhereToUpload; cmd: String; data : TStringList; var Response : String; var ResultCode : Integer) : Boolean;
begin
case where of
upUDPLog : Result := UploadLogDataUDP(cmd,data,Response,ResultCode)
else
Result := UploadLogDataHTTP(dmLogUpload.GetUploadUrl(where,cmd), data, Response, ResultCode);
end; // case
end;
function TdmLogUpload.UploadLogData(Url : String; data : TStringList; var Response : String; var ResultCode : Integer) : Boolean;
function TdmLogUpload.UploadLogDataHTTP(Url : String; data : TStringList; var Response : String; var ResultCode : Integer) : Boolean;
var
HTTP : THTTPSend;
Bound : string;
@ -159,6 +173,106 @@ begin
end
end;
function TdmLogUpload.UploadLogDataUDP(cmd : String; data : TStringList; var Response : String; var ResultCode : Integer) : Boolean;
var
i : Integer;
Key : String;
Value : String;
Address : String;
udp : TLUDPComponent;
n : Integer;
Doc : TXMLDocument;
RootNode,ItemNode,TextNode: TDOMNode;
msg : TStringStream;
msg_len : Integer;
sent : Integer;
begin
Result := False;
sent := 0;
Address := '';
try
Doc := TXMLDocument.Create;
if (cmd='DELETE') then
RootNode := Doc.CreateElement('contactdelete')
else if (cmd='UPDATE') then
RootNode := Doc.CreateElement('contactreplace')
else // INSERT
RootNode := Doc.CreateElement('contactinfo');
Doc.Appendchild(RootNode);
RootNode := Doc.DocumentElement;
for i:=0 to data.Count-1 do
begin
Key := copy(data.Strings[i],1,Pos('=',data.Strings[i])-1);
Value := copy(data.Strings[i],Pos('=',data.Strings[i])+1,Length(data.Strings[i])-Pos('=',data.Strings[i])+1);
case Key of
'Address' : Address := Value;
else
ItemNode := Doc.CreateElement(Key);
TextNode := Doc.CreateTextNode(Value);
ItemNode.AppendChild(TextNode);
RootNode.AppendChild(ItemNode)
end; // case
end;
if (Address='') then
begin
ResultCode := 500;
Response := 'Address not set; check config';
Result := True;
exit
end;
try
msg := TStringStream.Create('', TEncoding.UTF8);
WriteXMLFile(Doc, msg);
except
FreeAndNil(msg);
raise;
end;
finally
FreeAndNil(Doc);
end;
msg_len := Length(msg.DataString);
try
udp := TLUDPComponent.Create(nil);
n := Pos(':', Address);
if n > 0 then
begin
udp.Host := Copy(Address, 1, n-1);
udp.Port := StrToInt(Copy(Address, n+1, Length(Address)));
end
else
begin
udp.Host := Address;
udp.Port := 5444;
end;
if udp.Connect then sent := udp.SendMessage(msg.DataString, Address);
finally
if udp.Connected then udp.Disconnect;
FreeAndNil(udp);
FreeAndNil(msg);
end;
if (sent = msg_len) then
begin
ResultCode := 200;
Response := 'Success';
Result := True;
end
else
begin
ResultCode := 400;
Response := 'Failed. Only sent ' + IntToStr(sent) + ' of ' + IntToStr(msg_len) + ' bytes to ' + Address;
Result := False
end;
end;
procedure TdmLogUpload.MarkAsUploadedToAllOnlineLogs;
var
err : Boolean = False;
@ -412,6 +526,42 @@ begin
end
end;
function TdmLogUpload.EncodeBandForUDPLog(band : String) : String;
var
i : Integer;
begin
case band of
'160M' : Result := '1.8';
'80M' : Result := '3.5';
'60M' : Result := '5';
'40M' : Result := '7';
'30M' : Result := '10';
'20M' : Result := '14';
'17M' : Result := '18';
'15M' : Result := '21';
'12M' : Result := '24';
'10M' : Result := '28';
'6M' : Result := '50';
'4M' : Result := '70';
'2M' : Result := '144';
'1.25M' : Result := '222';
'70CM' : Result := '420';
'33CM' : Result := '902';
'23CM' : Result := '1240';
'13CM' : Result := '2300';
'9CM' : Result := '3300';
'6CM' : Result := '5650';
'3CM' : Result := '10000';
'1.25CM' : Result := '24000';
'6MM' : Result := '47000';
'4MM' : Result := '76000';
'2MM' : Result := '142000';
'1MM' : Result := '241000';
else
Result := '';
end;
end;
function TdmLogUpload.ParseHrdLogOutput(Output : String; var Response : String) : Integer;
var
msg : String = '';
@ -433,6 +583,54 @@ begin
end
end;
procedure TdmLogUpload.AddQSOKeyValue(id_cqrlog_main : Integer; data : TStringList);
begin
Q1.Close;
if trQ1.Active then trQ1.Rollback;
trQ1.StartTransaction;
try
Q1.SQL.Text := 'select * from cqrlog_main where id_cqrlog_main = '+IntToStr(id_cqrlog_main);
Q1.Open;
if Q1.Fields[0].IsNull then
begin //this should not happen
if dmData.DebugLevel>=1 then Writeln('AddQsoKeyValue: QSO not found in the log. ID:', id_cqrlog_main);
exit
end;
data.Add('snt='+Q1.FieldByName('rst_s').AsString);
data.Add('rcv='+Q1.FieldByName('rst_r').AsString);
data.Add('name='+Q1.FieldByName('name').AsString);
data.Add('qth='+Q1.FieldByName('qth').AsString);
data.Add('gridsquare='+Q1.FieldByName('loc').AsString);
data.Add('continent='+Q1.FieldByName('cont').AsString);
data.Add('zone='+Q1.FieldByName('waz').AsString);
{
data.Add('zone='+Q1.FieldByName('itu').AsString);
}
data.Add('power='+Q1.FieldByName('pwr').AsString);
data.Add('contestname='+Q1.FieldByName('contestname').AsString);
data.Add('operator='+Q1.FieldByName('operator').AsString);
if cqrini.ReadBool('OnlineLog','UdIncExch',True) then
begin
data.Add('sntnr='+Q1.FieldByName('stx').AsString);
data.Add('rcvnr='+Q1.FieldByName('srx').AsString);
data.Add('exchange1='+Q1.FieldByName('stx_string').AsString+' '+Q1.FieldByName('srx_string').AsString)
end
else
begin
data.Add('sntnr=');
data.Add('rcvnr=');
data.Add('exchange1=');
end;
finally
Q1.Close;
trQ1.Rollback
end
end;
function TdmLogUpload.CheckUserUploadSettings(where : TWhereToUpload) : String;
const
C_IS_NOT_SET = '%s is not set! Go to Preferences and change settings.';
@ -458,6 +656,10 @@ begin
Result := C_HRDLOG + ' ' + Format(C_IS_NOT_SET,['Callsign'])
else if (cqrini.ReadString('OnlineLog','HrCode','')='') then
Result := C_HRDLOG + ' ' + Format(C_IS_NOT_SET,['Code'])
end;
upUDPLog : begin
if (cqrini.ReadString('OnlineLog','UdAddress','')='') then
Result := C_UDPLOG + ' ' + Format(C_IS_NOT_SET,['Address'])
end
end //case
end;
@ -468,7 +670,8 @@ begin
case where of
upHamQTH : Result := cqrini.ReadInteger('OnlineLog','HaColor',clBlue);
upClubLog : Result := cqrini.ReadInteger('OnlineLog','ClColor',clRed);
upHrdLog : Result := cqrini.ReadInteger('OnlineLog','HrColor',clPurple)
upHrdLog : Result := cqrini.ReadInteger('OnlineLog','HrColor',clPurple);
upUDPLog : Result := cqrini.ReadInteger('OnlineLog','UdColor',clGreen)
end
end;
@ -491,6 +694,11 @@ begin
data.Add('Code='+cqrini.ReadString('OnlineLog','HrCode',''));
data.Add('App=CQRLOG')
end;
upUDPLog : begin
data.Add('Address='+cqrini.ReadString('OnlineLog','UdAddress',''));
data.Add('mycall='+cqrini.ReadString('Station', 'Call', ''));
data.Add('app=CQRLOG')
end;
end //case
end;
@ -539,6 +747,25 @@ begin
end;
upHrdLog : begin
data.Add('ADIFData='+adif)
end;
upUDPLog : begin
data.Add('IsOriginal=True');
data.Add('timestamp='+Q2.FieldByName('qsodate').AsString+' '+Q2.FieldByName('time_on').AsString+':00');
data.Add('call='+Q2.FieldByName('callsign').AsString);
data.Add('band='+EncodeBandForUDPLog(Q2.FieldByName('band').AsString));
data.Add('mode='+Q2.FieldByName('mode').AsString);
data.Add('rxfreq='+IntToStr(round(Q2.FieldByName('freq').AsFloat*100000)));
data.Add('txfreq='+IntToStr(round(Q2.FieldByName('freq').AsFloat*100000)));
if (id_cqrlog_main>0) then
begin
AddQSOKeyValue(id_cqrlog_main, data);
data.Add('ID='+MD5Print(MD5String(cqrini.ReadString('Station', 'Call', '') + ':' + IntToStr(id_cqrlog_main))));
end;
if (Q2.FieldByName('old_qsodate').AsString <> '') then
begin
data.Add('oldtimestamp='+Q2.FieldByName('old_qsodate').AsString+' '+Q2.FieldByName('old_time_on').AsString+':00');
data.Add('oldcall='+Q2.FieldByName('old_callsign').AsString);
end
end
end //case
finally
@ -547,7 +774,7 @@ begin
end
end;
procedure TdmLogUpload.PrepareDeleteHeader(where : TWhereToUpload; id_log_changes : Integer; data : TStringList);
procedure TdmLogUpload.PrepareDeleteHeader(where : TWhereToUpload; id_log_changes,id_cqrlog_main : Integer; data : TStringList);
const
C_SEL_LOG_CHANGES = 'select * from log_changes where id = %d';
var
@ -587,6 +814,18 @@ begin
GetAdifValue('CALL',Q2.FieldByName('old_callsign').AsString);
data.Add('ADIFKey='+adif);
data.Add('Cmd=DELETE')
end;
upUDPLog : begin
data.Add('timestamp='+Q2.FieldByName('old_qsodate').AsString+' '+Q2.FieldByName('old_time_on').AsString+':00');
data.Add('call='+Q2.FieldByName('old_callsign').AsString);
data.Add('band='+EncodeBandForUDPLog(Q2.FieldByName('old_band').AsString));
data.Add('mode='+Q2.FieldByName('old_mode').AsString);
data.Add('rxfreq='+IntToStr(round(Q2.FieldByName('old_freq').AsFloat*100000)));
data.Add('txfreq='+IntToStr(round(Q2.FieldByName('old_freq').AsFloat*100000)));
if (id_cqrlog_main>0) then
begin
data.Add('ID='+MD5Print(MD5String(cqrini.ReadString('Station', 'Call', '') + ':' + IntToStr(id_cqrlog_main))));
end
end
end //case
finally
@ -599,21 +838,21 @@ function TdmLogUpload.GetUploadUrl(where : TWhereToUpload; cmd : String) : Strin
begin
Result := '';
case where of
upHamQTH : Result := 'http://www.hamqth.com/qso_realtime.php';
upHamQTH : Result := cqrini.ReadString('OnlineLog','HaUrl','http://www.hamqth.com/qso_realtime.php');
upClubLog : begin
if (cmd='DELETE') then
Result := 'https://secure.clublog.org/delete.php'
Result := cqrini.ReadString('OnlineLog','ClUrlDel','https://clublog.org/delete.php')
else
Result := 'https://secure.clublog.org/realtime.php'
Result := cqrini.ReadString('OnlineLog','ClUrl','https://clublog.org/realtime.php');
end;
upHrdLog : Result := 'http://robot.hrdlog.net/NewEntry.aspx'
upHrdLog : Result := cqrini.ReadString('OnlineLog','HrUrl','http://robot.hrdlog.net/NewEntry.aspx');
end //case
end;
function TdmLogUpload.GetResultMessage(where : TWhereToUpload; Response : String; ResultCode : Integer; var FatalError : Boolean) : String;
function TdmLogUpload.GetResultMessage(where : TWhereToUpload; Response : String; ResultCode : Integer; var ErrorCode : Integer) : String;
begin
Result := '';
FatalError := False;
ErrorCode := 0;
Response := Trim(Response);
case where of
@ -622,26 +861,26 @@ begin
200 : Result := 'OK';
500 : begin
Result := Response;
FatalError := True
ErrorCode := 1;
end;//something wrong with HamQTH server
400 : begin
Result := Response;
if (Response = 'QSO already exists in the log') then
Result := 'Already exists'
else if (Response = 'QSO not found in the log!') then
FatalError := False
ErrorCode := 0
else begin
FatalError := True; //QSO rejected
ErrorCode := 2; //QSO rejected; continue with next one
Result := Response
end
end;
403 : begin
Result := 'Access denied';
FatalError := True
Errorcode := 1
end
else begin
Result := Response;
FatalError := True
ErrorCode := 1
end
end
end;
@ -651,29 +890,49 @@ begin
400 : begin
Result := Response;
if (Pos('skipping qso',LowerCase(Response))=0) then //consider skiping QSO as non fatal error, the app can live with it :)
FatalError := True
ErrorCode := 2
end;
403 : begin
Result := 'Access denied';
FatalError := True
ErrorCode := 1
end;
500 : begin
Result := 'Internal error';
FatalError := True
ErrorCode := 2
end;
404 : begin
Result := Response;
FatalError := True
if (Response = 'QSO Details Not Matched') then
begin
ErrorCode := 2;
end
else
begin
ErrorCode := 1;
end;
end
end //case
end;
upHrdLog : begin
case ParseHrdLogOutput(Response,Result) of
200 : Result := 'OK';
400 : FatalError := True;
403 : FatalError := True;
500 : FatalError := True;
404 : FatalError := True
400 : ErrorCode := 2;
403 : ErrorCode := 2;
500 : ErrorCode := 1;
404 : ErrorCode := 2
end //case
end;
upUDPLog : begin
case ResultCode of
200 : Result := 'OK';
400 : begin
Result := Response;
ErrorCode := 2
end;
500 : begin
Result := Response;
ErrorCode := 1
end
end //case
end
end //case
@ -739,7 +998,8 @@ function TdmLogUpload.LogUploadEnabled : Boolean;
begin
Result := cqrini.ReadBool('OnlineLog','HaUp',False) or
cqrini.ReadBool('OnlineLog','ClUp',False) or
cqrini.ReadBool('OnlineLog','HrUp',False)
cqrini.ReadBool('OnlineLog','HrUp',False) or
cqrini.ReadBool('OnlineLog','UdUp',False)
end;
procedure TdmLogUpload.DisableOnlineLogSupport;

View File

@ -51,32 +51,34 @@ const
':', '|', '-', '=', '+', '@', '#', '*', '%', '_', '(', ')', '$', '<', '>'];
empty_freq = '0.00000';
empty_azimuth = '0.0';
cMaxModes = 48; //last added FST4
cModes: array [0..cMaxModes] of string =
('CW', 'SSB', 'AM', 'FM', 'RTTY', 'SSTV', 'PACTOR', 'PSK', 'ATV', 'CLOVER', 'GTOR', 'MTOR',
'PSK31', 'HELL', 'MT63',
'QRSS', 'CWQ', 'BPSK31', 'MFSK', 'JT44', 'FSK44', 'WSJT', 'AMTOR',
'THROB', 'BPSK63', 'PACKET',
'OLIVIA', 'MFSK16', 'JS8', 'JT4','JT6M', 'JT65', 'JT65A', 'JT65B', 'JT65C',
'JT9', 'QRA64', 'ISCAT', 'MSK144', 'FT8', 'FT4', 'FST4', 'FSK441', 'PSK125',
'PSK63', 'WSPR', 'PSK250', 'ROS', 'DIGITALVOICE');
cMaxBandsCount = 30; //29 bands
cMaxModes = 48; //One less than count 49 modes (loops have 0..MaxModes)
cModes: array [0..cMaxModes] of string =
('CW', 'SSB', 'AM', 'FM', 'RTTY', 'SSTV', 'PACTOR','PSK', 'ATV', 'CLOVER',
'GTOR', 'MTOR', 'PSK31', 'HELL', 'MT63', 'QRSS', 'CWQ', 'BPSK31','MFSK', 'JT44',
'FSK44', 'WSJT', 'AMTOR', 'THROB', 'BPSK63','PACKET','OLIVIA','MFSK16','JS8', 'JT4',
'JT6M', 'JT65', 'JT65A', 'JT65B', 'JT65C', 'JT9', 'QRA64', 'ISCAT', 'MSK144', 'FT8',
'FT4', 'FST4', 'FSK441','PSK125','PSK63', 'WSPR', 'PSK250','ROS', 'DIGITALVOICE');
cMaxBandsCount = 31; //True count of bands. (loops have 0..MaxBandsCount-1)
cBands: array[0..30] of string[10] =
('2190M', '630M', '160M', '80M' , '60M','40M' , '30M', '20M' , '17M' , '15M' ,
'12M' , '10M' , '5M' , '6M' , '8M' ,'4M' , '2M' , '1.25M', '70CM', '33CM',
'23CM' , '13CM', '9CM' , '6CM' , '3CM','1.25CM','6MM', '4MM' , '2.5MM','2MM',
'1MM');
cDefaultFreq =
'0.136|0.472|1.800|3.500|3.700|5.351|7.000|10.100|14.000|14.200|18.100|21.000|21.200|24.890|28.000|28.500|50.000|70.0875|'
+
'70.0500|144.000|145.275|430.000|902.0|1250.0|2400.0|3450.0|5670.0|10250.0|24100.0|47100.0|78000.0|122252.0|134930.0|248000.0';
cBands: array[0..28] of string[10] =
('2190M', '630M', '160M', '80M' , '60M', '40M' , '30M', '20M' , '17M' , '15M' ,
'12M' , '10M' , '6M' , '4M' , '2M' , '1.25M', '70CM', '33CM', '23CM', '13CM',
'9CM' , '6CM' , '3CM' , '1.25CM', '6MM', '4MM', '2.5MM', '2MM', '1MM');
'0.136|0.472|1.800|3.500|3.700|5.351|7.000|10.100|14.000|14.200|'+
'18.100|21.000|21.200|24.890|28.000|28.500|40.000|50.000|60.0000|70.0500|'+
'144.000|145.275|430.000|902.0|1250.0|2400.0|3450.0|5670.0|10250.0|24100.0|'+
'47100.0|78000.0|122252.0|134930.0|248000.0';
cMaxIgnoreFreq = 6;
cIngnoreFreq: array [0..cMaxIgnoreFreq] of string =
('1800.0', '3500.0', '7000.0', '10100.0', '14000.0', '21000.0', '28000.0');
C_RBN_CONT = 'AF,AN,AS,EU,NA,SA,OC';
C_RBN_BANDS = '630M,160M,80M,60M,40M,30M,20M,17M,15M,12M,10M,6M,2M';
C_RBN_BANDS = '630M,160M,80M,60M,40M,30M,20M,17M,15M,12M,10M,8M,6M,5M,2M';
C_RBN_MODES = 'CW,RTTY,PSK31';
C_CONTEST_LIST_FILE_NAME = 'ContestName.tab';
@ -109,6 +111,7 @@ type
fGrayLineOffset: currency;
fQRZSession: string;
fHamQTHSession: string;
fQRZCQSession: string;
fSysUTC: boolean;
SubmodeMode: TStringList;
ImportMode : TStringlist;
@ -122,11 +125,14 @@ type
function nr(ch: char): integer;
function GetTagValue(Data, tg: string): string;
function GetQRZSession(var ErrMsg: string): boolean;
function GetQRZCQSession(var ErrMsg: string): boolean;
function GetHamQTHSession(var ErrMsg: string): boolean;
function GetQRZInfo(call: string;
var nick, qth, address, zip, grid, state, county, qsl, iota, waz, itu, ErrMsg: string): boolean;
function GetHamQTHInfo(call: string;
var nick, qth, address, zip, grid, state, county, qsl, iota, waz, itu, dok, ErrMsg: string): boolean;
function GetQRZCQInfo(call: string;
var nick, qth, address, zip, grid, state, county, qsl, iota, waz, itu, dok, ErrMsg: string): boolean;
public
s136: string;
@ -141,7 +147,9 @@ type
s15: string;
s12: string;
s10: string;
s8: string;
s6: string;
s5: string;
s4: string;
s220: string;
s2: string;
@ -220,6 +228,10 @@ type
procedure BandFromDbase;
procedure UpdateHelpBrowser;
procedure ModeFromCqr(CqrMode:String;var OutMode,OutSubmode:String;dbg:Boolean);
procedure UpdateCallBookcnf;
procedure ClearStatGrid(g:TStringGrid);
procedure AddBandsToStatGrid(g:TStringGrid);
procedure ShowStatistic(ref_adif,old_stat_adif:Word; g:TStringGrid; call:String='');
function BandFromArray(tmp:Currency):string;
function MyDefaultBrowser:String;
@ -275,7 +287,7 @@ type
function ExtractZipCode(qth : String; Position : Integer) : String;
function GetLabelBand(freq : String) : String;
function GetAdifBandFromFreq(MHz : string): String;
function GetCWMessage(Key,call,rst_s,stx,stx_str,HisName,HelloMsg, text: String) : String;
function GetCWMessage(Key,call,rst_s,stx,stx_str,srx,srx_str,HisName,HelloMsg, text: String) : String;
function RigGetcmd(r : String): String;
function GetLastQSLUpgradeDate : TDateTime;
function GetLastDOKUpgradeDate : TDateTime;
@ -323,7 +335,7 @@ implementation
{$R *.lfm}
{ TdmUtils }
uses dData, dDXCC, fEnterFreq, fTRXControl, uMyini, fNewQSO;
uses dData, dDXCC, fEnterFreq, fTRXControl, uMyini, fNewQSO, uVersion, fContest;
function TdmUtils.LetterFromMode(mode: string): string;
begin
@ -551,7 +563,8 @@ begin
end
end
finally
cqrini.SaveToDisk;
//cqrini.SaveToDisk; WHY we save when load? Is this unchecked direct copy from SaveForm source abowe?
// There is no cqrini writing done, so why need to save?
l.Free
end
end;
@ -702,7 +715,6 @@ begin
QSL_R.Items.Add('!');
end;
procedure TdmUtils.InsertFreq(cmbFreq: TcomboBox);
var
a: TExplodeArray;
@ -713,36 +725,6 @@ begin
for i := 0 to Length(a) - 1 do
if a[i] <> '' then
cmbFreq.Items.Add(a[i]);
{
cmbFreq.Items.Add('1.800');
cmbFreq.Items.Add('3.500');
cmbFreq.Items.Add('3.700');
cmbFreq.Items.Add('7.000');
cmbFreq.Items.Add('10.100');
cmbFreq.Items.Add('14.000');
cmbFreq.Items.Add('14.200');
cmbFreq.Items.Add('18.100');
cmbFreq.Items.Add('21.000');
cmbFreq.Items.Add('21.200');
cmbFreq.Items.Add('24.890');
cmbFreq.Items.Add('28.000');
cmbFreq.Items.Add('28.500');
cmbFreq.Items.Add('50.000');
cmbFreq.Items.Add('70.0875');
cmbFreq.Items.Add('70.0500');
cmbFreq.Items.Add('144.000');
cmbFreq.Items.Add('145.275');
cmbFreq.Items.Add('430.000');
cmbFreq.Items.Add('902.0');
cmbFreq.Items.Add('1250.0');
cmbFreq.Items.Add('2400.0');
cmbFreq.Items.Add('3450.0');
cmbFreq.Items.Add('5670.0');
cmbFreq.Items.Add('10250.0');
cmbFreq.Items.Add('24100.0');
cmbFreq.Items.Add('47100.0');
cmbFreq.Items.Add('78000.0');
}
end;
procedure TdmUtils.InsertBands(cmbBand: TComboBox);
@ -758,7 +740,7 @@ procedure TdmUtils.InsertWorkedContests(cmbContest: TComboBox);
var
i: integer;
const
C_SEL = 'SELECT DISTINCT `contestname` FROM `cqrlog_main` WHERE `contestname` IS NOT NULL and `contestname` != "" ORDER BY `contestname` DESC';
C_SEL = 'SELECT DISTINCT `contestname` FROM `cqrlog_main` WHERE `contestname` IS NOT NULL and `contestname` != "" ORDER BY `contestname` ASC';
begin
cmbContest.Clear;
dmData.qWorkedContests.Close;
@ -1280,6 +1262,9 @@ end;
function TdmUtils.IsDateOK(date: string): boolean;
var
tmp: string;
//OH1KH: this 230-0010-20 passes as 2023-01-20 !!! We have to do something for this !!
begin
if date = '' then
begin
@ -1288,6 +1273,10 @@ begin
end;
Result := True;
//check separator places first
if (date[5]<>'-') or (date[8]<>'-') then
Result:=false;
tmp := FormatSettings.ShortDateFormat;
try
FormatSettings.ShortDateFormat := 'YYYY-MM-DD';
@ -2728,7 +2717,7 @@ begin
Result := LowerCase(GetBandFromFreq(freq));
end;
function TdmUtils.GetCWMessage(Key,call,rst_s,stx,stx_str,HisName,HelloMsg, text : String) : String;
function TdmUtils.GetCWMessage(Key,call,rst_s,stx,stx_str,srx,srx_str,HisName,HelloMsg, text : String) : String;
{
%mc - my callsign
%mn - my name
@ -2741,9 +2730,12 @@ function TdmUtils.GetCWMessage(Key,call,rst_s,stx,stx_str,HisName,HelloMsg, text
%c - callsign
%h - greeting GM/GA/GE calculated from the %c station location time
%xn - contest exchenge serial number
%xn - contest exchange serial number
%xnr - contest exchange seral number received
%xm - contest exchange message
%xmr - contest exchange message received
%xns - contest exchenge serial number sends 9->N and 0->T
%xnrs- contest exchange message received sends 9->N and 0->T
%xrs - full contest exchange RST+SerialNR+Message sends 9->N and 0->T.
Can be used "always" as if serNR and/or Message are empty just sends plain report.
@ -2758,6 +2750,7 @@ var
myqth : String = '';
rst_sh : String = '';
stx_sh : String = '';
srx_sh : String = '';
con_ex : String = '';
begin
@ -2766,7 +2759,15 @@ begin
myname := cqrini.ReadString('Station', 'Name', '');
myqth := cqrini.ReadString('Station', 'QTH', '');
if key <> '' then
Begin
if (frmContest.Showing) and ( not (cqrini.ReadBool('CW','S&P',True))) then //if contest and run mode keys are F11-F20
Begin
if key='F10' then key:='F20'
else
key:= key[1]+'1'+key[2];
end;
Result := LowerCase(cqrini.ReadString('CW', key, ''))
end
else
Result := text;
@ -2776,27 +2777,38 @@ begin
stx_sh := StringReplace(stx,'9','N',[rfReplaceAll, rfIgnoreCase]);
stx_sh := StringReplace(stx_sh,'0','T',[rfReplaceAll, rfIgnoreCase]);//replace zeros, too
srx_sh := StringReplace(srx,'9','N',[rfReplaceAll, rfIgnoreCase]);
srx_sh := StringReplace(srx_sh,'0','T',[rfReplaceAll, rfIgnoreCase]);//replace zeros, too
con_ex := rst_sh;
if stx_sh <>'' then con_ex:=con_ex+' '+stx_sh;
if stx_str <>'' then con_ex:=con_ex+' '+stx_str;
Result := StringReplace(Result,'%xnrs',srx_sh,[rfReplaceAll, rfIgnoreCase]);
Result := StringReplace(Result,'%xnr',srx,[rfReplaceAll, rfIgnoreCase]);
Result := StringReplace(Result,'%xns',stx_sh,[rfReplaceAll, rfIgnoreCase]);
Result := StringReplace(Result,'%xn',stx,[rfReplaceAll, rfIgnoreCase]);
Result := StringReplace(Result,'%xmr',srx_str,[rfReplaceAll, rfIgnoreCase]);
Result := StringReplace(Result,'%xm',stx_str,[rfReplaceAll, rfIgnoreCase]);
Result := StringReplace(Result,'%xrs',con_ex,[rfReplaceAll, rfIgnoreCase]);
Result := StringReplace(Result,'%rs',rst_sh,[rfReplaceAll, rfIgnoreCase]);
Result := StringReplace(Result,'%r',rst_s,[rfReplaceAll, rfIgnoreCase]);
Result := StringReplace(Result,'%n',HisName,[rfReplaceAll, rfIgnoreCase]);
Result := StringReplace(Result,'%mc',mycall,[rfReplaceAll, rfIgnoreCase]);
Result := StringReplace(Result,'%ml',myloc,[rfReplaceAll, rfIgnoreCase]);
Result := StringReplace(Result,'%mn',myname,[rfReplaceAll, rfIgnoreCase]);
Result := StringReplace(Result,'%mq',myqth,[rfReplaceAll, rfIgnoreCase]);
Result := StringReplace(Result,'%xrs',con_ex,[rfReplaceAll, rfIgnoreCase]);
Result := StringReplace(Result,'%rs',rst_sh,[rfReplaceAll, rfIgnoreCase]);
Result := StringReplace(Result,'%r',rst_s,[rfReplaceAll, rfIgnoreCase]);
Result := StringReplace(Result,'%n',HisName,[rfReplaceAll, rfIgnoreCase]);
Result := StringReplace(Result,'%c',call,[rfReplaceAll, rfIgnoreCase]);
Result := StringReplace(Result,'%h',HelloMsg,[rfReplaceAll, rfIgnoreCase]);
Result := StringReplace(Result,'%xns',stx_sh,[rfReplaceAll, rfIgnoreCase]);
Result := StringReplace(Result,'%xn',stx,[rfReplaceAll, rfIgnoreCase]);
Result := StringReplace(Result,'%xm',stx_str,[rfReplaceAll, rfIgnoreCase]);
Result := StringReplace(Result,'%c',call,[rfReplaceAll, rfIgnoreCase]);
if dmData.DebugLevel>=1 then Writeln('Sending:',Result)
if dmData.DebugLevel>=1 then
Writeln('Sending:',Result)
end;
function TdmUtils.RigGetcmd(r : String) : String;
@ -3246,7 +3258,93 @@ begin
HTTP.Free
end;
end;
function TdmUtils.GetQRZCQInfo(call: string;
var nick, qth, address, zip, grid, state, county, qsl, iota, waz, itu, dok, ErrMsg: string): boolean;
var
http: THTTPSend;
req: string = '';
m: TStringList;
tmp:String;
begin
Result := False;
nick := '';
address := '';
grid := '';
state := '';
county := '';
qsl := '';
ErrMsg := '';
if fQRZCQSession = '' then
begin
if not GetQRZCQSession(ErrMsg) then
exit;
end;
http := THTTPSend.Create;
m := TStringList.Create;
try
http.ProxyHost := cqrini.ReadString('Program', 'Proxy', '');
http.ProxyPort := cqrini.ReadString('Program', 'Port', '');
http.UserName := cqrini.ReadString('Program', 'User', '');
http.Password := cqrini.ReadString('Program', 'Passwd', '');
if (call = '') then
begin
ErrMsg := 'Callsign field empty!';
exit;
end;
req := 'https://ssl.qrzcq.com/xml?s=' + fQRZCQSession + '&callsign=' + GetIDCall(call)+'&agent=Cqrlog_'+uVersion.cVERSION;
if not HTTP.HTTPMethod('GET', req) then
ErrMsg := '(' + IntToStr(http.ResultCode) + '):' + http.ResultString
else
begin
m.LoadFromStream(http.Document);
if Pos(UpperCase('<Error>Session Timeout</Error>'), UpperCase(m.Text)) > 0 then
begin
fQRZCQSession := '';
cqrini.WriteString('CallBook', 'CbQRZCQKey', fQRZCQSession);
Result := GetQRZCQInfo(call, nick, qth, address, zip, grid, state,
county, qsl, iota, waz, itu, dok, ErrMsg);
end
else
begin
if Pos('<Error>Not found:', m.Text) > 0 then
exit;
nick:= GetTagValue(m.Text, '<name>');
if WordCount(nick,[' ']) >2 then //There may be nickname after true name
Begin
tmp := ExtractWord(2,nick,[' ']);
nick:= ExtractWord(1,nick,[' ']);
if ((pos('(',tmp)>0)
or (pos('"',tmp)>0)
or (pos(#$27,tmp)>0) // '
or (pos('[',tmp)>0)
or (pos('{',tmp)>0) ) then //There may be nickname after true name
nick:= nick+' '+tmp;
end
else
nick:= ExtractWord(1,nick,[' ']);
qth := GetTagValue(m.Text, '<qth>');
state := GetTagValue(m.Text, '<state>');
zip := GetTagValue(m.Text, '<zip>');
address := GetTagValue(m.Text, '<name>') + LineEnding +
GetTagValue(m.Text, '<address>') + LineEnding;
if (state <> '') then
address := address + ', ' + state;
address := address + ' ' + zip;
county := GetTagValue(m.Text, '<county>');
grid := UpperCase(GetTagValue(m.Text, '<locator>'));
qsl := GetTagValue(m.Text, '<manager>');
iota := GetTagValue(m.Text, '<iota>');
waz := GetTagValue(m.Text, '<cq>');
itu := GetTagValue(m.Text, '<itu>');
dok := GetTagValue(m.Text, '<dok>')
end
end
finally
m.Free;
HTTP.Free
end;
end;
procedure TdmUtils.SaveWindowPos(a: TForm);
var
section: string = '';
@ -3788,8 +3886,10 @@ function TdmUtils.GetCallBookData(call: string;
var nick, qth, address, zip, grid, state, county, qsl, iota, waz, itu, dok, ErrMsg: string): boolean;
begin
if cqrini.ReadBool('Callbook', 'QRZ', False) then
Result := GetQRZInfo(call, nick, qth, address, zip, grid, state, county, qsl, iota, waz, itu, ErrMsg)
else
Result := GetQRZInfo(call, nick, qth, address, zip, grid, state, county, qsl, iota, waz, itu, ErrMsg) ;
if cqrini.ReadBool('Callbook', 'QRZCQ', False) then
Result := GetQRZCQInfo(call, nick, qth, address, zip, grid, state, county, qsl, iota, waz, itu, dok, ErrMsg) ;
if cqrini.ReadBool('Callbook', 'HamQTH', False) then
Result := GetHamQTHInfo(call, nick, qth, address, zip, grid, state, county, qsl, iota, waz, itu, dok, ErrMsg)
end;
@ -3812,7 +3912,6 @@ begin
end;
end;
function TdmUtils.GetQRZSession(var ErrMsg: string): boolean;
var
http: THTTPSend;
@ -3822,8 +3921,8 @@ var
kpos: word;
begin
Result := False;
if (cqrini.ReadString('CallBook', 'CBUser', '') = '') or
(cqrini.ReadString('CallBook', 'CBPass', '') = '') then
if (cqrini.ReadString('CallBook', 'CbQRZUser', '') = '') or
(cqrini.ReadString('CallBook', 'CbQRZPass', '') = '') then
begin
ErrMsg := 'Empty password or user name';
exit;
@ -3836,8 +3935,8 @@ begin
http.UserName := cqrini.ReadString('Program', 'User', '');
http.Password := cqrini.ReadString('Program', 'Passwd', '');
req := 'https://xmldata.qrz.com/xml/1.34?username=' + cqrini.ReadString(
'CallBook', 'CBUser', '') + ';password=' + cqrini.ReadString(
'CallBook', 'CBPass', '') + ';agent=cqrlog';
'CallBook', 'CbQRZUser', '') + ';password=' + cqrini.ReadString(
'CallBook', 'CbQRZPass', '') + ';agent=Cqrlog_'+uVersion.cVERSION;
if not HTTP.HTTPMethod('GET', req) then
ErrMsg := '(' + IntToStr(http.ResultCode) + '):' + http.ResultString
else
@ -3867,16 +3966,23 @@ begin
HTTP.Free
end;
end;
function TdmUtils.GetHamQTHSession(var ErrMsg: string): boolean;
function TdmUtils.GetQRZCQSession(var ErrMsg: string): boolean;
var
http: THTTPSend;
req: string = '';
m: TStringList;
epos: word;
kpos: word;
begin
fQRZCQSession:= cqrini.ReadString('CallBook', 'CbQRZCQKey','');
if fQRZCQSession<>'' then
Begin
Result:=true;
exit;
end;
Result := False;
if (cqrini.ReadString('CallBook', 'CBUser', '') = '') or
(cqrini.ReadString('CallBook', 'CBPass', '') = '') then
if (cqrini.ReadString('CallBook', 'CbQRZCQUser', '') = '') or
(cqrini.ReadString('CallBook', 'CbQRZCQPass', '') = '') then
begin
ErrMsg := 'Empty password or user name';
exit;
@ -3888,8 +3994,62 @@ begin
http.ProxyPort := cqrini.ReadString('Program', 'Port', '');
http.UserName := cqrini.ReadString('Program', 'User', '');
http.Password := cqrini.ReadString('Program', 'Passwd', '');
req := 'http://www.hamqth.com/xml.php?u=' + cqrini.ReadString('CallBook', 'CBUser', '') +
'&p=' + EncodeURLData(cqrini.ReadString('CallBook', 'CBPass', '')) + '&prg=cqrlog';
req := 'https://ssl.qrzcq.com/xml?username=' + cqrini.ReadString(
'CallBook', 'CbQRZCQUser', '') + '&password=' + cqrini.ReadString(
'CallBook', 'CbQRZCQPass', '') + '&agent=Cqrlog_'+uVersion.cVERSION;
if not HTTP.HTTPMethod('GET', req) then
ErrMsg := '(' + IntToStr(http.ResultCode) + '):' + http.ResultString
else
begin
m.LoadFromStream(http.Document);
if dmData.DebugLevel >= 1 then
Writeln(m.Text);
//I'd like to parse it as normal XML but it seems XML support in Freepascal
//2.4.0 is broken :-(
epos := Pos('<Error>', m.Text);
if epos > 0 then
ErrMsg := copy(m.Text, epos + 7, Pos('</Error>', m.Text) - epos - 7)
else
begin
kpos := Pos('<Key>', m.Text);
if kpos > 0 then
begin
fQRZCQSession := copy(m.Text, kpos + 5, Pos('</Key>', m.Text) - kpos - 5);
cqrini.WriteString('CallBook', 'CbQRZCQKey', fQRZCQSession);
Result := True;
end
else
ErrMsg := 'Tag "<Key>" not found!';
end;
end
finally
m.Free;
HTTP.Free
end;
end;
function TdmUtils.GetHamQTHSession(var ErrMsg: string): boolean;
var
http: THTTPSend;
req: string = '';
m: TStringList;
begin
Result := False;
if (cqrini.ReadString('CallBook', 'CbHamQTHUser', '') = '') or
(cqrini.ReadString('CallBook', 'CbHamQTHPass', '') = '') then
begin
ErrMsg := 'Empty password or user name';
exit;
end;
http := THTTPSend.Create;
m := TStringList.Create;
try
http.ProxyHost := cqrini.ReadString('Program', 'Proxy', '');
http.ProxyPort := cqrini.ReadString('Program', 'Port', '');
http.UserName := cqrini.ReadString('Program', 'User', '');
http.Password := cqrini.ReadString('Program', 'Passwd', '');
req := 'http://www.hamqth.com/xml.php?u=' + cqrini.ReadString('CallBook', 'CbHamQTHUser', '') +
'&p=' + EncodeURLData(cqrini.ReadString('CallBook', 'CbHamQTHPass', '')) + '&prg=Cqrlog_'+uVersion.cVERSION;
//Writeln(req);
if not HTTP.HTTPMethod('GET', req) then
ErrMsg := '(' + IntToStr(http.ResultCode) + '):' + http.ResultString
@ -4013,7 +4173,6 @@ begin
HTTP.Free
end;
end;
procedure TdmUtils.ShowHamQTHInBrowser(call: string);
var
AProcess: TProcess;
@ -4447,7 +4606,7 @@ begin
end
end;
if (CmbText='') then
RigComboBox.ItemIndex := 0
RigComboBox.ItemIndex := -1
else
RigComboBox.Text := CmbText
end;
@ -5038,5 +5197,198 @@ Begin
if num=4 then CreaFile(dmData.HomeDir+C_MODEFILE_DIR+C_READMEMODE_FILE,R_file);
end;
procedure TdmUtils.UpdateCallBookcnf;
var
c,p:string;
Begin
c:= cqrini.ReadString('CallBook', 'CBUser', '');
if c <> '' then
Begin //remove old definition
p:= cqrini.ReadString('CallBook', 'CBPass', '');
if cqrini.ReadBool('Callbook', 'HamQTH', True) then
begin
cqrini.WriteString('CallBook', 'CbHamQTHUser', c);
cqrini.WriteString('CallBook', 'CbHamQTHPass', p);
end
else
begin
cqrini.WriteString('CallBook', 'CbQRZUser', c);
cqrini.WriteString('CallBook', 'CbQRZPass', p);
end;
cqrini.DeleteKey('CallBook', 'CBUser');
cqrini.DeleteKey('CallBook', 'CBPass');
end;
end;
procedure TdmUtils.ClearStatGrid(g:TStringGrid);
var
i,y : Integer;
begin
for i:= 0 to g.ColCount-1 do
for y := 0 to g.RowCount-1 do
g.Cells[i,y] := ' ';
with g do
begin
Cells[0, 1] := 'SSB';
Cells[0, 2] := 'CW';
Cells[0, 3] := 'DIGI'
end;
end;
procedure TdmUtils.AddBandsToStatGrid(g:TStringGrid);
var
i : Integer;
begin
g.ColCount := cMaxBandsCount;
for i:=0 to cMaxBandsCount-1 do
begin
if dmUtils.MyBands[i][0]='' then
begin
g.ColCount := i+1;
break
end;
g.Cells[i+1,0] := dmUtils.MyBands[i][1];
end;
end;
procedure TdmUtils.ShowStatistic(ref_adif,old_stat_adif:Word; g:TStringGrid; call:String='');
var
i : Integer;
ShowLoTW : Boolean = False;
mode : String;
QSLR,LoTW,eQSL : String;
tmps,tmpq : String;
space: String;
begin
tmpq:='';
if call='' then
Begin
if old_stat_adif = ref_adif then
exit;
old_stat_adif := ref_adif;
end
else
begin
tmpq:=' and callsign='+QuotedStr(call);
end;
g.ColCount := cMaxBandsCount;
dmUtils.ClearStatGrid(g);
dmUtils.AddBandsToStatGrid(g);
space := ' ';
if cqrini.ReadBool('Fonts','GridDotsInsteadSpaces',False) = True then
begin
space := '.';
end;
for i:=0 to cMaxBandsCount-1 do
begin
if dmUtils.MyBands[i][0]='' then
begin
g.ColCount := i+1;
break
end;
g.Cells[i+1,1] := space+space+space;
g.Cells[i+1,2] := space+space+space;
g.Cells[i+1,3] := space+space+space;
end;
if dmData.trQ.Active then
dmData.trQ.RollBack;
dmData.Q.Close;
ShowLoTW := cqrini.ReadBool('LoTW','NewQSOLoTW',False);
if ShowLoTW then
dmData.Q.SQL.Text := 'select band,mode,qsl_r,lotw_qslr,eqsl_qsl_rcvd from cqrlog_main where adif='+
IntToStr(ref_adif) + tmpq + ' and ((qsl_r='+QuotedStr('Q')+') or '+
'(lotw_qslr = '+QuotedStr('L')+') or (eqsl_qsl_rcvd='+QuotedStr('E')+
')) group by band,mode,qsl_r,lotw_qslr,eqsl_qsl_rcvd'
else
dmData.Q.SQL.Text := 'select band,mode,qsl_r,lotw_qslr,eqsl_qsl_rcvd from cqrlog_main where adif='+
IntToStr(ref_adif) + tmpq + ' and (qsl_r = '+QuotedStr('Q')+') '+
'group by band,mode,qsl_r,lotw_qslr,eqsl_qsl_rcvd';
dmData.trQ.StartTransaction;
dmData.Q.Open;
while not dmData.Q.Eof do
begin
i := dmUtils.GetBandPos(dmData.Q.Fields[0].AsString)+1;
mode := dmData.Q.Fields[1].AsString;
QSLR := dmData.Q.Fields[2].AsString;
LoTW := dmData.Q.Fields[3].AsString;
eQSL := dmData.Q.Fields[4].AsString;
if i > 0 then
begin
if (Mode = 'SSB') or (Mode='FM') or (Mode='AM') then
begin
tmps := g.Cells[i,1] ;
if QSLR = 'Q' then
tmps[1] := 'Q';
if (LoTW = 'L') then
tmps[2] := 'L';
if (eQSL = 'E') then
tmps[3] := 'E';
g.Cells[i,1] := tmps
end
else begin
if (Mode='CW') or (Mode='CWQ') then
begin
tmps := g.Cells[i,2] ;
if QSLR = 'Q' then
tmps[1] := 'Q';
if (LoTW = 'L') then
tmps[2] := 'L';
if (eQSL = 'E') then
tmps[3] := 'E';
g.Cells[i,2] := tmps
end
else begin
tmps := g.Cells[i,3] ;
if QSLR = 'Q' then
tmps[1] := 'Q';
if (LoTW = 'L') then
tmps[2] := 'L';
if (eQSL = 'E') then
tmps[3] := 'E';
g.Cells[i,3] := tmps
end
end;
end;
dmData.Q.Next
end;
dmData.trQ.Rollback;
dmData.Q.Close;
if dmData.trQ.Active then
dmData.trQ.Rollback;
dmData.Q.SQL.Text := 'select band,mode from cqrlog_main where adif='+
IntToStr(ref_adif) + tmpq +' group by band,mode';
dmData.trQ.StartTransaction;
dmData.Q.Open;
while not dmData.Q.Eof do
begin
i := dmUtils.GetBandPos(dmData.Q.Fields[0].AsString)+1;
mode := dmData.Q.Fields[1].AsString;
if i > 0 then
begin
if ((mode = 'SSB') or (mode = 'FM') or (mode = 'AM')) then
if(g.Cells[i,1] = space+space+space) then g.Cells[i,1] := ' X ';
if ((mode = 'CW') or (mode = 'CWR')) then
if (g.Cells[i,2] = space+space+space) then g.Cells[i,2] := ' X ';
if ((mode <> 'SSB') and (mode <>'FM') and (mode <> 'AM') and (mode <> 'CW') and (mode <> 'CWR')) then
if (g.Cells[i,3] = space+space+space) then g.Cells[i,3] := ' X '
end;
dmData.Q.Next;
end;
dmData.Q.Close;
dmData.trQ.Rollback
end;
end.

View File

@ -8,9 +8,10 @@ object frmAddRadioMemory: TfrmAddRadioMemory
ClientHeight = 222
ClientWidth = 308
OnCreate = FormCreate
OnKeyDown = FormKeyDown
OnShow = FormShow
Position = poOwnerFormCenter
LCLVersion = '2.0.0.4'
LCLVersion = '2.2.4.0'
object lblFreq: TLabel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
@ -32,8 +33,9 @@ object frmAddRadioMemory: TfrmAddRadioMemory
Top = 19
Width = 192
BorderSpacing.Left = 12
OnKeyDown = FormKeyDown
OnKeyPress = edtFreqKeyPress
TabOrder = 0
Text = '0'
end
object lblMode: TLabel
AnchorSideLeft.Control = Owner
@ -61,8 +63,8 @@ object frmAddRadioMemory: TfrmAddRadioMemory
BorderSpacing.Left = 12
CharCase = ecUppercase
ItemHeight = 0
OnKeyDown = FormKeyDown
TabOrder = 1
Text = 'CMBMODE'
end
object lblWidth: TLabel
AnchorSideLeft.Control = Owner
@ -86,8 +88,9 @@ object frmAddRadioMemory: TfrmAddRadioMemory
Top = 125
Width = 112
BorderSpacing.Left = 12
NumbersOnly = True
OnKeyDown = FormKeyDown
TabOrder = 2
Text = '0'
end
object Button1: TButton
AnchorSideTop.Control = Owner
@ -144,6 +147,7 @@ object frmAddRadioMemory: TfrmAddRadioMemory
Width = 284
BorderSpacing.Left = 12
MaxLength = 25
OnKeyDown = FormKeyDown
TabOrder = 3
end
end

View File

@ -24,7 +24,9 @@ type
lblWidth: TLabel;
lblInfo: TLabel;
procedure Button1Click(Sender: TObject);
procedure edtFreqKeyPress(Sender: TObject; var Key: char);
procedure FormCreate(Sender : TObject);
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
procedure FormShow(Sender: TObject);
private
{ private declarations }
@ -45,8 +47,7 @@ uses dUtils;
procedure TfrmAddRadioMemory.FormShow(Sender: TObject);
begin
dmUtils.LoadFontSettings(frmAddRadioMemory);
edtFreq.SetFocus
edtFreq.SetFocus;
end;
procedure TfrmAddRadioMemory.Button1Click(Sender: TObject);
@ -60,6 +61,13 @@ begin
exit
end;
if cmbMode.ItemIndex < 0 then
begin
Application.MessageBox('Please enter correct mode','Error...', mb_OK+mb_IconError);
cmbMode.SetFocus;
exit
end;
if not TryStrToFloat(edtWidth.Text,f) then
begin
Application.MessageBox('Please enter correct bandwidth','Error...', mb_OK+mb_IconError);
@ -70,6 +78,11 @@ begin
ModalResult := mrOK
end;
procedure TfrmAddRadioMemory.edtFreqKeyPress(Sender: TObject; var Key: char);
begin
if not (key in ['0'..'9','.']) then key:=#0;
end;
procedure TfrmAddRadioMemory.FormCreate(Sender : TObject);
begin
dmUtils.InsertModes(cmbMode);
@ -78,6 +91,13 @@ begin
cmbMode.Items.Insert(2,'LSB')
end;
procedure TfrmAddRadioMemory.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if key = VK_RETURN then Button1Click(nil);
if key = VK_ESCAPE then ModalResult:=mrCancel;
end;
initialization
{$I fAddRadioMemory.lrs}

View File

@ -904,6 +904,7 @@ begin
lblCount.Caption :='';
lblErrors.Caption := '';
Do_Err_Import:=true;
lblComplete.Visible := False;
end;
procedure TfrmAdifImport.mnuDeleteClick(Sender: TObject);

View File

@ -1,87 +1,166 @@
object frmBigSquareStat: TfrmBigSquareStat
Left = 580
Left = 283
Height = 590
Top = 279
Top = 53
Width = 655
Caption = 'Big square statistic'
ClientHeight = 590
ClientWidth = 655
OnClose = FormClose
OnShow = FormShow
LCLVersion = '1.2.2.0'
LCLVersion = '2.2.6.0'
object Panel1: TPanel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
AnchorSideRight.Control = Owner
Left = 0
Height = 88
Height = 80
Top = 0
Width = 655
Align = alTop
BevelOuter = bvNone
ClientHeight = 88
ClientHeight = 80
ClientWidth = 655
TabOrder = 0
object cmbBands: TComboBox
Left = 63
Height = 31
Top = 24
AnchorSideLeft.Control = Label1
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Panel1
Left = 55
Height = 33
Top = 9
Width = 164
BorderSpacing.Left = 6
BorderSpacing.Top = 9
ItemHeight = 0
OnChange = cmbBandsChange
Style = csDropDownList
TabOrder = 0
end
object Label1: TLabel
Left = 16
AnchorSideLeft.Control = Panel1
AnchorSideTop.Control = cmbBands
AnchorSideTop.Side = asrCenter
Left = 12
Height = 17
Top = 32
Width = 38
Top = 17
Width = 37
BorderSpacing.Left = 12
Caption = 'Band:'
ParentColor = False
end
object GroupBox1: TGroupBox
Left = 240
Height = 72
Top = 11
Width = 225
AnchorSideLeft.Control = cmbBands
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = cmbBands
AnchorSideRight.Control = btnRefresh
Left = 231
Height = 42
Top = 9
Width = 244
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 12
BorderSpacing.Right = 12
Caption = ' Confirmed '
ClientHeight = 53
ClientWidth = 221
ClientHeight = 24
ClientWidth = 242
TabOrder = 1
object chkQSL: TCheckBox
Left = 6
Height = 24
Top = 3
Width = 53
AnchorSideLeft.Control = GroupBox1
AnchorSideTop.Control = GroupBox1
AnchorSideTop.Side = asrCenter
Left = 5
Height = 23
Top = 1
Width = 51
BorderSpacing.Left = 5
Caption = 'QSL'
OnChange = cmbBandsChange
TabOrder = 0
end
object chkLoTW: TCheckBox
Left = 70
Height = 24
Top = 3
Width = 65
AnchorSideLeft.Control = GroupBox1
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = GroupBox1
AnchorSideTop.Side = asrCenter
Left = 90
Height = 23
Top = 1
Width = 62
Caption = 'LoTW'
OnChange = cmbBandsChange
TabOrder = 1
end
object chkeQSL: TCheckBox
Left = 149
Height = 24
Top = 3
Width = 61
AnchorSideTop.Control = GroupBox1
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = GroupBox1
AnchorSideRight.Side = asrBottom
Left = 177
Height = 23
Top = 1
Width = 59
Anchors = [akTop, akRight]
BorderSpacing.Right = 6
Caption = 'eQSL'
OnChange = cmbBandsChange
TabOrder = 2
end
end
object btnRefresh: TButton
Left = 496
Height = 25
Top = 28
Width = 128
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = GroupBox1
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = Panel1
AnchorSideRight.Side = asrBottom
Left = 487
Height = 33
Top = 14
Width = 156
Anchors = [akTop, akRight]
BorderSpacing.Right = 12
Caption = 'Refresh statistic'
OnClick = btnRefreshClick
TabOrder = 2
end
object pbTot: TProgressBar
AnchorSideLeft.Control = cmbBands
AnchorSideTop.Control = cmbBands
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = cmbBands
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Side = asrBottom
Left = 55
Height = 10
Top = 54
Width = 161
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 12
BorderSpacing.Right = 3
TabOrder = 3
end
object lblFIlterActive: TLabel
AnchorSideLeft.Control = GroupBox1
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = GroupBox1
AnchorSideTop.Side = asrBottom
Left = 305
Height = 17
Top = 57
Width = 96
BorderSpacing.Top = 6
Caption = 'Filter is active!'
Font.Color = clRed
ParentColor = False
ParentFont = False
Visible = False
end
end
object Panel2: TPanel
AnchorSideLeft.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Owner
Left = 0
Height = 34
Top = 556
@ -92,33 +171,50 @@ object frmBigSquareStat: TfrmBigSquareStat
ClientWidth = 655
TabOrder = 1
object btnClose: TButton
Left = 569
Height = 25
Top = 6
Width = 75
AnchorSideTop.Control = Panel2
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = Panel2
AnchorSideRight.Side = asrBottom
Left = 553
Height = 33
Top = 1
Width = 90
Anchors = [akTop, akRight]
BorderSpacing.Right = 12
Cancel = True
Caption = 'Close'
ModalResult = 2
TabOrder = 0
end
object btnSaveTo: TButton
Left = 480
Height = 25
Top = 6
Width = 75
AnchorSideTop.Control = Panel2
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = btnClose
Left = 451
Height = 33
Top = 1
Width = 90
Anchors = [akTop, akRight]
BorderSpacing.Right = 12
Caption = 'Save to ...'
OnClick = btnSaveToClick
TabOrder = 1
end
end
object IpHtmlPanel1: TIpHtmlPanel
AnchorSideLeft.Control = Panel1
AnchorSideTop.Control = Panel1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Panel1
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Panel2
Left = 0
Height = 468
Top = 88
Height = 476
Top = 80
Width = 655
Align = alClient
BorderWidth = 1
BorderStyle = bsSingle
DataProvider = IpFileDataProvider1
FixedTypeface = 'Courier New'
DefaultTypeFace = 'Sans'
@ -128,17 +224,29 @@ object frmBigSquareStat: TfrmBigSquareStat
PrintSettings.MarginTop = 0.5
PrintSettings.MarginRight = 0.5
PrintSettings.MarginBottom = 0.5
PrintSettings.Preview.Left = 320
PrintSettings.Preview.Top = 200
PrintSettings.Preview.Width = 960
PrintSettings.Preview.Height = 600
TabOrder = 2
VLinkColor = clBlue
end
object IpFileDataProvider1: TIpFileDataProvider
left = 160
top = 512
Left = 160
Top = 512
end
object dlgSave: TSaveDialog
DefaultExt = '.html'
Filter = 'HTML files|*.html'
left = 64
top = 512
Left = 64
Top = 512
end
object tmrBlink: TTimer
Enabled = False
OnTimer = tmrBlinkTimer
OnStartTimer = tmrBlinkStartTimer
OnStopTimer = tmrBlinkStopTimer
Left = 248
Top = 512
end
end

View File

@ -5,9 +5,9 @@ unit fBigSquareStat;
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics,
Dialogs, ExtCtrls, StdCtrls, Grids, IpHtml, Ipfilebroker, db, BufDataset,
LazFileUtils;
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
ExtCtrls, StdCtrls, Grids, ComCtrls, IpHtml, Ipfilebroker, db, BufDataset,
LazFileUtils, dateutils;
type
@ -25,13 +25,20 @@ type
IpFileDataProvider1: TIpFileDataProvider;
IpHtmlPanel1: TIpHtmlPanel;
Label1: TLabel;
lblFIlterActive: TLabel;
Panel1: TPanel;
Panel2: TPanel;
dlgSave: TSaveDialog;
pbTot: TProgressBar;
tmrBlink: TTimer;
procedure btnRefreshClick(Sender: TObject);
procedure btnSaveToClick(Sender: TObject);
procedure cmbBandsChange(Sender: TObject);
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure FormShow(Sender: TObject);
procedure tmrBlinkStartTimer(Sender: TObject);
procedure tmrBlinkStopTimer(Sender: TObject);
procedure tmrBlinkTimer(Sender: TObject);
private
TmpFile : String;
f : TextFile;
@ -61,60 +68,26 @@ begin
DeleteFileUTF8(ExtractFileNameWithoutExt(TmpFile)+'.html')
end;
{ dbfBand.FilePathFull := fHomeDir;
dbfBand.TableName := 'bandmap.dat';
if not FileExists(fHomeDir+'bandmap.dat') then
begin
dbfBand.TableLevel := 7;
dbfBand.Exclusive := True;
dbfBand.FieldDefs.Clear;
With dbfBand.FieldDefs do begin
Add('vfo_a', ftFloat);
Add('Call', ftString, 20);
Add('vfo_b', ftFloat);
Add('split',ftBoolean);
Add('color',ftLargeint);
Add('mode',ftString,8);
Add('band',ftString,6);
Add('time',ftDateTime);
Add('age', ftString,1);
Add('pfx',ftString,10);
Add('lat',ftString,10);
Add('long',ftString,10);
Add('id', ftAutoInc)
end;
dbfBand.CreateTable;
dbfBand.Open;
dbfBand.AddIndex('id','id', [ixPrimary, ixUnique]);
dbfBand.AddIndex('vfo_a','vfo_a', []);
dbfBand.Close;
dbfBand.Exclusive := false;
dbfBand.Open
}
procedure TfrmBigSquareStat.btnRefreshClick(Sender: TObject);
var
tmp : String = '';
bnd : String = '';
grb : String = '';
wkd : Word = 0;
cfm : Word = 0;
allwkd : longint = 0;
thiswkd : longint =0;
allwkdBig : longint = 0;
TotPos : longint = 0;
wkd : integer = 0;
cfm : integer = 0;
ll : String = '';
sum_wkd : Word = 0;
sum_cfm : Word = 0;
sum_wkd : integer = 0;
sum_cfm : integer = 0;
db : TBufDataset;
TableName : String;
begin
//db := TBufDataset.Create(nil);
tmrBlink.Enabled:=False;
TableName:='cqrlog_main';
try
//db.Fields.Clear;
//with db.FieldDefs do
//begin
// Add('loc', ftString, 4);
// Add('cfm',ftBoolean)
//end;
//db.CreateDataset;
//db.IndexDefs.Add('loc','loc',[ixPrimary]);
//db.Open;
dmData.Q.Close;
dmData.Q1.Close;
if dmData.trQ.Active then dmData.trQ.Rollback;
@ -136,24 +109,68 @@ begin
end;
tmp := copy(tmp,1,Length(tmp)-2); //remove "or"
if cmbBands.Text='ALL' then
bnd:=' '
else
bnd:= ' and band='+QuotedStr(cmbBands.Text);
dmData.trQ.StartTransaction;
dmData.trQ1.StartTransaction;
try
dmData.Q.SQL.Text := 'select upper(left(loc,2)) as ll FROM cqrlog_main where loc <> '+QuotedStr('')+
' and band='+QuotedStr(cmbBands.Text)+' group by ll';
if dmData.IsFilter then
begin
try
TableName:='statistic_filter';
dmData.Q.Close;
dmData.Q.SQL.Text:='DROP VIEW IF EXISTS '+TableName;
dmData.Q.ExecSQL;
dmData.trQ.Commit;
dmData.Q.Close;
dmData.Q.SQL.Text:='CREATE VIEW '+TableName+' AS '+dmData.IsFilterSQL;
dmData.Q.ExecSQL;
dmData.trQ.Commit;
dmData.Q.Close;
except
on E : EDatabaseError do
Begin
ShowMessage('Can not create filter view!');
Exit;
end;
end;
end;
dmData.Q.SQL.Text := 'select left(loc,2) as ll FROM '+TableName+' where loc <> '+QuotedStr('')+' group by ll';
dmData.Q.Open;
dmData.Q.Last;
allwkdBig:=dmData.Q.RecordCount;
dmData.Q.Close;
dmData.Q.SQL.Text := 'select left(loc,4) as ll FROM '+TableName+' where loc <> '+QuotedStr('')+' group by ll';
dmData.Q.Open;
dmData.Q.Last;
allwkd:=dmData.Q.RecordCount;
dmData.Q.Close;
dmData.Q.SQL.Text := 'select upper(left(loc,2)) as ll FROM '+TableName+' where loc <> '+QuotedStr('')+
bnd+' group by ll';
dmData.Q.Open;
dmData.Q.Last;
WriteHMTLHeader;
writeln(f,'<table>');
pbTot.Max:=dmData.Q.RecordCount;
thiswkd:= dmData.Q.RecordCount;
dmData.Q.First;
while not dmData.Q.Eof do
begin
inc(TotPos);
pbTot.Position:=TotPos;
Application.ProcessMessages;
ll := dmData.Q.Fields[0].AsString;
writeln(f,'<tr>'+LineEnding+'<td valign="middle">'+LineEnding+'<font color="black"><b>'+ll+'</b></font>'+LineEnding+'</td>');
writeln(f,'<td align="left">');
writeln(f,'<font color="black">');
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,'<hr>');
Writeln(f,'<font color="black">'+LineEnding+'<b>Total:</b><br>');
Writeln(f,'Worked:',sum_wkd,'<br>');
Writeln(f,'Confirmed:',sum_cfm);
Writeln(f,'Confirmed:',sum_cfm,'<br>');
Writeln(f,'<b>Different squares:</b><br>');
if cmbBands.Text<>'ALL' then Writeln(f,'On this band:',thiswkd,'<br>');
Writeln(f,'On all bands:',allwkdBig,'/',allwkd);
Writeln(f,'</font>');
Writeln(f,'</body>');
Writeln(f,'</html>');
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.

View File

@ -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;

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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;

View File

@ -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);

View File

@ -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

File diff suppressed because it is too large Load Diff

View File

@ -120,7 +120,7 @@ object frmContestFilter: TfrmContestFilter
OnKeyUp = FormKeyUp
OnShow = FormShow
Position = poMainFormCenter
LCLVersion = '2.0.8.0'
LCLVersion = '2.2.2.0'
object btnOK: TButton
AnchorSideLeft.Control = btnCancel
AnchorSideLeft.Side = asrBottom
@ -183,14 +183,13 @@ object frmContestFilter: TfrmContestFilter
AnchorSideLeft.Control = gbContName
AnchorSideTop.Control = gbContName
Left = 6
Height = 33
Height = 34
Hint = 'Choose contest from logged QSOs'
Top = 0
Width = 506
AutoComplete = True
AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending]
BorderSpacing.Left = 6
DropDownCount = 3
ItemHeight = 0
MaxLength = 40
ParentShowHint = False

View File

@ -47,7 +47,7 @@ implementation
{$R *.lfm}
{ TfrmContestFilter }
uses dData, dUtils;
uses dData, dUtils, fContest;
procedure TfrmContestFilter.btnOKClick(Sender: TObject);
begin
@ -83,6 +83,8 @@ procedure TfrmContestFilter.FormShow(Sender: TObject);
begin
dmUtils.LoadFontSettings(self);
if frmContest.Showing and (frmContest.cmbContestName.Text<>'') then
cmbContestName.Text:=frmContest.cmbContestName.Text;
end;
procedure TfrmContestFilter.FormKeyUp(Sender: TObject; var Key: Word;

250
src/fCountyStat.lfm Normal file
View File

@ -0,0 +1,250 @@
object frmCountyStat: TfrmCountyStat
Left = 297
Height = 590
Top = 30
Width = 653
Caption = 'County statistic'
ClientHeight = 590
ClientWidth = 653
OnClose = FormClose
OnShow = FormShow
LCLVersion = '2.2.6.0'
object Panel1: TPanel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 80
Top = 0
Width = 653
Align = alTop
BevelOuter = bvNone
ClientHeight = 80
ClientWidth = 653
TabOrder = 0
object cmbBands: TComboBox
AnchorSideLeft.Control = Label1
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Panel1
Left = 55
Height = 33
Top = 9
Width = 164
BorderSpacing.Left = 6
BorderSpacing.Top = 9
ItemHeight = 0
OnChange = cmbBandsChange
Style = csDropDownList
TabOrder = 0
end
object Label1: TLabel
AnchorSideLeft.Control = Panel1
AnchorSideTop.Control = cmbBands
AnchorSideTop.Side = asrCenter
Left = 12
Height = 17
Top = 17
Width = 37
AutoSize = False
BorderSpacing.Left = 12
Caption = 'Band:'
ParentColor = False
end
object GroupBox1: TGroupBox
AnchorSideLeft.Control = cmbBands
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = cmbBands
Left = 231
Height = 42
Top = 9
Width = 244
BorderSpacing.Left = 12
Caption = ' Confirmed '
ClientHeight = 24
ClientWidth = 242
TabOrder = 1
object chkQSL: TCheckBox
AnchorSideLeft.Control = GroupBox1
AnchorSideTop.Control = GroupBox1
AnchorSideTop.Side = asrCenter
Left = 6
Height = 23
Top = 1
Width = 51
BorderSpacing.Left = 6
Caption = 'QSL'
OnChange = cmbBandsChange
TabOrder = 0
end
object chkLoTW: TCheckBox
AnchorSideLeft.Control = GroupBox1
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = GroupBox1
AnchorSideTop.Side = asrCenter
Left = 90
Height = 23
Top = 1
Width = 62
Caption = 'LoTW'
OnChange = cmbBandsChange
TabOrder = 1
end
object chkeQSL: TCheckBox
AnchorSideTop.Control = GroupBox1
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = GroupBox1
AnchorSideRight.Side = asrBottom
Left = 177
Height = 23
Top = 1
Width = 59
Anchors = [akTop, akRight]
BorderSpacing.Right = 6
Caption = 'eQSL'
OnChange = cmbBandsChange
TabOrder = 2
end
end
object pbTot: TProgressBar
AnchorSideLeft.Control = cmbBands
AnchorSideTop.Control = cmbBands
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = cmbBands
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Side = asrBottom
Left = 55
Height = 10
Top = 54
Width = 161
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 12
BorderSpacing.Right = 3
TabOrder = 2
end
object btnRefresh: TButton
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = GroupBox1
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = Panel1
AnchorSideRight.Side = asrBottom
Left = 485
Height = 33
Top = 14
Width = 156
Anchors = [akTop, akRight]
BorderSpacing.Right = 12
Caption = 'Refresh statistic'
OnClick = btnRefreshClick
TabOrder = 3
end
object lblFIlterActive: TLabel
AnchorSideLeft.Control = GroupBox1
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = GroupBox1
AnchorSideTop.Side = asrBottom
Left = 305
Height = 17
Top = 57
Width = 96
BorderSpacing.Top = 6
Caption = 'Filter is active!'
Font.Color = clRed
ParentColor = False
ParentFont = False
Visible = False
end
end
object Panel2: TPanel
AnchorSideLeft.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Owner
Left = 0
Height = 34
Top = 556
Width = 653
Align = alBottom
AutoSize = True
BevelOuter = bvNone
ClientHeight = 34
ClientWidth = 653
TabOrder = 1
object btnClose: TButton
AnchorSideTop.Control = Panel2
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = Panel2
AnchorSideRight.Side = asrBottom
Left = 551
Height = 33
Top = 1
Width = 90
Anchors = [akTop, akRight]
BorderSpacing.Right = 12
Caption = 'Close'
ModalResult = 2
TabOrder = 0
end
object btnSaveTo: TButton
AnchorSideTop.Control = Panel2
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = btnClose
Left = 449
Height = 33
Top = 1
Width = 90
Anchors = [akTop, akRight]
BorderSpacing.Right = 12
Caption = 'Save to ...'
OnClick = btnSaveToClick
TabOrder = 1
end
end
object IpHtmlPanel1: TIpHtmlPanel
AnchorSideLeft.Control = Panel1
AnchorSideTop.Control = Panel1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Panel1
AnchorSideBottom.Control = Panel2
Left = 0
Height = 476
Top = 80
Width = 653
Align = alClient
BorderWidth = 1
BorderStyle = bsSingle
DataProvider = IpFileDataProvider1
FixedTypeface = 'Courier New'
DefaultTypeFace = 'Sans'
DefaultFontSize = 8
FlagErrors = True
PrintSettings.MarginLeft = 0.5
PrintSettings.MarginTop = 0.5
PrintSettings.MarginRight = 0.5
PrintSettings.MarginBottom = 0.5
PrintSettings.Preview.Left = 320
PrintSettings.Preview.Top = 200
PrintSettings.Preview.Width = 960
PrintSettings.Preview.Height = 600
TabOrder = 2
VLinkColor = clBlue
end
object IpFileDataProvider1: TIpFileDataProvider
Left = 160
Top = 512
end
object dlgSave: TSaveDialog
DefaultExt = '.html'
Filter = 'HTML files|*.html'
Left = 64
Top = 512
end
object tmrBlink: TTimer
Enabled = False
OnTimer = tmrBlinkTimer
OnStartTimer = tmrBlinkStartTimer
OnStopTimer = tmrBlinkStopTimer
Left = 248
Top = 512
end
end

324
src/fCountyStat.pas Normal file
View File

@ -0,0 +1,324 @@
unit fCountyStat;
{$mode objfpc}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
ExtCtrls, StdCtrls, Grids, ComCtrls, IpHtml, Ipfilebroker, db, BufDataset,
LazFileUtils,Dateutils;
type
{ TfrmCountyStat }
TfrmCountyStat = class(TForm)
btnClose: TButton;
btnRefresh: TButton;
btnSaveTo: TButton;
chkQSL: TCheckBox;
chkLoTW: TCheckBox;
chkeQSL: TCheckBox;
cmbBands: TComboBox;
GroupBox1: TGroupBox;
IpFileDataProvider1: TIpFileDataProvider;
IpHtmlPanel1: TIpHtmlPanel;
Label1: TLabel;
lblFIlterActive: TLabel;
Panel1: TPanel;
Panel2: TPanel;
dlgSave: TSaveDialog;
pbTot: TProgressBar;
tmrBlink: TTimer;
procedure btnRefreshClick(Sender: TObject);
procedure btnSaveToClick(Sender: TObject);
procedure cmbBandsChange(Sender: TObject);
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure FormShow(Sender: TObject);
procedure tmrBlinkStartTimer(Sender: TObject);
procedure tmrBlinkStopTimer(Sender: TObject);
procedure tmrBlinkTimer(Sender: TObject);
private
TmpFile : String;
f : TextFile;
procedure WriteHMTLHeader;
public
end;
var
frmCountyStat: TfrmCountyStat;
implementation
{$R *.lfm}
{ TfrmCountyStat }
uses dUtils,dData, uMyIni, uVersion;
procedure TfrmCountyStat.FormClose(Sender: TObject;
var CloseAction: TCloseAction);
begin
dmUtils.SaveForm(frmCountyStat);
cqrini.WriteInteger('CountyStat','Band',cmbBands.ItemIndex);
cqrini.WriteBool('CountyStat','QSL',chkQSL.Checked);
cqrini.WriteBool('CountyStat','LoTW',chkLoTW.Checked);
cqrini.WriteBool('CountyStat','eQSL',chkeQSL.Checked);
DeleteFileUTF8(TmpFile);
DeleteFileUTF8(ExtractFileNameWithoutExt(TmpFile)+'.html')
end;
procedure TfrmCountyStat.btnRefreshClick(Sender: TObject);
var
tmp : String = '';
bnd : String = '';
grb : String = '';
allwkd : longint = 0;
thiswkd : longint =0;
TotPos : longint = 0;
wkd : integer = 0;
cfm : integer = 0;
ll : String = '';
sum_wkd : integer = 0;
sum_cfm : integer = 0;
TableName : String;
begin
tmrBlink.Enabled:=False;
TableName:='cqrlog_main';
try
dmData.Q.Close;
dmData.Q1.Close;
if dmData.trQ.Active then dmData.trQ.Rollback;
if dmData.trQ1.Active then dmData.trQ1.Rollback;
if chkQSL.Checked then
begin
tmp := '(qsl_r = '+QuotedStr('Q')+') or';
grb := ',qsl_r';
end;
if chkLoTW.Checked then
begin
tmp := tmp + ' (lotw_qslr = '+QuotedStr('L')+') or';
grb := grb + ',lotw_qslr'
end;
if chkeQSL.Checked then
begin
tmp := tmp + ' (eqsl_qsl_rcvd = '+QuotedStr('E')+') or';
grb := grb + ',eqsl_qsl_rcvd'
end;
tmp := copy(tmp,1,Length(tmp)-2); //remove "or"
if cmbBands.Text='ALL' then
bnd:=' '
else
bnd:= ' and band='+QuotedStr(cmbBands.Text);
dmData.trQ.StartTransaction;
dmData.trQ1.StartTransaction;
try
if dmData.IsFilter then
begin
try
TableName:='statistic_filter';
dmData.Q.Close;
dmData.Q.SQL.Text:='DROP VIEW IF EXISTS '+TableName;
dmData.Q.ExecSQL;
dmData.trQ.Commit;
dmData.Q.Close;
dmData.Q.SQL.Text:='CREATE VIEW '+TableName+' AS '+dmData.IsFilterSQL;
dmData.Q.ExecSQL;
dmData.trQ.Commit;
dmData.Q.Close;
except
on E : EDatabaseError do
Begin
ShowMessage('Can not create filter view!');
Exit;
end;
end;
end;
dmData.Q.SQL.Text := 'select upper(county) as ll FROM '+TableName+' where county <> '+QuotedStr('')+' group by ll';
dmData.Q.Open;
dmData.Q.Last; //this is needed to get proper record count
allwkd:=dmData.Q.RecordCount;
dmData.Q.Close;
dmData.Q.SQL.Text := 'select upper(county) as ll FROM '+TableName+' where county <> '+QuotedStr('')+
bnd+' group by ll';
dmData.Q.Open;
dmData.Q.Last; //this is needed to get proper record count
pbTot.Max:=dmData.Q.RecordCount;
thiswkd:= dmData.Q.RecordCount;
WriteHMTLHeader;
writeln(f,'<table>');
dmData.Q.First;
while not dmData.Q.Eof do
begin
inc(TotPos);
pbTot.Position:=TotPos;
Application.ProcessMessages;
ll := dmData.Q.Fields[0].AsString;
writeln(f,'<tr>'+LineEnding+'<td valign="middle">'+LineEnding+'<font color="black"><b>'+ll+'</b></font>'+LineEnding+'</td>');
writeln(f,'<td align="left">');
writeln(f,'<font color="black">');
dmData.Q1.Close;
dmData.Q1.SQL.Text := 'select count(id_cqrlog_main) FROM '+TableName+' where upper(county)='+
QuotedStr(ll)+bnd;
dmData.Q1.Open;
wkd := dmData.Q1.Fields[0].AsInteger;
sum_wkd := sum_wkd + wkd;
if tmp <> '' then
begin
dmData.Q1.Close;
dmData.Q1.SQL.Text := 'select count(id_cqrlog_main) FROM '+TableName+' where upper(county)='+
QuotedStr(ll)+bnd+
'and ('+tmp+')';
dmData.Q1.Open;
cfm := dmData.Q1.Fields[0].AsInteger;
sum_cfm := sum_cfm + cfm
end;
dmData.Q1.Close;
Writeln(f,'</font>');
Writeln(f,'</td>');
Writeln(f,'<td valign="middle" align="left">');
Writeln(f,'<font color="black">');
Writeln(f,'<b>WKD: ',wkd,'</b><br>');
if tmp<>'' then
Writeln(f,'<font color="black"><b>CFM: ',cfm,'</font></b>');
Writeln(f,'</font>');
Writeln(f,'</td>');
Writeln(f,'</tr>');
dmData.Q.Next;
end;
Writeln(f,'</table>');
Writeln(f,'<hr>');
Writeln(f,'<font color="black">'+LineEnding+'<b>Total:</b><br>');
Writeln(f,'Worked:',sum_wkd,'<br>');
Writeln(f,'Confirmed:',sum_cfm,'<br>');
Writeln(f,'<b>Different counties:</b><br>');
if cmbBands.Text<>'ALL' then Writeln(f,'On this band:',thiswkd,'<br>');
Writeln(f,'On all bands:',allwkd);
Writeln(f,'</font>');
Writeln(f,'</body>');
Writeln(f,'</html>');
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
end;
CopyFile(TmpFile,ExtractFileNameWithoutExt(TmpFile)+'.html');
IpHtmlPanel1.OpenURL(expandLocalHtmlFileName(ExtractFileNameWithoutExt(TmpFile)+'.html'))
finally
end
end;
procedure TfrmCountyStat.btnSaveToClick(Sender: TObject);
begin
if dlgSave.Execute then
begin
cqrini.WriteString('CountyStat','Directory',ExtractFilePath(dlgSave.FileName));
CopyFile(TmpFile,dlgSave.FileName)
end
end;
procedure TfrmCountyStat.cmbBandsChange(Sender: TObject);
begin
tmrBlink.Enabled:=True;
pbTot.Position:=0;
end;
procedure TfrmCountyStat.WriteHMTLHeader;
begin
AssignFile(f,TmpFile);
Rewrite(f);
writeln(f,'<html>');
Writeln(f,'<head>');
writeln(f,'<meta http-equiv="content-type" content="text/html; charset=utf-8">');
writeln(f,'<meta name="generator" content="CQRLOG '+cVERSION+', www.cqrlog.com">');
writeln(f,'<title>County statistic ('+cqrini.ReadString('Station','Call','')+')</title>');
writeln(f,'</head>');
writeln(f,'<body>');
Writeln(f,'<font color="black">');
Writeln(f,'<h1>County statistic</h1><br>');
Writeln(f,'Station:'+cqrini.ReadString('Station','Call','')+'; Band: '+cmbBands.Text);
Writeln(f,'</font>');
Writeln(f,'<br>')
end;
procedure TfrmCountyStat.FormShow(Sender: TObject);
begin
TmpFile := GetTempFileNameUTF8(dmData.HomeDir,'county');
dmUtils.LoadForm(frmCountyStat);
dmUtils.FillBandCombo(cmbBands);
cmbBands.Items.Insert(0,'ALL');
if cqrini.ReadInteger('CountyStat','Band',0) > cmbBands.Items.Count-1 then
cmbBands.ItemIndex := 0
else
cmbBands.ItemIndex := cqrini.ReadInteger('CountyStat','Band',0);
chkQSL.Checked := cqrini.ReadBool('CountyStat','QSL',False);
chkLoTW.Checked := cqrini.ReadBool('CountyStat','LoTW',False);
chkeQSL.Checked := cqrini.ReadBool('CountyStat','eQSL',False);
dlgSave.InitialDir := cqrini.ReadString('CountyStat','Directory',dmData.UsrHomeDir);
IpHtmlPanel1.Font.Color := clBlack;
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 TfrmCountyStat.tmrBlinkStartTimer(Sender: TObject);
begin
btnRefresh.Caption:='Press to';
btnRefresh.Font.Color:=clGreen;
btnRefresh.Repaint;
end;
procedure TfrmCountyStat.tmrBlinkStopTimer(Sender: TObject);
begin
btnRefresh.Caption:='Refresh statistic';
btnRefresh.Font.Color:=clDefault;
btnRefresh.Repaint;
end;
procedure TfrmCountyStat.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.

View File

@ -317,6 +317,10 @@ begin
end;
procedure TfrmDBConnect.btnNewLogClick(Sender: TObject);
var
db :string;
cnr,nr :integer;
l :TStringList;
begin
frmNewLog := TfrmNewLog.Create(nil);
try
@ -324,15 +328,45 @@ begin
frmNewLog.ShowModal;
if frmNewLog.ModalResult = mrOK then
begin
//if dmData.LogName <> '' then
// dmData.CloseDatabases;
dmData.CreateDatabase(StrToInt(frmNewLog.edtLogNR.Text),
frmNewLog.edtLogName.Text);
UpdateGridFields
end
dmData.CreateDatabase(StrToInt(frmNewLog.edtLogNR.Text),frmNewLog.edtLogName.Text);
UpdateGridFields;
if frmNewLog.edtLogCpyNR.Text<>'' then
Begin
cnr:=StrToInt(frmNewLog.edtLogCpyNR.Text); //this nr log exists and strtoint works: tested in "newlog"
db := dmData.GetProperDBName(cnr);
if dmData.DBName<>'' then
dmData.SaveConfigFile;
dmData.Q.Close;
if dmData.trQ.Active then dmData.trQ.Rollback;
dmData.Q.SQL.Text := 'select config_file from '+db+'.cqrlog_config';
dmData.trQ.StartTransaction;
l := TStringList.Create;
try try
dmData.Q.Open;
l.Text := dmData.Q.Fields[0].AsString;
nr:=StrToInt(frmNewLog.edtLogNR.Text); //this nr log just created strtoint works: tested in "newlog"
db := dmData.GetProperDBName(nr);
dmData.Q.Close;
if dmData.trQ.Active then dmData.trQ.Rollback;
dmData.Q.SQL.Text := 'update '+db+'.cqrlog_config set config_file =:config_file';
dmData.trQ.StartTransaction;
dmData.Q.Params[0].AsString := l.Text;
dmData.Q.ExecSQL
except
dmData.trQ.Rollback
end;
dmData.trQ.Commit;
ShowMessage('Config copied successfully')
finally
dmData.Q.Close;
l.Free
end;
end;
end;
finally
frmNewLog.Free
end
end;
end;
procedure TfrmDBConnect.btnOpenLogClick(Sender: TObject);
@ -456,6 +490,7 @@ procedure TfrmDBConnect.mnuExportClick(Sender: TObject);
var
db : String;
l : TStringList;
n : String;
begin
if dlgSave.Execute then
begin
@ -470,8 +505,11 @@ begin
try
dmData.Q.Open;
l.Text := dmData.Q.Fields[0].AsString;
l.SaveToFile(dlgSave.FileName);
ShowMessage('Config file saved to '+dlgSave.FileName
n:= dlgSave.FileName;
if pos('.INI',UpperCase(n))=0 then
n:=n+'.ini';
l.SaveToFile(n);
ShowMessage('Config file saved to '+n
+#10+#13+#10+#13+'Warning !'+#10+#13+'File may contain passwords'+#10+#13+'in plain text format')
finally
dmData.Q.Close;
@ -487,28 +525,33 @@ var
l : TStringList;
begin
if dlgOpen.Execute then
begin
db := dmData.GetProperDBName(dmData.qLogList.Fields[0].AsInteger);
dmData.Q.Close;
if dmData.trQ.Active then dmData.trQ.Rollback;
dmData.Q.SQL.Text := 'update '+db+'.cqrlog_config set config_file =:config_file';
dmData.trQ.StartTransaction;
l := TStringList.Create;
try try
l.LoadFromFile(dlgOpen.FileName);
dmData.Q.Params[0].AsString := l.Text;
if dmData.DebugLevel >=1 then Writeln(dmData.Q.SQL.Text);
dmData.Q.ExecSQL
except
dmData.trQ.Rollback
end;
dmData.trQ.Commit;
ShowMessage('Config file imported successfully')
finally
dmData.Q.Close;
l.Free
end
end
begin
if FileExists(dlgOpen.FileName) then //with QT5 opendialog user can enter filename that may not exist
begin
db := dmData.GetProperDBName(dmData.qLogList.Fields[0].AsInteger);
dmData.Q.Close;
if dmData.trQ.Active then dmData.trQ.Rollback;
dmData.Q.SQL.Text := 'update '+db+'.cqrlog_config set config_file =:config_file';
dmData.trQ.StartTransaction;
l := TStringList.Create;
try try
l.LoadFromFile(dlgOpen.FileName);
dmData.Q.Params[0].AsString := l.Text;
if dmData.DebugLevel >=1 then Writeln(dmData.Q.SQL.Text);
dmData.Q.ExecSQL
except
dmData.trQ.Rollback
end;
dmData.trQ.Commit;
ShowMessage('Config file imported successfully')
finally
dmData.Q.Close;
l.Free
end
end
else
ShowMessage('File not found!');
end
end;
procedure TfrmDBConnect.mnuRepairClick(Sender : TObject);

View File

@ -1,13 +1,13 @@
object frmDXCluster: TfrmDXCluster
Left = 129
Height = 424
Height = 425
Top = 116
Width = 709
HelpType = htKeyword
HelpKeyword = 'help/h21.html#ah19'
ActiveControl = pgDXCluster
Caption = 'DXCluster'
ClientHeight = 424
ClientHeight = 425
ClientWidth = 709
Icon.Data = {
BE0C00000000010001002020000001001800A80C000016000000280000002000
@ -121,10 +121,10 @@ object frmDXCluster: TfrmDXCluster
OnDestroy = FormDestroy
OnKeyUp = FormKeyUp
OnShow = FormShow
LCLVersion = '1.6.4.0'
LCLVersion = '2.2.6.0'
object pgDXCluster: TPageControl
Left = 0
Height = 424
Height = 425
Top = 0
Width = 709
ActivePage = tabTelnet
@ -133,12 +133,12 @@ object frmDXCluster: TfrmDXCluster
TabOrder = 0
object tabWeb: TTabSheet
Caption = 'Web'
ClientHeight = 395
ClientHeight = 394
ClientWidth = 699
object Panel4: TPanel
Left = 0
Height = 36
Top = 380
Top = 358
Width = 699
Align = alBottom
ClientHeight = 36
@ -197,14 +197,13 @@ object frmDXCluster: TfrmDXCluster
end
object pnlWeb: TPanel
Left = 0
Height = 380
Height = 358
Top = 0
Width = 699
Align = alClient
Alignment = taLeftJustify
BevelInner = bvLowered
BevelOuter = bvLowered
Color = clDefault
Font.CharSet = ANSI_CHARSET
Font.Height = 12
Font.Name = 'DejaVu Sans Mono 12'
@ -215,12 +214,12 @@ object frmDXCluster: TfrmDXCluster
end
object tabTelnet: TTabSheet
Caption = 'Telnet'
ClientHeight = 395
ClientHeight = 394
ClientWidth = 699
object Panel1: TPanel
Left = 0
Height = 34
Top = 361
Top = 360
Width = 699
Align = alBottom
BevelOuter = bvNone
@ -229,7 +228,7 @@ object frmDXCluster: TfrmDXCluster
TabOrder = 0
object Label1: TLabel
Left = 6
Height = 15
Height = 17
Top = 11
Width = 71
Caption = 'Command:'
@ -239,7 +238,7 @@ object frmDXCluster: TfrmDXCluster
AnchorSideLeft.Control = Label1
AnchorSideLeft.Side = asrBottom
Left = 79
Height = 32
Height = 34
Top = 3
Width = 266
BorderSpacing.Left = 2
@ -299,7 +298,7 @@ object frmDXCluster: TfrmDXCluster
TabOrder = 1
object edtTelAddress: TEdit
Left = 8
Height = 32
Height = 34
Top = 1
Width = 189
TabOrder = 0
@ -336,14 +335,13 @@ object frmDXCluster: TfrmDXCluster
end
object pnlTelnet: TPanel
Left = 0
Height = 331
Height = 330
Top = 30
Width = 699
Align = alClient
BevelOuter = bvNone
ClientHeight = 331
ClientHeight = 330
ClientWidth = 699
Color = clDefault
ParentColor = False
TabOrder = 2
object pnlChat: TPanel
@ -353,36 +351,286 @@ object frmDXCluster: TfrmDXCluster
Width = 699
Align = alTop
BevelOuter = bvNone
Color = clDefault
ParentColor = False
TabOrder = 0
end
end
end
object tabFkeys: TTabSheet
Caption = 'F-keys'
ClientHeight = 394
ClientWidth = 699
OnShow = tabFkeysShow
object lblF1: TLabel
AnchorSideLeft.Control = tabFkeys
AnchorSideTop.Control = edtF1
AnchorSideTop.Side = asrCenter
Left = 12
Height = 17
Top = 32
Width = 24
BorderSpacing.Left = 12
BorderSpacing.Top = 12
Caption = 'F1 :'
ParentColor = False
end
object lblF2: TLabel
AnchorSideLeft.Control = lblF1
AnchorSideTop.Control = edtF2
AnchorSideTop.Side = asrCenter
Left = 12
Height = 17
Top = 66
Width = 24
BorderSpacing.Top = 6
Caption = 'F2 :'
ParentColor = False
end
object lblF3: TLabel
AnchorSideLeft.Control = lblF1
AnchorSideTop.Control = edtF3
AnchorSideTop.Side = asrCenter
Left = 12
Height = 17
Top = 100
Width = 24
BorderSpacing.Top = 6
Caption = 'F3 :'
ParentColor = False
end
object lblF4: TLabel
AnchorSideLeft.Control = lblF1
AnchorSideTop.Control = edtF4
AnchorSideTop.Side = asrCenter
Left = 12
Height = 17
Top = 134
Width = 24
BorderSpacing.Top = 6
Caption = 'F4 :'
ParentColor = False
end
object lblF5: TLabel
AnchorSideLeft.Control = lblF1
AnchorSideTop.Control = edtF5
AnchorSideTop.Side = asrCenter
Left = 12
Height = 17
Top = 168
Width = 24
BorderSpacing.Top = 6
Caption = 'F5 :'
ParentColor = False
end
object lblF6: TLabel
AnchorSideLeft.Control = lblF1
AnchorSideTop.Control = edtF6
AnchorSideTop.Side = asrCenter
Left = 12
Height = 17
Top = 202
Width = 24
BorderSpacing.Top = 6
Caption = 'F6 :'
ParentColor = False
end
object lblF7: TLabel
AnchorSideLeft.Control = lblF1
AnchorSideTop.Control = edtF7
AnchorSideTop.Side = asrCenter
Left = 12
Height = 17
Top = 236
Width = 24
BorderSpacing.Top = 6
Caption = 'F7 :'
ParentColor = False
end
object lblF8: TLabel
AnchorSideLeft.Control = lblF1
AnchorSideTop.Control = edtF8
AnchorSideTop.Side = asrCenter
Left = 12
Height = 17
Top = 270
Width = 24
BorderSpacing.Top = 6
Caption = 'F8 :'
ParentColor = False
end
object lblF9: TLabel
AnchorSideLeft.Control = lblF1
AnchorSideTop.Control = edtF9
AnchorSideTop.Side = asrCenter
Left = 12
Height = 17
Top = 304
Width = 24
BorderSpacing.Top = 6
Caption = 'F9 :'
ParentColor = False
end
object lblF10: TLabel
AnchorSideLeft.Control = lblF1
AnchorSideTop.Control = edtF10
AnchorSideTop.Side = asrCenter
Left = 12
Height = 17
Top = 338
Width = 32
BorderSpacing.Top = 6
Caption = 'F10 :'
ParentColor = False
end
object edtF1: TEdit
AnchorSideLeft.Control = lblF1
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = lblShift
AnchorSideTop.Side = asrBottom
Left = 48
Height = 34
Top = 23
Width = 500
BorderSpacing.Left = 12
BorderSpacing.Top = 3
OnExit = edtFExit
TabOrder = 0
end
object edtF2: TEdit
AnchorSideLeft.Control = edtF1
AnchorSideTop.Control = edtF1
AnchorSideTop.Side = asrBottom
Left = 48
Height = 34
Top = 57
Width = 500
OnExit = edtFExit
TabOrder = 1
end
object edtF3: TEdit
AnchorSideLeft.Control = edtF1
AnchorSideTop.Control = edtF2
AnchorSideTop.Side = asrBottom
Left = 48
Height = 34
Top = 91
Width = 500
OnExit = edtFExit
TabOrder = 2
end
object edtF4: TEdit
AnchorSideLeft.Control = edtF1
AnchorSideTop.Control = edtF3
AnchorSideTop.Side = asrBottom
Left = 48
Height = 34
Top = 125
Width = 500
OnExit = edtFExit
TabOrder = 3
end
object edtF5: TEdit
AnchorSideLeft.Control = edtF1
AnchorSideTop.Control = edtF4
AnchorSideTop.Side = asrBottom
Left = 48
Height = 34
Top = 159
Width = 500
OnExit = edtFExit
TabOrder = 4
end
object edtF6: TEdit
AnchorSideLeft.Control = edtF1
AnchorSideTop.Control = edtF5
AnchorSideTop.Side = asrBottom
Left = 48
Height = 34
Top = 193
Width = 500
OnExit = edtFExit
TabOrder = 5
end
object edtF7: TEdit
AnchorSideLeft.Control = edtF1
AnchorSideTop.Control = edtF6
AnchorSideTop.Side = asrBottom
Left = 48
Height = 34
Top = 227
Width = 500
OnExit = edtFExit
TabOrder = 6
end
object edtF8: TEdit
AnchorSideLeft.Control = edtF1
AnchorSideTop.Control = edtF7
AnchorSideTop.Side = asrBottom
Left = 48
Height = 34
Top = 261
Width = 500
OnExit = edtFExit
TabOrder = 7
end
object edtF9: TEdit
AnchorSideLeft.Control = edtF1
AnchorSideTop.Control = edtF8
AnchorSideTop.Side = asrBottom
Left = 48
Height = 34
Top = 295
Width = 500
OnExit = edtFExit
TabOrder = 8
end
object edtF10: TEdit
AnchorSideLeft.Control = edtF1
AnchorSideTop.Control = edtF9
AnchorSideTop.Side = asrBottom
Left = 48
Height = 34
Top = 329
Width = 500
TabOrder = 9
end
object lblShift: TLabel
AnchorSideLeft.Control = tabFkeys
AnchorSideTop.Control = tabFkeys
Left = 3
Height = 17
Top = 3
Width = 41
BorderSpacing.Left = 3
BorderSpacing.Top = 3
Caption = 'Shift+'
ParentColor = False
end
end
end
object tmrSpots: TTimer
Enabled = False
Interval = 20000
OnTimer = tmrSpotsTimer
left = 88
top = 122
Left = 440
Top = 368
end
object dlgDXfnt: TFontDialog
MinFontSize = 0
MaxFontSize = 0
left = 136
top = 122
Left = 488
Top = 368
end
object tmrAutoConnect: TTimer
Enabled = False
Interval = 3000
OnTimer = tmrAutoConnectTimer
left = 246
top = 68
Left = 536
Top = 368
end
object popPreferences: TPopupMenu
left = 385
top = 112
Left = 592
Top = 368
object mnuCallalert: TMenuItem
Caption = 'Callsign alert enabled'
Checked = True
@ -428,8 +676,8 @@ object frmDXCluster: TfrmDXCluster
end
end
object acPreferences: TActionList
left = 393
top = 185
Left = 640
Top = 368
object acFont: TAction
Caption = 'Font'
OnExecute = acFontExecute

View File

@ -18,7 +18,7 @@ interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, inifiles,
ExtCtrls, ComCtrls, StdCtrls, Buttons, httpsend, uColorMemo,
db, lcltype, Menus, ActnList, Spin, dynlibs, lNetComponents, lnet;
db, lcltype, Menus, ActnList, Spin, Grids, dynlibs, lNetComponents, lnet;
type
{ TfrmDXCluster }
@ -40,8 +40,29 @@ type
btnPreferences : TButton;
dlgDXfnt: TFontDialog;
edtCommand: TEdit;
edtF1: TEdit;
edtF10: TEdit;
edtF2: TEdit;
edtF3: TEdit;
edtF4: TEdit;
edtF5: TEdit;
edtF6: TEdit;
edtF7: TEdit;
edtF8: TEdit;
edtF9: TEdit;
edtTelAddress: TEdit;
Label1: TLabel;
lblShift: TLabel;
lblF1: TLabel;
lblF10: TLabel;
lblF2: TLabel;
lblF3: TLabel;
lblF4: TLabel;
lblF5: TLabel;
lblF6: TLabel;
lblF7: TLabel;
lblF8: TLabel;
lblF9: TLabel;
lblInfo: TLabel;
MenuItem1 : TMenuItem;
mnuSkimQSLCheck: TMenuItem;
@ -62,6 +83,7 @@ type
pnlTelnet: TPanel;
pnlWeb: TPanel;
popPreferences : TPopupMenu;
tabFkeys: TTabSheet;
tabTelnet: TTabSheet;
tabWeb: TTabSheet;
tmrAutoConnect: TTimer;
@ -73,6 +95,8 @@ type
procedure acProgPrefExecute(Sender : TObject);
procedure Button2Click(Sender: TObject);
procedure btnPreferencesClick(Sender : TObject);
procedure edtF2Exit(Sender: TObject);
procedure edtFExit(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure btnHelpClick(Sender: TObject);
@ -88,7 +112,8 @@ type
procedure mnuCallalertClick(Sender : TObject);
procedure mnuSkimAllowFreqClick(Sender: TObject);
procedure mnuSkimQSLCheckClick(Sender: TObject);
procedure tmrAutoConnectTimer(Sender: TObject);
procedure tabFkeysShow(Sender: TObject);
procedure tmrAutoConnectTimer(Sender: TObject);
procedure tmrSpotsTimer(Sender: TObject);
procedure trChatSizeChange(Sender: TObject);
procedure trChatSizeClick(Sender: TObject);
@ -124,6 +149,7 @@ type
gcfgNotShow : String;
gcfgCW : Boolean;
gcfgSSB : Boolean;
gcfgDATA: Boolean;
gcfgEU : Boolean;
gcfgAS : Boolean;
gcfgAF : Boolean;
@ -143,6 +169,7 @@ type
procedure WebDbClick(where:longint;mb:TmouseButton;ms:TShiftState);
procedure TelDbClick(where:longint;mb:TmouseButton;ms:TShiftState);
procedure SpotDbClick(Spot:String);
procedure ConnectToWeb;
procedure ConnectToTelnet;
procedure SynWeb;
@ -154,11 +181,11 @@ type
procedure ChangeCallAlertCaption;
function ShowSpot(spot : String; var sColor : Integer; var Country : String; FromTelnet : Boolean = True) : Boolean;
function GetFreq(spot : String) : String;
function GetCall(spot : String; web : Boolean = False) : String;
function GetSplit(spot : String) :String;
function GetSplit(info : String) :String;
procedure StoreLastCmd(LastCmd:string);
function GetHistCmd:string;
function FontStylesToString(Styles: TFontStyles): string;
function StringToFontStyles(const Styles: string): TFontStyles;
public
ConWeb : Boolean;
ConTelnet : Boolean;
@ -326,7 +353,7 @@ begin
end;
end;
procedure TfrmDXCluster.Button2Click(Sender: TObject);
procedure TfrmDXCluster.Button2Click(Sender: TObject); //this is debugger
var
TelThread : TTelThread = nil;
begin
@ -363,6 +390,25 @@ begin
popPreferences.PopUp(p.x, p.y)
end;
procedure TfrmDXCluster.edtF2Exit(Sender: TObject);
begin
end;
procedure TfrmDXCluster.edtFExit(Sender: TObject);
begin
cqrini.WriteString('DXCluster','F1key',edtF1.Text);
cqrini.WriteString('DXCluster','F2key',edtF2.Text);
cqrini.WriteString('DXCluster','F3key',edtF3.Text);
cqrini.WriteString('DXCluster','F4key',edtF4.Text);
cqrini.WriteString('DXCluster','F5key',edtF5.Text);
cqrini.WriteString('DXCluster','F6key',edtF6.Text);
cqrini.WriteString('DXCluster','F7key',edtF7.Text);
cqrini.WriteString('DXCluster','F8key',edtF8.Text);
cqrini.WriteString('DXCluster','F9key',edtF9.Text);
cqrini.WriteString('DXCluster','F10key',edtF10.Text);
end;
procedure TfrmDXCluster.acProgPrefExecute(Sender : TObject);
begin
cqrini.WriteInteger('Pref', 'ActPageIdx', 10); //set DXCuster tab active. Number may change if preferences page change
@ -372,16 +418,43 @@ end;
procedure TfrmDXCluster.acFontExecute(Sender : TObject);
begin
dlgDXfnt.Font.Name := cqrini.ReadString('DXCluster','Font','DejaVu Sans Mono');
dlgDXfnt.Font.Style := StringToFontStyles(cqrini.ReadString('DXCluster','FontStyle',''));
dlgDXfnt.Font.Size := cqrini.ReadInteger('DXCluster','FontSize',12);
if dlgDXfnt.Execute then
begin
cqrini.WriteString('DXCluster','Font',dlgDXfnt.Font.Name);
cqrini.WriteInteger('DXCluster','FontSize',dlgDXfnt.Font.Size);
cqrini.WriteString('DXCluster','FontStyle',FontStylesToString(dlgDXfnt.Font.Style));
WebSpots.SetFont(dlgDXfnt.Font);
TelSpots.SetFont(dlgDXfnt.Font);
ChatSpots.SetFont(dlgDXfnt.Font)
end
end;
function TfrmDXCluster.FontStylesToString(Styles: TFontStyles): string;
begin
Result := '';
if fsBold in Styles then
Result := Result + 'B';
if fsItalic in Styles then
Result := Result + 'I';
if fsUnderline in Styles then
Result := Result + 'U';
if fsStrikeOut in Styles then
Result := Result + 'S';
end;
function TfrmDXCluster.StringToFontStyles(const Styles: string): TFontStyles;
begin
Result := [];
if Pos('B', UpperCase(Styles)) > 0 then
Include(Result, fsBold);
if Pos('I', UpperCase(Styles)) > 0 then
Include(Result, fsItalic);
if Pos('U', UpperCase(Styles)) > 0 then
Include(Result, fsUnderline);
if Pos('S', UpperCase(Styles)) > 0 then
Include(Result, fsStrikeOut);
end;
procedure TfrmDXCluster.acCallAlertExecute(Sender : TObject);
begin
@ -408,6 +481,7 @@ begin
FirstWebGet := True;
lTelnet := TLTelnetClientComponent.Create(nil);
ReloadDXCPref := True;
tabFkeys.TabVisible:=false;
lTelnet.OnConnect := @lConnect;
lTelnet.OnDisconnect := @lDisconnect;
@ -460,70 +534,85 @@ end;
procedure TfrmDXCluster.FormKeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if (key= VK_ESCAPE) then
begin
frmNewQSO.ReturnToNewQSO;
key := 0
end
if key = VK_ESCAPE then
begin
frmNewQSO.ReturnToNewQSO;
key := 0
end;
if (Key >= VK_F1) and (Key <= VK_F10) and (ConTelnet = True) and (Shift = [ssShift]) then
begin
case key of
VK_F1 :Begin
if edtF1.Text<>'' then SendCommand(edtF1.Text);
key := 0
end;
VK_F2 :Begin
if edtF2.Text<>'' then SendCommand(edtF2.Text);
key := 0
end;
VK_F3 :Begin
if edtF3.Text<>'' then SendCommand(edtF3.Text);
key := 0
end;
VK_F4 :Begin
if edtF4.Text<>'' then SendCommand(edtF4.Text);
key := 0
end;
VK_F5 :Begin
if edtF5.Text<>'' then SendCommand(edtF5.Text);
key := 0
end;
VK_F6 :Begin
if edtF6.Text<>'' then SendCommand(edtF6.Text);
key := 0
end;
VK_F7 :Begin
if edtF7.Text<>'' then SendCommand(edtF7.Text);
key := 0
end;
VK_F8 :Begin
if edtF8.Text<>'' then SendCommand(edtF8.Text);
key := 0
end;
VK_F9 :Begin
if edtF9.Text<>'' then SendCommand(edtF9.Text);
key := 0
end;
VK_F10 :Begin
if edtF10.Text<>'' then SendCommand(edtF10.Text);
key := 0
end;
end;
end;
end;
procedure TfrmDXCluster.WebDbClick(where:longint;mb:TmouseButton;ms:TShiftState);
var
spot : String = '';
tmp : Integer = 0;
freq : String = '';
mode : String = '';
call : String = '';
etmp : Extended = 0;
stmp : String = '';
i : Integer = 0;
begin
WebSpots.ReadLine(spot,tmp,tmp,tmp,where);
spot := copy(spot,i+6,Length(spot)-i-5);
spot := Trim(spot);
freq := GetFreq(spot);
call := GetCall(spot,True);
{
Writeln('WebDbClick*****');
Writeln('Spot:',spot);
Writeln('Freq:',freq);
Writeln('Call:',call);
Writeln('***************');
}
if NOT TryStrToFloat(freq,etmp) then
exit;
if (not dmData.BandModFromFreq(freq,mode,stmp)) or (mode='') then
exit;
frmNewQSO.NewQSOFromSpot(call,freq,mode)
SpotDbClick(spot);
end;
procedure TfrmDXCluster.TelDbClick(where:longint;mb:TmouseButton;ms:TShiftState);
var
spot : String = '';
tmp : Integer = 0;
begin
TelSpots.ReadLine(spot,tmp,tmp,tmp,where);
SpotDbClick(spot);
end;
procedure TfrmDXCluster.SpotDbClick(Spot:String);
var
freq : String = '';
mode : String = '';
call : String = '';
info : String = '';
etmp : Extended = 0;
stmp : String = '';
i : Integer = 0;
f : Currency;
begin
TelSpots.ReadLine(spot,tmp,tmp,tmp,where);
if TryStrToCurr(copy(spot,1,Pos(' ',spot)-1),f) then
begin
freq := copy(spot,1,Pos(' ',spot)-1);
call := trim(copy(spot,Pos('.',spot)+2,14))
end
else begin
spot := copy(spot,i+6,Length(spot)-i-5);
spot := Trim(spot);
freq := GetFreq(Spot);
call := GetCall(Spot, ConWeb)
end;
{
Writeln('TelDbClick*****');
Begin
dmDXCluster.GetSplitSpot(spot,call,freq,info);
{
Writeln('Spot:',spot);
Writeln('Freq:',freq);
Writeln('Call:',call);
@ -537,7 +626,6 @@ begin
frmNewQSO.NewQSOFromSpot(call,freq,mode)
end;
procedure TfrmDXCluster.FormShow(Sender: TObject);
var
f : TFont;
@ -546,6 +634,7 @@ begin
try
f.Name := cqrini.ReadString('DXCluster','Font','DejaVu Sans Mono');
f.Size := cqrini.ReadInteger('DXCluster','FontSize',12);
f.Style := StringToFontStyles(cqrini.ReadString('DXCluster','FontStyle',''));
WebSpots.SetFont(f);
TelSpots.SetFont(f) ;
ChatSpots.SetFont(f)
@ -572,6 +661,8 @@ begin
if cqrini.ReadBool('DXCluster', 'ConAfterRun', False) then
tmrAutoConnect.Enabled := True;
pnlChat.Height := cqrini.ReadInteger('DXCluster','ChatSize',2); //default now 2 = invisible
tabFkeysShow(nil);
end;
procedure TfrmDXCluster.btnClearClick(Sender: TObject);
@ -612,12 +703,15 @@ begin
begin
StopAllConnections;
btnTelConnect.Caption := 'Connect';
tabFkeys.TabVisible:=false;
ConWeb := False;
end
else begin
ConnectToTelnet;
btnTelConnect.Caption := 'Disconnect';
ConTelnet := True;
tabFkeys.TabVisible:=True;
pgDXCluster.ActivePage:=tabTelnet;
if (Sender <> nil) then
edtCommand.SetFocus
end
@ -689,6 +783,20 @@ begin
cqrini.WriteBool('Skimmer', 'QSLEnable', mnuSkimQSLCheck.Checked);
end;
procedure TfrmDXCluster.tabFkeysShow(Sender: TObject);
begin
edtF1.Text:=cqrini.ReadString('DXCluster', 'F1key', '');
edtF2.Text:=cqrini.ReadString('DXCluster', 'F2key', '');
edtF3.Text:=cqrini.ReadString('DXCluster', 'F3key', '');
edtF4.Text:=cqrini.ReadString('DXCluster', 'F4key', '');
edtF5.Text:=cqrini.ReadString('DXCluster', 'F5key', '');
edtF6.Text:=cqrini.ReadString('DXCluster', 'F6key', '');
edtF7.Text:=cqrini.ReadString('DXCluster', 'F7key', '');
edtF8.Text:=cqrini.ReadString('DXCluster', 'F8key', '');
edtF9.Text:=cqrini.ReadString('DXCluster', 'F9key', '');
edtF10.Text:=cqrini.ReadString('DXCluster', 'F10key', '');
end;
procedure TfrmDXCluster.tmrAutoConnectTimer(Sender: TObject);
begin
tmrAutoConnect.Enabled := False;
@ -707,13 +815,13 @@ end;
procedure TfrmDXCluster.lConnect(aSocket: TLSocket);
begin
btnTelConnect.Caption := 'Disconnect';
ConTelnet := True
ConTelnet := True;
end;
procedure TfrmDXCluster.lDisconnect(aSocket: TLSocket);
begin
btnTelConnect.Caption := 'Connect';
ConTelnet := False
ConTelnet := False;
end;
procedure TfrmDXCluster.lReceive(aSocket: TLSocket);
@ -804,7 +912,21 @@ begin
end;
end;
itmp := Pos('DX DE',UpperCase(tmp));
if (itmp > 0) or TryStrToFloat(copy(tmp,1,Pos(' ',tmp)-1),f) then
if (itmp > 0) or (TryStrToFloat(copy(tmp,1,Pos(' ',tmp)-1),f) and (UpperCase(tmp[1])<>'E')) then
{
Chk of tmp[1]<>'E' needed:
sh/he E6
E6 Niue-E6: 16 degs - dist: 9440 mi, 15192 km Reciprocal heading: 352 degs
OH1KH de OH1RCF 1-Apr-2023 1000Z dxspider >
E[number] at beginning of line passes tryStrToFLoat as scientific number expression
and we want to catch only numbers of frequencies in 12345.6 format.
They appear if "sh/dx" command is issued
sh/dx 1
28074.0 JA6GXP 1-Apr-2023 1033Z FT8 -22dB from PM52 814Hz <F4UJU>
OH1KH de OH1RCF 1-Apr-2023 1033Z dxspider >
}
begin
EnterCriticalsection(frmDXCluster.csTelnet);
if dmData.DebugLevel>=1 then Writeln('Enter critical section On Receive');
@ -910,41 +1032,33 @@ begin
if dmData.DebugLevel >=1 then Writeln('Chat sizing Click');
end;
function TfrmDXCluster.GetFreq(spot : String) : String;
function TfrmDXCluster.GetSplit(info : String) : String;
var
tmp : String;
begin
tmp := copy(spot,Pos(' ',spot),Pos('.',spot)+2 - Pos(' ',spot));
Result := trim(tmp)
end;
function TfrmDXCluster.GetSplit(spot : String) : String;
var
tmp : String;
spl : String;
spn : String;
l : Integer;
begin
tmp := copy(spot,34,Length(spot)-34);
//Writeln('tmp: ',tmp);
if Pos('UP',tmp)>0 then begin
spl:= copy(tmp,Pos('UP',tmp),13);
if Pos('UP',info)>0 then
begin
spl:= copy(info,Pos('UP',info),13);
spn:='UP';
for l:=3 to Length(spl) do
if Pos(spl[l],' 0123456789.,-+')>0 then
spn:=spn+spl[l]
else break;
end;
if Pos('DOWN',tmp)>0 then begin
spl:= copy(tmp,Pos('DOWN',tmp),13);
if Pos('DOWN',info)>0 then
begin
spl:= copy(info,Pos('DOWN',info),13);
spn:='DOWN';
for l:=5 to Length(spl) do
if Pos(spl[l],' 0123456789.,-+')>0 then
spn:=spn+spl[l]
else break;
end;
if Pos('QSX',tmp)>0 then begin
spl:= copy(tmp,Pos('QSX',tmp),13);
if Pos('QSX',info)>0 then
begin
spl:= copy(info,Pos('QSX',info),13);
spn:='QSX';
for l:=4 to Length(spl) do
if Pos(spl[l],' 0123456789.,-+')>0 then
@ -954,29 +1068,6 @@ begin
Result := trim(spn)
end;
function TfrmDXCluster.GetCall(spot : String; web : Boolean = False) : String;
var
tmp : String='';
begin
if web then
begin
//Writeln('spot:',spot);
tmp := trim(copy(spot,Pos(' ',spot)+1, Length(spot) -(Pos(' ',spot))));
//Writeln('tmp: ',tmp);
tmp := copy(tmp,Pos(' ',tmp)+1, Length(tmp) -(Pos(' ',tmp)));
//Writeln('tmp: ',tmp);
if Pos(' ',tmp) > 0 then
tmp := trim(copy(tmp,1,Pos(' ',tmp)));
//Writeln('tmp: ',tmp);
end
else begin
tmp := copy(spot,Pos('.',spot)+3,Length(spot)-Pos('.',spot)-1);
tmp := trim(tmp);
tmp := trim(copy(tmp,1,Pos(' ',tmp)))
end;
Result := tmp
end;
procedure TfrmDXCluster.StopAllConnections;
begin
if ConWeb then
@ -995,10 +1086,10 @@ var
kmitocet : Extended = 0.0;
call : String = '';
freq : String = '';
info : String = '';
tmp : Integer = 0;
band : String = '';
mode : String = '';
freeText : String = '';
seznam : TStringList;
i : Integer = 0;
prefix : String = '';
@ -1043,6 +1134,7 @@ var
cfgCW : Boolean;
cfgSSB : Boolean;
cfgDATA: Boolean;
cfgEU : Boolean;
cfgAS : Boolean;
cfgAF : Boolean;
@ -1067,6 +1159,7 @@ begin
iITU := giITU;
cfgCW := gcfgCW;
cfgSSB := gcfgSSB;
cfgDATA:= gcfgDATA;
cfgEU := gcfgEU;
cfgAS := gcfgAS;
cfgNA := gcfgNA;
@ -1089,26 +1182,9 @@ begin
finally
LeaveCriticalSection(csDXCPref)
end;
spot := UpperCase(spot);
i := Pos('DX DE ',spot);
if i > 0 then
spot := copy(spot,i+6,Length(spot)-i-5);
if TryStrToCurr(copy(spot,1,Pos(' ',spot)-1),f) then
begin
freq := copy(spot,1,Pos(' ',spot)-1);
call := trim(copy(spot,Pos('.',spot)+2,14))
end
else begin
freq := GetFreq(Spot);
call := GetCall(Spot, ConWeb)
end;
splitstr := GetSplit(Spot);
dmDXCluster.GetSplitSpot(Spot,call,freq,info);
splitstr := GetSplit(info);
kHz := Freq;
tmp := Pos('.',freq);
if tmp > 0 then
freq[tmp] := FormatSettings.DecimalSeparator;
@ -1180,7 +1256,7 @@ begin
begin
Result := false;
if dmData.DebugLevel >=1 then
Writeln('Cannot show this sport because of settings ...');
Writeln('Cannot show this spot because of Show only spots (band) settings ...');
exit
end;
@ -1196,9 +1272,18 @@ begin
Result := false
end;
if (result = False) then
exit;
if not cfgDATA then
begin
if (mode=cqrini.ReadString('Band'+IntToStr(frmTRXControl.cmbRig.ItemIndex), 'Datamode', 'RTTY')) then
Result := false
end;
if (result = False) then
Begin
if dmData.DebugLevel >=1 then
Writeln('Cannot show this spot because of Show only spots (mode) settings ...');
exit;
end;
if wDXCC = '*' then
begin
if Pos(prefix+';',iDXCC) = 0 then
@ -1345,10 +1430,9 @@ begin
// and connected to telnet cluster
if (dmDXCluster.IsAlertCall(call,band,mode,cqrini.ReadBool('DxCluster', 'AlertRegExp', False))) then
Begin
freeText:= dmDXCluster.GetfreeTextFromSpot('DX de '+spot);
if dmData.DebugLevel >=1 then
Writeln('Spot is:',spot,#$0A,'----Call alerting is: ',call,',',band,',',mode,',',freq,',',freeText,'-----------');
dmDXCluster.RunCallAlertCmd(call,band,mode,freq,freeText);
Writeln('Spot is:',spot,#$0A,'----Call alerting is: ',call,',',band,',',mode,',',freq,',',info,'-----------');
dmDXCluster.RunCallAlertCmd(call,band,mode,freq,info);
call :='';
end;
if dmData.DebugLevel >=1 then
@ -1642,6 +1726,7 @@ begin
giITU := cqrini.ReadString('BandMap','iITU','');
gcfgCW := cqrini.ReadBool('DXCluster','CW',true);
gcfgSSB := cqrini.ReadBool('DXCluster','SSB',True);
gcfgDATA:= cqrini.ReadBool('DXCluster','DATA',True);
gcfgEU := cqrini.ReadBool('BandMap','wEU',True);
gcfgAS := cqrini.ReadBool('BandMap','wAS',True);
gcfgNA := cqrini.ReadBool('BandMap','wNA',True);

View File

@ -9,7 +9,7 @@ object frmDbSqlSel: TfrmDbSqlSel
Color = clWhite
OnClose = FormClose
OnCreate = FormCreate
LCLVersion = '2.2.0.4'
LCLVersion = '2.2.6.0'
object gbLocalUser: TGroupBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = rbExternal
@ -18,7 +18,7 @@ object frmDbSqlSel: TfrmDbSqlSel
AnchorSideRight.Side = asrBottom
Left = 6
Height = 89
Top = 176
Top = 177
Width = 429
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6
@ -65,9 +65,10 @@ object frmDbSqlSel: TfrmDbSqlSel
Left = 331
Height = 17
Top = 1
Width = 66
Width = 62
Anchors = [akLeft, akBottom]
Caption = 'Password'
ParentColor = False
end
object lblUsername: TLabel
AnchorSideLeft.Control = edtUserName
@ -75,9 +76,10 @@ object frmDbSqlSel: TfrmDbSqlSel
Left = 229
Height = 17
Top = 1
Width = 68
Width = 67
Anchors = [akLeft, akBottom]
Caption = 'Username'
ParentColor = False
end
object lblIp: TLabel
AnchorSideLeft.Control = edtIP
@ -85,9 +87,10 @@ object frmDbSqlSel: TfrmDbSqlSel
Left = 6
Height = 17
Top = 1
Width = 63
Width = 60
Anchors = [akLeft, akBottom]
Caption = 'IP addres'
ParentColor = False
end
object lblPort: TLabel
AnchorSideLeft.Control = edtPort
@ -95,9 +98,10 @@ object frmDbSqlSel: TfrmDbSqlSel
Left = 108
Height = 17
Top = 1
Width = 30
Width = 26
Anchors = [akLeft, akBottom]
Caption = 'Port'
ParentColor = False
end
object edtPort: TEdit
AnchorSideLeft.Control = edtIP
@ -134,13 +138,14 @@ object frmDbSqlSel: TfrmDbSqlSel
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = pnlWelcome
AnchorSideTop.Side = asrBottom
Left = 34
Left = 21
Height = 34
Top = 43
Width = 372
Top = 44
Width = 398
BorderSpacing.Top = 6
Caption = 'It seems you are trying to run this program for '#10'the first time. Do you want to save your Log data to:'
Font.Style = [fsBold]
ParentColor = False
ParentFont = False
end
object rbFolder: TRadioButton
@ -149,14 +154,16 @@ object frmDbSqlSel: TfrmDbSqlSel
AnchorSideTop.Side = asrBottom
Left = 24
Height = 23
Top = 89
Width = 288
Hint = 'Log data is saved to ~/.config/cqrlog/database folder. '#10'Access to that data is done by starting a new SQL server thread for that.'#10'Unfortunately using this way to save logs causes most of database '#10'connection problems with CQRLOG.'#10'_______________________________________________'#10'For further information press "Please read"-button'
Top = 90
Width = 284
BorderSpacing.Left = 24
BorderSpacing.Top = 12
Caption = 'your linux user folder (CQRLOG default)'
Checked = True
OnClick = rbFolderClick
ParentShowHint = False
ShowHint = True
TabOrder = 1
TabStop = True
end
@ -166,12 +173,14 @@ object frmDbSqlSel: TfrmDbSqlSel
AnchorSideTop.Side = asrBottom
Left = 24
Height = 23
Top = 115
Width = 203
Hint = 'Use SQL server already installed to your machine. Both Mysql or MariDB should work.'#10'CQRLOG tries first create SQL user with proper privileges to use the SQL server'#10'and then set proper values to "Database connection" window.'#10'This is done by ~/create_cqr_user.sh scipt that is tried to run with most common'#10'terminals xterm, gnome-terminal or lxterminal.'#10'If that fails you have to run script manually from your command-line console.'#10'_______________________________________________'#10'For further information press "Please read"-button'
Top = 116
Width = 202
BorderSpacing.Top = 3
Caption = 'local machine''s SQL server'
OnChange = rbLocalChange
ParentShowHint = False
ShowHint = True
TabOrder = 2
TabStop = True
end
@ -181,12 +190,14 @@ object frmDbSqlSel: TfrmDbSqlSel
AnchorSideTop.Side = asrBottom
Left = 24
Height = 23
Top = 141
Width = 231
Hint = 'Use SQL server anywhere. Both Mysql or MariDB should work.'#10'You have to define values to connect SQL server by yourself:'#10'Address, port, user and password required to connect to external SQL server.'#10'SQL user and privileges have to be created by SQL server administrator.'#10'Server can exist in your home network or Internet.'#10'With external networks VPN or SSH tunnel is recommended for security reasons.'#10'_______________________________________________'#10'For further information press "Please read"-button'
Top = 142
Width = 226
BorderSpacing.Top = 3
Caption = 'external networked SQL server'
OnChange = rbExternalChange
ParentShowHint = False
ShowHint = True
TabOrder = 3
TabStop = True
end
@ -198,7 +209,7 @@ object frmDbSqlSel: TfrmDbSqlSel
AnchorSideBottom.Side = asrBottom
Left = 354
Height = 25
Hint = 'Confirm your selection'
Hint = 'Confirm your selection and continue.'#10'______________________________________________________________'#10'If you made wrong selection remove ~/.config/cqrlog folder'#10'(before saving any qsos, all will be deleted if 1st option was used)'#10'and then start Cqrlog again to get back to this screen.'
Top = 269
Width = 75
Anchors = [akRight, akBottom]
@ -206,6 +217,8 @@ object frmDbSqlSel: TfrmDbSqlSel
BorderSpacing.Bottom = 12
Caption = 'OK'
OnClick = btnOKClick
ParentShowHint = False
ShowHint = True
TabOrder = 5
end
object pnlWelcome: TPanel
@ -214,7 +227,7 @@ object frmDbSqlSel: TfrmDbSqlSel
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 30
Height = 31
Height = 32
Top = 6
Width = 381
Anchors = [akTop, akLeft, akRight]
@ -222,7 +235,7 @@ object frmDbSqlSel: TfrmDbSqlSel
BorderSpacing.Left = 30
BorderSpacing.Top = 6
BorderSpacing.Right = 30
ClientHeight = 31
ClientHeight = 32
ClientWidth = 381
Color = clWhite
ParentColor = False
@ -232,14 +245,15 @@ object frmDbSqlSel: TfrmDbSqlSel
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = pnlWelcome
AnchorSideTop.Side = asrCenter
Left = 71
Height = 29
Left = 46
Height = 30
Top = 1
Width = 238
Width = 289
Caption = 'Welcome to CQRLOG'
Font.Color = clOlive
Font.Height = 25
Font.Style = [fsBold, fsItalic]
ParentColor = False
ParentFont = False
end
end
@ -249,7 +263,7 @@ object frmDbSqlSel: TfrmDbSqlSel
AnchorSideRight.Side = asrBottom
Left = 354
Height = 64
Top = 89
Top = 90
Width = 64
Picture.Data = {
1754506F727461626C654E6574776F726B47726170686963E423000089504E47
@ -551,7 +565,7 @@ object frmDbSqlSel: TfrmDbSqlSel
AnchorSideBottom.Side = asrBottom
Left = 30
Height = 89
Top = 176
Top = 177
Width = 381
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 30
@ -570,9 +584,10 @@ object frmDbSqlSel: TfrmDbSqlSel
Left = 1
Height = 34
Top = 1
Width = 370
Width = 366
Caption = 'Cqrlog is creatng your first log, it might take some time.'#10'Please be patient!'
Font.Color = clMaroon
ParentColor = False
ParentFont = False
ShowAccelChar = False
WordWrap = True
@ -589,6 +604,7 @@ object frmDbSqlSel: TfrmDbSqlSel
Anchors = [akLeft, akBottom]
BorderSpacing.Left = 6
Font.Color = clRed
ParentColor = False
ParentFont = False
end
object btnHelp: TSpeedButton
@ -596,6 +612,7 @@ object frmDbSqlSel: TfrmDbSqlSel
AnchorSideRight.Control = btnOK
Left = 232
Height = 25
Hint = 'Did you read help of first start ?'#10'___________________'#10'PLEASE DO IT NOW !'
Top = 269
Width = 116
Anchors = [akTop, akRight]

View File

@ -43,7 +43,7 @@ object frmDefaultFreq: TfrmDefaultFreq
Height = 17
Top = 16
Width = 30
Caption = 'RTTY'
Caption = 'DATA'
ParentColor = False
end
object Label7: TLabel
@ -611,4 +611,4 @@ object frmDefaultFreq: TfrmDefaultFreq
TabOrder = 66
Text = '70cm'
end
end
end

View File

@ -199,6 +199,7 @@ var
message : String;
Operators : TStringList;
OpString : String;
DBRecordCount : integer =0; //holds max record count;
begin
SaveSettings;
date := dmUtils.GetDateTime(0);
@ -269,7 +270,10 @@ begin
try try
dmData.trQ.StartTransaction;
dmData.Q.Open;
dmData.Q.Last; //to get proper count
pbExport.Max := dmData.Q.RecordCount;
DBRecordCount := dmData.Q.RecordCount;
dmData.Q.First;
while not dmData.Q.Eof do
begin
inc(QsoMax);
@ -312,7 +316,7 @@ begin
if (i = 1)
then
startdate := StringReplace(dmData.Q.FieldByName('qsodate').AsString,'-','',[rfReplaceAll, rfIgnoreCase]);
if (i = dmData.Q.RecordCount)
if (i = DBRecordCount)
then
enddate := StringReplace(dmData.Q.FieldByName('qsodate').AsString,'-','',[rfReplaceAll, rfIgnoreCase]);
if length(loc) = 4 then loc := loc +'LL';

View File

@ -63,7 +63,7 @@ var
implementation
{$R *.lfm}
uses dUtils, dData, uMyIni, fQSLExpPref, dDXCC,fMain;
uses dUtils, dData, uMyIni, fQSLExpPref, dDXCC,fMain, dLOgUpload;
{ TfrmExLabelPrint }
procedure TfrmExLabelPrint.edtQSOsToLabelExit(Sender: TObject);
@ -559,6 +559,9 @@ begin
exit
end;
if cqrini.ReadBool('OnlineLog','IgnoreQSL',False) then
dmLogUpload.DisableOnlineLogSupport;
FieldCount := GetExpFieldCount;
if dmData.DebugLevel >= 1 then Writeln('Field count: ', FieldCount);
dmData.CreateQSLTmpTable;
@ -643,7 +646,10 @@ begin
dmData.DropQSLTmpTable;
lblProgress.Caption := 'Complete!';
CloseFile(f);
dmData.RefreshMainDatabase()
dmData.RefreshMainDatabase();
if cqrini.ReadBool('OnlineLog','IgnoreQSL',False) then
dmLogUpload.EnableOnlineLogSupport;
end
end;

View File

@ -445,7 +445,7 @@ begin
if chkNot.Checked then tmp:= 'NOT( '+tmp+' )';
tmp := 'SELECT * FROM view_cqrlog_main_by_qsodate WHERE ' + tmp + ' ' + grb_by +' ' + OrderBy;
dmData.IsFilterSQL:=tmp;
dmData.qCQRLOG.Close;
dmData.qCQRLOG.SQL.Text := tmp;
if dmData.DebugLevel >=1 then
@ -744,10 +744,15 @@ procedure TfrmFilter.btnLoadClick(Sender: TObject);
begin
dlgOpen.InitialDir := dmData.HomeDir;
if dlgOpen.Execute then
begin
if FileExists(dlgOpen.FileName) then //with QT5 opendialog user can enter filename that may not exist
Begin
loadFilter(dlgOpen.FileName);
if DirectLoad then btnOkClick(nil);
end;
end
else
ShowMessage('File not found!');
end;
end;
procedure TfrmFilter.btnSaveClick(Sender: TObject);

View File

@ -111,7 +111,7 @@ object frmFreq: TfrmFreq
Top = 18
Width = 180
BorderSpacing.Left = 230
Caption = 'RTTY: (f>RTTY and f<=SSB)'
Caption = 'DATA: (f>DATA and f<=SSB)'
ParentColor = False
end
object lblFreqNote4: TLabel
@ -126,7 +126,7 @@ object frmFreq: TfrmFreq
end
end
object dsrFreq: TDataSource
DataSet = dmData.qBands
DataSet = dmData.qFreqs
left = 130
top = 57
end

View File

@ -51,8 +51,8 @@ end;
procedure TfrmFreq.FormClose(Sender : TObject; var CloseAction : TCloseAction);
begin
dmUtils.SaveWindowPos(frmFreq);
if dmData.trBands.Active then
dmData.trBands.Rollback
if dmData.trFreqs.Active then
dmData.trFreqs.Rollback
end;
procedure TfrmFreq.dbgrdFreqColumnSized(Sender : TObject);
@ -71,14 +71,14 @@ var
begin
with TfrmChangeFreq.Create(frmFreq) do
try
band := dmData.qBands.Fields[1].AsString;
edtBegin.Text := FloatToStr(dmData.qBands.Fields[2].AsFloat);
edtEnd.Text := FloatToStr(dmData.qBands.Fields[3].AsFloat);
edtCW.Text := FloatToStr(dmData.qBands.Fields[4].AsFloat);
edtRTTY.Text := FloatToStr(dmData.qBands.Fields[5].AsFloat);
edtSSB.Text := FloatToStr(dmData.qBands.Fields[6].AsFloat);
edtRXOffset.Text := FloatToStr(dmData.qBands.Fields[7].AsFloat);
edtTXOffset.Text := FloatToStr(dmData.qBands.Fields[8].AsFloat);
band := dmData.qFreqs.Fields[1].AsString;
edtBegin.Text := FloatToStr(dmData.qFreqs.Fields[2].AsFloat);
edtEnd.Text := FloatToStr(dmData.qFreqs.Fields[3].AsFloat);
edtCW.Text := FloatToStr(dmData.qFreqs.Fields[4].AsFloat);
edtData.Text := FloatToStr(dmData.qFreqs.Fields[5].AsFloat);
edtSSB.Text := FloatToStr(dmData.qFreqs.Fields[6].AsFloat);
edtRXOffset.Text := FloatToStr(dmData.qFreqs.Fields[7].AsFloat);
edtTXOffset.Text := FloatToStr(dmData.qFreqs.Fields[8].AsFloat);
ShowModal;
if ModalResult = mrOK then
@ -88,7 +88,7 @@ begin
StrToFloat(edtBegin.Text),
StrToFloat(edtEnd.Text),
StrToFloat(edtCW.Text),
StrToFloat(edtRTTY.Text),
StrToFloat(edtData.Text),
StrToFloat(edtSSB.Text),
StrToFloat(edtRXOffset.Text),
StrToFloat(edtTXOffset.Text)
@ -106,29 +106,29 @@ const
var
i : Integer;
begin
if dmData.trBands.Active then
dmData.trBands.Rollback;
if dmData.trFreqs.Active then
dmData.trFreqs.Rollback;
dmData.qBands.SQL.Text := C_SEL;
dmData.trBands.StartTransaction;
dmData.qBands.Open;
dmData.qFreqs.SQL.Text := C_SEL;
dmData.trFreqs.StartTransaction;
dmData.qFreqs.Open;
dbgrdFreq.Columns[0].Visible := False;
if (band<>'') then
begin
dmData.qBands.DisableControls;
dmData.qFreqs.DisableControls;
try
dmData.qBands.First;
while not dmData.qBands.Eof do
dmData.qFreqs.First;
while not dmData.qFreqs.Eof do
begin
if (dmData.qBands.Fields[1].AsString=band) then
if (dmData.qFreqs.Fields[1].AsString=band) then
break
else
dmData.qBands.Next
dmData.qFreqs.Next
end
finally
dmData.qBands.EnableControls
dmData.qFreqs.EnableControls
end
end;
@ -137,7 +137,7 @@ begin
dbgrdFreq.Columns[2].Title.Caption := 'Begin';
dbgrdFreq.Columns[3].Title.Caption := 'End';
dbgrdFreq.Columns[4].Title.Caption := 'CW';
dbgrdFreq.Columns[5].Title.Caption := 'RTTY';
dbgrdFreq.Columns[5].Title.Caption := 'Data';
dbgrdFreq.Columns[6].Title.Caption := 'SSB';
dbgrdFreq.Columns[7].Title.Caption := 'RX offset';
dbgrdFreq.Columns[8].Title.Caption := 'TX offset';

View File

@ -1,7 +1,7 @@
object frmGrayline: TfrmGrayline
Left = 755
Left = 547
Height = 248
Top = 304
Top = 125
Width = 419
Caption = 'Grayline'
ClientHeight = 248
@ -121,7 +121,7 @@ object frmGrayline: TfrmGrayline
OnPaint = FormPaint
OnShow = FormShow
ShowHint = True
LCLVersion = '2.0.12.0'
LCLVersion = '2.2.6.0'
object sbtnGrayLine: TSpeedButton
Left = 400
Height = 16
@ -204,6 +204,10 @@ object frmGrayline: TfrmGrayline
Caption = 'Show LongPath'
OnClick = pumShowLongPathClick
end
object pumShowBeamPath: TMenuItem
Caption = 'Show BeamPath'
OnClick = pumShowBeamPathClick
end
object pumMnuLine2: TMenuItem
Caption = '-'
end

View File

@ -32,6 +32,7 @@ type
acConnect : TAction;
acShowStatusBar : TAction;
acLinkToRbnMonitor: TAction;
pumShowBeamPath: TMenuItem;
pumShowLongPath: TMenuItem;
pumShowShortPath: TMenuItem;
pumMnuLine2: TMenuItem;
@ -60,6 +61,7 @@ type
procedure FormShow(Sender: TObject);
procedure popGrayLinePopup(Sender: TObject);
procedure pumClearAllSpotsClick(Sender: TObject);
procedure pumShowBeamPathClick(Sender: TObject);
procedure pumShowLongPathClick(Sender: TObject);
procedure pumShowShortPathClick(Sender: TObject);
procedure pumWatchForClick(Sender: TObject);
@ -74,6 +76,7 @@ type
delAfter : integer;
watchFor : String;
LocalDbg : boolean;
GC_lock : boolean;
procedure lConnect(aSocket: TLSocket);
procedure lDisconnect(aSocket: TLSocket);
@ -89,7 +92,8 @@ type
pfx : String;
rbn_status : String;
procedure kresli;
procedure PlotGreatCircleArcLine(longitude1,latitude1,longitude2,latitude2:extended; LongP:boolean);
procedure PlotGreatCircleArcLine(longitude1,latitude1,longitude2,latitude2:extended; LongP:integer);
procedure CalculateLatLonOfNewPoint(BaseLon,BaseLat:extended;dist,bearing:integer;var lon2,lat2:extended);
procedure SavePosition;
procedure SynRBN;
function GetEmptyPos : Word;
@ -105,7 +109,7 @@ implementation
{ TfrmGrayline }
uses dUtils, dData, uMyIni, dDXCluster, fNewQSO;
uses dUtils, dData, uMyIni, dDXCluster, fNewQSO, fRotControl;
procedure TfrmGrayline.lConnect(aSocket: TLSocket);
begin
@ -290,6 +294,7 @@ begin
RBNSpotList[i].lat := 0;
RBNSpotList[i].long := 0;
end;
GC_lock:=false;
ImageFile := dmData.HomeDir+'images'+PathDelim+'grayline.bmp';
if not FileExists(ImageFile) then
ImageFile := ExpandFileNameUTF8('..'+PathDelim+'share'+PathDelim+'cqrlog'+
@ -310,6 +315,7 @@ begin
sbGrayLine.Visible := cqrini.ReadBool('Grayline','Statusbar',True);
pumShowShortPath.Checked := cqrini.ReadBool('Grayline','ShortPath',False);
pumShowLongPath.Checked := cqrini.ReadBool('Grayline','LongPath',False);
pumShowBeamPath.Checked := cqrini.ReadBool('Grayline','BeamPath',False);
acShowStatusBar.Checked := sbGrayLine.Visible;
rbn_status :='Disconnected';
sbGrayLine.SimpleText := rbn_status;
@ -319,6 +325,7 @@ begin
delAfter := cqrini.ReadInteger('RBN','deleteAfter',60);
tmrSpotDots.Interval :=1000; //remove Spots(DOts) timer will always run 1 sec period.
tmrSpotDots.Enabled :=true;
ob^.GC_line_clear;
end;
procedure TfrmGrayline.FormCloseQuery(Sender: TObject; var CanClose: boolean);
@ -393,6 +400,16 @@ begin
tmrSpotDots.Enabled:=true;
end;
procedure TfrmGrayline.pumShowBeamPathClick(Sender: TObject);
begin
pumShowBeamPath.Checked:= not pumShowBeamPath.Checked;
cqrini.WriteBool('Grayline','BeamPath',pumShowBeamPath.Checked);
if pumShowBeamPath.Checked then
frmRotControl.BeamDir:=-1
else
ob^.GC_line_clear(2);
end;
procedure TfrmGrayline.pumShowLongPathClick(Sender: TObject);
begin
pumShowLongPath.Checked:= not pumShowLongPath.Checked;
@ -506,12 +523,12 @@ begin
s := '';
d := '';
dmUtils.CoordinateFromLocator(dmUtils.CompleteLoc(my_loc),lat,long);
if pumShowShortPath.Checked or pumShowLongPath.Checked then
if pumShowShortPath.Checked or pumShowLongPath.Checked then
Begin
if pumShowShortPath.Checked then
PlotGreatCircleArcLine(long,lat,long1,lat1,false);
PlotGreatCircleArcLine(long,lat,long1,lat1,0);
if pumShowLongPath.Checked then
PlotGreatCircleArcLine(long,lat,long1,lat1,true);
PlotGreatCircleArcLine(long,lat,long1,lat1,1);
end
else
ob^.jachcucaru(true,long,lat*-1,long1,lat1*-1);
@ -528,7 +545,59 @@ procedure TfrmGrayline.CalculateBearing(lat0, long0, lat1, long1: extended; var
bearing := ArcTan2(y, x);
end;
procedure TfrmGrayline.PlotGreatCircleArcLine(longitude1,latitude1,longitude2,latitude2:extended; LongP:boolean);
procedure TfrmGrayline.CalculateLatLonOfNewPoint(BaseLon,BaseLat:extended;dist,bearing:integer;var lon2,lat2:extended);
var R,B,
lon1,
lat1 :extended;
distCount,
stp,f:integer;
Begin
R:=6378.15; (* Radius of the earth *)
if LocalDbg then
begin
write('Lat:',FormatFloat('0.00;;',BaseLat));
write(' Lon:',FormatFloat('0.00;;',BaseLon));
write(' ',FormatFloat('0.00;;',bearing),' ');
end;
stp:=10;
lon1 := degToRad(BaseLon);
lat1 := degToRad(BaseLat);
B := degToRad(Bearing);
dist := dist+stp; //div results always at least 1
distcount:=dist div stp; //we need to calculate in small steps. Otherwise precision errors become too visible
for f:=1 to distcount do
Begin
lat2 := arcsin(sin(lat1) * cos(stp/R) + cos(lat1) * sin(stp/R) * cos(B));
lon2 := lon1 +arctan2( sin(B) * sin(stp/R) * cos(lat1),
cos(stp/R) - sin(lat1) * sin(lat2)
);
if (lat2>87*pi/180) then break; //calculation fails on polar crossing with big beam lengths
if (lat2<-87*pi/180) then break;
lat1:=lat2;
lon1:=lon2;
if LocalDbg then
begin
write('Lat>',FormatFloat('0.00;;',RadToDeg(lat1)));
writeln(' Lon>',FormatFloat('0.00;;',RadToDeg(lon1)));
end;
end;
lat2:=RadToDeg(lat2);
lon2:=RadToDeg(lon2);
if LocalDbg then
begin
write('Lat:',FormatFloat('0.00;;',lat2));
writeln(' Lon:',FormatFloat('0.00;;',lon2));
end;
end;
procedure TfrmGrayline.PlotGreatCircleArcLine(longitude1,latitude1,longitude2,latitude2:extended; LongP:integer);
{ Ref: http://www.movable-type.co.uk/scripts/latlong.html }
Const
@ -544,11 +613,16 @@ var
LP : integer; //LongPath instead of ShortPath
Begin
while GC_lock do
sleep(1);
GC_lock:=true;
BaseStep := cqrini.ReadFloat('Program', 'GraylineGCstep',15E-001) * pi/180;
PolarStep := Basestep/cqrini.ReadInteger('Program', 'GraylineGCstep',10);
ob^.GC_LWidth := cqrini.ReadInteger('Program', 'GraylineGCLineWidth',2);
ob^.GB_LWidth := cqrini.ReadInteger('Program', 'GraylineGBeamLineWidth',2);
ob^.GC_SP_Color:=StringToColor(cqrini.ReadString('Program', 'GraylineGCLineSPColor', 'clYellow' ));
ob^.GC_LP_Color:=StringToColor(cqrini.ReadString('Program', 'GraylineGCLineLPColor', 'clFuchsia' ));
ob^.GC_BE_Color:=StringToColor(cqrini.ReadString('Program', 'GraylineGCLineBEColor', 'clRed' ));
if LocalDbg then
begin
@ -558,11 +632,12 @@ if LocalDbg then
step := BaseStep;
if LongP then
LP:=1
else
LP:=0;
ob^.GC_line_clear(LP);
case LongP of
2 : LP:=0; //beam
1 : LP:=1; //long path
0 : LP:=0; //short path
end;
ob^.GC_line_clear(LongP);
longitude1 := degToRad(longitude1);
latitude1 := degToRad(latitude1);
longitude2 := degToRad(longitude2);
@ -595,21 +670,21 @@ while (CountLimit > 0) do
if abs(oldbearing -bearing) > (pi/2) then
Begin
if LocalDbg then
Begin
writeln('Obe:',round(radtodeg(oldbearing)));
writeln('Nbe:',round(radtodeg(bearing)));
end;
Begin
writeln('Obe:',round(radtodeg(oldbearing)));
writeln('Nbe:',round(radtodeg(bearing)));
end;
if LP = 1 then
begin
if LocalDbg then
writeln ('Release LP value in count round ',CountLimit);
writeln ('Release LP value in count round ',CountLimit);
LP:=0; //we are on globe's opposite side of target. Release LP and now on calculate rest via ShortPath
CalculateBearing(latFrom, lonFrom, latitude2, longitude2, bearing);
end
else
begin
if LocalDbg then
writeln ('Stop counting in round ',CountLimit);
writeln ('Stop counting in round ',CountLimit);
CountLimit:=0;
end;
end;
@ -634,14 +709,17 @@ while (CountLimit > 0) do
or ((lonFrom < -MEC) and (longitude1 > MEC)) //left crossing
) then
begin
if not LongP then
ob^.GC_line_part(RadToDeg(lonFrom),RadToDeg(latFrom)*-1,RadToDeg(longitude1),RadToDeg(latitude1)*-1)
else
ob^.GC_Lline_part(RadToDeg(lonFrom),RadToDeg(latFrom)*-1,RadToDeg(longitude1),RadToDeg(latitude1)*-1)
if LongP=0 then
ob^.GC_line_part(RadToDeg(lonFrom),RadToDeg(latFrom)*-1,RadToDeg(longitude1),RadToDeg(latitude1)*-1);
if LongP=1 then
ob^.GC_Lline_part(RadToDeg(lonFrom),RadToDeg(latFrom)*-1,RadToDeg(longitude1),RadToDeg(latitude1)*-1);
if (LongP=2) and (LP=0) then
ob^.GC_Bline_part(RadToDeg(lonFrom),RadToDeg(latFrom)*-1,RadToDeg(longitude1),RadToDeg(latitude1)*-1);
end;
oldbearing:=bearing;
end;
GC_lock:=false;
end;
procedure TfrmGrayline.SavePosition;
@ -834,6 +912,5 @@ begin
end;
end;
end.

View File

@ -148,7 +148,7 @@ object frmGroupEdit: TfrmGroupEdit
}
OnShow = FormShow
Position = poMainFormCenter
LCLVersion = '2.0.8.0'
LCLVersion = '2.2.6.0'
object GroupBox1: TGroupBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
@ -166,20 +166,19 @@ object frmGroupEdit: TfrmGroupEdit
AnchorSideTop.Control = cmbField
AnchorSideTop.Side = asrCenter
Left = 12
Height = 15
Top = 10
Height = 17
Top = 9
Width = 34
BorderSpacing.Left = 12
Caption = 'Field:'
ParentColor = False
OnClick = lblFieldClick
end
object lblValue: TLabel
AnchorSideLeft.Control = lblField
AnchorSideTop.Control = cmbValue
AnchorSideTop.Side = asrCenter
Left = 12
Height = 15
Height = 17
Top = 44
Width = 41
Caption = 'Value:'
@ -233,7 +232,7 @@ object frmGroupEdit: TfrmGroupEdit
'Contest name'
'Propagation mode'
'Satellite name'
'Operator̈́'
'Operator'
'DOK'
)
OnChange = cmbFieldChange
@ -245,7 +244,7 @@ object frmGroupEdit: TfrmGroupEdit
AnchorSideTop.Control = cmbField
AnchorSideTop.Side = asrBottom
Left = 96
Height = 33
Height = 34
Top = 35
Width = 312
BorderSpacing.Top = 3
@ -260,7 +259,7 @@ object frmGroupEdit: TfrmGroupEdit
AnchorSideTop.Side = asrBottom
Left = 6
Height = 32
Top = 72
Top = 73
Width = 422
BorderSpacing.Top = 4
BorderWidth = 1

View File

@ -38,7 +38,6 @@ type
procedure cmbFieldChange(Sender: TObject);
procedure cmbValueChange(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure lblFieldClick(Sender: TObject);
private
{ private declarations }
WhereTo: String;
@ -111,7 +110,7 @@ begin
cmbValue.Style:=csDropDown;
end;
end;
pnlGrpEdt.Color:=clRed;
pnlGrpEdt.Color:=$005C5CFF;
lblInfo.Caption := 'Backup your log! Operations can not be undone!';
btnCancel.Caption:='Cancel';
pnlGrpEdt.Repaint;
@ -120,7 +119,7 @@ end;
procedure TfrmGroupEdit.cmbValueChange(Sender: TObject);
begin
pnlGrpEdt.Color:=clRed;
pnlGrpEdt.Color:=$005C5CFF;
lblInfo.Caption := 'Backup your log! Operations can not be undone!';
btnCancel.Caption:='Cancel';
pnlGrpEdt.Repaint;
@ -149,11 +148,6 @@ begin
lblInfo.Repaint;
end;
procedure TfrmGroupEdit.lblFieldClick(Sender: TObject);
begin
end;
procedure TfrmGroupEdit.btnApplyClick(Sender: TObject);
var
sql : String = '';
@ -162,7 +156,9 @@ var
nr : Integer = 0;
i : Integer = 0;
aid : Array of LongInt;
//------------------------------------------------------------------------------------------------------
procedure ChangeQSO(idx : LongInt);
begin
if update_dxcc then
@ -198,20 +194,36 @@ var
dmData.trQ.Commit
end;
inc(nr);
pnlGrpEdt.Color:=clYellow;
lblInfo.Caption := 'Working .... QSO nr. ' + IntToStr(nr);
pnlGrpEdt.Repaint;
lblInfo.Repaint
end;
//------------------------------------------------------------------------------------------------------
procedure DateErrSplash;
Begin
Application.MessageBox('Please enter correct date'+LineEnding+'as YYYY-MM-DD !','Error ...', mb_OK+mb_IconError);
end;
//------------------------------------------------------------------------------------------------------
function ClearDate:Boolean;
Begin
Result:=False;
if Application.MessageBox('Do you really want to clear DATE?',
'Question ...',mb_YesNo+mb_IconQuestion+mb_DefButton2) = idYes then
Result:=True;
end;
//------------------------------------------------------------------------------------------------------
begin
case cmbField.ItemIndex of
0 : begin
if not dmUtils.IsDateOK(cmbValue.Text) then
begin
Application.MessageBox('Please enter correct date!','Error ...', mb_OK+mb_IconError);
DateErrSplash;
cmbValue.SetFocus;
exit
end;
@ -431,13 +443,17 @@ begin
sql := 'qsl_s="",qsls_date=null'
end;
23 : begin
if (not dmUtils.IsDateOK(cmbValue.Text))then
if (cmbValue.Text<>'') and (not dmUtils.IsDateOK(cmbValue.Text))then
begin
Application.MessageBox('Please enter correct date!','Error ...', mb_OK+mb_IconError);
DateErrSplash;
cmbValue.SetFocus;
exit
end;
if (cmbValue.Text<>'') then
sql := 'qsls_date='+QuotedStr(cmbValue.Text)
else
if ClearDate then
sql := 'qsls_date=null';
end;
24 : begin
if (cmbValue.ItemIndex=0) and (Application.MessageBox('Do you really want to clear QSL_R field?'
@ -458,13 +474,17 @@ begin
sql := 'qsl_r="",qslr_date=null'
end;
25 : begin
if (not dmUtils.IsDateOK(cmbValue.Text))then
if (cmbValue.Text<>'') and (not dmUtils.IsDateOK(cmbValue.Text))then
begin
Application.MessageBox('Please enter correct date!','Error ...', mb_OK+mb_IconError);
DateErrSplash;
cmbValue.SetFocus;
exit
end;
if (cmbValue.Text<>'') then
sql := 'qslr_date='+QuotedStr(cmbValue.Text)
else
if ClearDate then
sql := 'qslr_date=null'
end;
26 : begin
if cmbValue.Text = 'Y' then
@ -476,7 +496,7 @@ begin
27 : begin
if (not dmUtils.IsDateOK(cmbValue.Text))then
begin
Application.MessageBox('Please enter correct date!','Error ...', mb_OK+mb_IconError);
DateErrSplash;
cmbValue.SetFocus;
exit
end
@ -495,12 +515,12 @@ begin
29 : begin
if (not dmUtils.IsDateOK(cmbValue.Text))then
begin
Application.MessageBox('Please enter correct date!','Error ...', mb_OK+mb_IconError);
DateErrSplash;
cmbValue.SetFocus;
exit
end
else
sql := 'lotw_qslr='+QuotedStr('E')+',lotw_qslrdate='+
sql := 'lotw_qslr='+QuotedStr('L')+',lotw_qslrdate='+
QuotedStr(cmbValue.Text)
end;
30 : begin
@ -513,7 +533,7 @@ begin
31 : begin
if (not dmUtils.IsDateOK(cmbValue.Text))then
begin
Application.MessageBox('Please enter correct date!','Error ...', mb_OK+mb_IconError);
DateErrSplash;
cmbValue.SetFocus;
exit
end
@ -531,7 +551,7 @@ begin
33 : begin
if (not dmUtils.IsDateOK(cmbValue.Text))then
begin
Application.MessageBox('Please enter correct date!','Error ...', mb_OK+mb_IconError);
DateErrSplash;
cmbValue.SetFocus;
exit
end
@ -600,6 +620,7 @@ begin
end;
lblInfo.Caption := 'Group edit done '+WhereTo;
btnCancel.Caption:= 'Close';
btnApply.Enabled:=False;
pnlGrpEdt.Color:= clLime;
pnlGrpEdt.Repaint;
lblInfo.Repaint;

View File

@ -1,11 +1,11 @@
object frmImportLoTWWeb: TfrmImportLoTWWeb
Left = 632
Height = 583
Top = 98
Left = 567
Height = 600
Top = 97
Width = 572
ActiveControl = pnlSettings
Caption = 'Import from LoTW web site'
ClientHeight = 583
ClientHeight = 600
ClientWidth = 572
Icon.Data = {
BE0C00000000010001002020000001001800A80C000016000000280000002000
@ -115,22 +115,26 @@ object frmImportLoTWWeb: TfrmImportLoTWWeb
OnCloseQuery = FormCloseQuery
OnShow = FormShow
Position = poMainFormCenter
LCLVersion = '2.0.12.0'
LCLVersion = '2.2.6.0'
object gbProgress: TGroupBox
AnchorSideLeft.Control = pnlSettings
AnchorSideTop.Control = pnlSettings
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = pnlSettings
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = pnlButtons
AnchorSideBottom.Side = asrBottom
Left = 0
Height = 377
Top = 153
Width = 572
Left = 1
Height = 364
Top = 184
Width = 570
Align = alClient
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 1
BorderSpacing.Right = 1
BorderSpacing.Bottom = 1
Caption = 'Progress'
ClientHeight = 359
ClientWidth = 570
ClientHeight = 346
ClientWidth = 568
TabOrder = 0
object mStat: TMemo
AnchorSideLeft.Control = gbProgress
@ -139,11 +143,15 @@ object frmImportLoTWWeb: TfrmImportLoTWWeb
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = gbProgress
AnchorSideBottom.Side = asrBottom
Left = 0
Height = 359
Top = 0
Width = 570
Left = 1
Height = 344
Top = 1
Width = 566
Align = alClient
BorderSpacing.Left = 1
BorderSpacing.Top = 1
BorderSpacing.Right = 1
BorderSpacing.Bottom = 1
OnChange = mStatChange
ScrollBars = ssAutoBoth
TabOrder = 0
@ -153,48 +161,38 @@ object frmImportLoTWWeb: TfrmImportLoTWWeb
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
AnchorSideRight.Control = Owner
Left = 3
Height = 150
Top = 3
Width = 566
Left = 1
Height = 183
Top = 1
Width = 570
Align = alTop
BorderSpacing.Left = 3
BorderSpacing.Top = 3
BorderSpacing.Right = 3
BorderSpacing.Left = 1
BorderSpacing.Top = 1
BorderSpacing.Right = 1
BevelOuter = bvNone
ClientHeight = 150
ClientWidth = 566
ClientHeight = 183
ClientWidth = 570
TabOrder = 1
object btnDownload: TButton
AnchorSideLeft.Control = gbSettings
AnchorSideTop.Control = gbSettings
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = gbSettings
AnchorSideRight.Side = asrBottom
Left = 0
Height = 25
Top = 116
Width = 566
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
Caption = 'Download data from ARRL website'
OnClick = btnDownloadClick
TabOrder = 0
end
object gbSettings: TGroupBox
AnchorSideLeft.Control = pnlSettings
AnchorSideTop.Control = pnlSettings
AnchorSideRight.Control = pnlSettings
AnchorSideRight.Side = asrBottom
Left = 0
Height = 110
Top = 0
Width = 566
Anchors = [akTop, akLeft, akRight]
AnchorSideBottom.Control = pnlSettings
AnchorSideBottom.Side = asrBottom
Left = 1
Height = 181
Top = 1
Width = 568
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 1
BorderSpacing.Top = 1
BorderSpacing.Right = 1
BorderSpacing.Bottom = 1
Caption = 'Settings'
ClientHeight = 92
ClientWidth = 564
TabOrder = 1
ClientHeight = 163
ClientWidth = 566
TabOrder = 0
object lblReturnQsl: TLabel
AnchorSideLeft.Control = gbSettings
AnchorSideTop.Control = gbSettings
@ -215,43 +213,45 @@ object frmImportLoTWWeb: TfrmImportLoTWWeb
Left = 269
Height = 34
Top = 3
Width = 123
Width = 190
BorderSpacing.Left = 3
TabOrder = 0
end
object chkShowNew: TCheckBox
AnchorSideLeft.Control = lblReturnQsl
AnchorSideTop.Control = edtCall
AnchorSideTop.Control = chkChangeDate
AnchorSideTop.Side = asrBottom
Left = 6
Height = 23
Top = 40
Top = 103
Width = 383
BorderSpacing.Top = 3
Caption = 'Show new comfirmed QSOs after download and import'
TabOrder = 1
end
object lblForCall: TLabel
AnchorSideLeft.Control = edtDateFrom
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = lblReturnQsl
Left = 395
AnchorSideTop.Control = edtCall
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = edtDateFrom
Left = 221
Height = 17
Top = 12
Top = 46
Width = 45
BorderSpacing.Left = 3
Anchors = [akTop, akRight]
BorderSpacing.Right = 3
Caption = 'for call'
ParentColor = False
end
object edtCall: TEdit
AnchorSideLeft.Control = lblForCall
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = lblForCall
AnchorSideTop.Side = asrCenter
Left = 443
AnchorSideTop.Control = edtDateFrom
AnchorSideTop.Side = asrBottom
Left = 269
Height = 34
Top = 3
Width = 109
Top = 37
Width = 190
BorderSpacing.Left = 3
TabOrder = 2
end
@ -261,36 +261,52 @@ object frmImportLoTWWeb: TfrmImportLoTWWeb
AnchorSideTop.Side = asrBottom
Left = 6
Height = 23
Top = 63
Top = 129
Width = 439
BorderSpacing.Top = 3
Caption = 'Import station information from LoTW if it is not set during qso.'
Checked = True
OnChange = cbImportsChange
State = cbChecked
TabOrder = 3
end
object chkChangeDate: TCheckBox
AnchorSideLeft.Control = lblReturnQsl
AnchorSideTop.Control = edtCall
AnchorSideTop.Side = asrBottom
Left = 6
Height = 23
Top = 77
Width = 424
BorderSpacing.Top = 6
Caption = 'Set Rcvd date to be current date -1 after succesfull download'
OnChange = chkChangeDateChange
TabOrder = 4
end
end
end
object pnlButtons: TPanel
AnchorSideLeft.Control = pnlSettings
AnchorSideRight.Control = pnlSettings
AnchorSideBottom.Control = Owner
Left = 0
Left = 1
Height = 50
Top = 530
Width = 572
Top = 549
Width = 570
Align = alBottom
BorderSpacing.Bottom = 3
BorderSpacing.Left = 1
BorderSpacing.Right = 1
BorderSpacing.Bottom = 1
BevelOuter = bvNone
ClientHeight = 50
ClientWidth = 572
ClientWidth = 570
TabOrder = 2
object btnClose: TButton
AnchorSideTop.Control = pnlButtons
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = pnlButtons
AnchorSideRight.Side = asrBottom
Left = 494
Left = 492
Height = 25
Top = 13
Width = 72
@ -314,5 +330,19 @@ object frmImportLoTWWeb: TfrmImportLoTWWeb
OnClick = btnPreferencesClick
TabOrder = 1
end
object btnDownload: TButton
AnchorSideLeft.Control = pnlButtons
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = pnlButtons
AnchorSideTop.Side = asrCenter
AnchorSideRight.Side = asrBottom
Left = 135
Height = 25
Top = 13
Width = 300
Caption = 'Download data from ARRL website'
OnClick = btnDownloadClick
TabOrder = 2
end
end
end

View File

@ -7,17 +7,18 @@ interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs,
httpsend, blcksock, StdCtrls, ExtCtrls, inifiles, ssl_openssl, ssl_openssl_lib,
synacode;
synacode, DateUtils;
type
{ TfrmImportLoTWWeb }
TfrmImportLoTWWeb = class(TForm)
btnDownload: TButton;
btnClose: TButton;
btnDownload: TButton;
btnPreferences: TButton;
cbImports: TCheckBox;
chkChangeDate: TCheckBox;
chkShowNew: TCheckBox;
edtCall: TEdit;
edtDateFrom: TEdit;
@ -30,6 +31,7 @@ type
pnlSettings: TPanel;
pnlButtons: TPanel;
procedure cbImportsChange(Sender: TObject);
procedure chkChangeDateChange(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
procedure FormShow(Sender: TObject);
procedure btnDownloadClick(Sender: TObject);
@ -169,6 +171,11 @@ begin
Free
end;
mStat.Lines.Add('Import complete ...');
if chkChangeDate.Checked then
Begin
edtDateFrom.Caption:= FormatDateTime('YYYY-MM-DD', IncDay(Today, -1));
cqrini.WriteString('LoTWImp','DateFrom',FormatDateTime('YYYY-MM-DD', IncDay(Today, -1)));
end;
if chkShowNew.Checked then
begin
mStat.Lines.Add('');
@ -206,6 +213,7 @@ procedure TfrmImportLoTWWeb.FormShow(Sender: TObject);
begin
dmUtils.LoadWindowPos(self);
chkShowNew.Checked := cqrini.ReadBool('LoTWImp','ShowNewQSOs',True);
chkChangeDate.Checked:=cqrini.ReadBool('LoTWImp','ChangeDate',False);
edtDateFrom.Text := cqrini.ReadString('LoTWImp','DateFrom','1990-01-01');
edtCall.Text := cqrini.ReadString('LoTWImp','Call',
cqrini.ReadString('Station','Call',''));
@ -224,6 +232,11 @@ begin
cqrini.WriteBool('LoTWImp','Import',cbImports.Checked);
end;
procedure TfrmImportLoTWWeb.chkChangeDateChange(Sender: TObject);
begin
cqrini.WriteBool('LoTWImp','ChangeDate',chkChangeDate.Checked);
end;
procedure TfrmImportLoTWWeb.SockCallBack (Sender: TObject; Reason: THookSocketReason; const Value: string);
begin
case Reason of

View File

@ -645,7 +645,7 @@ mode := ''; //be sure there is no mode at this point
'QSLRDATE' : qslrdate:= data;
end; //case
end; //repeat
until pos('<EOR>',uppercase(Buf))=1;
until (pos('<EOR>',uppercase(Buf))=1) or (prik='EOR');
//store original modes
modeorig:=uppercase(mode);
submodeorig:=uppercase(submode);
@ -1013,6 +1013,7 @@ var
qsl_via : String = '';
i : Integer = 0;
begin
dmData.qCQRLOG.Last; //to get proper count
lblComment.Caption := 'Inserting QSL managers ...';
pBarProg.Max := dmData.qCQRLOG.RecordCount;
Application.ProcessMessages;

File diff suppressed because it is too large Load Diff

View File

@ -21,7 +21,17 @@ type
btnOK: TButton;
edtCapF1: TEdit;
edtCapF10: TEdit;
edtCapF11: TEdit;
edtCapF12: TEdit;
edtCapF13: TEdit;
edtCapF14: TEdit;
edtCapF15: TEdit;
edtCapF16: TEdit;
edtCapF17: TEdit;
edtCapF18: TEdit;
edtCapF19: TEdit;
edtCapF2: TEdit;
edtCapF20: TEdit;
edtCapF3: TEdit;
edtCapF4: TEdit;
edtCapF5: TEdit;
@ -31,7 +41,17 @@ type
edtCapF9: TEdit;
edtF1: TEdit;
edtF10: TEdit;
edtF11: TEdit;
edtF12: TEdit;
edtF13: TEdit;
edtF14: TEdit;
edtF15: TEdit;
edtF16: TEdit;
edtF17: TEdit;
edtF18: TEdit;
edtF19: TEdit;
edtF2: TEdit;
edtF20: TEdit;
edtF3: TEdit;
edtF4: TEdit;
edtF5: TEdit;
@ -41,8 +61,18 @@ type
edtF9: TEdit;
GroupBox1: TGroupBox;
GroupBox10: TGroupBox;
gbSaveLoad: TGroupBox;
GroupBox11: TGroupBox;
GroupBox12: TGroupBox;
GroupBox13: TGroupBox;
GroupBox14: TGroupBox;
GroupBox15: TGroupBox;
GroupBox16: TGroupBox;
GroupBox17: TGroupBox;
GroupBox18: TGroupBox;
GroupBox19: TGroupBox;
GroupBox2: TGroupBox;
GroupBox20: TGroupBox;
GroupBox3: TGroupBox;
GroupBox4: TGroupBox;
GroupBox5: TGroupBox;
@ -58,13 +88,33 @@ type
Label14: TLabel;
Label15: TLabel;
Label16: TLabel;
Label17: TLabel;
Label18: TLabel;
Label19: TLabel;
Label2: TLabel;
Label20: TLabel;
Label21: TLabel;
Label22: TLabel;
Label23: TLabel;
Label24: TLabel;
Label25: TLabel;
Label26: TLabel;
Label27: TLabel;
Label28: TLabel;
Label29: TLabel;
Label3: TLabel;
Label30: TLabel;
Label31: TLabel;
Label32: TLabel;
Label33: TLabel;
Label34: TLabel;
Label35: TLabel;
Label36: TLabel;
Label37: TLabel;
Label38: TLabel;
Label39: TLabel;
Label4: TLabel;
Label40: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
@ -72,18 +122,23 @@ type
Label9: TLabel;
LoadMsg: TButton;
OpenDialog1: TOpenDialog;
pnlActions: TPanel;
pgMemories: TPageControl;
pnlMain: TPanel;
rgEnter: TRadioGroup;
pnlControl: TPanel;
rgEnter: TRadioGroup;
SaveDialog1: TSaveDialog;
SaveMsg: TButton;
tabRUN: TTabSheet;
tabSeP: TTabSheet;
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure FormShow(Sender: TObject);
procedure btnHelpClick(Sender: TObject);
procedure btnOKClick(Sender: TObject);
procedure LoadMsgClick(Sender: TObject);
procedure SaveMsgClick(Sender: TObject);
procedure LoadMsgClick(Sender: TObject);
private
SP : boolean;
{ private declarations }
public
{ public declarations }
@ -121,7 +176,33 @@ begin
edtCapF8.text := cqrini.ReadString(C_INI_FILE_SECTION,'CapF8','F8');
edtCapF9.text := cqrini.ReadString(C_INI_FILE_SECTION,'CapF9','F9');
edtCapF10.text := cqrini.ReadString(C_INI_FILE_SECTION,'CapF10','F10');
edtF11.text := cqrini.ReadString(C_INI_FILE_SECTION,'F11','cq cq de %mc %mc pse K');
edtF12.text := cqrini.ReadString(C_INI_FILE_SECTION,'F12','');
edtF13.text := cqrini.ReadString(C_INI_FILE_SECTION,'F13','');
edtF14.text := cqrini.ReadString(C_INI_FILE_SECTION,'F14','');
edtF15.text := cqrini.ReadString(C_INI_FILE_SECTION,'F15','');
edtF16.text := cqrini.ReadString(C_INI_FILE_SECTION,'F16','');
edtF17.text := cqrini.ReadString(C_INI_FILE_SECTION,'F17','');
edtF18.text := cqrini.ReadString(C_INI_FILE_SECTION,'F18','');
edtF19.text := cqrini.ReadString(C_INI_FILE_SECTION,'F19','');
edtF20.text := cqrini.ReadString(C_INI_FILE_SECTION,'F20','');
edtCapF11.text := cqrini.ReadString(C_INI_FILE_SECTION,'CapF11','F1 - CQ');
edtCapF12.text := cqrini.ReadString(C_INI_FILE_SECTION,'CapF12','F2');
edtCapF13.text := cqrini.ReadString(C_INI_FILE_SECTION,'CapF13','F3');
edtCapF14.text := cqrini.ReadString(C_INI_FILE_SECTION,'CapF14','F4');
edtCapF15.text := cqrini.ReadString(C_INI_FILE_SECTION,'CapF15','F5');
edtCapF16.text := cqrini.ReadString(C_INI_FILE_SECTION,'CapF16','F6');
edtCapF17.text := cqrini.ReadString(C_INI_FILE_SECTION,'CapF17','F7');
edtCapF18.text := cqrini.ReadString(C_INI_FILE_SECTION,'CapF18','F8');
edtCapF19.text := cqrini.ReadString(C_INI_FILE_SECTION,'CapF19','F9');
edtCapF20.text := cqrini.ReadString(C_INI_FILE_SECTION,'CapF20','F10');
SP := cqrini.ReadBool('CW','S&P',True);
rgEnter.ItemIndex := cqrini.ReadInteger(C_INI_FILE_SECTION,'EnterFunction',1);
if SP then pgMemories.ActivePageIndex:=0
else
pgMemories.ActivePageIndex:=1;
end;
procedure TfrmKeyTexts.FormClose(Sender: TObject; var CloseAction: TCloseAction);
@ -136,6 +217,7 @@ end;
procedure TfrmKeyTexts.btnOKClick(Sender: TObject);
begin
cqrini.SectionErase(C_INI_FILE_SECTION); //this cleans section to keep only memory keys, other settings in CWnr sections
cqrini.WriteString(C_INI_FILE_SECTION,'F1',edtF1.Text);
cqrini.WriteString(C_INI_FILE_SECTION,'F2',edtF2.Text);
cqrini.WriteString(C_INI_FILE_SECTION,'F3',edtF3.Text);
@ -156,10 +238,35 @@ begin
cqrini.WriteString(C_INI_FILE_SECTION,'CapF8',edtCapF8.Text);
cqrini.WriteString(C_INI_FILE_SECTION,'CapF9',edtCapF9.Text);
cqrini.WriteString(C_INI_FILE_SECTION,'CapF10',edtCapF10.Text);
cqrini.WriteString(C_INI_FILE_SECTION,'F11',edtF11.Text);
cqrini.WriteString(C_INI_FILE_SECTION,'F12',edtF12.Text);
cqrini.WriteString(C_INI_FILE_SECTION,'F13',edtF13.Text);
cqrini.WriteString(C_INI_FILE_SECTION,'F14',edtF14.Text);
cqrini.WriteString(C_INI_FILE_SECTION,'F15',edtF15.Text);
cqrini.WriteString(C_INI_FILE_SECTION,'F16',edtF16.Text);
cqrini.WriteString(C_INI_FILE_SECTION,'F17',edtF17.Text);
cqrini.WriteString(C_INI_FILE_SECTION,'F18',edtF18.Text);
cqrini.WriteString(C_INI_FILE_SECTION,'F19',edtF19.Text);
cqrini.WriteString(C_INI_FILE_SECTION,'F20',edtF20.Text);
cqrini.WriteString(C_INI_FILE_SECTION,'CapF11',edtCapF11.Text);
cqrini.WriteString(C_INI_FILE_SECTION,'CapF12',edtCapF12.Text);
cqrini.WriteString(C_INI_FILE_SECTION,'CapF13',edtCapF13.Text);
cqrini.WriteString(C_INI_FILE_SECTION,'CapF14',edtCapF14.Text);
cqrini.WriteString(C_INI_FILE_SECTION,'CapF15',edtCapF15.Text);
cqrini.WriteString(C_INI_FILE_SECTION,'CapF16',edtCapF16.Text);
cqrini.WriteString(C_INI_FILE_SECTION,'CapF17',edtCapF17.Text);
cqrini.WriteString(C_INI_FILE_SECTION,'CapF18',edtCapF18.Text);
cqrini.WriteString(C_INI_FILE_SECTION,'CapF19',edtCapF19.Text);
cqrini.WriteString(C_INI_FILE_SECTION,'CapF20',edtCapF20.Text);
cqrini.WriteBool('CW','S&P',SP);
cqrini.WriteInteger(C_INI_FILE_SECTION,'EnterFunction',rgEnter.ItemIndex);
cqrini.SaveToDisk;
ModalResult := mrOK
end;
procedure TfrmKeyTexts.LoadMsgClick(Sender: TObject);
var
CwM : TIniFile;
@ -189,6 +296,28 @@ begin
edtCapF8.text := CWM.ReadString(C_INI_FILE_SECTION,'CapF8','F8');
edtCapF9.text := CWM.ReadString(C_INI_FILE_SECTION,'CapF9','F9');
edtCapF10.text := CWM.ReadString(C_INI_FILE_SECTION,'CapF10','F10');
edtF11.text := CWM.ReadString(C_INI_FILE_SECTION,'F11','cq cq de %mc %mc pse K');
edtF12.text := CWM.ReadString(C_INI_FILE_SECTION,'F12','');
edtF13.text := CWM.ReadString(C_INI_FILE_SECTION,'F13','');
edtF14.text := CWM.ReadString(C_INI_FILE_SECTION,'F14','');
edtF15.text := CWM.ReadString(C_INI_FILE_SECTION,'F15','');
edtF16.text := CWM.ReadString(C_INI_FILE_SECTION,'F16','');
edtF17.text := CWM.ReadString(C_INI_FILE_SECTION,'F17','');
edtF18.text := CWM.ReadString(C_INI_FILE_SECTION,'F18','');
edtF19.text := CWM.ReadString(C_INI_FILE_SECTION,'F19','');
edtF20.text := CWM.ReadString(C_INI_FILE_SECTION,'F20','');
edtCapF11.text := CWM.ReadString(C_INI_FILE_SECTION,'CapF11','F1 - CQ');
edtCapF12.text := CWM.ReadString(C_INI_FILE_SECTION,'CapF12','F2');
edtCapF13.text := CWM.ReadString(C_INI_FILE_SECTION,'CapF13','F3');
edtCapF14.text := CWM.ReadString(C_INI_FILE_SECTION,'CapF14','F4');
edtCapF15.text := CWM.ReadString(C_INI_FILE_SECTION,'CapF15','F5');
edtCapF16.text := CWM.ReadString(C_INI_FILE_SECTION,'CapF16','F6');
edtCapF17.text := CWM.ReadString(C_INI_FILE_SECTION,'CapF17','F7');
edtCapF18.text := CWM.ReadString(C_INI_FILE_SECTION,'CapF18','F8');
edtCapF19.text := CWM.ReadString(C_INI_FILE_SECTION,'CapF19','F9');
edtCapF20.text := CWM.ReadString(C_INI_FILE_SECTION,'CapF20','F10');
rgEnter.ItemIndex := CWM.ReadInteger(C_INI_FILE_SECTION,'EnterFunction',1);
finally
FreeAndNil(CWM);
@ -225,6 +354,28 @@ begin
CWM.WriteString(C_INI_FILE_SECTION,'CapF8',edtCapF8.Text);
CWM.WriteString(C_INI_FILE_SECTION,'CapF9',edtCapF9.Text);
CWM.WriteString(C_INI_FILE_SECTION,'CapF10',edtCapF10.Text);
CWM.WriteString(C_INI_FILE_SECTION,'F11',edtF11.Text);
CWM.WriteString(C_INI_FILE_SECTION,'F12',edtF12.Text);
CWM.WriteString(C_INI_FILE_SECTION,'F13',edtF13.Text);
CWM.WriteString(C_INI_FILE_SECTION,'F14',edtF14.Text);
CWM.WriteString(C_INI_FILE_SECTION,'F15',edtF15.Text);
CWM.WriteString(C_INI_FILE_SECTION,'F16',edtF16.Text);
CWM.WriteString(C_INI_FILE_SECTION,'F17',edtF17.Text);
CWM.WriteString(C_INI_FILE_SECTION,'F18',edtF18.Text);
CWM.WriteString(C_INI_FILE_SECTION,'F19',edtF19.Text);
CWM.WriteString(C_INI_FILE_SECTION,'F20',edtF20.Text);
CWM.WriteString(C_INI_FILE_SECTION,'CapF11',edtCapF11.Text);
CWM.WriteString(C_INI_FILE_SECTION,'CapF12',edtCapF12.Text);
CWM.WriteString(C_INI_FILE_SECTION,'CapF13',edtCapF13.Text);
CWM.WriteString(C_INI_FILE_SECTION,'CapF14',edtCapF14.Text);
CWM.WriteString(C_INI_FILE_SECTION,'CapF15',edtCapF15.Text);
CWM.WriteString(C_INI_FILE_SECTION,'CapF16',edtCapF16.Text);
CWM.WriteString(C_INI_FILE_SECTION,'CapF17',edtCapF17.Text);
CWM.WriteString(C_INI_FILE_SECTION,'CapF18',edtCapF18.Text);
CWM.WriteString(C_INI_FILE_SECTION,'CapF19',edtCapF19.Text);
CWM.WriteString(C_INI_FILE_SECTION,'CapF20',edtCapF20.Text);
CWM.WriteInteger(C_INI_FILE_SECTION,'EnterFunction',rgEnter.ItemIndex);
CWM.UpdateFile;
finally

View File

@ -44,6 +44,7 @@ type
procedure UploadDataToHamQTH(ToAll : Boolean = False);
procedure UploadDataToClubLog(ToAll : Boolean = False);
procedure UploadDataToHrdLog(ToAll : Boolean = False);
procedure UploadDataToUDPLog(ToAll : Boolean = False);
procedure UploadDataToAll;
procedure SyncUploadInformation;
end;
@ -110,6 +111,17 @@ begin
end;
Result := False
end
end;
upUDPLog : begin
if not cqrini.ReadBool('OnlineLog','UdUP',False) then
begin
if (not ToAll) then
begin
frmLogUploadStatus.SyncMsg := Format(C_IS_NOT_ENABLED,['UDPLog']);
Synchronize(@frmLogUploadStatus.SyncUploadInformation)
end;
Result := False
end
end
end //case
end;
@ -126,7 +138,7 @@ var
ResultCode : Integer;
Command : String;
UpSuccess : Boolean = False;
FatalError : Boolean = False;
ErrorCode : Integer = 0;
AlreadyDel : Boolean = False;
begin
data := TStringList.Create;
@ -181,17 +193,22 @@ begin
begin
ToMainThread('Uploading '+dmLogUpload.Q.FieldByName('callsign').AsString,'');
dmLogUpload.PrepareInsertHeader(WhereToUpload,dmLogUpload.Q.Fields[0].AsInteger,dmLogUpload.Q.FieldByName('id_cqrlog_main').AsInteger,data);
UpSuccess := dmLogUpload.UploadLogData(dmLogUpload.GetUploadUrl(WhereToUpload,Command),data,Response,ResultCode)
UpSuccess := dmLogUpload.UploadLogData(WhereToUpload,Command,data,Response,ResultCode)
end
else if (Command = 'UPDATE') then
begin
ToMainThread('Deleting original '+dmLogUpload.Q.FieldByName('old_callsign').AsString,'');
if dmLogUpload.Q.FieldByName('upddeleted').asInteger = 1 then
if (WhereToUpload=upUDPLog) then
begin
dmLogUpload.PrepareDeleteHeader(WhereToUpload,dmLogUpload.Q.Fields[0].AsInteger,data);
UpSuccess := True;
Response := '';
ResultCode := 200
end
else if dmLogUpload.Q.FieldByName('upddeleted').asInteger = 1 then
begin
ToMainThread('Deleting original '+dmLogUpload.Q.FieldByName('old_callsign').AsString,'');
dmLogUpload.PrepareDeleteHeader(WhereToUpload,dmLogUpload.Q.Fields[0].AsInteger,dmLogUpload.Q.FieldByName('id_cqrlog_main').AsInteger,data);
if dmData.DebugLevel >= 1 then
begin
@ -199,12 +216,12 @@ begin
Writeln(data.Text)
end;
UpSuccess := dmLogUpload.UploadLogData(dmLogUpload.GetUploadUrl(WhereToUpload,'DELETE'),data,Response,ResultCode);
UpSuccess := dmLogUpload.UploadLogData(WhereToUpload,'DELETE',data,Response,ResultCode);
if dmData.DebugLevel >= 1 then
begin
Writeln('Response :',Response);
Writeln('ResultCode:',ResultCode)
Writeln('Response : ',Response);
Writeln('ResultCode: ',ResultCode)
end
end
else begin
@ -216,20 +233,24 @@ begin
if UpSuccess then
begin
Response := dmLogUpload.GetResultMessage(WhereToUpload,Response,ResultCode,FatalError);
if FatalError then
Response := dmLogUpload.GetResultMessage(WhereToUpload,Response,ResultCode,ErrorCode);
if (ErrorCode = 1) then
begin
ToMainThread('Could not delete original QSO data!','');
Break
end
else
else if (ErrorCode = 2) then
begin
ToMainThread('Could not delete original QSO data. Reason: ' + Response,'');
end
else if (WhereToUpload<>upUDPLog) then
ToMainThread('','OK');
AlreadyDel := True;
data.Clear;
dmLogUpload.PrepareUserInfoHeader(WhereToUpload,data);
ToMainThread('Uploading updated '+dmLogUpload.Q.FieldByName('callsign').AsString,'');
dmLogUpload.PrepareInsertHeader(WhereToUpload,dmLogUpload.Q.Fields[0].AsInteger,dmLogUpload.Q.FieldByName('id_cqrlog_main').AsInteger,data);
UpSuccess := dmLogUpload.UploadLogData(dmLogUpload.GetUploadUrl(WhereToUpload,Command),data,Response,ResultCode)
UpSuccess := dmLogUpload.UploadLogData(WhereToUpload,Command,data,Response,ResultCode)
end
else
ToMainThread('Update failed! Check Internet connection','')
@ -237,8 +258,8 @@ begin
else if (Command = 'DELETE') then
begin
ToMainThread('Deleting '+dmLogUpload.Q.FieldByName('old_callsign').AsString,'');
dmLogUpload.PrepareDeleteHeader(WhereToUpload,dmLogUpload.Q.Fields[0].AsInteger,data);
UpSuccess := dmLogUpload.UploadLogData(dmLogUpload.GetUploadUrl(WhereToUpload,Command),data,Response,ResultCode)
dmLogUpload.PrepareDeleteHeader(WhereToUpload,dmLogUpload.Q.Fields[0].AsInteger,dmLogUpload.Q.FieldByName('id_cqrlog_main').AsInteger,data);
UpSuccess := dmLogUpload.UploadLogData(WhereToUpload,Command,data,Response,ResultCode)
end;
if dmData.DebugLevel >= 1 then
@ -246,20 +267,20 @@ begin
Writeln('data.Text:');
Writeln(data.Text);
Writeln('-----------');
Writeln('Response :',Response);
Writeln('ResultCode:',ResultCode);
Writeln('Response : ',Response);
Writeln('ResultCode: ',ResultCode);
Writeln('-----------')
end;
if UpSuccess then
begin
Response := dmLogUpload.GetResultMessage(WhereToUpload,Response,ResultCode,FatalError);
Response := dmLogUpload.GetResultMessage(WhereToUpload,Response,ResultCode,ErrorCode);
if (Response='OK') then
ToMainThread('','OK')
else
ToMainThread(Response,'');
if FatalError then
if (ErrorCode = 1) then
begin
if AlreadyDel then //if cmd was update, delete was successful but new insert was not
begin
@ -276,14 +297,14 @@ begin
dmLogUpload.MarkAsUpDeleted(dmLogUpload.Q.Fields[0].AsInteger)
end;
ToMainThread('Upload failed! Check Internet connection','');
FatalError := True;
ErrorCode := 1;
Break
end;
Sleep(2000); //we don't want to make small DDOS attack to server
dmLogUpload.Q.Next
end; //while not dmLogUpload.Q.Eof do
if not FatalError then
if not (ErrorCode = 1) then
ToMainThread('Done ...','')
finally
dmLogUpload.Q.Close;
@ -306,7 +327,8 @@ begin
case WhereToUpload of
upHamQTH : Result := C_HAMQTH;
upClubLog : Result := C_CLUBLOG;
upHrdlog : Result := C_HRDLOG
upHrdlog : Result := C_HRDLOG;
upUDPLog : Result := C_UDPLOG
end //case
end;
@ -443,11 +465,17 @@ begin
UploadDataToOnlineLogs(upHrdLog, ToAll)
end;
procedure TfrmLogUploadStatus.UploadDataToUDPLog(ToAll : Boolean = False);
begin
UploadDataToOnlineLogs(upUDPLog, ToAll)
end;
procedure TfrmLogUploadStatus.UploadDataToAll;
begin
UploadDataToOnlineLogs(upHamQTH, True);
UploadDataToOnlineLogs(upClubLog, True);
UploadDataToOnlineLogs(upHrdLog, True)
UploadDataToOnlineLogs(upHrdLog, True);
UploadDataToOnlineLogs(upUDPLog, True)
end;
end.

Some files were not shown because too many files have changed in this diff Show More