mytree

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: BSD-3-Clause Imports: 19 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Win fyne.Window

Win ...

Functions

func LoadDefaultCheckList

func LoadDefaultCheckList()

LoadDefaultCheckList ...

func LoadOrgCData

func LoadOrgCData()

LoadOrgCData : Only invoke if type of checklist is Organization

func PutCheckList

func PutCheckList(d CheckListOnly)

PutCheckList: puts checklist to database

func Remove

func Remove(arr []string, item string) []string

Remove : Deletes and returns array if found

Types

type BackupTreeObj

type BackupTreeObj struct {
	Heading string   `bson:"heading"`
	Payload string   `bson:"payload"`
	Notes   string   `bson:"notes"`
	Toolout []string `bson:"toolout"`
}

BackupTreeObj

type CheckListOnly

type CheckListOnly struct {
	Name         string                 `bson:"checklistname"`
	TreeNodes    map[string][]string    `bson:"treenodes"`
	Descriptions map[string]*TreeObject `bson:"description"`
}

CheckListOnly ...

var Default *CheckListOnly

Default USe this while creating CHecklists

var OrgCheck *CheckListOnly

OrgCheck ...

func GetAllCheckLists

func GetAllCheckLists() []CheckListOnly

GetAllCheckLists Gets All CheckLists From db

type Mytree

type Mytree struct {
	widget.Tree
	Nodes          map[string][]string
	Panel          *fyne.Container
	CheckBoxes     map[string]binding.Bool
	BCheckBoxes    map[string]bool
	Color          color.Color
	ItemStore      map[string]*TreeObject
	StatusBar      binding.Float
	Bar            *widget.ProgressBar
	TreeIdentifer  string
	Coll           string
	BackupInstance *TreeBackup
	HashMap        map[string]string //only use is for fast indexing
}

Mytree ...

func NewMytree

func NewMytree(identifier string) *Mytree

NewMytree ...

func (*Mytree) AddItem

func (m *Mytree) AddItem(parent string, child string, branch bool) error

AddItem : this will add new item if parent is found else returns error

func (*Mytree) BackupChecks

func (m *Mytree) BackupChecks()

BackupChecks ...

func (*Mytree) DeleteItem

func (m *Mytree) DeleteItem(parent string, child string, branch bool) error

DeleteItem : this will find and delete item if parent is found else returns error

func (*Mytree) ExportAs

func (m *Mytree) ExportAs()

ExportAs : function to export checklist under different name

func (*Mytree) ExportCheckList

func (m *Mytree) ExportCheckList(name string)

ExportCheckList ...

func (*Mytree) FindObject

func (m *Mytree) FindObject(name string) (*TreeObject, error)

FindObject ...

func (*Mytree) GetContainer

func (t *Mytree) GetContainer(w fyne.Window) *fyne.Container

GetContainer ...

func (*Mytree) ImportCheckList

func (m *Mytree) ImportCheckList(d CheckListOnly)

Done

func (*Mytree) SaveInstance

func (m *Mytree) SaveInstance()

SaveInstance ...

func (*Mytree) SelectChecklist

func (m *Mytree) SelectChecklist()

SelectChecklist : Creates a dialog box and select checklist and loads it

func (*Mytree) Store

func (m *Mytree) Store()

Store ...

func (*Mytree) UpdateBar

func (m *Mytree) UpdateBar()

UpdateBar ...

func (*Mytree) UpdateCheckStatus

func (m *Mytree) UpdateCheckStatus(uid string, status bool)

UpdateCheckStatus : Changing Status of Branch (Only works for a Branch Not nested ones)

func (*Mytree) UpdateChecks

func (m *Mytree) UpdateChecks()

UpdateChecks ...

func (*Mytree) UpdateFromDB

func (m *Mytree) UpdateFromDB()

UpdateFromDB ...

func (*Mytree) UpdateFromInstance

func (m *Mytree) UpdateFromInstance()

UpdateFromInstance ...

func (*Mytree) UpdateUsingInterface

func (m *Mytree) UpdateUsingInterface(dat interface{})

UpdateUsingInterface ...

func (*Mytree) ViewItem

func (m *Mytree) ViewItem(name string)

ViewItem this will remove any existing and render new tree object

type TreeBackup

type TreeBackup struct {
	Nodes         map[string][]string    `bson:"nodes"`
	BCheckBoxes   map[string]bool        `bson:"bcheckboxes"`
	ItemStore     map[string]*TreeObject `bson:"itemstore"`
	TreeIdentifer string                 `bson:"treeidentifer"`
	ProgressBar   float64                `bson:"progressbar"`
}

TreeBackup ...

func GetAllTrees

func GetAllTrees() []TreeBackup

GetAllTrees ...

type TreeObject

type TreeObject struct {
	HeaderText string       `bson:"headertext"`
	Heading    *canvas.Text `bson:"-"`
	Payload    string       `bson:"payload"`

	Notes string `bson:"notes"`

	ToolEntry     *hugetext.HugeEntry `bson:"-"`
	ToolEntryData []string            `bson:"toolentry"`
	// contains filtered or unexported fields
}

TreeObject

func NewTreeObj

func NewTreeObj(name string) *TreeObject

NewTreeObj ...

func (*TreeObject) Render

func (t *TreeObject) Render() fyne.CanvasObject

Render ...

func (*TreeObject) Setup

func (t *TreeObject) Setup()

Setup ...

func (*TreeObject) Store

func (t *TreeObject) Store()

Store : Copy required text and export

func (*TreeObject) Update

func (t *TreeObject) Update()

Update Existing Values without changing original struct

Jump to

Keyboard shortcuts

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