feat: Contest mode added

This commit is contained in:
2026-07-04 22:54:41 +02:00
parent dd4b0004a5
commit e590a58702
8 changed files with 292 additions and 7 deletions
+7
View File
@@ -29,6 +29,7 @@ import (
"hamlog/internal/cat"
"hamlog/internal/clublog"
"hamlog/internal/cluster"
"hamlog/internal/contest"
"hamlog/internal/cwdecode"
"hamlog/internal/db"
"hamlog/internal/dxcc"
@@ -3768,6 +3769,12 @@ func (a *App) writeCabrillo(path string, iterate func(func(qso.QSO) error) error
}
// ExportCabrillo writes every QSO to a Cabrillo file.
// ListContests returns the built-in contest catalogue (ADIF CONTEST_ID + default
// exchange), sorted by name, for the contest-mode picker.
func (a *App) ListContests() []contest.Def {
return contest.List()
}
func (a *App) ExportCabrillo(path string) (CabrilloResult, error) {
return a.writeCabrillo(path, func(fn func(qso.QSO) error) error { return a.qso.IterateAll(a.ctx, fn) })
}