favorites

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Path

func Path() string

Types

type Favorites

type Favorites struct {
	List []string
	Map  map[string]int
}

func (*Favorites) Add

func (fav *Favorites) Add(item string)

func (*Favorites) BuildMap

func (fav *Favorites) BuildMap()

func (*Favorites) Has

func (fav *Favorites) Has(item string) bool

func (*Favorites) Load

func (fav *Favorites) Load(fpath string) error

func (*Favorites) Remove

func (fav *Favorites) Remove(item string) int

func (*Favorites) Save

func (fav *Favorites) Save(fpath string) error

type FavoritesWidget

type FavoritesWidget struct {
	*widgets.QListWidget
	Data *Favorites
	// contains filtered or unexported fields
}

func NewFavoritesWidget

func NewFavoritesWidget(conf *config.Config) *FavoritesWidget

func (*FavoritesWidget) AddFavorite

func (w *FavoritesWidget) AddFavorite(item string)

func (*FavoritesWidget) HasFavorite

func (w *FavoritesWidget) HasFavorite(item string) bool

func (*FavoritesWidget) Load

func (w *FavoritesWidget) Load() error

func (*FavoritesWidget) RemoveFavorite

func (w *FavoritesWidget) RemoveFavorite(item string)

func (*FavoritesWidget) Save

func (w *FavoritesWidget) Save() error

func (*FavoritesWidget) SetFavorite

func (w *FavoritesWidget) SetFavorite(item string, favorite bool)

Jump to

Keyboard shortcuts

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