dictmgr

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: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QS_dictManager = "dict_manager"
)

Variables

This section is empty.

Functions

func CloseDicts

func CloseDicts()

func DictSymbol

func DictSymbol(dictName string) string

func Hash

func Hash(info common.Dictionary) string

func InitDicts

func InitDicts(conf *config.Config)

func LookupHTML

func LookupHTML(
	query string,
	conf *config.Config,
	mode QueryMode,
) []common.SearchResultIface

func Reorder

func Reorder(order map[string]int)

Types

type DicListSorter

type DicListSorter struct {
	Order map[string]int
	List  []common.Dictionary
}

func (DicListSorter) Len

func (s DicListSorter) Len() int

func (DicListSorter) Less

func (s DicListSorter) Less(i, j int) bool

func (DicListSorter) Swap

func (s DicListSorter) Swap(i, j int)

type DictManager

type DictManager struct {
	Dialog      *widgets.QDialog
	TableWidget *widgets.QTableWidget
	TextWidgets []iface.HasSetFont
}

func NewDictManager

func NewDictManager(
	app *widgets.QApplication,
	parent widgets.QWidget_ITF,
	conf *config.Config,
) *DictManager

func (*DictManager) Run

func (dm *DictManager) Run() bool

Run shows the dialog, if it Cancel was clicked it returns false if OK was clicked, then applies and saves changes and returs true

type QueryMode

type QueryMode uint8
const (
	QueryModeFuzzy QueryMode = iota
	QueryModeStartWith
	QueryModeRegex
	QueryModeGlob
)

type SearchResult

type SearchResult struct {
	*common.SearchResultLow
	// contains filtered or unexported fields
}

func (*SearchResult) DefinitionsHTML

func (r *SearchResult) DefinitionsHTML() []string

func (*SearchResult) DictName

func (r *SearchResult) DictName() string

func (*SearchResult) ResourceDir

func (r *SearchResult) ResourceDir() string

Jump to

Keyboard shortcuts

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