application

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	QS_mainwindow = "mainwindow"
	QS_geometry   = "geometry"
	QS_savestate  = "savestate"
	QS_maximized  = "maximized"
	QS_pos        = "pos"
	QS_size       = "size"

	QS_frequencyTable = "frequencytable"
	QS_columnwidth    = "columnwidth"

	QS_mainSplitter = "main_splitter"
	QS_sizes        = "sizes"

	QS_dictManager = "dict_manager"
)
View Source
const ABOUT = `` /* 180-byte string literal not displayed */
View Source
const AUTHORS = `Saeed Rasooli <saeed.gnu@gmail.com> (ilius)`
View Source
const LICENSE = `` /* 756-byte string literal not displayed */
View Source
const VERSION = "1.0.0"

Variables

This section is empty.

Functions

func ConfigFont

func ConfigFont() *gui.QFont

func LoadConfig

func LoadConfig(app *widgets.QApplication)

func LoadHistory

func LoadHistory() error

func LoadUserStyle

func LoadUserStyle(app *widgets.QApplication)

func NewPNGIconTextButton

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

func OpenConfig

func OpenConfig()

func PathFromUnix

func PathFromUnix(pathStr string) string

func ReloadConfig

func ReloadConfig(app *widgets.QApplication)

func ReloadUserStyle

func ReloadUserStyle(app *widgets.QApplication)

func Run

func Run()

func SaveDictManagerDialog

func SaveDictManagerDialog(manager *DictManager)

func SaveFrequency

func SaveFrequency()

func SaveHistory

func SaveHistory()

Types

type ArticleView

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

func NewArticleView

func NewArticleView(app *widgets.QApplication) *ArticleView

func (*ArticleView) SetupCustomHandlers

func (view *ArticleView) SetupCustomHandlers()

type DictManager

type DictManager struct {
	Dialog      *widgets.QDialog
	TableWidget *widgets.QTableWidget
}

func NewDictManager

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

type DictSettings

type DictSettings struct {
	Symbol string `json:"symbol"`
	Order  int    `json:"order"`
}

type HeaderLabel

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

func CreateHeaderLabel

func CreateHeaderLabel(app *widgets.QApplication) *HeaderLabel

func (*HeaderLabel) SetResult

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

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 QueryArgs

type QueryArgs struct {
	ArticleView *ArticleView
	ResultList  *ResultListWidget
	HeaderLabel *HeaderLabel
	HistoryView *HistoryView
	PostQuery   func(string)
}

func (*QueryArgs) AddHistoryAndFrequency

func (w *QueryArgs) AddHistoryAndFrequency(query string)

type ResultListWidget

type ResultListWidget struct {
	*widgets.QListWidget

	Active common.QueryResult

	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.QueryResult)

Jump to

Keyboard shortcuts

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