diff --git a/help/contest.html b/help/contest.html index 4066145..dad969f 100644 --- a/help/contest.html +++ b/help/contest.html @@ -65,16 +65,20 @@ Contest window has a simple dupe check that turns typed duplicate callsign bold

Contest window has following fields and checkboxes:

+
+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. +

Typical contest qso goes like this:
diff --git a/help/img/contest.png b/help/img/contest.png index 84d8d5d..28bd4ff 100644 Binary files a/help/img/contest.png and b/help/img/contest.png differ diff --git a/src/fContest.lfm b/src/fContest.lfm index 5707a36..26d8e4b 100644 --- a/src/fContest.lfm +++ b/src/fContest.lfm @@ -1,26 +1,26 @@ object frmContest: TfrmContest Left = 370 - Height = 177 + Height = 178 Top = 281 - Width = 700 + Width = 697 HelpType = htKeyword HelpKeyword = 'help/contest.html' Caption = 'Contest' - ClientHeight = 177 - ClientWidth = 700 + ClientHeight = 178 + ClientWidth = 697 OnClose = FormClose OnCreate = FormCreate OnHide = FormHide OnKeyDown = FormKeyDown OnShow = FormShow - LCLVersion = '2.0.6.0' + LCLVersion = '2.0.12.0' object edtCall: TEdit AnchorSideLeft.Control = lblContestName AnchorSideTop.Control = lblCall AnchorSideTop.Side = asrBottom Left = 17 - Height = 25 - Top = 59 + Height = 33 + Top = 55 Width = 140 AutoSelect = False CharCase = ecUppercase @@ -35,20 +35,20 @@ object frmContest: TfrmContest AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = edtCall Left = 157 - Height = 25 - Top = 59 + Height = 33 + Top = 55 Width = 50 OnKeyDown = edtCallKeyDown - TabOrder = 6 + TabOrder = 7 end object edtSTX: TEdit AnchorSideLeft.Control = edtRSTs AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = edtRSTs Left = 207 - Height = 25 + Height = 33 Hint = 'contest serial number sent, max 6 characters' - Top = 59 + Top = 55 Width = 50 MaxLength = 6 OnExit = edtSTXExit @@ -56,16 +56,16 @@ object frmContest: TfrmContest OnKeyPress = edtSTXKeyPress ParentShowHint = False ShowHint = True - TabOrder = 7 + TabOrder = 8 end object edtSTXStr: TEdit AnchorSideLeft.Control = edtSTX AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = edtSTX Left = 257 - Height = 25 + Height = 33 Hint = 'contest exchange message sent, max 50 characters' - Top = 59 + Top = 55 Width = 100 MaxLength = 50 OnEnter = edtSTXStrEnter @@ -73,15 +73,15 @@ object frmContest: TfrmContest OnKeyDown = edtCallKeyDown ParentShowHint = False ShowHint = True - TabOrder = 8 + TabOrder = 9 end object edtRSTr: TEdit AnchorSideLeft.Control = edtSTXStr AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = edtSTXStr Left = 373 - Height = 25 - Top = 59 + Height = 33 + Top = 55 Width = 50 BorderSpacing.Left = 16 OnKeyDown = edtCallKeyDown @@ -92,9 +92,9 @@ object frmContest: TfrmContest AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = edtRSTr Left = 423 - Height = 25 + Height = 33 Hint = 'contest serial number received, max 6 characters' - Top = 59 + Top = 55 Width = 50 MaxLength = 6 OnExit = edtSRXExit @@ -110,7 +110,7 @@ object frmContest: TfrmContest AnchorSideTop.Control = lblMSGr Left = 589 Height = 30 - Top = 42 + Top = 40 Width = 80 BorderSpacing.Left = 16 Caption = 'Save QSO' @@ -122,9 +122,9 @@ object frmContest: TfrmContest AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = edtRSTr Left = 473 - Height = 25 + Height = 33 Hint = 'contest exchange message sent, max 50 characters' - Top = 59 + Top = 55 Width = 100 MaxLength = 50 OnChange = edtSRXStrChange @@ -138,9 +138,9 @@ object frmContest: TfrmContest AnchorSideTop.Control = chkTabAll AnchorSideTop.Side = asrBottom Left = 17 - Height = 17 - Top = 42 - Width = 26 + Height = 15 + Top = 40 + Width = 25 BorderSpacing.Top = 1 Caption = 'Call' ParentColor = False @@ -148,8 +148,8 @@ object frmContest: TfrmContest object lblRSTs: TLabel AnchorSideTop.Control = lblCall Left = 161 - Height = 17 - Top = 42 + Height = 15 + Top = 40 Width = 36 Caption = 'RST s' ParentColor = False @@ -157,36 +157,36 @@ object frmContest: TfrmContest object lblMSGs: TLabel AnchorSideTop.Control = lblNRs Left = 257 - Height = 17 - Top = 42 - Width = 42 + Height = 15 + Top = 40 + Width = 41 Caption = 'MSG s' ParentColor = False end object lblRSTr: TLabel AnchorSideTop.Control = lblMSGs Left = 377 - Height = 17 - Top = 42 - Width = 36 + Height = 15 + Top = 40 + Width = 34 Caption = 'RST r' ParentColor = False end object lblNRr: TLabel AnchorSideTop.Control = lblRSTr Left = 425 - Height = 17 - Top = 42 - Width = 30 + Height = 15 + Top = 40 + Width = 28 Caption = 'NR r' ParentColor = False end object lblMSGr: TLabel AnchorSideTop.Control = lblNRr Left = 481 - Height = 17 - Top = 42 - Width = 41 + Height = 15 + Top = 40 + Width = 39 Caption = 'MSG r' ParentColor = False end @@ -195,20 +195,20 @@ object frmContest: TfrmContest AnchorSideTop.Control = chkTrueRST Left = 207 Height = 23 - Top = 84 + Top = 88 Width = 45 Caption = 'Inc' OnChange = chkNRIncChange OnClick = chkNRIncClick - TabOrder = 13 + TabOrder = 14 TabStop = False end object lblNRs: TLabel AnchorSideTop.Control = lblRSTs Left = 209 - Height = 17 - Top = 42 - Width = 31 + Height = 15 + Top = 40 + Width = 30 Caption = 'NR s' ParentColor = False end @@ -217,10 +217,10 @@ object frmContest: TfrmContest AnchorSideTop.Control = chkNoNr Left = 473 Height = 23 - Top = 84 - Width = 102 + Top = 88 + Width = 101 Caption = 'MSG is LOC' - TabOrder = 14 + TabOrder = 15 TabStop = False end object chkSpace: TCheckBox @@ -229,10 +229,10 @@ object frmContest: TfrmContest AnchorSideTop.Side = asrBottom Left = 17 Height = 23 - Top = 84 - Width = 114 + Top = 88 + Width = 113 Caption = 'SPACE is TAB' - TabOrder = 10 + TabOrder = 11 TabStop = False end object chkNoNr: TCheckBox @@ -240,11 +240,11 @@ object frmContest: TfrmContest AnchorSideTop.Control = chkNRInc Left = 423 Height = 23 - Top = 84 - Width = 45 + Top = 88 + Width = 44 Caption = 'No' OnChange = chkNoNrChange - TabOrder = 12 + TabOrder = 13 TabStop = False end object chkTrueRST: TCheckBox @@ -252,31 +252,31 @@ object frmContest: TfrmContest AnchorSideTop.Control = chkSpace Left = 157 Height = 23 - Top = 84 - Width = 48 + Top = 88 + Width = 46 Caption = 'Tru' OnChange = chkTrueRSTChange - TabOrder = 11 + TabOrder = 12 TabStop = False end - object btClearAll: TButton + object btClearQso: TButton AnchorSideLeft.Control = btSave AnchorSideTop.Control = btSave AnchorSideTop.Side = asrBottom Left = 589 Height = 30 - Top = 74 + Top = 72 Width = 80 BorderSpacing.Top = 2 - Caption = 'Clear all' - OnClick = btClearAllClick - TabOrder = 5 + Caption = 'Clear QSO' + OnClick = btClearQsoClick + TabOrder = 6 end object btnHelp: TSpeedButton AnchorSideTop.Control = Owner AnchorSideRight.Control = Owner AnchorSideRight.Side = asrBottom - Left = 672 + Left = 669 Height = 25 Hint = 'Help' Top = 3 @@ -324,27 +324,29 @@ object frmContest: TfrmContest AnchorSideLeft.Control = Owner AnchorSideTop.Control = cmbContestName Left = 17 - Height = 17 + Height = 15 Top = 1 - Width = 95 + Width = 91 BorderSpacing.Left = 17 Caption = 'Contest name' ParentColor = False end object cmbContestName: TComboBox - AnchorSideLeft.Control = lblContestName AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = Owner - Left = 118 - Height = 25 + AnchorSideRight.Control = edtSRXStr + AnchorSideRight.Side = asrBottom + Left = 141 + Height = 33 Hint = 'contestname, choose ADIF contest_id via combobox or type freestyle max 40 characters' Top = 1 Width = 432 + Anchors = [akTop, akRight] AutoComplete = True AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending] - BorderSpacing.Left = 6 + BorderSpacing.Left = 30 BorderSpacing.Top = 1 - ItemHeight = 17 + ItemHeight = 0 Items.Strings = ( '070-160M-SPRINT' '070-3-DAY' @@ -574,7 +576,7 @@ object frmContest: TfrmContest MaxLength = 40 ParentShowHint = False ShowHint = True - TabOrder = 9 + TabOrder = 10 TabStop = False end object chkQsp: TCheckBox @@ -582,11 +584,11 @@ object frmContest: TfrmContest AnchorSideTop.Control = chkNRInc Left = 257 Height = 23 - Top = 84 - Width = 53 + Top = 88 + Width = 51 Caption = 'Qsp' OnChange = chkQspChange - TabOrder = 15 + TabOrder = 16 TabStop = False end object chkTabAll: TCheckBox @@ -595,11 +597,11 @@ object frmContest: TfrmContest AnchorSideTop.Side = asrBottom Left = 17 Height = 23 - Top = 18 - Width = 74 - Caption = 'TAB All' + Top = 16 + Width = 106 + Caption = 'TAB in order' OnChange = chkTabAllChange - TabOrder = 16 + TabOrder = 17 TabStop = False end object sbContest: TStatusBar @@ -607,9 +609,9 @@ object frmContest: TfrmContest AnchorSideRight.Control = Owner AnchorSideBottom.Control = Owner Left = 0 - Height = 22 - Top = 155 - Width = 700 + Height = 18 + Top = 160 + Width = 697 Panels = < item Text = '0' @@ -638,9 +640,9 @@ object frmContest: TfrmContest AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = cmbContestName AnchorSideTop.Side = asrCenter - Left = 568 + Left = 591 Height = 1 - Top = 13 + Top = 17 Width = 1 BorderSpacing.Left = 18 ParentColor = False @@ -651,41 +653,59 @@ object frmContest: TfrmContest AnchorSideTop.Side = asrBottom Left = 17 Height = 23 - Top = 115 - Width = 104 + Top = 119 + Width = 102 BorderSpacing.Left = 17 BorderSpacing.Top = 8 Caption = 'Dupe check' Checked = True - TabOrder = 20 - TabStop = True + TabOrder = 21 end object rbNoMode4Dupe: TRadioButton + AnchorSideLeft.Control = rbDupeCheck + AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = chkTrueRST AnchorSideTop.Side = asrBottom - Left = 152 + Left = 157 Height = 23 - Top = 115 - Width = 129 + Top = 119 + Width = 122 + BorderSpacing.Left = 38 BorderSpacing.Top = 8 Caption = 'NoMode4Dupe' - TabOrder = 18 + TabOrder = 19 end object rbIgnoreDupes: TRadioButton + AnchorSideLeft.Control = rbNoMode4Dupe + AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = edtSTXStr AnchorSideTop.Side = asrBottom - Left = 311 + Left = 317 Height = 23 - Top = 115 - Width = 115 + Top = 119 + Width = 110 + BorderSpacing.Left = 38 BorderSpacing.Top = 31 Caption = 'Ignore dupes' - TabOrder = 19 + TabOrder = 20 + end + object btClearAll: TButton + AnchorSideLeft.Control = btSave + AnchorSideTop.Control = rbDupeCheck + AnchorSideTop.Side = asrCenter + Left = 589 + Height = 30 + Top = 115 + Width = 80 + Caption = 'Clear All' + OnClick = btClearAllClick + TabOrder = 5 + TabStop = False end object tmrESC2: TTimer Enabled = False OnTimer = tmrESC2Timer - left = 672 - top = 112 + Left = 672 + Top = 112 end end diff --git a/src/fContest.pas b/src/fContest.pas index 74700b9..055841a 100644 --- a/src/fContest.pas +++ b/src/fContest.pas @@ -13,8 +13,9 @@ type { TfrmContest } TfrmContest = class(TForm) + btClearAll: TButton; btSave: TButton; - btClearAll : TButton; + btClearQso : TButton; chkTabAll: TCheckBox; chkQsp: TCheckBox; chkTrueRST: TCheckBox; @@ -45,8 +46,9 @@ type rbIgnoreDupes: TRadioButton; sbContest: TStatusBar; tmrESC2: TTimer; + procedure btClearAllClick(Sender: TObject); procedure btSaveClick(Sender: TObject); - procedure btClearAllClick(Sender : TObject); + procedure btClearQsoClick(Sender : TObject); procedure chkNoNrChange(Sender: TObject); procedure chkNRIncChange(Sender: TObject); procedure chkNRIncClick(Sender : TObject); @@ -78,7 +80,8 @@ type procedure TabStopAllOn; procedure QspMsg; procedure ClearStatusBar; - procedure ShowStatusBarInfo(); + procedure ShowStatusBarInfo; + procedure SaveSettings; public { public declarations } end; @@ -209,30 +212,26 @@ begin frmNewQSO.edtCall.Text := edtCall.Text; - if (rbIgnoreDupes.Checked) then + if not (rbIgnoreDupes.Checked) then begin //dupe check dupe := frmWorkedGrids.WkdCall(edtCall.Text, dmUtils.GetBandFromFreq(frmNewQSO.cmbFreq.Text) ,frmNewQSO.cmbMode.Text); // 1= wkd this band and mode // 2= wkd this band but NOT this mode - if ((dupe = 1 ) or ((dupe = 2 ) and (rbNoMode4Dupe.Checked ))) then - begin //dupe - edtCall.Font.Color:=clRed; - edtCall.Font.Style:= [fsBold]; - frmNewQSO.edtRemQSO.Caption:='Dupe'; - end - else begin //clear dupe if user press 1xESC and change call not to be dupe - edtCall.Font.Color:=clDefault; - edtCall.Font.Style:= []; - frmNewQSO.edtRemQSO.Caption:=''; - end; - end - else begin - edtCall.Font.Color:=clDefault; - edtCall.Font.Style:= []; - frmNewQSO.edtRemQSO.Caption:=''; - end; - + if ( (rbNoMode4Dupe.Checked) and (dupe = 1) ) + or ( (not rbNoMode4Dupe.Checked) and ((dupe = 1) or (dupe=2)) )then + Begin + edtCall.Font.Color:=clRed; + edtCall.Font.Style:= [fsBold]; + frmNewQSO.edtRemQSO.Caption:='Dupe'; + end + else + Begin + edtCall.Font.Color:=clDefault; + edtCall.Font.Style:= []; + frmNewQSO.edtRemQSO.Caption:=''; + end; + end; //report in NEwQSO changes to 59 to late (after passing cmbMode) //NOTE! if mode is not in list program dies! In that case skip next if frmNewQSO.cmbMode.ItemIndex >=0 then @@ -277,9 +276,29 @@ begin Writeln('input finale'); ChkSerialNrUpd(chkNRInc.Checked); initInput; + SaveSettings; //we have to do this here, + //otherwise saved serial number fails if cqrlog is closed without first closing contest form end; -procedure TfrmContest.btClearAllClick(Sender : TObject); +procedure TfrmContest.btClearAllClick(Sender: TObject); +begin + rbDupeCheck.Checked := True; + rbNoMode4Dupe.Checked := False; + rbIgnoreDupes.Checked := False; + + chkSpace.Checked := False; + chkTrueRST.Checked := False; + chkNRInc.Checked := False; + chkQsp.Checked := False; + chkNoNr.Checked := False; + chkLoc.Checked := False; + + edtSTX.Text := ''; + edtSTXStr.Text := ''; + cmbContestName.Text:= ''; +end; + +procedure TfrmContest.btClearQsoClick(Sender : TObject); begin frmNewQSO.ClearAll; initInput @@ -385,8 +404,7 @@ begin frmContest.KeyPreview := True; dmUtils.InsertContests(cmbContestName); end; - -procedure TfrmContest.FormClose(Sender: TObject; var CloseAction: TCloseAction); +procedure TfrmContest.SaveSettings; begin dmUtils.SaveWindowPos(frmContest); @@ -403,6 +421,11 @@ begin cqrini.WriteString('frmContest', 'STX', edtSTX.Text); cqrini.WriteString('frmContest', 'STXStr', edtSTXStr.Text); + cqrini.WriteString('frmContest', 'ContestName', cmbContestName.Text); +end; +procedure TfrmContest.FormClose(Sender: TObject; var CloseAction: TCloseAction); +Begin + SaveSettings; end; procedure TfrmContest.FormHide(Sender: TObject); @@ -439,6 +462,7 @@ begin sbContest.Panels[3].Width := 65; sbContest.Panels[4].Width := 20; lblSpeed.Caption:= frmNewQSO.sbNewQSO.Panels[4].Text; + cmbContestName.Text := cqrini.ReadString('frmContest', 'ContestName',''); end; procedure TfrmContest.btnHelpClick(Sender : TObject); @@ -469,22 +493,7 @@ begin edtCall.Font.Style:= []; edtCall.Clear; EscFirstTime := True; - { - Next 3 lines of procedure will cause - ---- - either (dbg msg:input finale): - NOTE: Window with stalled focus found!, faking focus-out event - (cqrlog:2643): Pango-CRITICAL **: pango_layout_get_cursor_pos: assertion 'index >= 0 && index <= layout->length' failed - ---- - or(dbg msg: Clear all done next focus ): - - NOTE: Window with stalled focus found!, faking focus-out event - - ---- - All works, but this needs attention and I can not resolve this at the moment. - - } SetTabOrders; frmContest.ShowOnTop; frmContest.SetFocus; @@ -574,8 +583,15 @@ Begin btSave.TabStop := True; btSave.TabOrder := 7; - btClearAll.TabStop := True; - btClearAll.TabOrder := 8; + btClearQso.TabStop := True; + btClearQso.TabOrder := 8; + + rbDupeCheck.TabStop:=false; + rbNoMode4Dupe.TabStop:=false; + rbIgnoreDupes.TabStop:=false; + btClearAll.TabStop:=false; + chkTabAll.TabStop:=false; + cmbContestName.TabStop:=false; end; procedure TfrmContest.QspMsg; Begin @@ -597,7 +613,7 @@ Begin end; end; -procedure TfrmContest.ClearStatusBar(); +procedure TfrmContest.ClearStatusBar; var i : Integer; begin @@ -605,9 +621,9 @@ begin sbContest.Panels.Items[i].Text := ''; end; -procedure TfrmContest.ShowStatusBarInfo(); +procedure TfrmContest.ShowStatusBarInfo; begin - sbContest.Panels.Items[0].Text := Trim(frmNewQSO.mCountry.Text); + sbContest.Panels.Items[0].Text := StringReplace(Trim(frmNewQSO.mCountry.Text),#$0A,'|',[rfReplaceAll]); sbContest.Panels.Items[1].Text := 'WAZ: ' + frmNewQSO.lblWAZ.Caption; sbContest.Panels.Items[2].Text := 'ITU: ' + frmNewQSO.lblITU.Caption; sbContest.Panels.Items[3].Text := 'AZ: ' + frmNewQSO.lblAzi.Caption; diff --git a/src/uVersion.pas b/src/uVersion.pas index 90691aa..c0306e4 100644 --- a/src/uVersion.pas +++ b/src/uVersion.pas @@ -11,7 +11,7 @@ const cBUILD = 1; - cBUILD_DATE = '2021-11-20'; + cBUILD_DATE = '2021-11-22'; implementation