Documentation
¶
Index ¶
- func CreateProject(prjname string) (err error)
- func ProjectFullPath(prjname string) string
- func SetDataMan(man IDataMan)
- type Category
- type DB
- type DefaultDataMan
- type FBlock32
- type ICategoryID
- type IData
- type IDataMan
- type IDataVersion
- type IFieldID
- type IWellBasic
- type IWellID
- type IWellLog
- type IZone
- type PrjModel
- func (m *PrjModel) ColCount() int
- func (m *PrjModel) Data(idx gui.ModelIndex, role gui.ItemDataRole) interface{}
- func (m *PrjModel) Flags(idx gui.ModelIndex) gui.ItemFlags
- func (m *PrjModel) HeaderData(section int, vertical bool, role gui.ItemDataRole) interface{}
- func (m *PrjModel) Index(row, col int, parent gui.ModelIndex) gui.ModelIndex
- func (m *PrjModel) Init(self gui.IGuiModel)
- func (m *PrjModel) Parent(idx gui.ModelIndex) gui.ModelIndex
- func (m *PrjModel) Refresh()
- func (m *PrjModel) RowCount(parent gui.ModelIndex) int
- func (this *PrjModel) Sort(column int, desc bool)
- type PrjView
- type Project
- func (this *Project) Close()
- func (this *Project) DBLocation() string
- func (this *Project) DataID() string
- func (this *Project) DataName() string
- func (this *Project) DirtyList() []string
- func (this *Project) Ini() core.IIni
- func (this *Project) IsLoadFailed() bool
- func (this *Project) IsLoaded() bool
- func (this *Project) Load() error
- func (this *Project) ProjectFullPath() string
- func (this *Project) ProjectName() string
- func (this *Project) ProjectType() string
- func (this *Project) Save() error
- type Well
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Category ¶
type Category struct {
// contains filtered or unexported fields
}
func (*Category) IsUnderWell ¶
井下的分类, 子节点应该是数据 不在井下的分类, 子节点应该是井, 再下一级才是数据
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) BatchExec1 ¶
type DefaultDataMan ¶
type DefaultDataMan struct {
// contains filtered or unexported fields
}
默认的数据管理器, 可扩展
func (*DefaultDataMan) Children ¶
func (man *DefaultDataMan) Children(d IData) []IData
func (*DefaultDataMan) ProjectNames ¶
func (man *DefaultDataMan) ProjectNames() (list []string)
func (*DefaultDataMan) Roots ¶
func (man *DefaultDataMan) Roots() (ret []IData)
type ICategoryID ¶
type ICategoryID interface {
// 数据类型
CategoryID() string
}
type IData ¶
type IData interface {
// 数据对象的标识
// 在同一个父对象下, 对象标识应该唯一
DataID() string
// 显示的名称, 可随语种/用户习惯变化, 例如井在某些应用中应显示为"井筒"
// 此名称的变化不应影响到软件的实际功能.
DataName() string
}
抽象的数据接口 此接口用来表示较大的数据, 不适合表示"曲线上的点"之类的琐碎数据
type IDataMan ¶
type IDataMan interface {
// 数据的根节点
// 注: 如果有需要, 根节点可以不是项目
Roots() []IData
Children(d IData) []IData
}
数据管理器 数据管理器决定了软件可加载那些数据, 以什么方式加载, 又以什么方式呈现给用户 数据管理器的职责: 1 确保内存中的数据对象和数据库中的数据同步 2 决定数据对象之间的关系 3 自动管理对象占用的内存大小 4 对象的增删改查操作
type IDataVersion ¶
type IDataVersion interface {
// 数据版本, 用一个字符串以区分同名数据的不同版本
// 例如"张三4月修改", "来自于数模等"
DataVersion() string
}
type IFieldID ¶
type IFieldID interface {
// Field identifier
// Current version supports single-level fields only
// If empty, the item will be categorized as "unspecified"
FieldID() string
}
type IWellBasic ¶
type IWellBasic interface {
IData
// 井口坐标, x为东西方向, y为南北方向
WellLoc() (x, y float64)
// 井型, 正钻井, 废弃井, 生产井
WellStage() string
// 井别, 油,气, 水...
WellType() string
// 是否直井
IsVertWell() bool
}
井(筒)数据
type IWellID ¶
type IWellID interface {
// 井的标识,井号
// 我们的软件以这个标识区分不同井, ID相同则井相同, ID不同则井不同
// 如果数据不属于任何井(例如地震测网)则此标识为空
WellID() string
}
type IWellLog ¶
type IWellLog interface {
IData
// 数据名称, DEPTH, GR...
WellLogName()
// 起始深度
Top() float32
// 终止深度
Bottom() float32
// 数据
WellLogData() FBlock32
}
测井数据
type PrjModel ¶
数据树模型
func (*PrjModel) Data ¶
func (m *PrjModel) Data(idx gui.ModelIndex, role gui.ItemDataRole) interface{}
获取单元格数据
func (*PrjModel) Flags ¶
func (m *PrjModel) Flags(idx gui.ModelIndex) gui.ItemFlags
子节点的属性标记, 例如是否可选
func (*PrjModel) HeaderData ¶
func (m *PrjModel) HeaderData(section int, vertical bool, role gui.ItemDataRole) interface{}
func (*PrjModel) Index ¶
func (m *PrjModel) Index(row, col int, parent gui.ModelIndex) gui.ModelIndex
获取parent下第row行col列的索引
type PrjView ¶
////////////////////////////////////////////////////////////
func NewPrjView ¶
func NewPrjView() *PrjView
func (*PrjView) PromptCreateProject ¶
func (this *PrjView) PromptCreateProject()
type Well ¶
type Well struct {
// contains filtered or unexported fields
}
func (*Well) IsUnderWell ¶
分类下的井, 子节点应该是数据 不在分类下的井, 子节点应该是分类, 再下一级才是数据
Click to show internal directories.
Click to hide internal directories.