-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgroupboximpl.go
56 lines (45 loc) · 1.02 KB
/
groupboximpl.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
//go:build impl
package faithtop
import "github.com/therecipe/qt/widgets"
type GroupBoxImpl struct {
*WidgetImpl
groupBox *widgets.QGroupBox
}
func init() {
newGroupBoxImpl = func() IGroupBox {
v := &GroupBoxImpl{
groupBox: widgets.NewQGroupBox(nil),
}
v.WidgetImpl = widgetImplFrom(v.groupBox.QWidget_PTR())
return v
}
}
func (g *GroupBoxImpl) Title(title string) IGroupBox {
g.groupBox.SetTitle(title)
return g
}
func (g *GroupBoxImpl) Checkable(b bool) IGroupBox {
g.groupBox.SetCheckable(b)
return g
}
func (g *GroupBoxImpl) Checked(b bool) IGroupBox {
g.groupBox.SetChecked(b)
return g
}
func (g *GroupBoxImpl) IsChecked() bool {
return g.groupBox.IsChecked()
}
func (g *GroupBoxImpl) OnToggled(fn func(self IGroupBox, b bool)) IGroupBox {
g.groupBox.ConnectToggled(func(on bool) {
fn(g, on)
})
return g
}
func (g *GroupBoxImpl) TitleAlign(align AlignmentFlag) IGroupBox {
g.groupBox.SetAlignment(int(align))
return g
}
func (g *GroupBoxImpl) Flat(b bool) IGroupBox {
g.groupBox.SetFlat(b)
return g
}