当前位置: 首页>>代码示例>>Golang>>正文


Golang qt.GoBoolToInt函数代码示例

本文整理汇总了Golang中github.com/therecipe/qt.GoBoolToInt函数的典型用法代码示例。如果您正苦于以下问题:Golang GoBoolToInt函数的具体用法?Golang GoBoolToInt怎么用?Golang GoBoolToInt使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了GoBoolToInt函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: BlockUpdatesChanged

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)))
	}
}
开发者ID:mouse225,项目名称:qt,代码行数:7,代码来源:webchannel.go

示例2: SetAutoShowStandardWindow

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)))
	}
}
开发者ID:mouse225,项目名称:qt,代码行数:7,代码来源:scripttools.go

示例3: SetAllowed

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)))
	}
}
开发者ID:mouse225,项目名称:qt,代码行数:7,代码来源:websockets.go

示例4: TextFrameReceived

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)))
	}
}
开发者ID:mouse225,项目名称:qt,代码行数:7,代码来源:websockets.go

示例5: SetSelectable

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)))
	}
}
开发者ID:mouse225,项目名称:qt,代码行数:7,代码来源:macextras.go

示例6: SetLanguageChangeEnabled

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)))
	}
}
开发者ID:mouse225,项目名称:qt,代码行数:7,代码来源:uitools.go

示例7: SetBlockUpdates

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)))
	}
}
开发者ID:mouse225,项目名称:qt,代码行数:7,代码来源:webchannel.go

示例8: assertion

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
}
开发者ID:mouse225,项目名称:qt,代码行数:45,代码来源:utils-androidextras_android.go

示例9: SetUseDesignMetrics

func (ptr *QTextOption) SetUseDesignMetrics(enable bool) {
	if ptr.Pointer() != nil {
		C.QTextOption_SetUseDesignMetrics(ptr.Pointer(), C.int(qt.GoBoolToInt(enable)))
	}
}
开发者ID:xland,项目名称:qt,代码行数:5,代码来源:qtextoption.go

示例10: SetRetainSizeWhenHidden

func (ptr *QSizePolicy) SetRetainSizeWhenHidden(retainSize bool) {
	if ptr.Pointer() != nil {
		C.QSizePolicy_SetRetainSizeWhenHidden(ptr.Pointer(), C.int(qt.GoBoolToInt(retainSize)))
	}
}
开发者ID:xland,项目名称:qt,代码行数:5,代码来源:qsizepolicy.go

示例11: SetTristate

func (ptr *QStandardItem) SetTristate(tristate bool) {
	if ptr.Pointer() != nil {
		C.QStandardItem_SetTristate(ptr.Pointer(), C.int(qt.GoBoolToInt(tristate)))
	}
}
开发者ID:xland,项目名称:qt,代码行数:5,代码来源:qstandarditem.go

示例12: SetEnabled

func (ptr *QStandardItem) SetEnabled(enabled bool) {
	if ptr.Pointer() != nil {
		C.QStandardItem_SetEnabled(ptr.Pointer(), C.int(qt.GoBoolToInt(enabled)))
	}
}
开发者ID:xland,项目名称:qt,代码行数:5,代码来源:qstandarditem.go

示例13: QGuiApplication_SetDesktopSettingsAware

func QGuiApplication_SetDesktopSettingsAware(on bool) {
	C.QGuiApplication_QGuiApplication_SetDesktopSettingsAware(C.int(qt.GoBoolToInt(on)))
}
开发者ID:xland,项目名称:qt,代码行数:3,代码来源:qguiapplication.go

示例14: SetIsRectangular

func (ptr *QSGClipNode) SetIsRectangular(rectHint bool) {
	if ptr.Pointer() != nil {
		C.QSGClipNode_SetIsRectangular(ptr.Pointer(), C.int(qt.GoBoolToInt(rectHint)))
	}
}
开发者ID:xland,项目名称:qt,代码行数:5,代码来源:qsgclipnode.go

示例15: SetMovable

func (ptr *QToolBar) SetMovable(movable bool) {
	if ptr.Pointer() != nil {
		C.QToolBar_SetMovable(ptr.Pointer(), C.int(qt.GoBoolToInt(movable)))
	}
}
开发者ID:xland,项目名称:qt,代码行数:5,代码来源:qtoolbar.go


注:本文中的github.com/therecipe/qt.GoBoolToInt函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。