Пример #1
0
	def generateAPI(self, args):
		os.chdir(os.path.join("..", "ScintillaEdit"))
		if not self.qtStyleInterface:
			args.insert(0, '--underscore-names')
		WidgetGen.main(args)
		f = WidgetGen.readInterface(False)
		os.chdir(os.path.join("..", "ScintillaEditPy"))
		options = {"qtStyle": self.qtStyleInterface}
		WidgetGen.Generate("typesystem_ScintillaEdit.xml.template", "typesystem_ScintillaEdit.xml", printTypeSystemFile, f, options)
Пример #2
0
	def generateAPI(self, args):
		os.chdir(os.path.join("..", "ScintillaEdit"))
		if not self.qtStyleInterface:
			args.insert(0, '--underscore-names')
		WidgetGen.main(args)
		f = WidgetGen.readInterface(False)
		os.chdir(os.path.join("..", "ScintillaEditPy"))
		options = {"qtStyle": self.qtStyleInterface}
		WidgetGen.Generate("typesystem_ScintillaEdit.xml.template", "typesystem_ScintillaEdit.xml", printTypeSystemFile, f, options)
Пример #3
0
def methodSignature(name, v, options):
    argTypes = ""
    p1Type = WidgetGen.cppAlias(v["Param1Type"])
    if p1Type:
        argTypes = argTypes + p1Type
    p2Type = WidgetGen.cppAlias(v["Param2Type"])
    if p2Type and v["Param2Type"] != "stringresult":
        if p1Type:
            argTypes = argTypes + ", "
        argTypes = argTypes + p2Type
    methodName = WidgetGen.normalisedName(name, options, v["FeatureType"])
    constDeclarator = " const" if v["FeatureType"] == "get" else ""
    return methodName + "(" + argTypes + ")" + constDeclarator
Пример #4
0
def methodSignature(name, v, options):
    argTypes = ""
    p1Type = WidgetGen.cppAlias(v["Param1Type"])
    if p1Type:
        argTypes = argTypes + p1Type
    p2Type = WidgetGen.cppAlias(v["Param2Type"])
    if p2Type and v["Param2Type"] != "stringresult":
        if p1Type:
            argTypes = argTypes + ", "
        argTypes = argTypes + p2Type
    methodName = WidgetGen.normalisedName(name, options, v["FeatureType"])
    constDeclarator = " const" if v["FeatureType"] == "get" else ""
    return methodName + "(" + argTypes + ")" + constDeclarator