ui

package module
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2022 License: LGPL-3.0 Imports: 14 Imported by: 1

README

Codeplug GUI library for the MD-380 DMR Radio

This library provides a go GUI API for reading/modifying/writing MD-380 codeplug files.

Author

Dale Farnsworth

dale@farnsworth.org

IRC: libera.chat channel: #md380, user: dfarnsworth

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplicationFontPointSize added in v1.0.2

func ApplicationFontPointSize() int

func DelayedCall added in v0.14.8

func DelayedCall(f func())

func ErrorPopup added in v0.7.2

func ErrorPopup(title string, msg string)

func InfoPopup

func InfoPopup(title string, msg string)

func OpenCPFilenames added in v0.8.10

func OpenCPFilenames(title string, dir string, exts []string) []string

func OpenJSONFilename added in v0.9.2

func OpenJSONFilename(title string, dir string) string

func OpenTextFilename added in v0.8.10

func OpenTextFilename(title string, dir string) string

func OpenXLSXFilename added in v0.9.2

func OpenXLSXFilename(title string, dir string) string

func SaveFilename

func SaveFilename(title string, dir string, extension string) string

func SetApplicationFontPointSize added in v1.0.2

func SetApplicationFontPointSize(pointSize int)

func UpdateComboboxWidget added in v0.8.3

func UpdateComboboxWidget(widget *FieldWidget, opt string, opts []string)

Types

type Action

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

func (*Action) SetEnabled added in v0.8.0

func (a *Action) SetEnabled(enable bool)

func (*Action) SetText

func (a *Action) SetText(s string)

func (*Action) SetVisible added in v0.14.4

func (action *Action) SetVisible(b bool)

type App

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

func NewApp

func NewApp() (*App, error)

func (*App) Exec

func (app *App) Exec()

func (*App) NewSettings

func (app *App) NewSettings() *AppSettings

func (*App) ProcessEvents added in v0.9.0

func (app *App) ProcessEvents()

func (*App) Quit

func (app *App) Quit()

func (*App) SetApplicationName

func (app *App) SetApplicationName(str string)

func (*App) SetOrganizationDomain

func (app *App) SetOrganizationDomain(str string)

func (*App) SetOrganizationName

func (app *App) SetOrganizationName(str string)

type AppSettings

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

func (*AppSettings) BeginReadArray

func (as *AppSettings) BeginReadArray(prefix string) int

func (*AppSettings) BeginWriteArray

func (as *AppSettings) BeginWriteArray(prefix string, size int)

func (*AppSettings) Bool

func (as *AppSettings) Bool(str string, deflt bool) bool

func (*AppSettings) EndArray

func (as *AppSettings) EndArray()

func (*AppSettings) Int

func (as *AppSettings) Int(str string, deflt int) int

func (*AppSettings) SetArrayIndex

func (as *AppSettings) SetArrayIndex(i int)

func (*AppSettings) SetBool

func (as *AppSettings) SetBool(str string, b bool)

func (*AppSettings) SetInt

func (as *AppSettings) SetInt(str string, i int)

func (*AppSettings) SetString

func (as *AppSettings) SetString(str string, s string)

func (*AppSettings) String

func (as *AppSettings) String(str string, deflt string) string

func (*AppSettings) Sync

func (as *AppSettings) Sync()

type Button

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

func NewButton added in v0.8.3

func NewButton(text string) *Button

func (*Button) ConnectClicked

func (b *Button) ConnectClicked(fn func())

func (*Button) SetEnabled added in v0.8.0

func (b *Button) SetEnabled(enable bool)

func (*Button) SetText

func (b *Button) SetText(str string)

type DelayedCallStruct added in v0.14.9

type DelayedCallStruct struct {
	core.QObject
	// contains filtered or unexported fields
}

type Dialog added in v0.8.3

type Dialog struct {
	*VBox
	// contains filtered or unexported fields
}

func NewDialog added in v0.8.3

func NewDialog(title string) *Dialog

func (*Dialog) Accept added in v0.8.3

func (d *Dialog) Accept()

func (*Dialog) Exec added in v0.8.3

func (d *Dialog) Exec() bool

func (*Dialog) Reject added in v0.8.3

func (d *Dialog) Reject()

func (*Dialog) Update added in v0.10.9

func (d *Dialog) Update()

type FieldMembers

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

type FieldWidget added in v0.15.0

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

func NewButtonWidget added in v0.8.3

func NewButtonWidget(text string, clicked func()) *FieldWidget

func NewCheckboxWidget added in v0.9.5

func NewCheckboxWidget(checked bool, clickedFunc func(bool)) *FieldWidget

func NewComboboxWidget added in v0.8.3

func NewComboboxWidget(opt string, opts []string, changed func(int)) *FieldWidget

func NewLineEditWidget added in v0.16.0

func NewLineEditWidget(str string) *FieldWidget

func NewSpinboxWidget added in v0.8.3

func NewSpinboxWidget(value, min, max int, changedFunc func(int)) *FieldWidget

func (*FieldWidget) AddWidget added in v0.15.0

func (fw *FieldWidget) AddWidget(w Widget)

func (*FieldWidget) SetChecked added in v0.15.0

func (widget *FieldWidget) SetChecked(checked bool)

func (*FieldWidget) SetContentsMargins added in v0.15.0

func (fw *FieldWidget) SetContentsMargins(left int, right int, top int, bottom int)

func (*FieldWidget) SetEnabled added in v0.15.0

func (w *FieldWidget) SetEnabled(b bool)

func (*FieldWidget) SetLabel added in v0.15.0

func (w *FieldWidget) SetLabel(text string)

func (*FieldWidget) SetMinimumWidth added in v0.15.0

func (w *FieldWidget) SetMinimumWidth(width int)

func (*FieldWidget) SetReadOnly added in v0.15.0

func (w *FieldWidget) SetReadOnly(b bool)

func (*FieldWidget) SetVisible added in v0.15.0

func (w *FieldWidget) SetVisible(b bool)

func (*FieldWidget) Width added in v0.15.0

func (w *FieldWidget) Width() int

func (*FieldWidget) Window added in v0.15.0

func (w *FieldWidget) Window() *Window

type Form

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

func NewForm added in v0.15.0

func NewForm() *Form

func (*Form) AddFieldRow added in v0.12.7

func (parent *Form) AddFieldRow(labelFunc func(*codeplug.Field) string, f *codeplug.Field)

func (*Form) AddFieldRows

func (parent *Form) AddFieldRows(labelFunc func(*codeplug.Field) string, fields ...*codeplug.Field)

func (*Form) AddFieldTypeRows added in v0.12.7

func (parent *Form) AddFieldTypeRows(r *codeplug.Record, fTypes ...codeplug.FieldType)

func (*Form) AddFieldWidget added in v0.15.0

func (parent *Form) AddFieldWidget(w *FieldWidget)

func (*Form) AddReadOnlyFieldRow added in v0.12.7

func (parent *Form) AddReadOnlyFieldRow(labelFunc func(*codeplug.Field) string, f *codeplug.Field)

func (*Form) AddReadOnlyFieldRows added in v0.8.11

func (parent *Form) AddReadOnlyFieldRows(labelFunc func(*codeplug.Field) string, fields ...*codeplug.Field)

func (*Form) AddReadOnlyFieldTypeRows added in v0.12.7

func (parent *Form) AddReadOnlyFieldTypeRows(r *codeplug.Record, fTypes ...codeplug.FieldType)

func (*Form) AddRow

func (parent *Form) AddRow(label string, w *FieldWidget)

func (*Form) AddWidget

func (parent *Form) AddWidget(w Widget)

func (*Form) QWidget added in v0.15.0

func (form *Form) QWidget() widgets.QWidget

func (*Form) RemoveWidget added in v0.14.0

func (form *Form) RemoveWidget(widget *FieldWidget)

func (*Form) SetContentsMargins added in v0.15.0

func (form *Form) SetContentsMargins(left int, right int, top int, bottom int)

func (*Form) Window added in v0.15.0

func (form *Form) Window() *Window

type HBox

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

func NewHbox added in v0.10.9

func NewHbox() *HBox

func (*HBox) AddButton

func (parent *HBox) AddButton(text string) *Button

func (*HBox) AddExistingHbox added in v0.10.9

func (parent *HBox) AddExistingHbox(box *HBox) *HBox

func (*HBox) AddExistingVbox added in v0.10.9

func (parent *HBox) AddExistingVbox(box *VBox) *VBox

func (*HBox) AddFieldMembers added in v0.14.0

func (hBox *HBox) AddFieldMembers(r *codeplug.Record, memberType codeplug.FieldType, sortAvailable *bool)

func (*HBox) AddFiller

func (parent *HBox) AddFiller()

func (*HBox) AddForm

func (parent *HBox) AddForm() *Form

func (*HBox) AddGroupbox

func (parent *HBox) AddGroupbox(label string) *HBox

func (*HBox) AddHbox

func (parent *HBox) AddHbox() *HBox

func (*HBox) AddLabel

func (parent *HBox) AddLabel(str string)

func (*HBox) AddRadioButton added in v0.7.0

func (parent *HBox) AddRadioButton(option string) *RadioButton

func (*HBox) AddRecordList

func (parent *HBox) AddRecordList(rType codeplug.RecordType) *RecordList

func (*HBox) AddSeparator

func (hBox *HBox) AddSeparator()

func (*HBox) AddSpace

func (parent *HBox) AddSpace(width int)

func (*HBox) AddTable added in v0.15.0

func (parent *HBox) AddTable() *Table

func (*HBox) AddTextEdit added in v0.12.7

func (parent *HBox) AddTextEdit() *TextEdit

func (*HBox) AddVbox

func (parent *HBox) AddVbox() *VBox

func (*HBox) AddWidget added in v0.8.3

func (parent *HBox) AddWidget(widget Widget)

func (*HBox) Clear

func (hBox *HBox) Clear()

func (*HBox) SetContentsMargins

func (hBox *HBox) SetContentsMargins(left int, right int, top int, bottom int)

func (*HBox) SetEnabled added in v0.8.0

func (box *HBox) SetEnabled(enable bool)

func (*HBox) SetExpand

func (hBox *HBox) SetExpand()

func (*HBox) SetFixedHeight added in v0.9.2

func (box *HBox) SetFixedHeight()

func (*HBox) Window

func (hBox *HBox) Window() *Window

type MainWindow

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

func MainWindows

func MainWindows() []*MainWindow

func NewMainWindow

func NewMainWindow() *MainWindow

func (*MainWindow) AddHbox

func (parent *MainWindow) AddHbox() *HBox

func (*MainWindow) AddVbox

func (parent *MainWindow) AddVbox() *VBox

func (*MainWindow) BeginChange added in v0.15.7

func (mw *MainWindow) BeginChange(change *codeplug.Change)

func (*MainWindow) Close

func (mw *MainWindow) Close()

func (*MainWindow) Codeplug

func (mw *MainWindow) Codeplug() *codeplug.Codeplug

func (*MainWindow) CodeplugChanged added in v0.15.7

func (mw *MainWindow) CodeplugChanged(change *codeplug.Change)

func (*MainWindow) ConnectChange

func (mw *MainWindow) ConnectChange(fn func(*codeplug.Change))

func (*MainWindow) ConnectClose

func (mw *MainWindow) ConnectClose(fn func() bool)

func (*MainWindow) EndChange added in v0.15.7

func (mw *MainWindow) EndChange(change *codeplug.Change)

func (*MainWindow) MenuBar

func (mw *MainWindow) MenuBar() *MenuBar

func (*MainWindow) NewRecordWindow

func (mw *MainWindow) NewRecordWindow(rType codeplug.RecordType, writable bool) *Window

func (*MainWindow) NewWindow

func (mw *MainWindow) NewWindow() *Window

func (*MainWindow) RecordWindows

func (mw *MainWindow) RecordWindows() map[codeplug.RecordType]*Window

func (*MainWindow) Resize added in v0.16.4

func (mW *MainWindow) Resize(w, h int)

func (*MainWindow) SetCodeplug added in v0.6.0

func (mw *MainWindow) SetCodeplug(cp *codeplug.Codeplug)

func (*MainWindow) SetTitle

func (mw *MainWindow) SetTitle(title string)

func (*MainWindow) Show

func (mw *MainWindow) Show()

func (*MainWindow) Title

func (mw *MainWindow) Title() string
type Menu struct {
	// contains filtered or unexported fields
}
func (menu *Menu) AddAction(name string, fn func()) *Action
func (menu *Menu) AddMenu(name string) *Menu
func (menu *Menu) AddSeparator()
func (menu *Menu) Clear()
func (menu *Menu) ConnectAboutToShow(fn func())
func (menu *Menu) SetEnabled(enable bool)
type MenuBar struct {
	// contains filtered or unexported fields
}
func (mb *MenuBar) AddMenu(name string) *Menu
func (mb *MenuBar) Clear()

type PopupValue

type PopupValue int
const (
	PopupCancel PopupValue = iota
	PopupDiscard
	PopupIgnore
	PopupNo
	PopupSave
	PopupYes
)

func SavePopup

func SavePopup(title string, msg string) PopupValue

func WarningPopup

func WarningPopup(title string, msg string) PopupValue

func YesNoPopup

func YesNoPopup(title string, msg string) PopupValue

type ProgressDialog added in v0.9.0

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

func NewProgressDialog added in v0.9.0

func NewProgressDialog(str string) *ProgressDialog

func (*ProgressDialog) Close added in v0.9.0

func (pd *ProgressDialog) Close()

func (*ProgressDialog) SetLabelText added in v0.9.0

func (pd *ProgressDialog) SetLabelText(str string)

func (*ProgressDialog) SetRange added in v0.9.0

func (pd *ProgressDialog) SetRange(min int, max int)

func (*ProgressDialog) SetValue added in v0.9.0

func (pd *ProgressDialog) SetValue(value int)

func (*ProgressDialog) WasCanceled added in v0.9.0

func (pd *ProgressDialog) WasCanceled() bool

type RadioButton added in v0.7.0

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

func (*RadioButton) ConnectClicked added in v0.7.0

func (b *RadioButton) ConnectClicked(fn func(checked bool))

func (*RadioButton) IsChecked added in v0.7.0

func (b *RadioButton) IsChecked() bool

func (*RadioButton) SetChecked added in v0.7.0

func (b *RadioButton) SetChecked(bo bool)

func (*RadioButton) Text added in v0.7.0

func (b *RadioButton) Text() string

type RecordList

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

func (*RecordList) AddDupSelected added in v0.14.0

func (rl *RecordList) AddDupSelected(add bool) error

func (*RecordList) AddSelected

func (rl *RecordList) AddSelected() error

func (*RecordList) ClearSelection

func (rl *RecordList) ClearSelection()

func (*RecordList) Current

func (rl *RecordList) Current() int

func (*RecordList) DupSelected added in v0.14.0

func (rl *RecordList) DupSelected() error

func (*RecordList) Model added in v0.14.9

func (rl *RecordList) Model() *core.QAbstractItemModel

func (*RecordList) RemoveSelected

func (rl *RecordList) RemoveSelected() error

func (*RecordList) SelectRecords added in v0.14.9

func (rl *RecordList) SelectRecords(records ...*codeplug.Record)

func (*RecordList) SelectedRecords

func (rl *RecordList) SelectedRecords() []*codeplug.Record

func (*RecordList) SelectionModel added in v0.14.9

func (rl *RecordList) SelectionModel() *core.QItemSelectionModel

func (*RecordList) SetCurrent

func (rl *RecordList) SetCurrent(i int)

func (*RecordList) Update

func (rl *RecordList) Update()

type StackedWidget added in v0.15.0

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

func NewStackedWidget added in v0.15.0

func NewStackedWidget(window *Window) *StackedWidget

func (*StackedWidget) AddWidget added in v0.15.0

func (sw *StackedWidget) AddWidget(w Widget)

func (*StackedWidget) SetContentsMargins added in v0.15.0

func (sw *StackedWidget) SetContentsMargins(left int, right int, top int, bottom int)

func (*StackedWidget) Window added in v0.15.0

func (sw *StackedWidget) Window() *Window

type TabWidget added in v0.15.0

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

func NewTabWidget added in v0.15.0

func NewTabWidget(window *Window) *TabWidget

func (*TabWidget) AddTab added in v0.15.0

func (tw *TabWidget) AddTab(w *FieldWidget, label string)

func (*TabWidget) ConnectChange added in v0.15.0

func (tw *TabWidget) ConnectChange(f func(w *FieldWidget))

type Table added in v0.15.0

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

func NewTable added in v0.15.0

func NewTable() *Table

func (*Table) AddLeftLabels added in v0.15.0

func (t *Table) AddLeftLabels(labels []string)

func (*Table) AddRow added in v0.15.0

func (t *Table) AddRow(cells ...Widget)

func (*Table) AddTopLabels added in v0.15.0

func (t *Table) AddTopLabels(labels []string)

func (*Table) AddWidget added in v0.15.0

func (t *Table) AddWidget(w Widget)

func (*Table) ColumnCount added in v0.15.0

func (t *Table) ColumnCount() int

func (*Table) ResizeToContents added in v0.15.0

func (t *Table) ResizeToContents()

func (*Table) RowCount added in v0.15.0

func (t *Table) RowCount() int

func (*Table) SetContentsMargins added in v0.15.0

func (t *Table) SetContentsMargins(left int, right int, top int, bottom int)

func (*Table) SetFixedSize added in v0.15.0

func (t *Table) SetFixedSize()

func (*Table) Window added in v0.15.0

func (t *Table) Window() *Window

type TextEdit added in v0.12.7

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

func NewTextEdit added in v0.12.7

func NewTextEdit() *TextEdit

func (*TextEdit) SetNoLineWrap added in v0.12.7

func (t *TextEdit) SetNoLineWrap()

func (*TextEdit) SetPlainText added in v0.12.7

func (t *TextEdit) SetPlainText(str string)

func (*TextEdit) SetReadOnly added in v0.12.7

func (t *TextEdit) SetReadOnly(ro bool)

type VBox

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

func NewVbox added in v0.10.9

func NewVbox() *VBox

func (*VBox) AddButton

func (parent *VBox) AddButton(text string) *Button

func (*VBox) AddExistingHbox added in v0.10.9

func (parent *VBox) AddExistingHbox(box *HBox) *HBox

func (*VBox) AddExistingVbox added in v0.10.9

func (parent *VBox) AddExistingVbox(box *VBox) *VBox

func (*VBox) AddFiller

func (parent *VBox) AddFiller()

func (*VBox) AddForm

func (parent *VBox) AddForm() *Form

func (*VBox) AddGroupbox

func (parent *VBox) AddGroupbox(label string) *HBox

func (*VBox) AddHbox

func (parent *VBox) AddHbox() *HBox

func (*VBox) AddLabel

func (parent *VBox) AddLabel(str string)

func (*VBox) AddSeparator

func (vBox *VBox) AddSeparator()

func (*VBox) AddSpace added in v0.7.0

func (parent *VBox) AddSpace(height int)

func (*VBox) AddTable added in v0.15.0

func (parent *VBox) AddTable() *Table

func (*VBox) AddTextEdit added in v0.12.7

func (parent *VBox) AddTextEdit() *TextEdit

func (*VBox) AddVbox added in v0.10.9

func (parent *VBox) AddVbox() *VBox

func (*VBox) AddWidget added in v0.8.3

func (parent *VBox) AddWidget(widget Widget)

func (*VBox) Clear

func (vBox *VBox) Clear()

func (*VBox) SetContentsMargins

func (vBox *VBox) SetContentsMargins(left int, right int, top int, bottom int)

func (*VBox) SetEnabled added in v0.8.0

func (box *VBox) SetEnabled(enable bool)

func (*VBox) SetExpand

func (vBox *VBox) SetExpand()

func (*VBox) SetFixedWidth added in v0.9.2

func (box *VBox) SetFixedWidth()

func (*VBox) Window

func (vBox *VBox) Window() *Window

type Widget

type Widget interface {
	AddWidget(Widget)
	SetContentsMargins(left int, right int, top int, bottom int)

	Window() *Window
	// contains filtered or unexported methods
}

type Window

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

func (*Window) AddEnablerWidget added in v0.16.8

func (w *Window) AddEnablerWidget(widget *FieldWidget)

func (*Window) AddFieldWidget added in v0.16.8

func (window *Window) AddFieldWidget(w *FieldWidget)

func (*Window) AddHbox

func (parent *Window) AddHbox() *HBox

func (*Window) AddMenuBar

func (w *Window) AddMenuBar() *MenuBar

func (*Window) AddVbox

func (parent *Window) AddVbox() *VBox

func (*Window) AddWidget added in v0.15.0

func (w *Window) AddWidget(widget Widget)

func (*Window) Close

func (w *Window) Close()

func (*Window) ConnectClose

func (w *Window) ConnectClose(fn func() bool)

func (*Window) DeleteLater added in v0.7.0

func (w *Window) DeleteLater()

func (*Window) MainWindow

func (w *Window) MainWindow() *MainWindow

func (*Window) MenuBar

func (w *Window) MenuBar() *MenuBar

func (*Window) NewFieldWidget added in v0.15.0

func (window *Window) NewFieldWidget(label string, f *codeplug.Field) *FieldWidget

func (*Window) RecordFunc added in v0.9.5

func (w *Window) RecordFunc() func()

func (*Window) RecordList

func (w *Window) RecordList() *RecordList

func (*Window) RecordType

func (w *Window) RecordType() codeplug.RecordType

func (*Window) Records added in v0.15.0

func (w *Window) Records(rType codeplug.RecordType) []*codeplug.Record

func (*Window) SetContentsMargins added in v0.15.0

func (w *Window) SetContentsMargins(left int, right int, top int, bottom int)

func (*Window) SetRecordFunc

func (w *Window) SetRecordFunc(fn func())

func (*Window) SetTitle

func (w *Window) SetTitle(title string)

func (*Window) Show

func (w *Window) Show()

func (*Window) Title

func (w *Window) Title() string

func (*Window) Window added in v0.15.0

func (w *Window) Window() *Window

Jump to

Keyboard shortcuts

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