widgets

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: MIT Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompactUI

type CompactUI struct {
	widget.BaseWidget
	// contains filtered or unexported fields
}

CompactUI is a compact user interface for the main Timetracker window

func NewCompactUI

func NewCompactUI() *CompactUI

NewCompactUI creates a new instance of the compact user interface

func (*CompactUI) CreateRenderer

func (c *CompactUI) CreateRenderer() fyne.WidgetRenderer

CreateRenderer returns a new WidgetRenderer for this widget

func (*CompactUI) IsRunning

func (c *CompactUI) IsRunning() bool

IsRunning returns the "task is running" status of the UI

func (*CompactUI) Observable

func (c *CompactUI) Observable() rxgo.Observable

Observable returns an RxGo Observable for the widget's command channel

func (*CompactUI) SelectTask

func (c *CompactUI) SelectTask(task models.Task)

SelectTask attempts to select the specified task from the list. If the task is nil, the selected task will be cleared.

func (*CompactUI) SetElapsedTime

func (c *CompactUI) SetElapsedTime(elapsed string)

SetElapsedTime sets the display text of the elapsed time label

func (*CompactUI) SetRunning

func (c *CompactUI) SetRunning(running bool)

SetRunning sets the "task is running" status of the UI

func (*CompactUI) SetSelectedTask

func (c *CompactUI) SetSelectedTask(task models.Task)

SetSelectedTask sets the selected task. The display will not be updated.

func (*CompactUI) SetTaskList

func (c *CompactUI) SetTaskList(taskModels models.TaskList)

SetTaskList sets the list of tasks displayed in the task selector widget

func (*CompactUI) SetTaskName

func (c *CompactUI) SetTaskName(name string)

SetTaskName sets the display text of the task name label

type CompactUIAboutEvent

type CompactUIAboutEvent struct{}

CompactUIAboutEvent represents an event which opens the About window

type CompactUICreateAndStartEvent

type CompactUICreateAndStartEvent struct{}

CompactUICreateAndStartEvent represents an event which creates and starts a new task

type CompactUIManageEvent

type CompactUIManageEvent struct{}

CompactUIManageEvent represents an event which opens the Manage window

type CompactUIQuitEvent

type CompactUIQuitEvent struct{}

CompactUIQuitEvent represents an event which exits the application

type CompactUIReportEvent

type CompactUIReportEvent struct{}

CompactUIReportEvent represents an event which opens the Report window

type CompactUISelectTaskEvent

type CompactUISelectTaskEvent struct{}

CompactUISelectTaskEvent represents an event which opens the task selector

type CompactUITaskEvent

type CompactUITaskEvent struct {
	// Task is the task object
	Task models.Task
	// TaskSynopsis is the synopsis of the task
	TaskSynopsis string
	// TaskIndex is the index of the task in the taskList
	TaskIndex int
}

CompactUITaskEvent represents an event which starts or stops a task

func (*CompactUITaskEvent) ShouldStopTask

func (c *CompactUITaskEvent) ShouldStopTask() bool

ShouldStopTask determines if the task event is meant to stop the running task

type MinWidthEntry

type MinWidthEntry struct {
	widget.Entry
	// contains filtered or unexported fields
}

MinWidthEntry is an entry widget which has a minimum width

func NewMinWidthEntry

func NewMinWidthEntry(minWidth float32, placeholder string) *MinWidthEntry

NewMinWidthEntry returns a new MinWidthEntry widget

func (*MinWidthEntry) MinSize

func (d *MinWidthEntry) MinSize() fyne.Size

MinSize is the minimum size of the widget

type Task

type Task struct {
	widget.BaseWidget
	// contains filtered or unexported fields
}

Task is the implementation of the Task widget. This is essentially TasklistItem v2.

func NewTask

func NewTask() *Task

NewTask returns a pointer to a newly initialized Task

func NewTaskWithData

func NewTaskWithData(taskData models.Task) *Task

NewTaskWithData returns a pointer to a new Task object initialized with the supplied taskData

func (*Task) CreateRenderer

func (t *Task) CreateRenderer() fyne.WidgetRenderer

CreateRenderer returns a new WidgetRenderer for this widget.

func (*Task) SetTask

func (t *Task) SetTask(taskData models.Task)

SetTask sets the task to be represented by the widget

func (*Task) Task

func (t *Task) Task() models.Task

Task returns the task currently represented by the widget

type TaskEditorV2

type TaskEditorV2 struct {
	widget.BaseWidget
	// contains filtered or unexported fields
}

TaskEditorV2 is the struct implementing the TaskEditorV2 widget. Use NewTaskEditorV2() to create a new instance of the widget.

func NewTaskEditorV2

func NewTaskEditorV2() *TaskEditorV2

NewTaskEditorV2 returns a pointer to a newly initialized instance of the TaskEditorV2 widget

func (*TaskEditorV2) CreateRenderer

func (t *TaskEditorV2) CreateRenderer() fyne.WidgetRenderer

CreateRenderer returns a new WidgetRenderer for this widget.

func (*TaskEditorV2) Reset

func (t *TaskEditorV2) Reset()

Reset resets the editor widget to its default state

func (*TaskEditorV2) SetTask

func (t *TaskEditorV2) SetTask(task models.Task)

SetTask sets the task to be edited

func (*TaskEditorV2) Task

func (t *TaskEditorV2) Task() models.Task

Task returns the task currently being edited

type TaskSelector

type TaskSelector struct {
	widget.BaseWidget
	// contains filtered or unexported fields
}

TaskSelector is the implementation of the task selector widget

func NewTaskSelector

func NewTaskSelector() *TaskSelector

NewTaskSelector returns a pointer to a new, initialized instance of TaskSelector

func (*TaskSelector) CreateRenderer

func (t *TaskSelector) CreateRenderer() fyne.WidgetRenderer

CreateRenderer returns a new WidgetRenderer for this widget.

func (*TaskSelector) FilterTasks

func (t *TaskSelector) FilterTasks()

FilterTasks loads and filters tasks from the database

func (*TaskSelector) HasSelected

func (t *TaskSelector) HasSelected() bool

HasSelected indicates whether a selection has been made or not

func (*TaskSelector) MinSize

func (t *TaskSelector) MinSize() fyne.Size

MinSize overrides the minimum size of this widget. A minimum width is enforced.

func (*TaskSelector) Observable

func (t *TaskSelector) Observable() rxgo.Observable

Observable returns an RxGo Observable for the widget's command channel

func (*TaskSelector) Reset

func (t *TaskSelector) Reset()

Reset resets the widget to its default state

func (*TaskSelector) Selected

func (t *TaskSelector) Selected() models.Task

Selected returns the selected task or nil if there is no selection

type TaskSelectorErrorEvent

type TaskSelectorErrorEvent struct {
	// Err is the underlying error
	Err error
}

TaskSelectorErrorEvent contains an error that occurred during the lifetime of the widget

type TaskSelectorSelectedEvent

type TaskSelectorSelectedEvent struct {
	// SelectedTask is the selected task item; nil if there is no selection
	SelectedTask models.Task
}

TaskSelectorSelectedEvent contains the task that is sent to the command channel when a selection happens

Jump to

Keyboard shortcuts

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