-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprogressimpl.go
70 lines (58 loc) · 1.29 KB
/
progressimpl.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//go:build impl
package faithtop
import (
"github.com/therecipe/qt/core"
"github.com/therecipe/qt/widgets"
)
type ProgressImpl struct {
*WidgetImpl
progress *widgets.QProgressBar
}
func init() {
newProgressImpl = func() IProgress {
v := &ProgressImpl{
progress: widgets.NewQProgressBar(nil),
}
v.WidgetImpl = widgetImplFrom(v.progress.QWidget_PTR())
return v
}
}
func (p *ProgressImpl) Assign(v *IProgress) IProgress {
*v = p
return p
}
func (p *ProgressImpl) Max(i int) IProgress {
p.progress.SetMaximum(i)
return p
}
func (p *ProgressImpl) Min(i int) IProgress {
p.progress.SetMinimum(i)
return p
}
func (p *ProgressImpl) Value(i int) IProgress {
p.progress.SetValue(i)
return p
}
func (p *ProgressImpl) Text(s string) IProgress {
p.progress.SetFormat(s)
return p
}
func (p *ProgressImpl) Inverted(b bool) IProgress {
p.progress.SetInvertedAppearance(b)
return p
}
func (p *ProgressImpl) GetValue() int {
return p.progress.Value()
}
func (p *ProgressImpl) Orientation(v Orientation) IProgress {
p.progress.SetOrientation(core.Qt__Orientation(v))
return p
}
func (p *ProgressImpl) TextAlign(v AlignmentFlag) IProgress {
p.progress.SetAlignment(core.Qt__AlignmentFlag(v))
return p
}
func (p *ProgressImpl) TextVisible(b bool) IProgress {
p.progress.SetTextVisible(b)
return p
}