testquestion

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClickText added in v0.1.9

type ClickText struct {
	*widget.RichText
	// contains filtered or unexported fields
}

func NewClickText added in v0.1.9

func NewClickText(question *TestQuestion, choice testparts.GormQuestionChoice) *ClickText

func (*ClickText) Correct added in v0.1.9

func (ct *ClickText) Correct() bool

func (*ClickText) SetSelected added in v0.1.9

func (ct *ClickText) SetSelected()

func (*ClickText) Tapped added in v0.1.9

func (ct *ClickText) Tapped(p *fyne.PointEvent)

type LabelRadioGroup

type LabelRadioGroup struct {
	widget.RadioGroup
	// contains filtered or unexported fields
}

func NewLabelRadioGroup

func NewLabelRadioGroup(question *TestQuestion, options []string,
	change func(string)) *LabelRadioGroup

func (*LabelRadioGroup) Add added in v0.1.8

func (l *LabelRadioGroup) Add(options ...string)

func (*LabelRadioGroup) Answer

func (l *LabelRadioGroup) Answer() string

func (*LabelRadioGroup) SetSelect

func (l *LabelRadioGroup) SetSelect(keyPressed fyne.KeyName)

type TestQuestion

type TestQuestion struct {
	Question   *testparts.GormQuestion
	Options    *LabelRadioGroup
	OptionList *arraylist.List[*ClickText]
	Answer     string
	Done       bool
	// contains filtered or unexported fields
}

func NewTestQuestion

func NewTestQuestion(question *testparts.GormQuestion, allocTime time.Duration,
	next *widget.Button) *TestQuestion

func (*TestQuestion) AnswerID added in v0.1.9

func (q *TestQuestion) AnswerID() uint

func (*TestQuestion) Ask

func (q *TestQuestion) Ask(countDown *widget.ProgressBar, content *fyne.Container,
	fullWindow *fyne.Container, qDone *sync.WaitGroup)

func (*TestQuestion) Correct added in v0.1.8

func (q *TestQuestion) Correct() bool

func (*TestQuestion) SetSelect added in v0.1.9

func (q *TestQuestion) SetSelect(keyPressed fyne.KeyName)

func (*TestQuestion) Show

func (q *TestQuestion) Show() *fyne.Container

Jump to

Keyboard shortcuts

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