logbook

package
v0.22.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExchangeFieldsChangedListener added in v0.10.0

type ExchangeFieldsChangedListener interface {
	ExchangeFieldsChanged(myExchangeFields []core.ExchangeField, theirExchangeFields []core.ExchangeField)
}

type ExchangeFieldsChangedListenerFunc added in v0.10.0

type ExchangeFieldsChangedListenerFunc func(myExchangeFields []core.ExchangeField, theirExchangeFields []core.ExchangeField)

func (ExchangeFieldsChangedListenerFunc) ExchangeFieldsChanged added in v0.10.0

func (f ExchangeFieldsChangedListenerFunc) ExchangeFieldsChanged(myExchangeFields []core.ExchangeField, theirExchangeFields []core.ExchangeField)

type Logbook

type Logbook struct {
	// contains filtered or unexported fields
}

func Load

func Load(clock core.Clock, qsos []core.QSO) *Logbook

Load creates a new log and loads it with the entries from the given reader.

func New

func New(clock core.Clock) *Logbook

New creates a new empty logbook.

func (*Logbook) All added in v0.4.0

func (l *Logbook) All() []core.QSO

func (*Logbook) ClearRowAddedListeners

func (l *Logbook) ClearRowAddedListeners()

func (*Logbook) LastBand added in v0.2.0

func (l *Logbook) LastBand() core.Band

func (*Logbook) LastExchange added in v0.10.0

func (l *Logbook) LastExchange() []string

func (*Logbook) LastMode added in v0.2.0

func (l *Logbook) LastMode() core.Mode

func (*Logbook) Log

func (l *Logbook) Log(qso core.QSO)

func (*Logbook) NextNumber

func (l *Logbook) NextNumber() core.QSONumber

func (*Logbook) OnRowAdded

func (l *Logbook) OnRowAdded(listener RowAddedListener)

func (*Logbook) ReplayAll

func (l *Logbook) ReplayAll()

func (*Logbook) SetWriter

func (l *Logbook) SetWriter(writer Writer)

func (*Logbook) WriteAll

func (l *Logbook) WriteAll(writer Writer) error

type QSOAddedListener

type QSOAddedListener interface {
	QSOAdded(core.QSO)
}

type QSOAddedListenerFunc

type QSOAddedListenerFunc func(core.QSO)

func (QSOAddedListenerFunc) QSOAdded

func (f QSOAddedListenerFunc) QSOAdded(qso core.QSO)

type QSOList

type QSOList struct {
	// contains filtered or unexported fields
}

QSOList is thread-safe.

func NewQSOList

func NewQSOList(settings core.Settings, scorer QSOScorer) *QSOList

func (*QSOList) All

func (l *QSOList) All() []core.QSO

func (*QSOList) Clear

func (l *QSOList) Clear()

func (*QSOList) ContestChanged added in v0.6.0

func (l *QSOList) ContestChanged(contest core.Contest)

func (*QSOList) Fill added in v0.10.0

func (l *QSOList) Fill(qsos []core.QSO)

func (*QSOList) FindDuplicateQSOs added in v0.4.0

func (l *QSOList) FindDuplicateQSOs(callsign callsign.Callsign, band core.Band, mode core.Mode) []core.QSO

func (*QSOList) FindWorkedQSOs added in v0.4.0

func (l *QSOList) FindWorkedQSOs(callsign callsign.Callsign, band core.Band, mode core.Mode) ([]core.QSO, bool)

func (*QSOList) GetExchangeFields added in v0.10.0

func (l *QSOList) GetExchangeFields() ([]core.ExchangeField, []core.ExchangeField)

func (*QSOList) GetQSOs added in v0.4.0

func (l *QSOList) GetQSOs(numbers []core.QSONumber) []core.QSO

func (*QSOList) Notify

func (l *QSOList) Notify(listener any)

func (*QSOList) Put

func (l *QSOList) Put(qso core.QSO)

func (*QSOList) SelectLastQSO

func (l *QSOList) SelectLastQSO()

func (*QSOList) SelectRow

func (l *QSOList) SelectRow(index int)

func (*QSOList) Valid added in v0.6.0

func (l *QSOList) Valid() bool

type QSOScorer added in v0.10.0

type QSOScorer interface {
	Clear()
	AddMuted(qso core.QSO) core.QSOScore
	Unmute()
}

type QSOSelectedListener

type QSOSelectedListener interface {
	QSOSelected(core.QSO)
}

type QSOSelectedListenerFunc

type QSOSelectedListenerFunc func(core.QSO)

func (QSOSelectedListenerFunc) QSOSelected

func (f QSOSelectedListenerFunc) QSOSelected(qso core.QSO)

type QSOsClearedListener

type QSOsClearedListener interface {
	QSOsCleared()
}

type QSOsClearedListenerFunc

type QSOsClearedListenerFunc func()

func (QSOsClearedListenerFunc) QSOsCleared added in v0.2.0

func (f QSOsClearedListenerFunc) QSOsCleared()

type RowAddedListener

type RowAddedListener func(core.QSO)

RowAddedListener is notified when a new row is added to the log.

type RowSelectedListener

type RowSelectedListener interface {
	RowSelected(int)
}

type RowSelectedListenerFunc

type RowSelectedListenerFunc func(int)

func (RowSelectedListenerFunc) RowSelected

func (f RowSelectedListenerFunc) RowSelected(index int)

type Writer

type Writer interface {
	WriteQSO(core.QSO) error
}

Writer writes log entries.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL