说明
golang gobooltoint示例是从最受好评的开源项目中提取的实现代码,你可以参考下面示例的使用方式。
编程语言: Golang
命名空间/包名称: github.com/therecipe/qt
示例#1
文件:
webchannel.go
项目:
mouse225/qt
func (ptr *QWebChannel) BlockUpdatesChanged(block bool) {
defer qt.Recovering("QWebChannel::blockUpdatesChanged")
if ptr.Pointer() != nil {
C.QWebChannel_BlockUpdatesChanged(ptr.Pointer(), C.int(qt.GoBoolToInt(block)))
}
}
示例#2
文件:
scripttools.go
项目:
mouse225/qt
func (ptr *QScriptEngineDebugger) SetAutoShowStandardWindow(autoShow bool) {
defer qt.Recovering("QScriptEngineDebugger::setAutoShowStandardWindow")
if ptr.Pointer() != nil {
C.QScriptEngineDebugger_SetAutoShowStandardWindow(ptr.Pointer(), C.int(qt.GoBoolToInt(autoShow)))
}
}
示例#3
文件:
websockets.go
项目:
mouse225/qt
func (ptr *QWebSocketCorsAuthenticator) SetAllowed(allowed bool) {
defer qt.Recovering("QWebSocketCorsAuthenticator::setAllowed")
if ptr.Pointer() != nil {
C.QWebSocketCorsAuthenticator_SetAllowed(ptr.Pointer(), C.int(qt.GoBoolToInt(allowed)))
}
}
示例#4
文件:
websockets.go
项目:
mouse225/qt
func (ptr *QWebSocket) TextFrameReceived(frame string, isLastFrame bool) {
defer qt.Recovering("QWebSocket::textFrameReceived")
if ptr.Pointer() != nil {
C.QWebSocket_TextFrameReceived(ptr.Pointer(), C.CString(frame), C.int(qt.GoBoolToInt(isLastFrame)))
}
}
示例#5
文件:
macextras.go
项目:
mouse225/qt
func (ptr *QMacToolBarItem) SetSelectable(selectable bool) {
defer qt.Recovering("QMacToolBarItem::setSelectable")
if ptr.Pointer() != nil {
C.QMacToolBarItem_SetSelectable(ptr.Pointer(), C.int(qt.GoBoolToInt(selectable)))
}
}
示例#6
文件:
uitools.go
项目:
mouse225/qt
func (ptr *QUiLoader) SetLanguageChangeEnabled(enabled bool) {
defer qt.Recovering("QUiLoader::setLanguageChangeEnabled")
if ptr.Pointer() != nil {
C.QUiLoader_SetLanguageChangeEnabled(ptr.Pointer(), C.int(qt.GoBoolToInt(enabled)))
}
}
示例#7
文件:
webchannel.go
项目:
mouse225/qt
func (ptr *QWebChannel) SetBlockUpdates(block bool) {
defer qt.Recovering("QWebChannel::setBlockUpdates")
if ptr.Pointer() != nil {
C.QWebChannel_SetBlockUpdates(ptr.Pointer(), C.int(qt.GoBoolToInt(block)))
}
}
示例#8
文件:
utils-androidextras_android.go
项目:
mouse225/qt
func assertion(key int, input ...interface{}) (unsafe.Pointer, func()) {
if len(input) > key {
switch deduced := input[key].(type) {
case string:
{
var jObject = QAndroidJniObject_FromString(deduced)
return jObject.Object(), func() { jObject.DestroyQAndroidJniObject() }
}
case []string:
{
var (
jObject = QAndroidJniObject_FromString(strings.Join(deduced, ",,,"))
jObject2 = jObject.CallObjectMethod2("split", "(Ljava/lang/String;)[Ljava/lang/String;", ",,,")
)
jObject.DestroyQAndroidJniObject()
return jObject2.Object(), func() { jObject2.DestroyQAndroidJniObject() }
}
case int:
{
return unsafe.Pointer(uintptr(C.int(deduced))), nil
}
case bool:
{
return unsafe.Pointer(uintptr(C.int(qt.GoBoolToInt(deduced)))), nil
}
case unsafe.Pointer:
{
return deduced, nil
}
case *QAndroidJniObject:
{
return deduced.Object(), nil
}
}
}
return nil, nil
}
示例#9
文件:
qtextoption.go
项目:
xland/qt
func (ptr *QTextOption) SetUseDesignMetrics(enable bool) {
if ptr.Pointer() != nil {
C.QTextOption_SetUseDesignMetrics(ptr.Pointer(), C.int(qt.GoBoolToInt(enable)))
}
}
示例#10
文件:
qsizepolicy.go
项目:
xland/qt
func (ptr *QSizePolicy) SetRetainSizeWhenHidden(retainSize bool) {
if ptr.Pointer() != nil {
C.QSizePolicy_SetRetainSizeWhenHidden(ptr.Pointer(), C.int(qt.GoBoolToInt(retainSize)))
}
}
示例#11
文件:
qstandarditem.go
项目:
xland/qt
func (ptr *QStandardItem) SetTristate(tristate bool) {
if ptr.Pointer() != nil {
C.QStandardItem_SetTristate(ptr.Pointer(), C.int(qt.GoBoolToInt(tristate)))
}
}
示例#12
文件:
qstandarditem.go
项目:
xland/qt
func (ptr *QStandardItem) SetEnabled(enabled bool) {
if ptr.Pointer() != nil {
C.QStandardItem_SetEnabled(ptr.Pointer(), C.int(qt.GoBoolToInt(enabled)))
}
}
示例#13
文件:
qguiapplication.go
项目:
xland/qt
func QGuiApplication_SetDesktopSettingsAware(on bool) {
C.QGuiApplication_QGuiApplication_SetDesktopSettingsAware(C.int(qt.GoBoolToInt(on)))
}
示例#14
文件:
qsgclipnode.go
项目:
xland/qt
func (ptr *QSGClipNode) SetIsRectangular(rectHint bool) {
if ptr.Pointer() != nil {
C.QSGClipNode_SetIsRectangular(ptr.Pointer(), C.int(qt.GoBoolToInt(rectHint)))
}
}
示例#15
文件:
qtoolbar.go
项目:
xland/qt
func (ptr *QToolBar) SetMovable(movable bool) {
if ptr.Pointer() != nil {
C.QToolBar_SetMovable(ptr.Pointer(), C.int(qt.GoBoolToInt(movable)))
}
}
示例#16
文件:
qbluetoothlocaldevice.go
项目:
xland/qt
func (ptr *QBluetoothLocalDevice) PairingConfirmation(accept bool) {
if ptr.Pointer() != nil {
C.QBluetoothLocalDevice_PairingConfirmation(ptr.Pointer(), C.int(qt.GoBoolToInt(accept)))
}
}
示例#17
文件:
qtextline.go
项目:
xland/qt
func (ptr *QTextLine) SetLeadingIncluded(included bool) {
if ptr.Pointer() != nil {
C.QTextLine_SetLeadingIncluded(ptr.Pointer(), C.int(qt.GoBoolToInt(included)))
}
}
示例#18
文件:
qdbuscontext.go
项目:
xland/qt
func (ptr *QDBusContext) SetDelayedReply(enable bool) {
if ptr.Pointer() != nil {
C.QDBusContext_SetDelayedReply(ptr.Pointer(), C.int(qt.GoBoolToInt(enable)))
}
}
示例#19
文件:
qguiapplication.go
项目:
xland/qt
func QGuiApplication_SetQuitOnLastWindowClosed(quit bool) {
C.QGuiApplication_QGuiApplication_SetQuitOnLastWindowClosed(C.int(qt.GoBoolToInt(quit)))
}
示例#20
文件:
qtreewidgetitem.go
项目:
xland/qt
func (ptr *QTreeWidgetItem) SetDisabled(disabled bool) {
if ptr.Pointer() != nil {
C.QTreeWidgetItem_SetDisabled(ptr.Pointer(), C.int(qt.GoBoolToInt(disabled)))
}
}
示例#21
文件:
qstandarditem.go
项目:
xland/qt
func (ptr *QStandardItem) SetCheckable(checkable bool) {
if ptr.Pointer() != nil {
C.QStandardItem_SetCheckable(ptr.Pointer(), C.int(qt.GoBoolToInt(checkable)))
}
}
示例#22
文件:
qtreewidgetitem.go
项目:
xland/qt
func (ptr *QTreeWidgetItem) SetExpanded(expand bool) {
if ptr.Pointer() != nil {
C.QTreeWidgetItem_SetExpanded(ptr.Pointer(), C.int(qt.GoBoolToInt(expand)))
}
}
示例#23
文件:
qstandarditem.go
项目:
xland/qt
func (ptr *QStandardItem) SetSelectable(selectable bool) {
if ptr.Pointer() != nil {
C.QStandardItem_SetSelectable(ptr.Pointer(), C.int(qt.GoBoolToInt(selectable)))
}
}
示例#24
文件:
qtreewidgetitem.go
项目:
xland/qt
func (ptr *QTreeWidgetItem) SetFirstColumnSpanned(span bool) {
if ptr.Pointer() != nil {
C.QTreeWidgetItem_SetFirstColumnSpanned(ptr.Pointer(), C.int(qt.GoBoolToInt(span)))
}
}
示例#25
文件:
qsavefile.go
项目:
xland/qt
func (ptr *QSaveFile) SetDirectWriteFallback(enabled bool) {
if ptr.Pointer() != nil {
C.QSaveFile_SetDirectWriteFallback(ptr.Pointer(), C.int(qt.GoBoolToInt(enabled)))
}
}
示例#26
文件:
qtreewidgetitem.go
项目:
xland/qt
func (ptr *QTreeWidgetItem) SetHidden(hide bool) {
if ptr.Pointer() != nil {
C.QTreeWidgetItem_SetHidden(ptr.Pointer(), C.int(qt.GoBoolToInt(hide)))
}
}
示例#27
文件:
qsizepolicy.go
项目:
xland/qt
func (ptr *QSizePolicy) SetWidthForHeight(dependent bool) {
if ptr.Pointer() != nil {
C.QSizePolicy_SetWidthForHeight(ptr.Pointer(), C.int(qt.GoBoolToInt(dependent)))
}
}
示例#28
文件:
qtreewidgetitem.go
项目:
xland/qt
func (ptr *QTreeWidgetItem) SetSelected(sele bool) {
if ptr.Pointer() != nil {
C.QTreeWidgetItem_SetSelected(ptr.Pointer(), C.int(qt.GoBoolToInt(sele)))
}
}
示例#29
文件:
qsocketnotifier.go
项目:
xland/qt
func (ptr *QSocketNotifier) SetEnabled(enable bool) {
if ptr.Pointer() != nil {
C.QSocketNotifier_SetEnabled(ptr.Pointer(), C.int(qt.GoBoolToInt(enable)))
}
}
示例#30
文件:
qstringref.go
项目:
xland/qt
func (ptr *QStringRef) ToInt(ok bool, base int) int {
if ptr.Pointer() != nil {
return int(C.QStringRef_ToInt(ptr.Pointer(), C.int(qt.GoBoolToInt(ok)), C.int(base)))
}
return 0
}