application

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

Documentation

Index

Constants

View Source
const (
	QS_mainSplitter   = "main_splitter"
	QS_frequencyTable = "frequencytable"
)

Variables

This section is empty.

Functions

func ConfigFont

func ConfigFont() *gui.QFont

func LoadConfig

func LoadConfig() bool

func LoadHistory

func LoadHistory() error

func NewPNGIconTextButton

func NewPNGIconTextButton(label string, imageName string) *widgets.QPushButton

func OpenConfig

func OpenConfig()

func PathFromUnix

func PathFromUnix(pathStr string) string

func Run

func Run()

func SaveHistory

func SaveHistory()

Types

type Application

type Application struct {
	*widgets.QApplication
	// contains filtered or unexported fields
}

func (*Application) LoadUserStyle

func (app *Application) LoadUserStyle()

func (*Application) ReloadConfig

func (app *Application) ReloadConfig()

func (*Application) ReloadFont

func (app *Application) ReloadFont()

func (*Application) ReloadUserStyle

func (app *Application) ReloadUserStyle()

func (*Application) Run

func (app *Application) Run()

type ArticleView

type ArticleView struct {
	*widgets.QTextBrowser
	// contains filtered or unexported fields
}

func NewArticleView

func NewArticleView(app *Application) *ArticleView

func (*ArticleView) KeyPressEventDefault

func (view *ArticleView) KeyPressEventDefault(event gui.QKeyEvent_ITF)

func (*ArticleView) SetResult

func (view *ArticleView) SetResult(res common.SearchResultIface)

func (*ArticleView) SetupCustomHandlers

func (view *ArticleView) SetupCustomHandlers()

func (*ArticleView) ZoomIn

func (view *ArticleView) ZoomIn(ran int)

func (*ArticleView) ZoomOut

func (view *ArticleView) ZoomOut(ran int)

type AudioCache

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

func NewAudioCache

func NewAudioCache() *AudioCache

func (*AudioCache) Get

func (c *AudioCache) Get(urlStr string) (*core.QUrl, error)

func (*AudioCache) ReloadConfig

func (c *AudioCache) ReloadConfig()

type HeaderLabel

type HeaderLabel struct {
	*widgets.QLabel
	// contains filtered or unexported fields
}

func CreateHeaderLabel

func CreateHeaderLabel(app *Application) *HeaderLabel

func (*HeaderLabel) ReloadConfig

func (label *HeaderLabel) ReloadConfig()

func (*HeaderLabel) SetResult

func (label *HeaderLabel) SetResult(res common.SearchResultIface)

func (*HeaderLabel) SetText

func (label *HeaderLabel) SetText(text string)

type HeaderTemplateInput

type HeaderTemplateInput struct {
	Terms    []string
	Term     string
	DictName string
	Score    uint8
}

type HistoryView

type HistoryView struct {
	*widgets.QListWidget
	// contains filtered or unexported fields
}

func NewHistoryView

func NewHistoryView() *HistoryView

func (*HistoryView) AddHistory

func (view *HistoryView) AddHistory(query string)

func (*HistoryView) AddHistoryList

func (view *HistoryView) AddHistoryList(list []string)

func (*HistoryView) ClearHistory

func (view *HistoryView) ClearHistory()

func (*HistoryView) SetupCustomHandlers

func (view *HistoryView) SetupCustomHandlers()

func (*HistoryView) TrimHistory

func (view *HistoryView) TrimHistory(maxSize int)

type KeyPressIface

type KeyPressIface interface {
	ConnectKeyPressEvent(func(event *gui.QKeyEvent))
	KeyPressEventDefault(event gui.QKeyEvent_ITF)
}

type QueryArgs

type QueryArgs struct {
	ArticleView *ArticleView
	ResultList  *ResultListWidget
	HeaderLabel *HeaderLabel
	HistoryView *HistoryView
	PostQuery   func(string)
	Entry       *widgets.QLineEdit
	ModeCombo   *widgets.QComboBox
}

func (*QueryArgs) AddHistoryAndFrequency

func (w *QueryArgs) AddHistoryAndFrequency(query string)

func (*QueryArgs) ResetQuery

func (w *QueryArgs) ResetQuery()

func (*QueryArgs) SetNoResult

func (w *QueryArgs) SetNoResult(query string)

type ResultListWidget

type ResultListWidget struct {
	*widgets.QListWidget

	Active common.SearchResultIface

	HeaderLabel *HeaderLabel
	ArticleView *ArticleView
	// contains filtered or unexported fields
}

func NewResultListWidget

func NewResultListWidget(
	articleView *ArticleView,
	headerLabel *HeaderLabel,
	onResultDisplay func(terms []string),
) *ResultListWidget

func (*ResultListWidget) Clear

func (w *ResultListWidget) Clear()

func (*ResultListWidget) OnActivate

func (w *ResultListWidget) OnActivate(row int)

func (*ResultListWidget) SetResults

func (w *ResultListWidget) SetResults(results []common.SearchResultIface)

Jump to

Keyboard shortcuts

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