Merge pull request #1311 from KLayout/wip

Wip
This commit is contained in:
Matthias Köfferlein 2024-01-20 20:51:08 +01:00 committed by GitHub
commit f1f92e5a0c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
895 changed files with 87349 additions and 48359 deletions

View File

@ -1213,6 +1213,7 @@ def Deploy_Binaries_For_Bundle(config, parameters):
# | +-- 'klayout'
# | +-- db_plugins/
# | +-- lay_plugins/
# | +-- pymod/
# +-- Buddy/+
# | +-- 'strm2cif'
# | +-- 'strm2dxf'
@ -1304,7 +1305,7 @@ def Deploy_Binaries_For_Bundle(config, parameters):
# Copy the contents of the plugin directories to a place next to
# the application binary
#-------------------------------------------------------------------
for piDir in [ "db_plugins", "lay_plugins" ]:
for piDir in [ "db_plugins", "lay_plugins", "pymod" ]:
os.makedirs( os.path.join( targetDirM, piDir ))
dynamicLinkLibs = glob.glob( os.path.join( MacBinDir, piDir, "*.dylib" ) )
for item in dynamicLinkLibs:
@ -1354,6 +1355,7 @@ def Deploy_Binaries_For_Bundle(config, parameters):
# | +-- 'klayout'
# | +-- db_plugins/
# | +-- lay_plugins/
# | +-- pymod/
# :
#----------------------------------------------------------------------------------
os.chdir( targetDirF )

View File

@ -203,11 +203,11 @@ def ExportEnvVariables():
MyEnviron[ 'TESTSRC' ] = ".."
MyEnviron[ 'TESTTMP' ] = WorkDir
if System == "Darwin":
MyEnviron[ 'DYLD_LIBRARY_PATH' ] = "%s:%s/db_plugins:%s/lay_plugins" % (ProjectDir, ProjectDir, ProjectDir)
MyEnviron[ 'DYLD_LIBRARY_PATH' ] = "%s:%s/db_plugins:%s/lay_plugins:%s/pymod" % (ProjectDir, ProjectDir, ProjectDir, ProjectDir)
for env in [ 'TESTSRC', 'TESTTMP', 'DYLD_LIBRARY_PATH' ]:
os.environ[env] = MyEnviron[env]
else:
MyEnviron[ 'LD_LIBRARY_PATH' ] = "%s:%s/db_plugins:%s/lay_plugins" % (ProjectDir, ProjectDir, ProjectDir)
MyEnviron[ 'LD_LIBRARY_PATH' ] = "%s:%s/db_plugins:%s/lay_plugins:%s/pymod" % (ProjectDir, ProjectDir, ProjectDir, ProjectDir)
for env in [ 'TESTSRC', 'TESTTMP', 'LD_LIBRARY_PATH' ]:
os.environ[env] = MyEnviron[env]

View File

@ -46,7 +46,7 @@ logfile=QATest_${gitSHA1}_${timestamp}__${presentDir}.log
#----------------------------------------------------------------
export TESTSRC=..
export TESTTMP=QATest_${gitSHA1}_${timestamp}__${presentDir}
export DYLD_LIBRARY_PATH=$(pwd):$(pwd)/db_plugins:$(pwd)/lay_plugins
export DYLD_LIBRARY_PATH=$(pwd):$(pwd)/db_plugins:$(pwd)/lay_plugins:$(pwd)/pymod
#----------------------------------------------------------------
# Environment variables for "ut_runner"

View File

@ -284,7 +284,7 @@ echo "Making .zip file $zipname.zip .."
rm -rf $zipname $zipname.zip
mkdir $zipname
cp -Rv strm*.exe *.dll cert.pem .*-paths.txt db_plugins lay_plugins $plugins lib $zipname | sed -u 's/.*/echo -n ./' | sh
cp -Rv strm*.exe *.dll cert.pem .*-paths.txt db_plugins lay_plugins pymod $plugins lib $zipname | sed -u 's/.*/echo -n ./' | sh
cp klayout.exe $zipname/klayout_app.exe
cp klayout.exe $zipname/klayout_vo_app.exe
echo ""

View File

@ -71,6 +71,7 @@ section
file cert.pem
file /r db_plugins
file /r lay_plugins
file /r pymod
file /r audio
file /r generic
file /r iconengines

View File

@ -98,6 +98,7 @@ mkdir -p makedeb-tmp/${sharedir}/applications
mkdir -p makedeb-tmp/${sharedir}/pixmaps
mkdir -p makedeb-tmp/${libdir}/db_plugins
mkdir -p makedeb-tmp/${libdir}/lay_plugins
mkdir -p makedeb-tmp/${libdir}/pymod
mkdir -p makedeb-tmp/${bindir}
cp etc/klayout.desktop makedeb-tmp/${sharedir}/applications
@ -111,6 +112,7 @@ cp -pd $bininstdir/klayout makedeb-tmp/${bindir}
cp -pd $bininstdir/lib*so* makedeb-tmp/${libdir}
cp -pd $bininstdir/db_plugins/lib*so* makedeb-tmp/${libdir}/db_plugins
cp -pd $bininstdir/lay_plugins/lib*so* makedeb-tmp/${libdir}/lay_plugins
cp -rpd $bininstdir/pymod/* makedeb-tmp/${libdir}/pymod
cd makedeb-tmp
@ -136,6 +138,7 @@ echo "Modifying control file .."
strip ${bindir}/*
strip ${libdir}/db_plugins/*.so*
strip ${libdir}/lay_plugins/*.so*
strip ${libdir}/pymod/klayout/*.so*
size=`du -ck usr | grep total | sed "s/ *total//"`

View File

@ -43,7 +43,7 @@ update=0
diff=0
reuse=0
qt="/opt/qt/4.6.3/include"
qt5="/opt/qt/5.5.1/include"
qt5="/opt/qt/5.12.12/include"
qt6="/opt/qt/6.2.1/include"
inst_dir_common=`pwd`/scripts/mkqtdecl_common
inst_dir4=`pwd`/scripts/mkqtdecl4

View File

@ -526,7 +526,9 @@ drop_method "QPixmap", /QPixmap::handle/ # not available on WIN
drop_method "QPixmap", /QPixmap::fromX11Pixmap/ # not available on WIN
drop_method "QTabletEvent", /QTabletEvent::QTabletEvent/ # TODO: too many arguments
drop_method "QGraphicsProxyWidget", /QGraphicsProxyWidget::setGeometry\(double/ # not available as override (private or protected inheritance?)
drop_method "QPixmap", /QPixmap::QPixmap\(const\s+char\s+\*\s*const\s*\w*\s*\[\s*\]/ # no const char *[] - TODO: provide differen implementation?
drop_method "QPixmap", /QPixmap::QPixmap\(const\s+char\s+\*\s*const\s*xpm\s*\[\s*\]/ # no const char *[] - TODO: provide differen implementation?
drop_method "QImage", /QImage::QImage\(.*unsigned\s+char\s+\*\s*data\W/ # not binary data constructor - done in native implementation
add_native_impl_QImage()
drop_method "QImage", /QImage::QImage\(const\s+char\s+\*\s*const\s*xpm\s*\[\s*\]/ # no const char *[] - TODO: provide differen implementation?
drop_method "QImage", /QImage::QImage\(const\s+char\s+\*\s*fileName/ # not available for QT_NO_CAST_TO_ASCII
drop_method "QAccessibleInterface", /QAccessibleInterface::imageInterface/ # Interface is not officially available
@ -635,11 +637,26 @@ drop_method "Qimage", /Qimage::text\(const\s+QString/ # clashes with const char
rename "QDialogButtonBox", /QDialogButtonBox::QDialogButtonBox\(QFlags/, "new_buttons"
rename "QIcon", /QIcon::pixmap\(int\s+extent/, "pixmap_ext"
rename "QKeySequence", /QKeySequence::QKeySequence\(QKeySequence::StandardKey/, "new_std"
# TODO: basically, the layout object only takes ownership over the objects when
# it has a QWidget parent itself. This is not reflected in the following simple scheme
keep_arg "QBoxLayout", /::addLayout/, 0 # will take ownership of layout
keep_arg "QBoxLayout", /::addSpacerItem/, 0 # will take ownership of item
keep_arg "QBoxLayout", /::addWidget/, 0 # will take ownership of item
keep_arg "QBoxLayout", /::insertItem/, 1 # will take ownership of item
keep_arg "QBoxLayout", /::insertLayout/, 1 # will take ownership of item
keep_arg "QBoxLayout", /::insertSpacerItem/, 1 # will take ownership of item
keep_arg "QBoxLayout", /::insertWidget/, 1 # will take ownership of item
keep_arg "QGridLayout", /::addLayout/, 0 # will take ownership of layout
keep_arg "QWidget", /::setLayout\s*\(/, 0 # will take ownership of layout
keep_arg "QGridLayout", /::addItem/, 0 # will take ownership of layout
keep_arg "QGridLayout", /::addWidget/, 0 # will take ownership of layout
keep_arg "QLayout", /::addChildLayout/, 0 # will take ownership of layout
keep_arg "QLayout", /::addItem/, 0 # will take ownership of item
keep_arg "QLayout", /::addWidget/, 0 # will take ownership of item
keep_arg "QStackedLayout", /::addWidget/, 0 # will take ownership of item
keep_arg "QStackedLayout", /::insertWidget/, 1 # will take ownership of item
keep_arg "QWidget", /::setLayout\s*\(/, 0 # will take ownership of layout
keep_arg "QTreeWidgetItem", /::addChild\(/, 0 # will take ownership of the child
keep_arg "QTreeWidgetItem", /::addChildren\(/, 0 # will take ownership of the children
keep_arg "QTreeWidgetItem", /::insertChild\(/, 1 # will take ownership of the child

View File

@ -19,7 +19,8 @@
#include "QtCore/QAtomicPointer"
#include "QtCore/QBasicMutex"
#include "QtCore/QBasicTimer"
#include "QtCore/QBBSystemLocaleData"
#include "QtCore/QBEInteger"
#include "QtCore/QBigEndianStorageType"
#include "QtCore/QBitArray"
#include "QtCore/QBitRef"
#include "QtCore/QBuffer"
@ -31,6 +32,14 @@
#include "QtCore/QByteArrayMatcher"
#include "QtCore/QByteRef"
#include "QtCore/QCache"
#include "QtCore/QCborArray"
#include "QtCore/QCborError"
#include "QtCore/QCborMap"
#include "QtCore/QCborParserError"
#include "QtCore/QCborStreamReader"
#include "QtCore/QCborStreamWriter"
#include "QtCore/QCborValue"
#include "QtCore/QCborValueRef"
#include "QtCore/QChar"
#include "QtCore/QCharRef"
#include "QtCore/QChildEvent"
@ -38,6 +47,7 @@
#include "QtCore/QCollatorSortKey"
#include "QtCore/QCommandLineOption"
#include "QtCore/QCommandLineParser"
// #include "QtCore/QConstOverload"
#include "QtCore/QContiguousCache"
#include "QtCore/QContiguousCacheData"
#include "QtCore/QContiguousCacheTypedData"
@ -46,6 +56,7 @@
#include "QtCore/QDataStream"
#include "QtCore/QDate"
#include "QtCore/QDateTime"
#include "QtCore/QDeadlineTimer"
#include "QtCore/QDebug"
#include "QtCore/QDebugStateSaver"
#include "QtCore/QDeferredDeleteEvent"
@ -71,7 +82,7 @@
#include "QtCore/QFinalState"
#include "QtCore/QFlag"
#include "QtCore/QFlags"
#include "QtCore/QForeachContainer"
#include "QtCore/QFloat16"
#include "QtCore/QFunctionPointer"
#include "QtCore/QFuture"
#include "QtCore/QFutureInterface"
@ -86,6 +97,7 @@
#include "QtCore/QHash"
#include "QtCore/QHashData"
#include "QtCore/QHashDummyValue"
#include "QtCore/QHashFunctions"
#include "QtCore/QHashIterator"
#include "QtCore/QHashNode"
#include "QtCore/QHistoryState"
@ -105,9 +117,11 @@
#include "QtCore/QJsonValuePtr"
#include "QtCore/QJsonValueRef"
#include "QtCore/QJsonValueRefPtr"
// #include "QtCore/QKeyValueIterator"
#include "QtCore/QLatin1Char"
#include "QtCore/QLatin1Literal"
#include "QtCore/QLatin1String"
#include "QtCore/QLEInteger"
#include "QtCore/QLibrary"
#include "QtCore/QLibraryInfo"
#include "QtCore/QLine"
@ -120,6 +134,7 @@
#include "QtCore/QListData"
#include "QtCore/QListIterator"
#include "QtCore/QListSpecialMethods"
#include "QtCore/QLittleEndianStorageType"
#include "QtCore/QLocale"
#include "QtCore/QLockFile"
#include "QtCore/QLoggingCategory"
@ -140,9 +155,6 @@
#include "QtCore/QMetaObject"
#include "QtCore/QMetaProperty"
#include "QtCore/QMetaType"
#include "QtCore/QMetaTypeId"
#include "QtCore/QMetaTypeId2"
#include "QtCore/QMetaTypeIdQObject"
#include "QtCore/QMimeData"
#include "QtCore/QMimeDatabase"
#include "QtCore/QMimeType"
@ -162,11 +174,13 @@
#include "QtCore/QMutex"
#include "QtCore/QMutexLocker"
#include "QtCore/QNoDebug"
// #include "QtCore/QNonConstOverload"
#include "QtCore/QObject"
#include "QtCore/QObjectCleanupHandler"
#include "QtCore/QObjectData"
#include "QtCore/QObjectList"
#include "QtCore/QObjectUserData"
#include "QtCore/QOperatingSystemVersion"
#include "QtCore/QPair"
#include "QtCore/QParallelAnimationGroup"
#include "QtCore/QPauseAnimation"
@ -180,6 +194,8 @@
#include "QtCore/QProcessEnvironment"
#include "QtCore/QPropertyAnimation"
#include "QtCore/QQueue"
#include "QtCore/QRandomGenerator"
#include "QtCore/QRandomGenerator64"
#include "QtCore/QReadLocker"
#include "QtCore/QReadWriteLock"
#include "QtCore/QRect"
@ -200,7 +216,10 @@
#include "QtCore/QScopedPointerObjectDeleteLater"
#include "QtCore/QScopedPointerPodDeleter"
#include "QtCore/QScopedValueRollback"
#include "QtCore/QScopeGuard"
// #include "QtCore/Q_SECURITY_ATTRIBUTES"
#include "QtCore/QSemaphore"
#include "QtCore/QSemaphoreReleaser"
#include "QtCore/QSequentialAnimationGroup"
#include "QtCore/QSequentialIterable"
#include "QtCore/QSet"
@ -217,29 +236,35 @@
#include "QtCore/QSizeF"
#include "QtCore/QSocketNotifier"
#include "QtCore/QSortFilterProxyModel"
#include "QtCore/QSpecialInteger"
#include "QtCore/QStack"
#include "QtCore/QStandardPaths"
// #include "QtCore/Q_STARTUPINFO"
#include "QtCore/QState"
#include "QtCore/QStateMachine"
#include "QtCore/QStaticArrayData"
#include "QtCore/QStaticAssertFailure"
#include "QtCore/QStaticByteArrayData"
#include "QtCore/QStaticByteArrayMatcherBase"
#include "QtCore/QStaticPlugin"
#include "QtCore/QStaticStringData"
#include "QtCore/QStorageInfo"
#include "QtCore/QString"
#include "QtCore/QStringAlgorithms"
#include "QtCore/QStringBuilder"
#include "QtCore/QStringData"
#include "QtCore/QStringDataPtr"
#include "QtCore/QStringList"
#include "QtCore/QStringListIterator"
#include "QtCore/QStringListModel"
#include "QtCore/QStringLiteral"
#include "QtCore/QStringMatcher"
#include "QtCore/QStringRef"
#include "QtCore/QStringView"
#include "QtCore/QSysInfo"
#include "QtCore/QSystemSemaphore"
#include "QtCore/Qt"
#include "QtCore/QtAlgorithms"
#include "QtCore/QtCborCommon"
#include "QtCore/QtCleanUpFunction"
#include "QtCore/QtConfig"
#include "QtCore/QtContainerFwd"
@ -277,6 +302,7 @@
#include "QtCore/QTranslator"
#include "QtCore/QTypeInfo"
#include "QtCore/QTypeInfoMerger"
// #include "QtCore/QTypeInfoQuery"
#include "QtCore/QUnhandledException"
#include "QtCore/QUrl"
#include "QtCore/QUrlQuery"
@ -291,6 +317,7 @@
#include "QtCore/QVarLengthArray"
#include "QtCore/QVector"
#include "QtCore/QVectorIterator"
#include "QtCore/QVersionNumber"
#include "QtCore/QWaitCondition"
#include "QtCore/QWeakPointer"
#include "QtCore/QWinEventNotifier"

View File

@ -1,13 +1,16 @@
#if 0
// No designer support, except QFormBuilder
#include "QtDesigner/QAbstractExtensionFactory"
#include "QtDesigner/QAbstractExtensionManager"
#include "QtDesigner/QAbstractFormBuilder"
#if 0
// No designer support, except QFormBuilder
#include "QtDesigner/QDesignerActionEditorInterface"
#include "QtDesigner/QDesignerComponents"
#include "QtDesigner/QDesignerContainerExtension"
#include "QtDesigner/QDesignerCustomWidgetCollectionInterface"
#include "QtDesigner/QDesignerCustomWidgetInterface"
#include "QtDesigner/QDesignerDnDItemInterface"
#include "QtDesigner/QDesignerDynamicPropertySheetExtension"
#include "QtDesigner/QDesignerExportWidget"
#include "QtDesigner/QDesignerExtraInfoExtension"
#include "QtDesigner/QDesignerFormEditorInterface"
#include "QtDesigner/QDesignerFormEditorPluginInterface"

View File

@ -82,6 +82,7 @@
#include "QtGui/QKeyEvent"
#include "QtGui/QKeySequence"
#include "QtGui/QLinearGradient"
// #include "QtGui/QList" // clash with QList
#include "QtGui/QMatrix"
#include "QtGui/QMatrix2x2"
#include "QtGui/QMatrix2x3"
@ -97,6 +98,58 @@
#include "QtGui/QMovie"
#include "QtGui/QNativeGestureEvent"
#include "QtGui/QOffscreenSurface"
#if 0 // we don't want to support this ..
#include "QtGui/QOpenGLBuffer"
#include "QtGui/QOpenGLContext"
#include "QtGui/QOpenGLContextGroup"
#include "QtGui/QOpenGLDebugLogger"
#include "QtGui/QOpenGLDebugMessage"
#include "QtGui/QOpenGLExtraFunctions"
#include "QtGui/QOpenGLExtraFunctionsPrivate"
#include "QtGui/QOpenGLFramebufferObject"
#include "QtGui/QOpenGLFramebufferObjectFormat"
#include "QtGui/QOpenGLFunctions"
#include "QtGui/QOpenGLFunctions_1_0"
#include "QtGui/QOpenGLFunctions_1_1"
#include "QtGui/QOpenGLFunctions_1_2"
#include "QtGui/QOpenGLFunctions_1_3"
#include "QtGui/QOpenGLFunctions_1_4"
#include "QtGui/QOpenGLFunctions_1_5"
#include "QtGui/QOpenGLFunctions_2_0"
#include "QtGui/QOpenGLFunctions_2_1"
#include "QtGui/QOpenGLFunctions_3_0"
#include "QtGui/QOpenGLFunctions_3_1"
#include "QtGui/QOpenGLFunctions_3_2_Compatibility"
#include "QtGui/QOpenGLFunctions_3_2_Core"
#include "QtGui/QOpenGLFunctions_3_3_Compatibility"
#include "QtGui/QOpenGLFunctions_3_3_Core"
#include "QtGui/QOpenGLFunctions_4_0_Compatibility"
#include "QtGui/QOpenGLFunctions_4_0_Core"
#include "QtGui/QOpenGLFunctions_4_1_Compatibility"
#include "QtGui/QOpenGLFunctions_4_1_Core"
#include "QtGui/QOpenGLFunctions_4_2_Compatibility"
#include "QtGui/QOpenGLFunctions_4_2_Core"
#include "QtGui/QOpenGLFunctions_4_3_Compatibility"
#include "QtGui/QOpenGLFunctions_4_3_Core"
#include "QtGui/QOpenGLFunctions_4_4_Compatibility"
#include "QtGui/QOpenGLFunctions_4_4_Core"
#include "QtGui/QOpenGLFunctions_4_5_Compatibility"
#include "QtGui/QOpenGLFunctions_4_5_Core"
#include "QtGui/QOpenGLFunctions_ES2"
#include "QtGui/QOpenGLFunctionsPrivate"
#include "QtGui/QOpenGLPaintDevice"
#include "QtGui/QOpenGLPixelTransferOptions"
#include "QtGui/QOpenGLShader"
#include "QtGui/QOpenGLShaderProgram"
#include "QtGui/QOpenGLTexture"
#include "QtGui/QOpenGLTextureBlitter"
#include "QtGui/QOpenGLTimeMonitor"
#include "QtGui/QOpenGLTimerQuery"
#include "QtGui/QOpenGLVersionFunctions"
#include "QtGui/QOpenGLVersionProfile"
#include "QtGui/QOpenGLVertexArrayObject"
#include "QtGui/QOpenGLWindow"
#endif
#include "QtGui/QPagedPaintDevice"
#include "QtGui/QPageLayout"
#include "QtGui/QPageSize"
@ -118,6 +171,7 @@
#include "QtGui/QPixmap"
#include "QtGui/QPixmapCache"
#include "QtGui/QPlatformSurfaceEvent"
#include "QtGui/QPointingDeviceUniqueId"
#include "QtGui/QPolygon"
#include "QtGui/QPolygonF"
#include "QtGui/QQuaternion"
@ -129,6 +183,7 @@
#include "QtGui/QRegularExpressionValidator"
#include "QtGui/QResizeEvent"
#include "QtGui/QRgb"
#include "QtGui/QRgba64"
#include "QtGui/QScreen"
#include "QtGui/QScreenOrientationChangeEvent"
#include "QtGui/QScrollEvent"
@ -186,6 +241,16 @@
#include "QtGui/QVector2D"
#include "QtGui/QVector3D"
#include "QtGui/QVector4D"
#if 0 // we don't want to support this ..
#include "QtGui/QVulkanDeviceFunctions"
#include "QtGui/QVulkanExtension"
#include "QtGui/QVulkanFunctions"
#include "QtGui/QVulkanInfoVector"
#include "QtGui/QVulkanInstance"
#include "QtGui/QVulkanLayer"
#include "QtGui/QVulkanWindow"
#include "QtGui/QVulkanWindowRenderer"
#endif
#include "QtGui/QWhatsThisClickedEvent"
#include "QtGui/QWheelEvent"
#include "QtGui/QWidgetList"

View File

@ -19,6 +19,7 @@
#include "QtMultimedia/QAudioOutputSelectorControl"
#include "QtMultimedia/QAudioProbe"
#include "QtMultimedia/QAudioRecorder"
#include "QtMultimedia/QAudioRoleControl"
#include "QtMultimedia/QAudioSystemFactoryInterface"
#include "QtMultimedia/QAudioSystemPlugin"
#include "QtMultimedia/QCamera"
@ -44,6 +45,7 @@
#include "QtMultimedia/QCameraViewfinderSettingsControl"
#include "QtMultimedia/QCameraViewfinderSettingsControl2"
#include "QtMultimedia/QCameraZoomControl"
#include "QtMultimedia/QCustomAudioRoleControl"
#include "QtMultimedia/QImageEncoderControl"
#include "QtMultimedia/QImageEncoderSettings"
#include "QtMultimedia/QMediaAudioProbeControl"

View File

@ -7,8 +7,11 @@
#include "QtNetwork/QDnsMailExchangeRecord"
#include "QtNetwork/QDnsServiceRecord"
#include "QtNetwork/QDnsTextRecord"
#include "QtNetwork/QDtls"
#include "QtNetwork/QDtlsClientVerifier"
#include "QtNetwork/QHostAddress"
#include "QtNetwork/QHostInfo"
#include "QtNetwork/QHstsPolicy"
#include "QtNetwork/QHttpMultiPart"
#include "QtNetwork/QHttpPart"
#include "QtNetwork/Q_IPV6ADDR"
@ -22,6 +25,7 @@
#include "QtNetwork/QNetworkConfigurationManager"
#include "QtNetwork/QNetworkCookie"
#include "QtNetwork/QNetworkCookieJar"
#include "QtNetwork/QNetworkDatagram"
#include "QtNetwork/QNetworkDiskCache"
#include "QtNetwork/QNetworkInterface"
#include "QtNetwork/QNetworkProxy"
@ -30,11 +34,14 @@
#include "QtNetwork/QNetworkReply"
#include "QtNetwork/QNetworkRequest"
#include "QtNetwork/QNetworkSession"
#include "QtNetwork/QSctpServer"
#include "QtNetwork/QSctpSocket"
#include "QtNetwork/QSsl"
#include "QtNetwork/QSslCertificate"
#include "QtNetwork/QSslCertificateExtension"
#include "QtNetwork/QSslCipher"
#include "QtNetwork/QSslConfiguration"
#include "QtNetwork/QSslDiffieHellmanParameters"
#include "QtNetwork/QSslEllipticCurve"
#include "QtNetwork/QSslError"
#include "QtNetwork/QSslKey"

View File

@ -30,13 +30,18 @@ drop_method :all_classes, /::qt_check_for_QOBJECT_macro/ # don't include in API!
drop_method :all_classes, /::devType\(/ # not required
drop_method :all_classes, /::data_ptr/ # no private data
drop_method :all_classes, /::x11/ # no X11 stuff
drop_method :all_classes, /\(.*std::chrono.*\)/ # no std::chrono
drop_method :all_classes, /^std::chrono::/ # no std::chrono as return value
drop_method :all_classes, /\(.*&&.*\)/ # no move semantics
drop_method :all_classes, /.*\s+&&$/ # no move semantics
drop_method :all_classes, /\(.*std::initializer_list.*\)/ # no brace initialization
drop_method :all_classes, /\(.*QStringView\W/ # no QStringView
drop_method :all_classes, /^QStringView\W/ # no QStringView
drop_method :all_classes, /\(.*QLatin1String\W/ # clashes usually with const char *
rename :all_classes, /::create\(/, "qt_create" # clashes with GSI/Ruby
rename :all_classes, /::destroy\(/, "qt_destroy" # clashes with GSI/Ruby
rename :all_classes, /::raise\(/, "qt_raise" # clashes with Ruby "raise" keyword
def_alias :all_classes, /::create\(/, "qt_create" # clashes with GSI/Ruby
def_alias :all_classes, /::destroy\(/, "qt_destroy" # clashes with GSI/Ruby
def_alias :all_classes, /::raise\(/, "qt_raise" # clashes with Ruby "raise" keyword
# --------------------------------------------------------------
# Qt
@ -74,20 +79,38 @@ drop_class "QAtomicInt"
drop_class "QAtomicInteger"
drop_class "QAtomicOps"
drop_class "QAtomicPointer"
drop_class "QAtomicTraits"
drop_class "QAtomicOpsSupport"
drop_class "QBasicAtomicInt"
drop_class "QBasicAtomicInteger"
drop_class "QBasicAtomicOps"
drop_class "QBasicAtomicPointer"
drop_class "QBBSystemLocaleData"
drop_class "QBigEndianStorageType"
drop_class "QBitArray"
drop_class "QBitRef"
drop_class "QBool"
drop_class "QByteArray"
drop_class "QByteRef"
drop_class "QCache"
drop_class "QCborArray" # complex API & there are better alternatives
drop_class "QCborArray_ConstIterator" # complex API & there are better alternatives
drop_class "QCborArray_Iterator" # complex API & there are better alternatives
drop_class "QCborError" # complex API & there are better alternatives
drop_class "QCborMap" # complex API & there are better alternatives
drop_class "QCborMap_ConstIterator" # complex API & there are better alternatives
drop_class "QCborMap_Iterator" # complex API & there are better alternatives
drop_class "QCborParserError" # complex API & there are better alternatives
drop_class "QCborStreamReader" # complex API & there are better alternatives
drop_class "QCborStreamWriter" # complex API & there are better alternatives
drop_class "QCborValue" # complex API & there are better alternatives
drop_class "QCborValueRef" # complex API & there are better alternatives
drop_class "QCborKnownTags" # complex API & there are better alternatives
drop_class "QCborNegativeInteger" # complex API & there are better alternatives
drop_class "QCborSimpleType" # complex API & there are better alternatives
drop_class "QChar"
drop_class "QCharRef"
drop_class "QConstOverload"
drop_class "QConstString"
drop_class "QContiguousCache"
drop_class "QContiguousCacheData"
@ -126,6 +149,7 @@ drop_class "QIncompatibleFlag"
drop_class "QInternal"
drop_class "QIntegerForSizeof"
drop_class "QJsonPrivate"
drop_class "QKeyValueIterator"
drop_class "QLatin1Char"
drop_class "QLatin1String"
drop_class "QLinkedList"
@ -136,6 +160,7 @@ drop_class "QList"
drop_class "QListData"
drop_class "QListIterator"
drop_class "QListSpecialMethods"
drop_class "QLittleEndianStorageType"
drop_class "QMap"
drop_class "QMapData"
drop_class "QMapIterator"
@ -157,10 +182,12 @@ drop_class "QMutableStringListIterator"
drop_class "QMutableVectorIterator"
drop_class "QMutexLocker"
drop_class "QNoImplicitBoolCast"
drop_class "QNonConstOverload"
drop_class "QObjectCleanupHandler"
drop_class "QObjectData"
drop_class "QObjectList"
drop_class "QObjectUserData"
drop_class "QOverload"
drop_class "QPair"
drop_class "QPointer"
drop_class "QQueue"
@ -171,19 +198,24 @@ drop_class "QScopedPointerDeleter"
drop_class "QScopedPointerObjectDeleteLater"
drop_class "QScopedPointerPodDeleter"
drop_class "QScopedValueRollback"
drop_class "QScopeGuard"
drop_class "QSet"
drop_class "QSetIterator"
drop_class "QSharedDataPointer"
drop_class "QSharedData" # where to get QAtomic?
drop_class "QSharedPointer"
drop_class "QSpecialInteger"
drop_class "QStack"
drop_class "QStaticArrayData"
drop_class "QStaticByteArrayData"
drop_class "QStaticByteArrayMatcher"
drop_class "QStaticByteArrayMatcherBase"
drop_class "QStaticStringData"
drop_class "QStdWString"
drop_class "QStringListIterator"
drop_class "QStringList" # mapped otherwise
drop_class "QString" # mapped otherwise
drop_class "QStringView" # mapped otherwise
drop_class "QStringRef"
drop_class "QStringBuilder"
drop_class "QStringBuilderBase"
@ -213,6 +245,7 @@ drop_class "QtMetaTypePrivate"
drop_class "QtGlobalStatic"
drop_class "QTypeInfo"
drop_class "QTypeInfoMerger"
drop_class "QTypeInfoQuery"
drop_class "QTypedArrayData"
drop_class "QUuid"
drop_class "QUpdateLaterEvent"
@ -230,9 +263,16 @@ drop_enum_const "QEvent", /CocoaRequestModal/ # not available on WIN
drop_method "QMetaType", /QMetaType::staticMetaObject/ # not available
drop_method "QMetaType", /QMetaType::registerNormalizedType/ # needs function ptrs.
drop_method "QDeadlineTimer", /QDeadlineTimer::_q_data/ # internal and QPair is not bound
drop_method "QCollator", /QCollator::compare\(.*QStringRef/ # clashes with QString version
drop_method "QLocale", /QLocale::(toDouble|toFloat|toInt|toLongLong|toShort|quoteString|toUInt|toULongLong|toUShort)\(.*QStringRef/ # clashes with QString version
drop_method "QRegularExpression", /QRegularExpression::(match|globalMatch)\(.*QStringRef/ # clashes with QString version
drop_method "QRandomGenerator", /QRandomGenerator::QRandomGenerator\(.*quint32\s+\*/ # no pointers
drop_method "QRandomGenerator", /QRandomGenerator::QRandomGenerator\(.*std::seed_seq/ # no std::seed_seq
drop_method "QRandomGenerator", /QRandomGenerator::seed\(.*std::seed_seq/ # no std::seed_seq
drop_method "QRandomGenerator64", /QRandomGenerator64::QRandomGenerator64\(.*quint32\s+\*/ # no pointers
drop_method "QRandomGenerator64", /QRandomGenerator64::QRandomGenerator64\(.*std::seed_seq/ # no std::seed_seq
drop_method "QRandomGenerator64", /QRandomGenerator64::seed\(.*std::seed_seq/ # no std::seed_seq
drop_method "QSignalBlocker", /QSignalBlocker::QSignalBlocker\(.*&/ # clashes with pointer version
drop_method "QQuaternion", /QQuaternion::toRotationMatrix\(/ # GenericMatrix not available
drop_method "QQuaternion", /QQuaternion::fromRotationMatrix\(/ # GenericMatrix not available
@ -353,6 +393,8 @@ drop_method "", /::operator\s*==\(const\s+QVariant\s*&\w+,\s*const\s+QVariantCom
drop_method "", /::operator\s*!=\(const\s+QVariant\s*&\w+,\s*const\s+QVariantComparisonHelper/ # requires QVariantComparisonHelper
drop_method "QByteArrayMatcher", /QByteArrayMatcher::indexIn\(const\s+QByteArray/ # clashes with const char * variant
drop_method "QRegion", /QRegion::setRects/ # gets a new implementation
drop_method "QRegion", /QRegion::c?rbegin/ # iterator not available
drop_method "QRegion", /QRegion::c?rend/ # iterator not available
drop_method "QTimer", /static\s+void\s+QTimer::singleShot\(/ # requires slots, alternative impl?
drop_method "QDebug", /QDebug::operator\s*<<\((?!const\s+QString\s*&)/ # don't map the others right now - too many (TODO: how to map?)
drop_method "", /::operator\s*<<\(QDebug\s*\w*\s*,\s*(?!const\s+QString\s*&)/ # don't map the others right now - too many (TODO: how to map?)
@ -628,15 +670,20 @@ drop_class "QOpenGLPixelTransferOptions" # OpenGL native types not supported
drop_class "QOpenGLShader" # OpenGL native types not supported
drop_class "QOpenGLShaderProgram" # OpenGL native types not supported
drop_class "QOpenGLTexture" # OpenGL native types not supported
drop_class "QOpenGLTextureBlitter" # OpenGL native types not supported
drop_class "QOpenGLTimeMonitor" # OpenGL native types not supported
drop_class "QOpenGLTimerQuery" # OpenGL native types not supported
drop_class "QOpenGLVersionFunctionsBackend" # OpenGL native types not supported
drop_class "QOpenGLVersionProfile" # OpenGL native types not supported
drop_class "QOpenGLVersionStatus" # OpenGL native types not supported
drop_class "QOpenGLVersionFunctionsStorage" # OpenGL native types not supported
drop_class "QOpenGLVertexArrayObject_Binder" # OpenGL native types not supported
drop_class "QOpenGLVertexArrayObject" # OpenGL native types not supported
drop_class "QOpenGLWidget" # OpenGL native types not supported
drop_class "QOpenGLWindow" # OpenGL native types not supported
drop_class "QOpenGLExtraFunctions" # OpenGL native types not supported
drop_class "QOpenGLExtraFunctionsPrivate" # OpenGL native types not supported
drop_class "QOpenGLExtraFunctionsPrivate_Functions" # OpenGL native types not supported
# depedencies from operators are not derived automatically currently:
include "QPoint", [ "<QPoint>", "<QMatrix>", "<QMatrix4x4>" ]
@ -654,6 +701,8 @@ include "QOffscreenSurface", [ "<QOffscreenSurface>", "<QScreen>" ]
include "QScreenOrientationChangeEvent", [ "<QScreenOrientationChangeEvent>", "<QScreen>" ]
drop_method "QWindow", /QWindow::handle/ # QPlatformWindow not available
drop_method "QWindow", /::vulkanInstance\(/ # no Vulkan support currently
drop_method "QWindow", /::setVulkanInstance\(/ # no Vulkan support currently
drop_method "QScreen", /QScreen::handle/ # QPlatformScreen not available
drop_method "QSurface", /QSurface::surfaceHandle/ # QPlatformSurface not available
drop_method "QOffscreenSurface", /QOffscreenSurface::handle/ # QPlatformOffscreenSurface not available
@ -663,7 +712,8 @@ drop_method "QGuiApplication", /QGuiApplication::platformFunction/ # (TODO) no
drop_method "QPagedPaintDevice", /QPagedPaintDevice::dd/ # QPagedPaintDevicePrivate not available
drop_method "QPixmap", /QPixmap::QPixmap\(QPlatformPixmap/ # QPlatformPixmap not available
drop_method "QAbstractPageSetupDialog", /QAbstractPageSetupDialog::QAbstractPageSetupDialog\(QAbstractPageSetupDialogPrivate/
drop_method "QImage", /QImage::QImage\(.*cleanupFunction/ # (TODO) no function pointers available
drop_method "QImage", /QImage::QImage\(.*cleanupFunction/ # (TODO) no function pointers available -> substitute by variant in add_native_impl_QImage
add_native_impl_QImage()
drop_method "QClipboardEvent", /QClipboardEvent::data/
drop_method "QClipboardEvent", /QClipboardEvent::QClipboardEvent\(QEventPrivate/
drop_method "QCursor", /QCursor::QCursor\s*\(\s*Qt::HANDLE/ # not available on WIN
@ -786,11 +836,31 @@ drop_method "Qimage", /Qimage::text\(const\s+QString/ # clashes with const char
rename "QDialogButtonBox", /QDialogButtonBox::QDialogButtonBox\(QFlags/, "new_buttons"
rename "QIcon", /QIcon::pixmap\(int\s+extent/, "pixmap_ext"
rename "QKeySequence", /QKeySequence::QKeySequence\(QKeySequence::StandardKey/, "new_std"
# TODO: basically, the layout object only takes ownership over the objects when
# it has a QWidget parent itself. This is not reflected in the following simple scheme
keep_arg "QBoxLayout", /::addLayout/, 0 # will take ownership of layout
keep_arg "QBoxLayout", /::addSpacerItem/, 0 # will take ownership of item
keep_arg "QBoxLayout", /::addWidget/, 0 # will take ownership of item
keep_arg "QBoxLayout", /::insertItem/, 1 # will take ownership of item
keep_arg "QBoxLayout", /::insertLayout/, 1 # will take ownership of item
keep_arg "QBoxLayout", /::insertSpacerItem/, 1 # will take ownership of item
keep_arg "QBoxLayout", /::insertWidget/, 1 # will take ownership of item
keep_arg "QFormLayout", /::addRow/, 1 # will take ownership of item
keep_arg "QFormLayout", /::addRow\(QWidget\s*\*/, 0 # will take ownership of item
keep_arg "QFormLayout", /::insertRow/, 2 # will take ownership of item
keep_arg "QFormLayout", /::insertRow\(QWidget\s*\*/, 1 # will take ownership of item
keep_arg "QFormLayout", /::setWidget/, 2 # will take ownership of item
keep_arg "QGridLayout", /::addLayout/, 0 # will take ownership of layout
keep_arg "QWidget", /::setLayout\s*\(/, 0 # will take ownership of layout
keep_arg "QGridLayout", /::addItem/, 0 # will take ownership of layout
keep_arg "QGridLayout", /::addWidget/, 0 # will take ownership of layout
keep_arg "QLayout", /::addChildLayout/, 0 # will take ownership of layout
keep_arg "QLayout", /::addItem/, 0 # will take ownership of item
keep_arg "QLayout", /::addWidget/, 0 # will take ownership of item
keep_arg "QStackedLayout", /::addWidget/, 0 # will take ownership of item
keep_arg "QStackedLayout", /::insertWidget/, 1 # will take ownership of item
keep_arg "QWidget", /::setLayout\s*\(/, 0 # will take ownership of layout
keep_arg "QTreeWidgetItem", /::addChild\(/, 0 # will take ownership of the child
keep_arg "QTreeWidgetItem", /::addChildren\(/, 0 # will take ownership of the children
keep_arg "QTreeWidgetItem", /::insertChild\(/, 1 # will take ownership of the child
@ -817,7 +887,7 @@ owner_arg "QWidget", /::setParent\(QWidget\s+\*/, 0 # will make self owned by ar
# keep_arg "QTableWidget", /::setItemPrototype\(/, 0 # will take ownership of the child
return_new "QLayout", /::takeAt/ # returns a free object
return_new "QBoxLayout", /::takeAt/ # returns a free object
return_new "QFormLayout", /::takeAt/ # returns a free object
# TODO: QFormLayout: takeRow -> needs QFormLayout::TakeRowResult
return_new "QGridLayout", /::takeAt/ # returns a free object
return_new "QStackedLayout", /::takeAt/ # returns a free object
return_new "QStandardItem", /::take/ # returns a free object
@ -945,6 +1015,10 @@ no_imports "QAbstractXmlNodeModel" # base class is QSharedData which is not ava
# --------------------------------------------------------------
# QtNetwork
include "QDtlsError", [ "<QDtls>" ]
drop_class "QPasswordDigestor" # only available on Qt 5.12.12, not before
drop_method "QUrlInfo", /QUrlInfo::QUrlInfo\(.*permissions/ # too many arguments (13)
drop_method "QHostAddress", /QHostAddress::QHostAddress\(\s*(const\s*)?quint8\s*\*/ # requires char *, a string version is available for IPv6
drop_method "QHostAddress", /QHostAddress::QHostAddress\(\s*const\s+QIPv6Address/ # requires QIPv6Address struct, a string version is available for IPv6

View File

@ -272,6 +272,10 @@ event("QSignalMapper", /::mapped\s*\(.*QWidget/, "QWidget*")
rename("QSignalMapper", /::mapped\s*\(.*QWidget/, "mapped_qw")
event("QSignalMapper", /::mapped\s*\(.*QObject/, "QObject*")
rename("QSignalMapper", /::mapped\s*\(.*QObject/, "mapped_qo")
event("QSignalMapper", /::mappedInt\s*\(/, "int")
event("QSignalMapper", /::mappedString\s*\(/, "QString")
event("QSignalMapper", /::mappedWidget\s*\(/, "QWidget*")
event("QSignalMapper", /::mappedObject\s*\(/, "QObject*")
event("QSignalTransition", /::destroyed\s*\(/, "QObject*")
event("QSignalTransition", /::objectNameChanged\s*\(/, "QString")
event("QSignalTransition", /::triggered\s*\(/, "")
@ -281,6 +285,7 @@ event("QSignalTransition", /::senderObjectChanged\s*\(/, "")
event("QSignalTransition", /::signalChanged\s*\(/, "")
event("QSocketNotifier", /::destroyed\s*\(/, "QObject*")
event("QSocketNotifier", /::objectNameChanged\s*\(/, "QString")
event("QSocketNotifier", /::activated\s*\(/, "QSocketDescriptor, QSocketNotifier::Type")
event("QSocketNotifier", /::activated\s*\(/, "int")
event("QSortFilterProxyModel", /::destroyed\s*\(/, "QObject*")
event("QSortFilterProxyModel", /::objectNameChanged\s*\(/, "QString")
@ -303,6 +308,13 @@ event("QSortFilterProxyModel", /::rowsMoved\s*\(/, "QModelIndex, int, int, QMode
event("QSortFilterProxyModel", /::columnsAboutToBeMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QSortFilterProxyModel", /::columnsMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QSortFilterProxyModel", /::sourceModelChanged\s*\(/, "")
event("QSortFilterProxyModel", /::dynamicSortFilterChanged\s*\(/, "bool")
event("QSortFilterProxyModel", /::filterCaseSensitivityChanged\s*\(/, "Qt::CaseSensitivity")
event("QSortFilterProxyModel", /::sortCaseSensitivityChanged\s*\(/, "Qt::CaseSensitivity")
event("QSortFilterProxyModel", /::sortLocaleAwareChanged\s*\(/, "bool")
event("QSortFilterProxyModel", /::sortRoleChanged\s*\(/, "int")
event("QSortFilterProxyModel", /::filterRoleChanged\s*\(/, "int")
event("QSortFilterProxyModel", /::recursiveFilteringEnabledChanged\s*\(/, "bool")
event("QState", /::destroyed\s*\(/, "QObject*")
event("QState", /::objectNameChanged\s*\(/, "QString")
event("QState", /::entered\s*\(/, "")
@ -475,6 +487,7 @@ event("QPaintDeviceWindow", /::activeChanged\s*\(/, "")
event("QPaintDeviceWindow", /::contentOrientationChanged\s*\(/, "Qt::ScreenOrientation")
event("QPaintDeviceWindow", /::focusObjectChanged\s*\(/, "QObject*")
event("QPaintDeviceWindow", /::opacityChanged\s*\(/, "double")
event("QPaintDeviceWindow", /::transientParentChanged\s*\(/, "QWindow*")
event("QPdfWriter", /::destroyed\s*\(/, "QObject*")
event("QPdfWriter", /::objectNameChanged\s*\(/, "QString")
event("QPictureFormatPlugin", /::destroyed\s*\(/, "QObject*")
@ -499,6 +512,7 @@ event("QRasterWindow", /::activeChanged\s*\(/, "")
event("QRasterWindow", /::contentOrientationChanged\s*\(/, "Qt::ScreenOrientation")
event("QRasterWindow", /::focusObjectChanged\s*\(/, "QObject*")
event("QRasterWindow", /::opacityChanged\s*\(/, "double")
event("QRasterWindow", /::transientParentChanged\s*\(/, "QWindow*")
event("QRegExpValidator", /::destroyed\s*\(/, "QObject*")
event("QRegExpValidator", /::objectNameChanged\s*\(/, "QString")
event("QRegExpValidator", /::changed\s*\(/, "")
@ -551,6 +565,7 @@ event("QStyleHints", /::startDragDistanceChanged\s*\(/, "int")
event("QStyleHints", /::startDragTimeChanged\s*\(/, "int")
event("QStyleHints", /::tabFocusBehaviorChanged\s*\(/, "Qt::TabFocusBehavior")
event("QStyleHints", /::useHoverEffectsChanged\s*\(/, "bool")
event("QStyleHints", /::showShortcutsInContextMenusChanged\s*\(/, "bool")
event("QStyleHints", /::wheelScrollLinesChanged\s*\(/, "int")
event("QStyleHints", /::mouseQuickSelectionThresholdChanged\s*\(/, "int")
event("QSyntaxHighlighter", /::destroyed\s*\(/, "QObject*")
@ -600,6 +615,7 @@ event("QWindow", /::activeChanged\s*\(/, "")
event("QWindow", /::contentOrientationChanged\s*\(/, "Qt::ScreenOrientation")
event("QWindow", /::focusObjectChanged\s*\(/, "QObject*")
event("QWindow", /::opacityChanged\s*\(/, "double")
event("QWindow", /::transientParentChanged\s*\(/, "QWindow*")
event("QAbstractButton", /::destroyed\s*\(/, "QObject*")
event("QAbstractButton", /::objectNameChanged\s*\(/, "QString")
event("QAbstractButton", /::windowTitleChanged\s*\(/, "QString")
@ -700,6 +716,10 @@ rename("QButtonGroup", /::buttonReleased\s*\(.*QAbstractButton/, "buttonReleased
event("QButtonGroup", /::buttonReleased\s*\(.*int/, "int")
event("QButtonGroup", /::buttonToggled\s*\(/, "QAbstractButton*, bool")
event("QButtonGroup", /::buttonToggled\s*\(/, "int, bool")
event("QButtonGroup", /::idClicked\s*\(/, "int")
event("QButtonGroup", /::idPressed\s*\(/, "int")
event("QButtonGroup", /::idReleased\s*\(/, "int")
event("QButtonGroup", /::idToggled\s*\(/, "int, bool")
event("QCalendarWidget", /::destroyed\s*\(/, "QObject*")
event("QCalendarWidget", /::objectNameChanged\s*\(/, "QString")
event("QCalendarWidget", /::windowTitleChanged\s*\(/, "QString")
@ -756,9 +776,11 @@ event("QComboBox", /::editTextChanged\s*\(/, "QString")
event("QComboBox", /::activated\s*\(.*int/, "int")
event("QComboBox", /::activated\s*\(.*QString/, "QString")
rename("QComboBox", /::activated\s*\(.*QString/, "activated_qs")
event("QComboBox", /::textActivated\s*\(/, "QString")
event("QComboBox", /::highlighted\s*\(.*int/, "int")
event("QComboBox", /::highlighted\s*\(.*QString/, "QString")
rename("QComboBox", /::highlighted\s*\(.*QString/, "highlighted_qs")
event("QComboBox", /::textHighlighted\s*\(/, "QString")
event("QComboBox", /::currentIndexChanged\s*\(.*int/, "int")
event("QComboBox", /::currentIndexChanged\s*\(.*QString/, "QString")
rename("QComboBox", /::currentIndexChanged\s*\(.*QString/, "currentIndexChanged_qs")
@ -889,6 +911,7 @@ event("QDoubleSpinBox", /::editingFinished\s*\(/, "")
event("QDoubleSpinBox", /::valueChanged\s*\(.*double/, "double")
event("QDoubleSpinBox", /::valueChanged\s*\(.*QString/, "QString")
rename("QDoubleSpinBox", /::valueChanged\s*\(.*QString/, "valueChanged_qs")
event("QDoubleSpinBox", /::textChanged\s*\(/, "QString")
event("QErrorMessage", /::destroyed\s*\(/, "QObject*")
event("QErrorMessage", /::objectNameChanged\s*\(/, "QString")
event("QErrorMessage", /::windowTitleChanged\s*\(/, "QString")
@ -955,9 +978,11 @@ event("QFontComboBox", /::editTextChanged\s*\(/, "QString")
event("QFontComboBox", /::activated\s*\(.*int/, "int")
event("QFontComboBox", /::activated\s*\(.*QString/, "QString")
rename("QFontComboBox", /::activated\s*\(.*QString/, "activated_qs")
event("QFontComboBox", /::textActivated\s*\(/, "QString")
event("QFontComboBox", /::highlighted\s*\(.*int/, "int")
event("QFontComboBox", /::highlighted\s*\(.*QString/, "QString")
rename("QFontComboBox", /::highlighted\s*\(.*QString/, "highlighted_qs")
event("QFontComboBox", /::textHighlighted\s*\(/, "QString")
event("QFontComboBox", /::currentIndexChanged\s*\(.*int/, "int")
event("QFontComboBox", /::currentIndexChanged\s*\(.*QString/, "QString")
rename("QFontComboBox", /::currentIndexChanged\s*\(.*QString/, "currentIndexChanged_qs")
@ -1406,6 +1431,7 @@ event("QSpinBox", /::editingFinished\s*\(/, "")
event("QSpinBox", /::valueChanged\s*\(.*int/, "int")
event("QSpinBox", /::valueChanged\s*\(.*QString/, "QString")
rename("QSpinBox", /::valueChanged\s*\(.*QString/, "valueChanged_qs")
event("QSpinBox", /::textChanged\s*\(/, "QString")
event("QSplashScreen", /::destroyed\s*\(/, "QObject*")
event("QSplashScreen", /::objectNameChanged\s*\(/, "QString")
event("QSplashScreen", /::windowTitleChanged\s*\(/, "QString")
@ -1709,6 +1735,499 @@ event("QWizardPage", /::windowIconChanged\s*\(/, "QIcon")
event("QWizardPage", /::windowIconTextChanged\s*\(/, "QString")
event("QWizardPage", /::customContextMenuRequested\s*\(/, "QPoint")
event("QWizardPage", /::completeChanged\s*\(/, "")
event("QAbstractMessageHandler", /::destroyed\s*\(/, "QObject*")
event("QAbstractMessageHandler", /::objectNameChanged\s*\(/, "QString")
event("QAbstractUriResolver", /::destroyed\s*\(/, "QObject*")
event("QAbstractUriResolver", /::objectNameChanged\s*\(/, "QString")
event("QGraphicsSvgItem", /::destroyed\s*\(/, "QObject*")
event("QGraphicsSvgItem", /::objectNameChanged\s*\(/, "QString")
event("QGraphicsSvgItem", /::parentChanged\s*\(/, "")
event("QGraphicsSvgItem", /::opacityChanged\s*\(/, "")
event("QGraphicsSvgItem", /::visibleChanged\s*\(/, "")
event("QGraphicsSvgItem", /::enabledChanged\s*\(/, "")
event("QGraphicsSvgItem", /::xChanged\s*\(/, "")
event("QGraphicsSvgItem", /::yChanged\s*\(/, "")
event("QGraphicsSvgItem", /::zChanged\s*\(/, "")
event("QGraphicsSvgItem", /::rotationChanged\s*\(/, "")
event("QGraphicsSvgItem", /::scaleChanged\s*\(/, "")
event("QGraphicsSvgItem", /::childrenChanged\s*\(/, "")
event("QGraphicsSvgItem", /::widthChanged\s*\(/, "")
event("QGraphicsSvgItem", /::heightChanged\s*\(/, "")
event("QSvgRenderer", /::destroyed\s*\(/, "QObject*")
event("QSvgRenderer", /::objectNameChanged\s*\(/, "QString")
event("QSvgRenderer", /::repaintNeeded\s*\(/, "")
event("QSvgWidget", /::destroyed\s*\(/, "QObject*")
event("QSvgWidget", /::objectNameChanged\s*\(/, "QString")
event("QSvgWidget", /::windowTitleChanged\s*\(/, "QString")
event("QSvgWidget", /::windowIconChanged\s*\(/, "QIcon")
event("QSvgWidget", /::windowIconTextChanged\s*\(/, "QString")
event("QSvgWidget", /::customContextMenuRequested\s*\(/, "QPoint")
event("QAbstractPrintDialog", /::destroyed\s*\(/, "QObject*")
event("QAbstractPrintDialog", /::objectNameChanged\s*\(/, "QString")
event("QAbstractPrintDialog", /::windowTitleChanged\s*\(/, "QString")
event("QAbstractPrintDialog", /::windowIconChanged\s*\(/, "QIcon")
event("QAbstractPrintDialog", /::windowIconTextChanged\s*\(/, "QString")
event("QAbstractPrintDialog", /::customContextMenuRequested\s*\(/, "QPoint")
event("QAbstractPrintDialog", /::finished\s*\(/, "int")
event("QAbstractPrintDialog", /::accepted\s*\(/, "")
event("QAbstractPrintDialog", /::rejected\s*\(/, "")
event("QPrintDialog", /::destroyed\s*\(/, "QObject*")
event("QPrintDialog", /::objectNameChanged\s*\(/, "QString")
event("QPrintDialog", /::windowTitleChanged\s*\(/, "QString")
event("QPrintDialog", /::windowIconChanged\s*\(/, "QIcon")
event("QPrintDialog", /::windowIconTextChanged\s*\(/, "QString")
event("QPrintDialog", /::customContextMenuRequested\s*\(/, "QPoint")
event("QPrintDialog", /::finished\s*\(/, "int")
event("QPrintDialog", /::accepted\s*\(/, "QPrinter*")
event("QPrintDialog", /::rejected\s*\(/, "")
event("QPrintPreviewDialog", /::destroyed\s*\(/, "QObject*")
event("QPrintPreviewDialog", /::objectNameChanged\s*\(/, "QString")
event("QPrintPreviewDialog", /::windowTitleChanged\s*\(/, "QString")
event("QPrintPreviewDialog", /::windowIconChanged\s*\(/, "QIcon")
event("QPrintPreviewDialog", /::windowIconTextChanged\s*\(/, "QString")
event("QPrintPreviewDialog", /::customContextMenuRequested\s*\(/, "QPoint")
event("QPrintPreviewDialog", /::finished\s*\(/, "int")
event("QPrintPreviewDialog", /::accepted\s*\(/, "")
event("QPrintPreviewDialog", /::rejected\s*\(/, "")
event("QPrintPreviewDialog", /::paintRequested\s*\(/, "QPrinter*")
event("QPrintPreviewWidget", /::destroyed\s*\(/, "QObject*")
event("QPrintPreviewWidget", /::objectNameChanged\s*\(/, "QString")
event("QPrintPreviewWidget", /::windowTitleChanged\s*\(/, "QString")
event("QPrintPreviewWidget", /::windowIconChanged\s*\(/, "QIcon")
event("QPrintPreviewWidget", /::windowIconTextChanged\s*\(/, "QString")
event("QPrintPreviewWidget", /::customContextMenuRequested\s*\(/, "QPoint")
event("QPrintPreviewWidget", /::paintRequested\s*\(/, "QPrinter*")
event("QPrintPreviewWidget", /::previewChanged\s*\(/, "")
event("QAbstractAudioDeviceInfo", /::destroyed\s*\(/, "QObject*")
event("QAbstractAudioDeviceInfo", /::objectNameChanged\s*\(/, "QString")
event("QAbstractAudioInput", /::destroyed\s*\(/, "QObject*")
event("QAbstractAudioInput", /::objectNameChanged\s*\(/, "QString")
event("QAbstractAudioInput", /::errorChanged\s*\(/, "QAudio::Error")
event("QAbstractAudioInput", /::stateChanged\s*\(/, "QAudio::State")
event("QAbstractAudioInput", /::notify\s*\(/, "")
event("QAbstractAudioOutput", /::destroyed\s*\(/, "QObject*")
event("QAbstractAudioOutput", /::objectNameChanged\s*\(/, "QString")
event("QAbstractAudioOutput", /::errorChanged\s*\(/, "QAudio::Error")
event("QAbstractAudioOutput", /::stateChanged\s*\(/, "QAudio::State")
event("QAbstractAudioOutput", /::notify\s*\(/, "")
event("QAbstractVideoFilter", /::destroyed\s*\(/, "QObject*")
event("QAbstractVideoFilter", /::objectNameChanged\s*\(/, "QString")
event("QAbstractVideoFilter", /::activeChanged\s*\(/, "")
event("QAbstractVideoSurface", /::destroyed\s*\(/, "QObject*")
event("QAbstractVideoSurface", /::objectNameChanged\s*\(/, "QString")
event("QAbstractVideoSurface", /::activeChanged\s*\(/, "bool")
event("QAbstractVideoSurface", /::surfaceFormatChanged\s*\(/, "QVideoSurfaceFormat")
event("QAbstractVideoSurface", /::supportedFormatsChanged\s*\(/, "")
event("QAbstractVideoSurface", /::nativeResolutionChanged\s*\(/, "QSize")
event("QAudioDecoder", /::destroyed\s*\(/, "QObject*")
event("QAudioDecoder", /::objectNameChanged\s*\(/, "QString")
event("QAudioDecoder", /::notifyIntervalChanged\s*\(/, "int")
event("QAudioDecoder", /::metaDataAvailableChanged\s*\(/, "bool")
event("QAudioDecoder", /::metaDataChanged\s*\(/, "QString, QVariant")
event("QAudioDecoder", /::availabilityChanged\s*\(/, "bool")
event("QAudioDecoder", /::availabilityChanged\s*\(/, "QMultimedia::AvailabilityStatus")
event("QAudioDecoder", /::bufferAvailableChanged\s*\(/, "bool")
event("QAudioDecoder", /::bufferReady\s*\(/, "")
event("QAudioDecoder", /::finished\s*\(/, "")
event("QAudioDecoder", /::stateChanged\s*\(/, "QAudioDecoder::State")
event("QAudioDecoder", /::formatChanged\s*\(/, "QAudioFormat")
event("QAudioDecoder", /::error\s*\(/, "QAudioDecoder::Error")
event("QAudioDecoder", /::sourceChanged\s*\(/, "")
event("QAudioDecoder", /::positionChanged\s*\(/, "qlonglong")
event("QAudioDecoder", /::durationChanged\s*\(/, "qlonglong")
event("QAudioDecoderControl", /::destroyed\s*\(/, "QObject*")
event("QAudioDecoderControl", /::objectNameChanged\s*\(/, "QString")
event("QAudioDecoderControl", /::stateChanged\s*\(/, "QAudioDecoder::State")
event("QAudioDecoderControl", /::formatChanged\s*\(/, "QAudioFormat")
event("QAudioDecoderControl", /::sourceChanged\s*\(/, "")
event("QAudioDecoderControl", /::error\s*\(/, "int, QString")
event("QAudioDecoderControl", /::bufferReady\s*\(/, "")
event("QAudioDecoderControl", /::bufferAvailableChanged\s*\(/, "bool")
event("QAudioDecoderControl", /::finished\s*\(/, "")
event("QAudioDecoderControl", /::positionChanged\s*\(/, "qlonglong")
event("QAudioDecoderControl", /::durationChanged\s*\(/, "qlonglong")
event("QAudioEncoderSettingsControl", /::destroyed\s*\(/, "QObject*")
event("QAudioEncoderSettingsControl", /::objectNameChanged\s*\(/, "QString")
event("QAudioInput", /::destroyed\s*\(/, "QObject*")
event("QAudioInput", /::objectNameChanged\s*\(/, "QString")
event("QAudioInput", /::stateChanged\s*\(/, "QAudio::State")
event("QAudioInput", /::notify\s*\(/, "")
event("QAudioInputSelectorControl", /::destroyed\s*\(/, "QObject*")
event("QAudioInputSelectorControl", /::objectNameChanged\s*\(/, "QString")
event("QAudioInputSelectorControl", /::activeInputChanged\s*\(/, "QString")
event("QAudioInputSelectorControl", /::availableInputsChanged\s*\(/, "")
event("QAudioOutput", /::destroyed\s*\(/, "QObject*")
event("QAudioOutput", /::objectNameChanged\s*\(/, "QString")
event("QAudioOutput", /::stateChanged\s*\(/, "QAudio::State")
event("QAudioOutput", /::notify\s*\(/, "")
event("QAudioOutputSelectorControl", /::destroyed\s*\(/, "QObject*")
event("QAudioOutputSelectorControl", /::objectNameChanged\s*\(/, "QString")
event("QAudioOutputSelectorControl", /::activeOutputChanged\s*\(/, "QString")
event("QAudioOutputSelectorControl", /::availableOutputsChanged\s*\(/, "")
event("QAudioProbe", /::destroyed\s*\(/, "QObject*")
event("QAudioProbe", /::objectNameChanged\s*\(/, "QString")
event("QAudioProbe", /::audioBufferProbed\s*\(/, "QAudioBuffer")
event("QAudioProbe", /::flush\s*\(/, "")
event("QAudioRecorder", /::destroyed\s*\(/, "QObject*")
event("QAudioRecorder", /::objectNameChanged\s*\(/, "QString")
event("QAudioRecorder", /::stateChanged\s*\(/, "QMediaRecorder::State")
event("QAudioRecorder", /::statusChanged\s*\(/, "QMediaRecorder::Status")
event("QAudioRecorder", /::durationChanged\s*\(/, "qlonglong")
event("QAudioRecorder", /::mutedChanged\s*\(/, "bool")
event("QAudioRecorder", /::volumeChanged\s*\(/, "double")
event("QAudioRecorder", /::actualLocationChanged\s*\(/, "QUrl")
event("QAudioRecorder", /::error\s*\(/, "QMediaRecorder::Error")
event("QAudioRecorder", /::metaDataAvailableChanged\s*\(/, "bool")
event("QAudioRecorder", /::metaDataWritableChanged\s*\(/, "bool")
event("QAudioRecorder", /::metaDataChanged\s*\(/, "QString, QVariant")
event("QAudioRecorder", /::availabilityChanged\s*\(/, "bool")
event("QAudioRecorder", /::availabilityChanged\s*\(/, "QMultimedia::AvailabilityStatus")
event("QAudioRecorder", /::audioInputChanged\s*\(/, "QString")
event("QAudioRecorder", /::availableAudioInputsChanged\s*\(/, "")
event("QAudioRoleControl", /::destroyed\s*\(/, "QObject*")
event("QAudioRoleControl", /::objectNameChanged\s*\(/, "QString")
event("QAudioRoleControl", /::audioRoleChanged\s*\(/, "QAudio::Role")
event("QAudioSystemPlugin", /::destroyed\s*\(/, "QObject*")
event("QAudioSystemPlugin", /::objectNameChanged\s*\(/, "QString")
event("QCamera", /::destroyed\s*\(/, "QObject*")
event("QCamera", /::objectNameChanged\s*\(/, "QString")
event("QCamera", /::notifyIntervalChanged\s*\(/, "int")
event("QCamera", /::metaDataAvailableChanged\s*\(/, "bool")
event("QCamera", /::metaDataChanged\s*\(/, "QString, QVariant")
event("QCamera", /::availabilityChanged\s*\(/, "bool")
event("QCamera", /::availabilityChanged\s*\(/, "QMultimedia::AvailabilityStatus")
event("QCamera", /::stateChanged\s*\(/, "QCamera::State")
event("QCamera", /::captureModeChanged\s*\(/, "QCamera::CaptureModes")
event("QCamera", /::statusChanged\s*\(/, "QCamera::Status")
event("QCamera", /::locked\s*\(/, "")
event("QCamera", /::lockFailed\s*\(/, "")
event("QCamera", /::lockStatusChanged\s*\(/, "QCamera::LockStatus, QCamera::LockChangeReason")
event("QCamera", /::lockStatusChanged\s*\(/, "QCamera::LockType, QCamera::LockStatus, QCamera::LockChangeReason")
event("QCamera", /::error\s*\(/, "QCamera::Error")
event("QCamera", /::errorOccurred\s*\(/, "QCamera::Error")
event("QCameraCaptureBufferFormatControl", /::destroyed\s*\(/, "QObject*")
event("QCameraCaptureBufferFormatControl", /::objectNameChanged\s*\(/, "QString")
event("QCameraCaptureBufferFormatControl", /::bufferFormatChanged\s*\(/, "QVideoFrame::PixelFormat")
event("QCameraCaptureDestinationControl", /::destroyed\s*\(/, "QObject*")
event("QCameraCaptureDestinationControl", /::objectNameChanged\s*\(/, "QString")
event("QCameraCaptureDestinationControl", /::captureDestinationChanged\s*\(/, "QCameraImageCapture::CaptureDestinations")
event("QCameraControl", /::destroyed\s*\(/, "QObject*")
event("QCameraControl", /::objectNameChanged\s*\(/, "QString")
event("QCameraControl", /::stateChanged\s*\(/, "QCamera::State")
event("QCameraControl", /::statusChanged\s*\(/, "QCamera::Status")
event("QCameraControl", /::error\s*\(/, "int, QString")
event("QCameraControl", /::captureModeChanged\s*\(/, "QCamera::CaptureModes")
event("QCameraExposure", /::destroyed\s*\(/, "QObject*")
event("QCameraExposure", /::objectNameChanged\s*\(/, "QString")
event("QCameraExposure", /::flashReady\s*\(/, "bool")
event("QCameraExposure", /::apertureChanged\s*\(/, "double")
event("QCameraExposure", /::apertureRangeChanged\s*\(/, "")
event("QCameraExposure", /::shutterSpeedChanged\s*\(/, "double")
event("QCameraExposure", /::shutterSpeedRangeChanged\s*\(/, "")
event("QCameraExposure", /::isoSensitivityChanged\s*\(/, "int")
event("QCameraExposure", /::exposureCompensationChanged\s*\(/, "double")
event("QCameraExposureControl", /::destroyed\s*\(/, "QObject*")
event("QCameraExposureControl", /::objectNameChanged\s*\(/, "QString")
event("QCameraExposureControl", /::requestedValueChanged\s*\(/, "int")
event("QCameraExposureControl", /::actualValueChanged\s*\(/, "int")
event("QCameraExposureControl", /::parameterRangeChanged\s*\(/, "int")
event("QCameraFeedbackControl", /::destroyed\s*\(/, "QObject*")
event("QCameraFeedbackControl", /::objectNameChanged\s*\(/, "QString")
event("QCameraFlashControl", /::destroyed\s*\(/, "QObject*")
event("QCameraFlashControl", /::objectNameChanged\s*\(/, "QString")
event("QCameraFlashControl", /::flashReady\s*\(/, "bool")
event("QCameraFocus", /::destroyed\s*\(/, "QObject*")
event("QCameraFocus", /::objectNameChanged\s*\(/, "QString")
event("QCameraFocus", /::opticalZoomChanged\s*\(/, "double")
event("QCameraFocus", /::digitalZoomChanged\s*\(/, "double")
event("QCameraFocus", /::focusZonesChanged\s*\(/, "")
event("QCameraFocus", /::maximumOpticalZoomChanged\s*\(/, "double")
event("QCameraFocus", /::maximumDigitalZoomChanged\s*\(/, "double")
event("QCameraFocusControl", /::destroyed\s*\(/, "QObject*")
event("QCameraFocusControl", /::objectNameChanged\s*\(/, "QString")
event("QCameraFocusControl", /::focusModeChanged\s*\(/, "QCameraFocus::FocusModes")
event("QCameraFocusControl", /::focusPointModeChanged\s*\(/, "QCameraFocus::FocusPointMode")
event("QCameraFocusControl", /::customFocusPointChanged\s*\(/, "QPointF")
event("QCameraFocusControl", /::focusZonesChanged\s*\(/, "")
event("QCameraImageCapture", /::destroyed\s*\(/, "QObject*")
event("QCameraImageCapture", /::objectNameChanged\s*\(/, "QString")
event("QCameraImageCapture", /::error\s*\(/, "int, QCameraImageCapture::Error, QString")
event("QCameraImageCapture", /::readyForCaptureChanged\s*\(/, "bool")
event("QCameraImageCapture", /::bufferFormatChanged\s*\(/, "QVideoFrame::PixelFormat")
event("QCameraImageCapture", /::captureDestinationChanged\s*\(/, "QCameraImageCapture::CaptureDestinations")
event("QCameraImageCapture", /::imageExposed\s*\(/, "int")
event("QCameraImageCapture", /::imageCaptured\s*\(/, "int, QImage")
event("QCameraImageCapture", /::imageMetadataAvailable\s*\(/, "int, QString, QVariant")
event("QCameraImageCapture", /::imageAvailable\s*\(/, "int, QVideoFrame")
event("QCameraImageCapture", /::imageSaved\s*\(/, "int, QString")
event("QCameraImageCaptureControl", /::destroyed\s*\(/, "QObject*")
event("QCameraImageCaptureControl", /::objectNameChanged\s*\(/, "QString")
event("QCameraImageCaptureControl", /::readyForCaptureChanged\s*\(/, "bool")
event("QCameraImageCaptureControl", /::imageExposed\s*\(/, "int")
event("QCameraImageCaptureControl", /::imageCaptured\s*\(/, "int, QImage")
event("QCameraImageCaptureControl", /::imageMetadataAvailable\s*\(/, "int, QString, QVariant")
event("QCameraImageCaptureControl", /::imageAvailable\s*\(/, "int, QVideoFrame")
event("QCameraImageCaptureControl", /::imageSaved\s*\(/, "int, QString")
event("QCameraImageCaptureControl", /::error\s*\(/, "int, int, QString")
event("QCameraImageProcessing", /::destroyed\s*\(/, "QObject*")
event("QCameraImageProcessing", /::objectNameChanged\s*\(/, "QString")
event("QCameraImageProcessingControl", /::destroyed\s*\(/, "QObject*")
event("QCameraImageProcessingControl", /::objectNameChanged\s*\(/, "QString")
event("QCameraInfoControl", /::destroyed\s*\(/, "QObject*")
event("QCameraInfoControl", /::objectNameChanged\s*\(/, "QString")
event("QCameraLocksControl", /::destroyed\s*\(/, "QObject*")
event("QCameraLocksControl", /::objectNameChanged\s*\(/, "QString")
event("QCameraLocksControl", /::lockStatusChanged\s*\(/, "QCamera::LockType, QCamera::LockStatus, QCamera::LockChangeReason")
event("QCameraViewfinderSettingsControl", /::destroyed\s*\(/, "QObject*")
event("QCameraViewfinderSettingsControl", /::objectNameChanged\s*\(/, "QString")
event("QCameraViewfinderSettingsControl2", /::destroyed\s*\(/, "QObject*")
event("QCameraViewfinderSettingsControl2", /::objectNameChanged\s*\(/, "QString")
event("QCameraZoomControl", /::destroyed\s*\(/, "QObject*")
event("QCameraZoomControl", /::objectNameChanged\s*\(/, "QString")
event("QCameraZoomControl", /::maximumOpticalZoomChanged\s*\(/, "double")
event("QCameraZoomControl", /::maximumDigitalZoomChanged\s*\(/, "double")
event("QCameraZoomControl", /::requestedOpticalZoomChanged\s*\(/, "double")
event("QCameraZoomControl", /::requestedDigitalZoomChanged\s*\(/, "double")
event("QCameraZoomControl", /::currentOpticalZoomChanged\s*\(/, "double")
event("QCameraZoomControl", /::currentDigitalZoomChanged\s*\(/, "double")
event("QCustomAudioRoleControl", /::destroyed\s*\(/, "QObject*")
event("QCustomAudioRoleControl", /::objectNameChanged\s*\(/, "QString")
event("QCustomAudioRoleControl", /::customAudioRoleChanged\s*\(/, "QString")
event("QGraphicsVideoItem", /::destroyed\s*\(/, "QObject*")
event("QGraphicsVideoItem", /::objectNameChanged\s*\(/, "QString")
event("QGraphicsVideoItem", /::parentChanged\s*\(/, "")
event("QGraphicsVideoItem", /::opacityChanged\s*\(/, "")
event("QGraphicsVideoItem", /::visibleChanged\s*\(/, "")
event("QGraphicsVideoItem", /::enabledChanged\s*\(/, "")
event("QGraphicsVideoItem", /::xChanged\s*\(/, "")
event("QGraphicsVideoItem", /::yChanged\s*\(/, "")
event("QGraphicsVideoItem", /::zChanged\s*\(/, "")
event("QGraphicsVideoItem", /::rotationChanged\s*\(/, "")
event("QGraphicsVideoItem", /::scaleChanged\s*\(/, "")
event("QGraphicsVideoItem", /::childrenChanged\s*\(/, "")
event("QGraphicsVideoItem", /::widthChanged\s*\(/, "")
event("QGraphicsVideoItem", /::heightChanged\s*\(/, "")
event("QGraphicsVideoItem", /::nativeSizeChanged\s*\(/, "QSizeF")
event("QImageEncoderControl", /::destroyed\s*\(/, "QObject*")
event("QImageEncoderControl", /::objectNameChanged\s*\(/, "QString")
event("QMediaAudioProbeControl", /::destroyed\s*\(/, "QObject*")
event("QMediaAudioProbeControl", /::objectNameChanged\s*\(/, "QString")
event("QMediaAudioProbeControl", /::audioBufferProbed\s*\(/, "QAudioBuffer")
event("QMediaAudioProbeControl", /::flush\s*\(/, "")
event("QMediaAvailabilityControl", /::destroyed\s*\(/, "QObject*")
event("QMediaAvailabilityControl", /::objectNameChanged\s*\(/, "QString")
event("QMediaAvailabilityControl", /::availabilityChanged\s*\(/, "QMultimedia::AvailabilityStatus")
event("QMediaContainerControl", /::destroyed\s*\(/, "QObject*")
event("QMediaContainerControl", /::objectNameChanged\s*\(/, "QString")
event("QMediaControl", /::destroyed\s*\(/, "QObject*")
event("QMediaControl", /::objectNameChanged\s*\(/, "QString")
event("QMediaGaplessPlaybackControl", /::destroyed\s*\(/, "QObject*")
event("QMediaGaplessPlaybackControl", /::objectNameChanged\s*\(/, "QString")
event("QMediaGaplessPlaybackControl", /::crossfadeTimeChanged\s*\(/, "double")
event("QMediaGaplessPlaybackControl", /::nextMediaChanged\s*\(/, "QMediaContent")
event("QMediaGaplessPlaybackControl", /::advancedToNextMedia\s*\(/, "")
event("QMediaNetworkAccessControl", /::destroyed\s*\(/, "QObject*")
event("QMediaNetworkAccessControl", /::objectNameChanged\s*\(/, "QString")
event("QMediaNetworkAccessControl", /::configurationChanged\s*\(/, "QNetworkConfiguration")
event("QMediaObject", /::destroyed\s*\(/, "QObject*")
event("QMediaObject", /::objectNameChanged\s*\(/, "QString")
event("QMediaObject", /::notifyIntervalChanged\s*\(/, "int")
event("QMediaObject", /::metaDataAvailableChanged\s*\(/, "bool")
event("QMediaObject", /::metaDataChanged\s*\(/, "QString, QVariant")
event("QMediaObject", /::availabilityChanged\s*\(/, "bool")
event("QMediaObject", /::availabilityChanged\s*\(/, "QMultimedia::AvailabilityStatus")
event("QMediaPlayer", /::destroyed\s*\(/, "QObject*")
event("QMediaPlayer", /::objectNameChanged\s*\(/, "QString")
event("QMediaPlayer", /::notifyIntervalChanged\s*\(/, "int")
event("QMediaPlayer", /::metaDataAvailableChanged\s*\(/, "bool")
event("QMediaPlayer", /::metaDataChanged\s*\(/, "QString, QVariant")
event("QMediaPlayer", /::availabilityChanged\s*\(/, "bool")
event("QMediaPlayer", /::availabilityChanged\s*\(/, "QMultimedia::AvailabilityStatus")
event("QMediaPlayer", /::mediaChanged\s*\(/, "QMediaContent")
event("QMediaPlayer", /::currentMediaChanged\s*\(/, "QMediaContent")
event("QMediaPlayer", /::stateChanged\s*\(/, "QMediaPlayer::State")
event("QMediaPlayer", /::mediaStatusChanged\s*\(/, "QMediaPlayer::MediaStatus")
event("QMediaPlayer", /::durationChanged\s*\(/, "qlonglong")
event("QMediaPlayer", /::positionChanged\s*\(/, "qlonglong")
event("QMediaPlayer", /::volumeChanged\s*\(/, "int")
event("QMediaPlayer", /::mutedChanged\s*\(/, "bool")
event("QMediaPlayer", /::audioAvailableChanged\s*\(/, "bool")
event("QMediaPlayer", /::videoAvailableChanged\s*\(/, "bool")
event("QMediaPlayer", /::bufferStatusChanged\s*\(/, "int")
event("QMediaPlayer", /::seekableChanged\s*\(/, "bool")
event("QMediaPlayer", /::playbackRateChanged\s*\(/, "double")
event("QMediaPlayer", /::audioRoleChanged\s*\(/, "QAudio::Role")
event("QMediaPlayer", /::customAudioRoleChanged\s*\(/, "QString")
event("QMediaPlayer", /::error\s*\(/, "QMediaPlayer::Error")
event("QMediaPlayer", /::networkConfigurationChanged\s*\(/, "QNetworkConfiguration")
event("QMediaPlayerControl", /::destroyed\s*\(/, "QObject*")
event("QMediaPlayerControl", /::objectNameChanged\s*\(/, "QString")
event("QMediaPlayerControl", /::mediaChanged\s*\(/, "QMediaContent")
event("QMediaPlayerControl", /::durationChanged\s*\(/, "qlonglong")
event("QMediaPlayerControl", /::positionChanged\s*\(/, "qlonglong")
event("QMediaPlayerControl", /::stateChanged\s*\(/, "QMediaPlayer::State")
event("QMediaPlayerControl", /::mediaStatusChanged\s*\(/, "QMediaPlayer::MediaStatus")
event("QMediaPlayerControl", /::volumeChanged\s*\(/, "int")
event("QMediaPlayerControl", /::mutedChanged\s*\(/, "bool")
event("QMediaPlayerControl", /::audioAvailableChanged\s*\(/, "bool")
event("QMediaPlayerControl", /::videoAvailableChanged\s*\(/, "bool")
event("QMediaPlayerControl", /::bufferStatusChanged\s*\(/, "int")
event("QMediaPlayerControl", /::seekableChanged\s*\(/, "bool")
event("QMediaPlayerControl", /::availablePlaybackRangesChanged\s*\(/, "QMediaTimeRange")
event("QMediaPlayerControl", /::playbackRateChanged\s*\(/, "double")
event("QMediaPlayerControl", /::error\s*\(/, "int, QString")
event("QMediaPlaylist", /::destroyed\s*\(/, "QObject*")
event("QMediaPlaylist", /::objectNameChanged\s*\(/, "QString")
event("QMediaPlaylist", /::currentIndexChanged\s*\(/, "int")
event("QMediaPlaylist", /::playbackModeChanged\s*\(/, "QMediaPlaylist::PlaybackMode")
event("QMediaPlaylist", /::currentMediaChanged\s*\(/, "QMediaContent")
event("QMediaPlaylist", /::mediaAboutToBeInserted\s*\(/, "int, int")
event("QMediaPlaylist", /::mediaInserted\s*\(/, "int, int")
event("QMediaPlaylist", /::mediaAboutToBeRemoved\s*\(/, "int, int")
event("QMediaPlaylist", /::mediaRemoved\s*\(/, "int, int")
event("QMediaPlaylist", /::mediaChanged\s*\(/, "int, int")
event("QMediaPlaylist", /::loaded\s*\(/, "")
event("QMediaPlaylist", /::loadFailed\s*\(/, "")
event("QMediaRecorder", /::destroyed\s*\(/, "QObject*")
event("QMediaRecorder", /::objectNameChanged\s*\(/, "QString")
event("QMediaRecorder", /::stateChanged\s*\(/, "QMediaRecorder::State")
event("QMediaRecorder", /::statusChanged\s*\(/, "QMediaRecorder::Status")
event("QMediaRecorder", /::durationChanged\s*\(/, "qlonglong")
event("QMediaRecorder", /::mutedChanged\s*\(/, "bool")
event("QMediaRecorder", /::volumeChanged\s*\(/, "double")
event("QMediaRecorder", /::actualLocationChanged\s*\(/, "QUrl")
event("QMediaRecorder", /::error\s*\(/, "QMediaRecorder::Error")
event("QMediaRecorder", /::metaDataAvailableChanged\s*\(/, "bool")
event("QMediaRecorder", /::metaDataWritableChanged\s*\(/, "bool")
event("QMediaRecorder", /::metaDataChanged\s*\(/, "QString, QVariant")
event("QMediaRecorder", /::availabilityChanged\s*\(/, "bool")
event("QMediaRecorder", /::availabilityChanged\s*\(/, "QMultimedia::AvailabilityStatus")
event("QMediaRecorderControl", /::destroyed\s*\(/, "QObject*")
event("QMediaRecorderControl", /::objectNameChanged\s*\(/, "QString")
event("QMediaRecorderControl", /::stateChanged\s*\(/, "QMediaRecorder::State")
event("QMediaRecorderControl", /::statusChanged\s*\(/, "QMediaRecorder::Status")
event("QMediaRecorderControl", /::durationChanged\s*\(/, "qlonglong")
event("QMediaRecorderControl", /::mutedChanged\s*\(/, "bool")
event("QMediaRecorderControl", /::volumeChanged\s*\(/, "double")
event("QMediaRecorderControl", /::actualLocationChanged\s*\(/, "QUrl")
event("QMediaRecorderControl", /::error\s*\(/, "int, QString")
event("QMediaService", /::destroyed\s*\(/, "QObject*")
event("QMediaService", /::objectNameChanged\s*\(/, "QString")
event("QMediaServiceProviderPlugin", /::destroyed\s*\(/, "QObject*")
event("QMediaServiceProviderPlugin", /::objectNameChanged\s*\(/, "QString")
event("QMediaStreamsControl", /::destroyed\s*\(/, "QObject*")
event("QMediaStreamsControl", /::objectNameChanged\s*\(/, "QString")
event("QMediaStreamsControl", /::streamsChanged\s*\(/, "")
event("QMediaStreamsControl", /::activeStreamsChanged\s*\(/, "")
event("QMediaVideoProbeControl", /::destroyed\s*\(/, "QObject*")
event("QMediaVideoProbeControl", /::objectNameChanged\s*\(/, "QString")
event("QMediaVideoProbeControl", /::videoFrameProbed\s*\(/, "QVideoFrame")
event("QMediaVideoProbeControl", /::flush\s*\(/, "")
event("QMetaDataReaderControl", /::destroyed\s*\(/, "QObject*")
event("QMetaDataReaderControl", /::objectNameChanged\s*\(/, "QString")
event("QMetaDataReaderControl", /::metaDataChanged\s*\(/, "QString, QVariant")
event("QMetaDataReaderControl", /::metaDataAvailableChanged\s*\(/, "bool")
event("QMetaDataWriterControl", /::destroyed\s*\(/, "QObject*")
event("QMetaDataWriterControl", /::objectNameChanged\s*\(/, "QString")
event("QMetaDataWriterControl", /::metaDataChanged\s*\(/, "QString, QVariant")
event("QMetaDataWriterControl", /::writableChanged\s*\(/, "bool")
event("QMetaDataWriterControl", /::metaDataAvailableChanged\s*\(/, "bool")
event("QRadioData", /::destroyed\s*\(/, "QObject*")
event("QRadioData", /::objectNameChanged\s*\(/, "QString")
event("QRadioData", /::stationIdChanged\s*\(/, "QString")
event("QRadioData", /::programTypeChanged\s*\(/, "QRadioData::ProgramType")
event("QRadioData", /::programTypeNameChanged\s*\(/, "QString")
event("QRadioData", /::stationNameChanged\s*\(/, "QString")
event("QRadioData", /::radioTextChanged\s*\(/, "QString")
event("QRadioData", /::alternativeFrequenciesEnabledChanged\s*\(/, "bool")
event("QRadioData", /::error\s*\(/, "QRadioData::Error")
event("QRadioDataControl", /::destroyed\s*\(/, "QObject*")
event("QRadioDataControl", /::objectNameChanged\s*\(/, "QString")
event("QRadioDataControl", /::stationIdChanged\s*\(/, "QString")
event("QRadioDataControl", /::programTypeChanged\s*\(/, "QRadioData::ProgramType")
event("QRadioDataControl", /::programTypeNameChanged\s*\(/, "QString")
event("QRadioDataControl", /::stationNameChanged\s*\(/, "QString")
event("QRadioDataControl", /::radioTextChanged\s*\(/, "QString")
event("QRadioDataControl", /::alternativeFrequenciesEnabledChanged\s*\(/, "bool")
event("QRadioDataControl", /::error\s*\(/, "QRadioData::Error")
event("QRadioTuner", /::destroyed\s*\(/, "QObject*")
event("QRadioTuner", /::objectNameChanged\s*\(/, "QString")
event("QRadioTuner", /::notifyIntervalChanged\s*\(/, "int")
event("QRadioTuner", /::metaDataAvailableChanged\s*\(/, "bool")
event("QRadioTuner", /::metaDataChanged\s*\(/, "QString, QVariant")
event("QRadioTuner", /::availabilityChanged\s*\(/, "bool")
event("QRadioTuner", /::availabilityChanged\s*\(/, "QMultimedia::AvailabilityStatus")
event("QRadioTuner", /::stateChanged\s*\(/, "QRadioTuner::State")
event("QRadioTuner", /::bandChanged\s*\(/, "QRadioTuner::Band")
event("QRadioTuner", /::frequencyChanged\s*\(/, "int")
event("QRadioTuner", /::stereoStatusChanged\s*\(/, "bool")
event("QRadioTuner", /::searchingChanged\s*\(/, "bool")
event("QRadioTuner", /::signalStrengthChanged\s*\(/, "int")
event("QRadioTuner", /::volumeChanged\s*\(/, "int")
event("QRadioTuner", /::mutedChanged\s*\(/, "bool")
event("QRadioTuner", /::stationFound\s*\(/, "int, QString")
event("QRadioTuner", /::antennaConnectedChanged\s*\(/, "bool")
event("QRadioTuner", /::error\s*\(/, "QRadioTuner::Error")
event("QRadioTunerControl", /::destroyed\s*\(/, "QObject*")
event("QRadioTunerControl", /::objectNameChanged\s*\(/, "QString")
event("QRadioTunerControl", /::stateChanged\s*\(/, "QRadioTuner::State")
event("QRadioTunerControl", /::bandChanged\s*\(/, "QRadioTuner::Band")
event("QRadioTunerControl", /::frequencyChanged\s*\(/, "int")
event("QRadioTunerControl", /::stereoStatusChanged\s*\(/, "bool")
event("QRadioTunerControl", /::searchingChanged\s*\(/, "bool")
event("QRadioTunerControl", /::signalStrengthChanged\s*\(/, "int")
event("QRadioTunerControl", /::volumeChanged\s*\(/, "int")
event("QRadioTunerControl", /::mutedChanged\s*\(/, "bool")
event("QRadioTunerControl", /::error\s*\(/, "QRadioTuner::Error")
event("QRadioTunerControl", /::stationFound\s*\(/, "int, QString")
event("QRadioTunerControl", /::antennaConnectedChanged\s*\(/, "bool")
event("QSound", /::destroyed\s*\(/, "QObject*")
event("QSound", /::objectNameChanged\s*\(/, "QString")
event("QSoundEffect", /::destroyed\s*\(/, "QObject*")
event("QSoundEffect", /::objectNameChanged\s*\(/, "QString")
event("QSoundEffect", /::sourceChanged\s*\(/, "")
event("QSoundEffect", /::loopCountChanged\s*\(/, "")
event("QSoundEffect", /::loopsRemainingChanged\s*\(/, "")
event("QSoundEffect", /::volumeChanged\s*\(/, "")
event("QSoundEffect", /::mutedChanged\s*\(/, "")
event("QSoundEffect", /::loadedChanged\s*\(/, "")
event("QSoundEffect", /::playingChanged\s*\(/, "")
event("QSoundEffect", /::statusChanged\s*\(/, "")
event("QSoundEffect", /::categoryChanged\s*\(/, "")
event("QVideoDeviceSelectorControl", /::destroyed\s*\(/, "QObject*")
event("QVideoDeviceSelectorControl", /::objectNameChanged\s*\(/, "QString")
event("QVideoDeviceSelectorControl", /::selectedDeviceChanged\s*\(/, "int")
event("QVideoDeviceSelectorControl", /::selectedDeviceChanged\s*\(/, "QString")
event("QVideoDeviceSelectorControl", /::devicesChanged\s*\(/, "")
event("QVideoEncoderSettingsControl", /::destroyed\s*\(/, "QObject*")
event("QVideoEncoderSettingsControl", /::objectNameChanged\s*\(/, "QString")
event("QVideoProbe", /::destroyed\s*\(/, "QObject*")
event("QVideoProbe", /::objectNameChanged\s*\(/, "QString")
event("QVideoProbe", /::videoFrameProbed\s*\(/, "QVideoFrame")
event("QVideoProbe", /::flush\s*\(/, "")
event("QVideoRendererControl", /::destroyed\s*\(/, "QObject*")
event("QVideoRendererControl", /::objectNameChanged\s*\(/, "QString")
event("QVideoWidget", /::destroyed\s*\(/, "QObject*")
event("QVideoWidget", /::objectNameChanged\s*\(/, "QString")
event("QVideoWidget", /::windowTitleChanged\s*\(/, "QString")
event("QVideoWidget", /::windowIconChanged\s*\(/, "QIcon")
event("QVideoWidget", /::windowIconTextChanged\s*\(/, "QString")
event("QVideoWidget", /::customContextMenuRequested\s*\(/, "QPoint")
event("QVideoWidget", /::fullScreenChanged\s*\(/, "bool")
event("QVideoWidget", /::brightnessChanged\s*\(/, "int")
event("QVideoWidget", /::contrastChanged\s*\(/, "int")
event("QVideoWidget", /::hueChanged\s*\(/, "int")
event("QVideoWidget", /::saturationChanged\s*\(/, "int")
event("QVideoWindowControl", /::destroyed\s*\(/, "QObject*")
event("QVideoWindowControl", /::objectNameChanged\s*\(/, "QString")
event("QVideoWindowControl", /::fullScreenChanged\s*\(/, "bool")
event("QVideoWindowControl", /::brightnessChanged\s*\(/, "int")
event("QVideoWindowControl", /::contrastChanged\s*\(/, "int")
event("QVideoWindowControl", /::hueChanged\s*\(/, "int")
event("QVideoWindowControl", /::saturationChanged\s*\(/, "int")
event("QVideoWindowControl", /::nativeSizeChanged\s*\(/, "")
event("QUiLoader", /::destroyed\s*\(/, "QObject*")
event("QUiLoader", /::objectNameChanged\s*\(/, "QString")
event("QSqlDriver", /::destroyed\s*\(/, "QObject*")
event("QSqlDriver", /::objectNameChanged\s*\(/, "QString")
event("QSqlDriver", /::notification\s*\(/, "QString, QSqlDriver::NotificationSource, QVariant")
@ -1795,6 +2314,7 @@ event("QAbstractSocket", /::connected\s*\(/, "")
event("QAbstractSocket", /::disconnected\s*\(/, "")
event("QAbstractSocket", /::stateChanged\s*\(/, "QAbstractSocket::SocketState")
event("QAbstractSocket", /::error\s*\(/, "QAbstractSocket::SocketError")
event("QAbstractSocket", /::errorOccurred\s*\(/, "QAbstractSocket::SocketError")
event("QAbstractSocket", /::proxyAuthenticationRequired\s*\(/, "QNetworkProxy, QAuthenticator*")
event("QDnsLookup", /::destroyed\s*\(/, "QObject*")
event("QDnsLookup", /::objectNameChanged\s*\(/, "QString")
@ -1802,6 +2322,12 @@ event("QDnsLookup", /::finished\s*\(/, "")
event("QDnsLookup", /::nameChanged\s*\(/, "QString")
event("QDnsLookup", /::typeChanged\s*\(/, "Type")
event("QDnsLookup", /::nameserverChanged\s*\(/, "QHostAddress")
event("QDtls", /::destroyed\s*\(/, "QObject*")
event("QDtls", /::objectNameChanged\s*\(/, "QString")
event("QDtls", /::pskRequired\s*\(/, "QSslPreSharedKeyAuthenticator*")
event("QDtls", /::handshakeTimeout\s*\(/, "")
event("QDtlsClientVerifier", /::destroyed\s*\(/, "QObject*")
event("QDtlsClientVerifier", /::objectNameChanged\s*\(/, "QString")
event("QHttpMultiPart", /::destroyed\s*\(/, "QObject*")
event("QHttpMultiPart", /::objectNameChanged\s*\(/, "QString")
event("QLocalServer", /::destroyed\s*\(/, "QObject*")
@ -1818,6 +2344,7 @@ event("QLocalSocket", /::readChannelFinished\s*\(/, "")
event("QLocalSocket", /::connected\s*\(/, "")
event("QLocalSocket", /::disconnected\s*\(/, "")
event("QLocalSocket", /::error\s*\(/, "QLocalSocket::LocalSocketError")
event("QLocalSocket", /::errorOccurred\s*\(/, "QLocalSocket::LocalSocketError")
event("QLocalSocket", /::stateChanged\s*\(/, "QLocalSocket::LocalSocketState")
event("QNetworkAccessManager", /::destroyed\s*\(/, "QObject*")
event("QNetworkAccessManager", /::objectNameChanged\s*\(/, "QString")
@ -1851,6 +2378,7 @@ event("QNetworkReply", /::readChannelFinished\s*\(/, "")
event("QNetworkReply", /::metaDataChanged\s*\(/, "")
event("QNetworkReply", /::finished\s*\(/, "")
event("QNetworkReply", /::error\s*\(/, "QNetworkReply::NetworkError")
event("QNetworkReply", /::errorOccurred\s*\(/, "QNetworkReply::NetworkError")
event("QNetworkReply", /::encrypted\s*\(/, "")
event("QNetworkReply", /::sslErrors\s*\(/, "QList<QSslError>")
event("QNetworkReply", /::preSharedKeyAuthenticationRequired\s*\(/, "QSslPreSharedKeyAuthenticator*")
@ -1880,6 +2408,7 @@ event("QSslSocket", /::connected\s*\(/, "")
event("QSslSocket", /::disconnected\s*\(/, "")
event("QSslSocket", /::stateChanged\s*\(/, "QAbstractSocket::SocketState")
event("QSslSocket", /::error\s*\(/, "QAbstractSocket::SocketError")
event("QSslSocket", /::errorOccurred\s*\(/, "QAbstractSocket::SocketError")
event("QSslSocket", /::proxyAuthenticationRequired\s*\(/, "QNetworkProxy, QAuthenticator*")
event("QSslSocket", /::encrypted\s*\(/, "")
event("QSslSocket", /::peerVerifyError\s*\(/, "QSslError")
@ -1887,6 +2416,7 @@ event("QSslSocket", /::sslErrors\s*\(/, "QList<QSslError>")
event("QSslSocket", /::modeChanged\s*\(/, "QSslSocket::SslMode")
event("QSslSocket", /::encryptedBytesWritten\s*\(/, "qlonglong")
event("QSslSocket", /::preSharedKeyAuthenticationRequired\s*\(/, "QSslPreSharedKeyAuthenticator*")
event("QSslSocket", /::newSessionTicketReceived\s*\(/, "")
event("QTcpServer", /::destroyed\s*\(/, "QObject*")
event("QTcpServer", /::objectNameChanged\s*\(/, "QString")
event("QTcpServer", /::newConnection\s*\(/, "")
@ -1904,6 +2434,7 @@ event("QTcpSocket", /::connected\s*\(/, "")
event("QTcpSocket", /::disconnected\s*\(/, "")
event("QTcpSocket", /::stateChanged\s*\(/, "QAbstractSocket::SocketState")
event("QTcpSocket", /::error\s*\(/, "QAbstractSocket::SocketError")
event("QTcpSocket", /::errorOccurred\s*\(/, "QAbstractSocket::SocketError")
event("QTcpSocket", /::proxyAuthenticationRequired\s*\(/, "QNetworkProxy, QAuthenticator*")
event("QUdpSocket", /::destroyed\s*\(/, "QObject*")
event("QUdpSocket", /::objectNameChanged\s*\(/, "QString")
@ -1918,4 +2449,5 @@ event("QUdpSocket", /::connected\s*\(/, "")
event("QUdpSocket", /::disconnected\s*\(/, "")
event("QUdpSocket", /::stateChanged\s*\(/, "QAbstractSocket::SocketState")
event("QUdpSocket", /::error\s*\(/, "QAbstractSocket::SocketError")
event("QUdpSocket", /::errorOccurred\s*\(/, "QAbstractSocket::SocketError")
event("QUdpSocket", /::proxyAuthenticationRequired\s*\(/, "QNetworkProxy, QAuthenticator*")

File diff suppressed because it is too large Load Diff

View File

@ -34,8 +34,8 @@ drop_method :all_classes, /\(.*&&.*\)/ # no move semantics
drop_method :all_classes, /.*\s+&&$/ # no move semantics
drop_method :all_classes, /\(.*std::nullptr_t.*\)/ # no nullptr arguments
drop_method :all_classes, /\(.*std::experimental.*\)/ # no experimental stuff
drop_method :all_classes, /\(.*std::chrono.*\)/ # no chrono
drop_method :all_classes, /^std::chrono::/ # no chrono as return value
drop_method :all_classes, /\(.*std::chrono.*\)/ # no std::chrono
drop_method :all_classes, /^std::chrono::/ # no std::chrono as return value
drop_method :all_classes, /\(.*std::filesystem.*\)/ # no filesystem
drop_method :all_classes, /^std::filesystem::/ # no filesystem as return value
drop_method :all_classes, /\(.*std::initializer_list.*\)/ # no brace initialization
@ -43,10 +43,13 @@ drop_method :all_classes, /\(.*std::function.*\)/ # std::function not bindable
drop_method :all_classes, /^std::function</ # std::function not bindable as return value
drop_method :all_classes, /::bindable/ # no QBindable available
drop_method :all_classes, /.*QtPrivate::.*/ # no private stuff
drop_method :all_classes, /\(.*QStringView\W/ # no QStringView
drop_method :all_classes, /^QStringView\W/ # no QStringView
drop_method :all_classes, /\(.*QLatin1String\W/ # clashes usually with const char *
rename :all_classes, /::create\(/, "qt_create" # clashes with GSI/Ruby
rename :all_classes, /::destroy\(/, "qt_destroy" # clashes with GSI/Ruby
rename :all_classes, /::raise\(/, "qt_raise" # clashes with Ruby "raise" keyword
def_alias :all_classes, /::create\(/, "qt_create" # clashes with GSI/Ruby
def_alias :all_classes, /::destroy\(/, "qt_destroy" # clashes with GSI/Ruby
def_alias :all_classes, /::raise\(/, "qt_raise" # clashes with Ruby "raise" keyword
# --------------------------------------------------------------
# Qt
@ -321,7 +324,7 @@ drop_enum_const "QEvent", /CocoaRequestModal/ # not available on WIN
drop_method "QMetaType", /QMetaType::staticMetaObject/ # not available
drop_method "QMetaType", /QMetaType::register.*Function\(/ # std::function not available
drop_method "QDeadlineTimer", /QDeadlineTimer::_q_data/ # internal (@@@ TODO: QDealineTimer is present twice?)
drop_method "QDeadlineTimer", /QDeadlineTimer::_q_data/ # internal and QPair is not bound
drop_method "QObject", /QObject::bindingStorage/ # no QBindingStorage
drop_method "QPluginLoader", /QPluginLoader::staticPlugins/ # no QStaticPlugin
drop_method "QKeyCombination", /QKeyCombination::operator<\(/ # deleted
@ -867,7 +870,8 @@ drop_method "QGuiApplication", /QGuiApplication::platformFunction/ # (TODO) no
drop_method "QPagedPaintDevice", /QPagedPaintDevice::dd/ # QPagedPaintDevicePrivate not available
drop_method "QPixmap", /QPixmap::QPixmap\(QPlatformPixmap/ # QPlatformPixmap not available
drop_method "QAbstractPageSetupDialog", /QAbstractPageSetupDialog::QAbstractPageSetupDialog\(QAbstractPageSetupDialogPrivate/
drop_method "QImage", /QImage::QImage\(.*cleanupFunction/ # (TODO) no function pointers available
drop_method "QImage", /QImage::QImage\(.*cleanupFunction/ # (TODO) no function pointers available -> substitute by variant in add_native_impl_QImage
add_native_impl_QImage()
drop_method "QClipboardEvent", /QClipboardEvent::data/
drop_method "QClipboardEvent", /QClipboardEvent::QClipboardEvent\(QEventPrivate/
drop_method "QCursor", /QCursor::QCursor\s*\(\s*Qt::HANDLE/ # not available on WIN
@ -1037,7 +1041,6 @@ drop_method "QColor", /QColor::QColor\(const\s+QString/ # clashes with const cha
drop_method "QColor", /QColor::allowX11ColorNames/ # not available in WIN
drop_method "QColor", /QColor::setAllowX11ColorNames/ # not available in WIN
drop_method "Qimage", /Qimage::text\(const\s+QString/ # clashes with const char * version
drop_method "QOpenGLExtraFunctions", /QOpenGLExtraFunctions::glDebugMessageCallback\(/ # needs function *
drop_method "QWindow", /::vulkanInstance\(/ # no Vulkan support currently
drop_method "QWindow", /::setVulkanInstance\(/ # no Vulkan support currently
drop_method "QTransform", /::asAffineMatrix\(/ # auto return value not supported
@ -1050,11 +1053,30 @@ rename "QDialogButtonBox", /QDialogButtonBox::QDialogButtonBox\(QFlags/, "new_bu
rename "QIcon", /QIcon::pixmap\(int\s+extent/, "pixmap_ext"
rename "QKeySequence", /QKeySequence::QKeySequence\(QKeySequence::StandardKey/, "new_std"
# TODO: basically, the layout object only takes ownership over the objects when
# it has a QWidget parent itself. This is not reflected in the following simple scheme
keep_arg "QBoxLayout", /::addLayout/, 0 # will take ownership of layout
keep_arg "QBoxLayout", /::addSpacerItem/, 0 # will take ownership of item
keep_arg "QBoxLayout", /::addWidget/, 0 # will take ownership of item
keep_arg "QBoxLayout", /::insertItem/, 1 # will take ownership of item
keep_arg "QBoxLayout", /::insertLayout/, 1 # will take ownership of item
keep_arg "QBoxLayout", /::insertSpacerItem/, 1 # will take ownership of item
keep_arg "QBoxLayout", /::insertWidget/, 1 # will take ownership of item
keep_arg "QFormLayout", /::addRow/, 1 # will take ownership of item
keep_arg "QFormLayout", /::addRow\(QWidget\s*\*/, 0 # will take ownership of item
keep_arg "QFormLayout", /::insertRow/, 2 # will take ownership of item
keep_arg "QFormLayout", /::insertRow\(QWidget\s*\*/, 1 # will take ownership of item
keep_arg "QFormLayout", /::setWidget/, 2 # will take ownership of item
keep_arg "QGridLayout", /::addLayout/, 0 # will take ownership of layout
keep_arg "QWidget", /::setLayout\s*\(/, 0 # will take ownership of layout
keep_arg "QGridLayout", /::addItem/, 0 # will take ownership of layout
keep_arg "QGridLayout", /::addWidget/, 0 # will take ownership of layout
keep_arg "QLayout", /::addChildLayout/, 0 # will take ownership of layout
keep_arg "QLayout", /::addItem/, 0 # will take ownership of item
keep_arg "QLayout", /::addWidget/, 0 # will take ownership of item
keep_arg "QStackedLayout", /::addWidget/, 0 # will take ownership of item
keep_arg "QStackedLayout", /::insertWidget/, 1 # will take ownership of item
keep_arg "QWidget", /::setLayout\s*\(/, 0 # will take ownership of layout
keep_arg "QTreeWidgetItem", /::addChild\(/, 0 # will take ownership of the child
keep_arg "QTreeWidgetItem", /::addChildren\(/, 0 # will take ownership of the children
keep_arg "QTreeWidgetItem", /::insertChild\(/, 1 # will take ownership of the child
@ -1083,6 +1105,7 @@ return_new "QLayout", /::takeAt/ # returns a free object
return_new "QBoxLayout", /::takeAt/ # returns a free object
return_new "QFormLayout", /::takeAt/ # returns a free object
return_new "QGridLayout", /::takeAt/ # returns a free object
# TODO: QFormLayout: takeRow -> needs QFormLayout::TakeRowResult
return_new "QStackedLayout", /::takeAt/ # returns a free object
return_new "QStandardItem", /::take/ # returns a free object
return_new "QStandardItemModel", /::take/ # returns a free object

View File

@ -10,7 +10,7 @@ event("QAbstractEventDispatcher", /::aboutToBlock\s*\(/, "")
event("QAbstractEventDispatcher", /::awake\s*\(/, "")
event("QAbstractItemModel", /::destroyed\s*\(/, "QObject*")
event("QAbstractItemModel", /::objectNameChanged\s*\(/, "QString")
event("QAbstractItemModel", /::dataChanged\s*\(/, "QModelIndex, QModelIndex, QVector<int>")
event("QAbstractItemModel", /::dataChanged\s*\(/, "QModelIndex, QModelIndex, QList<int>")
event("QAbstractItemModel", /::headerDataChanged\s*\(/, "Qt::Orientation, int, int")
event("QAbstractItemModel", /::layoutChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
event("QAbstractItemModel", /::layoutAboutToBeChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
@ -30,7 +30,7 @@ event("QAbstractItemModel", /::columnsAboutToBeMoved\s*\(/, "QModelIndex, int, i
event("QAbstractItemModel", /::columnsMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QAbstractListModel", /::destroyed\s*\(/, "QObject*")
event("QAbstractListModel", /::objectNameChanged\s*\(/, "QString")
event("QAbstractListModel", /::dataChanged\s*\(/, "QModelIndex, QModelIndex, QVector<int>")
event("QAbstractListModel", /::dataChanged\s*\(/, "QModelIndex, QModelIndex, QList<int>")
event("QAbstractListModel", /::headerDataChanged\s*\(/, "Qt::Orientation, int, int")
event("QAbstractListModel", /::layoutChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
event("QAbstractListModel", /::layoutAboutToBeChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
@ -50,7 +50,7 @@ event("QAbstractListModel", /::columnsAboutToBeMoved\s*\(/, "QModelIndex, int, i
event("QAbstractListModel", /::columnsMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QAbstractProxyModel", /::destroyed\s*\(/, "QObject*")
event("QAbstractProxyModel", /::objectNameChanged\s*\(/, "QString")
event("QAbstractProxyModel", /::dataChanged\s*\(/, "QModelIndex, QModelIndex, QVector<int>")
event("QAbstractProxyModel", /::dataChanged\s*\(/, "QModelIndex, QModelIndex, QList<int>")
event("QAbstractProxyModel", /::headerDataChanged\s*\(/, "Qt::Orientation, int, int")
event("QAbstractProxyModel", /::layoutChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
event("QAbstractProxyModel", /::layoutAboutToBeChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
@ -69,14 +69,9 @@ event("QAbstractProxyModel", /::rowsMoved\s*\(/, "QModelIndex, int, int, QModelI
event("QAbstractProxyModel", /::columnsAboutToBeMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QAbstractProxyModel", /::columnsMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QAbstractProxyModel", /::sourceModelChanged\s*\(/, "")
event("QAbstractState", /::destroyed\s*\(/, "QObject*")
event("QAbstractState", /::objectNameChanged\s*\(/, "QString")
event("QAbstractState", /::entered\s*\(/, "")
event("QAbstractState", /::exited\s*\(/, "")
event("QAbstractState", /::activeChanged\s*\(/, "bool")
event("QAbstractTableModel", /::destroyed\s*\(/, "QObject*")
event("QAbstractTableModel", /::objectNameChanged\s*\(/, "QString")
event("QAbstractTableModel", /::dataChanged\s*\(/, "QModelIndex, QModelIndex, QVector<int>")
event("QAbstractTableModel", /::dataChanged\s*\(/, "QModelIndex, QModelIndex, QList<int>")
event("QAbstractTableModel", /::headerDataChanged\s*\(/, "Qt::Orientation, int, int")
event("QAbstractTableModel", /::layoutChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
event("QAbstractTableModel", /::layoutAboutToBeChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
@ -94,11 +89,6 @@ event("QAbstractTableModel", /::rowsAboutToBeMoved\s*\(/, "QModelIndex, int, int
event("QAbstractTableModel", /::rowsMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QAbstractTableModel", /::columnsAboutToBeMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QAbstractTableModel", /::columnsMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QAbstractTransition", /::destroyed\s*\(/, "QObject*")
event("QAbstractTransition", /::objectNameChanged\s*\(/, "QString")
event("QAbstractTransition", /::triggered\s*\(/, "")
event("QAbstractTransition", /::targetStateChanged\s*\(/, "")
event("QAbstractTransition", /::targetStatesChanged\s*\(/, "")
event("QAnimationDriver", /::destroyed\s*\(/, "QObject*")
event("QAnimationDriver", /::objectNameChanged\s*\(/, "QString")
event("QAnimationDriver", /::started\s*\(/, "")
@ -117,6 +107,26 @@ event("QBuffer", /::bytesWritten\s*\(/, "qlonglong")
event("QBuffer", /::channelBytesWritten\s*\(/, "int, qlonglong")
event("QBuffer", /::aboutToClose\s*\(/, "")
event("QBuffer", /::readChannelFinished\s*\(/, "")
event("QConcatenateTablesProxyModel", /::destroyed\s*\(/, "QObject*")
event("QConcatenateTablesProxyModel", /::objectNameChanged\s*\(/, "QString")
event("QConcatenateTablesProxyModel", /::dataChanged\s*\(/, "QModelIndex, QModelIndex, QList<int>")
event("QConcatenateTablesProxyModel", /::headerDataChanged\s*\(/, "Qt::Orientation, int, int")
event("QConcatenateTablesProxyModel", /::layoutChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
event("QConcatenateTablesProxyModel", /::layoutAboutToBeChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
event("QConcatenateTablesProxyModel", /::rowsAboutToBeInserted\s*\(/, "QModelIndex, int, int")
event("QConcatenateTablesProxyModel", /::rowsInserted\s*\(/, "QModelIndex, int, int")
event("QConcatenateTablesProxyModel", /::rowsAboutToBeRemoved\s*\(/, "QModelIndex, int, int")
event("QConcatenateTablesProxyModel", /::rowsRemoved\s*\(/, "QModelIndex, int, int")
event("QConcatenateTablesProxyModel", /::columnsAboutToBeInserted\s*\(/, "QModelIndex, int, int")
event("QConcatenateTablesProxyModel", /::columnsInserted\s*\(/, "QModelIndex, int, int")
event("QConcatenateTablesProxyModel", /::columnsAboutToBeRemoved\s*\(/, "QModelIndex, int, int")
event("QConcatenateTablesProxyModel", /::columnsRemoved\s*\(/, "QModelIndex, int, int")
event("QConcatenateTablesProxyModel", /::modelAboutToBeReset\s*\(/, "")
event("QConcatenateTablesProxyModel", /::modelReset\s*\(/, "")
event("QConcatenateTablesProxyModel", /::rowsAboutToBeMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QConcatenateTablesProxyModel", /::rowsMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QConcatenateTablesProxyModel", /::columnsAboutToBeMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QConcatenateTablesProxyModel", /::columnsMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QCoreApplication", /::destroyed\s*\(/, "QObject*")
event("QCoreApplication", /::objectNameChanged\s*\(/, "QString")
event("QCoreApplication", /::aboutToQuit\s*\(/, "")
@ -126,11 +136,6 @@ event("QCoreApplication", /::applicationNameChanged\s*\(/, "")
event("QCoreApplication", /::applicationVersionChanged\s*\(/, "")
event("QEventLoop", /::destroyed\s*\(/, "QObject*")
event("QEventLoop", /::objectNameChanged\s*\(/, "QString")
event("QEventTransition", /::destroyed\s*\(/, "QObject*")
event("QEventTransition", /::objectNameChanged\s*\(/, "QString")
event("QEventTransition", /::triggered\s*\(/, "")
event("QEventTransition", /::targetStateChanged\s*\(/, "")
event("QEventTransition", /::targetStatesChanged\s*\(/, "")
event("QFile", /::destroyed\s*\(/, "QObject*")
event("QFile", /::objectNameChanged\s*\(/, "QString")
event("QFile", /::readyRead\s*\(/, "")
@ -153,19 +158,6 @@ event("QFileSystemWatcher", /::destroyed\s*\(/, "QObject*")
event("QFileSystemWatcher", /::objectNameChanged\s*\(/, "QString")
event("QFileSystemWatcher", /::fileChanged\s*\(/, "QString")
event("QFileSystemWatcher", /::directoryChanged\s*\(/, "QString")
event("QFinalState", /::destroyed\s*\(/, "QObject*")
event("QFinalState", /::objectNameChanged\s*\(/, "QString")
event("QFinalState", /::entered\s*\(/, "")
event("QFinalState", /::exited\s*\(/, "")
event("QFinalState", /::activeChanged\s*\(/, "bool")
event("QHistoryState", /::destroyed\s*\(/, "QObject*")
event("QHistoryState", /::objectNameChanged\s*\(/, "QString")
event("QHistoryState", /::entered\s*\(/, "")
event("QHistoryState", /::exited\s*\(/, "")
event("QHistoryState", /::activeChanged\s*\(/, "bool")
event("QHistoryState", /::defaultTransitionChanged\s*\(/, "")
event("QHistoryState", /::defaultStateChanged\s*\(/, "")
event("QHistoryState", /::historyTypeChanged\s*\(/, "")
event("QIODevice", /::destroyed\s*\(/, "QObject*")
event("QIODevice", /::objectNameChanged\s*\(/, "QString")
event("QIODevice", /::readyRead\s*\(/, "")
@ -176,7 +168,7 @@ event("QIODevice", /::aboutToClose\s*\(/, "")
event("QIODevice", /::readChannelFinished\s*\(/, "")
event("QIdentityProxyModel", /::destroyed\s*\(/, "QObject*")
event("QIdentityProxyModel", /::objectNameChanged\s*\(/, "QString")
event("QIdentityProxyModel", /::dataChanged\s*\(/, "QModelIndex, QModelIndex, QVector<int>")
event("QIdentityProxyModel", /::dataChanged\s*\(/, "QModelIndex, QModelIndex, QList<int>")
event("QIdentityProxyModel", /::headerDataChanged\s*\(/, "Qt::Orientation, int, int")
event("QIdentityProxyModel", /::layoutChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
event("QIdentityProxyModel", /::layoutAboutToBeChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
@ -232,7 +224,6 @@ event("QProcess", /::aboutToClose\s*\(/, "")
event("QProcess", /::readChannelFinished\s*\(/, "")
event("QProcess", /::started\s*\(/, "")
event("QProcess", /::finished\s*\(/, "int, QProcess::ExitStatus")
event("QProcess", /::error\s*\(/, "QProcess::ProcessError")
event("QProcess", /::errorOccurred\s*\(/, "QProcess::ProcessError")
event("QProcess", /::stateChanged\s*\(/, "QProcess::ProcessState")
event("QProcess", /::readyReadStandardOutput\s*\(/, "")
@ -265,26 +256,16 @@ event("QSharedMemory", /::destroyed\s*\(/, "QObject*")
event("QSharedMemory", /::objectNameChanged\s*\(/, "QString")
event("QSignalMapper", /::destroyed\s*\(/, "QObject*")
event("QSignalMapper", /::objectNameChanged\s*\(/, "QString")
event("QSignalMapper", /::mapped\s*\(.*int/, "int")
event("QSignalMapper", /::mapped\s*\(.*QString/, "QString")
rename("QSignalMapper", /::mapped\s*\(.*QString/, "mapped_qs")
event("QSignalMapper", /::mapped\s*\(.*QWidget/, "QWidget*")
rename("QSignalMapper", /::mapped\s*\(.*QWidget/, "mapped_qw")
event("QSignalMapper", /::mapped\s*\(.*QObject/, "QObject*")
rename("QSignalMapper", /::mapped\s*\(.*QObject/, "mapped_qo")
event("QSignalTransition", /::destroyed\s*\(/, "QObject*")
event("QSignalTransition", /::objectNameChanged\s*\(/, "QString")
event("QSignalTransition", /::triggered\s*\(/, "")
event("QSignalTransition", /::targetStateChanged\s*\(/, "")
event("QSignalTransition", /::targetStatesChanged\s*\(/, "")
event("QSignalTransition", /::senderObjectChanged\s*\(/, "")
event("QSignalTransition", /::signalChanged\s*\(/, "")
event("QSignalMapper", /::mappedInt\s*\(/, "int")
event("QSignalMapper", /::mappedString\s*\(/, "QString")
event("QSignalMapper", /::mappedObject\s*\(/, "QObject*")
event("QSocketNotifier", /::destroyed\s*\(/, "QObject*")
event("QSocketNotifier", /::objectNameChanged\s*\(/, "QString")
event("QSocketNotifier", /::activated\s*\(/, "QSocketDescriptor, QSocketNotifier::Type")
event("QSocketNotifier", /::activated\s*\(/, "int")
event("QSortFilterProxyModel", /::destroyed\s*\(/, "QObject*")
event("QSortFilterProxyModel", /::objectNameChanged\s*\(/, "QString")
event("QSortFilterProxyModel", /::dataChanged\s*\(/, "QModelIndex, QModelIndex, QVector<int>")
event("QSortFilterProxyModel", /::dataChanged\s*\(/, "QModelIndex, QModelIndex, QList<int>")
event("QSortFilterProxyModel", /::headerDataChanged\s*\(/, "Qt::Orientation, int, int")
event("QSortFilterProxyModel", /::layoutChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
event("QSortFilterProxyModel", /::layoutAboutToBeChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
@ -303,32 +284,17 @@ event("QSortFilterProxyModel", /::rowsMoved\s*\(/, "QModelIndex, int, int, QMode
event("QSortFilterProxyModel", /::columnsAboutToBeMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QSortFilterProxyModel", /::columnsMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QSortFilterProxyModel", /::sourceModelChanged\s*\(/, "")
event("QState", /::destroyed\s*\(/, "QObject*")
event("QState", /::objectNameChanged\s*\(/, "QString")
event("QState", /::entered\s*\(/, "")
event("QState", /::exited\s*\(/, "")
event("QState", /::activeChanged\s*\(/, "bool")
event("QState", /::finished\s*\(/, "")
event("QState", /::propertiesAssigned\s*\(/, "")
event("QState", /::childModeChanged\s*\(/, "")
event("QState", /::initialStateChanged\s*\(/, "")
event("QState", /::errorStateChanged\s*\(/, "")
event("QStateMachine", /::destroyed\s*\(/, "QObject*")
event("QStateMachine", /::objectNameChanged\s*\(/, "QString")
event("QStateMachine", /::entered\s*\(/, "")
event("QStateMachine", /::exited\s*\(/, "")
event("QStateMachine", /::activeChanged\s*\(/, "bool")
event("QStateMachine", /::finished\s*\(/, "")
event("QStateMachine", /::propertiesAssigned\s*\(/, "")
event("QStateMachine", /::childModeChanged\s*\(/, "")
event("QStateMachine", /::initialStateChanged\s*\(/, "")
event("QStateMachine", /::errorStateChanged\s*\(/, "")
event("QStateMachine", /::started\s*\(/, "")
event("QStateMachine", /::stopped\s*\(/, "")
event("QStateMachine", /::runningChanged\s*\(/, "bool")
event("QSortFilterProxyModel", /::dynamicSortFilterChanged\s*\(/, "bool")
event("QSortFilterProxyModel", /::filterCaseSensitivityChanged\s*\(/, "Qt::CaseSensitivity")
event("QSortFilterProxyModel", /::sortCaseSensitivityChanged\s*\(/, "Qt::CaseSensitivity")
event("QSortFilterProxyModel", /::sortLocaleAwareChanged\s*\(/, "bool")
event("QSortFilterProxyModel", /::sortRoleChanged\s*\(/, "int")
event("QSortFilterProxyModel", /::filterRoleChanged\s*\(/, "int")
event("QSortFilterProxyModel", /::recursiveFilteringEnabledChanged\s*\(/, "bool")
event("QSortFilterProxyModel", /::autoAcceptChildRowsChanged\s*\(/, "bool")
event("QStringListModel", /::destroyed\s*\(/, "QObject*")
event("QStringListModel", /::objectNameChanged\s*\(/, "QString")
event("QStringListModel", /::dataChanged\s*\(/, "QModelIndex, QModelIndex, QVector<int>")
event("QStringListModel", /::dataChanged\s*\(/, "QModelIndex, QModelIndex, QList<int>")
event("QStringListModel", /::headerDataChanged\s*\(/, "Qt::Orientation, int, int")
event("QStringListModel", /::layoutChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
event("QStringListModel", /::layoutAboutToBeChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
@ -371,6 +337,27 @@ event("QTimer", /::objectNameChanged\s*\(/, "QString")
event("QTimer", /::timeout\s*\(/, "")
event("QTranslator", /::destroyed\s*\(/, "QObject*")
event("QTranslator", /::objectNameChanged\s*\(/, "QString")
event("QTransposeProxyModel", /::destroyed\s*\(/, "QObject*")
event("QTransposeProxyModel", /::objectNameChanged\s*\(/, "QString")
event("QTransposeProxyModel", /::dataChanged\s*\(/, "QModelIndex, QModelIndex, QList<int>")
event("QTransposeProxyModel", /::headerDataChanged\s*\(/, "Qt::Orientation, int, int")
event("QTransposeProxyModel", /::layoutChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
event("QTransposeProxyModel", /::layoutAboutToBeChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
event("QTransposeProxyModel", /::rowsAboutToBeInserted\s*\(/, "QModelIndex, int, int")
event("QTransposeProxyModel", /::rowsInserted\s*\(/, "QModelIndex, int, int")
event("QTransposeProxyModel", /::rowsAboutToBeRemoved\s*\(/, "QModelIndex, int, int")
event("QTransposeProxyModel", /::rowsRemoved\s*\(/, "QModelIndex, int, int")
event("QTransposeProxyModel", /::columnsAboutToBeInserted\s*\(/, "QModelIndex, int, int")
event("QTransposeProxyModel", /::columnsInserted\s*\(/, "QModelIndex, int, int")
event("QTransposeProxyModel", /::columnsAboutToBeRemoved\s*\(/, "QModelIndex, int, int")
event("QTransposeProxyModel", /::columnsRemoved\s*\(/, "QModelIndex, int, int")
event("QTransposeProxyModel", /::modelAboutToBeReset\s*\(/, "")
event("QTransposeProxyModel", /::modelReset\s*\(/, "")
event("QTransposeProxyModel", /::rowsAboutToBeMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QTransposeProxyModel", /::rowsMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QTransposeProxyModel", /::columnsAboutToBeMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QTransposeProxyModel", /::columnsMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QTransposeProxyModel", /::sourceModelChanged\s*\(/, "")
event("QVariantAnimation", /::destroyed\s*\(/, "QObject*")
event("QVariantAnimation", /::objectNameChanged\s*\(/, "QString")
event("QVariantAnimation", /::finished\s*\(/, "")
@ -384,6 +371,19 @@ event("QAbstractTextDocumentLayout", /::update\s*\(/, "QRectF")
event("QAbstractTextDocumentLayout", /::updateBlock\s*\(/, "QTextBlock")
event("QAbstractTextDocumentLayout", /::documentSizeChanged\s*\(/, "QSizeF")
event("QAbstractTextDocumentLayout", /::pageCountChanged\s*\(/, "int")
event("QAction", /::destroyed\s*\(/, "QObject*")
event("QAction", /::objectNameChanged\s*\(/, "QString")
event("QAction", /::changed\s*\(/, "")
event("QAction", /::enabledChanged\s*\(/, "bool")
event("QAction", /::checkableChanged\s*\(/, "bool")
event("QAction", /::visibleChanged\s*\(/, "")
event("QAction", /::triggered\s*\(/, "bool")
event("QAction", /::hovered\s*\(/, "")
event("QAction", /::toggled\s*\(/, "bool")
event("QActionGroup", /::destroyed\s*\(/, "QObject*")
event("QActionGroup", /::objectNameChanged\s*\(/, "QString")
event("QActionGroup", /::triggered\s*\(/, "QAction*")
event("QActionGroup", /::hovered\s*\(/, "QAction*")
event("QClipboard", /::destroyed\s*\(/, "QObject*")
event("QClipboard", /::objectNameChanged\s*\(/, "QString")
event("QClipboard", /::changed\s*\(/, "QClipboard::Mode")
@ -401,6 +401,29 @@ event("QDrag", /::destroyed\s*\(/, "QObject*")
event("QDrag", /::objectNameChanged\s*\(/, "QString")
event("QDrag", /::actionChanged\s*\(/, "Qt::DropAction")
event("QDrag", /::targetChanged\s*\(/, "QObject*")
event("QFileSystemModel", /::destroyed\s*\(/, "QObject*")
event("QFileSystemModel", /::objectNameChanged\s*\(/, "QString")
event("QFileSystemModel", /::dataChanged\s*\(/, "QModelIndex, QModelIndex, QList<int>")
event("QFileSystemModel", /::headerDataChanged\s*\(/, "Qt::Orientation, int, int")
event("QFileSystemModel", /::layoutChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
event("QFileSystemModel", /::layoutAboutToBeChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
event("QFileSystemModel", /::rowsAboutToBeInserted\s*\(/, "QModelIndex, int, int")
event("QFileSystemModel", /::rowsInserted\s*\(/, "QModelIndex, int, int")
event("QFileSystemModel", /::rowsAboutToBeRemoved\s*\(/, "QModelIndex, int, int")
event("QFileSystemModel", /::rowsRemoved\s*\(/, "QModelIndex, int, int")
event("QFileSystemModel", /::columnsAboutToBeInserted\s*\(/, "QModelIndex, int, int")
event("QFileSystemModel", /::columnsInserted\s*\(/, "QModelIndex, int, int")
event("QFileSystemModel", /::columnsAboutToBeRemoved\s*\(/, "QModelIndex, int, int")
event("QFileSystemModel", /::columnsRemoved\s*\(/, "QModelIndex, int, int")
event("QFileSystemModel", /::modelAboutToBeReset\s*\(/, "")
event("QFileSystemModel", /::modelReset\s*\(/, "")
event("QFileSystemModel", /::rowsAboutToBeMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QFileSystemModel", /::rowsMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QFileSystemModel", /::columnsAboutToBeMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QFileSystemModel", /::columnsMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QFileSystemModel", /::rootPathChanged\s*\(/, "QString")
event("QFileSystemModel", /::fileRenamed\s*\(/, "QString, QString, QString")
event("QFileSystemModel", /::directoryLoaded\s*\(/, "QString")
event("QGenericPlugin", /::destroyed\s*\(/, "QObject*")
event("QGenericPlugin", /::objectNameChanged\s*\(/, "QString")
event("QGuiApplication", /::destroyed\s*\(/, "QObject*")
@ -421,13 +444,16 @@ event("QGuiApplication", /::applicationStateChanged\s*\(/, "Qt::ApplicationState
event("QGuiApplication", /::layoutDirectionChanged\s*\(/, "Qt::LayoutDirection")
event("QGuiApplication", /::commitDataRequest\s*\(/, "QSessionManager&")
event("QGuiApplication", /::saveStateRequest\s*\(/, "QSessionManager&")
event("QGuiApplication", /::paletteChanged\s*\(/, "QPalette")
event("QGuiApplication", /::applicationDisplayNameChanged\s*\(/, "")
event("QGuiApplication", /::paletteChanged\s*\(/, "QPalette")
event("QGuiApplication", /::fontChanged\s*\(/, "QFont")
event("QIconEnginePlugin", /::destroyed\s*\(/, "QObject*")
event("QIconEnginePlugin", /::objectNameChanged\s*\(/, "QString")
event("QImageIOPlugin", /::destroyed\s*\(/, "QObject*")
event("QImageIOPlugin", /::objectNameChanged\s*\(/, "QString")
event("QInputDevice", /::destroyed\s*\(/, "QObject*")
event("QInputDevice", /::objectNameChanged\s*\(/, "QString")
event("QInputDevice", /::availableVirtualGeometryChanged\s*\(/, "QRect")
event("QInputMethod", /::destroyed\s*\(/, "QObject*")
event("QInputMethod", /::objectNameChanged\s*\(/, "QString")
event("QInputMethod", /::cursorRectangleChanged\s*\(/, "")
@ -475,10 +501,13 @@ event("QPaintDeviceWindow", /::activeChanged\s*\(/, "")
event("QPaintDeviceWindow", /::contentOrientationChanged\s*\(/, "Qt::ScreenOrientation")
event("QPaintDeviceWindow", /::focusObjectChanged\s*\(/, "QObject*")
event("QPaintDeviceWindow", /::opacityChanged\s*\(/, "double")
event("QPaintDeviceWindow", /::transientParentChanged\s*\(/, "QWindow*")
event("QPdfWriter", /::destroyed\s*\(/, "QObject*")
event("QPdfWriter", /::objectNameChanged\s*\(/, "QString")
event("QPictureFormatPlugin", /::destroyed\s*\(/, "QObject*")
event("QPictureFormatPlugin", /::objectNameChanged\s*\(/, "QString")
event("QPointingDevice", /::destroyed\s*\(/, "QObject*")
event("QPointingDevice", /::objectNameChanged\s*\(/, "QString")
event("QPointingDevice", /::availableVirtualGeometryChanged\s*\(/, "QRect")
event("QPointingDevice", /::grabChanged\s*\(/, "QObject*, GrabTransition, const QPointerEvent*, QEventPoint")
event("QRasterWindow", /::destroyed\s*\(/, "QObject*")
event("QRasterWindow", /::objectNameChanged\s*\(/, "QString")
event("QRasterWindow", /::screenChanged\s*\(/, "QScreen*")
@ -499,10 +528,7 @@ event("QRasterWindow", /::activeChanged\s*\(/, "")
event("QRasterWindow", /::contentOrientationChanged\s*\(/, "Qt::ScreenOrientation")
event("QRasterWindow", /::focusObjectChanged\s*\(/, "QObject*")
event("QRasterWindow", /::opacityChanged\s*\(/, "double")
event("QRegExpValidator", /::destroyed\s*\(/, "QObject*")
event("QRegExpValidator", /::objectNameChanged\s*\(/, "QString")
event("QRegExpValidator", /::changed\s*\(/, "")
event("QRegExpValidator", /::regExpChanged\s*\(/, "QRegExp")
event("QRasterWindow", /::transientParentChanged\s*\(/, "QWindow*")
event("QRegularExpressionValidator", /::destroyed\s*\(/, "QObject*")
event("QRegularExpressionValidator", /::objectNameChanged\s*\(/, "QString")
event("QRegularExpressionValidator", /::changed\s*\(/, "")
@ -520,9 +546,13 @@ event("QScreen", /::orientationChanged\s*\(/, "Qt::ScreenOrientation")
event("QScreen", /::refreshRateChanged\s*\(/, "double")
event("QSessionManager", /::destroyed\s*\(/, "QObject*")
event("QSessionManager", /::objectNameChanged\s*\(/, "QString")
event("QShortcut", /::destroyed\s*\(/, "QObject*")
event("QShortcut", /::objectNameChanged\s*\(/, "QString")
event("QShortcut", /::activated\s*\(/, "")
event("QShortcut", /::activatedAmbiguously\s*\(/, "")
event("QStandardItemModel", /::destroyed\s*\(/, "QObject*")
event("QStandardItemModel", /::objectNameChanged\s*\(/, "QString")
event("QStandardItemModel", /::dataChanged\s*\(/, "QModelIndex, QModelIndex, QVector<int>")
event("QStandardItemModel", /::dataChanged\s*\(/, "QModelIndex, QModelIndex, QList<int>")
event("QStandardItemModel", /::headerDataChanged\s*\(/, "Qt::Orientation, int, int")
event("QStandardItemModel", /::layoutChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
event("QStandardItemModel", /::layoutAboutToBeChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
@ -551,6 +581,7 @@ event("QStyleHints", /::startDragDistanceChanged\s*\(/, "int")
event("QStyleHints", /::startDragTimeChanged\s*\(/, "int")
event("QStyleHints", /::tabFocusBehaviorChanged\s*\(/, "Qt::TabFocusBehavior")
event("QStyleHints", /::useHoverEffectsChanged\s*\(/, "bool")
event("QStyleHints", /::showShortcutsInContextMenusChanged\s*\(/, "bool")
event("QStyleHints", /::wheelScrollLinesChanged\s*\(/, "int")
event("QStyleHints", /::mouseQuickSelectionThresholdChanged\s*\(/, "int")
event("QSyntaxHighlighter", /::destroyed\s*\(/, "QObject*")
@ -577,6 +608,23 @@ event("QTextObject", /::destroyed\s*\(/, "QObject*")
event("QTextObject", /::objectNameChanged\s*\(/, "QString")
event("QTextTable", /::destroyed\s*\(/, "QObject*")
event("QTextTable", /::objectNameChanged\s*\(/, "QString")
event("QUndoGroup", /::destroyed\s*\(/, "QObject*")
event("QUndoGroup", /::objectNameChanged\s*\(/, "QString")
event("QUndoGroup", /::activeStackChanged\s*\(/, "QUndoStack*")
event("QUndoGroup", /::indexChanged\s*\(/, "int")
event("QUndoGroup", /::cleanChanged\s*\(/, "bool")
event("QUndoGroup", /::canUndoChanged\s*\(/, "bool")
event("QUndoGroup", /::canRedoChanged\s*\(/, "bool")
event("QUndoGroup", /::undoTextChanged\s*\(/, "QString")
event("QUndoGroup", /::redoTextChanged\s*\(/, "QString")
event("QUndoStack", /::destroyed\s*\(/, "QObject*")
event("QUndoStack", /::objectNameChanged\s*\(/, "QString")
event("QUndoStack", /::indexChanged\s*\(/, "int")
event("QUndoStack", /::cleanChanged\s*\(/, "bool")
event("QUndoStack", /::canUndoChanged\s*\(/, "bool")
event("QUndoStack", /::canRedoChanged\s*\(/, "bool")
event("QUndoStack", /::undoTextChanged\s*\(/, "QString")
event("QUndoStack", /::redoTextChanged\s*\(/, "QString")
event("QValidator", /::destroyed\s*\(/, "QObject*")
event("QValidator", /::objectNameChanged\s*\(/, "QString")
event("QValidator", /::changed\s*\(/, "")
@ -600,6 +648,7 @@ event("QWindow", /::activeChanged\s*\(/, "")
event("QWindow", /::contentOrientationChanged\s*\(/, "Qt::ScreenOrientation")
event("QWindow", /::focusObjectChanged\s*\(/, "QObject*")
event("QWindow", /::opacityChanged\s*\(/, "double")
event("QWindow", /::transientParentChanged\s*\(/, "QWindow*")
event("QAbstractButton", /::destroyed\s*\(/, "QObject*")
event("QAbstractButton", /::objectNameChanged\s*\(/, "QString")
event("QAbstractButton", /::windowTitleChanged\s*\(/, "QString")
@ -653,16 +702,6 @@ event("QAbstractSpinBox", /::windowIconChanged\s*\(/, "QIcon")
event("QAbstractSpinBox", /::windowIconTextChanged\s*\(/, "QString")
event("QAbstractSpinBox", /::customContextMenuRequested\s*\(/, "QPoint")
event("QAbstractSpinBox", /::editingFinished\s*\(/, "")
event("QAction", /::destroyed\s*\(/, "QObject*")
event("QAction", /::objectNameChanged\s*\(/, "QString")
event("QAction", /::changed\s*\(/, "")
event("QAction", /::triggered\s*\(/, "bool")
event("QAction", /::hovered\s*\(/, "")
event("QAction", /::toggled\s*\(/, "bool")
event("QActionGroup", /::destroyed\s*\(/, "QObject*")
event("QActionGroup", /::objectNameChanged\s*\(/, "QString")
event("QActionGroup", /::triggered\s*\(/, "QAction*")
event("QActionGroup", /::hovered\s*\(/, "QAction*")
event("QApplication", /::destroyed\s*\(/, "QObject*")
event("QApplication", /::objectNameChanged\s*\(/, "QString")
event("QApplication", /::aboutToQuit\s*\(/, "")
@ -681,8 +720,8 @@ event("QApplication", /::applicationStateChanged\s*\(/, "Qt::ApplicationState")
event("QApplication", /::layoutDirectionChanged\s*\(/, "Qt::LayoutDirection")
event("QApplication", /::commitDataRequest\s*\(/, "QSessionManager&")
event("QApplication", /::saveStateRequest\s*\(/, "QSessionManager&")
event("QApplication", /::paletteChanged\s*\(/, "QPalette")
event("QApplication", /::applicationDisplayNameChanged\s*\(/, "")
event("QApplication", /::paletteChanged\s*\(/, "QPalette")
event("QApplication", /::fontChanged\s*\(/, "QFont")
event("QApplication", /::focusChanged\s*\(/, "QWidget*, QWidget*")
event("QBoxLayout", /::destroyed\s*\(/, "QObject*")
@ -691,15 +730,15 @@ event("QButtonGroup", /::destroyed\s*\(/, "QObject*")
event("QButtonGroup", /::objectNameChanged\s*\(/, "QString")
event("QButtonGroup", /::buttonClicked\s*\(.*QAbstractButton/, "QAbstractButton*")
rename("QButtonGroup", /::buttonClicked\s*\(.*QAbstractButton/, "buttonClicked_qab")
event("QButtonGroup", /::buttonClicked\s*\(.*int/, "int")
event("QButtonGroup", /::buttonPressed\s*\(.*QAbstractButton/, "QAbstractButton*")
rename("QButtonGroup", /::buttonPressed\s*\(.*QAbstractButton/, "buttonPressed_qab")
event("QButtonGroup", /::buttonPressed\s*\(.*int/, "int")
event("QButtonGroup", /::buttonReleased\s*\(.*QAbstractButton/, "QAbstractButton*")
rename("QButtonGroup", /::buttonReleased\s*\(.*QAbstractButton/, "buttonReleased_qab")
event("QButtonGroup", /::buttonReleased\s*\(.*int/, "int")
event("QButtonGroup", /::buttonToggled\s*\(/, "QAbstractButton*, bool")
event("QButtonGroup", /::buttonToggled\s*\(/, "int, bool")
event("QButtonGroup", /::idClicked\s*\(/, "int")
event("QButtonGroup", /::idPressed\s*\(/, "int")
event("QButtonGroup", /::idReleased\s*\(/, "int")
event("QButtonGroup", /::idToggled\s*\(/, "int, bool")
event("QCalendarWidget", /::destroyed\s*\(/, "QObject*")
event("QCalendarWidget", /::objectNameChanged\s*\(/, "QString")
event("QCalendarWidget", /::windowTitleChanged\s*\(/, "QString")
@ -754,14 +793,10 @@ event("QComboBox", /::windowIconTextChanged\s*\(/, "QString")
event("QComboBox", /::customContextMenuRequested\s*\(/, "QPoint")
event("QComboBox", /::editTextChanged\s*\(/, "QString")
event("QComboBox", /::activated\s*\(.*int/, "int")
event("QComboBox", /::activated\s*\(.*QString/, "QString")
rename("QComboBox", /::activated\s*\(.*QString/, "activated_qs")
event("QComboBox", /::textActivated\s*\(/, "QString")
event("QComboBox", /::highlighted\s*\(.*int/, "int")
event("QComboBox", /::highlighted\s*\(.*QString/, "QString")
rename("QComboBox", /::highlighted\s*\(.*QString/, "highlighted_qs")
event("QComboBox", /::textHighlighted\s*\(/, "QString")
event("QComboBox", /::currentIndexChanged\s*\(.*int/, "int")
event("QComboBox", /::currentIndexChanged\s*\(.*QString/, "QString")
rename("QComboBox", /::currentIndexChanged\s*\(.*QString/, "currentIndexChanged_qs")
event("QComboBox", /::currentTextChanged\s*\(/, "QString")
event("QCommandLinkButton", /::destroyed\s*\(/, "QObject*")
event("QCommandLinkButton", /::objectNameChanged\s*\(/, "QString")
@ -807,16 +842,6 @@ event("QDateTimeEdit", /::editingFinished\s*\(/, "")
event("QDateTimeEdit", /::dateTimeChanged\s*\(/, "QDateTime")
event("QDateTimeEdit", /::timeChanged\s*\(/, "QTime")
event("QDateTimeEdit", /::dateChanged\s*\(/, "QDate")
event("QDesktopWidget", /::destroyed\s*\(/, "QObject*")
event("QDesktopWidget", /::objectNameChanged\s*\(/, "QString")
event("QDesktopWidget", /::windowTitleChanged\s*\(/, "QString")
event("QDesktopWidget", /::windowIconChanged\s*\(/, "QIcon")
event("QDesktopWidget", /::windowIconTextChanged\s*\(/, "QString")
event("QDesktopWidget", /::customContextMenuRequested\s*\(/, "QPoint")
event("QDesktopWidget", /::resized\s*\(/, "int")
event("QDesktopWidget", /::workAreaResized\s*\(/, "int")
event("QDesktopWidget", /::screenCountChanged\s*\(/, "int")
event("QDesktopWidget", /::primaryScreenChanged\s*\(/, "")
event("QDial", /::destroyed\s*\(/, "QObject*")
event("QDial", /::objectNameChanged\s*\(/, "QString")
event("QDial", /::windowTitleChanged\s*\(/, "QString")
@ -848,26 +873,6 @@ event("QDialogButtonBox", /::clicked\s*\(/, "QAbstractButton*")
event("QDialogButtonBox", /::accepted\s*\(/, "")
event("QDialogButtonBox", /::helpRequested\s*\(/, "")
event("QDialogButtonBox", /::rejected\s*\(/, "")
event("QDirModel", /::destroyed\s*\(/, "QObject*")
event("QDirModel", /::objectNameChanged\s*\(/, "QString")
event("QDirModel", /::dataChanged\s*\(/, "QModelIndex, QModelIndex, QVector<int>")
event("QDirModel", /::headerDataChanged\s*\(/, "Qt::Orientation, int, int")
event("QDirModel", /::layoutChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
event("QDirModel", /::layoutAboutToBeChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
event("QDirModel", /::rowsAboutToBeInserted\s*\(/, "QModelIndex, int, int")
event("QDirModel", /::rowsInserted\s*\(/, "QModelIndex, int, int")
event("QDirModel", /::rowsAboutToBeRemoved\s*\(/, "QModelIndex, int, int")
event("QDirModel", /::rowsRemoved\s*\(/, "QModelIndex, int, int")
event("QDirModel", /::columnsAboutToBeInserted\s*\(/, "QModelIndex, int, int")
event("QDirModel", /::columnsInserted\s*\(/, "QModelIndex, int, int")
event("QDirModel", /::columnsAboutToBeRemoved\s*\(/, "QModelIndex, int, int")
event("QDirModel", /::columnsRemoved\s*\(/, "QModelIndex, int, int")
event("QDirModel", /::modelAboutToBeReset\s*\(/, "")
event("QDirModel", /::modelReset\s*\(/, "")
event("QDirModel", /::rowsAboutToBeMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QDirModel", /::rowsMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QDirModel", /::columnsAboutToBeMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QDirModel", /::columnsMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QDockWidget", /::destroyed\s*\(/, "QObject*")
event("QDockWidget", /::objectNameChanged\s*\(/, "QString")
event("QDockWidget", /::windowTitleChanged\s*\(/, "QString")
@ -887,8 +892,7 @@ event("QDoubleSpinBox", /::windowIconTextChanged\s*\(/, "QString")
event("QDoubleSpinBox", /::customContextMenuRequested\s*\(/, "QPoint")
event("QDoubleSpinBox", /::editingFinished\s*\(/, "")
event("QDoubleSpinBox", /::valueChanged\s*\(.*double/, "double")
event("QDoubleSpinBox", /::valueChanged\s*\(.*QString/, "QString")
rename("QDoubleSpinBox", /::valueChanged\s*\(.*QString/, "valueChanged_qs")
event("QDoubleSpinBox", /::textChanged\s*\(/, "QString")
event("QErrorMessage", /::destroyed\s*\(/, "QObject*")
event("QErrorMessage", /::objectNameChanged\s*\(/, "QString")
event("QErrorMessage", /::windowTitleChanged\s*\(/, "QString")
@ -916,29 +920,6 @@ event("QFileDialog", /::urlsSelected\s*\(/, "QList<QUrl>")
event("QFileDialog", /::currentUrlChanged\s*\(/, "QUrl")
event("QFileDialog", /::directoryUrlEntered\s*\(/, "QUrl")
event("QFileDialog", /::filterSelected\s*\(/, "QString")
event("QFileSystemModel", /::destroyed\s*\(/, "QObject*")
event("QFileSystemModel", /::objectNameChanged\s*\(/, "QString")
event("QFileSystemModel", /::dataChanged\s*\(/, "QModelIndex, QModelIndex, QVector<int>")
event("QFileSystemModel", /::headerDataChanged\s*\(/, "Qt::Orientation, int, int")
event("QFileSystemModel", /::layoutChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
event("QFileSystemModel", /::layoutAboutToBeChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
event("QFileSystemModel", /::rowsAboutToBeInserted\s*\(/, "QModelIndex, int, int")
event("QFileSystemModel", /::rowsInserted\s*\(/, "QModelIndex, int, int")
event("QFileSystemModel", /::rowsAboutToBeRemoved\s*\(/, "QModelIndex, int, int")
event("QFileSystemModel", /::rowsRemoved\s*\(/, "QModelIndex, int, int")
event("QFileSystemModel", /::columnsAboutToBeInserted\s*\(/, "QModelIndex, int, int")
event("QFileSystemModel", /::columnsInserted\s*\(/, "QModelIndex, int, int")
event("QFileSystemModel", /::columnsAboutToBeRemoved\s*\(/, "QModelIndex, int, int")
event("QFileSystemModel", /::columnsRemoved\s*\(/, "QModelIndex, int, int")
event("QFileSystemModel", /::modelAboutToBeReset\s*\(/, "")
event("QFileSystemModel", /::modelReset\s*\(/, "")
event("QFileSystemModel", /::rowsAboutToBeMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QFileSystemModel", /::rowsMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QFileSystemModel", /::columnsAboutToBeMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QFileSystemModel", /::columnsMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QFileSystemModel", /::rootPathChanged\s*\(/, "QString")
event("QFileSystemModel", /::fileRenamed\s*\(/, "QString, QString, QString")
event("QFileSystemModel", /::directoryLoaded\s*\(/, "QString")
event("QFocusFrame", /::destroyed\s*\(/, "QObject*")
event("QFocusFrame", /::objectNameChanged\s*\(/, "QString")
event("QFocusFrame", /::windowTitleChanged\s*\(/, "QString")
@ -953,14 +934,10 @@ event("QFontComboBox", /::windowIconTextChanged\s*\(/, "QString")
event("QFontComboBox", /::customContextMenuRequested\s*\(/, "QPoint")
event("QFontComboBox", /::editTextChanged\s*\(/, "QString")
event("QFontComboBox", /::activated\s*\(.*int/, "int")
event("QFontComboBox", /::activated\s*\(.*QString/, "QString")
rename("QFontComboBox", /::activated\s*\(.*QString/, "activated_qs")
event("QFontComboBox", /::textActivated\s*\(/, "QString")
event("QFontComboBox", /::highlighted\s*\(.*int/, "int")
event("QFontComboBox", /::highlighted\s*\(.*QString/, "QString")
rename("QFontComboBox", /::highlighted\s*\(.*QString/, "highlighted_qs")
event("QFontComboBox", /::textHighlighted\s*\(/, "QString")
event("QFontComboBox", /::currentIndexChanged\s*\(.*int/, "int")
event("QFontComboBox", /::currentIndexChanged\s*\(.*QString/, "QString")
rename("QFontComboBox", /::currentIndexChanged\s*\(.*QString/, "currentIndexChanged_qs")
event("QFontComboBox", /::currentTextChanged\s*\(/, "QString")
event("QFontComboBox", /::currentFontChanged\s*\(/, "QFont")
event("QFontDialog", /::destroyed\s*\(/, "QObject*")
@ -1136,6 +1113,7 @@ event("QHeaderView", /::sectionCountChanged\s*\(/, "int, int")
event("QHeaderView", /::sectionHandleDoubleClicked\s*\(/, "int")
event("QHeaderView", /::geometriesChanged\s*\(/, "")
event("QHeaderView", /::sortIndicatorChanged\s*\(/, "int, Qt::SortOrder")
event("QHeaderView", /::sortIndicatorClearableChanged\s*\(/, "bool")
event("QInputDialog", /::destroyed\s*\(/, "QObject*")
event("QInputDialog", /::objectNameChanged\s*\(/, "QString")
event("QInputDialog", /::windowTitleChanged\s*\(/, "QString")
@ -1374,10 +1352,6 @@ event("QScroller", /::destroyed\s*\(/, "QObject*")
event("QScroller", /::objectNameChanged\s*\(/, "QString")
event("QScroller", /::stateChanged\s*\(/, "QScroller::State")
event("QScroller", /::scrollerPropertiesChanged\s*\(/, "QScrollerProperties")
event("QShortcut", /::destroyed\s*\(/, "QObject*")
event("QShortcut", /::objectNameChanged\s*\(/, "QString")
event("QShortcut", /::activated\s*\(/, "")
event("QShortcut", /::activatedAmbiguously\s*\(/, "")
event("QSizeGrip", /::destroyed\s*\(/, "QObject*")
event("QSizeGrip", /::objectNameChanged\s*\(/, "QString")
event("QSizeGrip", /::windowTitleChanged\s*\(/, "QString")
@ -1404,8 +1378,7 @@ event("QSpinBox", /::windowIconTextChanged\s*\(/, "QString")
event("QSpinBox", /::customContextMenuRequested\s*\(/, "QPoint")
event("QSpinBox", /::editingFinished\s*\(/, "")
event("QSpinBox", /::valueChanged\s*\(.*int/, "int")
event("QSpinBox", /::valueChanged\s*\(.*QString/, "QString")
rename("QSpinBox", /::valueChanged\s*\(.*QString/, "valueChanged_qs")
event("QSpinBox", /::textChanged\s*\(/, "QString")
event("QSplashScreen", /::destroyed\s*\(/, "QObject*")
event("QSplashScreen", /::objectNameChanged\s*\(/, "QString")
event("QSplashScreen", /::windowTitleChanged\s*\(/, "QString")
@ -1544,8 +1517,6 @@ event("QTextBrowser", /::forwardAvailable\s*\(/, "bool")
event("QTextBrowser", /::historyChanged\s*\(/, "")
event("QTextBrowser", /::sourceChanged\s*\(/, "QUrl")
event("QTextBrowser", /::highlighted\s*\(.*QUrl/, "QUrl")
event("QTextBrowser", /::highlighted\s*\(.*QString/, "QString")
rename("QTextBrowser", /::highlighted\s*\(.*QString/, "highlighted_qs")
event("QTextBrowser", /::anchorClicked\s*\(/, "QUrl")
event("QTextEdit", /::destroyed\s*\(/, "QObject*")
event("QTextEdit", /::objectNameChanged\s*\(/, "QString")
@ -1643,23 +1614,6 @@ event("QTreeWidget", /::itemExpanded\s*\(/, "QTreeWidgetItem*")
event("QTreeWidget", /::itemCollapsed\s*\(/, "QTreeWidgetItem*")
event("QTreeWidget", /::currentItemChanged\s*\(/, "QTreeWidgetItem*, QTreeWidgetItem*")
event("QTreeWidget", /::itemSelectionChanged\s*\(/, "")
event("QUndoGroup", /::destroyed\s*\(/, "QObject*")
event("QUndoGroup", /::objectNameChanged\s*\(/, "QString")
event("QUndoGroup", /::activeStackChanged\s*\(/, "QUndoStack*")
event("QUndoGroup", /::indexChanged\s*\(/, "int")
event("QUndoGroup", /::cleanChanged\s*\(/, "bool")
event("QUndoGroup", /::canUndoChanged\s*\(/, "bool")
event("QUndoGroup", /::canRedoChanged\s*\(/, "bool")
event("QUndoGroup", /::undoTextChanged\s*\(/, "QString")
event("QUndoGroup", /::redoTextChanged\s*\(/, "QString")
event("QUndoStack", /::destroyed\s*\(/, "QObject*")
event("QUndoStack", /::objectNameChanged\s*\(/, "QString")
event("QUndoStack", /::indexChanged\s*\(/, "int")
event("QUndoStack", /::cleanChanged\s*\(/, "bool")
event("QUndoStack", /::canUndoChanged\s*\(/, "bool")
event("QUndoStack", /::canRedoChanged\s*\(/, "bool")
event("QUndoStack", /::undoTextChanged\s*\(/, "QString")
event("QUndoStack", /::redoTextChanged\s*\(/, "QString")
event("QUndoView", /::destroyed\s*\(/, "QObject*")
event("QUndoView", /::objectNameChanged\s*\(/, "QString")
event("QUndoView", /::windowTitleChanged\s*\(/, "QString")
@ -1685,6 +1639,9 @@ event("QWidget", /::customContextMenuRequested\s*\(/, "QPoint")
event("QWidgetAction", /::destroyed\s*\(/, "QObject*")
event("QWidgetAction", /::objectNameChanged\s*\(/, "QString")
event("QWidgetAction", /::changed\s*\(/, "")
event("QWidgetAction", /::enabledChanged\s*\(/, "bool")
event("QWidgetAction", /::checkableChanged\s*\(/, "bool")
event("QWidgetAction", /::visibleChanged\s*\(/, "")
event("QWidgetAction", /::triggered\s*\(/, "bool")
event("QWidgetAction", /::hovered\s*\(/, "")
event("QWidgetAction", /::toggled\s*\(/, "bool")
@ -1709,12 +1666,191 @@ event("QWizardPage", /::windowIconChanged\s*\(/, "QIcon")
event("QWizardPage", /::windowIconTextChanged\s*\(/, "QString")
event("QWizardPage", /::customContextMenuRequested\s*\(/, "QPoint")
event("QWizardPage", /::completeChanged\s*\(/, "")
event("QSvgRenderer", /::destroyed\s*\(/, "QObject*")
event("QSvgRenderer", /::objectNameChanged\s*\(/, "QString")
event("QSvgRenderer", /::repaintNeeded\s*\(/, "")
event("QAbstractPrintDialog", /::destroyed\s*\(/, "QObject*")
event("QAbstractPrintDialog", /::objectNameChanged\s*\(/, "QString")
event("QAbstractPrintDialog", /::windowTitleChanged\s*\(/, "QString")
event("QAbstractPrintDialog", /::windowIconChanged\s*\(/, "QIcon")
event("QAbstractPrintDialog", /::windowIconTextChanged\s*\(/, "QString")
event("QAbstractPrintDialog", /::customContextMenuRequested\s*\(/, "QPoint")
event("QAbstractPrintDialog", /::finished\s*\(/, "int")
event("QAbstractPrintDialog", /::accepted\s*\(/, "")
event("QAbstractPrintDialog", /::rejected\s*\(/, "")
event("QPrintDialog", /::destroyed\s*\(/, "QObject*")
event("QPrintDialog", /::objectNameChanged\s*\(/, "QString")
event("QPrintDialog", /::windowTitleChanged\s*\(/, "QString")
event("QPrintDialog", /::windowIconChanged\s*\(/, "QIcon")
event("QPrintDialog", /::windowIconTextChanged\s*\(/, "QString")
event("QPrintDialog", /::customContextMenuRequested\s*\(/, "QPoint")
event("QPrintDialog", /::finished\s*\(/, "int")
event("QPrintDialog", /::accepted\s*\(/, "QPrinter*")
event("QPrintDialog", /::rejected\s*\(/, "")
event("QPrintPreviewDialog", /::destroyed\s*\(/, "QObject*")
event("QPrintPreviewDialog", /::objectNameChanged\s*\(/, "QString")
event("QPrintPreviewDialog", /::windowTitleChanged\s*\(/, "QString")
event("QPrintPreviewDialog", /::windowIconChanged\s*\(/, "QIcon")
event("QPrintPreviewDialog", /::windowIconTextChanged\s*\(/, "QString")
event("QPrintPreviewDialog", /::customContextMenuRequested\s*\(/, "QPoint")
event("QPrintPreviewDialog", /::finished\s*\(/, "int")
event("QPrintPreviewDialog", /::accepted\s*\(/, "")
event("QPrintPreviewDialog", /::rejected\s*\(/, "")
event("QPrintPreviewDialog", /::paintRequested\s*\(/, "QPrinter*")
event("QPrintPreviewWidget", /::destroyed\s*\(/, "QObject*")
event("QPrintPreviewWidget", /::objectNameChanged\s*\(/, "QString")
event("QPrintPreviewWidget", /::windowTitleChanged\s*\(/, "QString")
event("QPrintPreviewWidget", /::windowIconChanged\s*\(/, "QIcon")
event("QPrintPreviewWidget", /::windowIconTextChanged\s*\(/, "QString")
event("QPrintPreviewWidget", /::customContextMenuRequested\s*\(/, "QPoint")
event("QPrintPreviewWidget", /::paintRequested\s*\(/, "QPrinter*")
event("QPrintPreviewWidget", /::previewChanged\s*\(/, "")
event("QAudioDecoder", /::destroyed\s*\(/, "QObject*")
event("QAudioDecoder", /::objectNameChanged\s*\(/, "QString")
event("QAudioDecoder", /::bufferAvailableChanged\s*\(/, "bool")
event("QAudioDecoder", /::bufferReady\s*\(/, "")
event("QAudioDecoder", /::finished\s*\(/, "")
event("QAudioDecoder", /::isDecodingChanged\s*\(/, "bool")
event("QAudioDecoder", /::formatChanged\s*\(/, "QAudioFormat")
event("QAudioDecoder", /::error\s*\(/, "QAudioDecoder::Error")
event("QAudioDecoder", /::sourceChanged\s*\(/, "")
event("QAudioDecoder", /::positionChanged\s*\(/, "qlonglong")
event("QAudioDecoder", /::durationChanged\s*\(/, "qlonglong")
event("QAudioInput", /::destroyed\s*\(/, "QObject*")
event("QAudioInput", /::objectNameChanged\s*\(/, "QString")
event("QAudioInput", /::deviceChanged\s*\(/, "")
event("QAudioInput", /::volumeChanged\s*\(/, "float")
event("QAudioInput", /::mutedChanged\s*\(/, "bool")
event("QAudioOutput", /::destroyed\s*\(/, "QObject*")
event("QAudioOutput", /::objectNameChanged\s*\(/, "QString")
event("QAudioOutput", /::deviceChanged\s*\(/, "")
event("QAudioOutput", /::volumeChanged\s*\(/, "float")
event("QAudioOutput", /::mutedChanged\s*\(/, "bool")
event("QAudioSink", /::destroyed\s*\(/, "QObject*")
event("QAudioSink", /::objectNameChanged\s*\(/, "QString")
event("QAudioSink", /::stateChanged\s*\(/, "QAudio::State")
event("QAudioSource", /::destroyed\s*\(/, "QObject*")
event("QAudioSource", /::objectNameChanged\s*\(/, "QString")
event("QAudioSource", /::stateChanged\s*\(/, "QAudio::State")
event("QCamera", /::destroyed\s*\(/, "QObject*")
event("QCamera", /::objectNameChanged\s*\(/, "QString")
event("QCamera", /::activeChanged\s*\(/, "bool")
event("QCamera", /::errorChanged\s*\(/, "")
event("QCamera", /::errorOccurred\s*\(/, "QCamera::Error, QString")
event("QCamera", /::cameraDeviceChanged\s*\(/, "")
event("QCamera", /::cameraFormatChanged\s*\(/, "")
event("QCamera", /::supportedFeaturesChanged\s*\(/, "")
event("QCamera", /::focusModeChanged\s*\(/, "")
event("QCamera", /::zoomFactorChanged\s*\(/, "float")
event("QCamera", /::minimumZoomFactorChanged\s*\(/, "float")
event("QCamera", /::maximumZoomFactorChanged\s*\(/, "float")
event("QCamera", /::focusDistanceChanged\s*\(/, "float")
event("QCamera", /::focusPointChanged\s*\(/, "")
event("QCamera", /::customFocusPointChanged\s*\(/, "")
event("QCamera", /::flashReady\s*\(/, "bool")
event("QCamera", /::flashModeChanged\s*\(/, "")
event("QCamera", /::torchModeChanged\s*\(/, "")
event("QCamera", /::exposureTimeChanged\s*\(/, "float")
event("QCamera", /::manualExposureTimeChanged\s*\(/, "float")
event("QCamera", /::isoSensitivityChanged\s*\(/, "int")
event("QCamera", /::manualIsoSensitivityChanged\s*\(/, "int")
event("QCamera", /::exposureCompensationChanged\s*\(/, "float")
event("QCamera", /::exposureModeChanged\s*\(/, "")
event("QCamera", /::whiteBalanceModeChanged\s*\(/, "")
event("QCamera", /::colorTemperatureChanged\s*\(/, "")
event("QCamera", /::brightnessChanged\s*\(/, "")
event("QCamera", /::contrastChanged\s*\(/, "")
event("QCamera", /::saturationChanged\s*\(/, "")
event("QCamera", /::hueChanged\s*\(/, "")
event("QImageCapture", /::destroyed\s*\(/, "QObject*")
event("QImageCapture", /::objectNameChanged\s*\(/, "QString")
event("QImageCapture", /::errorChanged\s*\(/, "")
event("QImageCapture", /::errorOccurred\s*\(/, "int, QImageCapture::Error, QString")
event("QImageCapture", /::readyForCaptureChanged\s*\(/, "bool")
event("QImageCapture", /::metaDataChanged\s*\(/, "")
event("QImageCapture", /::fileFormatChanged\s*\(/, "")
event("QImageCapture", /::qualityChanged\s*\(/, "")
event("QImageCapture", /::resolutionChanged\s*\(/, "")
event("QImageCapture", /::imageExposed\s*\(/, "int")
event("QImageCapture", /::imageCaptured\s*\(/, "int, QImage")
event("QImageCapture", /::imageMetadataAvailable\s*\(/, "int, QMediaMetaData")
event("QImageCapture", /::imageAvailable\s*\(/, "int, QVideoFrame")
event("QImageCapture", /::imageSaved\s*\(/, "int, QString")
event("QMediaCaptureSession", /::destroyed\s*\(/, "QObject*")
event("QMediaCaptureSession", /::objectNameChanged\s*\(/, "QString")
event("QMediaCaptureSession", /::audioInputChanged\s*\(/, "")
event("QMediaCaptureSession", /::cameraChanged\s*\(/, "")
event("QMediaCaptureSession", /::imageCaptureChanged\s*\(/, "")
event("QMediaCaptureSession", /::recorderChanged\s*\(/, "")
event("QMediaCaptureSession", /::videoOutputChanged\s*\(/, "")
event("QMediaCaptureSession", /::audioOutputChanged\s*\(/, "")
event("QMediaDevices", /::destroyed\s*\(/, "QObject*")
event("QMediaDevices", /::objectNameChanged\s*\(/, "QString")
event("QMediaDevices", /::audioInputsChanged\s*\(/, "")
event("QMediaDevices", /::audioOutputsChanged\s*\(/, "")
event("QMediaDevices", /::videoInputsChanged\s*\(/, "")
event("QMediaPlayer", /::destroyed\s*\(/, "QObject*")
event("QMediaPlayer", /::objectNameChanged\s*\(/, "QString")
event("QMediaPlayer", /::sourceChanged\s*\(/, "QUrl")
event("QMediaPlayer", /::playbackStateChanged\s*\(/, "QMediaPlayer::PlaybackState")
event("QMediaPlayer", /::mediaStatusChanged\s*\(/, "QMediaPlayer::MediaStatus")
event("QMediaPlayer", /::durationChanged\s*\(/, "qlonglong")
event("QMediaPlayer", /::positionChanged\s*\(/, "qlonglong")
event("QMediaPlayer", /::hasAudioChanged\s*\(/, "bool")
event("QMediaPlayer", /::hasVideoChanged\s*\(/, "bool")
event("QMediaPlayer", /::bufferProgressChanged\s*\(/, "float")
event("QMediaPlayer", /::seekableChanged\s*\(/, "bool")
event("QMediaPlayer", /::playbackRateChanged\s*\(/, "double")
event("QMediaPlayer", /::loopsChanged\s*\(/, "")
event("QMediaPlayer", /::metaDataChanged\s*\(/, "")
event("QMediaPlayer", /::videoOutputChanged\s*\(/, "")
event("QMediaPlayer", /::audioOutputChanged\s*\(/, "")
event("QMediaPlayer", /::tracksChanged\s*\(/, "")
event("QMediaPlayer", /::activeTracksChanged\s*\(/, "")
event("QMediaPlayer", /::errorChanged\s*\(/, "")
event("QMediaPlayer", /::errorOccurred\s*\(/, "QMediaPlayer::Error, QString")
event("QMediaRecorder", /::destroyed\s*\(/, "QObject*")
event("QMediaRecorder", /::objectNameChanged\s*\(/, "QString")
event("QMediaRecorder", /::recorderStateChanged\s*\(/, "RecorderState")
event("QMediaRecorder", /::durationChanged\s*\(/, "qlonglong")
event("QMediaRecorder", /::actualLocationChanged\s*\(/, "QUrl")
event("QMediaRecorder", /::encoderSettingsChanged\s*\(/, "")
event("QMediaRecorder", /::errorOccurred\s*\(/, "Error, QString")
event("QMediaRecorder", /::errorChanged\s*\(/, "")
event("QMediaRecorder", /::metaDataChanged\s*\(/, "")
event("QMediaRecorder", /::mediaFormatChanged\s*\(/, "")
event("QMediaRecorder", /::encodingModeChanged\s*\(/, "")
event("QMediaRecorder", /::qualityChanged\s*\(/, "")
event("QMediaRecorder", /::videoResolutionChanged\s*\(/, "")
event("QMediaRecorder", /::videoFrameRateChanged\s*\(/, "")
event("QMediaRecorder", /::videoBitRateChanged\s*\(/, "")
event("QMediaRecorder", /::audioBitRateChanged\s*\(/, "")
event("QMediaRecorder", /::audioChannelCountChanged\s*\(/, "")
event("QMediaRecorder", /::audioSampleRateChanged\s*\(/, "")
event("QSoundEffect", /::destroyed\s*\(/, "QObject*")
event("QSoundEffect", /::objectNameChanged\s*\(/, "QString")
event("QSoundEffect", /::sourceChanged\s*\(/, "")
event("QSoundEffect", /::loopCountChanged\s*\(/, "")
event("QSoundEffect", /::loopsRemainingChanged\s*\(/, "")
event("QSoundEffect", /::volumeChanged\s*\(/, "")
event("QSoundEffect", /::mutedChanged\s*\(/, "")
event("QSoundEffect", /::loadedChanged\s*\(/, "")
event("QSoundEffect", /::playingChanged\s*\(/, "")
event("QSoundEffect", /::statusChanged\s*\(/, "")
event("QSoundEffect", /::audioDeviceChanged\s*\(/, "")
event("QVideoSink", /::destroyed\s*\(/, "QObject*")
event("QVideoSink", /::objectNameChanged\s*\(/, "QString")
event("QVideoSink", /::videoFrameChanged\s*\(/, "QVideoFrame")
event("QVideoSink", /::subtitleTextChanged\s*\(/, "QString")
event("QVideoSink", /::videoSizeChanged\s*\(/, "")
event("QUiLoader", /::destroyed\s*\(/, "QObject*")
event("QUiLoader", /::objectNameChanged\s*\(/, "QString")
event("QSqlDriver", /::destroyed\s*\(/, "QObject*")
event("QSqlDriver", /::objectNameChanged\s*\(/, "QString")
event("QSqlDriver", /::notification\s*\(/, "QString, QSqlDriver::NotificationSource, QVariant")
event("QSqlQueryModel", /::destroyed\s*\(/, "QObject*")
event("QSqlQueryModel", /::objectNameChanged\s*\(/, "QString")
event("QSqlQueryModel", /::dataChanged\s*\(/, "QModelIndex, QModelIndex, QVector<int>")
event("QSqlQueryModel", /::dataChanged\s*\(/, "QModelIndex, QModelIndex, QList<int>")
event("QSqlQueryModel", /::headerDataChanged\s*\(/, "Qt::Orientation, int, int")
event("QSqlQueryModel", /::layoutChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
event("QSqlQueryModel", /::layoutAboutToBeChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
@ -1734,7 +1870,7 @@ event("QSqlQueryModel", /::columnsAboutToBeMoved\s*\(/, "QModelIndex, int, int,
event("QSqlQueryModel", /::columnsMoved\s*\(/, "QModelIndex, int, int, QModelIndex, int")
event("QSqlRelationalTableModel", /::destroyed\s*\(/, "QObject*")
event("QSqlRelationalTableModel", /::objectNameChanged\s*\(/, "QString")
event("QSqlRelationalTableModel", /::dataChanged\s*\(/, "QModelIndex, QModelIndex, QVector<int>")
event("QSqlRelationalTableModel", /::dataChanged\s*\(/, "QModelIndex, QModelIndex, QList<int>")
event("QSqlRelationalTableModel", /::headerDataChanged\s*\(/, "Qt::Orientation, int, int")
event("QSqlRelationalTableModel", /::layoutChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
event("QSqlRelationalTableModel", /::layoutAboutToBeChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
@ -1758,7 +1894,7 @@ event("QSqlRelationalTableModel", /::beforeUpdate\s*\(/, "int, QSqlRecord&")
event("QSqlRelationalTableModel", /::beforeDelete\s*\(/, "int")
event("QSqlTableModel", /::destroyed\s*\(/, "QObject*")
event("QSqlTableModel", /::objectNameChanged\s*\(/, "QString")
event("QSqlTableModel", /::dataChanged\s*\(/, "QModelIndex, QModelIndex, QVector<int>")
event("QSqlTableModel", /::dataChanged\s*\(/, "QModelIndex, QModelIndex, QList<int>")
event("QSqlTableModel", /::headerDataChanged\s*\(/, "Qt::Orientation, int, int")
event("QSqlTableModel", /::layoutChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
event("QSqlTableModel", /::layoutAboutToBeChanged\s*\(/, "QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint")
@ -1794,7 +1930,7 @@ event("QAbstractSocket", /::hostFound\s*\(/, "")
event("QAbstractSocket", /::connected\s*\(/, "")
event("QAbstractSocket", /::disconnected\s*\(/, "")
event("QAbstractSocket", /::stateChanged\s*\(/, "QAbstractSocket::SocketState")
event("QAbstractSocket", /::error\s*\(/, "QAbstractSocket::SocketError")
event("QAbstractSocket", /::errorOccurred\s*\(/, "QAbstractSocket::SocketError")
event("QAbstractSocket", /::proxyAuthenticationRequired\s*\(/, "QNetworkProxy, QAuthenticator*")
event("QDnsLookup", /::destroyed\s*\(/, "QObject*")
event("QDnsLookup", /::objectNameChanged\s*\(/, "QString")
@ -1802,6 +1938,12 @@ event("QDnsLookup", /::finished\s*\(/, "")
event("QDnsLookup", /::nameChanged\s*\(/, "QString")
event("QDnsLookup", /::typeChanged\s*\(/, "Type")
event("QDnsLookup", /::nameserverChanged\s*\(/, "QHostAddress")
event("QDtls", /::destroyed\s*\(/, "QObject*")
event("QDtls", /::objectNameChanged\s*\(/, "QString")
event("QDtls", /::pskRequired\s*\(/, "QSslPreSharedKeyAuthenticator*")
event("QDtls", /::handshakeTimeout\s*\(/, "")
event("QDtlsClientVerifier", /::destroyed\s*\(/, "QObject*")
event("QDtlsClientVerifier", /::objectNameChanged\s*\(/, "QString")
event("QHttpMultiPart", /::destroyed\s*\(/, "QObject*")
event("QHttpMultiPart", /::objectNameChanged\s*\(/, "QString")
event("QLocalServer", /::destroyed\s*\(/, "QObject*")
@ -1817,7 +1959,7 @@ event("QLocalSocket", /::aboutToClose\s*\(/, "")
event("QLocalSocket", /::readChannelFinished\s*\(/, "")
event("QLocalSocket", /::connected\s*\(/, "")
event("QLocalSocket", /::disconnected\s*\(/, "")
event("QLocalSocket", /::error\s*\(/, "QLocalSocket::LocalSocketError")
event("QLocalSocket", /::errorOccurred\s*\(/, "QLocalSocket::LocalSocketError")
event("QLocalSocket", /::stateChanged\s*\(/, "QLocalSocket::LocalSocketState")
event("QNetworkAccessManager", /::destroyed\s*\(/, "QObject*")
event("QNetworkAccessManager", /::objectNameChanged\s*\(/, "QString")
@ -1827,19 +1969,14 @@ event("QNetworkAccessManager", /::finished\s*\(/, "QNetworkReply*")
event("QNetworkAccessManager", /::encrypted\s*\(/, "QNetworkReply*")
event("QNetworkAccessManager", /::sslErrors\s*\(/, "QNetworkReply*, QList<QSslError>")
event("QNetworkAccessManager", /::preSharedKeyAuthenticationRequired\s*\(/, "QNetworkReply*, QSslPreSharedKeyAuthenticator*")
event("QNetworkAccessManager", /::networkSessionConnected\s*\(/, "")
event("QNetworkAccessManager", /::networkAccessibleChanged\s*\(/, "QNetworkAccessManager::NetworkAccessibility")
event("QNetworkConfigurationManager", /::destroyed\s*\(/, "QObject*")
event("QNetworkConfigurationManager", /::objectNameChanged\s*\(/, "QString")
event("QNetworkConfigurationManager", /::configurationAdded\s*\(/, "QNetworkConfiguration")
event("QNetworkConfigurationManager", /::configurationRemoved\s*\(/, "QNetworkConfiguration")
event("QNetworkConfigurationManager", /::configurationChanged\s*\(/, "QNetworkConfiguration")
event("QNetworkConfigurationManager", /::onlineStateChanged\s*\(/, "bool")
event("QNetworkConfigurationManager", /::updateCompleted\s*\(/, "")
event("QNetworkCookieJar", /::destroyed\s*\(/, "QObject*")
event("QNetworkCookieJar", /::objectNameChanged\s*\(/, "QString")
event("QNetworkDiskCache", /::destroyed\s*\(/, "QObject*")
event("QNetworkDiskCache", /::objectNameChanged\s*\(/, "QString")
event("QNetworkInformation", /::destroyed\s*\(/, "QObject*")
event("QNetworkInformation", /::objectNameChanged\s*\(/, "QString")
event("QNetworkInformation", /::reachabilityChanged\s*\(/, "Reachability")
event("QNetworkInformation", /::isBehindCaptivePortalChanged\s*\(/, "bool")
event("QNetworkReply", /::destroyed\s*\(/, "QObject*")
event("QNetworkReply", /::objectNameChanged\s*\(/, "QString")
event("QNetworkReply", /::readyRead\s*\(/, "")
@ -1850,7 +1987,7 @@ event("QNetworkReply", /::aboutToClose\s*\(/, "")
event("QNetworkReply", /::readChannelFinished\s*\(/, "")
event("QNetworkReply", /::metaDataChanged\s*\(/, "")
event("QNetworkReply", /::finished\s*\(/, "")
event("QNetworkReply", /::error\s*\(/, "QNetworkReply::NetworkError")
event("QNetworkReply", /::errorOccurred\s*\(/, "QNetworkReply::NetworkError")
event("QNetworkReply", /::encrypted\s*\(/, "")
event("QNetworkReply", /::sslErrors\s*\(/, "QList<QSslError>")
event("QNetworkReply", /::preSharedKeyAuthenticationRequired\s*\(/, "QSslPreSharedKeyAuthenticator*")
@ -1858,15 +1995,6 @@ event("QNetworkReply", /::redirected\s*\(/, "QUrl")
event("QNetworkReply", /::redirectAllowed\s*\(/, "")
event("QNetworkReply", /::uploadProgress\s*\(/, "qlonglong, qlonglong")
event("QNetworkReply", /::downloadProgress\s*\(/, "qlonglong, qlonglong")
event("QNetworkSession", /::destroyed\s*\(/, "QObject*")
event("QNetworkSession", /::objectNameChanged\s*\(/, "QString")
event("QNetworkSession", /::stateChanged\s*\(/, "QNetworkSession::State")
event("QNetworkSession", /::opened\s*\(/, "")
event("QNetworkSession", /::closed\s*\(/, "")
event("QNetworkSession", /::error\s*\(/, "QNetworkSession::SessionError")
event("QNetworkSession", /::preferredConfigurationChanged\s*\(/, "QNetworkConfiguration, bool")
event("QNetworkSession", /::newConfigurationActivated\s*\(/, "")
event("QNetworkSession", /::usagePoliciesChanged\s*\(/, "QNetworkSession::UsagePolicies")
event("QSslSocket", /::destroyed\s*\(/, "QObject*")
event("QSslSocket", /::objectNameChanged\s*\(/, "QString")
event("QSslSocket", /::readyRead\s*\(/, "")
@ -1879,7 +2007,7 @@ event("QSslSocket", /::hostFound\s*\(/, "")
event("QSslSocket", /::connected\s*\(/, "")
event("QSslSocket", /::disconnected\s*\(/, "")
event("QSslSocket", /::stateChanged\s*\(/, "QAbstractSocket::SocketState")
event("QSslSocket", /::error\s*\(/, "QAbstractSocket::SocketError")
event("QSslSocket", /::errorOccurred\s*\(/, "QAbstractSocket::SocketError")
event("QSslSocket", /::proxyAuthenticationRequired\s*\(/, "QNetworkProxy, QAuthenticator*")
event("QSslSocket", /::encrypted\s*\(/, "")
event("QSslSocket", /::peerVerifyError\s*\(/, "QSslError")
@ -1887,6 +2015,10 @@ event("QSslSocket", /::sslErrors\s*\(/, "QList<QSslError>")
event("QSslSocket", /::modeChanged\s*\(/, "QSslSocket::SslMode")
event("QSslSocket", /::encryptedBytesWritten\s*\(/, "qlonglong")
event("QSslSocket", /::preSharedKeyAuthenticationRequired\s*\(/, "QSslPreSharedKeyAuthenticator*")
event("QSslSocket", /::newSessionTicketReceived\s*\(/, "")
event("QSslSocket", /::alertSent\s*\(/, "QSsl::AlertLevel, QSsl::AlertType, QString")
event("QSslSocket", /::alertReceived\s*\(/, "QSsl::AlertLevel, QSsl::AlertType, QString")
event("QSslSocket", /::handshakeInterruptedOnError\s*\(/, "QSslError")
event("QTcpServer", /::destroyed\s*\(/, "QObject*")
event("QTcpServer", /::objectNameChanged\s*\(/, "QString")
event("QTcpServer", /::newConnection\s*\(/, "")
@ -1903,7 +2035,7 @@ event("QTcpSocket", /::hostFound\s*\(/, "")
event("QTcpSocket", /::connected\s*\(/, "")
event("QTcpSocket", /::disconnected\s*\(/, "")
event("QTcpSocket", /::stateChanged\s*\(/, "QAbstractSocket::SocketState")
event("QTcpSocket", /::error\s*\(/, "QAbstractSocket::SocketError")
event("QTcpSocket", /::errorOccurred\s*\(/, "QAbstractSocket::SocketError")
event("QTcpSocket", /::proxyAuthenticationRequired\s*\(/, "QNetworkProxy, QAuthenticator*")
event("QUdpSocket", /::destroyed\s*\(/, "QObject*")
event("QUdpSocket", /::objectNameChanged\s*\(/, "QString")
@ -1917,5 +2049,5 @@ event("QUdpSocket", /::hostFound\s*\(/, "")
event("QUdpSocket", /::connected\s*\(/, "")
event("QUdpSocket", /::disconnected\s*\(/, "")
event("QUdpSocket", /::stateChanged\s*\(/, "QAbstractSocket::SocketState")
event("QUdpSocket", /::error\s*\(/, "QAbstractSocket::SocketError")
event("QUdpSocket", /::errorOccurred\s*\(/, "QAbstractSocket::SocketError")
event("QUdpSocket", /::proxyAuthenticationRequired\s*\(/, "QNetworkProxy, QAuthenticator*")

File diff suppressed because it is too large Load Diff

View File

@ -259,11 +259,11 @@ grammar CPP
end
rule pointer
cvspec:( cv:cv s )? "*" itspec:( s it:inner_type )? <PPointer>
"*" itspec:( s it:inner_type_with_cv )? <PPointer>
end
rule reference
cvspec:( cv:cv s )? "&" itspec:( s it:inner_type )? <PReference>
"&" itspec:( s it:inner_type_with_cv )? <PReference>
end
rule array_spec
@ -293,35 +293,43 @@ grammar CPP
end
rule member_pointer
cspec:( qid:qualified_id s "::*" s ) itspec:( it:inner_type )? cvspec:( s cv:cv )? refspec:( s ref:( "&" !"&" / "&&" ) )? <PMemberPointer>
cspec:( qid:qualified_id s "::*" s ) itspec:( it:inner_type_with_cv )? refspec:( s ref:( "&" !"&" / "&&" ) )? <PMemberPointer>
end
rule inner_type_with_cv
cvspec:cv s it:inner_type <PInnerTypeWithCV>
rule inner_type_part
"(" s inner_type s ")" /
pointer /
reference /
member_pointer /
( "__restrict" ![a-zA-Z0-9_] s / "..." s )* qualified_id
end
rule inner_type_part_with_cv_post
it:inner_type_part cvspec:( s cv:cv )? <PInnerTypeWithCV>
end
rule inner_type
it:(
"(" s inner_type s ")" /
inner_type_with_cv /
pointer /
reference /
member_pointer /
( "__restrict" ![a-zA-Z0-9_] s / "..." s )* qualified_id
)
it:inner_type_part_with_cv_post
s
pfx:( s spec:( array_spec / func_spec ) )*
<PInnerType>
end
rule inner_type_with_cv
cvspec:( cv:cv s )? it:inner_type <PInnerTypeWithCV>
end
rule init_spec
block_wo_comma / "default" / "delete" / "0"
end
rule tn
"typename" ![a-zA-Z0-9_] s
end
rule type
cvspec:( cv:cv s )?
a
( "typename" ![a-zA-Z0-9_] s )?
ct:concrete_type
a
dct:( cvspec:( cv:cv s ) a tn? ct:concrete_type / tn? ct:concrete_type a cvspec:( cv:cv s )? )
a
il:( s t1:inner_type i1:(s "=" s is1:init_spec)? tt:( s "," s t2:inner_type i2:(s "=" s is2:init_spec)? )* )?
# alternative initialization if only a concrete type is given:
@ -330,21 +338,23 @@ grammar CPP
end
rule type_wo_comma
cvspec:( cv:cv s )?
a
dct:( cvspec:( cv:cv s ) a tn? ct:concrete_type / tn? ct:concrete_type a cvspec:( cv:cv s )? )
a
( "typename" ![a-zA-Z0-9_] s )?
ct:concrete_type
il:( s t:inner_type i:(s "=" s is:init_spec)? )?
# alternative initialization if only a concrete type is given:
pi:( s "=" s is:init_spec )?
<PTypeWoComma>
end
rule tnt
( "typename" / "class" ) ![a-zA-Z0-9_] s ( "..." s )?
end
rule type_for_template
cvspec:( cv:cv s )?
a
dct:( cvspec:( cv:cv s ) a tnt? ct:concrete_type / tnt? ct:concrete_type a cvspec:( cv:cv s )? )
a
( ( "typename" / "class" ) ![a-zA-Z0-9_] s ( "..." s )? )?
ct:concrete_type
il:( s t:inner_type )?
<PTypeForTemplate>
end

View File

@ -116,6 +116,79 @@ DECL
end
# --------------------------------------------------------------
# Add native implementations for QImage
# Constructor from raw packed data without the cleanup functions
def add_native_impl_QImage
add_native_impl("QImage_Adaptor", <<'CODE', <<'DECL')
// NOTE: QImage does not take ownership of the data, so
// we will provide a buffer to do so. This requires an additional
// copy, but as GSI is not guaranteeing the lifetime of the
// data, this is required here.
class DataHolder
{
public:
DataHolder() : mp_data(0) { }
DataHolder(unsigned char *data) : mp_data(data) { }
~DataHolder()
{
if (mp_data) {
delete[](mp_data);
}
mp_data = 0;
}
static unsigned char *alloc(const std::string &data)
{
unsigned char *ptr = new unsigned char[data.size()];
memcpy(ptr, data.c_str(), data.size());
return ptr;
}
private:
unsigned char *mp_data;
};
static QImage_Adaptor *new_qimage_from_data1(const std::string &data, int width, int height, int bytesPerLine, QImage::Format format)
{
return new QImage_Adaptor(DataHolder::alloc(data), width, height, bytesPerLine, format);
}
static QImage_Adaptor *new_qimage_from_data2(const std::string &data, int width, int height, QImage::Format format)
{
return new QImage_Adaptor(DataHolder::alloc(data), width, height, format);
}
QImage_Adaptor(unsigned char *data, int width, int height, int bytesPerLine, QImage::Format format)
: QImage(data, width, height, bytesPerLine, format), m_holder(data)
{
}
QImage_Adaptor(unsigned char *data, int width, int height, QImage::Format format)
: QImage (data, width, height, format), m_holder(data)
{
}
DataHolder m_holder;
CODE
gsi::constructor("new", &QImage_Adaptor::new_qimage_from_data1, gsi::arg ("data"), gsi::arg ("width"), gsi::arg ("height"), gsi::arg ("bytesPerLine"), gsi::arg ("format"),
"@brief QImage::QImage(const uchar *data, int width, int height, int bytesPerLine)\n"
"The cleanupFunction parameter is available currently."
) +
gsi::constructor("new", &QImage_Adaptor::new_qimage_from_data2, gsi::arg ("data"), gsi::arg ("width"), gsi::arg ("height"), gsi::arg ("format"),
"@brief QImage::QImage(const uchar *data, int width, int height)\n"
"The cleanupFunction parameter is available currently."
)
DECL
end
# --------------------------------------------------------------
# Alternative implementation for QFont::Light, QFont::Bold, QFont::Normal, QFont::DemiBold, QFont::Black

View File

@ -155,16 +155,15 @@ end
# part.
class CPPMemberPointer < CPPOuterType
attr_accessor :qid, :inner, :cv
def_initializer :qid, :inner, :cv
attr_accessor :qid, :inner
def_initializer :qid, :inner
def to_s
self.qid.to_s + "::* " + self.inner.to_s + (self.cv ? " " + self.cv.to_s : "")
self.qid.to_s + "::* " + self.inner.to_s
end
def dump(i)
i + "CPPMemberPointer\n" + i + " inner:\n" + self.inner.dump(i + " ") +
i + " cv:\n" + self.cv.dump(i + " ") +
i + " qid: " + self.qid.to_s
end

View File

@ -211,19 +211,19 @@ end
module PPointer
def cpp
CPPCV::wrap(cvspec.nonterminal? && cvspec.cv.to_symbol, CPPPointer::new(itspec.nonterminal? ? itspec.it.cpp_reduced : CPPAnonymousId::new))
CPPPointer::new(itspec.nonterminal? ? itspec.it.cpp_reduced : CPPAnonymousId::new)
end
end
module PReference
def cpp
CPPCV::wrap(cvspec.nonterminal? && cvspec.cv.to_symbol, CPPReference::new(itspec.nonterminal? ? itspec.it.cpp_reduced : CPPAnonymousId::new))
CPPReference::new(itspec.nonterminal? ? itspec.it.cpp_reduced : CPPAnonymousId::new)
end
end
module PMemberPointer
def cpp
CPPMemberPointer::new(cspec.qid.cpp, itspec.nonterminal? ? itspec.it.cpp_reduced : CPPAnonymousId::new, cvspec.nonterminal? && cvspec.cv.to_symbol)
CPPMemberPointer::new(cspec.qid.cpp, itspec.nonterminal? ? itspec.it.cpp_reduced : CPPAnonymousId::new)
end
end
@ -247,7 +247,7 @@ end
module PInnerTypeWithCV
def cpp
CPPCV::wrap(cvspec.to_symbol, it.cpp_reduced)
CPPCV::wrap(cvspec.nonterminal? && cvspec.cv.to_symbol, it.cpp_reduced)
end
end
@ -293,7 +293,7 @@ module PType
def cpp
# This is the class/struct/union/enum declaration if there is one
d = ct.cpp
d = dct.ct.cpp
if d.is_a?(Array)
r = d.select { |i| i.is_a?(CPPStruct) || i.is_a?(CPPEnum) }
elsif d.is_a?(CPPStruct) || d.is_a?(CPPEnum)
@ -302,7 +302,7 @@ module PType
r = []
end
# Create each declaration
ot = CPPCV::wrap(cvspec.nonterminal? && cvspec.cv.to_symbol, ct.cpp_reduced)
ot = CPPCV::wrap(dct.cvspec.nonterminal? && dct.cvspec.cv.to_symbol, dct.ct.cpp_reduced)
if il.nonterminal?
r << CPPType::new(ot, il.t1.cpp_reduced, il.i1.nonterminal? ? il.i1.is1.text_value : nil)
il.tt.elements.each do |t|
@ -324,7 +324,7 @@ end
module PTypeWoComma
def cpp
ot = CPPCV::wrap(cvspec.nonterminal? && cvspec.cv.to_symbol, ct.cpp_reduced)
ot = CPPCV::wrap(dct.cvspec.nonterminal? && dct.cvspec.cv.to_symbol, dct.ct.cpp_reduced)
if il.nonterminal?
CPPType::new(ot, il.t.cpp_reduced, il.i.nonterminal? ? il.i.is.text_value : nil)
else
@ -335,7 +335,7 @@ end
module PTypeForTemplate
def cpp
ot = CPPCV::wrap(cvspec.nonterminal? && cvspec.cv.to_symbol, ct.cpp_reduced)
ot = CPPCV::wrap(dct.cvspec.nonterminal? && dct.cvspec.cv.to_symbol, dct.ct.cpp_reduced)
CPPType::new(ot, il.nonterminal? ? il.t.cpp_reduced : CPPAnonymousId::new, nil)
end
end

View File

@ -29,7 +29,9 @@ RBA::Class::each_class do |cls|
classes[cls.name] = true
end
puts "# Properties from Qt meta objects:"
output = $output ? File.open($output, "w") : stdout
output.puts "# Properties from Qt meta objects:"
setters_sig = {}
getters_sig = {}
@ -49,18 +51,30 @@ RBA::Class::each_class do |cls|
c = cls.name.sub(/_Native$/, "")
signal_names = {}
(0..(mo.methodCount-1)).each do |i|
mm = mo.method(i)
if mm.methodType == RBA::QMetaMethod::Signal
signal_names[mm.methodSignature.sub(/\(.*/, "")] = true
end
end
valid_sig = {}
(0..(mo.propertyCount-1)).each do |i|
pr = mo.property(i)
if signal_names[pr.name]
# ignore properties that clash with signal names (e.g. QCamera::flashReady)
next
end
ucname = pr.name[0..0].upcase + pr.name[1..-1]
if pr.isReadable
puts "property_reader(\"#{c}\", /::(#{pr.name}|is#{ucname}|has#{ucname})\\s*\\(/, \"#{pr.name}\")"
output.puts "property_reader(\"#{c}\", /::(#{pr.name}|is#{ucname}|has#{ucname})\\s*\\(/, \"#{pr.name}\")"
getters_sig["#{cls.name}##{pr.name}"] = true
getters_sig["#{cls.name}#is#{ucname}"] = true
getters_sig["#{cls.name}#has#{ucname}"] = true
end
if pr.isWritable
puts "property_writer(\"#{c}\", /::set#{ucname}\\s*\\(/, \"#{pr.name}\")"
output.puts "property_writer(\"#{c}\", /::set#{ucname}\\s*\\(/, \"#{pr.name}\")"
setters_sig["#{cls.name}#set#{ucname}"] = true
end
end
@ -71,8 +85,8 @@ RBA::Class::each_class do |cls|
end
puts ""
puts "# Synthetic properties"
output.puts ""
output.puts "# Synthetic properties"
# strip const and references from types
def normalize_type(s)
@ -147,11 +161,11 @@ RBA::Class::each_class do |cls|
getter_type = normalize_type(g[2].ret_type.to_s)
if setter_type == getter_type
puts "# Property #{pn} (#{setter_type})"
output.puts "# Property #{pn} (#{setter_type})"
gc = g[1].name.sub(/_Native$/, "")
sc = s[1].name.sub(/_Native$/, "")
puts "property_reader(\"#{gc}\", /::#{g[0].name}\\s*\\(/, \"#{pn}\")"
puts "property_writer(\"#{sc}\", /::#{s[0].name}\\s*\\(/, \"#{pn}\")"
output.puts "property_reader(\"#{gc}\", /::#{g[0].name}\\s*\\(/, \"#{pn}\")"
output.puts "property_writer(\"#{sc}\", /::#{s[0].name}\\s*\\(/, \"#{pn}\")"
end
end
@ -161,3 +175,7 @@ RBA::Class::each_class do |cls|
end
if $output
output.close
end

View File

@ -29,6 +29,8 @@ RBA::Class::each_class do |cls|
classes[cls.name] = true
end
output = $output ? File.open($output, "w") : stdout
RBA::Class::each_class do |cls|
if cls.name =~ /^Q/ && (cls.name =~ /_Native$/ || !classes[cls.name + "_Native"])
@ -160,9 +162,9 @@ RBA::Class::each_class do |cls|
match += ".*int"
end
end
puts "event(\"#{c}\", /#{match}/, \"#{s}\")"
output.puts "event(\"#{c}\", /#{match}/, \"#{s}\")"
if renamed
puts "rename(\"#{c}\", /#{match}/, \"#{renamed}\")"
output.puts "rename(\"#{c}\", /#{match}/, \"#{renamed}\")"
end
end
end
@ -172,4 +174,6 @@ RBA::Class::each_class do |cls|
end
if $output
output.close
end

View File

@ -0,0 +1,94 @@
#!/bin/bash -e
qt=()
for qm in qmake qmake4 qmake5 qmake6; do
if sh -c "$qm -v" 2>/dev/null >/dev/null; then
qt_version=$($qm -v | grep 'Qt version' | sed 's/.*Qt version *\([0-9]\)\..*/\1/')
if [ "$qt_version" != "" ]; then
echo "Found qmake for Qt$qt_version: $qm"
qt[$qt_version]=$qm
fi
fi
done
qmake=qmake
inst_dir_common=$(pwd)/scripts/mkqtdecl_common
inst_dir4=$(pwd)/scripts/mkqtdecl4
inst_dir5=$(pwd)/scripts/mkqtdecl5
inst_dir6=$(pwd)/scripts/mkqtdecl6
inst_dir=$inst_dir4
work_dir="mkqtdecl.tmp"
while [ "$1" != "" ]; do
a="$1"
shift
case "$a" in
-h)
echo "Update event and property tables"
echo "Usage:"
echo " mkqtdecl_update_tables.sh Update tables for Qt4"
echo " mkqtdecl_update_tables.sh -qt5 Update tables for Qt5"
echo " mkqtdecl_update_tables.sh -qt6 Update tables for Qt6"
echo " mkqtdecl_update_tables.sh -qt <qmake-path> Update tables for specific Qt installation"
exit 0
;;
-qt)
qmake="$1"
shift
;;
-qt5)
qmake="${qt[5]}"
if [ "$qmake" == "" ]; then
echo "*** ERROR: Could not find qmake for Qt5"
exit 1
fi
work_dir="mkqtdecl5.tmp"
inst_dir="$inst_dir5"
;;
-qt6)
qmake="${qt[6]}"
if [ "$qmake" == "" ]; then
echo "*** ERROR: Could not find qmake for Qt6"
exit 1
fi
work_dir="mkqtdecl6.tmp"
inst_dir="$inst_dir6"
;;
*)
echo "*** ERROR: unknown command option $a"
exit 1
;;
esac
done
if ! [ -e build.sh ]; then
echo "*** ERROR: could not find build script in current directy - did you start this script from top level?"
exit 1
fi
mkdir -p $work_dir
bin=$work_dir/bin-update-tables
build=$work_dir/build-update-tables
log=$work_dir/build-update-table.log
echo "Building in $build (log in $log) .."
./build.sh -qmake $qmake -nopython -j8 -release -prefix $(pwd)/$bin -bin $bin -build $build >$log 2>&1
echo "Extracting tables .."
export LD_LIBRARY_PATH=$bin
echo "[1] for properties .."
$bin/klayout -b -r $inst_dir_common/mkqtdecl_extract_props.rb -rd output=$inst_dir/mkqtdecl.properties
echo "[2] for signals .."
$bin/klayout -b -r $inst_dir_common/mkqtdecl_extract_signals.rb -rd output=$inst_dir/mkqtdecl.events
echo "Done."

View File

@ -155,15 +155,19 @@ TARGET="linux-release"
mkdir -p %{buildroot}%{_libdir}/klayout
mkdir -p %{buildroot}%{_libdir}/klayout/db_plugins
mkdir -p %{buildroot}%{_libdir}/klayout/lay_plugins
mkdir -p %{buildroot}%{_libdir}/klayout/pymod
cp -pd %{_builddir}/bin.$TARGET/lib*.so* %{buildroot}%{_libdir}/klayout
cp -pd %{_builddir}/bin.$TARGET/db_plugins/lib*.so* %{buildroot}%{_libdir}/klayout/db_plugins
cp -pd %{_builddir}/bin.$TARGET/lay_plugins/lib*.so* %{buildroot}%{_libdir}/klayout/lay_plugins
cp -rpd %{_builddir}/bin.$TARGET/pymod/* %{buildroot}%{_libdir}/klayout/pymod
%if %{defined copylibs}
cp -pd %{copylibs} %{buildroot}%{_libdir}/klayout
%endif
chmod 644 %{buildroot}%{_libdir}/klayout/*.so*
chmod 644 %{buildroot}%{_libdir}/klayout/db_plugins/*.so*
chmod 644 %{buildroot}%{_libdir}/klayout/lay_plugins/*.so*
find %{buildroot}%{_libdir}/klayout/pymod -type f -exec chmod 644 {} +
find %{buildroot}%{_libdir}/klayout/pymod -type d -exec chmod 755 {} +
# create and populate bindir
mkdir -p %{buildroot}%{_bindir}

View File

@ -941,6 +941,42 @@ lay = Extension(config.root + '.laycore',
extra_compile_args=config.compile_args('laycore'),
sources=list(lay_sources))
# ------------------------------------------------------------------
# pya extension library (all inclusive, basis of pya module)
pyacore_path = os.path.join("src", "pymod", "pya")
pyacore_sources = set(glob.glob(os.path.join(pyacore_path, "*.cc")))
pya = Extension(config.root + '.pyacore',
define_macros=config.macros(),
include_dirs=[_laybasic_path,
_layview_path,
_lib_path,
_db_path,
_rdb_path,
_img_path,
_ant_path,
_edt_path,
_lym_path,
_tl_path,
_gsi_path,
_pya_path],
extra_objects=[config.path_of('_laybasic', _laybasic_path),
config.path_of('_layview', _layview_path),
config.path_of('_lib', _lib_path),
config.path_of('_db', _db_path),
config.path_of('_rdb', _rdb_path),
config.path_of('_img', _img_path),
config.path_of('_ant', _ant_path),
config.path_of('_edt', _edt_path),
config.path_of('_lym', _lym_path),
config.path_of('_tl', _tl_path),
config.path_of('_gsi', _gsi_path),
config.path_of('_pya', _pya_path)],
extra_link_args=config.link_args('pyacore'),
extra_compile_args=config.compile_args('pyacore'),
sources=list(pyacore_sources))
# ------------------------------------------------------------------
# Core setup function
@ -977,6 +1013,6 @@ if __name__ == "__main__":
include_package_data=True,
ext_modules=[_tl, _gsi, _pya, _rba, _db, _lib, _rdb, _lym, _laybasic, _layview, _ant, _edt, _img]
+ db_plugins
+ [tl, db, lib, rdb, lay],
+ [tl, db, lib, rdb, lay, pya],
cmdclass={'build_ext': klayout_build_ext}
)

View File

@ -431,7 +431,7 @@ public:
// .. nothing yet ..
}
void execute (const tl::ExpressionParserContext &context, tl::Variant &out, const std::vector <tl::Variant> &vv) const
void execute (const tl::ExpressionParserContext &context, tl::Variant &out, const std::vector <tl::Variant> &vv, const std::map<std::string, tl::Variant> * /*kwargs*/) const
{
if (vv.size () != 0) {
throw tl::EvalError (tl::to_string (tr ("Annotation function must not have arguments")), context);

View File

@ -8,6 +8,10 @@
<doc>@class [db] PCellDeclarationHelper &lt; PCellDeclaration
@brief A helper class to simplify the declaration of a PCell (Python version)
NOTE: in the following, "pya" can be replaced by "klayout.db" which is
the canonical module and the preferred way of addressing the
external Python library.
This class provides adds some convenience to the PCell declaration based
on PCellDeclaration. PCellDeclaration is a C++ object which is less
convenient to use than a Ruby-based approach. In particular this class
@ -252,318 +256,7 @@ This method must return a \\Trans object. The default implementation returns a u
<interpreter>python</interpreter>
<dsl-interpreter-name/>
<text>
import pya
class _PCellDeclarationHelperLayerDescriptor(object):
"""
A descriptor object which translates the PCell parameters into class attributes
"""
def __init__(self, param_index):
self.param_index = param_index
def __get__(self, obj, type = None):
return obj._layers[self.param_index]
def __set__(self, obj, value):
raise AttributeError("can't change layer attribute")
class _PCellDeclarationHelperParameterDescriptor(object):
"""
A descriptor object which translates the PCell parameters into class attributes
In some cases (i.e. can_convert_from_shape), these placeholders are not
connected to real parameters (obj._param_values is None). In this case,
the descriptor acts as a value holder (self.value)
"""
def __init__(self, param_index, param_name):
self.param_index = param_index
self.param_name = param_name
self.value = None
def __get__(self, obj, type = None):
if obj._param_values:
return obj._param_values[self.param_index]
elif obj._param_states:
return obj._param_states.parameter(self.param_name)
else:
return self.value
def __set__(self, obj, value):
if obj._param_values:
obj._param_values[self.param_index] = value
else:
self.value = value
class _PCellDeclarationHelper(pya.PCellDeclaration):
"""
A helper class that somewhat simplifies the implementation
of a PCell
"""
def __init__(self):
"""
initialize this instance
"""
# "private" attributes
self._param_decls = []
self._param_values = None
self._param_states = None
self._layer_param_index = []
self._layers = []
# public attributes
self.layout = None
self.shape = None
self.layer = None
self.cell = None
def param(self, name, value_type, description, hidden = False, readonly = False, unit = None, default = None, choices = None):
"""
Defines a parameter
name -&gt; the short name of the parameter
type -&gt; the type of the parameter
description -&gt; the description text
named parameters
hidden -&gt; (boolean) true, if the parameter is not shown in the dialog
readonly -&gt; (boolean) true, if the parameter cannot be edited
unit -&gt; the unit string
default -&gt; the default value
choices -&gt; ([ [ d, v ], ...) choice descriptions/value for choice type
this method defines accessor methods for the parameters
{name} -&gt; read accessor
set_{name} -&gt; write accessor ({name}= does not work because the
Ruby confuses that method with variables)
{name}_layer -&gt; read accessor for the layer index for TypeLayer parameters
"""
# create accessor methods for the parameters
param_index = len(self._param_decls)
setattr(type(self), name, _PCellDeclarationHelperParameterDescriptor(param_index, name))
if value_type == type(self).TypeLayer:
setattr(type(self), name + "_layer", _PCellDeclarationHelperLayerDescriptor(len(self._layer_param_index)))
self._layer_param_index.append(param_index)
# store the parameter declarations
pdecl = pya.PCellParameterDeclaration(name, value_type, description)
self._param_decls.append(pdecl)
# set additional attributes of the parameters
pdecl.hidden = hidden
pdecl.readonly = readonly
if not (default is None):
pdecl.default = default
if not (unit is None):
pdecl.unit = unit
if not (choices is None):
if not isinstance(choices, list) and not isinstance(choices, tuple):
raise TypeError("choices value must be an list/tuple of two-element arrays (description, value)")
for c in choices:
if (not isinstance(choices, list) and not isinstance(choices, tuple)) or len(c) != 2:
raise TypeError("choices value must be an list/tuple of two-element arrays (description, value)")
pdecl.add_choice(c[0],c[1])
# return the declaration object for further operations
return pdecl
def display_text(self, parameters):
"""
implementation of display_text
"""
self._param_values = parameters
try:
text = self.display_text_impl()
finally:
self._param_values = None
return text
def get_parameters(self):
"""
gets the parameters
"""
return self._param_decls
def get_values(self):
"""
gets the temporary parameter values
"""
v = self._param_values
self._param_values = None
return v
def init_values(self, values = None, layers = None, states = None):
"""
initializes the temporary parameter values
"values" are the original values. If "None" is given, the
default values will be used.
"layers" are the layer indexes corresponding to the layer
parameters.
"""
self._param_values = None
self._param_states = None
if states:
self._param_states = states
elif not values:
self._param_values = []
for pd in self._param_decls:
self._param_values.append(pd.default)
else:
self._param_values = values
self._layers = layers
def finish(self):
"""
Needs to be called at the end of an implementation
"""
self._param_values = None
self._param_states = None
self._layers = None
self._cell = None
self._layout = None
self._layer = None
self._shape = None
def get_layers(self, parameters):
"""
gets the layer definitions
"""
layers = []
for i in self._layer_param_index:
if parameters[i] is not None:
layers.append(parameters[i])
else:
layers.append(pya.LayerInfo())
return layers
def callback(self, layout, name, states):
"""
callback (change state on parameter change)
"""
self.init_values(states = states)
self.layout = layout
try:
self.callback_impl(name)
finally:
self.finish()
def coerce_parameters(self, layout, parameters):
"""
coerce parameters (make consistent)
"""
self.init_values(parameters)
self.layout = layout
try:
self.coerce_parameters_impl()
parameters = self.get_values()
finally:
self.finish()
return parameters
def produce(self, layout, layers, parameters, cell):
"""
coerce parameters (make consistent)
"""
self.init_values(parameters, layers)
self.cell = cell
self.layout = layout
try:
self.produce_impl()
finally:
self.finish()
def can_create_from_shape(self, layout, shape, layer):
"""
produce a helper for can_create_from_shape
"""
self.layout = layout
self.shape = shape
self.layer = layer
try:
ret = self.can_create_from_shape_impl()
finally:
self.finish()
return ret
def transformation_from_shape(self, layout, shape, layer):
"""
produce a helper for parameters_from_shape
"""
self.layout = layout
self.shape = shape
self.layer = layer
try:
t = self.transformation_from_shape_impl()
finally:
self.finish()
return t
def parameters_from_shape(self, layout, shape, layer):
"""
produce a helper for parameters_from_shape
with this helper, the implementation can use the parameter setters
"""
self.init_values()
self.layout = layout
self.shape = shape
self.layer = layer
try:
self.parameters_from_shape_impl()
param = self.get_values()
finally:
self.finish()
return param
def display_text_impl(self):
"""
default implementation
"""
return ""
def coerce_parameters_impl(self):
"""
default implementation
"""
pass
def callback_impl(self, name):
"""
default implementation
"""
pass
def produce_impl(self):
"""
default implementation
"""
pass
def can_create_from_shape_impl(self):
"""
default implementation
"""
return False
def parameters_from_shape_impl(self):
"""
default implementation
"""
pass
def transformation_from_shape_impl(self):
"""
default implementation
"""
return pya.Trans()
# import the Type... constants from PCellParameterDeclaration
for k in dir(pya.PCellParameterDeclaration):
if k.startswith("Type"):
setattr(_PCellDeclarationHelper, k, getattr(pya.PCellParameterDeclaration, k))
# Inject the PCellDeclarationHelper into pya module for consistency:
setattr(pya, "PCellDeclarationHelper", _PCellDeclarationHelper)
pya.__all__.append("PCellDeclarationHelper")
# No code provided here. This macro is supplied to provide the documentation.
# The basic code is located in klayout.db.pcell_declaration_helper now.
</text>
</klayout-macro>

View File

@ -96,6 +96,8 @@ SOURCES = \
dbTextWriter.cc \
dbTilingProcessor.cc \
dbTrans.cc \
dbTriangle.cc \
dbTriangles.cc \
dbUserObject.cc \
dbUtils.cc \
dbVector.cc \
@ -322,6 +324,8 @@ HEADERS = \
dbTextWriter.h \
dbTilingProcessor.h \
dbTrans.h \
dbTriangle.h \
dbTriangles.h \
dbTypes.h \
dbUserObject.h \
dbUtils.h \

View File

@ -2194,7 +2194,7 @@ public:
// .. nothing yet ..
}
void execute (const tl::ExpressionParserContext &context, tl::Variant &out, const std::vector<tl::Variant> &args) const
void execute (const tl::ExpressionParserContext &context, tl::Variant &out, const std::vector<tl::Variant> &args, const std::map<std::string, tl::Variant> * /*kwargs*/) const
{
if (args.size () > 0) {
throw tl::EvalError (tl::to_string (tr ("Query function does not allow parameters")), context);

View File

@ -133,7 +133,7 @@ namespace db
args.push_back (value);
}
tl::ExpressionParserContext context;
ref.user_cls ()->eval_cls ()->execute (context, out, ref, m, args);
ref.user_cls ()->eval_cls ()->execute (context, out, ref, m, args, 0);
ref = out;
@ -160,7 +160,7 @@ namespace db
std::vector<tl::Variant> args;
tl::ExpressionParserContext context;
ref.user_cls ()->eval_cls ()->execute (context, out, ref, m, args);
ref.user_cls ()->eval_cls ()->execute (context, out, ref, m, args, 0);
ref = out;

View File

@ -579,8 +579,8 @@ Path round_path_corners (const Path &path, int rad, int n)
return Path (round_path_corners (db::DPath (path), double (rad), n, 0.5));
}
template class DB_PUBLIC path<Coord>;
template class DB_PUBLIC path<DCoord>;
template class path<Coord>;
template class path<DCoord>;
// explicit instantiations
template DB_PUBLIC void path<Coord>::create_shifted_points (Coord, Coord, Coord, bool, path<Coord>::pointlist_type::iterator, path<Coord>::pointlist_type::iterator, int, box_inserter<path<Coord>::box_type>) const;

View File

@ -22,6 +22,7 @@
#include "dbPoint.h"
#include "dbVector.h"
// ----------------------------------------------------------------
// Implementation of the custom extractors
@ -55,6 +56,15 @@ namespace {
}
namespace db
{
// instantiations
template class point<Coord>;
template class point<DCoord>;
}
namespace tl
{

View File

@ -47,7 +47,7 @@ class ArrayRepository;
*/
template <class C>
class DB_PUBLIC_TEMPLATE point
class DB_PUBLIC point
{
public:
typedef C coord_type;
@ -131,27 +131,48 @@ public:
/**
* @brief Add to operation
*/
point<C> &operator+= (const vector<C> &v);
point<C> &operator+= (const vector<C> &v)
{
m_x += v.x ();
m_y += v.y ();
return *this;
}
/**
* @brief method version of operator+ (mainly for automation purposes)
*/
point<C> add (const vector<C> &v) const;
point<C> add (const vector<C> &v) const
{
point<C> r (*this);
r += v;
return r;
}
/**
* @brief Subtract from operation
*/
point<C> &operator-= (const vector<C> &v);
point<C> &operator-= (const vector<C> &v)
{
m_x -= v.x ();
m_y -= v.y ();
return *this;
}
/**
* @brief method version of operator- (mainly for automation purposes)
*/
point<C> subtract (const vector<C> &v) const;
point<C> subtract (const vector<C> &v) const
{
return *this - v;
}
/**
* @brief method version of operator- (mainly for automation purposes)
*/
vector<C> subtract (const point<C> &p) const;
vector<C> subtract (const point<C> &p) const
{
return *this - p;
}
/**
* @brief "less" comparison operator
@ -159,17 +180,26 @@ public:
* This operator is provided to establish a sorting
* order
*/
bool operator< (const point<C> &p) const;
bool operator< (const point<C> &p) const
{
return m_y < p.m_y || (m_y == p.m_y && m_x < p.m_x);
}
/**
* @brief Equality test operator
*/
bool operator== (const point<C> &p) const;
bool operator== (const point<C> &p) const
{
return m_x == p.m_x && m_y == p.m_y;
}
/**
* @brief Inequality test operator
*/
bool operator!= (const point<C> &p) const;
bool operator!= (const point<C> &p) const
{
return !operator== (p);
}
/**
* @brief Const transform
@ -181,7 +211,10 @@ public:
* @return The transformed point
*/
template <class Tr>
point<typename Tr::target_coord_type> transformed (const Tr &t) const;
point<typename Tr::target_coord_type> transformed (const Tr &t) const
{
return t (*this);
}
/**
* @brief In-place transformation
@ -193,27 +226,43 @@ public:
* @return The transformed point
*/
template <class Tr>
point &transform (const Tr &t);
point &transform (const Tr &t)
{
*this = t (*this);
return *this;
}
/**
* @brief Accessor to the x coordinate
*/
C x () const;
C x () const
{
return m_x;
}
/**
* @brief Accessor to the y coordinate
*/
C y () const;
C y () const
{
return m_y;
}
/**
* @brief Write accessor to the x coordinate
*/
void set_x (C _x);
void set_x (C _x)
{
m_x = _x;
}
/**
* @brief Write accessor to the y coordinate
*/
void set_y (C _y);
void set_y (C _y)
{
m_y = _y;
}
/**
* @brief Scaling self by some factor
@ -221,12 +270,22 @@ public:
* Scaling involves rounding which in our case is simply handled
* with the coord_traits scheme.
*/
point<C> &operator*= (double s);
point<C> &operator*= (double s)
{
m_x = coord_traits::rounded (m_x * s);
m_y = coord_traits::rounded (m_y * s);
return *this;
}
/**
* @brief Scaling self by some integer factor
*/
point<C> &operator*= (long s);
point<C> &operator*= (long s)
{
m_x = coord_traits::rounded (m_x * s);
m_y = coord_traits::rounded (m_y * s);
return *this;
}
/**
* @brief Division by some divisor.
@ -235,62 +294,114 @@ public:
* with the coord_traits scheme.
*/
point<C> &operator/= (double s);
point<C> &operator/= (double s)
{
double mult = 1.0 / static_cast<double>(s);
*this *= mult;
return *this;
}
/**
* @brief Dividing self by some integer divisor
*/
point<C> &operator/= (long s);
point<C> &operator/= (long s)
{
double mult = 1.0 / static_cast<double>(s);
*this *= mult;
return *this;
}
/**
* @brief The euclidian distance to another point
*
* @param d The other to compute the distance to.
*/
distance_type distance (const point<C> &p) const;
distance_type distance (const point<C> &p) const
{
double ddx (p.x ());
double ddy (p.y ());
ddx -= double (x ());
ddy -= double (y ());
return coord_traits::rounded_distance (sqrt (ddx * ddx + ddy * ddy));
}
/**
* @brief The euclidian distance of the point to (0,0)
*/
distance_type distance () const;
distance_type distance () const
{
double ddx (x ());
double ddy (y ());
return coord_traits::rounded_distance (sqrt (ddx * ddx + ddy * ddy));
}
/**
* @brief The euclidian distance to another point as double value
*
* @param d The other to compute the distance to.
*/
double double_distance (const point<C> &p) const;
double double_distance (const point<C> &p) const
{
double ddx (p.x ());
double ddy (p.y ());
ddx -= double (x ());
ddy -= double (y ());
return sqrt (ddx * ddx + ddy * ddy);
}
/**
* @brief The euclidian distance of the point to (0,0) as double value
*/
double double_distance () const;
double double_distance () const
{
double ddx (x ());
double ddy (y ());
return sqrt (ddx * ddx + ddy * ddy);
}
/**
* @brief The square euclidian distance to another point
*
* @param d The other to compute the distance to.
*/
area_type sq_distance (const point<C> &p) const;
area_type sq_distance (const point<C> &p) const
{
return coord_traits::sq_length (p.x (), p.y (), x (), y ());
}
/**
* @brief The square euclidian distance to point (0,0)
*
* @param d The other to compute the distance to.
*/
area_type sq_distance () const;
area_type sq_distance () const
{
return coord_traits::sq_length (0, 0, x (), y ());
}
/**
* @brief The square of the euclidian distance to another point as double value
*
* @param d The other to compute the distance to.
*/
double sq_double_distance (const point<C> &p) const;
double sq_double_distance (const point<C> &p) const
{
double ddx (p.x ());
double ddy (p.y ());
ddx -= double (x ());
ddy -= double (y ());
return ddx * ddx + ddy * ddy;
}
/**
* @brief The square of the euclidian distance of the point to (0,0) as double value
*/
double sq_double_distance () const;
double sq_double_distance () const
{
double ddx (x ());
double ddy (y ());
return ddx * ddx + ddy * ddy;
}
/**
* @brief String conversion
@ -313,7 +424,10 @@ public:
/**
* @brief Fuzzy comparison of points
*/
bool equal (const point<C> &p) const;
bool equal (const point<C> &p) const
{
return coord_traits::equal (x (), p.x ()) && coord_traits::equal (y (), p.y ());
}
/**
* @brief Fuzzy comparison of points for inequality
@ -326,7 +440,16 @@ public:
/**
* @brief Fuzzy "less" comparison of points
*/
bool less (const point<C> &p) const;
bool less (const point<C> &p) const
{
if (! coord_traits::equal (y (), p.y ())) {
return y () < p.y ();
}
if (! coord_traits::equal (x (), p.x ())) {
return x () < p.x ();
}
return false;
}
/**
* @brief The (dummy) translation operator
@ -350,131 +473,6 @@ private:
C m_x, m_y;
};
template <class C>
inline point<C> &
point<C>::operator+= (const vector<C> &v)
{
m_x += v.x ();
m_y += v.y ();
return *this;
}
template <class C>
inline point<C>
point<C>::add (const vector<C> &v) const
{
point<C> r (*this);
r += v;
return r;
}
template <class C>
inline point<C> &
point<C>::operator-= (const vector<C> &v)
{
m_x -= v.x ();
m_y -= v.y ();
return *this;
}
template <class C>
inline point<C>
point<C>::subtract (const vector<C> &v) const
{
return *this - v;
}
template <class C>
inline vector<C>
point<C>::subtract (const point<C> &p) const
{
return *this - p;
}
template <class C>
inline bool
point<C>::operator< (const point<C> &p) const
{
return m_y < p.m_y || (m_y == p.m_y && m_x < p.m_x);
}
template <class C>
inline bool
point<C>::less (const point<C> &p) const
{
if (! coord_traits::equal (y (), p.y ())) {
return y () < p.y ();
}
if (! coord_traits::equal (x (), p.x ())) {
return x () < p.x ();
}
return false;
}
template <class C>
inline bool
point<C>::operator== (const point<C> &p) const
{
return m_x == p.m_x && m_y == p.m_y;
}
template <class C>
inline bool
point<C>::equal (const point<C> &p) const
{
return coord_traits::equal (x (), p.x ()) && coord_traits::equal (y (), p.y ());
}
template <class C>
inline bool
point<C>::operator!= (const point<C> &p) const
{
return !operator== (p);
}
template <class C> template <class Tr>
inline point<typename Tr::target_coord_type>
point<C>::transformed (const Tr &t) const
{
return t (*this);
}
template <class C> template <class Tr>
inline point<C> &
point<C>::transform (const Tr &t)
{
*this = t (*this);
return *this;
}
template <class C>
inline C
point<C>::x () const
{
return m_x;
}
template <class C>
inline C
point<C>::y () const
{
return m_y;
}
template <class C>
inline void
point<C>::set_x (C _x)
{
m_x = _x;
}
template <class C>
inline void
point<C>::set_y (C _y)
{
m_y = _y;
}
template <class C>
inline point<double>
operator* (const db::point<C> &p, double s)
@ -518,116 +516,6 @@ operator/ (const db::point<C> &p, Number s)
return point<C> (p.x () * mult, p.y () * mult);
}
template <class C>
inline point<C> &
point<C>::operator/= (double s)
{
double mult = 1.0 / static_cast<double>(s);
*this *= mult;
return *this;
}
template <class C>
inline point<C> &
point<C>::operator/= (long s)
{
double mult = 1.0 / static_cast<double>(s);
*this *= mult;
return *this;
}
template <class C>
inline point<C> &
point<C>::operator*= (double s)
{
m_x = coord_traits::rounded (m_x * s);
m_y = coord_traits::rounded (m_y * s);
return *this;
}
template <class C>
inline point<C> &
point<C>::operator*= (long s)
{
m_x = coord_traits::rounded (m_x * s);
m_y = coord_traits::rounded (m_y * s);
return *this;
}
template <class C>
inline typename point<C>::distance_type
point<C>::distance (const point<C> &p) const
{
double ddx (p.x ());
double ddy (p.y ());
ddx -= double (x ());
ddy -= double (y ());
return coord_traits::rounded_distance (sqrt (ddx * ddx + ddy * ddy));
}
template <class C>
inline typename point<C>::distance_type
point<C>::distance () const
{
double ddx (x ());
double ddy (y ());
return coord_traits::rounded_distance (sqrt (ddx * ddx + ddy * ddy));
}
template <class C>
inline double
point<C>::double_distance (const point<C> &p) const
{
double ddx (p.x ());
double ddy (p.y ());
ddx -= double (x ());
ddy -= double (y ());
return sqrt (ddx * ddx + ddy * ddy);
}
template <class C>
inline double
point<C>::double_distance () const
{
double ddx (x ());
double ddy (y ());
return sqrt (ddx * ddx + ddy * ddy);
}
template <class C>
inline typename point<C>::area_type
point<C>::sq_distance (const point<C> &p) const
{
return coord_traits::sq_length (p.x (), p.y (), x (), y ());
}
template <class C>
inline typename point<C>::area_type
point<C>::sq_distance () const
{
return coord_traits::sq_length (0, 0, x (), y ());
}
template <class C>
inline double
point<C>::sq_double_distance (const point<C> &p) const
{
double ddx (p.x ());
double ddy (p.y ());
ddx -= double (x ());
ddy -= double (y ());
return ddx * ddx + ddy * ddy;
}
template <class C>
inline double
point <C>::sq_double_distance () const
{
double ddx (x ());
double ddy (y ());
return ddx * ddx + ddy * ddy;
}
/**
* @brief The binary + operator (addition point and vector)
*

View File

@ -217,4 +217,39 @@ bool PolygonSizer::result_is_merged () const
return (m_dx < 0 && m_dy < 0);
}
// -----------------------------------------------------------------------------------
// TriangulationProcessor implementation
// some typical value to translate the values into "order of 1"
const double triangulation_dbu = 0.001;
TriangulationProcessor::TriangulationProcessor (double max_area, double min_b)
{
m_param.max_area = max_area * triangulation_dbu * triangulation_dbu;
m_param.base_verbosity = 40;
m_param.min_length = 2 * triangulation_dbu;
m_param.min_b = min_b;
}
void
TriangulationProcessor::process (const db::Polygon &poly, std::vector<db::Polygon> &result) const
{
// NOTE: we center the polygon for better numerical stability
db::CplxTrans trans = db::CplxTrans (triangulation_dbu) * db::ICplxTrans (db::Trans (db::Point () - poly.box ().center ()));
db::Triangles tri;
tri.triangulate (poly, m_param, trans);
db::Point pts [3];
auto trans_inv = trans.inverted ();
for (auto t = tri.begin (); t != tri.end (); ++t) {
for (int i = 0; i < 3; ++i) {
pts [i] = trans_inv * *t->vertex (i);
}
result.push_back (db::Polygon ());
result.back ().assign_hull (pts + 0, pts + 3);
}
}
}

View File

@ -28,6 +28,7 @@
#include "dbRegionDelegate.h"
#include "dbPolygonTools.h"
#include "dbEdgesUtils.h"
#include "dbTriangles.h"
namespace db
{
@ -406,6 +407,28 @@ private:
unsigned int m_mode;
};
/**
* @brief A triangulation processor
*/
class DB_PUBLIC TriangulationProcessor
: public db::PolygonProcessorBase
{
public:
TriangulationProcessor (double max_area = 0.0, double min_b = 1.0);
void process (const db::Polygon &poly, std::vector<db::Polygon> &result) const;
virtual const TransformationReducer *vars () const { return &m_vars; }
virtual bool result_is_merged () const { return false; }
virtual bool result_must_not_be_merged () const { return false; }
virtual bool requires_raw_input () const { return false; }
virtual bool wants_variants () const { return true; }
private:
db::Triangles::TriangulateParameters m_param;
db::MagnificationReducer m_vars;
};
/**
* @brief Computes the Minkowski sum between the polygons and the given object
* The object can be Edge, Polygon, Box and std::vector<Point>

View File

@ -138,7 +138,7 @@ SaveLayoutOptions::set_option_by_name (const std::string &method, const tl::Vari
tl::Variant out;
std::vector<tl::Variant> args;
args.push_back (value);
eval_cls->execute (context, out, options_ref, method + "=", args);
eval_cls->execute (context, out, options_ref, method + "=", args, 0);
}
tl::Variant
@ -151,7 +151,7 @@ SaveLayoutOptions::get_option_by_name (const std::string &method)
tl::Variant out;
std::vector<tl::Variant> args;
eval_cls->execute (context, out, options_ref, method, args);
eval_cls->execute (context, out, options_ref, method, args, 0);
return out;
}

View File

@ -121,8 +121,8 @@ std::string text<C>::to_string (double dbu) const
return s;
}
template class DB_PUBLIC text<Coord>;
template class DB_PUBLIC text<DCoord>;
template class text<Coord>;
template class text<DCoord>;
}

View File

@ -487,7 +487,7 @@ public:
// .. nothing yet ..
}
void execute (const tl::ExpressionParserContext & /*context*/, tl::Variant &out, const std::vector<tl::Variant> &args) const
void execute (const tl::ExpressionParserContext & /*context*/, tl::Variant &out, const std::vector<tl::Variant> &args, const std::map<std::string, tl::Variant> * /*kwargs*/) const
{
out = mp_proc->receiver (args);
}
@ -506,7 +506,7 @@ public:
// .. nothing yet ..
}
void execute (const tl::ExpressionParserContext & /*context*/, tl::Variant & /*out*/, const std::vector<tl::Variant> &args) const
void execute (const tl::ExpressionParserContext & /*context*/, tl::Variant & /*out*/, const std::vector<tl::Variant> &args, const std::map<std::string, tl::Variant> * /*kwargs*/) const
{
mp_proc->put (m_ix, m_iy, m_tile_box, args);
}
@ -526,7 +526,7 @@ public:
// .. nothing yet ..
}
void execute (const tl::ExpressionParserContext & /*context*/, tl::Variant & /*out*/, const std::vector<tl::Variant> & /*args*/) const
void execute (const tl::ExpressionParserContext & /*context*/, tl::Variant & /*out*/, const std::vector<tl::Variant> & /*args*/, const std::map<std::string, tl::Variant> * /*kwargs*/) const
{
// TODO: ... implement ..
}

566
src/db/db/dbTriangle.cc Normal file
View File

@ -0,0 +1,566 @@
/*
KLayout Layout Viewer
Copyright (C) 2006-2024 Matthias Koefferlein
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "dbTriangle.h"
#include <set>
namespace db
{
// -------------------------------------------------------------------------------------
// Vertex implementation
Vertex::Vertex ()
: DPoint (), m_level (0)
{
// .. nothing yet ..
}
Vertex::Vertex (const db::DPoint &p)
: DPoint (p), m_level (0)
{
// .. nothing yet ..
}
Vertex::Vertex (const Vertex &v)
: DPoint (), m_level (0)
{
operator= (v);
}
Vertex &Vertex::operator= (const Vertex &v)
{
if (this != &v) {
// NOTE: edges are not copied!
db::DPoint::operator= (v);
m_level = v.m_level;
}
return *this;
}
Vertex::Vertex (db::DCoord x, db::DCoord y)
: DPoint (x, y), m_level (0)
{
// .. nothing yet ..
}
bool
Vertex::is_outside () const
{
for (auto e = mp_edges.begin (); e != mp_edges.end (); ++e) {
if ((*e)->is_outside ()) {
return true;
}
}
return false;
}
std::vector<db::Triangle *>
Vertex::triangles () const
{
std::set<db::Triangle *> seen;
std::vector<db::Triangle *> res;
for (auto e = mp_edges.begin (); e != mp_edges.end (); ++e) {
for (auto t = (*e)->begin_triangles (); t != (*e)->end_triangles (); ++t) {
if (seen.insert (t.operator-> ()).second) {
res.push_back (t.operator-> ());
}
}
}
return res;
}
bool
Vertex::has_edge (const TriangleEdge *edge) const
{
for (auto e = mp_edges.begin (); e != mp_edges.end (); ++e) {
if (*e == edge) {
return true;
}
}
return false;
}
size_t
Vertex::num_edges (int max_count) const
{
if (max_count < 0) {
// NOTE: this can be slow for a std::list, so we have max_count to limit this effort
return mp_edges.size ();
} else {
size_t n = 0;
for (auto i = mp_edges.begin (); i != mp_edges.end () && --max_count >= 0; ++i) {
++n;
}
return n;
}
}
std::string
Vertex::to_string (bool with_id) const
{
std::string res = tl::sprintf ("(%.12g, %.12g)", x (), y());
if (with_id) {
res += tl::sprintf ("[%x]", (size_t)this);
}
return res;
}
int
Vertex::in_circle (const DPoint &point, const DPoint &center, double radius)
{
double dx = point.x () - center.x ();
double dy = point.y () - center.y ();
double d2 = dx * dx + dy * dy;
double r2 = radius * radius;
double delta = fabs (d2 + r2) * db::epsilon;
if (d2 < r2 - delta) {
return 1;
} else if (d2 < r2 + delta) {
return 0;
} else {
return -1;
}
}
// -------------------------------------------------------------------------------------
// TriangleEdge implementation
TriangleEdge::TriangleEdge ()
: mp_v1 (0), mp_v2 (0), mp_left (), mp_right (), m_level (0), m_id (0), m_is_segment (false)
{
// .. nothing yet ..
}
TriangleEdge::TriangleEdge (Vertex *v1, Vertex *v2)
: mp_v1 (v1), mp_v2 (v2), mp_left (), mp_right (), m_level (0), m_id (0), m_is_segment (false)
{
// .. nothing yet ..
}
void
TriangleEdge::set_left (Triangle *t)
{
mp_left = t;
}
void
TriangleEdge::set_right (Triangle *t)
{
mp_right = t;
}
void
TriangleEdge::link ()
{
mp_v1->mp_edges.push_back (this);
m_ec_v1 = --mp_v1->mp_edges.end ();
mp_v2->mp_edges.push_back (this);
m_ec_v2 = --mp_v2->mp_edges.end ();
}
void
TriangleEdge::unlink ()
{
if (mp_v1) {
mp_v1->remove_edge (m_ec_v1);
}
if (mp_v2) {
mp_v2->remove_edge (m_ec_v2);
}
mp_v1 = mp_v2 = 0;
}
Triangle *
TriangleEdge::other (const Triangle *t) const
{
if (t == mp_left) {
return mp_right;
}
if (t == mp_right) {
return mp_left;
}
tl_assert (false);
return 0;
}
Vertex *
TriangleEdge::other (const Vertex *t) const
{
if (t == mp_v1) {
return mp_v2;
}
if (t == mp_v2) {
return mp_v1;
}
tl_assert (false);
return 0;
}
bool
TriangleEdge::has_vertex (const Vertex *v) const
{
return mp_v1 == v || mp_v2 == v;
}
Vertex *
TriangleEdge::common_vertex (const TriangleEdge *other) const
{
if (has_vertex (other->v1 ())) {
return (other->v1 ());
}
if (has_vertex (other->v2 ())) {
return (other->v2 ());
}
return 0;
}
std::string
TriangleEdge::to_string (bool with_id) const
{
std::string res = std::string ("(") + mp_v1->to_string (with_id) + ", " + mp_v2->to_string (with_id) + ")";
if (with_id) {
res += tl::sprintf ("[%x]", (size_t)this);
}
return res;
}
double
TriangleEdge::distance (const db::DEdge &e, const db::DPoint &p)
{
double l = db::sprod (p - e.p1 (), e.d ()) / e.d ().sq_length ();
db::DPoint pp;
if (l <= 0.0) {
pp = e.p1 ();
} else if (l >= 1.0) {
pp = e.p2 ();
} else {
pp = e.p1 () + e.d () * l;
}
return (p - pp).length ();
}
bool
TriangleEdge::crosses (const db::DEdge &e, const db::DEdge &other)
{
return e.side_of (other.p1 ()) * e.side_of (other.p2 ()) < 0 &&
other.side_of (e.p1 ()) * other.side_of (e.p2 ()) < 0;
}
bool
TriangleEdge::crosses_including (const db::DEdge &e, const db::DEdge &other)
{
return e.side_of (other.p1 ()) * e.side_of (other.p2 ()) <= 0 &&
other.side_of (e.p1 ()) * other.side_of (e.p2 ()) <= 0;
}
db::DPoint
TriangleEdge::intersection_point (const db::DEdge &e, const db::DEdge &other)
{
return e.intersect_point (other).second;
}
bool
TriangleEdge::point_on (const db::DEdge &edge, const db::DPoint &point)
{
if (edge.side_of (point) != 0) {
return false;
} else {
return db::sprod_sign (point - edge.p1 (), edge.d ()) * db::sprod_sign(point - edge.p2 (), edge.d ()) < 0;
}
}
bool
TriangleEdge::can_flip () const
{
if (! left () || ! right ()) {
return false;
}
const db::Vertex *v1 = left ()->opposite (this);
const db::Vertex *v2 = right ()->opposite (this);
return crosses (db::DEdge (*v1, *v2));
}
bool
TriangleEdge::can_join_via (const Vertex *vertex) const
{
if (! left () || ! right ()) {
return false;
}
tl_assert (has_vertex (vertex));
const db::Vertex *v1 = left ()->opposite (this);
const db::Vertex *v2 = right ()->opposite (this);
return db::DEdge (*v1, *v2).side_of (*vertex) == 0;
}
bool
TriangleEdge::is_outside () const
{
return left () == 0 || right () == 0;
}
bool
TriangleEdge::is_for_outside_triangles () const
{
return (left () && left ()->is_outside ()) || (right () && right ()->is_outside ());
}
bool
TriangleEdge::has_triangle (const Triangle *t) const
{
return t != 0 && (left () == t || right () == t);
}
// -------------------------------------------------------------------------------------
// Triangle implementation
Triangle::Triangle ()
: m_is_outside (false), m_id (0)
{
for (int i = 0; i < 3; ++i) {
mp_v[i] = 0;
mp_e[i] = 0;
}
}
Triangle::Triangle (TriangleEdge *e1, TriangleEdge *e2, TriangleEdge *e3)
: m_is_outside (false), m_id (0)
{
mp_e[0] = e1;
mp_v[0] = e1->v1 ();
mp_v[1] = e1->v2 ();
if (e2->has_vertex (mp_v[1])) {
mp_e[1] = e2;
mp_e[2] = e3;
} else {
mp_e[1] = e3;
mp_e[2] = e2;
}
mp_v[2] = mp_e[1]->other (mp_v[1]);
// establish link to edges
for (int i = 0; i < 3; ++i) {
TriangleEdge *e = mp_e[i];
int side_of = e->side_of (*mp_v[i == 0 ? 2 : i - 1]);
// NOTE: in the degenerated case, the triangle is not attached to an edge!
if (side_of < 0) {
e->set_left (this);
} else if (side_of > 0) {
e->set_right (this);
}
}
// enforce clockwise orientation
if (db::vprod_sign (*mp_v[2] - *mp_v[0], *mp_v[1] - *mp_v[0]) < 0) {
std::swap (mp_v[2], mp_v[1]);
}
}
Triangle::~Triangle ()
{
unlink ();
}
void
Triangle::unlink ()
{
for (int i = 0; i != 3; ++i) {
db::TriangleEdge *e = mp_e[i];
if (e->left () == this) {
e->set_left (0);
}
if (e->right () == this) {
e->set_right (0);
}
}
}
std::string
Triangle::to_string (bool with_id) const
{
std::string res = "(";
for (int i = 0; i < 3; ++i) {
if (i > 0) {
res += ", ";
}
if (vertex (i)) {
res += vertex (i)->to_string (with_id);
} else {
res += "(null)";
}
}
res += ")";
return res;
}
double
Triangle::area () const
{
return fabs (db::vprod (mp_e[0]->d (), mp_e[1]->d ())) * 0.5;
}
db::DBox
Triangle::bbox () const
{
db::DBox box;
for (int i = 0; i < 3; ++i) {
box += *mp_v[i];
}
return box;
}
std::pair<db::DPoint, double>
Triangle::circumcircle () const
{
db::DVector v1 = *mp_v[0] - *mp_v[1];
db::DVector v2 = *mp_v[0] - *mp_v[2];
db::DVector n1 = db::DVector (v1.y (), -v1.x ());
db::DVector n2 = db::DVector (v2.y (), -v2.x ());
double p1s = v1.sq_length ();
double p2s = v2.sq_length ();
double s = db::vprod (v1, v2);
tl_assert (fabs (s) > db::epsilon);
db::DVector r = (n1 * p2s - n2 * p1s) * (0.5 / s);
db::DPoint center = *mp_v[0] + r;
double radius = r.length ();
return std::make_pair (center, radius);
}
Vertex *
Triangle::opposite (const TriangleEdge *edge) const
{
for (int i = 0; i < 3; ++i) {
Vertex *v = mp_v[i];
if (! edge->has_vertex (v)) {
return v;
}
}
tl_assert (false);
}
TriangleEdge *
Triangle::opposite (const Vertex *vertex) const
{
for (int i = 0; i < 3; ++i) {
TriangleEdge *e = mp_e[i];
if (! e->has_vertex (vertex)) {
return e;
}
}
tl_assert (false);
}
TriangleEdge *
Triangle::find_edge_with (const Vertex *v1, const Vertex *v2) const
{
for (int i = 0; i < 3; ++i) {
TriangleEdge *e = mp_e[i];
if (e->has_vertex (v1) && e->has_vertex (v2)) {
return e;
}
}
tl_assert (false);
}
TriangleEdge *
Triangle::common_edge (const Triangle *other) const
{
for (int i = 0; i < 3; ++i) {
TriangleEdge *e = mp_e[i];;
if (e->other (this) == other) {
return e;
}
}
return 0;
}
int
Triangle::contains (const db::DPoint &point) const
{
int res = 1;
const Vertex *vl = mp_v[2];;
for (int i = 0; i < 3; ++i) {
const Vertex *v = mp_v[i];;
int s = db::DEdge (*vl, *v).side_of (point);
if (s == 0) {
res = 0;
} else if (s > 0) {
return -1;
}
vl = v;
}
return res;
}
double
Triangle::min_edge_length () const
{
double lmin = mp_e[0]->d ().length ();
for (int i = 1; i < 3; ++i) {
lmin = std::min (lmin, mp_e[i]->d ().length ());
}
return lmin;
}
double
Triangle::b () const
{
double lmin = min_edge_length ();
auto cr = circumcircle ();
return lmin / cr.second;
}
bool
Triangle::has_segment () const
{
for (int i = 0; i < 3; ++i) {
if (mp_e[i]->is_segment ()) {
return true;
}
}
return false;
}
unsigned int
Triangle::num_segments () const
{
unsigned int n = 0;
for (int i = 0; i < 3; ++i) {
if (mp_e[i]->is_segment ()) {
++n;
}
}
return n;
}
}

577
src/db/db/dbTriangle.h Normal file
View File

@ -0,0 +1,577 @@
/*
KLayout Layout Viewer
Copyright (C) 2006-2024 Matthias Koefferlein
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef HDR_dbTriangle
#define HDR_dbTriangle
#include "dbCommon.h"
#include "dbPoint.h"
#include "dbEdge.h"
#include "tlObjectCollection.h"
#include "tlList.h"
#include <vector>
#include <string>
#include <list>
#include <algorithm>
namespace db
{
class Triangle;
class TriangleEdge;
/**
* @brief A class representing a vertex in a Delaunay triangulation graph
*
* The vertex carries information about the connected edges and
* an integer value that can be used in traversal algorithms
* ("level")
*/
class DB_PUBLIC Vertex
: public db::DPoint
{
public:
typedef std::list<TriangleEdge *> edges_type;
typedef edges_type::const_iterator edges_iterator;
typedef edges_type::iterator edges_iterator_non_const;
Vertex ();
Vertex (const DPoint &p);
Vertex (const Vertex &v);
Vertex (db::DCoord x, db::DCoord y);
Vertex &operator= (const Vertex &v);
bool is_outside () const;
std::vector<db::Triangle *> triangles () const;
edges_iterator begin_edges () const { return mp_edges.begin (); }
edges_iterator end_edges () const { return mp_edges.end (); }
size_t num_edges (int max_count = -1) const;
bool has_edge (const TriangleEdge *edge) const;
size_t level () const { return m_level; }
void set_level (size_t l) { m_level = l; }
std::string to_string (bool with_id = false) const;
/**
* @brief Returns 1 is the point is inside the circle, 0 if on the circle and -1 if outside
* TODO: Move to db::DPoint
*/
static int in_circle (const db::DPoint &point, const db::DPoint &center, double radius);
/**
* @brief Returns 1 is this point is inside the circle, 0 if on the circle and -1 if outside
*/
int in_circle (const db::DPoint &center, double radius) const
{
return in_circle (*this, center, radius);
}
private:
friend class TriangleEdge;
void remove_edge (const edges_iterator_non_const &ec)
{
mp_edges.erase (ec);
}
edges_type mp_edges;
size_t m_level;
};
/**
* @brief A class representing an edge in the Delaunay triangulation graph
*/
class DB_PUBLIC TriangleEdge
{
public:
class TriangleIterator
{
public:
typedef Triangle value_type;
typedef Triangle &reference;
typedef Triangle *pointer;
reference operator*() const
{
return *operator-> ();
}
pointer operator->() const
{
return m_index ? mp_edge->right () : mp_edge->left ();
}
bool operator== (const TriangleIterator &other) const
{
return m_index == other.m_index;
}
bool operator!= (const TriangleIterator &other) const
{
return !operator== (other);
}
TriangleIterator &operator++ ()
{
while (++m_index < 2 && operator-> () == 0)
;
return *this;
}
private:
friend class TriangleEdge;
TriangleIterator (const TriangleEdge *edge)
: mp_edge (edge), m_index (0)
{
if (! edge) {
m_index = 2;
} else {
--m_index;
operator++ ();
}
}
const TriangleEdge *mp_edge;
unsigned int m_index;
};
TriangleEdge ();
TriangleEdge (Vertex *v1, Vertex *v2);
Vertex *v1 () const { return mp_v1; }
Vertex *v2 () const { return mp_v2; }
void reverse ()
{
std::swap (mp_v1, mp_v2);
std::swap (mp_left, mp_right);
}
Triangle *left () const { return mp_left; }
Triangle *right () const { return mp_right; }
TriangleIterator begin_triangles () const
{
return TriangleIterator (this);
}
TriangleIterator end_triangles () const
{
return TriangleIterator (0);
}
void set_level (size_t l) { m_level = l; }
size_t level () const { return m_level; }
void set_id (size_t id) { m_id = id; }
size_t id () const { return m_id; }
void set_is_segment (bool is_seg) { m_is_segment = is_seg; }
bool is_segment () const { return m_is_segment; }
std::string to_string (bool with_id = false) const;
/**
* @brief Converts to an db::DEdge
*/
db::DEdge edge () const
{
return db::DEdge (*mp_v1, *mp_v2);
}
/**
* @brief Returns the distance of the given point to the edge
*
* The distance is the minimum distance of the point to one point from the edge.
* TODO: Move to db::DEdge
*/
static double distance (const db::DEdge &e, const db::DPoint &p);
/**
* @brief Returns the distance of the given point to the edge
*
* The distance is the minimum distance of the point to one point from the edge.
*/
double distance (const db::DPoint &p) const
{
return distance (edge (), p);
}
/**
* @brief Returns a value indicating whether this edge crosses the other one
*
* "crosses" is true, if both edges share at least one point which is not an endpoint
* of one of the edges.
* TODO: Move to db::DEdge
*/
static bool crosses (const db::DEdge &e, const db::DEdge &other);
/**
* @brief Returns a value indicating whether this edge crosses the other one
*
* "crosses" is true, if both edges share at least one point which is not an endpoint
* of one of the edges.
*/
bool crosses (const db::DEdge &other) const
{
return crosses (edge (), other);
}
/**
* @brief Returns a value indicating whether this edge crosses the other one
*
* "crosses" is true, if both edges share at least one point which is not an endpoint
* of one of the edges.
*/
bool crosses (const db::TriangleEdge &other) const
{
return crosses (edge (), other.edge ());
}
/**
* @brief Returns a value indicating whether this edge crosses the other one
* "crosses" is true, if both edges share at least one point.
* TODO: Move to db::DEdge
*/
static bool crosses_including (const db::DEdge &e, const db::DEdge &other);
/**
* @brief Returns a value indicating whether this edge crosses the other one
* "crosses" is true, if both edges share at least one point.
*/
bool crosses_including (const db::DEdge &other) const
{
return crosses_including (edge (), other);
}
/**
* @brief Returns a value indicating whether this edge crosses the other one
* "crosses" is true, if both edges share at least one point.
*/
bool crosses_including (const db::TriangleEdge &other) const
{
return crosses_including (edge (), other.edge ());
}
/**
* @brief Gets the intersection point
* TODO: Move to db::DEdge
*/
static db::DPoint intersection_point (const db::DEdge &e, const DEdge &other);
/**
* @brief Gets the intersection point
*/
db::DPoint intersection_point (const db::DEdge &other) const
{
return intersection_point (edge (), other);
}
/**
* @brief Gets the intersection point
*/
db::DPoint intersection_point (const TriangleEdge &other) const
{
return intersection_point (edge (), other.edge ());
}
/**
* @brief Returns a value indicating whether the point is on the edge
* TODO: Move to db::DEdge
*/
static bool point_on (const db::DEdge &edge, const db::DPoint &point);
/**
* @brief Returns a value indicating whether the point is on the edge
*/
bool point_on (const db::DPoint &point) const
{
return point_on (edge (), point);
}
/**
* @brief Gets the side the point is on
*
* -1 is for "left", 0 is "on" and +1 is "right"
* TODO: correct to same definition as db::Edge (negative)
*/
static int side_of (const db::DEdge &e, const db::DPoint &point)
{
return -e.side_of (point);
}
/**
* @brief Gets the side the point is on
*
* -1 is for "left", 0 is "on" and +1 is "right"
* TODO: correct to same definition as db::Edge (negative)
*/
int side_of (const db::DPoint &p) const
{
return -edge ().side_of (p);
}
/**
* @brief Gets the distance vector
*/
db::DVector d () const
{
return *mp_v2 - *mp_v1;
}
/**
* @brief Gets the other triangle for the given one
*/
Triangle *other (const Triangle *) const;
/**
* @brief Gets the other vertex for the given one
*/
Vertex *other (const Vertex *) const;
/**
* @brief Gets a value indicating whether the edge has the given vertex
*/
bool has_vertex (const Vertex *) const;
/**
* @brief Gets the common vertex of the other edge and this edge or null if there is no common vertex
*/
Vertex *common_vertex (const TriangleEdge *other) const;
/**
* @brief Returns a value indicating whether this edge can be flipped
*/
bool can_flip () const;
/**
* @brief Returns a value indicating whether the edge separates two triangles that can be joined into one (via the given vertex)
*/
bool can_join_via (const Vertex *vertex) const;
/**
* @brief Returns a value indicating whether this edge is an outside edge (no other triangles)
*/
bool is_outside () const;
/**
* @brief Returns a value indicating whether this edge belongs to outside triangles
*/
bool is_for_outside_triangles () const;
/**
* @brief Returns a value indicating whether t is attached to this edge
*/
bool has_triangle (const Triangle *t) const;
protected:
void unlink ();
void link ();
private:
friend class Triangle;
friend class Triangles;
Vertex *mp_v1, *mp_v2;
Triangle *mp_left, *mp_right;
Vertex::edges_iterator_non_const m_ec_v1, m_ec_v2;
size_t m_level;
size_t m_id;
bool m_is_segment;
void set_left (Triangle *t);
void set_right (Triangle *t);
};
/**
* @brief A compare function that compares triangles by ID
*
* The ID acts as a more predicable unique ID for the object in sets and maps.
*/
struct TriangleEdgeLessFunc
{
bool operator () (TriangleEdge *a, TriangleEdge *b) const
{
return a->id () < b->id ();
}
};
/**
* @brief A class representing a triangle
*/
class DB_PUBLIC Triangle
: public tl::list_node<Triangle>, public tl::Object
{
public:
Triangle ();
Triangle (TriangleEdge *e1, TriangleEdge *e2, TriangleEdge *e3);
~Triangle ();
void unlink ();
void set_id (size_t id) { m_id = id; }
size_t id () const { return m_id; }
bool is_outside () const { return m_is_outside; }
void set_outside (bool o) { m_is_outside = o; }
std::string to_string (bool with_id = false) const;
/**
* @brief Gets the nth vertex (n wraps around and can be negative)
* The vertexes are oriented clockwise.
*/
inline Vertex *vertex (int n) const
{
if (n >= 0 && n < 3) {
return mp_v[n];
} else {
return mp_v[(n + 3) % 3];
}
}
/**
* @brief Gets the nth edge (n wraps around and can be negative)
*/
inline TriangleEdge *edge (int n) const
{
if (n >= 0 && n < 3) {
return mp_e[n];
} else {
return mp_e[(n + 3) % 3];
}
}
/**
* @brief Gets the area
*/
double area () const;
/**
* @brief Returns the bounding box of the triangle
*/
db::DBox bbox () const;
/**
* @brief Gets the center point and radius of the circumcircle
*/
std::pair<db::DPoint, double> circumcircle () const;
/**
* @brief Gets the vertex opposite of the given edge
*/
Vertex *opposite (const TriangleEdge *edge) const;
/**
* @brief Gets the edge opposite of the given vertex
*/
TriangleEdge *opposite (const Vertex *vertex) const;
/**
* @brief Gets the edge with the given vertexes
*/
TriangleEdge *find_edge_with (const Vertex *v1, const Vertex *v2) const;
/**
* @brief Finds the common edge for both triangles
*/
TriangleEdge *common_edge (const Triangle *other) const;
/**
* @brief Returns a value indicating whether the point is inside (1), on the triangle (0) or outside (-1)
*/
int contains (const db::DPoint &point) const;
/**
* @brief Gets a value indicating whether the triangle has the given vertex
*/
inline bool has_vertex (const db::Vertex *v) const
{
return mp_v[0] == v || mp_v[1] == v || mp_v[2] == v;
}
/**
* @brief Gets a value indicating whether the triangle has the given edge
*/
inline bool has_edge (const db::TriangleEdge *e) const
{
return mp_e[0] == e || mp_e[1] == e || mp_e[2] == e;
}
/**
* @brief Returns the minimum edge length
*/
double min_edge_length () const;
/**
* @brief Returns the min edge length to circumcircle radius ratio
*/
double b () const;
/**
* @brief Returns a value indicating whether the triangle borders to a segment
*/
bool has_segment () const;
/**
* @brief Returns the number of segments the triangle borders to
*/
unsigned int num_segments () const;
private:
bool m_is_outside;
TriangleEdge *mp_e[3];
db::Vertex *mp_v[3];
size_t m_id;
// no copying
Triangle &operator= (const Triangle &);
Triangle (const Triangle &);
};
/**
* @brief A compare function that compares triangles by ID
*
* The ID acts as a more predicable unique ID for the object in sets and maps.
*/
struct TriangleLessFunc
{
bool operator () (Triangle *a, Triangle *b) const
{
return a->id () < b->id ();
}
};
}
#endif

1713
src/db/db/dbTriangles.cc Normal file

File diff suppressed because it is too large Load Diff

347
src/db/db/dbTriangles.h Normal file
View File

@ -0,0 +1,347 @@
/*
KLayout Layout Viewer
Copyright (C) 2006-2024 Matthias Koefferlein
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef HDR_dbTriangles
#define HDR_dbTriangles
#include "dbCommon.h"
#include "dbTriangle.h"
#include "dbBox.h"
#include "dbRegion.h"
#include "tlObjectCollection.h"
#include "tlStableVector.h"
#include <limits>
#include <list>
#include <vector>
#include <algorithm>
namespace db
{
class Layout;
class DB_PUBLIC Triangles
{
public:
struct TriangulateParameters
{
TriangulateParameters ()
: min_b (1.0),
min_length (0.0),
max_area (0.0),
max_area_border (0.0),
max_iterations (std::numeric_limits<size_t>::max ()),
base_verbosity (30),
mark_triangles (false)
{ }
/**
* @brief Min. readius-to-shortest edge ratio
*/
double min_b;
/**
* @brief Min. edge length
*
* This parameter does not provide a guarantee about a minimume edge length, but
* helps avoiding ever-reducing triangle splits in acute corners of the input polygon.
* Splitting of edges stops when the edge is less than the min length.
*/
double min_length;
/**
* @brief Max area or zero for "no constraint"
*/
double max_area;
/**
* @brief Max area for border triangles or zero for "use max_area"
*/
double max_area_border;
/**
* @brief Max number of iterations
*/
size_t max_iterations;
/**
* @brief The verbosity level above which triangulation reports details
*/
int base_verbosity;
/**
* @brief If true, final triangles are marked using the "id" integer as a bit field
*
* This provides information about the result quality.
*
* Bit 0: skinny triangle
* Bit 1: bad-quality (skinny or area too large)
* Bit 2: non-Delaunay (in the strict sense)
*/
bool mark_triangles;
};
typedef tl::list<db::Triangle> triangles_type;
typedef triangles_type::const_iterator triangle_iterator;
Triangles ();
~Triangles ();
/**
* @brief Initializes the triangle collection with a box
* Two triangles will be created.
*/
void init_box (const db::DBox &box);
/**
* @brief Returns a string representation of the triangle graph.
*/
std::string to_string ();
/**
* @brief Returns the bounding box of the triangle graph.
*/
db::DBox bbox () const;
/**
* @brief Iterates the triangles in the graph (begin iterator)
*/
triangle_iterator begin () const { return mp_triangles.begin (); }
/**
* @brief Iterates the triangles in the graph (end iterator)
*/
triangle_iterator end () const { return mp_triangles.end (); }
/**
* @brief Returns the number of triangles in the graph
*/
size_t num_triangles () const { return mp_triangles.size (); }
/**
* @brief Clears the triangle set
*/
void clear ();
/**
* @brief Creates a refined Delaunay triangulation for the given region
*
* The database unit should be chosen in a way that target area values are "in the order of 1".
* For inputs featuring acute angles (angles < ~25 degree), the parameters should defined a min
* edge length ("min_length").
* "min_length" should be at least 1e-4. If a min edge length is given, the max area constaints
* may not be satisfied.
*
* Edges in the input should not be shorter than 1e-4.
*/
void triangulate (const db::Region &region, const TriangulateParameters &parameters, double dbu = 1.0);
// more versions
void triangulate (const db::Polygon &poly, const TriangulateParameters &parameters, double dbu = 1.0);
void triangulate (const db::Region &region, const TriangulateParameters &parameters, const db::CplxTrans &trans = db::CplxTrans ());
void triangulate (const db::Polygon &poly, const TriangulateParameters &parameters, const db::CplxTrans &trans = db::CplxTrans ());
/**
* @brief Triangulates a floating-point polygon
*/
void triangulate (const db::DPolygon &poly, const TriangulateParameters &parameters);
/**
* @brief Statistics: number of flips (fixing)
*/
size_t flips () const
{
return m_flips;
}
/**
* @brief Statistics: number of hops (searching)
*/
size_t hops () const
{
return m_hops;
}
protected:
/**
* @brief Checks the triangle graph for consistency
* This method is for testing purposes mainly.
*/
bool check (bool check_delaunay = true) const;
/**
* @brief Dumps the triangle graph to a GDS file at the given path
* This method is for testing purposes mainly.
*
* "decompose_id" will map triangles to layer 20, 21 and 22.
* according to bit 0, 1 and 2 of the ID (useful with the 'mark_triangles'
* flat in TriangulateParameters).
*/
void dump (const std::string &path, bool decompose_by_id = false) const;
/**
* @brief Creates a new layout object representing the triangle graph
* This method is for testing purposes mainly.
*/
db::Layout *to_layout (bool decompose_by_id = false) const;
/**
* @brief Finds the points within (not "on") a circle of radius "radius" around the given vertex.
*/
std::vector<db::Vertex *> find_points_around (Vertex *vertex, double radius);
/**
* @brief Inserts a new vertex as the given point
*
* If "new_triangles" is not null, it will receive the list of new triangles created during
* the remove step.
*/
db::Vertex *insert_point (const db::DPoint &point, std::list<tl::weak_ptr<db::Triangle> > *new_triangles = 0);
/**
* @brief Inserts a new vertex as the given point
*
* If "new_triangles" is not null, it will receive the list of new triangles created during
* the remove step.
*/
db::Vertex *insert_point (db::DCoord x, db::DCoord y, std::list<tl::weak_ptr<db::Triangle> > *new_triangles = 0);
/**
* @brief Removes the given vertex
*
* If "new_triangles" is not null, it will receive the list of new triangles created during
* the remove step.
*/
void remove (db::Vertex *vertex, std::list<tl::weak_ptr<db::Triangle> > *new_triangles = 0);
/**
* @brief Flips the given edge
*/
std::pair<std::pair<db::Triangle *, db::Triangle *>, db::TriangleEdge *> flip (TriangleEdge *edge);
/**
* @brief Finds all edges that cross the given one for a convex triangulation
*
* Requirements:
* * self must be a convex triangulation
* * edge must not contain another vertex from the triangulation except p1 and p2
*/
std::vector<db::TriangleEdge *> search_edges_crossing (db::Vertex *from, db::Vertex *to);
/**
* @brief Finds the edge for two given points
*/
db::TriangleEdge *find_edge_for_points (const db::DPoint &p1, const db::DPoint &p2);
/**
* @brief Finds the vertex for a point
*/
db::Vertex *find_vertex_for_point (const db::DPoint &pt);
/**
* @brief Ensures all points between from an to are connected by edges and makes these segments
*/
std::vector<db::TriangleEdge *> ensure_edge (db::Vertex *from, db::Vertex *to);
/**
* @brief Given a set of contours with edges, mark outer triangles
*
* The edges must be made from existing vertexes. Edge orientation is
* clockwise.
*
* This will also mark triangles as outside ones.
*/
void constrain (const std::vector<std::vector<Vertex *> > &contours);
/**
* @brief Removes the outside triangles.
*/
void remove_outside_triangles ();
/**
* @brief Creates a constrained Delaunay triangulation from the given Region
*/
void create_constrained_delaunay (const db::Region &region, const db::CplxTrans &trans = db::CplxTrans ());
/**
* @brief Creates a constrained Delaunay triangulation from the given Polygon
*/
void create_constrained_delaunay (const db::Polygon &poly, const db::CplxTrans &trans = db::CplxTrans ());
/**
* @brief Creates a constrained Delaunay triangulation from the given DPolygon
*/
void create_constrained_delaunay (const db::DPolygon &poly);
/**
* @brief Returns a value indicating whether the edge is "illegal" (violates the Delaunay criterion)
*/
static bool is_illegal_edge (db::TriangleEdge *edge);
// NOTE: these functions are SLOW and intended to test purposes only
std::vector<db::Vertex *> find_touching (const db::DBox &box) const;
std::vector<db::Vertex *> find_inside_circle (const db::DPoint &center, double radius) const;
private:
tl::list<db::Triangle> mp_triangles;
tl::stable_vector<db::TriangleEdge> m_edges_heap;
std::vector<db::TriangleEdge *> m_returned_edges;
tl::stable_vector<db::Vertex> m_vertex_heap;
bool m_is_constrained;
size_t m_level;
size_t m_id;
size_t m_flips, m_hops;
db::Vertex *create_vertex (double x, double y);
db::Vertex *create_vertex (const db::DPoint &pt);
db::TriangleEdge *create_edge (db::Vertex *v1, db::Vertex *v2);
db::Triangle *create_triangle (db::TriangleEdge *e1, db::TriangleEdge *e2, db::TriangleEdge *e3);
void remove_triangle (db::Triangle *tri);
void remove_outside_vertex (db::Vertex *vertex, std::list<tl::weak_ptr<db::Triangle> > *new_triangles = 0);
void remove_inside_vertex (db::Vertex *vertex, std::list<tl::weak_ptr<db::Triangle> > *new_triangles_out = 0);
std::vector<db::Triangle *> fill_concave_corners (const std::vector<TriangleEdge *> &edges);
void fix_triangles (const std::vector<db::Triangle *> &tris, const std::vector<db::TriangleEdge *> &fixed_edges, std::list<tl::weak_ptr<db::Triangle> > *new_triangles);
std::vector<db::Triangle *> find_triangle_for_point (const db::DPoint &point);
db::TriangleEdge *find_closest_edge (const db::DPoint &p, db::Vertex *vstart = 0, bool inside_only = false);
db::Vertex *insert (db::Vertex *vertex, std::list<tl::weak_ptr<db::Triangle> > *new_triangles = 0);
void split_triangle (db::Triangle *t, db::Vertex *vertex, std::list<tl::weak_ptr<db::Triangle> > *new_triangles_out);
void split_triangles_on_edge (const std::vector<db::Triangle *> &tris, db::Vertex *vertex, db::TriangleEdge *split_edge, std::list<tl::weak_ptr<db::Triangle> > *new_triangles_out);
void add_more_triangles (std::vector<Triangle *> &new_triangles,
db::TriangleEdge *incoming_edge,
db::Vertex *from_vertex, db::Vertex *to_vertex,
db::TriangleEdge *conn_edge);
void insert_new_vertex(db::Vertex *vertex, std::list<tl::weak_ptr<Triangle> > *new_triangles_out);
std::vector<db::TriangleEdge *> ensure_edge_inner (db::Vertex *from, db::Vertex *to);
void join_edges (std::vector<TriangleEdge *> &edges);
void refine (const TriangulateParameters &param);
template<class Poly, class Trans> void make_contours (const Poly &poly, const Trans &trans, std::vector<std::vector<db::Vertex *> > &contours);
};
}
#endif

View File

@ -32,6 +32,16 @@
namespace db {
/**
* @brief A generic constant describing the "fuzzyness" of a double comparison of a value around 1
*/
const double epsilon = 1e-10;
/**
* @brief A generic constant describing the "fuzzyness" of a float comparison of a value around 1
*/
const double fepsilon = 1e-6;
/**
* @brief The standard integer coordinate type
*/
@ -424,7 +434,7 @@ struct coord_traits<double>
{
double dx1 = ax - cx, dy1 = ay - cy;
double dx2 = bx - cx, dy2 = by - cy;
double pa = (sqrt (dx1 * dx1 + dy1 * dy1) + sqrt (dx2 * dx2 + dy2 * dy2)) * prec ();
double pa = (sqrt (dx1 * dx1 + dy1 * dy1) + sqrt (dx2 * dx2 + dy2 * dy2)) * db::epsilon;
area_type p1 = dx1 * dx2;
area_type p2 = -dy1 * dy2;
if (p1 <= p2 - pa) {
@ -440,7 +450,7 @@ struct coord_traits<double>
{
double dx1 = ax - cx, dy1 = ay - cy;
double dx2 = bx - cx, dy2 = by - cy;
double pa = (sqrt (dx1 * dx1 + dy1 * dy1) + sqrt (dx2 * dx2 + dy2 * dy2)) * prec ();
double pa = (sqrt (dx1 * dx1 + dy1 * dy1) + sqrt (dx2 * dx2 + dy2 * dy2)) * db::epsilon;
area_type p1 = dx1 * dx2;
area_type p2 = -dy1 * dy2;
if (p1 <= p2 - pa) {
@ -463,7 +473,7 @@ struct coord_traits<double>
{
double dx1 = ax - cx, dy1 = ay - cy;
double dx2 = bx - cx, dy2 = by - cy;
double pa = (sqrt (dx1 * dx1 + dy1 * dy1) + sqrt (dx2 * dx2 + dy2 * dy2)) * prec ();
double pa = (sqrt (dx1 * dx1 + dy1 * dy1) + sqrt (dx2 * dx2 + dy2 * dy2)) * db::epsilon;
area_type p1 = dx1 * dy2;
area_type p2 = dy1 * dx2;
if (p1 <= p2 - pa) {
@ -479,7 +489,7 @@ struct coord_traits<double>
{
double dx1 = ax - cx, dy1 = ay - cy;
double dx2 = bx - cx, dy2 = by - cy;
double pa = (sqrt (dx1 * dx1 + dy1 * dy1) + sqrt (dx2 * dx2 + dy2 * dy2)) * prec ();
double pa = (sqrt (dx1 * dx1 + dy1 * dy1) + sqrt (dx2 * dx2 + dy2 * dy2)) * db::epsilon;
area_type p1 = dx1 * dy2;
area_type p2 = dy1 * dx2;
if (p1 <= p2 - pa) {
@ -537,16 +547,6 @@ struct cast_op
}
};
/**
* @brief A generic constant describing the "fuzzyness" of a double comparison of a value around 1
*/
const double epsilon = 1e-10;
/**
* @brief A generic constant describing the "fuzzyness" of a float comparison of a value around 1
*/
const double fepsilon = 1e-6;
/**
* @brief A functor wrapping the epsilon constant in a templatized form
*/

View File

@ -22,6 +22,7 @@
#include "dbVector.h"
#include "dbPoint.h"
// ----------------------------------------------------------------
// Implementation of the custom extractors
@ -55,6 +56,15 @@ namespace {
}
namespace db
{
// instantiations
template class vector<Coord>;
template class vector<DCoord>;
}
namespace tl
{

View File

@ -45,7 +45,7 @@ template <class C> class point;
*/
template <class C>
class DB_PUBLIC_TEMPLATE vector
class DB_PUBLIC vector
{
public:
typedef C coord_type;
@ -171,22 +171,42 @@ public:
/**
* @brief Add to operation
*/
vector<C> &operator+= (const vector<C> &p);
vector<C> &operator+= (const vector<C> &p)
{
m_x += p.x ();
m_y += p.y ();
return *this;
}
/**
* @brief method version of operator+ (mainly for automation purposes)
*/
vector<C> add (const vector<C> &p) const;
vector<C> add (const vector<C> &p) const
{
vector<C> r (*this);
r += p;
return r;
}
/**
* @brief Subtract from operation
*/
vector<C> &operator-= (const vector<C> &p);
vector<C> &operator-= (const vector<C> &p)
{
m_x -= p.x ();
m_y -= p.y ();
return *this;
}
/**
* @brief method version of operator- (mainly for automation purposes)
*/
vector<C> subtract (const vector<C> &p) const;
vector<C> subtract (const vector<C> &p) const
{
vector<C> r (*this);
r -= p;
return r;
}
/**
* @brief "less" comparison operator
@ -194,17 +214,26 @@ public:
* This operator is provided to establish a sorting
* order
*/
bool operator< (const vector<C> &p) const;
bool operator< (const vector<C> &p) const
{
return m_y < p.m_y || (m_y == p.m_y && m_x < p.m_x);
}
/**
* @brief Equality test operator
*/
bool operator== (const vector<C> &p) const;
bool operator== (const vector<C> &p) const
{
return m_x == p.m_x && m_y == p.m_y;
}
/**
* @brief Inequality test operator
*/
bool operator!= (const vector<C> &p) const;
bool operator!= (const vector<C> &p) const
{
return !operator== (p);
}
/**
* @brief Const transform
@ -217,7 +246,10 @@ public:
* @return The transformed vector
*/
template <class Tr>
vector<typename Tr::target_coord_type> transformed (const Tr &t) const;
vector<typename Tr::target_coord_type> transformed (const Tr &t) const
{
return t (vector<typename Tr::target_coord_type> (*this));
}
/**
* @brief In-place transformation
@ -229,32 +261,51 @@ public:
* @return The transformed vector
*/
template <class Tr>
vector &transform (const Tr &t);
vector &transform (const Tr &t)
{
*this = vector<C> (t (*this));
return *this;
}
/**
* @brief Accessor to the x coordinate
*/
C x () const;
C x () const
{
return m_x;
}
/**
* @brief Accessor to the y coordinate
*/
C y () const;
C y () const
{
return m_y;
}
/**
* @brief Write accessor to the x coordinate
*/
void set_x (C _x);
void set_x (C _x)
{
m_x = _x;
}
/**
* @brief Write accessor to the y coordinate
*/
void set_y (C _y);
void set_y (C _y)
{
m_y = _y;
}
/**
* @brief Fuzzy comparison of vectors
*/
bool equal (const vector<C> &p) const;
bool equal (const vector<C> &p) const
{
return coord_traits::equal (x (), p.x ()) && coord_traits::equal (y (), p.y ());
}
/**
* @brief Fuzzy comparison of vectors for inequality
@ -267,31 +318,56 @@ public:
/**
* @brief Fuzzy "less" comparison of vectors
*/
bool less (const vector<C> &p) const;
bool less (const vector<C> &p) const
{
if (! coord_traits::equal (y (), p.y ())) {
return y () < p.y ();
}
if (! coord_traits::equal (x (), p.x ())) {
return x () < p.x ();
}
return false;
}
/**
* @brief Scaling by some factor
*
* To avoid round effects, the result vector is of double coordinate type.
*/
vector<double> operator* (double s) const;
vector<double> operator* (double s) const
{
return vector<double> (m_x * s, m_y * s);
}
/**
* @brief Scaling by some factor
*/
vector<C> operator* (long s) const;
vector<C> operator* (long s) const
{
return vector<C> (m_x * s, m_y * s);
}
/**
* @brief Scaling self by some factor
*
* Scaling by a double value in general involves rounding when the coordinate type is integer.
*/
vector<C> operator*= (double s);
vector<C> operator*= (double s)
{
m_x = coord_traits::rounded (m_x * s);
m_y = coord_traits::rounded (m_y * s);
return *this;
}
/**
* @brief Scaling self by some integer factor
*/
vector<C> operator*= (long s);
vector<C> operator*= (long s)
{
m_x *= s;
m_y *= s;
return *this;
}
/**
* @brief Division by some divisor.
@ -300,32 +376,60 @@ public:
* with the coord_traits scheme.
*/
vector<C> &operator/= (double s);
vector<C> &operator/= (double s)
{
double mult = 1.0 / static_cast<double>(s);
*this *= mult;
return *this;
}
/**
* @brief Dividing self by some integer divisor
*/
vector<C> &operator/= (long s);
vector<C> &operator/= (long s)
{
double mult = 1.0 / static_cast<double>(s);
*this *= mult;
return *this;
}
/**
* @brief The euclidian length
*/
distance_type length () const;
distance_type length () const
{
double ddx (x ());
double ddy (y ());
return coord_traits::rounded_distance (sqrt (ddx * ddx + ddy * ddy));
}
/**
* @brief The euclidian length of the vector
*/
double double_length () const;
double double_length () const
{
double ddx (x ());
double ddy (y ());
return sqrt (ddx * ddx + ddy * ddy);
}
/**
* @brief The square euclidian length of the vector
*/
area_type sq_length () const;
area_type sq_length () const
{
return coord_traits::sq_length (0, 0, x (), y ());
}
/**
* @brief The square of the euclidian length of the vector
*/
double sq_double_length () const;
double sq_double_length () const
{
double ddx (x ());
double ddy (y ());
return ddx * ddx + ddy * ddy;
}
/**
* @brief String conversion
@ -349,140 +453,6 @@ private:
C m_x, m_y;
};
template <class C>
inline vector<C> &
vector<C>::operator+= (const vector<C> &p)
{
m_x += p.x ();
m_y += p.y ();
return *this;
}
template <class C>
inline vector<C>
vector<C>::add (const vector<C> &p) const
{
vector<C> r (*this);
r += p;
return r;
}
template <class C>
inline vector<C> &
vector<C>::operator-= (const vector<C> &p)
{
m_x -= p.x ();
m_y -= p.y ();
return *this;
}
template <class C>
inline vector<C>
vector<C>::subtract (const vector<C> &p) const
{
vector<C> r (*this);
r -= p;
return r;
}
template <class C>
inline bool
vector<C>::operator< (const vector<C> &p) const
{
return m_y < p.m_y || (m_y == p.m_y && m_x < p.m_x);
}
template <class C>
inline bool
vector<C>::less (const vector<C> &p) const
{
if (! coord_traits::equal (y (), p.y ())) {
return y () < p.y ();
}
if (! coord_traits::equal (x (), p.x ())) {
return x () < p.x ();
}
return false;
}
template <class C>
inline bool
vector<C>::operator== (const vector<C> &p) const
{
return m_x == p.m_x && m_y == p.m_y;
}
template <class C>
inline bool
vector<C>::equal (const vector<C> &p) const
{
return coord_traits::equal (x (), p.x ()) && coord_traits::equal (y (), p.y ());
}
template <class C>
inline bool
vector<C>::operator!= (const vector<C> &p) const
{
return !operator== (p);
}
template <class C> template <class Tr>
inline vector<typename Tr::target_coord_type>
vector<C>::transformed (const Tr &t) const
{
return t (vector<typename Tr::target_coord_type> (*this));
}
template <class C> template <class Tr>
inline vector<C> &
vector<C>::transform (const Tr &t)
{
*this = vector<C> (t (*this));
return *this;
}
template <class C>
inline C
vector<C>::x () const
{
return m_x;
}
template <class C>
inline C
vector<C>::y () const
{
return m_y;
}
template <class C>
inline void
vector<C>::set_x (C _x)
{
m_x = _x;
}
template <class C>
inline void
vector<C>::set_y (C _y)
{
m_y = _y;
}
template <class C>
inline vector<double>
vector<C>::operator* (double s) const
{
return vector<double> (m_x * s, m_y * s);
}
template <class C>
inline vector<C>
vector<C>::operator* (long s) const
{
return vector<C> (m_x * s, m_y * s);
}
template <class C, typename Number>
inline vector<C>
operator/ (const db::vector<C> &p, Number s)
@ -491,76 +461,6 @@ operator/ (const db::vector<C> &p, Number s)
return vector<C> (p.x () * mult, p.y () * mult);
}
template <class C>
inline vector<C> &
vector<C>::operator/= (double s)
{
double mult = 1.0 / static_cast<double>(s);
*this *= mult;
return *this;
}
template <class C>
inline vector<C> &
vector<C>::operator/= (long s)
{
double mult = 1.0 / static_cast<double>(s);
*this *= mult;
return *this;
}
template <class C>
inline vector<C>
vector<C>::operator*= (double s)
{
m_x = coord_traits::rounded (m_x * s);
m_y = coord_traits::rounded (m_y * s);
return *this;
}
template <class C>
inline vector<C>
vector<C>::operator*= (long s)
{
m_x *= s;
m_y *= s;
return *this;
}
template <class C>
inline typename vector<C>::distance_type
vector<C>::length () const
{
double ddx (x ());
double ddy (y ());
return coord_traits::rounded_distance (sqrt (ddx * ddx + ddy * ddy));
}
template <class C>
inline double
vector<C>::double_length () const
{
double ddx (x ());
double ddy (y ());
return sqrt (ddx * ddx + ddy * ddy);
}
template <class C>
inline typename vector<C>::area_type
vector<C>::sq_length () const
{
return coord_traits::sq_length (0, 0, x (), y ());
}
template <class C>
inline double
vector<C>::sq_double_length () const
{
double ddx (x ());
double ddy (y ());
return ddx * ddx + ddy * ddy;
}
/**
* @brief The binary + operator (addition of vectors)
*

View File

@ -4036,7 +4036,7 @@ Class<db::Instance> decl_Instance ("db", "Instance",
"\n"
"This const version of the \\parent_cell method has been introduced in version 0.25.\n"
) +
gsi::method_ext ("parent_cell=", &set_parent_cell_ptr,
gsi::method_ext ("parent_cell=", &set_parent_cell_ptr, gsi::arg ("new_parent"),
"@brief Moves the instance to a different cell\n"
"\n"
"Both the current and the target cell must live in the same layout.\n"
@ -4343,7 +4343,7 @@ Class<db::Instance> decl_Instance ("db", "Instance",
"@brief Gets the complex transformation of the instance or the first instance in the array\n"
"This method is always valid compared to \\trans, since simple transformations can be expressed as complex transformations as well."
) +
gsi::method_ext ("cplx_trans=", &inst_set_cplx_trans,
gsi::method_ext ("cplx_trans=", &inst_set_cplx_trans, gsi::arg ("t"),
"@brief Sets the complex transformation of the instance or the first instance in the array\n"
"\n"
"This method has been introduced in version 0.23."
@ -4352,7 +4352,7 @@ Class<db::Instance> decl_Instance ("db", "Instance",
"@brief Gets the transformation of the instance or the first instance in the array\n"
"The transformation returned is only valid if the array does not represent a complex transformation array"
) +
gsi::method_ext ("trans=", &inst_set_trans,
gsi::method_ext ("trans=", &inst_set_trans, gsi::arg ("t"),
"@brief Sets the transformation of the instance or the first instance in the array\n"
"\n"
"This method has been introduced in version 0.23."
@ -4364,7 +4364,7 @@ Class<db::Instance> decl_Instance ("db", "Instance",
"\n"
"This method has been introduced in version 0.25.\n"
) +
gsi::method_ext ("dcplx_trans=|cplx_trans=", &inst_set_dcplx_trans,
gsi::method_ext ("dcplx_trans=|cplx_trans=", &inst_set_dcplx_trans, gsi::arg ("t"),
"@brief Sets the complex transformation of the instance or the first instance in the array (in micrometer units)\n"
"This method sets the transformation the same way as \\cplx_trans=, but the displacement of this transformation is given in "
"micrometer units. It is internally translated into database units.\n"
@ -4378,7 +4378,7 @@ Class<db::Instance> decl_Instance ("db", "Instance",
"\n"
"This method has been introduced in version 0.25.\n"
) +
gsi::method_ext ("dtrans=|trans=", &inst_set_dtrans,
gsi::method_ext ("dtrans=|trans=", &inst_set_dtrans, gsi::arg ("t"),
"@brief Sets the transformation of the instance or the first instance in the array (in micrometer units)\n"
"This method sets the transformation the same way as \\cplx_trans=, but the displacement of this transformation is given in "
"micrometer units. It is internally translated into database units.\n"

View File

@ -97,7 +97,7 @@ struct edge_pair_defs
"\n"
"Symmetric edge pairs have been introduced in version 0.27.\n"
) +
method ("symmetric=", &C::set_symmetric,
method ("symmetric=", &C::set_symmetric, gsi::arg ("flag"),
"@brief Sets a value indicating whether the edge pair is symmetric\n"
"See \\symmetric? for a description of this attribute.\n"
"\n"

View File

@ -173,7 +173,7 @@ Class<db::TextGenerator> decl_TextGenerator ("db", "TextGenerator",
"@brief Gets the default text generator (a standard font)\n"
"This method delivers the default generator or nil if no such generator is installed."
) +
method ("set_font_paths", &db::TextGenerator::set_font_paths,
method ("set_font_paths", &db::TextGenerator::set_font_paths, gsi::arg ("paths"),
"@brief Sets the paths where to look for font files\n"
"This function sets the paths where to look for font files. After setting such a path, each font found will render a "
"specific generator. The generator can be found under the font file's name. As the text generator is also the basis "

View File

@ -289,13 +289,13 @@ Class<db::LayoutToNetlist> decl_dbLayoutToNetlist ("db", "LayoutToNetlist",
gsi::method ("name", (const std::string &(db::LayoutToNetlist::*) () const) &db::LayoutToNetlist::name,
"@brief Gets the name of the database\n"
) +
gsi::method ("name=", &db::LayoutToNetlist::set_name,
gsi::method ("name=", &db::LayoutToNetlist::set_name, gsi::arg ("name"),
"@brief Sets the name of the database\n"
) +
gsi::method ("description", (const std::string &(db::LayoutToNetlist::*) () const) &db::LayoutToNetlist::name,
"@brief Gets the description of the database\n"
) +
gsi::method ("description=", &db::LayoutToNetlist::set_name,
gsi::method ("description=", &db::LayoutToNetlist::set_name, gsi::arg ("description"),
"@brief Sets the description of the database\n"
) +
gsi::method ("filename", &db::LayoutToNetlist::filename,
@ -306,7 +306,7 @@ Class<db::LayoutToNetlist> decl_dbLayoutToNetlist ("db", "LayoutToNetlist",
"@brief Gets the original file name of the database\n"
"The original filename is the layout file from which the netlist DB was created."
) +
gsi::method ("original_file=", &db::LayoutToNetlist::set_original_file,
gsi::method ("original_file=", &db::LayoutToNetlist::set_original_file, gsi::arg ("path"),
"@brief Sets the original file name of the database\n"
) +
gsi::method ("layer_name", (std::string (db::LayoutToNetlist::*) (const db::ShapeCollection &region) const) &db::LayoutToNetlist::name, gsi::arg ("l"),

View File

@ -276,7 +276,7 @@ Class<db::Device> decl_dbDevice (decl_dbNetlistObject, "db", "Device",
"@brief Gets the device abstract for this device instance.\n"
"See \\DeviceAbstract for more details.\n"
) +
gsi::method ("device_abstract=", &db::Device::set_device_abstract,
gsi::method ("device_abstract=", &db::Device::set_device_abstract, gsi::arg ("device_abstract"),
"@hide\n"
"Provided for test purposes mainly. Be careful with pointers!"
) +
@ -838,7 +838,7 @@ Class<db::DeviceParameterDefinition> decl_dbDeviceParameterDefinition ("db", "De
"For parameters in micrometers - for example W and L of MOS devices - this factor can be set to 1e-6 to reflect "
"the unit."
) +
gsi::method ("si_scaling=", &db::DeviceParameterDefinition::set_si_scaling,
gsi::method ("si_scaling=", &db::DeviceParameterDefinition::set_si_scaling, gsi::arg ("flag"),
"@brief Sets the scaling factor to SI units.\n"
"\n"
"This setter has been added in version 0.28.6."
@ -850,7 +850,7 @@ Class<db::DeviceParameterDefinition> decl_dbDeviceParameterDefinition ("db", "De
"\n"
"This attribute has been added in version 0.28.6."
) +
gsi::method ("geo_scaling_exponent=", &db::DeviceParameterDefinition::set_geo_scaling_exponent,
gsi::method ("geo_scaling_exponent=", &db::DeviceParameterDefinition::set_geo_scaling_exponent, gsi::arg ("expo"),
"@brief Sets the geometry scaling exponent.\n"
"See \\geo_scaling_exponent for details.\n"
"\n"
@ -1979,7 +1979,7 @@ Class<db::Netlist> decl_dbNetlist ("db", "Netlist",
"@brief Flattens all circuits of the netlist\n"
"After calling this method, only the top circuits will remain."
) +
gsi::method ("flatten_circuits", &db::Netlist::flatten_circuits,
gsi::method ("flatten_circuits", &db::Netlist::flatten_circuits, gsi::arg ("circuits"),
"@brief Flattens all given circuits of the netlist\n"
"This method is equivalent to calling \\flatten_circuit for all given circuits, but more efficient.\n"
"\n"
@ -2333,7 +2333,7 @@ Class<db::NetlistSpiceWriter> db_NetlistSpiceWriter (db_NetlistWriter, "db", "Ne
gsi::constructor ("new", &new_spice_writer,
"@brief Creates a new writer without delegate.\n"
) +
gsi::constructor ("new", &new_spice_writer2,
gsi::constructor ("new", &new_spice_writer2, gsi::arg ("delegate"),
"@brief Creates a new writer with a delegate.\n"
) +
gsi::method ("use_net_names=", &db::NetlistSpiceWriter::set_use_net_names, gsi::arg ("f"),

View File

@ -319,7 +319,7 @@ namespace gsi
gsi::method ("clear", &db::LayerMap::clear,
"@brief Clears the map\n"
) +
gsi::method ("from_string", &db::LayerMap::from_string_file_format,
gsi::method ("from_string", &db::LayerMap::from_string_file_format, gsi::arg ("s"),
"@brief Creates a layer map from the given string\n"
"The format of the string is that used in layer mapping files: one mapping entry "
"per line, comments are allowed using '#' or '//'. The format of each line is that "

View File

@ -396,7 +396,7 @@ Class<db::RecursiveShapeIterator> decl_RecursiveShapeIterator ("db", "RecursiveS
"\n"
"This method has been introduced in version 0.27.\n"
) +
gsi::method_ext ("global_dtrans=", &si_set_global_dtrans,
gsi::method_ext ("global_dtrans=", &si_set_global_dtrans, gsi::arg ("t"),
"@brief Sets the global transformation to apply to all shapes delivered (transformation in micrometer units)\n"
"The global transformation will be applied to all shapes delivered by biasing the \"trans\" attribute.\n"
"The search regions apply to the coordinate space after global transformation.\n"

View File

@ -235,6 +235,22 @@ static void insert_si2 (db::Region *r, db::RecursiveShapeIterator si, db::ICplxT
}
}
static db::Region delaunay (const db::Region *r)
{
db::TriangulationProcessor tri (0.0, 0.0);
db::Region res = r->processed (tri);
res.set_merged_semantics (false);
return res;
}
static db::Region refined_delaunay (const db::Region *r, double max_area, double min_b)
{
db::TriangulationProcessor tri (max_area, min_b);
db::Region res = r->processed (tri);
res.set_merged_semantics (false);
return res;
}
static db::Region minkowski_sum_pe (const db::Region *r, const db::Edge &e)
{
return r->processed (db::minkowski_sum_computation<db::Edge> (e));
@ -2354,6 +2370,37 @@ Class<db::Region> decl_Region (decl_dbShapeCollection, "db", "Region",
"\n"
"This method has been introduced in version 0.26."
) +
method_ext ("delaunay", &delaunay,
"@brief Computes a constrained Delaunay triangulation from the given region\n"
"\n"
"@return A new region holding the triangles of the constrained Delaunay triangulation.\n"
"\n"
"Note that the result is a region in raw mode as otherwise the triangles are likely to get "
"merged later on.\n"
"\n"
"This method has been introduced in version 0.29."
) +
method_ext ("delaunay", &refined_delaunay, gsi::arg ("max_area"), gsi::arg ("min_b", 1.0),
"@brief Computes a refined, constrained Delaunay triangulation from the given region\n"
"\n"
"@return A new region holding the triangles of the refined, constrained Delaunay triangulation.\n"
"\n"
"Refinement is implemented by Chew's second algorithm. A maximum area can be given. Triangles "
"larger than this area will be split. In addition 'skinny' triangles will be resolved where "
"possible. 'skinny' is defined in terms of shortest edge to circumcircle radius ratio (b). "
"A minimum number for b can be given. The default of 1.0 corresponds to a minimum angle of 30 degree "
"and is usually a good choice. The algorithm is stable up to roughly 1.2 which corresponds to "
"a minimum angle of abouth 37 degree.\n"
"\n"
"The area value is given in terms of DBU units. Picking a value of 0.0 for area and min b will "
"make the implementation skip the refinement step. In that case, the results are identical to "
"the standard constrained Delaunay triangulation.\n"
"\n"
"Note that the result is a region in raw mode as otherwise the triangles are likely to get "
"merged later on.\n"
"\n"
"This method has been introduced in version 0.29."
) +
method_ext ("minkowski_sum|#minkowsky_sum", &minkowski_sum_pe, gsi::arg ("e"),
"@brief Compute the Minkowski sum of the region and an edge\n"
"\n"

View File

@ -1151,7 +1151,7 @@ Class<db::Shape> decl_Shape ("db", "Shape",
"\n"
"The \\Layout object can be used to retrieve the actual properties associated with the ID."
) +
gsi::method_ext ("prop_id=", &set_prop_id,
gsi::method_ext ("prop_id=", &set_prop_id, gsi::arg ("id"),
"@brief Sets the properties ID of this shape\n"
"\n"
"The \\Layout object can be used to retrieve an ID for a given set of properties. "

View File

@ -159,7 +159,7 @@ struct trans_defs
"@param c The original transformation\n"
"@param u The Additional displacement\n"
) +
constructor ("new", &new_cxy, arg ("c"), arg ("x"), arg ("y"),
constructor ("new", &new_cxy, arg ("c"), arg ("x", 0), arg ("y", 0),
"@brief Creates a transformation from another transformation plus a displacement\n"
"\n"
"Creates a new transformation from a existing transformation. This constructor is provided for creating duplicates "
@ -172,7 +172,7 @@ struct trans_defs
"@param x The Additional displacement (x)\n"
"@param y The Additional displacement (y)\n"
) +
constructor ("new", &new_rmu, arg ("rot"), arg ("mirr", false), arg ("u", displacement_type ()),
constructor ("new", &new_rmu, arg ("rot", 0), arg ("mirrx", false), arg ("u", displacement_type ()),
"@brief Creates a transformation using angle and mirror flag\n"
"\n"
"The sequence of operations is: mirroring at x axis,\n"
@ -182,7 +182,7 @@ struct trans_defs
"@param mirrx True, if mirrored at x axis\n"
"@param u The displacement\n"
) +
constructor ("new", &new_rmxy, arg ("rot"), arg ("mirr"), arg ("x"), arg ("y"),
constructor ("new", &new_rmxy, arg ("rot", 0), arg ("mirrx", false), arg ("x", 0), arg ("y", 0),
"@brief Creates a transformation using angle and mirror flag and two coordinate values for displacement\n"
"\n"
"The sequence of operations is: mirroring at x axis,\n"
@ -569,7 +569,7 @@ struct cplx_trans_defs
return new C (C (u) * C (mag) * c);
}
static C *new_cmxy (const C &c, double mag, coord_type x, coord_type y)
static C *new_cmxy (const C &c, double mag, target_coord_type x, target_coord_type y)
{
return new C (C (displacement_type (x, y)) * C (mag) * c);
}
@ -584,29 +584,24 @@ struct cplx_trans_defs
return new C (u);
}
static C *new_t (const simple_trans_type &t)
static C *new_tm (const simple_trans_type &t, double mag)
{
return new C (t, 1.0, 1.0);
return new C (t, 1.0, mag);
}
static C *new_tm (const simple_trans_type &t, double m)
static C *new_m (double mag)
{
return new C (t, 1.0, m);
return new C (mag);
}
static C *new_m (double m)
static C *new_mrmu (double mag, double r, bool mirrx, const displacement_type &u)
{
return new C (m);
return new C (mag, r, mirrx, u);
}
static C *new_mrmu (double mag, double r, bool m, const displacement_type &u)
static C *new_mrmxy (double mag, double r, bool mirrx, target_coord_type x, target_coord_type y)
{
return new C (mag, r, m, u);
}
static C *new_mrmxy (double mag, double r, bool m, target_coord_type x, target_coord_type y)
{
return new C (mag, r, m, displacement_type (x, y));
return new C (mag, r, mirrx, displacement_type (x, y));
}
static simple_trans_type s_trans (const C *cplx_trans)
@ -650,7 +645,7 @@ struct cplx_trans_defs
constructor ("new", &new_v,
"@brief Creates a unit transformation\n"
) +
constructor ("new", &new_cmu, arg ("c"), arg ("m", 1.0), arg ("u", displacement_type ()),
constructor ("new", &new_cmu, arg ("c"), arg ("mag", 1.0), arg ("u", displacement_type ()),
"@brief Creates a transformation from another transformation plus a magnification and displacement\n"
"\n"
"Creates a new transformation from a existing transformation. This constructor is provided for creating duplicates "
@ -662,7 +657,7 @@ struct cplx_trans_defs
"@param c The original transformation\n"
"@param u The Additional displacement\n"
) +
constructor ("new", &new_cmxy, arg ("c"), arg ("m"), arg ("x"), arg ("y"),
constructor ("new", &new_cmxy, arg ("c"), arg ("mag", 1.0), arg ("x", 0), arg ("y", 0),
"@brief Creates a transformation from another transformation plus a magnification and displacement\n"
"\n"
"Creates a new transformation from a existing transformation. This constructor is provided for creating duplicates "
@ -684,21 +679,11 @@ struct cplx_trans_defs
"@param x The x displacement\n"
"@param y The y displacement\n"
) +
constructor ("new", &new_m, arg ("m"),
"@brief Creates a transformation from a magnification\n"
"\n"
"Creates a magnifying transformation without displacement and rotation given the magnification m."
) +
constructor ("new", &new_tm, arg ("t"), arg ("m"),
constructor ("new", &new_tm, arg ("t"), arg ("mag", 1.0),
"@brief Creates a transformation from a simple transformation and a magnification\n"
"\n"
"Creates a magnifying transformation from a simple transformation and a magnification."
) +
constructor ("new", &new_t, arg ("t"),
"@brief Creates a transformation from a simple transformation alone\n"
"\n"
"Creates a magnifying transformation from a simple transformation and a magnification of 1.0."
) +
constructor ("new", &new_u, arg ("u"),
"@brief Creates a transformation from a displacement\n"
"\n"
@ -706,7 +691,7 @@ struct cplx_trans_defs
"\n"
"This method has been added in version 0.25."
) +
constructor ("new", &new_mrmu, arg ("mag"), arg ("rot"), arg ("mirrx"), arg ("u"),
constructor ("new", &new_mrmu, arg ("mag", 1.0), arg ("rot", 0.0), arg ("mirrx", false), arg ("u", displacement_type ()),
"@brief Creates a transformation using magnification, angle, mirror flag and displacement\n"
"\n"
"The sequence of operations is: magnification, mirroring at x axis,\n"
@ -717,7 +702,7 @@ struct cplx_trans_defs
"@param mirrx True, if mirrored at x axis\n"
"@param u The displacement\n"
) +
constructor ("new", &new_mrmxy, arg ("mag"), arg ("rot"), arg ("mirrx"), arg ("x"), arg ("y"),
constructor ("new", &new_mrmxy, arg ("mag", 1.0), arg ("rot", 0.0), arg ("mirrx", false), arg ("x", 0), arg ("y", 0),
"@brief Creates a transformation using magnification, angle, mirror flag and displacement\n"
"\n"
"The sequence of operations is: magnification, mirroring at x axis,\n"

View File

@ -215,8 +215,8 @@ TEST(4_distance)
db::Edge e4 (db::Point (200, 0), db::Point (300, 0));
db::Edge e5 (db::Point (200, 100), db::Point (300, 100));
EXPECT_EQ (db::EdgePair (e1, e1).distance (), 0);
EXPECT_EQ (db::EdgePair (e1, e2).distance (), 200);
EXPECT_EQ (db::EdgePair (e3, e2).distance (), 100);
EXPECT_EQ (db::EdgePair (e3, e5).distance (), 141);
EXPECT_EQ (db::EdgePair (e1, e1).distance (), 0u);
EXPECT_EQ (db::EdgePair (e1, e2).distance (), 200u);
EXPECT_EQ (db::EdgePair (e3, e2).distance (), 100u);
EXPECT_EQ (db::EdgePair (e3, e5).distance (), 141u);
}

View File

@ -107,16 +107,16 @@ TEST(2)
EXPECT_EQ (db::Edge (10,20,110,222).contains (db::Point (0, 0)), false);
EXPECT_EQ (db::Edge (10,20,110,222).contains (db::Point (100, 200)), false);
EXPECT_EQ (db::Edge (10,20,110,20).euclidian_distance (db::Point (100, 120)), 100);
EXPECT_EQ (db::Edge (10,20,110,20).euclidian_distance (db::Point (100, -80)), 100);
EXPECT_EQ (db::Edge (10,20,110,20).euclidian_distance (db::Point (-90, 120)), 141);
EXPECT_EQ (db::Edge (10,20,110,20).euclidian_distance (db::Point (-90, -80)), 141);
EXPECT_EQ (db::Edge (10,20,110,20).euclidian_distance (db::Point (210, 120)), 141);
EXPECT_EQ (db::Edge (10,20,110,20).euclidian_distance (db::Point (210, -80)), 141);
EXPECT_EQ (db::Edge (10,20,110,20).euclidian_distance (db::Point (-90, 20)), 100);
EXPECT_EQ (db::Edge (10,20,110,20).euclidian_distance (db::Point (10, 20)), 0);
EXPECT_EQ (db::Edge (10,20,110,20).euclidian_distance (db::Point (50, 20)), 0);
EXPECT_EQ (db::Edge (10,20,110,20).euclidian_distance (db::Point (110, 20)), 0);
EXPECT_EQ (db::Edge (10,20,110,20).euclidian_distance (db::Point (100, 120)), 100u);
EXPECT_EQ (db::Edge (10,20,110,20).euclidian_distance (db::Point (100, -80)), 100u);
EXPECT_EQ (db::Edge (10,20,110,20).euclidian_distance (db::Point (-90, 120)), 141u);
EXPECT_EQ (db::Edge (10,20,110,20).euclidian_distance (db::Point (-90, -80)), 141u);
EXPECT_EQ (db::Edge (10,20,110,20).euclidian_distance (db::Point (210, 120)), 141u);
EXPECT_EQ (db::Edge (10,20,110,20).euclidian_distance (db::Point (210, -80)), 141u);
EXPECT_EQ (db::Edge (10,20,110,20).euclidian_distance (db::Point (-90, 20)), 100u);
EXPECT_EQ (db::Edge (10,20,110,20).euclidian_distance (db::Point (10, 20)), 0u);
EXPECT_EQ (db::Edge (10,20,110,20).euclidian_distance (db::Point (50, 20)), 0u);
EXPECT_EQ (db::Edge (10,20,110,20).euclidian_distance (db::Point (110, 20)), 0u);
}
TEST(3)

View File

@ -482,7 +482,7 @@ TEST(4)
el.layer_properties_dirty = false;
EXPECT_EQ (g.get_layer_maybe (db::LayerProperties (42, 17)), -1);
EXPECT_EQ (el.layer_properties_dirty, false);
EXPECT_EQ (g.get_layer (db::LayerProperties (42, 17)) >= 0, true);
g.get_layer (db::LayerProperties (42, 17));
EXPECT_EQ (el.layer_properties_dirty, true); // new layer got inserted
}

View File

@ -0,0 +1,516 @@
/*
KLayout Layout Viewer
Copyright (C) 2006-2024 Matthias Koefferlein
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "dbTriangle.h"
#include "tlUnitTest.h"
#include <list>
#include <memory>
class TestableTriangleEdge
: public db::TriangleEdge
{
public:
using db::TriangleEdge::TriangleEdge;
using db::TriangleEdge::link;
using db::TriangleEdge::unlink;
TestableTriangleEdge (db::Vertex *v1, db::Vertex *v2)
: db::TriangleEdge (v1, v2)
{ }
};
// Tests for Vertex class
TEST(Vertex_basic)
{
db::Vertex v;
v.set_x (1.5);
v.set_y (0.5);
EXPECT_EQ (v.to_string (), "(1.5, 0.5)");
EXPECT_EQ (v.x (), 1.5);
EXPECT_EQ (v.y (), 0.5);
v = db::Vertex (db::DPoint (2, 3));
EXPECT_EQ (v.to_string (), "(2, 3)");
v.set_level (42);
EXPECT_EQ (v.level (), size_t (42));
}
static std::string edges_from_vertex (const db::Vertex &v)
{
std::string res;
for (auto e = v.begin_edges (); e != v.end_edges (); ++e) {
if (! res.empty ()) {
res += ", ";
}
res += (*e)->to_string ();
}
return res;
}
static std::string triangles_from_vertex (const db::Vertex &v)
{
auto tri = v.triangles ();
std::string res;
for (auto t = tri.begin (); t != tri.end (); ++t) {
if (! res.empty ()) {
res += ", ";
}
res += (*t)->to_string ();
}
return res;
}
TEST(Vertex_edge_registration)
{
db::Vertex v1 (0, 0);
db::Vertex v2 (1, 2);
db::Vertex v3 (2, 1);
std::unique_ptr<TestableTriangleEdge> e1 (new TestableTriangleEdge (&v1, &v2));
e1->link ();
EXPECT_EQ (edges_from_vertex (v1), "((0, 0), (1, 2))");
EXPECT_EQ (edges_from_vertex (v2), "((0, 0), (1, 2))");
EXPECT_EQ (edges_from_vertex (v3), "");
std::unique_ptr<TestableTriangleEdge> e2 (new TestableTriangleEdge (&v2, &v3));
e2->link ();
EXPECT_EQ (edges_from_vertex (v1), "((0, 0), (1, 2))");
EXPECT_EQ (edges_from_vertex (v2), "((0, 0), (1, 2)), ((1, 2), (2, 1))");
EXPECT_EQ (edges_from_vertex (v3), "((1, 2), (2, 1))");
e2->unlink ();
e2.reset (0);
EXPECT_EQ (edges_from_vertex (v1), "((0, 0), (1, 2))");
EXPECT_EQ (edges_from_vertex (v2), "((0, 0), (1, 2))");
EXPECT_EQ (edges_from_vertex (v3), "");
e1->unlink ();
e1.reset (0);
EXPECT_EQ (edges_from_vertex (v1), "");
EXPECT_EQ (edges_from_vertex (v2), "");
EXPECT_EQ (edges_from_vertex (v3), "");
}
TEST(Vertex_triangles)
{
db::Vertex v1 (0, 0);
db::Vertex v2 (1, 2);
db::Vertex v3 (2, 1);
db::Vertex v4 (-1, 2);
EXPECT_EQ (triangles_from_vertex (v1), "");
std::unique_ptr<TestableTriangleEdge> e1 (new TestableTriangleEdge (&v1, &v2));
e1->link ();
std::unique_ptr<TestableTriangleEdge> e2 (new TestableTriangleEdge (&v2, &v3));
e2->link ();
std::unique_ptr<TestableTriangleEdge> e3 (new TestableTriangleEdge (&v3, &v1));
e3->link ();
std::unique_ptr<db::Triangle> tri (new db::Triangle (e1.get (), e2.get (), e3.get ()));
EXPECT_EQ (triangles_from_vertex (v1), "((0, 0), (1, 2), (2, 1))");
EXPECT_EQ (triangles_from_vertex (v2), "((0, 0), (1, 2), (2, 1))");
EXPECT_EQ (triangles_from_vertex (v3), "((0, 0), (1, 2), (2, 1))");
std::unique_ptr<TestableTriangleEdge> e4 (new TestableTriangleEdge (&v1, &v4));
e4->link ();
std::unique_ptr<TestableTriangleEdge> e5 (new TestableTriangleEdge (&v2, &v4));
e5->link ();
std::unique_ptr<db::Triangle> tri2 (new db::Triangle (e1.get (), e4.get (), e5.get ()));
EXPECT_EQ (triangles_from_vertex (v1), "((0, 0), (-1, 2), (1, 2)), ((0, 0), (1, 2), (2, 1))");
EXPECT_EQ (triangles_from_vertex (v2), "((0, 0), (-1, 2), (1, 2)), ((0, 0), (1, 2), (2, 1))");
EXPECT_EQ (triangles_from_vertex (v3), "((0, 0), (1, 2), (2, 1))");
EXPECT_EQ (triangles_from_vertex (v4), "((0, 0), (-1, 2), (1, 2))");
tri->unlink ();
EXPECT_EQ (triangles_from_vertex (v1), "((0, 0), (-1, 2), (1, 2))");
tri2->unlink ();
EXPECT_EQ (triangles_from_vertex (v1), "");
}
// Tests for Triangle class
TEST(Triangle_basic)
{
db::Vertex v1;
db::Vertex v2 (1, 2);
db::Vertex v3 (2, 1);
TestableTriangleEdge s1 (&v1, &v2);
TestableTriangleEdge s2 (&v2, &v3);
TestableTriangleEdge s3 (&v3, &v1);
EXPECT_EQ (s1.v1 () == &v1, true);
EXPECT_EQ (s2.v2 () == &v3, true);
db::Triangle tri (&s1, &s2, &s3);
EXPECT_EQ (tri.to_string (), "((0, 0), (1, 2), (2, 1))");
EXPECT_EQ (tri.edge (-1) == &s3, true);
EXPECT_EQ (tri.edge (0) == &s1, true);
EXPECT_EQ (tri.edge (1) == &s2, true);
EXPECT_EQ (tri.edge (3) == &s1, true);
// ordering
TestableTriangleEdge s11 (&v1, &v2);
TestableTriangleEdge s12 (&v3, &v2);
TestableTriangleEdge s13 (&v1, &v3);
db::Triangle tri2 (&s11, &s12, &s13);
EXPECT_EQ (tri2.to_string (), "((0, 0), (1, 2), (2, 1))");
// triangle registration
EXPECT_EQ (s11.right () == &tri2, true);
EXPECT_EQ (s11.left () == 0, true);
EXPECT_EQ (s12.left () == &tri2, true);
EXPECT_EQ (s12.right () == 0, true);
EXPECT_EQ (s13.left () == &tri2, true);
EXPECT_EQ (s13.right () == 0, true);
EXPECT_EQ (s13.to_string (), "((0, 0), (2, 1))");
s13.reverse ();
EXPECT_EQ (s13.to_string (), "((2, 1), (0, 0))");
EXPECT_EQ (s13.right () == &tri2, true);
EXPECT_EQ (s13.left () == 0, true);
// flags
EXPECT_EQ (tri.is_outside (), false);
tri.set_outside (true);
EXPECT_EQ (tri.is_outside (), true);
}
TEST(Triangle_find_segment_with)
{
db::Vertex v1;
db::Vertex v2 (1, 2);
db::Vertex v3 (2, 1);
TestableTriangleEdge s1 (&v1, &v2);
TestableTriangleEdge s2 (&v2, &v3);
TestableTriangleEdge s3 (&v3, &v1);
db::Triangle tri (&s1, &s2, &s3);
EXPECT_EQ (tri.find_edge_with (&v1, &v2)->to_string (), "((0, 0), (1, 2))");
EXPECT_EQ (tri.find_edge_with (&v2, &v1)->to_string (), "((0, 0), (1, 2))");
}
TEST(Triangle_ext_vertex)
{
db::Vertex v1;
db::Vertex v2 (1, 2);
db::Vertex v3 (2, 1);
TestableTriangleEdge s1 (&v1, &v2);
TestableTriangleEdge s2 (&v2, &v3);
TestableTriangleEdge s3 (&v3, &v1);
db::Triangle tri (&s1, &s2, &s3);
EXPECT_EQ (tri.opposite (&s1)->to_string (), "(2, 1)");
EXPECT_EQ (tri.opposite (&s3)->to_string (), "(1, 2)");
}
TEST(Triangle_opposite_vertex)
{
db::Vertex v1;
db::Vertex v2 (1, 2);
db::Vertex v3 (2, 1);
TestableTriangleEdge s1 (&v1, &v2);
TestableTriangleEdge s2 (&v2, &v3);
TestableTriangleEdge s3 (&v3, &v1);
db::Triangle tri (&s1, &s2, &s3);
EXPECT_EQ (tri.opposite (&s1)->to_string (), "(2, 1)");
EXPECT_EQ (tri.opposite (&s3)->to_string (), "(1, 2)");
}
TEST(Triangle_opposite_edge)
{
db::Vertex v1;
db::Vertex v2 (1, 2);
db::Vertex v3 (2, 1);
TestableTriangleEdge s1 (&v1, &v2);
TestableTriangleEdge s2 (&v2, &v3);
TestableTriangleEdge s3 (&v3, &v1);
db::Triangle tri (&s1, &s2, &s3);
EXPECT_EQ (tri.opposite (&v1)->to_string (), "((1, 2), (2, 1))");
EXPECT_EQ (tri.opposite (&v3)->to_string (), "((0, 0), (1, 2))");
}
TEST(Triangle_contains)
{
db::Vertex v1;
db::Vertex v2 (1, 2);
db::Vertex v3 (2, 1);
TestableTriangleEdge s1 (&v1, &v2);
TestableTriangleEdge s2 (&v2, &v3);
TestableTriangleEdge s3 (&v3, &v1);
{
db::Triangle tri (&s1, &s2, &s3);
EXPECT_EQ (tri.contains (db::DPoint (0, 0)), 0);
EXPECT_EQ (tri.contains (db::DPoint (-1, -2)), -1);
EXPECT_EQ (tri.contains (db::DPoint (0.5, 1)), 0);
EXPECT_EQ (tri.contains (db::DPoint (0.5, 2)), -1);
EXPECT_EQ (tri.contains (db::DPoint (2.5, 1)), -1);
EXPECT_EQ (tri.contains (db::DPoint (1, -1)), -1);
EXPECT_EQ (tri.contains (db::DPoint (1, 1)), 1);
}
s1.reverse ();
s2.reverse ();
s3.reverse ();
{
db::Triangle tri2 (&s3, &s2, &s1);
EXPECT_EQ (tri2.contains(db::DPoint(0, 0)), 0);
EXPECT_EQ (tri2.contains(db::DPoint(0.5, 1)), 0);
EXPECT_EQ (tri2.contains(db::DPoint(0.5, 2)), -1);
EXPECT_EQ (tri2.contains(db::DPoint(2.5, 1)), -1);
EXPECT_EQ (tri2.contains(db::DPoint(1, -1)), -1);
EXPECT_EQ (tri2.contains(db::DPoint(1, 1)), 1);
}
}
TEST(Triangle_circumcircle)
{
db::Vertex v1;
db::Vertex v2 (1, 2);
db::Vertex v3 (2, 1);
TestableTriangleEdge s1 (&v1, &v2);
TestableTriangleEdge s2 (&v2, &v3);
TestableTriangleEdge s3 (&v3, &v1);
db::Triangle tri (&s1, &s2, &s3);
auto cc = tri.circumcircle ();
auto center = cc.first;
auto radius = cc.second;
EXPECT_EQ (tl::to_string (center), "0.833333333333,0.833333333333");
EXPECT_EQ (tl::to_string (radius), "1.17851130198");
EXPECT_EQ (db::Vertex::in_circle (center, center, radius), 1);
EXPECT_EQ (db::Vertex::in_circle (db::DPoint (-1, -1), center, radius), -1);
EXPECT_EQ (v1.in_circle (center, radius), 0);
EXPECT_EQ (v2.in_circle (center, radius), 0);
EXPECT_EQ (v3.in_circle (center, radius), 0);
}
// Tests for TriangleEdge class
TEST(TriangleEdge_basic)
{
db::Vertex v1;
db::Vertex v2 (1, 0.5);
TestableTriangleEdge edge (&v1, &v2);
EXPECT_EQ (edge.to_string (), "((0, 0), (1, 0.5))");
EXPECT_EQ (edge.is_segment (), false);
edge.set_is_segment (true);
EXPECT_EQ (edge.is_segment (), true);
EXPECT_EQ (edge.level (), size_t (0));
edge.set_level (42);
EXPECT_EQ (edge.level (), size_t (42));
EXPECT_EQ (edge.other (&v1) == &v2, true);
EXPECT_EQ (edge.other (&v2) == &v1, true);
}
TEST(TriangleEdge_triangles)
{
db::Vertex v1 (0, 0);
db::Vertex v2 (1, 2);
db::Vertex v3 (2, 1);
db::Vertex v4 (-1, 2);
std::unique_ptr<TestableTriangleEdge> e1 (new TestableTriangleEdge (&v1, &v2));
std::unique_ptr<TestableTriangleEdge> e2 (new TestableTriangleEdge (&v2, &v3));
std::unique_ptr<TestableTriangleEdge> e3 (new TestableTriangleEdge (&v3, &v1));
std::unique_ptr<db::Triangle> tri (new db::Triangle (e1.get (), e2.get (), e3.get ()));
std::unique_ptr<TestableTriangleEdge> e4 (new TestableTriangleEdge (&v1, &v4));
std::unique_ptr<TestableTriangleEdge> e5 (new TestableTriangleEdge (&v2, &v4));
std::unique_ptr<db::Triangle> tri2 (new db::Triangle (e1.get (), e4.get (), e5.get ()));
EXPECT_EQ (e1->is_outside (), false);
EXPECT_EQ (e2->is_outside (), true);
EXPECT_EQ (e4->is_outside (), true);
EXPECT_EQ (e1->is_for_outside_triangles (), false);
tri->set_outside (true);
EXPECT_EQ (e1->is_for_outside_triangles (), true);
EXPECT_EQ (e1->has_triangle (tri.get ()), true);
EXPECT_EQ (e1->has_triangle (tri2.get ()), true);
EXPECT_EQ (e4->has_triangle (tri.get ()), false);
EXPECT_EQ (e4->has_triangle (tri2.get ()), true);
EXPECT_EQ (e1->other (tri.get ()) == tri2.get (), true);
EXPECT_EQ (e1->other (tri2.get ()) == tri.get (), true);
EXPECT_EQ (e1->common_vertex (e2.get ()) == &v2, true);
EXPECT_EQ (e2->common_vertex (e4.get ()) == 0, true);
tri->unlink ();
EXPECT_EQ (e1->has_triangle (tri.get ()), false);
EXPECT_EQ (e1->has_triangle (tri2.get ()), true);
}
TEST(TriangleEdge_side_of)
{
db::Vertex v1;
db::Vertex v2 (1, 0.5);
TestableTriangleEdge edge (&v1, &v2);
EXPECT_EQ (edge.to_string (), "((0, 0), (1, 0.5))");
EXPECT_EQ (edge.side_of (db::Vertex (0, 0)), 0)
EXPECT_EQ (edge.side_of (db::Vertex (0.5, 0.25)), 0)
EXPECT_EQ (edge.side_of (db::Vertex (0, 1)), -1)
EXPECT_EQ (edge.side_of (db::Vertex (0, -1)), 1)
EXPECT_EQ (edge.side_of (db::Vertex (0.5, 0.5)), -1)
EXPECT_EQ (edge.side_of (db::Vertex (0.5, 0)), 1)
db::Vertex v3 (1, 0);
db::Vertex v4 (0, 1);
TestableTriangleEdge edge2 (&v3, &v4);
EXPECT_EQ (edge2.side_of (db::Vertex(0.2, 0.2)), -1);
}
namespace {
class VertexHeap
{
public:
db::Vertex *make_vertex (double x, double y)
{
m_heap.push_back (db::Vertex (x, y));
return &m_heap.back ();
}
private:
std::list<db::Vertex> m_heap;
};
}
TEST(TriangleEdge_crosses)
{
VertexHeap heap;
TestableTriangleEdge s1 (heap.make_vertex (0, 0), heap.make_vertex (1, 0.5));
EXPECT_EQ (s1.crosses (TestableTriangleEdge (heap.make_vertex (-1, -0.5), heap.make_vertex(1, -0.5))), false);
EXPECT_EQ (s1.crosses (TestableTriangleEdge (heap.make_vertex (-1, 0), heap.make_vertex(1, 0))), false); // only cuts
EXPECT_EQ (s1.crosses (TestableTriangleEdge (heap.make_vertex (-1, 0.5), heap.make_vertex(1, 0.5))), false);
EXPECT_EQ (s1.crosses (TestableTriangleEdge (heap.make_vertex (-1, 0.5), heap.make_vertex(2, 0.5))), false);
EXPECT_EQ (s1.crosses (TestableTriangleEdge (heap.make_vertex (-1, 0.25), heap.make_vertex(2, 0.25))), true);
EXPECT_EQ (s1.crosses (TestableTriangleEdge (heap.make_vertex (-1, 0.5), heap.make_vertex(-0.1, 0.5))), false);
EXPECT_EQ (s1.crosses (TestableTriangleEdge (heap.make_vertex (-1, 0.6), heap.make_vertex(0, 0.6))), false);
EXPECT_EQ (s1.crosses (TestableTriangleEdge (heap.make_vertex (-1, 1), heap.make_vertex(1, 1))), false);
EXPECT_EQ (s1.crosses_including (TestableTriangleEdge (heap.make_vertex (-1, -0.5), heap.make_vertex(1, -0.5))), false);
EXPECT_EQ (s1.crosses_including (TestableTriangleEdge (heap.make_vertex (-1, 0), heap.make_vertex(1, 0))), true); // only cuts
EXPECT_EQ (s1.crosses_including (TestableTriangleEdge (heap.make_vertex (-1, 0.25), heap.make_vertex(2, 0.25))), true);
}
TEST(TriangleEdge_point_on)
{
VertexHeap heap;
TestableTriangleEdge s1 (heap.make_vertex (0, 0), heap.make_vertex (1, 0.5));
EXPECT_EQ (s1.point_on (db::DPoint (0, 0)), false); // endpoints are not "on"
EXPECT_EQ (s1.point_on (db::DPoint (0, -0.5)), false);
EXPECT_EQ (s1.point_on (db::DPoint (0.5, 0)), false);
EXPECT_EQ (s1.point_on (db::DPoint (0.5, 0.25)), true);
EXPECT_EQ (s1.point_on (db::DPoint (1, 0.5)), false); // endpoints are not "on"
EXPECT_EQ (s1.point_on (db::DPoint (1, 1)), false);
EXPECT_EQ (s1.point_on (db::DPoint (2, 1)), false);
}
TEST(TriangleEdge_intersection_point)
{
VertexHeap heap;
TestableTriangleEdge s1 (heap.make_vertex (0, 0), heap.make_vertex (1, 0.5));
EXPECT_EQ (s1.intersection_point (TestableTriangleEdge (heap.make_vertex (-1, 0.25), heap.make_vertex (2, 0.25))).to_string (), "0.5,0.25");
}
TEST(TriangleEdge_can_flip)
{
db::Vertex v1 (2, -1);
db::Vertex v2 (0, 0);
db::Vertex v3 (1, 0);
db::Vertex v4 (0.5, 1);
TestableTriangleEdge s1 (&v1, &v2);
TestableTriangleEdge s2 (&v1, &v3);
TestableTriangleEdge s3 (&v2, &v3);
TestableTriangleEdge s4 (&v2, &v4);
TestableTriangleEdge s5 (&v3, &v4);
db::Triangle t1 (&s1, &s2, &s3);
db::Triangle t2 (&s3, &s4, &s5);
EXPECT_EQ (s3.left () == &t2, true);
EXPECT_EQ (s3.right () == &t1, true);
EXPECT_EQ (s3.can_flip(), false);
v1.set_x (0.5);
EXPECT_EQ (s3.can_flip(), true);
v1.set_x (-0.25);
EXPECT_EQ (s3.can_flip(), true);
v1.set_x (-0.5);
EXPECT_EQ (s3.can_flip(), false);
v1.set_x (-1.0);
EXPECT_EQ (s3.can_flip(), false);
}
TEST(TriangleEdge_distance)
{
db::Vertex v1 (0, 0);
db::Vertex v2 (1, 0);
TestableTriangleEdge seg (&v1, &v2);
EXPECT_EQ (seg.distance (db::DPoint (0, 0)), 0);
EXPECT_EQ (seg.distance (db::DPoint (0, 1)), 1);
EXPECT_EQ (seg.distance (db::DPoint (1, 2)), 2);
EXPECT_EQ (seg.distance (db::DPoint (1, -1)), 1);
EXPECT_EQ (seg.distance (db::DPoint (2, 0)), 1);
EXPECT_EQ (seg.distance (db::DPoint (-2, 0)), 2);
seg.reverse ();
EXPECT_EQ (seg.distance (db::DPoint (0, 0)), 0);
EXPECT_EQ (seg.distance (db::DPoint (0, 1)), 1);
EXPECT_EQ (seg.distance (db::DPoint (1, 2)), 2);
EXPECT_EQ (seg.distance (db::DPoint (1, -1)), 1);
EXPECT_EQ (seg.distance (db::DPoint (2, 0)), 1);
EXPECT_EQ (seg.distance (db::DPoint (-2, 0)), 2);
}

View File

@ -0,0 +1,912 @@
/*
KLayout Layout Viewer
Copyright (C) 2006-2024 Matthias Koefferlein
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "dbTriangles.h"
#include "dbWriter.h"
#include "tlUnitTest.h"
#include "tlStream.h"
#include "tlFileUtils.h"
#include <set>
#include <vector>
#include <cstdlib>
#include <cmath>
class TestableTriangles
: public db::Triangles
{
public:
using db::Triangles::Triangles;
using db::Triangles::check;
using db::Triangles::dump;
using db::Triangles::flip;
using db::Triangles::insert_point;
using db::Triangles::search_edges_crossing;
using db::Triangles::find_edge_for_points;
using db::Triangles::find_points_around;
using db::Triangles::find_inside_circle;
using db::Triangles::create_constrained_delaunay;
using db::Triangles::is_illegal_edge;
using db::Triangles::find_vertex_for_point;
using db::Triangles::remove;
using db::Triangles::ensure_edge;
using db::Triangles::constrain;
using db::Triangles::remove_outside_triangles;
};
TEST(basic)
{
TestableTriangles tris;
tris.init_box (db::DBox (1, 0, 5, 4));
EXPECT_EQ (tris.bbox ().to_string (), "(1,0;5,4)");
EXPECT_EQ (tris.to_string (), "((1, 0), (1, 4), (5, 0)), ((1, 4), (5, 4), (5, 0))");
EXPECT_EQ (tris.check (), true);
}
TEST(flip)
{
TestableTriangles tris;
tris.init_box (db::DBox (0, 0, 1, 1));
EXPECT_EQ (tris.to_string (), "((0, 0), (0, 1), (1, 0)), ((0, 1), (1, 1), (1, 0))");
EXPECT_EQ (tris.num_triangles (), size_t (2));
const db::Triangle &t1 = *tris.begin ();
db::TriangleEdge *diag_segment;
for (int i = 0; i < 3; ++i) {
diag_segment = t1.edge (i);
if (diag_segment->side_of (db::DPoint (0.5, 0.5)) == 0) {
break;
}
}
tris.flip (diag_segment);
EXPECT_EQ (tris.to_string (), "((1, 1), (0, 0), (0, 1)), ((1, 1), (1, 0), (0, 0))");
EXPECT_EQ (tris.check (), true);
}
TEST(insert)
{
TestableTriangles tris;
tris.init_box (db::DBox (0, 0, 1, 1));
tris.insert_point (0.2, 0.2);
EXPECT_EQ (tris.to_string (), "((0, 0), (0, 1), (0.2, 0.2)), ((1, 0), (0, 0), (0.2, 0.2)), ((1, 1), (0.2, 0.2), (0, 1)), ((1, 1), (1, 0), (0.2, 0.2))");
EXPECT_EQ (tris.check (), true);
}
TEST(split_segment)
{
TestableTriangles tris;
tris.init_box (db::DBox (0, 0, 1, 1));
tris.insert_point (0.5, 0.5);
EXPECT_EQ (tris.to_string (), "((1, 1), (1, 0), (0.5, 0.5)), ((1, 1), (0.5, 0.5), (0, 1)), ((0, 0), (0, 1), (0.5, 0.5)), ((0, 0), (0.5, 0.5), (1, 0))");
EXPECT_EQ (tris.check(), true);
}
TEST(insert_vertex_twice)
{
TestableTriangles tris;
tris.init_box (db::DBox (0, 0, 1, 1));
tris.insert_point (0.5, 0.5);
// inserted a vertex twice does not change anything
tris.insert_point (0.5, 0.5);
EXPECT_EQ (tris.to_string (), "((1, 1), (1, 0), (0.5, 0.5)), ((1, 1), (0.5, 0.5), (0, 1)), ((0, 0), (0, 1), (0.5, 0.5)), ((0, 0), (0.5, 0.5), (1, 0))");
EXPECT_EQ (tris.check(), true);
}
TEST(insert_vertex_convex)
{
TestableTriangles tris;
tris.insert_point (0.2, 0.2);
tris.insert_point (0.2, 0.8);
tris.insert_point (0.6, 0.5);
tris.insert_point (0.7, 0.5);
tris.insert_point (0.6, 0.4);
EXPECT_EQ (tris.to_string (), "((0.2, 0.2), (0.2, 0.8), (0.6, 0.5)), ((0.7, 0.5), (0.6, 0.5), (0.2, 0.8)), ((0.6, 0.5), (0.6, 0.4), (0.2, 0.2)), ((0.6, 0.5), (0.7, 0.5), (0.6, 0.4))");
EXPECT_EQ (tris.check(), true);
}
TEST(insert_vertex_convex2)
{
TestableTriangles tris;
tris.insert_point (0.25, 0.1);
tris.insert_point (0.1, 0.4);
tris.insert_point (0.4, 0.15);
tris.insert_point (1, 0.7);
EXPECT_EQ (tris.to_string (), "((0.25, 0.1), (0.1, 0.4), (0.4, 0.15)), ((1, 0.7), (0.4, 0.15), (0.1, 0.4))");
EXPECT_EQ (tris.check(), true);
}
TEST(insert_vertex_convex3)
{
TestableTriangles tris;
tris.insert_point (0.25, 0.5);
tris.insert_point (0.25, 0.55);
tris.insert_point (0.15, 0.8);
tris.insert_point (1, 0.4);
EXPECT_EQ (tris.to_string (), "((0.25, 0.5), (0.15, 0.8), (0.25, 0.55)), ((1, 0.4), (0.25, 0.5), (0.25, 0.55)), ((0.15, 0.8), (1, 0.4), (0.25, 0.55))");
EXPECT_EQ (tris.check(), true);
}
TEST(search_edges_crossing)
{
TestableTriangles tris;
db::Vertex *v1 = tris.insert_point (0.2, 0.2);
db::Vertex *v2 = tris.insert_point (0.2, 0.8);
db::Vertex *v3 = tris.insert_point (0.6, 0.5);
/*db::Vertex *v4 =*/ tris.insert_point (0.7, 0.5);
db::Vertex *v5 = tris.insert_point (0.6, 0.4);
db::Vertex *v6 = tris.insert_point (0.7, 0.2);
EXPECT_EQ (tris.check(), true);
auto xedges = tris.search_edges_crossing (v2, v6);
EXPECT_EQ (xedges.size (), size_t (2));
auto s1 = tris.find_edge_for_points (*v1, *v3);
auto s2 = tris.find_edge_for_points (*v1, *v5);
EXPECT_EQ (std::find (xedges.begin (), xedges.end (), s1) != xedges.end (), true);
EXPECT_EQ (std::find (xedges.begin (), xedges.end (), s2) != xedges.end (), true);
}
TEST(illegal_edge1)
{
db::Vertex v1 (0, 0);
db::Vertex v2 (1.6, 1.6);
db::Vertex v3 (1, 2);
db::Vertex v4 (2, 1);
{
db::TriangleEdge e1 (&v1, &v3);
db::TriangleEdge e2 (&v3, &v4);
db::TriangleEdge e3 (&v4, &v1);
db::Triangle t1 (&e1, &e2, &e3);
db::TriangleEdge ee1 (&v2, &v3);
db::TriangleEdge ee2 (&v4, &v2);
db::Triangle t2 (&ee1, &e2, &ee2);
EXPECT_EQ (TestableTriangles::is_illegal_edge (&e2), true);
}
{
// flipped
db::TriangleEdge e1 (&v1, &v2);
db::TriangleEdge e2 (&v2, &v3);
db::TriangleEdge e3 (&v3, &v1);
db::Triangle t1 (&e1, &e2, &e3);
db::TriangleEdge ee1 (&v1, &v4);
db::TriangleEdge ee2 (&v4, &v2);
db::Triangle t2 (&ee1, &ee2, &e1);
EXPECT_EQ (TestableTriangles::is_illegal_edge (&e2), false);
}
}
TEST(illegal_edge2)
{
// numerical border case
db::Vertex v1 (773.94756216690905, 114.45875269431208);
db::Vertex v2 (773.29574734131643, 113.47402096138073);
db::Vertex v3 (773.10652961562653, 114.25497975904504);
db::Vertex v4 (774.08856345337881, 113.60495072750861);
{
db::TriangleEdge e1 (&v1, &v2);
db::TriangleEdge e2 (&v2, &v4);
db::TriangleEdge e3 (&v4, &v1);
db::Triangle t1 (&e1, &e2, &e3);
db::TriangleEdge ee1 (&v2, &v3);
db::TriangleEdge ee2 (&v3, &v4);
db::Triangle t2 (&ee1, &ee2, &e2);
EXPECT_EQ (TestableTriangles::is_illegal_edge (&e2), false);
}
{
// flipped
db::TriangleEdge e1 (&v1, &v2);
db::TriangleEdge e2 (&v2, &v3);
db::TriangleEdge e3 (&v3, &v1);
db::Triangle t1 (&e1, &e2, &e3);
db::TriangleEdge ee1 (&v1, &v4);
db::TriangleEdge ee2 (&v4, &v2);
db::Triangle t2 (&ee1, &ee2, &e1);
EXPECT_EQ (TestableTriangles::is_illegal_edge (&e1), false);
}
}
// Returns a random float number between 0.0 and 1.0
inline double flt_rand ()
{
return rand () * (1.0 / double (RAND_MAX));
}
namespace {
struct PointLessOp
{
bool operator() (const db::DPoint &a, const db::DPoint &b) const
{
return a.less (b);
}
};
}
TEST(insert_many)
{
srand (0);
TestableTriangles tris;
double res = 65536.0;
db::DBox bbox;
unsigned int n = 200000;
for (unsigned int i = 0; i < n; ++i) {
double x = round (flt_rand () * res) * 0.0001;
double y = round (flt_rand () * res) * 0.0001;
tris.insert_point (x, y);
}
EXPECT_LT (double (tris.flips ()) / double (n), 3.0);
EXPECT_LT (double (tris.hops ()) / double (n), 23.0);
}
TEST(heavy_insert)
{
tl::info << "Running test_heavy_insert " << tl::noendl;
for (unsigned int l = 0; l < 100; ++l) {
srand (l);
tl::info << "." << tl::noendl;
TestableTriangles tris;
double res = 128.0;
unsigned int n = rand () % 190 + 10;
db::DBox bbox;
std::map<db::DPoint, bool, PointLessOp> vmap;
for (unsigned int i = 0; i < n; ++i) {
double x = round (flt_rand () * res) * (1.0 / res);
double y = round (flt_rand () * res) * (1.0 / res);
db::Vertex *v = tris.insert_point (x, y);
bbox += db::DPoint (x, y);
vmap.insert (std::make_pair (*v, false));
}
// not strictly true, but very likely with at least 10 vertexes:
EXPECT_GT (tris.num_triangles (), size_t (0));
EXPECT_EQ (tris.bbox ().to_string (), bbox.to_string ());
bool ok = true;
for (auto t = tris.begin (); t != tris.end (); ++t) {
for (int i = 0; i < 3; ++i) {
auto f = vmap.find (*t->vertex (i));
if (f == vmap.end ()) {
tl::error << "Could not identify triangle vertex " << t->vertex (i)->to_string () << " as inserted vertex";
ok = false;
} else {
f->second = true;
}
}
}
for (auto m = vmap.begin (); m != vmap.end (); ++m) {
if (!m->second) {
tl::error << "Could not identify vertex " << m->first.to_string () << " with a triangle";
ok = false;
}
}
EXPECT_EQ (ok, true);
EXPECT_EQ (tris.check(), true);
}
tl::info << tl::endl << "done.";
}
TEST(heavy_remove)
{
tl::info << "Running test_heavy_remove " << tl::noendl;
for (unsigned int l = 0; l < 100; ++l) {
srand (l);
tl::info << "." << tl::noendl;
TestableTriangles tris;
double res = 128.0;
unsigned int n = rand () % 190 + 10;
for (unsigned int i = 0; i < n; ++i) {
double x = round (flt_rand () * res) * (1.0 / res);
double y = round (flt_rand () * res) * (1.0 / res);
tris.insert_point (x, y);
}
EXPECT_EQ (tris.check(), true);
std::set<db::Vertex *> vset;
std::vector<db::Vertex *> vertexes;
for (auto t = tris.begin (); t != tris.end (); ++t) {
for (int i = 0; i < 3; ++i) {
db::Vertex *v = t->vertex (i);
if (vset.insert (v).second) {
vertexes.push_back (v);
}
}
}
while (! vertexes.empty ()) {
unsigned int n = rand () % (unsigned int) vertexes.size ();
db::Vertex *v = vertexes [n];
tris.remove (v);
vertexes.erase (vertexes.begin () + n);
// just a few times as it wastes time otherwise
if (vertexes.size () % 10 == 0) {
EXPECT_EQ (tris.check (), true);
}
}
EXPECT_EQ (tris.num_triangles (), size_t (0));
}
tl::info << tl::endl << "done.";
}
TEST(ensure_edge)
{
srand (0);
TestableTriangles tris;
double res = 128.0;
db::DEdge ee[] = {
db::DEdge (0.25, 0.25, 0.25, 0.75),
db::DEdge (0.25, 0.75, 0.75, 0.75),
db::DEdge (0.75, 0.75, 0.75, 0.25),
db::DEdge (0.75, 0.25, 0.25, 0.25)
};
for (unsigned int i = 0; i < 200; ++i) {
double x = round (flt_rand () * res) * (1.0 / res);
double y = round (flt_rand () * res) * (1.0 / res);
bool ok = true;
for (unsigned int j = 0; j < sizeof (ee) / sizeof (ee[0]); ++j) {
if (ee[j].side_of (db::DPoint (x, y)) == 0) {
--i;
ok = false;
}
}
if (ok) {
tris.insert_point (x, y);
}
}
for (unsigned int i = 0; i < sizeof (ee) / sizeof (ee[0]); ++i) {
tris.insert_point (ee[i].p1 ());
}
EXPECT_EQ (tris.check (), true);
for (unsigned int i = 0; i < sizeof (ee) / sizeof (ee[0]); ++i) {
tris.ensure_edge (tris.find_vertex_for_point (ee[i].p1 ()), tris.find_vertex_for_point (ee[i].p2 ()));
}
EXPECT_EQ (tris.check (false), true);
double area_in = 0.0;
db::DBox clip_box;
for (unsigned int i = 0; i < sizeof (ee) / sizeof (ee[0]); ++i) {
clip_box += ee[i].p1 ();
}
for (auto t = tris.begin (); t != tris.end (); ++t) {
if (clip_box.overlaps (t->bbox ())) {
EXPECT_EQ (t->bbox ().inside (clip_box), true);
area_in += t->area ();
}
}
EXPECT_EQ (tl::to_string (area_in), "0.25");
}
bool safe_inside (const db::DBox &b1, const db::DBox &b2)
{
typedef db::coord_traits<db::DBox::coord_type> ct;
return (ct::less (b2.left (), b1.left ()) || ct::equal (b2.left (), b1.left ())) &&
(ct::less (b1.right (), b2.right ()) || ct::equal (b1.right (), b2.right ())) &&
(ct::less (b2.bottom (), b1.bottom ()) || ct::equal (b2.bottom (), b1.bottom ())) &&
(ct::less (b1.top (), b2.top ()) || ct::equal (b1.top (), b2.top ()));
}
TEST(constrain)
{
srand (0);
TestableTriangles tris;
double res = 128.0;
db::DEdge ee[] = {
db::DEdge (0.25, 0.25, 0.25, 0.75),
db::DEdge (0.25, 0.75, 0.75, 0.75),
db::DEdge (0.75, 0.75, 0.75, 0.25),
db::DEdge (0.75, 0.25, 0.25, 0.25)
};
for (unsigned int i = 0; i < 200; ++i) {
double x = round (flt_rand () * res) * (1.0 / res);
double y = round (flt_rand () * res) * (1.0 / res);
bool ok = true;
for (unsigned int j = 0; j < sizeof (ee) / sizeof (ee[0]); ++j) {
if (ee[j].side_of (db::DPoint (x, y)) == 0) {
--i;
ok = false;
}
}
if (ok) {
tris.insert_point (x, y);
}
}
std::vector<db::Vertex *> contour;
for (unsigned int i = 0; i < sizeof (ee) / sizeof (ee[0]); ++i) {
contour.push_back (tris.insert_point (ee[i].p1 ()));
}
std::vector<std::vector<db::Vertex *> > contours;
contours.push_back (contour);
EXPECT_EQ (tris.check (), true);
tris.constrain (contours);
EXPECT_EQ (tris.check (false), true);
tris.remove_outside_triangles ();
EXPECT_EQ (tris.check (), true);
double area_in = 0.0;
db::DBox clip_box;
for (unsigned int i = 0; i < sizeof (ee) / sizeof (ee[0]); ++i) {
clip_box += ee[i].p1 ();
}
for (auto t = tris.begin (); t != tris.end (); ++t) {
EXPECT_EQ (clip_box.overlaps (t->bbox ()), true);
EXPECT_EQ (safe_inside (t->bbox (), clip_box), true);
area_in += t->area ();
}
EXPECT_EQ (tl::to_string (area_in), "0.25");
}
TEST(heavy_constrain)
{
tl::info << "Running test_heavy_constrain " << tl::noendl;
for (unsigned int l = 0; l < 100; ++l) {
srand (l);
tl::info << "." << tl::noendl;
TestableTriangles tris;
double res = 128.0;
db::DEdge ee[] = {
db::DEdge (0.25, 0.25, 0.25, 0.75),
db::DEdge (0.25, 0.75, 0.75, 0.75),
db::DEdge (0.75, 0.75, 0.75, 0.25),
db::DEdge (0.75, 0.25, 0.25, 0.25)
};
unsigned int n = rand () % 150 + 50;
for (unsigned int i = 0; i < n; ++i) {
double x = round (flt_rand () * res) * (1.0 / res);
double y = round (flt_rand () * res) * (1.0 / res);
bool ok = true;
for (unsigned int j = 0; j < sizeof (ee) / sizeof (ee[0]); ++j) {
if (ee[j].side_of (db::DPoint (x, y)) == 0) {
--i;
ok = false;
}
}
if (ok) {
tris.insert_point (x, y);
}
}
std::vector<db::Vertex *> contour;
for (unsigned int i = 0; i < sizeof (ee) / sizeof (ee[0]); ++i) {
contour.push_back (tris.insert_point (ee[i].p1 ()));
}
std::vector<std::vector<db::Vertex *> > contours;
contours.push_back (contour);
EXPECT_EQ (tris.check (), true);
tris.constrain (contours);
EXPECT_EQ (tris.check (false), true);
tris.remove_outside_triangles ();
EXPECT_EQ (tris.check (), true);
double area_in = 0.0;
db::DBox clip_box;
for (unsigned int i = 0; i < sizeof (ee) / sizeof (ee[0]); ++i) {
clip_box += ee[i].p1 ();
}
for (auto t = tris.begin (); t != tris.end (); ++t) {
EXPECT_EQ (clip_box.overlaps (t->bbox ()), true);
EXPECT_EQ (safe_inside (t->bbox (), clip_box), true);
area_in += t->area ();
}
EXPECT_EQ (tl::to_string (area_in), "0.25");
}
tl::info << tl::endl << "done.";
}
TEST(heavy_find_point_around)
{
tl::info << "Running Triangle_test_heavy_find_point_around " << tl::noendl;
for (unsigned int l = 0; l < 100; ++l) {
srand (l);
tl::info << "." << tl::noendl;
TestableTriangles tris;
double res = 128.0;
unsigned int n = rand () % 190 + 10;
std::vector<db::Vertex *> vertexes;
for (unsigned int i = 0; i < n; ++i) {
double x = round (flt_rand () * res) * (1.0 / res);
double y = round (flt_rand () * res) * (1.0 / res);
vertexes.push_back (tris.insert_point (x, y));
}
EXPECT_EQ (tris.check(), true);
for (int i = 0; i < 100; ++i) {
unsigned int nv = rand () % (unsigned int) vertexes.size ();
auto vertex = vertexes [nv];
double r = round (flt_rand () * res) * (1.0 / res);
auto p1 = tris.find_points_around (vertex, r);
auto p2 = tris.find_inside_circle (*vertex, r);
std::set<db::Vertex *> sp1 (p1.begin (), p1.end ());
std::set<db::Vertex *> sp2 (p2.begin (), p2.end ());
sp2.erase (vertex);
EXPECT_EQ (sp1 == sp2, true);
}
}
tl::info << tl::endl << "done.";
}
TEST(create_constrained_delaunay)
{
db::Region r;
r.insert (db::Box (0, 0, 1000, 1000));
db::Region r2;
r2.insert (db::Box (200, 200, 800, 800));
r -= r2;
TestableTriangles tri;
tri.create_constrained_delaunay (r);
tri.remove_outside_triangles ();
EXPECT_EQ (tri.check (), true);
EXPECT_EQ (tri.to_string (),
"((1000, 0), (0, 0), (200, 200)), "
"((0, 1000), (200, 200), (0, 0)), "
"((1000, 0), (200, 200), (800, 200)), "
"((1000, 0), (800, 200), (1000, 1000)), "
"((800, 200), (800, 800), (1000, 1000)), "
"((0, 1000), (1000, 1000), (800, 800)), "
"((0, 1000), (800, 800), (200, 800)), "
"((0, 1000), (200, 800), (200, 200))");
}
TEST(triangulate_basic)
{
db::Region r;
r.insert (db::Box (0, 0, 10000, 10000));
db::Region r2;
r2.insert (db::Box (2000, 2000, 8000, 8000));
r -= r2;
db::Triangles::TriangulateParameters param;
param.min_b = 1.2;
param.max_area = 1.0;
TestableTriangles tri;
tri.triangulate (r, param, 0.001);
EXPECT_EQ (tri.check (), true);
for (auto t = tri.begin (); t != tri.end (); ++t) {
EXPECT_LE (t->area (), param.max_area);
EXPECT_GE (t->b (), param.min_b);
}
EXPECT_GT (tri.num_triangles (), size_t (100));
EXPECT_LT (tri.num_triangles (), size_t (150));
param.min_b = 1.0;
param.max_area = 0.1;
tri.triangulate (r, param, 0.001);
EXPECT_EQ (tri.check (), true);
for (auto t = tri.begin (); t != tri.end (); ++t) {
EXPECT_LE (t->area (), param.max_area);
EXPECT_GE (t->b (), param.min_b);
}
EXPECT_GT (tri.num_triangles (), size_t (900));
EXPECT_LT (tri.num_triangles (), size_t (1000));
}
void read_polygons (const std::string &path, db::Region &region, double dbu)
{
tl::InputStream is (path);
tl::TextInputStream ti (is);
unsigned int nvert = 0, nedges = 0;
{
tl::Extractor ex (ti.get_line ().c_str ());
ex.read (nvert);
ex.read (nedges);
}
std::vector<db::Point> v;
auto dbu_trans = db::CplxTrans (dbu).inverted ();
for (unsigned int i = 0; i < nvert; ++i) {
double x = 0, y = 0;
tl::Extractor ex (ti.get_line ().c_str ());
ex.read (x);
ex.read (y);
v.push_back (dbu_trans * db::DPoint (x, y));
}
unsigned int nstart = 0;
bool new_contour = true;
std::vector<db::Point> contour;
for (unsigned int i = 0; i < nedges; ++i) {
unsigned int n1 = 0, n2 = 0;
tl::Extractor ex (ti.get_line ().c_str ());
ex.read (n1);
ex.read (n2);
if (new_contour) {
nstart = n1;
new_contour = false;
}
contour.push_back (v[n1]);
if (n2 == nstart) {
// finish contour
db::SimplePolygon sp;
sp.assign_hull (contour.begin (), contour.end ());
region.insert (sp);
new_contour = true;
contour.clear ();
} else if (n2 <= n1) {
tl::error << "Invalid polygon wrap in line " << ti.line_number ();
tl_assert (false);
}
}
}
TEST(triangulate_geo)
{
double dbu = 0.001;
db::Region r;
read_polygons (tl::combine_path (tl::testsrc (), "testdata/algo/triangles1.txt"), r, dbu);
// for debugging purposes dump the inputs
if (false) {
db::Layout layout = db::Layout ();
layout.dbu (dbu);
db::Cell &top = layout.cell (layout.add_cell ("DUMP"));
unsigned int l1 = layout.insert_layer (db::LayerProperties (1, 0));
r.insert_into (&layout, top.cell_index (), l1);
{
tl::OutputStream stream ("input.gds");
db::SaveLayoutOptions opt;
db::Writer writer (opt);
writer.write (layout, stream);
}
}
db::Triangles::TriangulateParameters param;
param.min_b = 1.0;
param.max_area = 0.1;
param.min_length = 0.001;
TestableTriangles tri;
tri.triangulate (r, param, dbu);
EXPECT_EQ (tri.check (false), true);
// for debugging:
// tri.dump ("debug.gds");
size_t n_skinny = 0;
for (auto t = tri.begin (); t != tri.end (); ++t) {
EXPECT_LE (t->area (), param.max_area);
if (t->b () < param.min_b) {
++n_skinny;
}
}
EXPECT_LT (n_skinny, size_t (20));
EXPECT_GT (tri.num_triangles (), size_t (29000));
EXPECT_LT (tri.num_triangles (), size_t (30000));
}
TEST(triangulate_analytic)
{
double dbu = 0.0001;
double star1 = 9.0, star2 = 5.0;
double r = 1.0;
int n = 100;
auto dbu_trans = db::CplxTrans (dbu).inverted ();
std::vector <db::Point> contour1, contour2;
for (int i = 0; i < n; ++i) {
double a = -M_PI * 2.0 * double (i) / double (n); // "-" for clockwise orientation
double rr, x, y;
rr = r * (1.0 + 0.4 * cos (star1 * a));
x = rr * cos (a);
y = rr * sin (a);
contour1.push_back (dbu_trans * db::DPoint (x, y));
rr = r * (0.1 + 0.03 * cos (star2 * a));
x = rr * cos (a);
y = rr * sin (a);
contour2.push_back (dbu_trans * db::DPoint (x, y));
}
db::Region rg;
db::SimplePolygon sp1;
sp1.assign_hull (contour1.begin (), contour1.end ());
db::SimplePolygon sp2;
sp2.assign_hull (contour2.begin (), contour2.end ());
rg = db::Region (sp1) - db::Region (sp2);
db::Triangles::TriangulateParameters param;
param.min_b = 1.0;
param.max_area = 0.01;
TestableTriangles tri;
tri.triangulate (rg, param, dbu);
EXPECT_EQ (tri.check (false), true);
// for debugging:
// tri.dump ("debug.gds");
for (auto t = tri.begin (); t != tri.end (); ++t) {
EXPECT_LE (t->area (), param.max_area);
EXPECT_GE (t->b (), param.min_b);
}
EXPECT_GT (tri.num_triangles (), size_t (1250));
EXPECT_LT (tri.num_triangles (), size_t (1300));
}
TEST(triangulate_problematic)
{
db::DPoint contour[] = {
db::DPoint (129145.00000, -30060.80000),
db::DPoint (129145.00000, -28769.50000),
db::DPoint (129159.50000, -28754.90000), // this is a very short edge <-- from here.
db::DPoint (129159.60000, -28754.80000), // <-- to here.
db::DPoint (129159.50000, -28754.70000),
db::DPoint (129366.32200, -28547.90000),
db::DPoint (130958.54600, -26955.84600),
db::DPoint (131046.25000, -27043.55000),
db::DPoint (130152.15000, -27937.65000),
db::DPoint (130152.15000, -30060.80000)
};
db::DPolygon poly;
poly.assign_hull (contour + 0, contour + sizeof (contour) / sizeof (contour[0]));
db::Triangles::TriangulateParameters param;
param.min_b = 1.0;
param.max_area = 100000.0;
param.min_length = 0.002;
TestableTriangles tri;
tri.triangulate (poly, param);
EXPECT_EQ (tri.check (false), true);
// for debugging:
// tri.dump ("debug.gds");
for (auto t = tri.begin (); t != tri.end (); ++t) {
EXPECT_LE (t->area (), param.max_area);
EXPECT_GE (t->b (), param.min_b);
}
EXPECT_GT (tri.num_triangles (), size_t (470));
EXPECT_LT (tri.num_triangles (), size_t (490));
}

View File

@ -142,9 +142,9 @@ TEST(6)
EXPECT_EQ (db::vprod_with_sign (db::Vector (1000000000, 0), db::Vector (1000000000, -1)).second, -1);
EXPECT_EQ (db::sprod_sign (db::DVector (0, 100000.0000), db::DVector (100000.0000, 0)), 0);
EXPECT_EQ (db::sprod_sign (db::DVector (0, 100000.0000), db::DVector (100000.0000, 1e-7)), 0);
EXPECT_EQ (db::sprod_sign (db::DVector (0, 100000.0000), db::DVector (100000.0000, 1e-11)), 0);
EXPECT_EQ (db::sprod_sign (db::DVector (0, 100000.0000), db::DVector (100000.0000, 0.0001)), 1);
EXPECT_EQ (db::sprod_sign (db::DVector (0, 100000.0000), db::DVector (100000.0000, -1e-7)), 0);
EXPECT_EQ (db::sprod_sign (db::DVector (0, 100000.0000), db::DVector (100000.0000, -1e-11)), 0);
EXPECT_EQ (db::sprod_sign (db::DVector (0, 100000.0000), db::DVector (100000.0000, -0.0001)), -1);
EXPECT_EQ (db::sprod_sign (db::DVector (100000.0000, 0), db::DVector (0, 100000.0000)), 0);
EXPECT_EQ (db::sprod_sign (db::DVector (100000.0000, 0), db::DVector (0.0001, 100000.0000)), 1);
@ -157,9 +157,9 @@ TEST(6)
EXPECT_EQ (db::vprod_sign (db::DVector (100000.0000, 0), db::DVector (100000.0000, -0.0001)), -1);
EXPECT_EQ (db::sprod_with_sign (db::DVector (0, 100000.0000), db::DVector (100000.0000, 0)).second, 0);
EXPECT_EQ (db::sprod_with_sign (db::DVector (0, 100000.0000), db::DVector (100000.0000, 1e-7)).second, 0);
EXPECT_EQ (db::sprod_with_sign (db::DVector (0, 100000.0000), db::DVector (100000.0000, 1e-11)).second, 0);
EXPECT_EQ (db::sprod_with_sign (db::DVector (0, 100000.0000), db::DVector (100000.0000, 0.0001)).second, 1);
EXPECT_EQ (db::sprod_with_sign (db::DVector (0, 100000.0000), db::DVector (100000.0000, -1e-7)).second, 0);
EXPECT_EQ (db::sprod_with_sign (db::DVector (0, 100000.0000), db::DVector (100000.0000, -1e-11)).second, 0);
EXPECT_EQ (db::sprod_with_sign (db::DVector (0, 100000.0000), db::DVector (100000.0000, -0.0001)).second, -1);
EXPECT_EQ (db::sprod_with_sign (db::DVector (100000.0000, 0), db::DVector (0, 100000.0000)).second, 0);
EXPECT_EQ (db::sprod_with_sign (db::DVector (100000.0000, 0), db::DVector (0.0001, 100000.0000)).second, 1);

View File

@ -12,6 +12,8 @@ SOURCES = \
dbLogTests.cc \
dbRecursiveInstanceIteratorTests.cc \
dbRegionCheckUtilsTests.cc \
dbTriangleTests.cc \
dbTrianglesTests.cc \
dbUtilsTests.cc \
dbWriterTools.cc \
dbLoadLayoutOptionsTests.cc \

View File

@ -4,9 +4,11 @@
<doc>
<title>About Expressions</title>
<keyword>Expressions</keyword>
<keyword>Expression Syntax</keyword>
<p>
Beside a ruby programming API, KLayout provides support for simple expressions in some places.
Beside a ruby and Python programming API, KLayout provides support for simple expressions in some places.
In particular this feature is employed to generate dynamic strings, for example when deriving the
label text for a ruler.
</p>
@ -161,17 +163,14 @@ Box.new(-10, 0, 90, 60).width
mentioned in the class documentation. Setter methods like "box_with=" can be used as targets in assignments, i.e.
</p>
<pre>
shape.box_width = 20
</pre>
<pre>shape.box_width = 20</pre>
<p>Boolean predicates (like "is_box?") are used <b>without</b> the question mark because that is reserved
<p>
Boolean predicates (like "is_box?") are used <b>without</b> the question mark because that is reserved
for the decision operator (".. ? .. : .."):
</p>
<pre>
shape.is_box
</pre>
<pre>shape.is_box</pre>
<h2>Concatenation of expressions</h2>
@ -179,6 +178,24 @@ shape.is_box
The semicolon separates two expressions. The value of that compound expression is the value of the last one.
</p>
<h2>Keyword arguments</h2>
<p>
Most methods support keyword arguments similar to Python. For example you can write:
</p>
<pre>CplxTrans.new(rot = 45.0)</pre>
<p>
This is more explicit than writing the individual arguments and allows giving
one argument without having to insert the default values for the previous ones.
</p>
<p>
Keyword arguments are not supported for the built-in functions such as "sqrt" and
a few built-in methods.
</p>
<h2>Variables</h2>
<p>

View File

@ -86,7 +86,7 @@
<ul>
<li>
<p><b><i>[virtual]</i> bool event(QEvent ptr arg1)</b>:</p>
<p><b><i>[virtual]</i> bool event(QEvent ptr ev)</b>:</p>
<p>A virtual method called "event" returning a boolean value
(Ruby "true" or "false") and expecting one argument (a pointer to a QEvent object).
"ptr" indicates that the argument is a pointer, "arg1" is the argument name.
@ -108,9 +108,12 @@
<p>An iterator called "each_reference" delivering RdbReference objects.</p>
</li>
<li>
<p><b><i>[event]</i> void layoutAboutToBeChanged</b>:</p>
<p>A parameterless event called "layoutAboutToBeChanged".
</p>
<p><b><i>[signal]</i> void layoutAboutToBeChanged</b>:</p>
<p>A parameterless signal (event) called "layoutAboutToBeChanged" (see <link href="/programming/events.xml"/> for details about events or signals).</p>
</li>
<li>
<p><b><i>[signal]</i> void objectNameChanged(string objectName)</b>:</p>
<p>A signal (event) called "objectNameChanged" with one string argument.</p>
</li>
</ul>

View File

@ -59,10 +59,12 @@
</p>
<p>
Here is the code:
Here is the code.
This example demonstrates how the "get" method is reimplemented to deliver the actual text.
</p>
<pre>module MyMacro
<pre>
module MyMacro
include RBA
@ -78,15 +80,32 @@
dialog.home = "int:0"
dialog.exec
end</pre>
end
</pre>
The Python version is this:
<pre>
from pya import BrowserSource, BrowserDialog
class MyBrowserSource(BrowserSource):
def get(self, url):
next_url = "int:" + str(int(url.split(":")[1]) + 1)
return f"This is {url}. &lt;a href='{next_url}'&gt;Goto next ({next_url})&lt;/a&gt;>"
dialog = BrowserDialog()
dialog.home = "int:0"
dialog.source = MyBrowserSource()
dialog.exec_()
</pre>
<p>
This example demonstrates how the "get" method is reimplemented to deliver the actual text.
Ruby even allows reimplementation of a method without deriving a new class, because it allows
to define methods per instance:
defining methods per instance:
</p>
<pre>module MyMacro
<pre>
module MyMacro
include RBA
@ -101,7 +120,8 @@ end</pre>
dialog.home = "int:0"
dialog.exec
end</pre>
end
</pre>
<h2>Events</h2>
@ -117,7 +137,8 @@ end</pre>
clicked, it displays a message box:
</p>
<pre>module MyMacro
<pre>
module MyMacro
include RBA
@ -129,14 +150,33 @@ end</pre>
Application::instance.main_window.menu.insert_item("@toolbar.end", "my_action", action)
end</pre>
end
</pre>
<p>
The Python version is:
</p>
<pre>
from pya import Action, MessageBox, Application
def on_triggered():
MessageBox.info("A message", "The action was triggered", MessageBox.Ok)
action = Action()
action.on_triggered = on_triggered
action.title = "My Action"
Application.instance().main_window().menu().insert_item("@toolbar.end", "my_action", action)
</pre>
<p>
Specifying a block to an event will make the event only execute that block. A more flexible way of
controlling the code attached to events is available through the += and -= operators:
</p>
<pre>module MyMacro
<pre>
module MyMacro
include RBA
@ -157,7 +197,12 @@ end</pre>
# to clear all event handlers use:
action.on_triggered.clear
</pre>
</pre>
<p>
Synonyms for the <tt>+=</tt> operator are <tt>add</tt> and <tt>connect</tt>. The latter makes code more familiar for PyQt users.
In the same way, synonyms for the <tt>-=</tt> operator are <tt>remove</tt> and <tt>disconnect</tt>.
</p>
<p>
If the Qt binding is available (see <link href="/programming/qt_binding.xml"/>), Qt signals
@ -166,7 +211,8 @@ end</pre>
input field to the label below:
</p>
<pre>module MyMacro
<pre>
module MyMacro
include RBA
@ -182,13 +228,38 @@ end</pre>
dialog.exec
end</pre>
end
</pre>
<p>
The Python version is:
</p>
<pre>
from pya import QDialog, QVBoxLayout, QLineEdit, QLabel, Application
dialog = QDialog(Application.instance().main_window())
layout = QVBoxLayout(dialog)
input = QLineEdit(dialog)
label = QLabel(dialog)
layout.addWidget(input)
layout.addWidget(label)
def text_changed(text):
label.text = text
# implement the textChanged signal as event:
input.textChanged = text_changed
dialog.exec_()
</pre>
<p>
Using the += operator on the event, multiple handlers can be added to a signal:
</p>
<pre>module MyMacro
<pre>
module MyMacro
include RBA
@ -207,7 +278,37 @@ end</pre>
dialog.exec
end</pre>
end
</pre>
<p>
with the Python version:
</p>
<pre>
from pya import QDialog, QVBoxLayout, QLineEdit, QLabel, Application
dialog = QDialog(Application.instance().main_window())
layout = QVBoxLayout(dialog)
input = QLineEdit(dialog)
label1 = QLabel(dialog)
label2 = QLabel(dialog)
layout.addWidget(input)
layout.addWidget(label1)
layout.addWidget(label2)
def text_changed1(text):
label1.text = text
def text_changed2(text):
label2.text = text[::-1]
# two signal consumers:
input.textChanged += text_changed1
input.textChanged += text_changed2
dialog.exec_()
</pre>
</doc>

View File

@ -217,6 +217,21 @@ for edge in edges:
</pre>
</li>
<li><b>Keyword arguments:</b>
<p>Most methods support keyword arguments, for example:</p>
<pre># a 45 degree rotation
t = pya.CplxTrans(rot = 45)</pre>
<p>
Exceptions are some built-in methods like "assign". Keyword arguments can be used
when the non-optional arguments are specified either as positional or other keyword
arguments.
</p>
</li>
<li><b>Standard protocols:</b>
<p>"x.to_s()" is available as "str(x)" too.</p>

View File

@ -408,6 +408,22 @@ A::new.f(x)
omitted, the default value is used instead.
</p>
<h3>Keyword arguments</h3>
<p>
Starting with version 3, Ruby supports "real" keyword arguments.
Keyword arguments are supported for most methods with the exception of a few built-in ones such as "assign".
Keyword arguments can be used when the other, non-optional arguments are given either by
positional arguments or other keyword arguments.
</p>
<p>
Keyword arguments are somewhat more expressive and allow a shorter notation. For example,
to instantiate a 45 degree rotation, you can write:
</p>
<pre>t = RBA::CplxTrans::new(rot: 45)</pre>
<h2>Implicit conversions</h2>
<h3>String arguments</h3>

View File

@ -27,6 +27,7 @@
#include "layDispatcher.h"
#include "layLayoutViewBase.h"
#include "layLayerTreeModel.h"
#include "layBusy.h"
#include "dbLibraryManager.h"
#include "dbLibrary.h"
#include "tlLog.h"
@ -275,7 +276,12 @@ RecentConfigurationPage::render_to (QTreeWidgetItem *item, int column, const std
if (pcid.first) {
const db::PCellDeclaration *pc_decl = lib->layout ().pcell_declaration (pcid.second);
if (pc_decl) {
item->setText (column, tl::to_qstring (pc_decl->get_display_name (pc_decl->map_parameters (pcp))));
lay::BusySection busy; // do not trigger macro IDE breakpoints and exception handling
try {
item->setText (column, tl::to_qstring (pc_decl->get_display_name (pc_decl->map_parameters (pcp))));
} catch (tl::Exception &ex) {
item->setText (column, tl::to_qstring (std::string ("ERROR: ") + tl::to_quoted_string (ex.msg ())));
}
break;
}
}

View File

@ -44,6 +44,9 @@ initialize ()
// Do a first initialization of the new classes because they might add more classes
for (gsi::ClassBase::class_iterator c = gsi::ClassBase::begin_new_classes (); c != gsi::ClassBase::end_new_classes (); ++c) {
if (tl::verbosity () >= 50 && c->begin_methods () != c->end_methods ()) {
tl::info << "GSI: initializing class " << c->module () << "::" << c->name ();
}
// TODO: get rid of that const cast
(const_cast<gsi::ClassBase *> (&*c))->initialize ();
}

View File

@ -22,6 +22,7 @@ SOURCES = \
gsiTypes.cc \
gsiSignals.cc \
gsiObjectHolder.cc \
gsiVariantArgs.cc
HEADERS = \
gsiCallback.h \
@ -43,7 +44,8 @@ HEADERS = \
gsiSignals.h \
gsiTypes.h \
gsiObjectHolder.h \
gsiCommon.h
gsiCommon.h \
gsiVariantArgs.h
# Note: unlike other modules, the tl declarations have to go here
# since gsi is dependent on tl

View File

@ -84,7 +84,7 @@ template<class T, bool> struct _var_user_to_string_impl;
template<class T>
struct _var_user_to_string_impl<T, true>
{
static std::string call (const T *a, const VariantUserClassImpl * /*delegate*/) { return a->to_string (); }
static std::string call (const T *a, const VariantUserClassImpl * /*delegate*/) { return a ? a->to_string () : std::string (); }
};
template<class T>

View File

@ -158,10 +158,10 @@ Class<ArgType> decl_ArgType ("tl", "ArgType",
"@brief Returns the name for this argument or an empty string if the argument is not named\n"
"Applies to arguments only. This method has been introduced in version 0.24."
) +
gsi::method ("==", &ArgType::operator==,
gsi::method ("==", &ArgType::operator==, gsi::arg ("other"),
"@brief Equality of two types\n"
) +
gsi::method ("!=", &ArgType::operator!=,
gsi::method ("!=", &ArgType::operator!=, gsi::arg ("other"),
"@brief Inequality of two types\n"
),
"@hide"
@ -230,7 +230,7 @@ Class<MethodBase> decl_Method ("tl", "Method",
"\n"
"This method has been introduced in version 0.24."
) +
gsi::method ("accepts_num_args", &MethodBase::compatible_with_num_args,
gsi::method ("accepts_num_args", &MethodBase::compatible_with_num_args, gsi::arg ("n"),
"@brief True, if this method is compatible with the given number of arguments\n"
"\n"
"This method has been introduced in version 0.24."
@ -276,6 +276,12 @@ Class<MethodBase> decl_Method ("tl", "Method",
"\n"
"This method has been introduced in version 0.24."
) +
gsi::method ("to_s", &MethodBase::to_string,
"@brief Describes the method\n"
"This attribute returns a string description of the method and its signature.\n"
"\n"
"This method has been introduced in version 0.29."
) +
gsi::method ("doc", &MethodBase::doc,
"@brief The documentation string for this method\n"
),

View File

@ -693,6 +693,16 @@ static Recipe_Impl *make_recipe (const std::string &name, const std::string &des
return new Recipe_Impl (name, description);
}
static tl::Variant make_impl (const std::string &generator, const std::map<std::string, tl::Variant> &add_params)
{
return Recipe_Impl::make (generator, add_params);
}
std::string generator_impl (Recipe_Impl *recipe, const std::map<std::string, tl::Variant> &params)
{
return recipe->generator (params);
}
Class<Recipe_Impl> decl_Recipe_Impl ("tl", "Recipe",
gsi::constructor ("new", &make_recipe, gsi::arg ("name"), gsi::arg ("description", std::string (), "\"\""),
"@brief Creates a new recipe object with the given name and (optional) description"
@ -703,13 +713,13 @@ Class<Recipe_Impl> decl_Recipe_Impl ("tl", "Recipe",
gsi::method ("description", &Recipe_Impl::description,
"@brief Gets the description of the recipe."
) +
gsi::method ("make", &Recipe_Impl::make, gsi::arg ("generator"), gsi::arg ("add_params", std::map<std::string, tl::Variant> (), "{}"),
gsi::method ("make", &make_impl, gsi::arg ("generator"), gsi::arg ("add_params", std::map<std::string, tl::Variant> (), "{}"),
"@brief Executes the recipe given by the generator string.\n"
"The generator string is the one delivered with \\generator.\n"
"Additional parameters can be passed in \"add_params\". They have lower priority than the parameters "
"kept inside the generator string."
) +
gsi::method ("generator", &Recipe_Impl::generator, gsi::arg ("params"),
gsi::method_ext ("generator", &generator_impl, gsi::arg ("params"),
"@brief Delivers the generator string from the given parameters.\n"
"The generator string can be used with \\make to re-run the recipe."
) +

View File

@ -275,6 +275,7 @@ public:
gsi::method_ext ("to_s", &enum_to_string_ext, "@brief Gets the symbolic string from an enum") +
gsi::method_ext ("inspect", &enum_to_string_inspect_ext, "@brief Converts an enum to a visual string") +
gsi::method_ext ("to_i", &enum_to_int, "@brief Gets the integer value from the enum") +
gsi::method_ext ("hash", &enum_to_int, "@brief Gets the hash value from the enum") +
gsi::method_ext ("==", &enum_eq, gsi::arg("other"), "@brief Compares two enums") +
gsi::method_ext ("==", &enum_eq_with_int, gsi::arg("other"), "@brief Compares an enum with an integer value") +
gsi::method_ext ("!=", &enum_ne, gsi::arg("other"), "@brief Compares two enums for inequality") +

File diff suppressed because it is too large Load Diff

View File

@ -55,7 +55,7 @@ public:
int to_int_impl (void *) const;
double to_double_impl (void *) const;
virtual void execute (const tl::ExpressionParserContext &context, tl::Variant &out, tl::Variant &object, const std::string &method, const std::vector<tl::Variant> &args) const;
virtual void execute (const tl::ExpressionParserContext &context, tl::Variant &out, tl::Variant &object, const std::string &method, const std::vector<tl::Variant> &args, const std::map<std::string, tl::Variant> *kwargs) const;
void initialize (const gsi::ClassBase *cls, const tl::VariantUserClassBase *self, const tl::VariantUserClassBase *object_cls, bool is_const);
@ -64,7 +64,7 @@ private:
const tl::VariantUserClassBase *mp_self, *mp_object_cls;
bool m_is_const;
virtual void execute_gsi (const tl::ExpressionParserContext &context, tl::Variant &out, tl::Variant &object, const std::string &method, const std::vector<tl::Variant> &args) const;
virtual void execute_gsi (const tl::ExpressionParserContext &context, tl::Variant &out, tl::Variant &object, const std::string &method, const std::vector<tl::Variant> &args, const std::map<std::string, tl::Variant> *kwargs = 0) const;
bool has_method (const std::string &method) const;
};

View File

@ -187,7 +187,7 @@ public:
/**
* @brief Add the given path to the search path ($: in ruby)
*/
virtual void add_path (const std::string &path) = 0;
virtual void add_path (const std::string &path, bool prepend = false) = 0;
/**
* @brief Requires the given module (ruby "require")

View File

@ -22,6 +22,7 @@
#include "gsiDecl.h"
#include "tlLog.h"
#include <cctype>
@ -131,16 +132,132 @@ void MethodBase::parse_name (const std::string &name)
}
}
static std::string
type_to_s (const gsi::ArgType &a, bool for_return)
{
std::string s;
switch (a.type ()) {
case gsi::T_void_ptr:
s += "void *"; break;
case gsi::T_void:
s += "void"; break;
case gsi::T_bool:
s += "bool"; break;
case gsi::T_char:
s += "char"; break;
case gsi::T_schar:
s += "signed char"; break;
case gsi::T_uchar:
s += "unsigned char"; break;
case gsi::T_short:
s += "short"; break;
case gsi::T_ushort:
s += "unsigned short"; break;
case gsi::T_int:
s += "int"; break;
#if defined(HAVE_64BIT_COORD)
case gsi::T_int128:
s += "int128"; break;
#endif
case gsi::T_uint:
s += "unsigned int"; break;
case gsi::T_long:
s += "long"; break;
case gsi::T_ulong:
s += "unsigned long"; break;
case gsi::T_longlong:
s += "long long"; break;
case gsi::T_ulonglong:
s += "unsigned long long"; break;
case gsi::T_double:
s += "double"; break;
case gsi::T_float:
s += "float"; break;
case gsi::T_string:
s += "string"; break;
case gsi::T_byte_array:
s += "bytes"; break;
case gsi::T_var:
s += "variant"; break;
case gsi::T_object:
if (a.is_cptr () || (! for_return && a.is_cref ())) {
s = "const ";
}
if (a.pass_obj ()) {
s += "new ";
}
s += a.cls () ? a.cls ()->qname () : "?";
break;
case gsi::T_vector:
if (a.inner ()) {
s += type_to_s (*a.inner (), false);
}
s += "[]";
break;
case gsi::T_map:
s += "map<";
if (a.inner_k ()) {
s += type_to_s (*a.inner_k (), false);
}
s += ",";
if (a.inner ()) {
s += type_to_s (*a.inner (), false);
}
s += ">";
break;
}
if (a.is_cptr () || a.is_ptr ()) {
s += " ptr";
}
return s;
}
static std::string
method_attributes (const gsi::MethodBase *method)
{
std::string r;
if (method->is_signal ()) {
if (! r.empty ()) {
r += ",";
}
r += "signal";
}
if (method->is_callback ()) {
if (! r.empty ()) {
r += ",";
}
r += "virtual";
}
if (method->is_static ()) {
if (! r.empty ()) {
r += ",";
}
r += "static";
}
if (method->is_const ()) {
if (! r.empty ()) {
r += ",";
}
r += "const";
}
if (method->ret_type ().is_iter ()) {
if (! r.empty ()) {
r += ",";
}
r += "iter";
}
return r;
}
std::string
MethodBase::to_string () const
{
std::string res;
if (is_static ()) {
res += "static ";
std::string res = method_attributes (this);
if (! res.empty ()) {
res += " ";
}
res += ret_type ().to_string ();
res += type_to_s (ret_type (), true);
res += " ";
if (m_method_synonyms.size () == 1) {
@ -154,7 +271,24 @@ MethodBase::to_string () const
if (a != begin_arguments ()) {
res += ", ";
}
res += a->to_string ();
res += type_to_s (*a, false);
if (! a->spec ()->name ().empty ()) {
res += " ";
res += a->spec ()->name ();
}
if (a->spec ()->has_default ()) {
res += " = ";
if (! a->spec ()->init_doc ().empty ()) {
res += a->spec ()->init_doc ();
} else {
try {
res += a->spec ()->default_value ().to_string ();
} catch (tl::Exception &) {
res += "?";
}
}
}
}
res += ")";
@ -231,5 +365,106 @@ MethodBase::primary_name () const
}
}
// --------------------------------------------------------------------------------
// Implementation of MethodBase
Methods::Methods ()
: m_methods ()
{
// .. nothing yet ..
}
Methods::Methods (MethodBase *m)
: m_methods ()
{
m_methods.push_back (m);
}
Methods::Methods (const Methods &d)
{
operator= (d);
}
Methods &
Methods::operator= (const Methods &d)
{
if (this != &d) {
clear ();
m_methods.reserve (d.m_methods.size ());
for (std::vector<MethodBase *>::const_iterator m = d.m_methods.begin (); m != d.m_methods.end (); ++m) {
m_methods.push_back ((*m)->clone ());
}
}
return *this;
}
Methods::~Methods ()
{
clear ();
}
void
Methods::initialize ()
{
for (std::vector<MethodBase *>::iterator m = m_methods.begin (); m != m_methods.end (); ++m) {
if (tl::verbosity () >= 60) {
tl::info << "GSI: initializing method " << (*m)->to_string ();
}
(*m)->initialize ();
}
}
void
Methods::clear ()
{
for (std::vector<MethodBase *>::iterator m = m_methods.begin (); m != m_methods.end (); ++m) {
delete *m;
}
m_methods.clear ();
}
// HINT: this is not the usual + semantics but this is more effective
Methods &
Methods::operator+ (const Methods &m)
{
return operator+= (m);
}
// HINT: this is not the usual + semantics but this is more effective
Methods &
Methods::operator+ (MethodBase *m)
{
return operator+= (m);
}
Methods &
Methods::operator+= (const Methods &m)
{
for (std::vector<MethodBase *>::const_iterator mm = m.m_methods.begin (); mm != m.m_methods.end (); ++mm)
{
add_method ((*mm)->clone ());
}
return *this;
}
Methods &
Methods::operator+= (MethodBase *m)
{
add_method (m);
return *this;
}
void
Methods::add_method (MethodBase *method)
{
m_methods.push_back (method);
}
void
Methods::swap (Methods &other)
{
m_methods.swap (other.m_methods);
}
}

View File

@ -620,81 +620,29 @@ class GSI_PUBLIC Methods
public:
typedef std::vector<MethodBase *>::const_iterator iterator;
Methods ()
: m_methods ()
{
// .. nothing yet ..
}
Methods ();
explicit Methods (MethodBase *m);
Methods (const Methods &d);
explicit Methods (MethodBase *m)
: m_methods ()
{
m_methods.push_back (m);
}
Methods &operator= (const Methods &d);
Methods (const Methods &d)
{
operator= (d);
}
~Methods ();
Methods &operator= (const Methods &d)
{
if (this != &d) {
clear ();
m_methods.reserve (d.m_methods.size ());
for (std::vector<MethodBase *>::const_iterator m = d.m_methods.begin (); m != d.m_methods.end (); ++m) {
m_methods.push_back ((*m)->clone ());
}
}
return *this;
}
~Methods ()
{
clear ();
}
void initialize ()
{
for (std::vector<MethodBase *>::iterator m = m_methods.begin (); m != m_methods.end (); ++m) {
(*m)->initialize ();
}
}
void clear ()
{
for (std::vector<MethodBase *>::iterator m = m_methods.begin (); m != m_methods.end (); ++m) {
delete *m;
}
m_methods.clear ();
}
void initialize ();
void clear ();
// HINT: this is not the usual + semantics but this is more effective
Methods &operator+ (const Methods &m)
{
return operator+= (m);
}
Methods &operator+ (const Methods &m);
// HINT: this is not the usual + semantics but this is more effective
Methods &operator+ (MethodBase *m)
{
return operator+= (m);
}
Methods &operator+ (MethodBase *m);
Methods &operator+= (const Methods &m)
{
for (std::vector<MethodBase *>::const_iterator mm = m.m_methods.begin (); mm != m.m_methods.end (); ++mm)
{
add_method ((*mm)->clone ());
}
return *this;
}
Methods &operator+= (const Methods &m);
Methods &operator+= (MethodBase *m);
Methods &operator+= (MethodBase *m)
{
add_method (m);
return *this;
}
void add_method (MethodBase *method);
void swap (Methods &other);
iterator begin () const
{
@ -706,21 +654,11 @@ public:
return m_methods.end ();
}
void add_method (MethodBase *method)
{
m_methods.push_back (method);
}
size_t size () const
{
return m_methods.size ();
}
void swap (Methods &other)
{
m_methods.swap (other.m_methods);
}
public:
std::vector<MethodBase *> m_methods;
};

View File

@ -0,0 +1,928 @@
/*
KLayout Layout Viewer
Copyright (C) 2006-2024 Matthias Koefferlein
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "gsiVariantArgs.h"
#include "gsiTypes.h"
#include "gsiSerialisation.h"
#include "gsiClassBase.h"
#include "gsiObjectHolder.h"
#include "tlVariant.h"
#include "tlHeap.h"
namespace gsi
{
// -------------------------------------------------------------------
/**
* @brief Fetches the final object pointer from a tl::Variant
*/
inline void *get_object (tl::Variant &var)
{
return var.to_user ();
}
// -------------------------------------------------------------------
// Test if an argument can be converted to the given type
bool test_arg (const gsi::ArgType &atype, const tl::Variant &arg, bool loose);
template <class R>
struct test_arg_func
{
void operator () (bool *ret, const tl::Variant &arg, const gsi::ArgType & /*atype*/, bool /*loose*/)
{
*ret = arg.can_convert_to<R> ();
}
};
template <>
struct test_arg_func<gsi::VoidType>
{
void operator () (bool *ret, const tl::Variant & /*arg*/, const gsi::ArgType & /*atype*/, bool /*loose*/)
{
*ret = true;
}
};
template <>
struct test_arg_func<gsi::ObjectType>
{
void operator () (bool *ret, const tl::Variant &arg, const gsi::ArgType &atype, bool loose)
{
// allow nil of pointers
if ((atype.is_ptr () || atype.is_cptr ()) && arg.is_nil ()) {
*ret = true;
return;
}
if (arg.is_list ()) {
// we may implicitly convert an array into a constructor call of a target object -
// for now we only check whether the number of arguments is compatible with the array given.
int n = int (arg.size ());
*ret = false;
for (gsi::ClassBase::method_iterator c = atype.cls ()->begin_constructors (); c != atype.cls ()->end_constructors (); ++c) {
if ((*c)->compatible_with_num_args (n)) {
*ret = true;
break;
}
}
return;
}
if (! arg.is_user ()) {
*ret = false;
return;
}
const tl::VariantUserClassBase *cls = arg.user_cls ();
if (! cls) {
*ret = false;
} else if (! cls->gsi_cls ()->is_derived_from (atype.cls ()) && (! loose || ! cls->gsi_cls ()->can_convert_to(atype.cls ()))) {
*ret = false;
} else if ((atype.is_ref () || atype.is_ptr ()) && cls->is_const ()) {
*ret = false;
} else {
*ret = true;
}
}
};
template <>
struct test_arg_func<gsi::VectorType>
{
void operator () (bool *ret, const tl::Variant &arg, const gsi::ArgType &atype, bool loose)
{
if (! arg.is_list ()) {
*ret = false;
return;
}
tl_assert (atype.inner () != 0);
const ArgType &ainner = *atype.inner ();
*ret = true;
for (tl::Variant::const_iterator v = arg.begin (); v != arg.end () && *ret; ++v) {
if (! test_arg (ainner, *v, loose)) {
*ret = false;
}
}
}
};
template <>
struct test_arg_func<gsi::MapType>
{
void operator () (bool *ret, const tl::Variant &arg, const gsi::ArgType &atype, bool loose)
{
// Note: delegating that to the function avoids "injected class name used as template template expression" warning
if (! arg.is_array ()) {
*ret = false;
return;
}
tl_assert (atype.inner () != 0);
tl_assert (atype.inner_k () != 0);
const ArgType &ainner = *atype.inner ();
const ArgType &ainner_k = *atype.inner_k ();
if (! arg.is_list ()) {
*ret = false;
return;
}
*ret = true;
for (tl::Variant::const_array_iterator a = arg.begin_array (); a != arg.end_array () && *ret; ++a) {
if (! test_arg (ainner_k, a->first, loose)) {
*ret = false;
} else if (! test_arg (ainner, a->second, loose)) {
*ret = false;
}
}
}
};
bool
test_arg (const gsi::ArgType &atype, const tl::Variant &arg, bool loose)
{
// for const X * or X *, nil is an allowed value
if ((atype.is_cptr () || atype.is_ptr ()) && arg.is_nil ()) {
return true;
}
bool ret = false;
gsi::do_on_type<test_arg_func> () (atype.type (), &ret, arg, atype, loose);
return ret;
}
// -------------------------------------------------------------------
// Variant to C conversion
template <class R>
struct var2c
{
static R get (const tl::Variant &rval)
{
return rval.to<R> ();
}
};
template <>
struct var2c<tl::Variant>
{
static const tl::Variant &get (const tl::Variant &rval)
{
return rval;
}
};
// ---------------------------------------------------------------------
// Serialization helpers
/**
* @brief An adaptor for a vector which uses the tl::Variant's list perspective
*/
class VariantBasedVectorAdaptorIterator
: public gsi::VectorAdaptorIterator
{
public:
VariantBasedVectorAdaptorIterator (tl::Variant::iterator b, tl::Variant::iterator e, const gsi::ArgType *ainner);
virtual void get (SerialArgs &w, tl::Heap &heap) const;
virtual bool at_end () const;
virtual void inc ();
private:
tl::Variant::iterator m_b, m_e;
const gsi::ArgType *mp_ainner;
};
/**
* @brief An adaptor for a vector which uses the tl::Variant's list perspective
*/
class VariantBasedVectorAdaptor
: public gsi::VectorAdaptor
{
public:
VariantBasedVectorAdaptor (tl::Variant *var, const gsi::ArgType *ainner);
virtual VectorAdaptorIterator *create_iterator () const;
virtual void push (SerialArgs &r, tl::Heap &heap);
virtual void clear ();
virtual size_t size () const;
virtual size_t serial_size () const;
private:
const gsi::ArgType *mp_ainner;
tl::Variant *mp_var;
};
/**
* @brief An adaptor for a map which uses the tl::Variant's array perspective
*/
class VariantBasedMapAdaptorIterator
: public gsi::MapAdaptorIterator
{
public:
VariantBasedMapAdaptorIterator (tl::Variant::array_iterator b, tl::Variant::array_iterator e, const gsi::ArgType *ainner, const gsi::ArgType *ainner_k);
virtual void get (SerialArgs &w, tl::Heap &heap) const;
virtual bool at_end () const;
virtual void inc ();
private:
tl::Variant::array_iterator m_b, m_e;
const gsi::ArgType *mp_ainner, *mp_ainner_k;
};
/**
* @brief An adaptor for a vector which uses the tl::Variant's list perspective
*/
class VariantBasedMapAdaptor
: public gsi::MapAdaptor
{
public:
VariantBasedMapAdaptor (tl::Variant *var, const gsi::ArgType *ainner, const gsi::ArgType *ainner_k);
virtual MapAdaptorIterator *create_iterator () const;
virtual void insert (SerialArgs &r, tl::Heap &heap);
virtual void clear ();
virtual size_t size () const;
virtual size_t serial_size () const;
private:
const gsi::ArgType *mp_ainner, *mp_ainner_k;
tl::Variant *mp_var;
};
// ---------------------------------------------------------------------
// Writer function for serialization
/**
* @brief Serialization of POD types
*/
template <class R>
struct writer
{
void operator() (gsi::SerialArgs *aa, tl::Variant *arg, const gsi::ArgType &atype, tl::Heap *heap)
{
if (arg->is_nil () && atype.type () != gsi::T_var) {
if (! (atype.is_ptr () || atype.is_cptr ())) {
throw tl::Exception (tl::to_string (tr ("Arguments of reference or direct type cannot be passed nil")));
} else if (atype.is_ptr ()) {
aa->write<R *> ((R *)0);
} else {
aa->write<const R *> ((const R *)0);
}
} else {
if (atype.is_ref () || atype.is_ptr ()) {
// TODO: morph the variant to the requested type and pass its pointer (requires a non-const reference for arg)
// -> we would have a reference that can modify the argument (out parameter).
R *v = new R (var2c<R>::get (*arg));
heap->push (v);
aa->write<void *> (v);
} else if (atype.is_cref ()) {
// Note: POD's are written as copies for const refs, so we can pass a temporary here:
// (avoids having to create a temp object)
aa->write<const R &> (var2c<R>::get (*arg));
} else if (atype.is_cptr ()) {
// Note: POD's are written as copies for const ptrs, so we can pass a temporary here:
// (avoids having to create a temp object)
R r = var2c<R>::get (*arg);
aa->write<const R *> (&r);
} else {
aa->write<R> (var2c<R>::get (*arg));
}
}
}
};
/**
* @brief Serialization for strings
*/
template <>
struct writer<StringType>
{
void operator() (gsi::SerialArgs *aa, tl::Variant *arg, const gsi::ArgType &atype, tl::Heap *)
{
// Cannot pass ownership currently
tl_assert (!atype.pass_obj ());
if (arg->is_nil ()) {
if (! (atype.is_ptr () || atype.is_cptr ())) {
// nil is treated as an empty string for references
aa->write<void *> ((void *)new StringAdaptorImpl<std::string> (std::string ()));
} else {
aa->write<void *> ((void *)0);
}
} else {
// TODO: morph the variant to the requested type and pass its pointer (requires a non-const reference for arg)
// -> we would have a reference that can modify the argument (out parameter).
// NOTE: by convention we pass the ownership to the receiver for adaptors.
aa->write<void *> ((void *)new StringAdaptorImpl<std::string> (arg->to_string ()));
}
}
};
/**
* @brief Specialization for Variant
*/
template <>
struct writer<VariantType>
{
void operator() (gsi::SerialArgs *aa, tl::Variant *arg, const gsi::ArgType &, tl::Heap *)
{
// TODO: clarify: is nil a zero-pointer to a variant or a pointer to a "nil" variant?
// NOTE: by convention we pass the ownership to the receiver for adaptors.
aa->write<void *> ((void *)new VariantAdaptorImpl<tl::Variant> (arg));
}
};
/**
* @brief Specialization for Vectors
*/
template <>
struct writer<VectorType>
{
void operator() (gsi::SerialArgs *aa, tl::Variant *arg, const gsi::ArgType &atype, tl::Heap *)
{
if (arg->is_nil ()) {
if (! (atype.is_ptr () || atype.is_cptr ())) {
throw tl::Exception (tl::to_string (tr ("Arguments of reference or direct type cannot be passed nil")));
} else {
aa->write<void *> ((void *)0);
}
} else {
tl_assert (atype.inner () != 0);
aa->write<void *> ((void *)new VariantBasedVectorAdaptor (arg, atype.inner ()));
}
}
};
/**
* @brief Specialization for Maps
*/
template <>
struct writer<MapType>
{
void operator() (gsi::SerialArgs *aa, tl::Variant *arg, const gsi::ArgType &atype, tl::Heap *)
{
if (arg->is_nil ()) {
if (! (atype.is_ptr () || atype.is_cptr ())) {
throw tl::Exception (tl::to_string (tr ("Arguments of reference or direct type cannot be passed nil")));
} else {
aa->write<void *> ((void *)0);
}
} else {
tl_assert (atype.inner () != 0);
tl_assert (atype.inner_k () != 0);
aa->write<void *> ((void *)new VariantBasedMapAdaptor (arg, atype.inner (), atype.inner_k ()));
}
}
};
/**
* @brief Specialization for void
*/
template <>
struct writer<gsi::VoidType>
{
void operator() (gsi::SerialArgs *, tl::Variant *, const gsi::ArgType &, tl::Heap *)
{
// nothing - void type won't be serialized
}
};
void push_args (gsi::SerialArgs &arglist, const tl::Variant &args, const gsi::MethodBase *meth, tl::Heap *heap);
/**
* @brief Specialization for void
*/
template <>
struct writer<gsi::ObjectType>
{
void operator() (gsi::SerialArgs *aa, tl::Variant *arg, const gsi::ArgType &atype, tl::Heap *heap)
{
if (arg->is_nil ()) {
if (atype.is_ref () || atype.is_cref ()) {
throw tl::Exception (tl::to_string (tr ("Cannot pass nil to reference parameters")));
} else if (! atype.is_cptr () && ! atype.is_ptr ()) {
throw tl::Exception (tl::to_string (tr ("Cannot pass nil to direct parameters")));
}
aa->write<void *> ((void *) 0);
} else if (arg->is_list ()) {
// we may implicitly convert an array into a constructor call of a target object -
// for now we only check whether the number of arguments is compatible with the array given.
int n = int (arg->size ());
const gsi::MethodBase *meth = 0;
for (gsi::ClassBase::method_iterator c = atype.cls ()->begin_constructors (); c != atype.cls ()->end_constructors (); ++c) {
if ((*c)->compatible_with_num_args (n)) {
meth = *c;
break;
}
}
if (!meth) {
throw tl::Exception (tl::to_string (tr ("No constructor of %s available that takes %d arguments (implicit call from tuple)")), atype.cls ()->name (), n);
}
// implicit call of constructor
gsi::SerialArgs retlist (meth->retsize ());
gsi::SerialArgs arglist (meth->argsize ());
push_args (arglist, *arg, meth, heap);
meth->call (0, arglist, retlist);
void *new_obj = retlist.read<void *> (*heap);
if (new_obj && (atype.is_ptr () || atype.is_cptr () || atype.is_ref () || atype.is_cref ())) {
// For pointers or refs, ownership over these objects is not transferred.
// Hence we have to keep them on the heap.
// TODO: what if the called method takes ownership using keep()?
heap->push (new gsi::ObjectHolder (atype.cls (), new_obj));
}
aa->write<void *> (new_obj);
} else {
if (! arg->is_user ()) {
throw tl::Exception (tl::sprintf (tl::to_string (tr ("Unexpected object type (expected argument of class %s)")), atype.cls ()->name ()));
}
const tl::VariantUserClassBase *cls = arg->user_cls ();
if (!cls) {
throw tl::Exception (tl::sprintf (tl::to_string (tr ("Unexpected object type (expected argument of class %s)")), atype.cls ()->name ()));
}
if (cls->is_const () && (atype.is_ref () || atype.is_ptr ())) {
throw tl::Exception (tl::sprintf (tl::to_string (tr ("Cannot pass a const reference of class %s to a non-const reference or pointer parameter")), atype.cls ()->name ()));
}
if (atype.is_ref () || atype.is_cref () || atype.is_ptr () || atype.is_cptr ()) {
if (cls->gsi_cls ()->is_derived_from (atype.cls ())) {
if (cls->gsi_cls ()->adapted_type_info ()) {
// resolved adapted type
aa->write<void *> ((void *) cls->gsi_cls ()->adapted_from_obj (get_object (*arg)));
} else {
aa->write<void *> (get_object (*arg));
}
} else if ((atype.is_cref () || atype.is_cptr ()) && cls->gsi_cls ()->can_convert_to (atype.cls ())) {
// We can convert objects for cref and cptr, but ownership over these objects is not transferred.
// Hence we have to keep them on the heap.
void *new_obj = atype.cls ()->create_obj_from (cls->gsi_cls (), get_object (*arg));
heap->push (new gsi::ObjectHolder (atype.cls (), new_obj));
aa->write<void *> (new_obj);
} else {
throw tl::Exception (tl::sprintf (tl::to_string (tr ("Unexpected object type (expected argument of class %s)")), atype.cls ()->name ()));
}
} else {
if (cls->gsi_cls ()->is_derived_from (atype.cls ())) {
if (cls->gsi_cls ()->adapted_type_info ()) {
aa->write<void *> (cls->gsi_cls ()->create_adapted_from_obj (get_object (*arg)));
} else {
aa->write<void *> ((void *) cls->gsi_cls ()->clone (get_object (*arg)));
}
} else if (cls->gsi_cls ()->can_convert_to (atype.cls ())) {
aa->write<void *> (atype.cls ()->create_obj_from (cls->gsi_cls (), get_object (*arg)));
} else {
throw tl::Exception (tl::sprintf (tl::to_string (tr ("Unexpected object type (expected argument of class %s)")), atype.cls ()->name ()));
}
}
}
}
};
void push_arg (gsi::SerialArgs &arglist, const ArgType &atype, tl::Variant &arg, tl::Heap *heap)
{
gsi::do_on_type<writer> () (atype.type (), &arglist, &arg, atype, heap);
}
void push_args (gsi::SerialArgs &arglist, const tl::Variant &args, const gsi::MethodBase *meth, tl::Heap *heap)
{
int n = int (args.size ());
int narg = 0;
for (gsi::MethodBase::argument_iterator a = meth->begin_arguments (); a != meth->end_arguments () && narg < n; ++a, ++narg) {
try {
// Note: this const_cast is ugly, but it will basically enable "out" parameters
// TODO: clean this up.
gsi::do_on_type<writer> () (a->type (), &arglist, const_cast<tl::Variant *> ((args.get_list ().begin () + narg).operator-> ()), *a, heap);
} catch (tl::Exception &ex) {
std::string msg = ex.msg () + tl::sprintf (tl::to_string (tr (" (argument '%s')")), a->spec ()->name ());
throw tl::Exception (msg);
}
}
}
// ---------------------------------------------------------------------
// Reader function for serialization
/**
* @brief A reader function
*/
template <class R>
struct reader
{
void
operator() (tl::Variant *out, gsi::SerialArgs *rr, const gsi::ArgType &atype, tl::Heap *heap)
{
if (atype.is_ref ()) {
*out = rr->template read<R &> (*heap);
} else if (atype.is_cref ()) {
*out = rr->template read<const R &> (*heap);
} else if (atype.is_ptr ()) {
R *p = rr->template read<R *> (*heap);
if (p == 0) {
*out = tl::Variant ();
} else {
*out = *p;
}
} else if (atype.is_cptr ()) {
const R *p = rr->template read<const R *> (*heap);
if (p == 0) {
*out = tl::Variant ();
} else {
*out = *p;
}
} else {
*out = rr->template read<R> (*heap);
}
}
};
/**
* @brief A reader specialization for void *
*/
template <>
struct reader<void *>
{
void
operator() (tl::Variant *out, gsi::SerialArgs *rr, const gsi::ArgType &atype, tl::Heap *heap)
{
tl_assert (!atype.is_ref ());
tl_assert (!atype.is_cref ());
tl_assert (!atype.is_ptr ());
tl_assert (!atype.is_cptr ());
*out = size_t (rr->read<void *> (*heap));
}
};
/**
* @brief A reader specialization for strings
*/
template <>
struct reader<gsi::StringType>
{
void
operator() (tl::Variant *out, gsi::SerialArgs *rr, const gsi::ArgType &, tl::Heap *heap)
{
std::unique_ptr<StringAdaptor> a ((StringAdaptor *) rr->read<void *>(*heap));
if (!a.get ()) {
*out = tl::Variant ();
} else {
*out = tl::Variant (std::string (a->c_str (), a->size ()));
}
}
};
/**
* @brief A reader specialization for variants
*/
template <>
struct reader<gsi::VariantType>
{
void
operator() (tl::Variant *out, gsi::SerialArgs *rr, const gsi::ArgType &, tl::Heap *heap)
{
std::unique_ptr<VariantAdaptor> a ((VariantAdaptor *) rr->read<void *>(*heap));
if (!a.get ()) {
*out = tl::Variant ();
} else {
*out = a->var ();
}
}
};
/**
* @brief A reader specialization for maps
*/
template <>
struct reader<MapType>
{
void
operator() (tl::Variant *out, gsi::SerialArgs *rr, const gsi::ArgType &atype, tl::Heap *heap)
{
std::unique_ptr<MapAdaptor> a ((MapAdaptor *) rr->read<void *>(*heap));
if (!a.get ()) {
*out = tl::Variant ();
} else {
tl_assert (atype.inner () != 0);
tl_assert (atype.inner_k () != 0);
VariantBasedMapAdaptor t (out, atype.inner (), atype.inner_k ());
a->copy_to (&t, *heap);
}
}
};
/**
* @brief A reader specialization for const char *
*/
template <>
struct reader<VectorType>
{
void
operator() (tl::Variant *out, gsi::SerialArgs *rr, const gsi::ArgType &atype, tl::Heap *heap)
{
std::unique_ptr<VectorAdaptor> a ((VectorAdaptor *) rr->read<void *>(*heap));
if (!a.get ()) {
*out = tl::Variant ();
} else {
tl_assert (atype.inner () != 0);
VariantBasedVectorAdaptor t (out, atype.inner ());
a->copy_to (&t, *heap);
}
}
};
/**
* @brief A reader specialization for objects
*/
template <>
struct reader<ObjectType>
{
void
operator() (tl::Variant *out, gsi::SerialArgs *rr, const gsi::ArgType &atype, tl::Heap *heap)
{
void *obj = rr->read<void *> (*heap);
bool is_const = atype.is_cptr () || atype.is_cref ();
bool owner = true;
if (atype.is_ptr () || atype.is_cptr () || atype.is_ref () || atype.is_cref ()) {
owner = atype.pass_obj ();
}
bool can_destroy = atype.is_ptr () || owner;
const gsi::ClassBase *clsact = atype.cls ()->subclass_decl (obj);
tl_assert (clsact != 0);
if (obj == 0) {
*out = tl::Variant ();
} else if (!clsact->adapted_type_info () && clsact->is_managed ()) {
// gsi::ObjectBase-based objects can be managed by reference since they
// provide a tl::Object through the proxy.
*out = tl::Variant ();
const tl::VariantUserClassBase *cls = clsact->var_cls (atype.is_cref () || atype.is_cptr ());
tl_assert (cls != 0);
Proxy *proxy = clsact->gsi_object (obj)->find_client<Proxy> ();
if (proxy) {
out->set_user_ref (proxy, cls, false);
} else {
// establish a new proxy
proxy = new Proxy (clsact);
proxy->set (obj, owner, is_const, can_destroy);
out->set_user_ref (proxy, cls, owner);
}
} else {
const tl::VariantUserClassBase *cls = 0;
if (clsact->adapted_type_info ()) {
// create an adaptor from an adapted type
if (owner) {
obj = clsact->create_from_adapted_consume (obj);
} else {
obj = clsact->create_from_adapted (obj);
}
cls = clsact->var_cls (false);
} else {
cls = clsact->var_cls (is_const);
}
tl_assert (cls != 0);
*out = tl::Variant ();
// consider prefer_copy
if (! owner && atype.prefer_copy () && !clsact->is_managed () && clsact->can_copy ()) {
obj = clsact->clone (obj);
owner = true;
}
out->set_user (obj, cls, owner);
}
}
};
/**
* @brief A reader specialization for new objects
*/
template <>
struct reader<VoidType>
{
void
operator() (tl::Variant *, gsi::SerialArgs *, const gsi::ArgType &, tl::Heap *)
{
// nothing - void type won't be serialized
}
};
// ---------------------------------------------------------------------
// VariantBasedVectorAdaptorIterator implementation
VariantBasedVectorAdaptorIterator::VariantBasedVectorAdaptorIterator (tl::Variant::iterator b, tl::Variant::iterator e, const gsi::ArgType *ainner)
: m_b (b), m_e (e), mp_ainner (ainner)
{
// .. nothing yet ..
}
void VariantBasedVectorAdaptorIterator::get (SerialArgs &w, tl::Heap &heap) const
{
gsi::do_on_type<writer> () (mp_ainner->type (), &w, &*m_b, *mp_ainner, &heap);
}
bool VariantBasedVectorAdaptorIterator::at_end () const
{
return m_b == m_e;
}
void VariantBasedVectorAdaptorIterator::inc ()
{
++m_b;
}
// ---------------------------------------------------------------------
// VariantBasedVectorAdaptor implementation
VariantBasedVectorAdaptor::VariantBasedVectorAdaptor (tl::Variant *var, const gsi::ArgType *ainner)
: mp_ainner (ainner), mp_var (var)
{
}
VectorAdaptorIterator *VariantBasedVectorAdaptor::create_iterator () const
{
return new VariantBasedVectorAdaptorIterator (mp_var->begin (), mp_var->end (), mp_ainner);
}
void VariantBasedVectorAdaptor::push (SerialArgs &r, tl::Heap &heap)
{
tl::Variant member;
gsi::do_on_type<reader> () (mp_ainner->type (), &member, &r, *mp_ainner, &heap);
mp_var->push (member);
}
void VariantBasedVectorAdaptor::clear ()
{
mp_var->set_list ();
}
size_t VariantBasedVectorAdaptor::size () const
{
return mp_var->size ();
}
size_t VariantBasedVectorAdaptor::serial_size () const
{
return mp_ainner->size ();
}
// ---------------------------------------------------------------------
// VariantBasedMapAdaptorIterator implementation
VariantBasedMapAdaptorIterator::VariantBasedMapAdaptorIterator (tl::Variant::array_iterator b, tl::Variant::array_iterator e, const gsi::ArgType *ainner, const gsi::ArgType *ainner_k)
: m_b (b), m_e (e), mp_ainner (ainner), mp_ainner_k (ainner_k)
{
// .. nothing yet ..
}
void VariantBasedMapAdaptorIterator::get (SerialArgs &w, tl::Heap &heap) const
{
// Note: the const_cast is ugly but in this context we won't modify the variant given as the key.
// And it lets us keep the interface tidy.
gsi::do_on_type<writer> () (mp_ainner_k->type (), &w, const_cast<tl::Variant *> (&m_b->first), *mp_ainner_k, &heap);
gsi::do_on_type<writer> () (mp_ainner->type (), &w, &m_b->second, *mp_ainner, &heap);
}
bool VariantBasedMapAdaptorIterator::at_end () const
{
return m_b == m_e;
}
void VariantBasedMapAdaptorIterator::inc ()
{
++m_b;
}
// ---------------------------------------------------------------------
// VariantBasedMapAdaptor implementation
VariantBasedMapAdaptor::VariantBasedMapAdaptor (tl::Variant *var, const gsi::ArgType *ainner, const gsi::ArgType *ainner_k)
: mp_ainner (ainner), mp_ainner_k (ainner_k), mp_var (var)
{
}
MapAdaptorIterator *VariantBasedMapAdaptor::create_iterator () const
{
return new VariantBasedMapAdaptorIterator (mp_var->begin_array (), mp_var->end_array (), mp_ainner, mp_ainner_k);
}
void VariantBasedMapAdaptor::insert (SerialArgs &r, tl::Heap &heap)
{
tl::Variant k, v;
gsi::do_on_type<reader> () (mp_ainner_k->type (), &k, &r, *mp_ainner_k, &heap);
gsi::do_on_type<reader> () (mp_ainner->type (), &v, &r, *mp_ainner, &heap);
mp_var->insert (k, v);
}
void VariantBasedMapAdaptor::clear ()
{
mp_var->set_array ();
}
size_t VariantBasedMapAdaptor::size () const
{
return mp_var->array_size ();
}
size_t VariantBasedMapAdaptor::serial_size () const
{
return mp_ainner_k->size () + mp_ainner->size ();
}
// ---------------------------------------------------------------------
// pop_arg implementation
void
pull_arg (gsi::SerialArgs &retlist, const gsi::ArgType &atype, tl::Variant &arg_out, tl::Heap *heap)
{
gsi::do_on_type<reader> () (atype.type (), &arg_out, &retlist, atype, heap);
}
}

View File

@ -0,0 +1,81 @@
/*
KLayout Layout Viewer
Copyright (C) 2006-2024 Matthias Koefferlein
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef HDR_gsiVariantArgs
#define HDR_gsiVariantArgs
#include "gsiCommon.h"
#include "gsiSerialisation.h"
#include "gsiTypes.h"
namespace tl
{
class Heap;
class Variant;
}
namespace gsi
{
class SerialArgs;
class ArgType;
/**
* @brief Pushes a variant on the serialization stack
*
* This also involves expanding of arrays into objects by calling the constructor.
*
* @param arglist The serialization stack to push the argument to
* @param atype The argument type
* @param arg The argument to push (may be modified if 'out' parameter)
* @param heap The heap
*/
GSI_PUBLIC void push_arg (gsi::SerialArgs &arglist, const gsi::ArgType &atype, tl::Variant &arg, tl::Heap *heap);
/**
* @brief Pulls a variant from the serialization stack
*
* This function will pull the next argument from the bottom of the serialization stack
* and remove it from the stack.
*
* @param retlist The serialization stack
* @param atype The argument type
* @param arg_out Receives the value
* @param heap The heap
*/
GSI_PUBLIC void pull_arg (gsi::SerialArgs &retlist, const gsi::ArgType &atype, tl::Variant &arg_out, tl::Heap *heap);
/**
* @brief Tests if the argument can be passed to a specific type
* @param atype The argument type
* @param arg The value to pass to it
* @param loose true for loose checking
*
* @return True, if the argument can be passed
*/
GSI_PUBLIC bool test_arg (const gsi::ArgType &atype, const tl::Variant &arg, bool loose);
}
#endif

View File

@ -564,7 +564,7 @@ class CollectFunction
: public tl::EvalFunction
{
public:
virtual void execute (const tl::ExpressionParserContext & /*context*/, tl::Variant &out, const std::vector<tl::Variant> &args) const
virtual void execute (const tl::ExpressionParserContext & /*context*/, tl::Variant &out, const std::vector<tl::Variant> &args, const std::map<std::string, tl::Variant> * /*kwargs*/) const
{
out = tl::Variant ();
if (args.size () > 0) {
@ -623,3 +623,152 @@ TEST(11)
v = e.parse ("var b = Trans.new(1)*Trans.new(Vector.new(10, 20))").execute ();
EXPECT_EQ (v.to_string (), std::string ("r90 -20,10"));
}
TEST(12)
{
// Keyword arguments are best tested on transformations, here CplxTrans
tl::Eval e;
tl::Variant v;
v = e.parse ("var t = CplxTrans.new()").execute ();
EXPECT_EQ (v.to_string (), std::string ("r0 *1 0,0"));
v = e.parse ("var t = CplxTrans.new(1.5)").execute ();
EXPECT_EQ (v.to_string (), std::string ("r0 *1.5 0,0"));
v = e.parse ("var t = CplxTrans.new(1, 2)").execute ();
EXPECT_EQ (v.to_string (), std::string ("r0 *1 1,2"));
v = e.parse ("var t = CplxTrans.new(1, y=2)").execute ();
EXPECT_EQ (v.to_string (), std::string ("r0 *1 1,2"));
v = e.parse ("var t = CplxTrans.new(x=1, y=2)").execute ();
EXPECT_EQ (v.to_string (), std::string ("r0 *1 1,2"));
v = e.parse ("var t = CplxTrans.new(u=DVector.new(1, 2))").execute ();
EXPECT_EQ (v.to_string (), std::string ("r0 *1 1,2"));
v = e.parse ("var t = CplxTrans.new(DVector.new(1, 2))").execute ();
EXPECT_EQ (v.to_string (), std::string ("r0 *1 1,2"));
v = e.parse ("var t = CplxTrans.new(u=Vector.new(1, 2))").execute ();
EXPECT_EQ (v.to_string (), std::string ("r0 *1 1,2"));
v = e.parse ("var t = CplxTrans.new(u=[1, 2])").execute ();
EXPECT_EQ (v.to_string (), std::string ("r0 *1 1,2"));
v = e.parse ("var t = CplxTrans.new(mag=1.5)").execute ();
EXPECT_EQ (v.to_string (), std::string ("r0 *1.5 0,0"));
v = e.parse ("var t = CplxTrans.new(1.5, 45, true, 1, 2)").execute ();
EXPECT_EQ (v.to_string (), std::string ("m22.5 *1.5 1,2"));
v = e.parse ("var t = CplxTrans.new(1.5, 45, true, DVector.new(1, 2))").execute ();
EXPECT_EQ (v.to_string (), std::string ("m22.5 *1.5 1,2"));
v = e.parse ("var t = CplxTrans.new(1.5, x=1, y=2, mirrx=true, rot=45)").execute ();
EXPECT_EQ (v.to_string (), std::string ("m22.5 *1.5 1,2"));
v = e.parse ("var t = CplxTrans.new(CplxTrans.M0)").execute ();
EXPECT_EQ (v.to_string (), std::string ("m0 *1 0,0"));
v = e.parse ("var t = CplxTrans.new(CplxTrans.M0, u=DVector.new(1, 2))").execute ();
EXPECT_EQ (v.to_string (), std::string ("m0 *1 1,2"));
v = e.parse ("var t = CplxTrans.new(CplxTrans.M0, mag=1.5, u=DVector.new(1, 2))").execute ();
EXPECT_EQ (v.to_string (), std::string ("m0 *1.5 1,2"));
v = e.parse ("var t = CplxTrans.new(CplxTrans.M0, 1.5, DVector.new(1, 2))").execute ();
EXPECT_EQ (v.to_string (), std::string ("m0 *1.5 1,2"));
v = e.parse ("var t = CplxTrans.new(CplxTrans.M0, mag=1.5, x=1, y=2)").execute ();
EXPECT_EQ (v.to_string (), std::string ("m0 *1.5 1,2"));
v = e.parse ("var t = CplxTrans.new(CplxTrans.M0, 1.5, 1, 2)").execute ();
EXPECT_EQ (v.to_string (), std::string ("m0 *1.5 1,2"));
v = e.parse ("var t = CplxTrans.new(VCplxTrans.M0)").execute ();
EXPECT_EQ (v.to_string (), std::string ("m0 *1 0,0"));
v = e.parse ("var t = CplxTrans.new(ICplxTrans.M0)").execute ();
EXPECT_EQ (v.to_string (), std::string ("m0 *1 0,0"));
v = e.parse ("var t = CplxTrans.new(DCplxTrans.M0)").execute ();
EXPECT_EQ (v.to_string (), std::string ("m0 *1 0,0"));
v = e.parse ("var t = CplxTrans.new(Trans.M0)").execute ();
EXPECT_EQ (v.to_string (), std::string ("m0 *1 0,0"));
v = e.parse ("var t = CplxTrans.new(Trans.M0, 1.5)").execute ();
EXPECT_EQ (v.to_string (), std::string ("m0 *1.5 0,0"));
v = e.parse ("var t = CplxTrans.new(Trans.M0, mag=1.5)").execute ();
EXPECT_EQ (v.to_string (), std::string ("m0 *1.5 0,0"));
v = e.parse ("var t = CplxTrans.new(t = Trans.M0, mag=1.5)").execute ();
EXPECT_EQ (v.to_string (), std::string ("m0 *1.5 0,0"));
v = e.parse ("var t = CplxTrans.new(); t.disp=[1,2]; t").execute ();
EXPECT_EQ (v.to_string (), std::string ("r0 *1 1,2"));
v = e.parse ("var t = ICplxTrans.new(15, 25); t.to_s(dbu=0.01)").execute ();
EXPECT_EQ (v.to_string (), std::string ("r0 *1 0.15000,0.25000"));
}
TEST(13)
{
// Keyword arguments are best tested on transformations, here Trans
tl::Eval e;
tl::Variant v;
v = e.parse ("var t = Trans.new(Trans.M0, 1, 2)").execute ();
EXPECT_EQ (v.to_string (), std::string ("m0 1,2"));
v = e.parse ("var t = Trans.new(Trans.M0, x = 1, y = 2)").execute ();
EXPECT_EQ (v.to_string (), std::string ("m0 1,2"));
v = e.parse ("var t = Trans.new(Trans.M0, Vector.new(1, 2))").execute ();
EXPECT_EQ (v.to_string (), std::string ("m0 1,2"));
v = e.parse ("var t = Trans.new(Trans.M0, u=Vector.new(1, 2))").execute ();
EXPECT_EQ (v.to_string (), std::string ("m0 1,2"));
v = e.parse ("var t = Trans.new(rot=3, mirrx=true)").execute ();
EXPECT_EQ (v.to_string (), std::string ("m135 0,0"));
v = e.parse ("var t = Trans.new(rot=3, mirrx=true, x=1, y=2)").execute ();
EXPECT_EQ (v.to_string (), std::string ("m135 1,2"));
v = e.parse ("var t = Trans.new(3, true, 1, 2)").execute ();
EXPECT_EQ (v.to_string (), std::string ("m135 1,2"));
v = e.parse ("var t = Trans.new(3, true, Vector.new(1, 2))").execute ();
EXPECT_EQ (v.to_string (), std::string ("m135 1,2"));
v = e.parse ("var t = Trans.new(rot=3, mirrx=true, u=Vector.new(1, 2))").execute ();
EXPECT_EQ (v.to_string (), std::string ("m135 1,2"));
v = e.parse ("var t = Trans.new()").execute ();
EXPECT_EQ (v.to_string (), std::string ("r0 0,0"));
v = e.parse ("var t = Trans.new(DTrans.M0)").execute ();
EXPECT_EQ (v.to_string (), std::string ("m0 0,0"));
v = e.parse ("var t = Trans.new(DTrans.M0, 1, 2)").execute ();
EXPECT_EQ (v.to_string (), std::string ("m0 1,2"));
v = e.parse ("var t = Trans.new(DTrans.M0, x=1, y=2)").execute ();
EXPECT_EQ (v.to_string (), std::string ("m0 1,2"));
v = e.parse ("var t = Trans.new(c = DTrans.M0, x=1, y=2)").execute ();
EXPECT_EQ (v.to_string (), std::string ("m0 1,2"));
v = e.parse ("var t = Trans.new(Vector.new(1, 2))").execute ();
EXPECT_EQ (v.to_string (), std::string ("r0 1,2"));
v = e.parse ("var t = Trans.new(1, 2)").execute ();
EXPECT_EQ (v.to_string (), std::string ("r0 1,2"));
}
TEST(14)
{
// Keyword arguments and errors
tl::Eval e;
tl::Variant v;
try {
v = e.parse("var t = CplxTrans.new(1.5, 2.5); t.to_s(dbu='abc')").execute();
EXPECT_EQ (true, false);
} catch (tl::Exception &ex) {
EXPECT_EQ (ex.msg (), "Unexpected text after numeric value: '...abc' (argument 'dbu') at position 34 (...to_s(dbu='abc'))");
}
try {
v = e.parse("var t = CplxTrans.new(1.5, 2.5); var tt = CplxTrans.new(); t.assign(other=t)").execute();
EXPECT_EQ (true, false);
} catch (tl::Exception &ex) {
EXPECT_EQ (ex.msg ().find ("Keyword arguments not permitted at position 60 (...assign(other=t))"), 0);
}
try {
v = e.parse("var t = CplxTrans.new('abc');").execute();
EXPECT_EQ (true, false);
} catch (tl::Exception &ex) {
EXPECT_EQ (ex.msg ().find ("No overload with matching arguments. Variants are:"), 0);
}
try {
v = e.parse("var t = CplxTrans.new(uu=17);").execute();
EXPECT_EQ (true, false);
} catch (tl::Exception &ex) {
EXPECT_EQ (ex.msg ().find ("Can't match arguments. Variants are:"), 0);
}
try {
v = e.parse("var t = CplxTrans.new(u='17');").execute();
EXPECT_EQ (true, false);
} catch (tl::Exception &ex) {
EXPECT_EQ (ex.msg ().find ("No overload with matching arguments. Variants are:"), 0);
}
}

View File

@ -119,6 +119,7 @@ static void _call_f_addSpacerItem_1708 (const qt_gsi::GenericMethod * /*decl*/,
__SUPPRESS_UNUSED_WARNING(args);
tl::Heap heap;
QSpacerItem *arg1 = gsi::arg_reader<QSpacerItem * >() (args, heap);
qt_gsi::qt_keep (arg1);
__SUPPRESS_UNUSED_WARNING(ret);
((QBoxLayout *)cls)->addSpacerItem (arg1);
}
@ -203,6 +204,7 @@ static void _call_f_addWidget_4616 (const qt_gsi::GenericMethod * /*decl*/, void
__SUPPRESS_UNUSED_WARNING(args);
tl::Heap heap;
QWidget *arg1 = gsi::arg_reader<QWidget * >() (args, heap);
qt_gsi::qt_keep (arg1);
int arg2 = args ? gsi::arg_reader<int >() (args, heap) : gsi::arg_maker<int >() (0, heap);
QFlags<Qt::AlignmentFlag> arg3 = args ? gsi::arg_reader<QFlags<Qt::AlignmentFlag> >() (args, heap) : gsi::arg_maker<QFlags<Qt::AlignmentFlag> >() (0, heap);
__SUPPRESS_UNUSED_WARNING(ret);
@ -309,6 +311,7 @@ static void _call_f_insertLayout_2659 (const qt_gsi::GenericMethod * /*decl*/, v
tl::Heap heap;
int arg1 = gsi::arg_reader<int >() (args, heap);
QLayout *arg2 = gsi::arg_reader<QLayout * >() (args, heap);
qt_gsi::qt_keep (arg2);
int arg3 = args ? gsi::arg_reader<int >() (args, heap) : gsi::arg_maker<int >() (0, heap);
__SUPPRESS_UNUSED_WARNING(ret);
((QBoxLayout *)cls)->insertLayout (arg1, arg2, arg3);
@ -333,6 +336,7 @@ static void _call_f_insertSpacerItem_2367 (const qt_gsi::GenericMethod * /*decl*
tl::Heap heap;
int arg1 = gsi::arg_reader<int >() (args, heap);
QSpacerItem *arg2 = gsi::arg_reader<QSpacerItem * >() (args, heap);
qt_gsi::qt_keep (arg2);
__SUPPRESS_UNUSED_WARNING(ret);
((QBoxLayout *)cls)->insertSpacerItem (arg1, arg2);
}
@ -406,6 +410,7 @@ static void _call_f_insertWidget_5275 (const qt_gsi::GenericMethod * /*decl*/, v
tl::Heap heap;
int arg1 = gsi::arg_reader<int >() (args, heap);
QWidget *arg2 = gsi::arg_reader<QWidget * >() (args, heap);
qt_gsi::qt_keep (arg2);
int arg3 = args ? gsi::arg_reader<int >() (args, heap) : gsi::arg_maker<int >() (0, heap);
QFlags<Qt::AlignmentFlag> arg4 = args ? gsi::arg_reader<QFlags<Qt::AlignmentFlag> >() (args, heap) : gsi::arg_maker<QFlags<Qt::AlignmentFlag> >() (0, heap);
__SUPPRESS_UNUSED_WARNING(ret);
@ -1686,6 +1691,7 @@ static void _call_fp_insertItem_2399 (const qt_gsi::GenericMethod * /*decl*/, vo
tl::Heap heap;
int arg1 = gsi::arg_reader<int >() (args, heap);
QLayoutItem *arg2 = gsi::arg_reader<QLayoutItem * >() (args, heap);
qt_gsi::qt_keep (arg2);
__SUPPRESS_UNUSED_WARNING(ret);
((QBoxLayout_Adaptor *)cls)->fp_QBoxLayout_insertItem_2399 (arg1, arg2);
}

View File

@ -85,6 +85,7 @@ static void _call_f_addItem_7018 (const qt_gsi::GenericMethod * /*decl*/, void *
__SUPPRESS_UNUSED_WARNING(args);
tl::Heap heap;
QLayoutItem *arg1 = gsi::arg_reader<QLayoutItem * >() (args, heap);
qt_gsi::qt_keep (arg1);
int arg2 = gsi::arg_reader<int >() (args, heap);
int arg3 = gsi::arg_reader<int >() (args, heap);
int arg4 = args ? gsi::arg_reader<int >() (args, heap) : gsi::arg_maker<int >() (1, heap);
@ -176,6 +177,7 @@ static void _call_f_addWidget_1315 (const qt_gsi::GenericMethod * /*decl*/, void
__SUPPRESS_UNUSED_WARNING(args);
tl::Heap heap;
QWidget *arg1 = gsi::arg_reader<QWidget * >() (args, heap);
qt_gsi::qt_keep (arg1);
__SUPPRESS_UNUSED_WARNING(ret);
((QGridLayout *)cls)->addWidget (arg1);
}
@ -202,6 +204,7 @@ static void _call_f_addWidget_5275 (const qt_gsi::GenericMethod * /*decl*/, void
__SUPPRESS_UNUSED_WARNING(args);
tl::Heap heap;
QWidget *arg1 = gsi::arg_reader<QWidget * >() (args, heap);
qt_gsi::qt_keep (arg1);
int arg2 = gsi::arg_reader<int >() (args, heap);
int arg3 = gsi::arg_reader<int >() (args, heap);
QFlags<Qt::AlignmentFlag> arg4 = args ? gsi::arg_reader<QFlags<Qt::AlignmentFlag> >() (args, heap) : gsi::arg_maker<QFlags<Qt::AlignmentFlag> >() (0, heap);
@ -235,6 +238,7 @@ static void _call_f_addWidget_6593 (const qt_gsi::GenericMethod * /*decl*/, void
__SUPPRESS_UNUSED_WARNING(args);
tl::Heap heap;
QWidget *arg1 = gsi::arg_reader<QWidget * >() (args, heap);
qt_gsi::qt_keep (arg1);
int arg2 = gsi::arg_reader<int >() (args, heap);
int arg3 = gsi::arg_reader<int >() (args, heap);
int arg4 = gsi::arg_reader<int >() (args, heap);

View File

@ -1033,6 +1033,7 @@ static void _call_fp_insertItem_2399 (const qt_gsi::GenericMethod * /*decl*/, vo
tl::Heap heap;
int arg1 = gsi::arg_reader<int >() (args, heap);
QLayoutItem *arg2 = gsi::arg_reader<QLayoutItem * >() (args, heap);
qt_gsi::qt_keep (arg2);
__SUPPRESS_UNUSED_WARNING(ret);
((QHBoxLayout_Adaptor *)cls)->fp_QHBoxLayout_insertItem_2399 (arg1, arg2);
}

View File

@ -1713,6 +1713,59 @@ class QImage_Adaptor : public QImage, public qt_gsi::QtObjectBase
{
public:
// NOTE: QImage does not take ownership of the data, so
// we will provide a buffer to do so. This requires an additional
// copy, but as GSI is not guaranteeing the lifetime of the
// data, this is required here.
class DataHolder
{
public:
DataHolder() : mp_data(0) { }
DataHolder(unsigned char *data) : mp_data(data) { }
~DataHolder()
{
if (mp_data) {
delete[](mp_data);
}
mp_data = 0;
}
static unsigned char *alloc(const std::string &data)
{
unsigned char *ptr = new unsigned char[data.size()];
memcpy(ptr, data.c_str(), data.size());
return ptr;
}
private:
unsigned char *mp_data;
};
static QImage_Adaptor *new_qimage_from_data1(const std::string &data, int width, int height, int bytesPerLine, QImage::Format format)
{
return new QImage_Adaptor(DataHolder::alloc(data), width, height, bytesPerLine, format);
}
static QImage_Adaptor *new_qimage_from_data2(const std::string &data, int width, int height, QImage::Format format)
{
return new QImage_Adaptor(DataHolder::alloc(data), width, height, format);
}
QImage_Adaptor(unsigned char *data, int width, int height, int bytesPerLine, QImage::Format format)
: QImage(data, width, height, bytesPerLine, format), m_holder(data)
{
}
QImage_Adaptor(unsigned char *data, int width, int height, QImage::Format format)
: QImage (data, width, height, format), m_holder(data)
{
}
DataHolder m_holder;
virtual ~QImage_Adaptor();
// [adaptor ctor] QImage::QImage()
@ -1733,18 +1786,6 @@ public:
qt_gsi::QtObjectBase::init (this);
}
// [adaptor ctor] QImage::QImage(const unsigned char *data, int width, int height, QImage::Format format)
QImage_Adaptor(const unsigned char *data, int width, int height, QImage::Format format) : QImage(data, width, height, format)
{
qt_gsi::QtObjectBase::init (this);
}
// [adaptor ctor] QImage::QImage(const unsigned char *data, int width, int height, int bytesPerLine, QImage::Format format)
QImage_Adaptor(const unsigned char *data, int width, int height, int bytesPerLine, QImage::Format format) : QImage(data, width, height, bytesPerLine, format)
{
qt_gsi::QtObjectBase::init (this);
}
// [adaptor ctor] QImage::QImage(const QString &fileName, const char *format)
QImage_Adaptor(const QString &fileName) : QImage(fileName)
{
@ -1858,63 +1899,6 @@ static void _call_ctor_QImage_Adaptor_3051 (const qt_gsi::GenericStaticMethod *
}
// Constructor QImage::QImage(const unsigned char *data, int width, int height, QImage::Format format) (adaptor class)
static void _init_ctor_QImage_Adaptor_5679 (qt_gsi::GenericStaticMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("data");
decl->add_arg<const unsigned char * > (argspec_0);
static gsi::ArgSpecBase argspec_1 ("width");
decl->add_arg<int > (argspec_1);
static gsi::ArgSpecBase argspec_2 ("height");
decl->add_arg<int > (argspec_2);
static gsi::ArgSpecBase argspec_3 ("format");
decl->add_arg<const qt_gsi::Converter<QImage::Format>::target_type & > (argspec_3);
decl->set_return_new<QImage_Adaptor> ();
}
static void _call_ctor_QImage_Adaptor_5679 (const qt_gsi::GenericStaticMethod * /*decl*/, gsi::SerialArgs &args, gsi::SerialArgs &ret)
{
__SUPPRESS_UNUSED_WARNING(args);
tl::Heap heap;
const unsigned char *arg1 = gsi::arg_reader<const unsigned char * >() (args, heap);
int arg2 = gsi::arg_reader<int >() (args, heap);
int arg3 = gsi::arg_reader<int >() (args, heap);
const qt_gsi::Converter<QImage::Format>::target_type & arg4 = gsi::arg_reader<const qt_gsi::Converter<QImage::Format>::target_type & >() (args, heap);
ret.write<QImage_Adaptor *> (new QImage_Adaptor (arg1, arg2, arg3, qt_gsi::QtToCppAdaptor<QImage::Format>(arg4).cref()));
}
// Constructor QImage::QImage(const unsigned char *data, int width, int height, int bytesPerLine, QImage::Format format) (adaptor class)
static void _init_ctor_QImage_Adaptor_6338 (qt_gsi::GenericStaticMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("data");
decl->add_arg<const unsigned char * > (argspec_0);
static gsi::ArgSpecBase argspec_1 ("width");
decl->add_arg<int > (argspec_1);
static gsi::ArgSpecBase argspec_2 ("height");
decl->add_arg<int > (argspec_2);
static gsi::ArgSpecBase argspec_3 ("bytesPerLine");
decl->add_arg<int > (argspec_3);
static gsi::ArgSpecBase argspec_4 ("format");
decl->add_arg<const qt_gsi::Converter<QImage::Format>::target_type & > (argspec_4);
decl->set_return_new<QImage_Adaptor> ();
}
static void _call_ctor_QImage_Adaptor_6338 (const qt_gsi::GenericStaticMethod * /*decl*/, gsi::SerialArgs &args, gsi::SerialArgs &ret)
{
__SUPPRESS_UNUSED_WARNING(args);
tl::Heap heap;
const unsigned char *arg1 = gsi::arg_reader<const unsigned char * >() (args, heap);
int arg2 = gsi::arg_reader<int >() (args, heap);
int arg3 = gsi::arg_reader<int >() (args, heap);
int arg4 = gsi::arg_reader<int >() (args, heap);
const qt_gsi::Converter<QImage::Format>::target_type & arg5 = gsi::arg_reader<const qt_gsi::Converter<QImage::Format>::target_type & >() (args, heap);
ret.write<QImage_Adaptor *> (new QImage_Adaptor (arg1, arg2, arg3, arg4, qt_gsi::QtToCppAdaptor<QImage::Format>(arg5).cref()));
}
// Constructor QImage::QImage(const QString &fileName, const char *format) (adaptor class)
static void _init_ctor_QImage_Adaptor_3648 (qt_gsi::GenericStaticMethod *decl)
@ -2006,8 +1990,6 @@ static gsi::Methods methods_QImage_Adaptor () {
methods += new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QImage::QImage()\nThis method creates an object of class QImage.", &_init_ctor_QImage_Adaptor_0, &_call_ctor_QImage_Adaptor_0);
methods += new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QImage::QImage(const QSize &size, QImage::Format format)\nThis method creates an object of class QImage.", &_init_ctor_QImage_Adaptor_3430, &_call_ctor_QImage_Adaptor_3430);
methods += new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QImage::QImage(int width, int height, QImage::Format format)\nThis method creates an object of class QImage.", &_init_ctor_QImage_Adaptor_3051, &_call_ctor_QImage_Adaptor_3051);
methods += new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QImage::QImage(const unsigned char *data, int width, int height, QImage::Format format)\nThis method creates an object of class QImage.", &_init_ctor_QImage_Adaptor_5679, &_call_ctor_QImage_Adaptor_5679);
methods += new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QImage::QImage(const unsigned char *data, int width, int height, int bytesPerLine, QImage::Format format)\nThis method creates an object of class QImage.", &_init_ctor_QImage_Adaptor_6338, &_call_ctor_QImage_Adaptor_6338);
methods += new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QImage::QImage(const QString &fileName, const char *format)\nThis method creates an object of class QImage.", &_init_ctor_QImage_Adaptor_3648, &_call_ctor_QImage_Adaptor_3648);
methods += new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QImage::QImage(const QImage &)\nThis method creates an object of class QImage.", &_init_ctor_QImage_Adaptor_1877, &_call_ctor_QImage_Adaptor_1877);
methods += new qt_gsi::GenericMethod ("*metric", "@brief Virtual method int QImage::metric(QPaintDevice::PaintDeviceMetric metric)\nThis method can be reimplemented in a derived class.", true, &_init_cbs_metric_c3445_0, &_call_cbs_metric_c3445_0);
@ -2018,6 +2000,15 @@ static gsi::Methods methods_QImage_Adaptor () {
}
gsi::Class<QImage_Adaptor> decl_QImage_Adaptor (qtdecl_QImage (), "QtGui", "QImage",
gsi::constructor("new", &QImage_Adaptor::new_qimage_from_data1, gsi::arg ("data"), gsi::arg ("width"), gsi::arg ("height"), gsi::arg ("bytesPerLine"), gsi::arg ("format"),
"@brief QImage::QImage(const uchar *data, int width, int height, int bytesPerLine)\n"
"The cleanupFunction parameter is available currently."
) +
gsi::constructor("new", &QImage_Adaptor::new_qimage_from_data2, gsi::arg ("data"), gsi::arg ("width"), gsi::arg ("height"), gsi::arg ("format"),
"@brief QImage::QImage(const uchar *data, int width, int height)\n"
"The cleanupFunction parameter is available currently."
)
+
methods_QImage_Adaptor (),
"@qt\n@brief Binding of QImage");

View File

@ -110,6 +110,7 @@ static void _call_f_addWidget_1315 (const qt_gsi::GenericMethod * /*decl*/, void
__SUPPRESS_UNUSED_WARNING(args);
tl::Heap heap;
QWidget *arg1 = gsi::arg_reader<QWidget * >() (args, heap);
qt_gsi::qt_keep (arg1);
__SUPPRESS_UNUSED_WARNING(ret);
((QLayout *)cls)->addWidget (arg1);
}

View File

@ -95,6 +95,7 @@ static void _call_f_addWidget_1315 (const qt_gsi::GenericMethod * /*decl*/, void
__SUPPRESS_UNUSED_WARNING(args);
tl::Heap heap;
QWidget *arg1 = gsi::arg_reader<QWidget * >() (args, heap);
qt_gsi::qt_keep (arg1);
ret.write<int > ((int)((QStackedLayout *)cls)->addWidget (arg1));
}
@ -162,6 +163,7 @@ static void _call_f_insertWidget_1974 (const qt_gsi::GenericMethod * /*decl*/, v
tl::Heap heap;
int arg1 = gsi::arg_reader<int >() (args, heap);
QWidget *arg2 = gsi::arg_reader<QWidget * >() (args, heap);
qt_gsi::qt_keep (arg2);
ret.write<int > ((int)((QStackedLayout *)cls)->insertWidget (arg1, arg2));
}

View File

@ -1033,6 +1033,7 @@ static void _call_fp_insertItem_2399 (const qt_gsi::GenericMethod * /*decl*/, vo
tl::Heap heap;
int arg1 = gsi::arg_reader<int >() (args, heap);
QLayoutItem *arg2 = gsi::arg_reader<QLayoutItem * >() (args, heap);
qt_gsi::qt_keep (arg2);
__SUPPRESS_UNUSED_WARNING(ret);
((QVBoxLayout_Adaptor *)cls)->fp_QVBoxLayout_insertItem_2399 (arg1, arg2);
}

View File

@ -35,6 +35,7 @@ SOURCES += \
$$PWD/gsiDeclQDataStream.cc \
$$PWD/gsiDeclQDate.cc \
$$PWD/gsiDeclQDateTime.cc \
$$PWD/gsiDeclQDeadlineTimer.cc \
$$PWD/gsiDeclQDebug.cc \
$$PWD/gsiDeclQDebugStateSaver.cc \
$$PWD/gsiDeclQDeferredDeleteEvent.cc \
@ -100,6 +101,7 @@ SOURCES += \
$$PWD/gsiDeclQMutex.cc \
$$PWD/gsiDeclQNoDebug.cc \
$$PWD/gsiDeclQObject.cc \
$$PWD/gsiDeclQOperatingSystemVersion.cc \
$$PWD/gsiDeclQParallelAnimationGroup.cc \
$$PWD/gsiDeclQPauseAnimation.cc \
$$PWD/gsiDeclQPersistentModelIndex.cc \
@ -109,6 +111,8 @@ SOURCES += \
$$PWD/gsiDeclQProcess.cc \
$$PWD/gsiDeclQProcessEnvironment.cc \
$$PWD/gsiDeclQPropertyAnimation.cc \
$$PWD/gsiDeclQRandomGenerator.cc \
$$PWD/gsiDeclQRandomGenerator64.cc \
$$PWD/gsiDeclQReadLocker.cc \
$$PWD/gsiDeclQReadWriteLock.cc \
$$PWD/gsiDeclQRect.cc \
@ -121,6 +125,7 @@ SOURCES += \
$$PWD/gsiDeclQRunnable.cc \
$$PWD/gsiDeclQSaveFile.cc \
$$PWD/gsiDeclQSemaphore.cc \
$$PWD/gsiDeclQSemaphoreReleaser.cc \
$$PWD/gsiDeclQSequentialAnimationGroup.cc \
$$PWD/gsiDeclQSequentialIterable.cc \
$$PWD/gsiDeclQSettings.cc \
@ -164,6 +169,7 @@ SOURCES += \
$$PWD/gsiDeclQUrl.cc \
$$PWD/gsiDeclQUrlQuery.cc \
$$PWD/gsiDeclQVariantAnimation.cc \
$$PWD/gsiDeclQVersionNumber.cc \
$$PWD/gsiDeclQWaitCondition.cc \
$$PWD/gsiDeclQWriteLocker.cc \
$$PWD/gsiDeclQXmlStreamAttribute.cc \

View File

@ -504,18 +504,18 @@ public:
}
}
// [adaptor impl] bool QAbstractAnimation::eventFilter(QObject *, QEvent *)
bool cbs_eventFilter_2411_0(QObject *arg1, QEvent *arg2)
// [adaptor impl] bool QAbstractAnimation::eventFilter(QObject *watched, QEvent *event)
bool cbs_eventFilter_2411_0(QObject *watched, QEvent *event)
{
return QAbstractAnimation::eventFilter(arg1, arg2);
return QAbstractAnimation::eventFilter(watched, event);
}
virtual bool eventFilter(QObject *arg1, QEvent *arg2)
virtual bool eventFilter(QObject *watched, QEvent *event)
{
if (cb_eventFilter_2411_0.can_issue()) {
return cb_eventFilter_2411_0.issue<QAbstractAnimation_Adaptor, bool, QObject *, QEvent *>(&QAbstractAnimation_Adaptor::cbs_eventFilter_2411_0, arg1, arg2);
return cb_eventFilter_2411_0.issue<QAbstractAnimation_Adaptor, bool, QObject *, QEvent *>(&QAbstractAnimation_Adaptor::cbs_eventFilter_2411_0, watched, event);
} else {
return QAbstractAnimation::eventFilter(arg1, arg2);
return QAbstractAnimation::eventFilter(watched, event);
}
}
@ -538,33 +538,33 @@ public:
emit QAbstractAnimation::stateChanged(newState, oldState);
}
// [adaptor impl] void QAbstractAnimation::childEvent(QChildEvent *)
void cbs_childEvent_1701_0(QChildEvent *arg1)
// [adaptor impl] void QAbstractAnimation::childEvent(QChildEvent *event)
void cbs_childEvent_1701_0(QChildEvent *event)
{
QAbstractAnimation::childEvent(arg1);
QAbstractAnimation::childEvent(event);
}
virtual void childEvent(QChildEvent *arg1)
virtual void childEvent(QChildEvent *event)
{
if (cb_childEvent_1701_0.can_issue()) {
cb_childEvent_1701_0.issue<QAbstractAnimation_Adaptor, QChildEvent *>(&QAbstractAnimation_Adaptor::cbs_childEvent_1701_0, arg1);
cb_childEvent_1701_0.issue<QAbstractAnimation_Adaptor, QChildEvent *>(&QAbstractAnimation_Adaptor::cbs_childEvent_1701_0, event);
} else {
QAbstractAnimation::childEvent(arg1);
QAbstractAnimation::childEvent(event);
}
}
// [adaptor impl] void QAbstractAnimation::customEvent(QEvent *)
void cbs_customEvent_1217_0(QEvent *arg1)
// [adaptor impl] void QAbstractAnimation::customEvent(QEvent *event)
void cbs_customEvent_1217_0(QEvent *event)
{
QAbstractAnimation::customEvent(arg1);
QAbstractAnimation::customEvent(event);
}
virtual void customEvent(QEvent *arg1)
virtual void customEvent(QEvent *event)
{
if (cb_customEvent_1217_0.can_issue()) {
cb_customEvent_1217_0.issue<QAbstractAnimation_Adaptor, QEvent *>(&QAbstractAnimation_Adaptor::cbs_customEvent_1217_0, arg1);
cb_customEvent_1217_0.issue<QAbstractAnimation_Adaptor, QEvent *>(&QAbstractAnimation_Adaptor::cbs_customEvent_1217_0, event);
} else {
QAbstractAnimation::customEvent(arg1);
QAbstractAnimation::customEvent(event);
}
}
@ -598,18 +598,18 @@ public:
}
}
// [adaptor impl] void QAbstractAnimation::timerEvent(QTimerEvent *)
void cbs_timerEvent_1730_0(QTimerEvent *arg1)
// [adaptor impl] void QAbstractAnimation::timerEvent(QTimerEvent *event)
void cbs_timerEvent_1730_0(QTimerEvent *event)
{
QAbstractAnimation::timerEvent(arg1);
QAbstractAnimation::timerEvent(event);
}
virtual void timerEvent(QTimerEvent *arg1)
virtual void timerEvent(QTimerEvent *event)
{
if (cb_timerEvent_1730_0.can_issue()) {
cb_timerEvent_1730_0.issue<QAbstractAnimation_Adaptor, QTimerEvent *>(&QAbstractAnimation_Adaptor::cbs_timerEvent_1730_0, arg1);
cb_timerEvent_1730_0.issue<QAbstractAnimation_Adaptor, QTimerEvent *>(&QAbstractAnimation_Adaptor::cbs_timerEvent_1730_0, event);
} else {
QAbstractAnimation::timerEvent(arg1);
QAbstractAnimation::timerEvent(event);
}
}
@ -677,7 +677,7 @@ QAbstractAnimation_Adaptor::~QAbstractAnimation_Adaptor() { }
static void _init_ctor_QAbstractAnimation_Adaptor_1302 (qt_gsi::GenericStaticMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("parent", true, "0");
static gsi::ArgSpecBase argspec_0 ("parent", true, "nullptr");
decl->add_arg<QObject * > (argspec_0);
decl->set_return_new<QAbstractAnimation_Adaptor> ();
}
@ -686,16 +686,16 @@ static void _call_ctor_QAbstractAnimation_Adaptor_1302 (const qt_gsi::GenericSta
{
__SUPPRESS_UNUSED_WARNING(args);
tl::Heap heap;
QObject *arg1 = args ? gsi::arg_reader<QObject * >() (args, heap) : gsi::arg_maker<QObject * >() (0, heap);
QObject *arg1 = args ? gsi::arg_reader<QObject * >() (args, heap) : gsi::arg_maker<QObject * >() (nullptr, heap);
ret.write<QAbstractAnimation_Adaptor *> (new QAbstractAnimation_Adaptor (arg1));
}
// void QAbstractAnimation::childEvent(QChildEvent *)
// void QAbstractAnimation::childEvent(QChildEvent *event)
static void _init_cbs_childEvent_1701_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("event");
decl->add_arg<QChildEvent * > (argspec_0);
decl->set_return<void > ();
}
@ -733,11 +733,11 @@ static void _call_emitter_currentLoopChanged_767 (const qt_gsi::GenericMethod *
}
// void QAbstractAnimation::customEvent(QEvent *)
// void QAbstractAnimation::customEvent(QEvent *event)
static void _init_cbs_customEvent_1217_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("event");
decl->add_arg<QEvent * > (argspec_0);
decl->set_return<void > ();
}
@ -761,7 +761,7 @@ static void _set_callback_cbs_customEvent_1217_0 (void *cls, const gsi::Callback
static void _init_emitter_destroyed_1302 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1", true, "0");
static gsi::ArgSpecBase argspec_0 ("arg1", true, "nullptr");
decl->add_arg<QObject * > (argspec_0);
decl->set_return<void > ();
}
@ -770,7 +770,7 @@ static void _call_emitter_destroyed_1302 (const qt_gsi::GenericMethod * /*decl*/
{
__SUPPRESS_UNUSED_WARNING(args);
tl::Heap heap;
QObject *arg1 = args ? gsi::arg_reader<QObject * >() (args, heap) : gsi::arg_maker<QObject * >() (0, heap);
QObject *arg1 = args ? gsi::arg_reader<QObject * >() (args, heap) : gsi::arg_maker<QObject * >() (nullptr, heap);
((QAbstractAnimation_Adaptor *)cls)->emitter_QAbstractAnimation_destroyed_1302 (arg1);
}
@ -859,13 +859,13 @@ static void _set_callback_cbs_event_1217_0 (void *cls, const gsi::Callback &cb)
}
// bool QAbstractAnimation::eventFilter(QObject *, QEvent *)
// bool QAbstractAnimation::eventFilter(QObject *watched, QEvent *event)
static void _init_cbs_eventFilter_2411_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("watched");
decl->add_arg<QObject * > (argspec_0);
static gsi::ArgSpecBase argspec_1 ("arg2");
static gsi::ArgSpecBase argspec_1 ("event");
decl->add_arg<QEvent * > (argspec_1);
decl->set_return<bool > ();
}
@ -1002,11 +1002,11 @@ static void _call_emitter_stateChanged_5680 (const qt_gsi::GenericMethod * /*dec
}
// void QAbstractAnimation::timerEvent(QTimerEvent *)
// void QAbstractAnimation::timerEvent(QTimerEvent *event)
static void _init_cbs_timerEvent_1730_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("event");
decl->add_arg<QTimerEvent * > (argspec_0);
decl->set_return<void > ();
}
@ -1109,10 +1109,10 @@ gsi::Class<QAbstractAnimation> &qtdecl_QAbstractAnimation ();
static gsi::Methods methods_QAbstractAnimation_Adaptor () {
gsi::Methods methods;
methods += new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QAbstractAnimation::QAbstractAnimation(QObject *parent)\nThis method creates an object of class QAbstractAnimation.", &_init_ctor_QAbstractAnimation_Adaptor_1302, &_call_ctor_QAbstractAnimation_Adaptor_1302);
methods += new qt_gsi::GenericMethod ("*childEvent", "@brief Virtual method void QAbstractAnimation::childEvent(QChildEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_childEvent_1701_0, &_call_cbs_childEvent_1701_0);
methods += new qt_gsi::GenericMethod ("*childEvent", "@brief Virtual method void QAbstractAnimation::childEvent(QChildEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_childEvent_1701_0, &_call_cbs_childEvent_1701_0);
methods += new qt_gsi::GenericMethod ("*childEvent", "@hide", false, &_init_cbs_childEvent_1701_0, &_call_cbs_childEvent_1701_0, &_set_callback_cbs_childEvent_1701_0);
methods += new qt_gsi::GenericMethod ("emit_currentLoopChanged", "@brief Emitter for signal void QAbstractAnimation::currentLoopChanged(int currentLoop)\nCall this method to emit this signal.", false, &_init_emitter_currentLoopChanged_767, &_call_emitter_currentLoopChanged_767);
methods += new qt_gsi::GenericMethod ("*customEvent", "@brief Virtual method void QAbstractAnimation::customEvent(QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_customEvent_1217_0, &_call_cbs_customEvent_1217_0);
methods += new qt_gsi::GenericMethod ("*customEvent", "@brief Virtual method void QAbstractAnimation::customEvent(QEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_customEvent_1217_0, &_call_cbs_customEvent_1217_0);
methods += new qt_gsi::GenericMethod ("*customEvent", "@hide", false, &_init_cbs_customEvent_1217_0, &_call_cbs_customEvent_1217_0, &_set_callback_cbs_customEvent_1217_0);
methods += new qt_gsi::GenericMethod ("emit_destroyed", "@brief Emitter for signal void QAbstractAnimation::destroyed(QObject *)\nCall this method to emit this signal.", false, &_init_emitter_destroyed_1302, &_call_emitter_destroyed_1302);
methods += new qt_gsi::GenericMethod ("emit_directionChanged", "@brief Emitter for signal void QAbstractAnimation::directionChanged(QAbstractAnimation::Direction)\nCall this method to emit this signal.", false, &_init_emitter_directionChanged_3310, &_call_emitter_directionChanged_3310);
@ -1122,7 +1122,7 @@ static gsi::Methods methods_QAbstractAnimation_Adaptor () {
methods += new qt_gsi::GenericMethod ("duration", "@hide", true, &_init_cbs_duration_c0_0, &_call_cbs_duration_c0_0, &_set_callback_cbs_duration_c0_0);
methods += new qt_gsi::GenericMethod ("*event", "@brief Virtual method bool QAbstractAnimation::event(QEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_event_1217_0, &_call_cbs_event_1217_0);
methods += new qt_gsi::GenericMethod ("*event", "@hide", false, &_init_cbs_event_1217_0, &_call_cbs_event_1217_0, &_set_callback_cbs_event_1217_0);
methods += new qt_gsi::GenericMethod ("eventFilter", "@brief Virtual method bool QAbstractAnimation::eventFilter(QObject *, QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0);
methods += new qt_gsi::GenericMethod ("eventFilter", "@brief Virtual method bool QAbstractAnimation::eventFilter(QObject *watched, QEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0);
methods += new qt_gsi::GenericMethod ("eventFilter", "@hide", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0, &_set_callback_cbs_eventFilter_2411_0);
methods += new qt_gsi::GenericMethod ("emit_finished", "@brief Emitter for signal void QAbstractAnimation::finished()\nCall this method to emit this signal.", false, &_init_emitter_finished_0, &_call_emitter_finished_0);
methods += new qt_gsi::GenericMethod ("*isSignalConnected", "@brief Method bool QAbstractAnimation::isSignalConnected(const QMetaMethod &signal)\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_isSignalConnected_c2394, &_call_fp_isSignalConnected_c2394);
@ -1131,7 +1131,7 @@ static gsi::Methods methods_QAbstractAnimation_Adaptor () {
methods += new qt_gsi::GenericMethod ("*sender", "@brief Method QObject *QAbstractAnimation::sender()\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_sender_c0, &_call_fp_sender_c0);
methods += new qt_gsi::GenericMethod ("*senderSignalIndex", "@brief Method int QAbstractAnimation::senderSignalIndex()\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_senderSignalIndex_c0, &_call_fp_senderSignalIndex_c0);
methods += new qt_gsi::GenericMethod ("emit_stateChanged", "@brief Emitter for signal void QAbstractAnimation::stateChanged(QAbstractAnimation::State newState, QAbstractAnimation::State oldState)\nCall this method to emit this signal.", false, &_init_emitter_stateChanged_5680, &_call_emitter_stateChanged_5680);
methods += new qt_gsi::GenericMethod ("*timerEvent", "@brief Virtual method void QAbstractAnimation::timerEvent(QTimerEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_timerEvent_1730_0, &_call_cbs_timerEvent_1730_0);
methods += new qt_gsi::GenericMethod ("*timerEvent", "@brief Virtual method void QAbstractAnimation::timerEvent(QTimerEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_timerEvent_1730_0, &_call_cbs_timerEvent_1730_0);
methods += new qt_gsi::GenericMethod ("*timerEvent", "@hide", false, &_init_cbs_timerEvent_1730_0, &_call_cbs_timerEvent_1730_0, &_set_callback_cbs_timerEvent_1730_0);
methods += new qt_gsi::GenericMethod ("*updateCurrentTime", "@brief Virtual method void QAbstractAnimation::updateCurrentTime(int currentTime)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_updateCurrentTime_767_0, &_call_cbs_updateCurrentTime_767_0);
methods += new qt_gsi::GenericMethod ("*updateCurrentTime", "@hide", false, &_init_cbs_updateCurrentTime_767_0, &_call_cbs_updateCurrentTime_767_0, &_set_callback_cbs_updateCurrentTime_767_0);

View File

@ -410,7 +410,7 @@ static void _call_f_wakeUp_0 (const qt_gsi::GenericMethod * /*decl*/, void *cls,
static void _init_f_instance_1303 (qt_gsi::GenericStaticMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("thread", true, "0");
static gsi::ArgSpecBase argspec_0 ("thread", true, "nullptr");
decl->add_arg<QThread * > (argspec_0);
decl->set_return<QAbstractEventDispatcher * > ();
}
@ -419,7 +419,7 @@ static void _call_f_instance_1303 (const qt_gsi::GenericStaticMethod * /*decl*/,
{
__SUPPRESS_UNUSED_WARNING(args);
tl::Heap heap;
QThread *arg1 = args ? gsi::arg_reader<QThread * >() (args, heap) : gsi::arg_maker<QThread * >() (0, heap);
QThread *arg1 = args ? gsi::arg_reader<QThread * >() (args, heap) : gsi::arg_maker<QThread * >() (nullptr, heap);
ret.write<QAbstractEventDispatcher * > ((QAbstractEventDispatcher *)QAbstractEventDispatcher::instance (arg1));
}
@ -594,33 +594,33 @@ public:
emit QAbstractEventDispatcher::destroyed(arg1);
}
// [adaptor impl] bool QAbstractEventDispatcher::event(QEvent *)
bool cbs_event_1217_0(QEvent *arg1)
// [adaptor impl] bool QAbstractEventDispatcher::event(QEvent *event)
bool cbs_event_1217_0(QEvent *_event)
{
return QAbstractEventDispatcher::event(arg1);
return QAbstractEventDispatcher::event(_event);
}
virtual bool event(QEvent *arg1)
virtual bool event(QEvent *_event)
{
if (cb_event_1217_0.can_issue()) {
return cb_event_1217_0.issue<QAbstractEventDispatcher_Adaptor, bool, QEvent *>(&QAbstractEventDispatcher_Adaptor::cbs_event_1217_0, arg1);
return cb_event_1217_0.issue<QAbstractEventDispatcher_Adaptor, bool, QEvent *>(&QAbstractEventDispatcher_Adaptor::cbs_event_1217_0, _event);
} else {
return QAbstractEventDispatcher::event(arg1);
return QAbstractEventDispatcher::event(_event);
}
}
// [adaptor impl] bool QAbstractEventDispatcher::eventFilter(QObject *, QEvent *)
bool cbs_eventFilter_2411_0(QObject *arg1, QEvent *arg2)
// [adaptor impl] bool QAbstractEventDispatcher::eventFilter(QObject *watched, QEvent *event)
bool cbs_eventFilter_2411_0(QObject *watched, QEvent *event)
{
return QAbstractEventDispatcher::eventFilter(arg1, arg2);
return QAbstractEventDispatcher::eventFilter(watched, event);
}
virtual bool eventFilter(QObject *arg1, QEvent *arg2)
virtual bool eventFilter(QObject *watched, QEvent *event)
{
if (cb_eventFilter_2411_0.can_issue()) {
return cb_eventFilter_2411_0.issue<QAbstractEventDispatcher_Adaptor, bool, QObject *, QEvent *>(&QAbstractEventDispatcher_Adaptor::cbs_eventFilter_2411_0, arg1, arg2);
return cb_eventFilter_2411_0.issue<QAbstractEventDispatcher_Adaptor, bool, QObject *, QEvent *>(&QAbstractEventDispatcher_Adaptor::cbs_eventFilter_2411_0, watched, event);
} else {
return QAbstractEventDispatcher::eventFilter(arg1, arg2);
return QAbstractEventDispatcher::eventFilter(watched, event);
}
}
@ -837,33 +837,33 @@ public:
}
}
// [adaptor impl] void QAbstractEventDispatcher::childEvent(QChildEvent *)
void cbs_childEvent_1701_0(QChildEvent *arg1)
// [adaptor impl] void QAbstractEventDispatcher::childEvent(QChildEvent *event)
void cbs_childEvent_1701_0(QChildEvent *event)
{
QAbstractEventDispatcher::childEvent(arg1);
QAbstractEventDispatcher::childEvent(event);
}
virtual void childEvent(QChildEvent *arg1)
virtual void childEvent(QChildEvent *event)
{
if (cb_childEvent_1701_0.can_issue()) {
cb_childEvent_1701_0.issue<QAbstractEventDispatcher_Adaptor, QChildEvent *>(&QAbstractEventDispatcher_Adaptor::cbs_childEvent_1701_0, arg1);
cb_childEvent_1701_0.issue<QAbstractEventDispatcher_Adaptor, QChildEvent *>(&QAbstractEventDispatcher_Adaptor::cbs_childEvent_1701_0, event);
} else {
QAbstractEventDispatcher::childEvent(arg1);
QAbstractEventDispatcher::childEvent(event);
}
}
// [adaptor impl] void QAbstractEventDispatcher::customEvent(QEvent *)
void cbs_customEvent_1217_0(QEvent *arg1)
// [adaptor impl] void QAbstractEventDispatcher::customEvent(QEvent *event)
void cbs_customEvent_1217_0(QEvent *event)
{
QAbstractEventDispatcher::customEvent(arg1);
QAbstractEventDispatcher::customEvent(event);
}
virtual void customEvent(QEvent *arg1)
virtual void customEvent(QEvent *event)
{
if (cb_customEvent_1217_0.can_issue()) {
cb_customEvent_1217_0.issue<QAbstractEventDispatcher_Adaptor, QEvent *>(&QAbstractEventDispatcher_Adaptor::cbs_customEvent_1217_0, arg1);
cb_customEvent_1217_0.issue<QAbstractEventDispatcher_Adaptor, QEvent *>(&QAbstractEventDispatcher_Adaptor::cbs_customEvent_1217_0, event);
} else {
QAbstractEventDispatcher::customEvent(arg1);
QAbstractEventDispatcher::customEvent(event);
}
}
@ -882,18 +882,18 @@ public:
}
}
// [adaptor impl] void QAbstractEventDispatcher::timerEvent(QTimerEvent *)
void cbs_timerEvent_1730_0(QTimerEvent *arg1)
// [adaptor impl] void QAbstractEventDispatcher::timerEvent(QTimerEvent *event)
void cbs_timerEvent_1730_0(QTimerEvent *event)
{
QAbstractEventDispatcher::timerEvent(arg1);
QAbstractEventDispatcher::timerEvent(event);
}
virtual void timerEvent(QTimerEvent *arg1)
virtual void timerEvent(QTimerEvent *event)
{
if (cb_timerEvent_1730_0.can_issue()) {
cb_timerEvent_1730_0.issue<QAbstractEventDispatcher_Adaptor, QTimerEvent *>(&QAbstractEventDispatcher_Adaptor::cbs_timerEvent_1730_0, arg1);
cb_timerEvent_1730_0.issue<QAbstractEventDispatcher_Adaptor, QTimerEvent *>(&QAbstractEventDispatcher_Adaptor::cbs_timerEvent_1730_0, event);
} else {
QAbstractEventDispatcher::timerEvent(arg1);
QAbstractEventDispatcher::timerEvent(event);
}
}
@ -925,7 +925,7 @@ QAbstractEventDispatcher_Adaptor::~QAbstractEventDispatcher_Adaptor() { }
static void _init_ctor_QAbstractEventDispatcher_Adaptor_1302 (qt_gsi::GenericStaticMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("parent", true, "0");
static gsi::ArgSpecBase argspec_0 ("parent", true, "nullptr");
decl->add_arg<QObject * > (argspec_0);
decl->set_return_new<QAbstractEventDispatcher_Adaptor> ();
}
@ -934,7 +934,7 @@ static void _call_ctor_QAbstractEventDispatcher_Adaptor_1302 (const qt_gsi::Gene
{
__SUPPRESS_UNUSED_WARNING(args);
tl::Heap heap;
QObject *arg1 = args ? gsi::arg_reader<QObject * >() (args, heap) : gsi::arg_maker<QObject * >() (0, heap);
QObject *arg1 = args ? gsi::arg_reader<QObject * >() (args, heap) : gsi::arg_maker<QObject * >() (nullptr, heap);
ret.write<QAbstractEventDispatcher_Adaptor *> (new QAbstractEventDispatcher_Adaptor (arg1));
}
@ -967,11 +967,11 @@ static void _call_emitter_awake_0 (const qt_gsi::GenericMethod * /*decl*/, void
}
// void QAbstractEventDispatcher::childEvent(QChildEvent *)
// void QAbstractEventDispatcher::childEvent(QChildEvent *event)
static void _init_cbs_childEvent_1701_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("event");
decl->add_arg<QChildEvent * > (argspec_0);
decl->set_return<void > ();
}
@ -1011,11 +1011,11 @@ static void _set_callback_cbs_closingDown_0_0 (void *cls, const gsi::Callback &c
}
// void QAbstractEventDispatcher::customEvent(QEvent *)
// void QAbstractEventDispatcher::customEvent(QEvent *event)
static void _init_cbs_customEvent_1217_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("event");
decl->add_arg<QEvent * > (argspec_0);
decl->set_return<void > ();
}
@ -1039,7 +1039,7 @@ static void _set_callback_cbs_customEvent_1217_0 (void *cls, const gsi::Callback
static void _init_emitter_destroyed_1302 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1", true, "0");
static gsi::ArgSpecBase argspec_0 ("arg1", true, "nullptr");
decl->add_arg<QObject * > (argspec_0);
decl->set_return<void > ();
}
@ -1048,7 +1048,7 @@ static void _call_emitter_destroyed_1302 (const qt_gsi::GenericMethod * /*decl*/
{
__SUPPRESS_UNUSED_WARNING(args);
tl::Heap heap;
QObject *arg1 = args ? gsi::arg_reader<QObject * >() (args, heap) : gsi::arg_maker<QObject * >() (0, heap);
QObject *arg1 = args ? gsi::arg_reader<QObject * >() (args, heap) : gsi::arg_maker<QObject * >() (nullptr, heap);
((QAbstractEventDispatcher_Adaptor *)cls)->emitter_QAbstractEventDispatcher_destroyed_1302 (arg1);
}
@ -1077,11 +1077,11 @@ static void _set_callback_cbs_disconnectNotify_2394_0 (void *cls, const gsi::Cal
}
// bool QAbstractEventDispatcher::event(QEvent *)
// bool QAbstractEventDispatcher::event(QEvent *event)
static void _init_cbs_event_1217_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("event");
decl->add_arg<QEvent * > (argspec_0);
decl->set_return<bool > ();
}
@ -1100,13 +1100,13 @@ static void _set_callback_cbs_event_1217_0 (void *cls, const gsi::Callback &cb)
}
// bool QAbstractEventDispatcher::eventFilter(QObject *, QEvent *)
// bool QAbstractEventDispatcher::eventFilter(QObject *watched, QEvent *event)
static void _init_cbs_eventFilter_2411_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("watched");
decl->add_arg<QObject * > (argspec_0);
static gsi::ArgSpecBase argspec_1 ("arg2");
static gsi::ArgSpecBase argspec_1 ("event");
decl->add_arg<QEvent * > (argspec_1);
decl->set_return<bool > ();
}
@ -1413,11 +1413,11 @@ static void _set_callback_cbs_startingUp_0_0 (void *cls, const gsi::Callback &cb
}
// void QAbstractEventDispatcher::timerEvent(QTimerEvent *)
// void QAbstractEventDispatcher::timerEvent(QTimerEvent *event)
static void _init_cbs_timerEvent_1730_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("event");
decl->add_arg<QTimerEvent * > (argspec_0);
decl->set_return<void > ();
}
@ -1537,18 +1537,18 @@ static gsi::Methods methods_QAbstractEventDispatcher_Adaptor () {
methods += new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QAbstractEventDispatcher::QAbstractEventDispatcher(QObject *parent)\nThis method creates an object of class QAbstractEventDispatcher.", &_init_ctor_QAbstractEventDispatcher_Adaptor_1302, &_call_ctor_QAbstractEventDispatcher_Adaptor_1302);
methods += new qt_gsi::GenericMethod ("emit_aboutToBlock", "@brief Emitter for signal void QAbstractEventDispatcher::aboutToBlock()\nCall this method to emit this signal.", false, &_init_emitter_aboutToBlock_0, &_call_emitter_aboutToBlock_0);
methods += new qt_gsi::GenericMethod ("emit_awake", "@brief Emitter for signal void QAbstractEventDispatcher::awake()\nCall this method to emit this signal.", false, &_init_emitter_awake_0, &_call_emitter_awake_0);
methods += new qt_gsi::GenericMethod ("*childEvent", "@brief Virtual method void QAbstractEventDispatcher::childEvent(QChildEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_childEvent_1701_0, &_call_cbs_childEvent_1701_0);
methods += new qt_gsi::GenericMethod ("*childEvent", "@brief Virtual method void QAbstractEventDispatcher::childEvent(QChildEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_childEvent_1701_0, &_call_cbs_childEvent_1701_0);
methods += new qt_gsi::GenericMethod ("*childEvent", "@hide", false, &_init_cbs_childEvent_1701_0, &_call_cbs_childEvent_1701_0, &_set_callback_cbs_childEvent_1701_0);
methods += new qt_gsi::GenericMethod ("closingDown", "@brief Virtual method void QAbstractEventDispatcher::closingDown()\nThis method can be reimplemented in a derived class.", false, &_init_cbs_closingDown_0_0, &_call_cbs_closingDown_0_0);
methods += new qt_gsi::GenericMethod ("closingDown", "@hide", false, &_init_cbs_closingDown_0_0, &_call_cbs_closingDown_0_0, &_set_callback_cbs_closingDown_0_0);
methods += new qt_gsi::GenericMethod ("*customEvent", "@brief Virtual method void QAbstractEventDispatcher::customEvent(QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_customEvent_1217_0, &_call_cbs_customEvent_1217_0);
methods += new qt_gsi::GenericMethod ("*customEvent", "@brief Virtual method void QAbstractEventDispatcher::customEvent(QEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_customEvent_1217_0, &_call_cbs_customEvent_1217_0);
methods += new qt_gsi::GenericMethod ("*customEvent", "@hide", false, &_init_cbs_customEvent_1217_0, &_call_cbs_customEvent_1217_0, &_set_callback_cbs_customEvent_1217_0);
methods += new qt_gsi::GenericMethod ("emit_destroyed", "@brief Emitter for signal void QAbstractEventDispatcher::destroyed(QObject *)\nCall this method to emit this signal.", false, &_init_emitter_destroyed_1302, &_call_emitter_destroyed_1302);
methods += new qt_gsi::GenericMethod ("*disconnectNotify", "@brief Virtual method void QAbstractEventDispatcher::disconnectNotify(const QMetaMethod &signal)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_disconnectNotify_2394_0, &_call_cbs_disconnectNotify_2394_0);
methods += new qt_gsi::GenericMethod ("*disconnectNotify", "@hide", false, &_init_cbs_disconnectNotify_2394_0, &_call_cbs_disconnectNotify_2394_0, &_set_callback_cbs_disconnectNotify_2394_0);
methods += new qt_gsi::GenericMethod ("event", "@brief Virtual method bool QAbstractEventDispatcher::event(QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_event_1217_0, &_call_cbs_event_1217_0);
methods += new qt_gsi::GenericMethod ("event", "@brief Virtual method bool QAbstractEventDispatcher::event(QEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_event_1217_0, &_call_cbs_event_1217_0);
methods += new qt_gsi::GenericMethod ("event", "@hide", false, &_init_cbs_event_1217_0, &_call_cbs_event_1217_0, &_set_callback_cbs_event_1217_0);
methods += new qt_gsi::GenericMethod ("eventFilter", "@brief Virtual method bool QAbstractEventDispatcher::eventFilter(QObject *, QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0);
methods += new qt_gsi::GenericMethod ("eventFilter", "@brief Virtual method bool QAbstractEventDispatcher::eventFilter(QObject *watched, QEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0);
methods += new qt_gsi::GenericMethod ("eventFilter", "@hide", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0, &_set_callback_cbs_eventFilter_2411_0);
methods += new qt_gsi::GenericMethod ("flush", "@brief Virtual method void QAbstractEventDispatcher::flush()\nThis method can be reimplemented in a derived class.", false, &_init_cbs_flush_0_0, &_call_cbs_flush_0_0);
methods += new qt_gsi::GenericMethod ("flush", "@hide", false, &_init_cbs_flush_0_0, &_call_cbs_flush_0_0, &_set_callback_cbs_flush_0_0);
@ -1573,7 +1573,7 @@ static gsi::Methods methods_QAbstractEventDispatcher_Adaptor () {
methods += new qt_gsi::GenericMethod ("*senderSignalIndex", "@brief Method int QAbstractEventDispatcher::senderSignalIndex()\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_senderSignalIndex_c0, &_call_fp_senderSignalIndex_c0);
methods += new qt_gsi::GenericMethod ("startingUp", "@brief Virtual method void QAbstractEventDispatcher::startingUp()\nThis method can be reimplemented in a derived class.", false, &_init_cbs_startingUp_0_0, &_call_cbs_startingUp_0_0);
methods += new qt_gsi::GenericMethod ("startingUp", "@hide", false, &_init_cbs_startingUp_0_0, &_call_cbs_startingUp_0_0, &_set_callback_cbs_startingUp_0_0);
methods += new qt_gsi::GenericMethod ("*timerEvent", "@brief Virtual method void QAbstractEventDispatcher::timerEvent(QTimerEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_timerEvent_1730_0, &_call_cbs_timerEvent_1730_0);
methods += new qt_gsi::GenericMethod ("*timerEvent", "@brief Virtual method void QAbstractEventDispatcher::timerEvent(QTimerEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_timerEvent_1730_0, &_call_cbs_timerEvent_1730_0);
methods += new qt_gsi::GenericMethod ("*timerEvent", "@hide", false, &_init_cbs_timerEvent_1730_0, &_call_cbs_timerEvent_1730_0, &_set_callback_cbs_timerEvent_1730_0);
methods += new qt_gsi::GenericMethod ("unregisterSocketNotifier", "@brief Virtual method void QAbstractEventDispatcher::unregisterSocketNotifier(QSocketNotifier *notifier)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_unregisterSocketNotifier_2152_0, &_call_cbs_unregisterSocketNotifier_2152_0);
methods += new qt_gsi::GenericMethod ("unregisterSocketNotifier", "@hide", false, &_init_cbs_unregisterSocketNotifier_2152_0, &_call_cbs_unregisterSocketNotifier_2152_0, &_set_callback_cbs_unregisterSocketNotifier_2152_0);

View File

@ -128,6 +128,28 @@ static void _call_f_canFetchMore_c2395 (const qt_gsi::GenericMethod * /*decl*/,
}
// bool QAbstractItemModel::checkIndex(const QModelIndex &index, QFlags<QAbstractItemModel::CheckIndexOption> options)
static void _init_f_checkIndex_c6947 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("index");
decl->add_arg<const QModelIndex & > (argspec_0);
static gsi::ArgSpecBase argspec_1 ("options", true, "QAbstractItemModel::CheckIndexOption::NoOption");
decl->add_arg<QFlags<QAbstractItemModel::CheckIndexOption> > (argspec_1);
decl->set_return<bool > ();
}
static void _call_f_checkIndex_c6947 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret)
{
__SUPPRESS_UNUSED_WARNING(args);
tl::Heap heap;
const QModelIndex &arg1 = gsi::arg_reader<const QModelIndex & >() (args, heap);
QFlags<QAbstractItemModel::CheckIndexOption> arg2 = args ? gsi::arg_reader<QFlags<QAbstractItemModel::CheckIndexOption> >() (args, heap) : gsi::arg_maker<QFlags<QAbstractItemModel::CheckIndexOption> >() (QAbstractItemModel::CheckIndexOption::NoOption, heap);
ret.write<bool > ((bool)((QAbstractItemModel *)cls)->checkIndex (arg1, arg2));
}
// int QAbstractItemModel::columnCount(const QModelIndex &parent)
@ -1053,6 +1075,7 @@ static gsi::Methods methods_QAbstractItemModel () {
methods += new qt_gsi::GenericMethod ("buddy", "@brief Method QModelIndex QAbstractItemModel::buddy(const QModelIndex &index)\n", true, &_init_f_buddy_c2395, &_call_f_buddy_c2395);
methods += new qt_gsi::GenericMethod ("canDropMimeData", "@brief Method bool QAbstractItemModel::canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)\n", true, &_init_f_canDropMimeData_c7425, &_call_f_canDropMimeData_c7425);
methods += new qt_gsi::GenericMethod ("canFetchMore", "@brief Method bool QAbstractItemModel::canFetchMore(const QModelIndex &parent)\n", true, &_init_f_canFetchMore_c2395, &_call_f_canFetchMore_c2395);
methods += new qt_gsi::GenericMethod ("checkIndex", "@brief Method bool QAbstractItemModel::checkIndex(const QModelIndex &index, QFlags<QAbstractItemModel::CheckIndexOption> options)\n", true, &_init_f_checkIndex_c6947, &_call_f_checkIndex_c6947);
methods += new qt_gsi::GenericMethod ("columnCount", "@brief Method int QAbstractItemModel::columnCount(const QModelIndex &parent)\n", true, &_init_f_columnCount_c2395, &_call_f_columnCount_c2395);
methods += new qt_gsi::GenericMethod ("data", "@brief Method QVariant QAbstractItemModel::data(const QModelIndex &index, int role)\n", true, &_init_f_data_c3054, &_call_f_data_c3054);
methods += new qt_gsi::GenericMethod ("dropMimeData", "@brief Method bool QAbstractItemModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)\n", false, &_init_f_dropMimeData_7425, &_call_f_dropMimeData_7425);
@ -1439,33 +1462,33 @@ public:
}
}
// [adaptor impl] bool QAbstractItemModel::event(QEvent *)
bool cbs_event_1217_0(QEvent *arg1)
// [adaptor impl] bool QAbstractItemModel::event(QEvent *event)
bool cbs_event_1217_0(QEvent *_event)
{
return QAbstractItemModel::event(arg1);
return QAbstractItemModel::event(_event);
}
virtual bool event(QEvent *arg1)
virtual bool event(QEvent *_event)
{
if (cb_event_1217_0.can_issue()) {
return cb_event_1217_0.issue<QAbstractItemModel_Adaptor, bool, QEvent *>(&QAbstractItemModel_Adaptor::cbs_event_1217_0, arg1);
return cb_event_1217_0.issue<QAbstractItemModel_Adaptor, bool, QEvent *>(&QAbstractItemModel_Adaptor::cbs_event_1217_0, _event);
} else {
return QAbstractItemModel::event(arg1);
return QAbstractItemModel::event(_event);
}
}
// [adaptor impl] bool QAbstractItemModel::eventFilter(QObject *, QEvent *)
bool cbs_eventFilter_2411_0(QObject *arg1, QEvent *arg2)
// [adaptor impl] bool QAbstractItemModel::eventFilter(QObject *watched, QEvent *event)
bool cbs_eventFilter_2411_0(QObject *watched, QEvent *event)
{
return QAbstractItemModel::eventFilter(arg1, arg2);
return QAbstractItemModel::eventFilter(watched, event);
}
virtual bool eventFilter(QObject *arg1, QEvent *arg2)
virtual bool eventFilter(QObject *watched, QEvent *event)
{
if (cb_eventFilter_2411_0.can_issue()) {
return cb_eventFilter_2411_0.issue<QAbstractItemModel_Adaptor, bool, QObject *, QEvent *>(&QAbstractItemModel_Adaptor::cbs_eventFilter_2411_0, arg1, arg2);
return cb_eventFilter_2411_0.issue<QAbstractItemModel_Adaptor, bool, QObject *, QEvent *>(&QAbstractItemModel_Adaptor::cbs_eventFilter_2411_0, watched, event);
} else {
return QAbstractItemModel::eventFilter(arg1, arg2);
return QAbstractItemModel::eventFilter(watched, event);
}
}
@ -1989,33 +2012,33 @@ public:
}
}
// [adaptor impl] void QAbstractItemModel::childEvent(QChildEvent *)
void cbs_childEvent_1701_0(QChildEvent *arg1)
// [adaptor impl] void QAbstractItemModel::childEvent(QChildEvent *event)
void cbs_childEvent_1701_0(QChildEvent *event)
{
QAbstractItemModel::childEvent(arg1);
QAbstractItemModel::childEvent(event);
}
virtual void childEvent(QChildEvent *arg1)
virtual void childEvent(QChildEvent *event)
{
if (cb_childEvent_1701_0.can_issue()) {
cb_childEvent_1701_0.issue<QAbstractItemModel_Adaptor, QChildEvent *>(&QAbstractItemModel_Adaptor::cbs_childEvent_1701_0, arg1);
cb_childEvent_1701_0.issue<QAbstractItemModel_Adaptor, QChildEvent *>(&QAbstractItemModel_Adaptor::cbs_childEvent_1701_0, event);
} else {
QAbstractItemModel::childEvent(arg1);
QAbstractItemModel::childEvent(event);
}
}
// [adaptor impl] void QAbstractItemModel::customEvent(QEvent *)
void cbs_customEvent_1217_0(QEvent *arg1)
// [adaptor impl] void QAbstractItemModel::customEvent(QEvent *event)
void cbs_customEvent_1217_0(QEvent *event)
{
QAbstractItemModel::customEvent(arg1);
QAbstractItemModel::customEvent(event);
}
virtual void customEvent(QEvent *arg1)
virtual void customEvent(QEvent *event)
{
if (cb_customEvent_1217_0.can_issue()) {
cb_customEvent_1217_0.issue<QAbstractItemModel_Adaptor, QEvent *>(&QAbstractItemModel_Adaptor::cbs_customEvent_1217_0, arg1);
cb_customEvent_1217_0.issue<QAbstractItemModel_Adaptor, QEvent *>(&QAbstractItemModel_Adaptor::cbs_customEvent_1217_0, event);
} else {
QAbstractItemModel::customEvent(arg1);
QAbstractItemModel::customEvent(event);
}
}
@ -2034,18 +2057,18 @@ public:
}
}
// [adaptor impl] void QAbstractItemModel::timerEvent(QTimerEvent *)
void cbs_timerEvent_1730_0(QTimerEvent *arg1)
// [adaptor impl] void QAbstractItemModel::timerEvent(QTimerEvent *event)
void cbs_timerEvent_1730_0(QTimerEvent *event)
{
QAbstractItemModel::timerEvent(arg1);
QAbstractItemModel::timerEvent(event);
}
virtual void timerEvent(QTimerEvent *arg1)
virtual void timerEvent(QTimerEvent *event)
{
if (cb_timerEvent_1730_0.can_issue()) {
cb_timerEvent_1730_0.issue<QAbstractItemModel_Adaptor, QTimerEvent *>(&QAbstractItemModel_Adaptor::cbs_timerEvent_1730_0, arg1);
cb_timerEvent_1730_0.issue<QAbstractItemModel_Adaptor, QTimerEvent *>(&QAbstractItemModel_Adaptor::cbs_timerEvent_1730_0, event);
} else {
QAbstractItemModel::timerEvent(arg1);
QAbstractItemModel::timerEvent(event);
}
}
@ -2097,7 +2120,7 @@ QAbstractItemModel_Adaptor::~QAbstractItemModel_Adaptor() { }
static void _init_ctor_QAbstractItemModel_Adaptor_1302 (qt_gsi::GenericStaticMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("parent", true, "0");
static gsi::ArgSpecBase argspec_0 ("parent", true, "nullptr");
decl->add_arg<QObject * > (argspec_0);
decl->set_return_new<QAbstractItemModel_Adaptor> ();
}
@ -2106,7 +2129,7 @@ static void _call_ctor_QAbstractItemModel_Adaptor_1302 (const qt_gsi::GenericSta
{
__SUPPRESS_UNUSED_WARNING(args);
tl::Heap heap;
QObject *arg1 = args ? gsi::arg_reader<QObject * >() (args, heap) : gsi::arg_maker<QObject * >() (0, heap);
QObject *arg1 = args ? gsi::arg_reader<QObject * >() (args, heap) : gsi::arg_maker<QObject * >() (nullptr, heap);
ret.write<QAbstractItemModel_Adaptor *> (new QAbstractItemModel_Adaptor (arg1));
}
@ -2411,11 +2434,11 @@ static void _call_fp_changePersistentIndexList_5912 (const qt_gsi::GenericMethod
}
// void QAbstractItemModel::childEvent(QChildEvent *)
// void QAbstractItemModel::childEvent(QChildEvent *event)
static void _init_cbs_childEvent_1701_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("event");
decl->add_arg<QChildEvent * > (argspec_0);
decl->set_return<void > ();
}
@ -2622,7 +2645,7 @@ static void _init_fp_createIndex_c2374 (qt_gsi::GenericMethod *decl)
decl->add_arg<int > (argspec_0);
static gsi::ArgSpecBase argspec_1 ("column");
decl->add_arg<int > (argspec_1);
static gsi::ArgSpecBase argspec_2 ("data", true, "0");
static gsi::ArgSpecBase argspec_2 ("data", true, "nullptr");
decl->add_arg<void * > (argspec_2);
decl->set_return<QModelIndex > ();
}
@ -2633,7 +2656,7 @@ static void _call_fp_createIndex_c2374 (const qt_gsi::GenericMethod * /*decl*/,
tl::Heap heap;
int arg1 = gsi::arg_reader<int >() (args, heap);
int arg2 = gsi::arg_reader<int >() (args, heap);
void *arg3 = args ? gsi::arg_reader<void * >() (args, heap) : gsi::arg_maker<void * >() (0, heap);
void *arg3 = args ? gsi::arg_reader<void * >() (args, heap) : gsi::arg_maker<void * >() (nullptr, heap);
ret.write<QModelIndex > ((QModelIndex)((QAbstractItemModel_Adaptor *)cls)->fp_QAbstractItemModel_createIndex_c2374 (arg1, arg2, arg3));
}
@ -2662,11 +2685,11 @@ static void _call_fp_createIndex_c2657 (const qt_gsi::GenericMethod * /*decl*/,
}
// void QAbstractItemModel::customEvent(QEvent *)
// void QAbstractItemModel::customEvent(QEvent *event)
static void _init_cbs_customEvent_1217_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("event");
decl->add_arg<QEvent * > (argspec_0);
decl->set_return<void > ();
}
@ -2767,7 +2790,7 @@ static void _call_fp_decodeData_5302 (const qt_gsi::GenericMethod * /*decl*/, vo
static void _init_emitter_destroyed_1302 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1", true, "0");
static gsi::ArgSpecBase argspec_0 ("arg1", true, "nullptr");
decl->add_arg<QObject * > (argspec_0);
decl->set_return<void > ();
}
@ -2776,7 +2799,7 @@ static void _call_emitter_destroyed_1302 (const qt_gsi::GenericMethod * /*decl*/
{
__SUPPRESS_UNUSED_WARNING(args);
tl::Heap heap;
QObject *arg1 = args ? gsi::arg_reader<QObject * >() (args, heap) : gsi::arg_maker<QObject * >() (0, heap);
QObject *arg1 = args ? gsi::arg_reader<QObject * >() (args, heap) : gsi::arg_maker<QObject * >() (nullptr, heap);
((QAbstractItemModel_Adaptor *)cls)->emitter_QAbstractItemModel_destroyed_1302 (arg1);
}
@ -2967,11 +2990,11 @@ static void _call_fp_endResetModel_0 (const qt_gsi::GenericMethod * /*decl*/, vo
}
// bool QAbstractItemModel::event(QEvent *)
// bool QAbstractItemModel::event(QEvent *event)
static void _init_cbs_event_1217_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("event");
decl->add_arg<QEvent * > (argspec_0);
decl->set_return<bool > ();
}
@ -2990,13 +3013,13 @@ static void _set_callback_cbs_event_1217_0 (void *cls, const gsi::Callback &cb)
}
// bool QAbstractItemModel::eventFilter(QObject *, QEvent *)
// bool QAbstractItemModel::eventFilter(QObject *watched, QEvent *event)
static void _init_cbs_eventFilter_2411_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("watched");
decl->add_arg<QObject * > (argspec_0);
static gsi::ArgSpecBase argspec_1 ("arg2");
static gsi::ArgSpecBase argspec_1 ("event");
decl->add_arg<QEvent * > (argspec_1);
decl->set_return<bool > ();
}
@ -4099,11 +4122,11 @@ static void _set_callback_cbs_supportedDropActions_c0_0 (void *cls, const gsi::C
}
// void QAbstractItemModel::timerEvent(QTimerEvent *)
// void QAbstractItemModel::timerEvent(QTimerEvent *event)
static void _init_cbs_timerEvent_1730_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("event");
decl->add_arg<QTimerEvent * > (argspec_0);
decl->set_return<void > ();
}
@ -4146,7 +4169,7 @@ static gsi::Methods methods_QAbstractItemModel_Adaptor () {
methods += new qt_gsi::GenericMethod ("canFetchMore", "@hide", true, &_init_cbs_canFetchMore_c2395_0, &_call_cbs_canFetchMore_c2395_0, &_set_callback_cbs_canFetchMore_c2395_0);
methods += new qt_gsi::GenericMethod ("*changePersistentIndex", "@brief Method void QAbstractItemModel::changePersistentIndex(const QModelIndex &from, const QModelIndex &to)\nThis method is protected and can only be called from inside a derived class.", false, &_init_fp_changePersistentIndex_4682, &_call_fp_changePersistentIndex_4682);
methods += new qt_gsi::GenericMethod ("*changePersistentIndexList", "@brief Method void QAbstractItemModel::changePersistentIndexList(const QList<QModelIndex> &from, const QList<QModelIndex> &to)\nThis method is protected and can only be called from inside a derived class.", false, &_init_fp_changePersistentIndexList_5912, &_call_fp_changePersistentIndexList_5912);
methods += new qt_gsi::GenericMethod ("*childEvent", "@brief Virtual method void QAbstractItemModel::childEvent(QChildEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_childEvent_1701_0, &_call_cbs_childEvent_1701_0);
methods += new qt_gsi::GenericMethod ("*childEvent", "@brief Virtual method void QAbstractItemModel::childEvent(QChildEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_childEvent_1701_0, &_call_cbs_childEvent_1701_0);
methods += new qt_gsi::GenericMethod ("*childEvent", "@hide", false, &_init_cbs_childEvent_1701_0, &_call_cbs_childEvent_1701_0, &_set_callback_cbs_childEvent_1701_0);
methods += new qt_gsi::GenericMethod ("columnCount", "@brief Virtual method int QAbstractItemModel::columnCount(const QModelIndex &parent)\nThis method can be reimplemented in a derived class.", true, &_init_cbs_columnCount_c2395_1, &_call_cbs_columnCount_c2395_1);
methods += new qt_gsi::GenericMethod ("columnCount", "@hide", true, &_init_cbs_columnCount_c2395_1, &_call_cbs_columnCount_c2395_1, &_set_callback_cbs_columnCount_c2395_1);
@ -4158,7 +4181,7 @@ static gsi::Methods methods_QAbstractItemModel_Adaptor () {
methods += new qt_gsi::GenericMethod ("emit_columnsRemoved", "@brief Emitter for signal void QAbstractItemModel::columnsRemoved(const QModelIndex &parent, int first, int last)\nCall this method to emit this signal.", false, &_init_emitter_columnsRemoved_7372, &_call_emitter_columnsRemoved_7372);
methods += new qt_gsi::GenericMethod ("*createIndex", "@brief Method QModelIndex QAbstractItemModel::createIndex(int row, int column, void *data)\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_createIndex_c2374, &_call_fp_createIndex_c2374);
methods += new qt_gsi::GenericMethod ("*createIndex", "@brief Method QModelIndex QAbstractItemModel::createIndex(int row, int column, quintptr id)\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_createIndex_c2657, &_call_fp_createIndex_c2657);
methods += new qt_gsi::GenericMethod ("*customEvent", "@brief Virtual method void QAbstractItemModel::customEvent(QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_customEvent_1217_0, &_call_cbs_customEvent_1217_0);
methods += new qt_gsi::GenericMethod ("*customEvent", "@brief Virtual method void QAbstractItemModel::customEvent(QEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_customEvent_1217_0, &_call_cbs_customEvent_1217_0);
methods += new qt_gsi::GenericMethod ("*customEvent", "@hide", false, &_init_cbs_customEvent_1217_0, &_call_cbs_customEvent_1217_0, &_set_callback_cbs_customEvent_1217_0);
methods += new qt_gsi::GenericMethod ("data", "@brief Virtual method QVariant QAbstractItemModel::data(const QModelIndex &index, int role)\nThis method can be reimplemented in a derived class.", true, &_init_cbs_data_c3054_1, &_call_cbs_data_c3054_1);
methods += new qt_gsi::GenericMethod ("data", "@hide", true, &_init_cbs_data_c3054_1, &_call_cbs_data_c3054_1, &_set_callback_cbs_data_c3054_1);
@ -4177,9 +4200,9 @@ static gsi::Methods methods_QAbstractItemModel_Adaptor () {
methods += new qt_gsi::GenericMethod ("*endRemoveColumns", "@brief Method void QAbstractItemModel::endRemoveColumns()\nThis method is protected and can only be called from inside a derived class.", false, &_init_fp_endRemoveColumns_0, &_call_fp_endRemoveColumns_0);
methods += new qt_gsi::GenericMethod ("*endRemoveRows", "@brief Method void QAbstractItemModel::endRemoveRows()\nThis method is protected and can only be called from inside a derived class.", false, &_init_fp_endRemoveRows_0, &_call_fp_endRemoveRows_0);
methods += new qt_gsi::GenericMethod ("*endResetModel", "@brief Method void QAbstractItemModel::endResetModel()\nThis method is protected and can only be called from inside a derived class.", false, &_init_fp_endResetModel_0, &_call_fp_endResetModel_0);
methods += new qt_gsi::GenericMethod ("event", "@brief Virtual method bool QAbstractItemModel::event(QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_event_1217_0, &_call_cbs_event_1217_0);
methods += new qt_gsi::GenericMethod ("event", "@brief Virtual method bool QAbstractItemModel::event(QEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_event_1217_0, &_call_cbs_event_1217_0);
methods += new qt_gsi::GenericMethod ("event", "@hide", false, &_init_cbs_event_1217_0, &_call_cbs_event_1217_0, &_set_callback_cbs_event_1217_0);
methods += new qt_gsi::GenericMethod ("eventFilter", "@brief Virtual method bool QAbstractItemModel::eventFilter(QObject *, QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0);
methods += new qt_gsi::GenericMethod ("eventFilter", "@brief Virtual method bool QAbstractItemModel::eventFilter(QObject *watched, QEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0);
methods += new qt_gsi::GenericMethod ("eventFilter", "@hide", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0, &_set_callback_cbs_eventFilter_2411_0);
methods += new qt_gsi::GenericMethod ("fetchMore", "@brief Virtual method void QAbstractItemModel::fetchMore(const QModelIndex &parent)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_fetchMore_2395_0, &_call_cbs_fetchMore_2395_0);
methods += new qt_gsi::GenericMethod ("fetchMore", "@hide", false, &_init_cbs_fetchMore_2395_0, &_call_cbs_fetchMore_2395_0, &_set_callback_cbs_fetchMore_2395_0);
@ -4255,7 +4278,7 @@ static gsi::Methods methods_QAbstractItemModel_Adaptor () {
methods += new qt_gsi::GenericMethod ("supportedDragActions", "@hide", true, &_init_cbs_supportedDragActions_c0_0, &_call_cbs_supportedDragActions_c0_0, &_set_callback_cbs_supportedDragActions_c0_0);
methods += new qt_gsi::GenericMethod ("supportedDropActions", "@brief Virtual method QFlags<Qt::DropAction> QAbstractItemModel::supportedDropActions()\nThis method can be reimplemented in a derived class.", true, &_init_cbs_supportedDropActions_c0_0, &_call_cbs_supportedDropActions_c0_0);
methods += new qt_gsi::GenericMethod ("supportedDropActions", "@hide", true, &_init_cbs_supportedDropActions_c0_0, &_call_cbs_supportedDropActions_c0_0, &_set_callback_cbs_supportedDropActions_c0_0);
methods += new qt_gsi::GenericMethod ("*timerEvent", "@brief Virtual method void QAbstractItemModel::timerEvent(QTimerEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_timerEvent_1730_0, &_call_cbs_timerEvent_1730_0);
methods += new qt_gsi::GenericMethod ("*timerEvent", "@brief Virtual method void QAbstractItemModel::timerEvent(QTimerEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_timerEvent_1730_0, &_call_cbs_timerEvent_1730_0);
methods += new qt_gsi::GenericMethod ("*timerEvent", "@hide", false, &_init_cbs_timerEvent_1730_0, &_call_cbs_timerEvent_1730_0, &_set_callback_cbs_timerEvent_1730_0);
return methods;
}
@ -4267,6 +4290,26 @@ gsi::Class<QAbstractItemModel_Adaptor> decl_QAbstractItemModel_Adaptor (qtdecl_Q
}
// Implementation of the enum wrapper class for QAbstractItemModel::CheckIndexOption
namespace qt_gsi
{
static gsi::Enum<QAbstractItemModel::CheckIndexOption> decl_QAbstractItemModel_CheckIndexOption_Enum ("QtCore", "QAbstractItemModel_CheckIndexOption",
gsi::enum_const ("NoOption", QAbstractItemModel::CheckIndexOption::NoOption, "@brief Enum constant QAbstractItemModel::CheckIndexOption::NoOption") +
gsi::enum_const ("IndexIsValid", QAbstractItemModel::CheckIndexOption::IndexIsValid, "@brief Enum constant QAbstractItemModel::CheckIndexOption::IndexIsValid") +
gsi::enum_const ("DoNotUseParent", QAbstractItemModel::CheckIndexOption::DoNotUseParent, "@brief Enum constant QAbstractItemModel::CheckIndexOption::DoNotUseParent") +
gsi::enum_const ("ParentIsInvalid", QAbstractItemModel::CheckIndexOption::ParentIsInvalid, "@brief Enum constant QAbstractItemModel::CheckIndexOption::ParentIsInvalid"),
"@qt\n@brief This class represents the QAbstractItemModel::CheckIndexOption enum");
static gsi::QFlagsClass<QAbstractItemModel::CheckIndexOption > decl_QAbstractItemModel_CheckIndexOption_Enums ("QtCore", "QAbstractItemModel_QFlags_CheckIndexOption",
"@qt\n@brief This class represents the QFlags<QAbstractItemModel::CheckIndexOption> flag set");
static gsi::ClassExt<QAbstractItemModel> decl_QAbstractItemModel_CheckIndexOption_Enum_as_child (decl_QAbstractItemModel_CheckIndexOption_Enum, "CheckIndexOption");
static gsi::ClassExt<QAbstractItemModel> decl_QAbstractItemModel_CheckIndexOption_Enums_as_child (decl_QAbstractItemModel_CheckIndexOption_Enums, "QFlags_CheckIndexOption");
}
// Implementation of the enum wrapper class for QAbstractItemModel::LayoutChangeHint
namespace qt_gsi
{

View File

@ -566,33 +566,33 @@ public:
}
}
// [adaptor impl] bool QAbstractListModel::event(QEvent *)
bool cbs_event_1217_0(QEvent *arg1)
// [adaptor impl] bool QAbstractListModel::event(QEvent *event)
bool cbs_event_1217_0(QEvent *_event)
{
return QAbstractListModel::event(arg1);
return QAbstractListModel::event(_event);
}
virtual bool event(QEvent *arg1)
virtual bool event(QEvent *_event)
{
if (cb_event_1217_0.can_issue()) {
return cb_event_1217_0.issue<QAbstractListModel_Adaptor, bool, QEvent *>(&QAbstractListModel_Adaptor::cbs_event_1217_0, arg1);
return cb_event_1217_0.issue<QAbstractListModel_Adaptor, bool, QEvent *>(&QAbstractListModel_Adaptor::cbs_event_1217_0, _event);
} else {
return QAbstractListModel::event(arg1);
return QAbstractListModel::event(_event);
}
}
// [adaptor impl] bool QAbstractListModel::eventFilter(QObject *, QEvent *)
bool cbs_eventFilter_2411_0(QObject *arg1, QEvent *arg2)
// [adaptor impl] bool QAbstractListModel::eventFilter(QObject *watched, QEvent *event)
bool cbs_eventFilter_2411_0(QObject *watched, QEvent *event)
{
return QAbstractListModel::eventFilter(arg1, arg2);
return QAbstractListModel::eventFilter(watched, event);
}
virtual bool eventFilter(QObject *arg1, QEvent *arg2)
virtual bool eventFilter(QObject *watched, QEvent *event)
{
if (cb_eventFilter_2411_0.can_issue()) {
return cb_eventFilter_2411_0.issue<QAbstractListModel_Adaptor, bool, QObject *, QEvent *>(&QAbstractListModel_Adaptor::cbs_eventFilter_2411_0, arg1, arg2);
return cb_eventFilter_2411_0.issue<QAbstractListModel_Adaptor, bool, QObject *, QEvent *>(&QAbstractListModel_Adaptor::cbs_eventFilter_2411_0, watched, event);
} else {
return QAbstractListModel::eventFilter(arg1, arg2);
return QAbstractListModel::eventFilter(watched, event);
}
}
@ -1082,33 +1082,33 @@ public:
}
}
// [adaptor impl] void QAbstractListModel::childEvent(QChildEvent *)
void cbs_childEvent_1701_0(QChildEvent *arg1)
// [adaptor impl] void QAbstractListModel::childEvent(QChildEvent *event)
void cbs_childEvent_1701_0(QChildEvent *event)
{
QAbstractListModel::childEvent(arg1);
QAbstractListModel::childEvent(event);
}
virtual void childEvent(QChildEvent *arg1)
virtual void childEvent(QChildEvent *event)
{
if (cb_childEvent_1701_0.can_issue()) {
cb_childEvent_1701_0.issue<QAbstractListModel_Adaptor, QChildEvent *>(&QAbstractListModel_Adaptor::cbs_childEvent_1701_0, arg1);
cb_childEvent_1701_0.issue<QAbstractListModel_Adaptor, QChildEvent *>(&QAbstractListModel_Adaptor::cbs_childEvent_1701_0, event);
} else {
QAbstractListModel::childEvent(arg1);
QAbstractListModel::childEvent(event);
}
}
// [adaptor impl] void QAbstractListModel::customEvent(QEvent *)
void cbs_customEvent_1217_0(QEvent *arg1)
// [adaptor impl] void QAbstractListModel::customEvent(QEvent *event)
void cbs_customEvent_1217_0(QEvent *event)
{
QAbstractListModel::customEvent(arg1);
QAbstractListModel::customEvent(event);
}
virtual void customEvent(QEvent *arg1)
virtual void customEvent(QEvent *event)
{
if (cb_customEvent_1217_0.can_issue()) {
cb_customEvent_1217_0.issue<QAbstractListModel_Adaptor, QEvent *>(&QAbstractListModel_Adaptor::cbs_customEvent_1217_0, arg1);
cb_customEvent_1217_0.issue<QAbstractListModel_Adaptor, QEvent *>(&QAbstractListModel_Adaptor::cbs_customEvent_1217_0, event);
} else {
QAbstractListModel::customEvent(arg1);
QAbstractListModel::customEvent(event);
}
}
@ -1127,18 +1127,18 @@ public:
}
}
// [adaptor impl] void QAbstractListModel::timerEvent(QTimerEvent *)
void cbs_timerEvent_1730_0(QTimerEvent *arg1)
// [adaptor impl] void QAbstractListModel::timerEvent(QTimerEvent *event)
void cbs_timerEvent_1730_0(QTimerEvent *event)
{
QAbstractListModel::timerEvent(arg1);
QAbstractListModel::timerEvent(event);
}
virtual void timerEvent(QTimerEvent *arg1)
virtual void timerEvent(QTimerEvent *event)
{
if (cb_timerEvent_1730_0.can_issue()) {
cb_timerEvent_1730_0.issue<QAbstractListModel_Adaptor, QTimerEvent *>(&QAbstractListModel_Adaptor::cbs_timerEvent_1730_0, arg1);
cb_timerEvent_1730_0.issue<QAbstractListModel_Adaptor, QTimerEvent *>(&QAbstractListModel_Adaptor::cbs_timerEvent_1730_0, event);
} else {
QAbstractListModel::timerEvent(arg1);
QAbstractListModel::timerEvent(event);
}
}
@ -1187,7 +1187,7 @@ QAbstractListModel_Adaptor::~QAbstractListModel_Adaptor() { }
static void _init_ctor_QAbstractListModel_Adaptor_1302 (qt_gsi::GenericStaticMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("parent", true, "0");
static gsi::ArgSpecBase argspec_0 ("parent", true, "nullptr");
decl->add_arg<QObject * > (argspec_0);
decl->set_return_new<QAbstractListModel_Adaptor> ();
}
@ -1196,7 +1196,7 @@ static void _call_ctor_QAbstractListModel_Adaptor_1302 (const qt_gsi::GenericSta
{
__SUPPRESS_UNUSED_WARNING(args);
tl::Heap heap;
QObject *arg1 = args ? gsi::arg_reader<QObject * >() (args, heap) : gsi::arg_maker<QObject * >() (0, heap);
QObject *arg1 = args ? gsi::arg_reader<QObject * >() (args, heap) : gsi::arg_maker<QObject * >() (nullptr, heap);
ret.write<QAbstractListModel_Adaptor *> (new QAbstractListModel_Adaptor (arg1));
}
@ -1501,11 +1501,11 @@ static void _call_fp_changePersistentIndexList_5912 (const qt_gsi::GenericMethod
}
// void QAbstractListModel::childEvent(QChildEvent *)
// void QAbstractListModel::childEvent(QChildEvent *event)
static void _init_cbs_childEvent_1701_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("event");
decl->add_arg<QChildEvent * > (argspec_0);
decl->set_return<void > ();
}
@ -1689,7 +1689,7 @@ static void _init_fp_createIndex_c2374 (qt_gsi::GenericMethod *decl)
decl->add_arg<int > (argspec_0);
static gsi::ArgSpecBase argspec_1 ("column");
decl->add_arg<int > (argspec_1);
static gsi::ArgSpecBase argspec_2 ("data", true, "0");
static gsi::ArgSpecBase argspec_2 ("data", true, "nullptr");
decl->add_arg<void * > (argspec_2);
decl->set_return<QModelIndex > ();
}
@ -1700,7 +1700,7 @@ static void _call_fp_createIndex_c2374 (const qt_gsi::GenericMethod * /*decl*/,
tl::Heap heap;
int arg1 = gsi::arg_reader<int >() (args, heap);
int arg2 = gsi::arg_reader<int >() (args, heap);
void *arg3 = args ? gsi::arg_reader<void * >() (args, heap) : gsi::arg_maker<void * >() (0, heap);
void *arg3 = args ? gsi::arg_reader<void * >() (args, heap) : gsi::arg_maker<void * >() (nullptr, heap);
ret.write<QModelIndex > ((QModelIndex)((QAbstractListModel_Adaptor *)cls)->fp_QAbstractListModel_createIndex_c2374 (arg1, arg2, arg3));
}
@ -1729,11 +1729,11 @@ static void _call_fp_createIndex_c2657 (const qt_gsi::GenericMethod * /*decl*/,
}
// void QAbstractListModel::customEvent(QEvent *)
// void QAbstractListModel::customEvent(QEvent *event)
static void _init_cbs_customEvent_1217_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("event");
decl->add_arg<QEvent * > (argspec_0);
decl->set_return<void > ();
}
@ -1834,7 +1834,7 @@ static void _call_fp_decodeData_5302 (const qt_gsi::GenericMethod * /*decl*/, vo
static void _init_emitter_destroyed_1302 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1", true, "0");
static gsi::ArgSpecBase argspec_0 ("arg1", true, "nullptr");
decl->add_arg<QObject * > (argspec_0);
decl->set_return<void > ();
}
@ -1843,7 +1843,7 @@ static void _call_emitter_destroyed_1302 (const qt_gsi::GenericMethod * /*decl*/
{
__SUPPRESS_UNUSED_WARNING(args);
tl::Heap heap;
QObject *arg1 = args ? gsi::arg_reader<QObject * >() (args, heap) : gsi::arg_maker<QObject * >() (0, heap);
QObject *arg1 = args ? gsi::arg_reader<QObject * >() (args, heap) : gsi::arg_maker<QObject * >() (nullptr, heap);
((QAbstractListModel_Adaptor *)cls)->emitter_QAbstractListModel_destroyed_1302 (arg1);
}
@ -2034,11 +2034,11 @@ static void _call_fp_endResetModel_0 (const qt_gsi::GenericMethod * /*decl*/, vo
}
// bool QAbstractListModel::event(QEvent *)
// bool QAbstractListModel::event(QEvent *event)
static void _init_cbs_event_1217_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("event");
decl->add_arg<QEvent * > (argspec_0);
decl->set_return<bool > ();
}
@ -2057,13 +2057,13 @@ static void _set_callback_cbs_event_1217_0 (void *cls, const gsi::Callback &cb)
}
// bool QAbstractListModel::eventFilter(QObject *, QEvent *)
// bool QAbstractListModel::eventFilter(QObject *watched, QEvent *event)
static void _init_cbs_eventFilter_2411_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("watched");
decl->add_arg<QObject * > (argspec_0);
static gsi::ArgSpecBase argspec_1 ("arg2");
static gsi::ArgSpecBase argspec_1 ("event");
decl->add_arg<QEvent * > (argspec_1);
decl->set_return<bool > ();
}
@ -3120,11 +3120,11 @@ static void _set_callback_cbs_supportedDropActions_c0_0 (void *cls, const gsi::C
}
// void QAbstractListModel::timerEvent(QTimerEvent *)
// void QAbstractListModel::timerEvent(QTimerEvent *event)
static void _init_cbs_timerEvent_1730_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("event");
decl->add_arg<QTimerEvent * > (argspec_0);
decl->set_return<void > ();
}
@ -3167,7 +3167,7 @@ static gsi::Methods methods_QAbstractListModel_Adaptor () {
methods += new qt_gsi::GenericMethod ("canFetchMore", "@hide", true, &_init_cbs_canFetchMore_c2395_0, &_call_cbs_canFetchMore_c2395_0, &_set_callback_cbs_canFetchMore_c2395_0);
methods += new qt_gsi::GenericMethod ("*changePersistentIndex", "@brief Method void QAbstractListModel::changePersistentIndex(const QModelIndex &from, const QModelIndex &to)\nThis method is protected and can only be called from inside a derived class.", false, &_init_fp_changePersistentIndex_4682, &_call_fp_changePersistentIndex_4682);
methods += new qt_gsi::GenericMethod ("*changePersistentIndexList", "@brief Method void QAbstractListModel::changePersistentIndexList(const QList<QModelIndex> &from, const QList<QModelIndex> &to)\nThis method is protected and can only be called from inside a derived class.", false, &_init_fp_changePersistentIndexList_5912, &_call_fp_changePersistentIndexList_5912);
methods += new qt_gsi::GenericMethod ("*childEvent", "@brief Virtual method void QAbstractListModel::childEvent(QChildEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_childEvent_1701_0, &_call_cbs_childEvent_1701_0);
methods += new qt_gsi::GenericMethod ("*childEvent", "@brief Virtual method void QAbstractListModel::childEvent(QChildEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_childEvent_1701_0, &_call_cbs_childEvent_1701_0);
methods += new qt_gsi::GenericMethod ("*childEvent", "@hide", false, &_init_cbs_childEvent_1701_0, &_call_cbs_childEvent_1701_0, &_set_callback_cbs_childEvent_1701_0);
methods += new qt_gsi::GenericMethod ("emit_columnsAboutToBeInserted", "@brief Emitter for signal void QAbstractListModel::columnsAboutToBeInserted(const QModelIndex &parent, int first, int last)\nCall this method to emit this signal.", false, &_init_emitter_columnsAboutToBeInserted_7372, &_call_emitter_columnsAboutToBeInserted_7372);
methods += new qt_gsi::GenericMethod ("emit_columnsAboutToBeMoved", "@brief Emitter for signal void QAbstractListModel::columnsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationColumn)\nCall this method to emit this signal.", false, &_init_emitter_columnsAboutToBeMoved_10318, &_call_emitter_columnsAboutToBeMoved_10318);
@ -3177,7 +3177,7 @@ static gsi::Methods methods_QAbstractListModel_Adaptor () {
methods += new qt_gsi::GenericMethod ("emit_columnsRemoved", "@brief Emitter for signal void QAbstractListModel::columnsRemoved(const QModelIndex &parent, int first, int last)\nCall this method to emit this signal.", false, &_init_emitter_columnsRemoved_7372, &_call_emitter_columnsRemoved_7372);
methods += new qt_gsi::GenericMethod ("*createIndex", "@brief Method QModelIndex QAbstractListModel::createIndex(int row, int column, void *data)\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_createIndex_c2374, &_call_fp_createIndex_c2374);
methods += new qt_gsi::GenericMethod ("*createIndex", "@brief Method QModelIndex QAbstractListModel::createIndex(int row, int column, quintptr id)\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_createIndex_c2657, &_call_fp_createIndex_c2657);
methods += new qt_gsi::GenericMethod ("*customEvent", "@brief Virtual method void QAbstractListModel::customEvent(QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_customEvent_1217_0, &_call_cbs_customEvent_1217_0);
methods += new qt_gsi::GenericMethod ("*customEvent", "@brief Virtual method void QAbstractListModel::customEvent(QEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_customEvent_1217_0, &_call_cbs_customEvent_1217_0);
methods += new qt_gsi::GenericMethod ("*customEvent", "@hide", false, &_init_cbs_customEvent_1217_0, &_call_cbs_customEvent_1217_0, &_set_callback_cbs_customEvent_1217_0);
methods += new qt_gsi::GenericMethod ("data", "@brief Virtual method QVariant QAbstractListModel::data(const QModelIndex &index, int role)\nThis method can be reimplemented in a derived class.", true, &_init_cbs_data_c3054_1, &_call_cbs_data_c3054_1);
methods += new qt_gsi::GenericMethod ("data", "@hide", true, &_init_cbs_data_c3054_1, &_call_cbs_data_c3054_1, &_set_callback_cbs_data_c3054_1);
@ -3196,9 +3196,9 @@ static gsi::Methods methods_QAbstractListModel_Adaptor () {
methods += new qt_gsi::GenericMethod ("*endRemoveColumns", "@brief Method void QAbstractListModel::endRemoveColumns()\nThis method is protected and can only be called from inside a derived class.", false, &_init_fp_endRemoveColumns_0, &_call_fp_endRemoveColumns_0);
methods += new qt_gsi::GenericMethod ("*endRemoveRows", "@brief Method void QAbstractListModel::endRemoveRows()\nThis method is protected and can only be called from inside a derived class.", false, &_init_fp_endRemoveRows_0, &_call_fp_endRemoveRows_0);
methods += new qt_gsi::GenericMethod ("*endResetModel", "@brief Method void QAbstractListModel::endResetModel()\nThis method is protected and can only be called from inside a derived class.", false, &_init_fp_endResetModel_0, &_call_fp_endResetModel_0);
methods += new qt_gsi::GenericMethod ("event", "@brief Virtual method bool QAbstractListModel::event(QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_event_1217_0, &_call_cbs_event_1217_0);
methods += new qt_gsi::GenericMethod ("event", "@brief Virtual method bool QAbstractListModel::event(QEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_event_1217_0, &_call_cbs_event_1217_0);
methods += new qt_gsi::GenericMethod ("event", "@hide", false, &_init_cbs_event_1217_0, &_call_cbs_event_1217_0, &_set_callback_cbs_event_1217_0);
methods += new qt_gsi::GenericMethod ("eventFilter", "@brief Virtual method bool QAbstractListModel::eventFilter(QObject *, QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0);
methods += new qt_gsi::GenericMethod ("eventFilter", "@brief Virtual method bool QAbstractListModel::eventFilter(QObject *watched, QEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0);
methods += new qt_gsi::GenericMethod ("eventFilter", "@hide", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0, &_set_callback_cbs_eventFilter_2411_0);
methods += new qt_gsi::GenericMethod ("fetchMore", "@brief Virtual method void QAbstractListModel::fetchMore(const QModelIndex &parent)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_fetchMore_2395_0, &_call_cbs_fetchMore_2395_0);
methods += new qt_gsi::GenericMethod ("fetchMore", "@hide", false, &_init_cbs_fetchMore_2395_0, &_call_cbs_fetchMore_2395_0, &_set_callback_cbs_fetchMore_2395_0);
@ -3270,7 +3270,7 @@ static gsi::Methods methods_QAbstractListModel_Adaptor () {
methods += new qt_gsi::GenericMethod ("supportedDragActions", "@hide", true, &_init_cbs_supportedDragActions_c0_0, &_call_cbs_supportedDragActions_c0_0, &_set_callback_cbs_supportedDragActions_c0_0);
methods += new qt_gsi::GenericMethod ("supportedDropActions", "@brief Virtual method QFlags<Qt::DropAction> QAbstractListModel::supportedDropActions()\nThis method can be reimplemented in a derived class.", true, &_init_cbs_supportedDropActions_c0_0, &_call_cbs_supportedDropActions_c0_0);
methods += new qt_gsi::GenericMethod ("supportedDropActions", "@hide", true, &_init_cbs_supportedDropActions_c0_0, &_call_cbs_supportedDropActions_c0_0, &_set_callback_cbs_supportedDropActions_c0_0);
methods += new qt_gsi::GenericMethod ("*timerEvent", "@brief Virtual method void QAbstractListModel::timerEvent(QTimerEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_timerEvent_1730_0, &_call_cbs_timerEvent_1730_0);
methods += new qt_gsi::GenericMethod ("*timerEvent", "@brief Virtual method void QAbstractListModel::timerEvent(QTimerEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_timerEvent_1730_0, &_call_cbs_timerEvent_1730_0);
methods += new qt_gsi::GenericMethod ("*timerEvent", "@hide", false, &_init_cbs_timerEvent_1730_0, &_call_cbs_timerEvent_1730_0, &_set_callback_cbs_timerEvent_1730_0);
return methods;
}

View File

@ -1063,33 +1063,33 @@ public:
}
}
// [adaptor impl] bool QAbstractProxyModel::event(QEvent *)
bool cbs_event_1217_0(QEvent *arg1)
// [adaptor impl] bool QAbstractProxyModel::event(QEvent *event)
bool cbs_event_1217_0(QEvent *_event)
{
return QAbstractProxyModel::event(arg1);
return QAbstractProxyModel::event(_event);
}
virtual bool event(QEvent *arg1)
virtual bool event(QEvent *_event)
{
if (cb_event_1217_0.can_issue()) {
return cb_event_1217_0.issue<QAbstractProxyModel_Adaptor, bool, QEvent *>(&QAbstractProxyModel_Adaptor::cbs_event_1217_0, arg1);
return cb_event_1217_0.issue<QAbstractProxyModel_Adaptor, bool, QEvent *>(&QAbstractProxyModel_Adaptor::cbs_event_1217_0, _event);
} else {
return QAbstractProxyModel::event(arg1);
return QAbstractProxyModel::event(_event);
}
}
// [adaptor impl] bool QAbstractProxyModel::eventFilter(QObject *, QEvent *)
bool cbs_eventFilter_2411_0(QObject *arg1, QEvent *arg2)
// [adaptor impl] bool QAbstractProxyModel::eventFilter(QObject *watched, QEvent *event)
bool cbs_eventFilter_2411_0(QObject *watched, QEvent *event)
{
return QAbstractProxyModel::eventFilter(arg1, arg2);
return QAbstractProxyModel::eventFilter(watched, event);
}
virtual bool eventFilter(QObject *arg1, QEvent *arg2)
virtual bool eventFilter(QObject *watched, QEvent *event)
{
if (cb_eventFilter_2411_0.can_issue()) {
return cb_eventFilter_2411_0.issue<QAbstractProxyModel_Adaptor, bool, QObject *, QEvent *>(&QAbstractProxyModel_Adaptor::cbs_eventFilter_2411_0, arg1, arg2);
return cb_eventFilter_2411_0.issue<QAbstractProxyModel_Adaptor, bool, QObject *, QEvent *>(&QAbstractProxyModel_Adaptor::cbs_eventFilter_2411_0, watched, event);
} else {
return QAbstractProxyModel::eventFilter(arg1, arg2);
return QAbstractProxyModel::eventFilter(watched, event);
}
}
@ -1696,33 +1696,33 @@ public:
}
}
// [adaptor impl] void QAbstractProxyModel::childEvent(QChildEvent *)
void cbs_childEvent_1701_0(QChildEvent *arg1)
// [adaptor impl] void QAbstractProxyModel::childEvent(QChildEvent *event)
void cbs_childEvent_1701_0(QChildEvent *event)
{
QAbstractProxyModel::childEvent(arg1);
QAbstractProxyModel::childEvent(event);
}
virtual void childEvent(QChildEvent *arg1)
virtual void childEvent(QChildEvent *event)
{
if (cb_childEvent_1701_0.can_issue()) {
cb_childEvent_1701_0.issue<QAbstractProxyModel_Adaptor, QChildEvent *>(&QAbstractProxyModel_Adaptor::cbs_childEvent_1701_0, arg1);
cb_childEvent_1701_0.issue<QAbstractProxyModel_Adaptor, QChildEvent *>(&QAbstractProxyModel_Adaptor::cbs_childEvent_1701_0, event);
} else {
QAbstractProxyModel::childEvent(arg1);
QAbstractProxyModel::childEvent(event);
}
}
// [adaptor impl] void QAbstractProxyModel::customEvent(QEvent *)
void cbs_customEvent_1217_0(QEvent *arg1)
// [adaptor impl] void QAbstractProxyModel::customEvent(QEvent *event)
void cbs_customEvent_1217_0(QEvent *event)
{
QAbstractProxyModel::customEvent(arg1);
QAbstractProxyModel::customEvent(event);
}
virtual void customEvent(QEvent *arg1)
virtual void customEvent(QEvent *event)
{
if (cb_customEvent_1217_0.can_issue()) {
cb_customEvent_1217_0.issue<QAbstractProxyModel_Adaptor, QEvent *>(&QAbstractProxyModel_Adaptor::cbs_customEvent_1217_0, arg1);
cb_customEvent_1217_0.issue<QAbstractProxyModel_Adaptor, QEvent *>(&QAbstractProxyModel_Adaptor::cbs_customEvent_1217_0, event);
} else {
QAbstractProxyModel::customEvent(arg1);
QAbstractProxyModel::customEvent(event);
}
}
@ -1741,18 +1741,18 @@ public:
}
}
// [adaptor impl] void QAbstractProxyModel::timerEvent(QTimerEvent *)
void cbs_timerEvent_1730_0(QTimerEvent *arg1)
// [adaptor impl] void QAbstractProxyModel::timerEvent(QTimerEvent *event)
void cbs_timerEvent_1730_0(QTimerEvent *event)
{
QAbstractProxyModel::timerEvent(arg1);
QAbstractProxyModel::timerEvent(event);
}
virtual void timerEvent(QTimerEvent *arg1)
virtual void timerEvent(QTimerEvent *event)
{
if (cb_timerEvent_1730_0.can_issue()) {
cb_timerEvent_1730_0.issue<QAbstractProxyModel_Adaptor, QTimerEvent *>(&QAbstractProxyModel_Adaptor::cbs_timerEvent_1730_0, arg1);
cb_timerEvent_1730_0.issue<QAbstractProxyModel_Adaptor, QTimerEvent *>(&QAbstractProxyModel_Adaptor::cbs_timerEvent_1730_0, event);
} else {
QAbstractProxyModel::timerEvent(arg1);
QAbstractProxyModel::timerEvent(event);
}
}
@ -1809,7 +1809,7 @@ QAbstractProxyModel_Adaptor::~QAbstractProxyModel_Adaptor() { }
static void _init_ctor_QAbstractProxyModel_Adaptor_1302 (qt_gsi::GenericStaticMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("parent", true, "0");
static gsi::ArgSpecBase argspec_0 ("parent", true, "nullptr");
decl->add_arg<QObject * > (argspec_0);
decl->set_return_new<QAbstractProxyModel_Adaptor> ();
}
@ -1818,7 +1818,7 @@ static void _call_ctor_QAbstractProxyModel_Adaptor_1302 (const qt_gsi::GenericSt
{
__SUPPRESS_UNUSED_WARNING(args);
tl::Heap heap;
QObject *arg1 = args ? gsi::arg_reader<QObject * >() (args, heap) : gsi::arg_maker<QObject * >() (0, heap);
QObject *arg1 = args ? gsi::arg_reader<QObject * >() (args, heap) : gsi::arg_maker<QObject * >() (nullptr, heap);
ret.write<QAbstractProxyModel_Adaptor *> (new QAbstractProxyModel_Adaptor (arg1));
}
@ -2123,11 +2123,11 @@ static void _call_fp_changePersistentIndexList_5912 (const qt_gsi::GenericMethod
}
// void QAbstractProxyModel::childEvent(QChildEvent *)
// void QAbstractProxyModel::childEvent(QChildEvent *event)
static void _init_cbs_childEvent_1701_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("event");
decl->add_arg<QChildEvent * > (argspec_0);
decl->set_return<void > ();
}
@ -2334,7 +2334,7 @@ static void _init_fp_createIndex_c2374 (qt_gsi::GenericMethod *decl)
decl->add_arg<int > (argspec_0);
static gsi::ArgSpecBase argspec_1 ("column");
decl->add_arg<int > (argspec_1);
static gsi::ArgSpecBase argspec_2 ("data", true, "0");
static gsi::ArgSpecBase argspec_2 ("data", true, "nullptr");
decl->add_arg<void * > (argspec_2);
decl->set_return<QModelIndex > ();
}
@ -2345,7 +2345,7 @@ static void _call_fp_createIndex_c2374 (const qt_gsi::GenericMethod * /*decl*/,
tl::Heap heap;
int arg1 = gsi::arg_reader<int >() (args, heap);
int arg2 = gsi::arg_reader<int >() (args, heap);
void *arg3 = args ? gsi::arg_reader<void * >() (args, heap) : gsi::arg_maker<void * >() (0, heap);
void *arg3 = args ? gsi::arg_reader<void * >() (args, heap) : gsi::arg_maker<void * >() (nullptr, heap);
ret.write<QModelIndex > ((QModelIndex)((QAbstractProxyModel_Adaptor *)cls)->fp_QAbstractProxyModel_createIndex_c2374 (arg1, arg2, arg3));
}
@ -2374,11 +2374,11 @@ static void _call_fp_createIndex_c2657 (const qt_gsi::GenericMethod * /*decl*/,
}
// void QAbstractProxyModel::customEvent(QEvent *)
// void QAbstractProxyModel::customEvent(QEvent *event)
static void _init_cbs_customEvent_1217_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("event");
decl->add_arg<QEvent * > (argspec_0);
decl->set_return<void > ();
}
@ -2479,7 +2479,7 @@ static void _call_fp_decodeData_5302 (const qt_gsi::GenericMethod * /*decl*/, vo
static void _init_emitter_destroyed_1302 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1", true, "0");
static gsi::ArgSpecBase argspec_0 ("arg1", true, "nullptr");
decl->add_arg<QObject * > (argspec_0);
decl->set_return<void > ();
}
@ -2488,7 +2488,7 @@ static void _call_emitter_destroyed_1302 (const qt_gsi::GenericMethod * /*decl*/
{
__SUPPRESS_UNUSED_WARNING(args);
tl::Heap heap;
QObject *arg1 = args ? gsi::arg_reader<QObject * >() (args, heap) : gsi::arg_maker<QObject * >() (0, heap);
QObject *arg1 = args ? gsi::arg_reader<QObject * >() (args, heap) : gsi::arg_maker<QObject * >() (nullptr, heap);
((QAbstractProxyModel_Adaptor *)cls)->emitter_QAbstractProxyModel_destroyed_1302 (arg1);
}
@ -2679,11 +2679,11 @@ static void _call_fp_endResetModel_0 (const qt_gsi::GenericMethod * /*decl*/, vo
}
// bool QAbstractProxyModel::event(QEvent *)
// bool QAbstractProxyModel::event(QEvent *event)
static void _init_cbs_event_1217_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("event");
decl->add_arg<QEvent * > (argspec_0);
decl->set_return<bool > ();
}
@ -2702,13 +2702,13 @@ static void _set_callback_cbs_event_1217_0 (void *cls, const gsi::Callback &cb)
}
// bool QAbstractProxyModel::eventFilter(QObject *, QEvent *)
// bool QAbstractProxyModel::eventFilter(QObject *watched, QEvent *event)
static void _init_cbs_eventFilter_2411_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("watched");
decl->add_arg<QObject * > (argspec_0);
static gsi::ArgSpecBase argspec_1 ("arg2");
static gsi::ArgSpecBase argspec_1 ("event");
decl->add_arg<QEvent * > (argspec_1);
decl->set_return<bool > ();
}
@ -3941,11 +3941,11 @@ static void _set_callback_cbs_supportedDropActions_c0_0 (void *cls, const gsi::C
}
// void QAbstractProxyModel::timerEvent(QTimerEvent *)
// void QAbstractProxyModel::timerEvent(QTimerEvent *event)
static void _init_cbs_timerEvent_1730_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("event");
decl->add_arg<QTimerEvent * > (argspec_0);
decl->set_return<void > ();
}
@ -3988,7 +3988,7 @@ static gsi::Methods methods_QAbstractProxyModel_Adaptor () {
methods += new qt_gsi::GenericMethod ("canFetchMore", "@hide", true, &_init_cbs_canFetchMore_c2395_0, &_call_cbs_canFetchMore_c2395_0, &_set_callback_cbs_canFetchMore_c2395_0);
methods += new qt_gsi::GenericMethod ("*changePersistentIndex", "@brief Method void QAbstractProxyModel::changePersistentIndex(const QModelIndex &from, const QModelIndex &to)\nThis method is protected and can only be called from inside a derived class.", false, &_init_fp_changePersistentIndex_4682, &_call_fp_changePersistentIndex_4682);
methods += new qt_gsi::GenericMethod ("*changePersistentIndexList", "@brief Method void QAbstractProxyModel::changePersistentIndexList(const QList<QModelIndex> &from, const QList<QModelIndex> &to)\nThis method is protected and can only be called from inside a derived class.", false, &_init_fp_changePersistentIndexList_5912, &_call_fp_changePersistentIndexList_5912);
methods += new qt_gsi::GenericMethod ("*childEvent", "@brief Virtual method void QAbstractProxyModel::childEvent(QChildEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_childEvent_1701_0, &_call_cbs_childEvent_1701_0);
methods += new qt_gsi::GenericMethod ("*childEvent", "@brief Virtual method void QAbstractProxyModel::childEvent(QChildEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_childEvent_1701_0, &_call_cbs_childEvent_1701_0);
methods += new qt_gsi::GenericMethod ("*childEvent", "@hide", false, &_init_cbs_childEvent_1701_0, &_call_cbs_childEvent_1701_0, &_set_callback_cbs_childEvent_1701_0);
methods += new qt_gsi::GenericMethod ("columnCount", "@brief Virtual method int QAbstractProxyModel::columnCount(const QModelIndex &parent)\nThis method can be reimplemented in a derived class.", true, &_init_cbs_columnCount_c2395_1, &_call_cbs_columnCount_c2395_1);
methods += new qt_gsi::GenericMethod ("columnCount", "@hide", true, &_init_cbs_columnCount_c2395_1, &_call_cbs_columnCount_c2395_1, &_set_callback_cbs_columnCount_c2395_1);
@ -4000,7 +4000,7 @@ static gsi::Methods methods_QAbstractProxyModel_Adaptor () {
methods += new qt_gsi::GenericMethod ("emit_columnsRemoved", "@brief Emitter for signal void QAbstractProxyModel::columnsRemoved(const QModelIndex &parent, int first, int last)\nCall this method to emit this signal.", false, &_init_emitter_columnsRemoved_7372, &_call_emitter_columnsRemoved_7372);
methods += new qt_gsi::GenericMethod ("*createIndex", "@brief Method QModelIndex QAbstractProxyModel::createIndex(int row, int column, void *data)\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_createIndex_c2374, &_call_fp_createIndex_c2374);
methods += new qt_gsi::GenericMethod ("*createIndex", "@brief Method QModelIndex QAbstractProxyModel::createIndex(int row, int column, quintptr id)\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_createIndex_c2657, &_call_fp_createIndex_c2657);
methods += new qt_gsi::GenericMethod ("*customEvent", "@brief Virtual method void QAbstractProxyModel::customEvent(QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_customEvent_1217_0, &_call_cbs_customEvent_1217_0);
methods += new qt_gsi::GenericMethod ("*customEvent", "@brief Virtual method void QAbstractProxyModel::customEvent(QEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_customEvent_1217_0, &_call_cbs_customEvent_1217_0);
methods += new qt_gsi::GenericMethod ("*customEvent", "@hide", false, &_init_cbs_customEvent_1217_0, &_call_cbs_customEvent_1217_0, &_set_callback_cbs_customEvent_1217_0);
methods += new qt_gsi::GenericMethod ("data", "@brief Virtual method QVariant QAbstractProxyModel::data(const QModelIndex &proxyIndex, int role)\nThis method can be reimplemented in a derived class.", true, &_init_cbs_data_c3054_1, &_call_cbs_data_c3054_1);
methods += new qt_gsi::GenericMethod ("data", "@hide", true, &_init_cbs_data_c3054_1, &_call_cbs_data_c3054_1, &_set_callback_cbs_data_c3054_1);
@ -4019,9 +4019,9 @@ static gsi::Methods methods_QAbstractProxyModel_Adaptor () {
methods += new qt_gsi::GenericMethod ("*endRemoveColumns", "@brief Method void QAbstractProxyModel::endRemoveColumns()\nThis method is protected and can only be called from inside a derived class.", false, &_init_fp_endRemoveColumns_0, &_call_fp_endRemoveColumns_0);
methods += new qt_gsi::GenericMethod ("*endRemoveRows", "@brief Method void QAbstractProxyModel::endRemoveRows()\nThis method is protected and can only be called from inside a derived class.", false, &_init_fp_endRemoveRows_0, &_call_fp_endRemoveRows_0);
methods += new qt_gsi::GenericMethod ("*endResetModel", "@brief Method void QAbstractProxyModel::endResetModel()\nThis method is protected and can only be called from inside a derived class.", false, &_init_fp_endResetModel_0, &_call_fp_endResetModel_0);
methods += new qt_gsi::GenericMethod ("event", "@brief Virtual method bool QAbstractProxyModel::event(QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_event_1217_0, &_call_cbs_event_1217_0);
methods += new qt_gsi::GenericMethod ("event", "@brief Virtual method bool QAbstractProxyModel::event(QEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_event_1217_0, &_call_cbs_event_1217_0);
methods += new qt_gsi::GenericMethod ("event", "@hide", false, &_init_cbs_event_1217_0, &_call_cbs_event_1217_0, &_set_callback_cbs_event_1217_0);
methods += new qt_gsi::GenericMethod ("eventFilter", "@brief Virtual method bool QAbstractProxyModel::eventFilter(QObject *, QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0);
methods += new qt_gsi::GenericMethod ("eventFilter", "@brief Virtual method bool QAbstractProxyModel::eventFilter(QObject *watched, QEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0);
methods += new qt_gsi::GenericMethod ("eventFilter", "@hide", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0, &_set_callback_cbs_eventFilter_2411_0);
methods += new qt_gsi::GenericMethod ("fetchMore", "@brief Virtual method void QAbstractProxyModel::fetchMore(const QModelIndex &parent)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_fetchMore_2395_0, &_call_cbs_fetchMore_2395_0);
methods += new qt_gsi::GenericMethod ("fetchMore", "@hide", false, &_init_cbs_fetchMore_2395_0, &_call_cbs_fetchMore_2395_0, &_set_callback_cbs_fetchMore_2395_0);
@ -4108,7 +4108,7 @@ static gsi::Methods methods_QAbstractProxyModel_Adaptor () {
methods += new qt_gsi::GenericMethod ("supportedDragActions", "@hide", true, &_init_cbs_supportedDragActions_c0_0, &_call_cbs_supportedDragActions_c0_0, &_set_callback_cbs_supportedDragActions_c0_0);
methods += new qt_gsi::GenericMethod ("supportedDropActions", "@brief Virtual method QFlags<Qt::DropAction> QAbstractProxyModel::supportedDropActions()\nThis method can be reimplemented in a derived class.", true, &_init_cbs_supportedDropActions_c0_0, &_call_cbs_supportedDropActions_c0_0);
methods += new qt_gsi::GenericMethod ("supportedDropActions", "@hide", true, &_init_cbs_supportedDropActions_c0_0, &_call_cbs_supportedDropActions_c0_0, &_set_callback_cbs_supportedDropActions_c0_0);
methods += new qt_gsi::GenericMethod ("*timerEvent", "@brief Virtual method void QAbstractProxyModel::timerEvent(QTimerEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_timerEvent_1730_0, &_call_cbs_timerEvent_1730_0);
methods += new qt_gsi::GenericMethod ("*timerEvent", "@brief Virtual method void QAbstractProxyModel::timerEvent(QTimerEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_timerEvent_1730_0, &_call_cbs_timerEvent_1730_0);
methods += new qt_gsi::GenericMethod ("*timerEvent", "@hide", false, &_init_cbs_timerEvent_1730_0, &_call_cbs_timerEvent_1730_0, &_set_callback_cbs_timerEvent_1730_0);
return methods;
}

View File

@ -231,18 +231,18 @@ public:
throw tl::Exception ("Can't emit private signal 'void QAbstractState::entered()'");
}
// [adaptor impl] bool QAbstractState::eventFilter(QObject *, QEvent *)
bool cbs_eventFilter_2411_0(QObject *arg1, QEvent *arg2)
// [adaptor impl] bool QAbstractState::eventFilter(QObject *watched, QEvent *event)
bool cbs_eventFilter_2411_0(QObject *watched, QEvent *event)
{
return QAbstractState::eventFilter(arg1, arg2);
return QAbstractState::eventFilter(watched, event);
}
virtual bool eventFilter(QObject *arg1, QEvent *arg2)
virtual bool eventFilter(QObject *watched, QEvent *event)
{
if (cb_eventFilter_2411_0.can_issue()) {
return cb_eventFilter_2411_0.issue<QAbstractState_Adaptor, bool, QObject *, QEvent *>(&QAbstractState_Adaptor::cbs_eventFilter_2411_0, arg1, arg2);
return cb_eventFilter_2411_0.issue<QAbstractState_Adaptor, bool, QObject *, QEvent *>(&QAbstractState_Adaptor::cbs_eventFilter_2411_0, watched, event);
} else {
return QAbstractState::eventFilter(arg1, arg2);
return QAbstractState::eventFilter(watched, event);
}
}
@ -259,33 +259,33 @@ public:
throw tl::Exception ("Can't emit private signal 'void QAbstractState::objectNameChanged(const QString &objectName)'");
}
// [adaptor impl] void QAbstractState::childEvent(QChildEvent *)
void cbs_childEvent_1701_0(QChildEvent *arg1)
// [adaptor impl] void QAbstractState::childEvent(QChildEvent *event)
void cbs_childEvent_1701_0(QChildEvent *event)
{
QAbstractState::childEvent(arg1);
QAbstractState::childEvent(event);
}
virtual void childEvent(QChildEvent *arg1)
virtual void childEvent(QChildEvent *event)
{
if (cb_childEvent_1701_0.can_issue()) {
cb_childEvent_1701_0.issue<QAbstractState_Adaptor, QChildEvent *>(&QAbstractState_Adaptor::cbs_childEvent_1701_0, arg1);
cb_childEvent_1701_0.issue<QAbstractState_Adaptor, QChildEvent *>(&QAbstractState_Adaptor::cbs_childEvent_1701_0, event);
} else {
QAbstractState::childEvent(arg1);
QAbstractState::childEvent(event);
}
}
// [adaptor impl] void QAbstractState::customEvent(QEvent *)
void cbs_customEvent_1217_0(QEvent *arg1)
// [adaptor impl] void QAbstractState::customEvent(QEvent *event)
void cbs_customEvent_1217_0(QEvent *event)
{
QAbstractState::customEvent(arg1);
QAbstractState::customEvent(event);
}
virtual void customEvent(QEvent *arg1)
virtual void customEvent(QEvent *event)
{
if (cb_customEvent_1217_0.can_issue()) {
cb_customEvent_1217_0.issue<QAbstractState_Adaptor, QEvent *>(&QAbstractState_Adaptor::cbs_customEvent_1217_0, arg1);
cb_customEvent_1217_0.issue<QAbstractState_Adaptor, QEvent *>(&QAbstractState_Adaptor::cbs_customEvent_1217_0, event);
} else {
QAbstractState::customEvent(arg1);
QAbstractState::customEvent(event);
}
}
@ -351,18 +351,18 @@ public:
}
}
// [adaptor impl] void QAbstractState::timerEvent(QTimerEvent *)
void cbs_timerEvent_1730_0(QTimerEvent *arg1)
// [adaptor impl] void QAbstractState::timerEvent(QTimerEvent *event)
void cbs_timerEvent_1730_0(QTimerEvent *event)
{
QAbstractState::timerEvent(arg1);
QAbstractState::timerEvent(event);
}
virtual void timerEvent(QTimerEvent *arg1)
virtual void timerEvent(QTimerEvent *event)
{
if (cb_timerEvent_1730_0.can_issue()) {
cb_timerEvent_1730_0.issue<QAbstractState_Adaptor, QTimerEvent *>(&QAbstractState_Adaptor::cbs_timerEvent_1730_0, arg1);
cb_timerEvent_1730_0.issue<QAbstractState_Adaptor, QTimerEvent *>(&QAbstractState_Adaptor::cbs_timerEvent_1730_0, event);
} else {
QAbstractState::timerEvent(arg1);
QAbstractState::timerEvent(event);
}
}
@ -410,11 +410,11 @@ static void _call_emitter_activeChanged_864 (const qt_gsi::GenericMethod * /*dec
}
// void QAbstractState::childEvent(QChildEvent *)
// void QAbstractState::childEvent(QChildEvent *event)
static void _init_cbs_childEvent_1701_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("event");
decl->add_arg<QChildEvent * > (argspec_0);
decl->set_return<void > ();
}
@ -434,11 +434,11 @@ static void _set_callback_cbs_childEvent_1701_0 (void *cls, const gsi::Callback
}
// void QAbstractState::customEvent(QEvent *)
// void QAbstractState::customEvent(QEvent *event)
static void _init_cbs_customEvent_1217_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("event");
decl->add_arg<QEvent * > (argspec_0);
decl->set_return<void > ();
}
@ -462,7 +462,7 @@ static void _set_callback_cbs_customEvent_1217_0 (void *cls, const gsi::Callback
static void _init_emitter_destroyed_1302 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1", true, "0");
static gsi::ArgSpecBase argspec_0 ("arg1", true, "nullptr");
decl->add_arg<QObject * > (argspec_0);
decl->set_return<void > ();
}
@ -471,7 +471,7 @@ static void _call_emitter_destroyed_1302 (const qt_gsi::GenericMethod * /*decl*/
{
__SUPPRESS_UNUSED_WARNING(args);
tl::Heap heap;
QObject *arg1 = args ? gsi::arg_reader<QObject * >() (args, heap) : gsi::arg_maker<QObject * >() (0, heap);
QObject *arg1 = args ? gsi::arg_reader<QObject * >() (args, heap) : gsi::arg_maker<QObject * >() (nullptr, heap);
((QAbstractState_Adaptor *)cls)->emitter_QAbstractState_destroyed_1302 (arg1);
}
@ -537,13 +537,13 @@ static void _set_callback_cbs_event_1217_0 (void *cls, const gsi::Callback &cb)
}
// bool QAbstractState::eventFilter(QObject *, QEvent *)
// bool QAbstractState::eventFilter(QObject *watched, QEvent *event)
static void _init_cbs_eventFilter_2411_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("watched");
decl->add_arg<QObject * > (argspec_0);
static gsi::ArgSpecBase argspec_1 ("arg2");
static gsi::ArgSpecBase argspec_1 ("event");
decl->add_arg<QEvent * > (argspec_1);
decl->set_return<bool > ();
}
@ -707,11 +707,11 @@ static void _call_fp_senderSignalIndex_c0 (const qt_gsi::GenericMethod * /*decl*
}
// void QAbstractState::timerEvent(QTimerEvent *)
// void QAbstractState::timerEvent(QTimerEvent *event)
static void _init_cbs_timerEvent_1730_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("event");
decl->add_arg<QTimerEvent * > (argspec_0);
decl->set_return<void > ();
}
@ -740,9 +740,9 @@ static gsi::Methods methods_QAbstractState_Adaptor () {
gsi::Methods methods;
methods += new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QAbstractState::QAbstractState()\nThis method creates an object of class QAbstractState.", &_init_ctor_QAbstractState_Adaptor_0, &_call_ctor_QAbstractState_Adaptor_0);
methods += new qt_gsi::GenericMethod ("emit_activeChanged", "@brief Emitter for signal void QAbstractState::activeChanged(bool active)\nCall this method to emit this signal.", false, &_init_emitter_activeChanged_864, &_call_emitter_activeChanged_864);
methods += new qt_gsi::GenericMethod ("*childEvent", "@brief Virtual method void QAbstractState::childEvent(QChildEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_childEvent_1701_0, &_call_cbs_childEvent_1701_0);
methods += new qt_gsi::GenericMethod ("*childEvent", "@brief Virtual method void QAbstractState::childEvent(QChildEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_childEvent_1701_0, &_call_cbs_childEvent_1701_0);
methods += new qt_gsi::GenericMethod ("*childEvent", "@hide", false, &_init_cbs_childEvent_1701_0, &_call_cbs_childEvent_1701_0, &_set_callback_cbs_childEvent_1701_0);
methods += new qt_gsi::GenericMethod ("*customEvent", "@brief Virtual method void QAbstractState::customEvent(QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_customEvent_1217_0, &_call_cbs_customEvent_1217_0);
methods += new qt_gsi::GenericMethod ("*customEvent", "@brief Virtual method void QAbstractState::customEvent(QEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_customEvent_1217_0, &_call_cbs_customEvent_1217_0);
methods += new qt_gsi::GenericMethod ("*customEvent", "@hide", false, &_init_cbs_customEvent_1217_0, &_call_cbs_customEvent_1217_0, &_set_callback_cbs_customEvent_1217_0);
methods += new qt_gsi::GenericMethod ("emit_destroyed", "@brief Emitter for signal void QAbstractState::destroyed(QObject *)\nCall this method to emit this signal.", false, &_init_emitter_destroyed_1302, &_call_emitter_destroyed_1302);
methods += new qt_gsi::GenericMethod ("*disconnectNotify", "@brief Virtual method void QAbstractState::disconnectNotify(const QMetaMethod &signal)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_disconnectNotify_2394_0, &_call_cbs_disconnectNotify_2394_0);
@ -750,7 +750,7 @@ static gsi::Methods methods_QAbstractState_Adaptor () {
methods += new qt_gsi::GenericMethod ("emit_entered", "@brief Emitter for signal void QAbstractState::entered()\nCall this method to emit this signal.", false, &_init_emitter_entered_3384, &_call_emitter_entered_3384);
methods += new qt_gsi::GenericMethod ("*event", "@brief Virtual method bool QAbstractState::event(QEvent *e)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_event_1217_0, &_call_cbs_event_1217_0);
methods += new qt_gsi::GenericMethod ("*event", "@hide", false, &_init_cbs_event_1217_0, &_call_cbs_event_1217_0, &_set_callback_cbs_event_1217_0);
methods += new qt_gsi::GenericMethod ("eventFilter", "@brief Virtual method bool QAbstractState::eventFilter(QObject *, QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0);
methods += new qt_gsi::GenericMethod ("eventFilter", "@brief Virtual method bool QAbstractState::eventFilter(QObject *watched, QEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0);
methods += new qt_gsi::GenericMethod ("eventFilter", "@hide", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0, &_set_callback_cbs_eventFilter_2411_0);
methods += new qt_gsi::GenericMethod ("emit_exited", "@brief Emitter for signal void QAbstractState::exited()\nCall this method to emit this signal.", false, &_init_emitter_exited_3384, &_call_emitter_exited_3384);
methods += new qt_gsi::GenericMethod ("*isSignalConnected", "@brief Method bool QAbstractState::isSignalConnected(const QMetaMethod &signal)\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_isSignalConnected_c2394, &_call_fp_isSignalConnected_c2394);
@ -762,7 +762,7 @@ static gsi::Methods methods_QAbstractState_Adaptor () {
methods += new qt_gsi::GenericMethod ("*receivers", "@brief Method int QAbstractState::receivers(const char *signal)\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_receivers_c1731, &_call_fp_receivers_c1731);
methods += new qt_gsi::GenericMethod ("*sender", "@brief Method QObject *QAbstractState::sender()\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_sender_c0, &_call_fp_sender_c0);
methods += new qt_gsi::GenericMethod ("*senderSignalIndex", "@brief Method int QAbstractState::senderSignalIndex()\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_senderSignalIndex_c0, &_call_fp_senderSignalIndex_c0);
methods += new qt_gsi::GenericMethod ("*timerEvent", "@brief Virtual method void QAbstractState::timerEvent(QTimerEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_timerEvent_1730_0, &_call_cbs_timerEvent_1730_0);
methods += new qt_gsi::GenericMethod ("*timerEvent", "@brief Virtual method void QAbstractState::timerEvent(QTimerEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_timerEvent_1730_0, &_call_cbs_timerEvent_1730_0);
methods += new qt_gsi::GenericMethod ("*timerEvent", "@hide", false, &_init_cbs_timerEvent_1730_0, &_call_cbs_timerEvent_1730_0, &_set_callback_cbs_timerEvent_1730_0);
return methods;
}

View File

@ -582,33 +582,33 @@ public:
}
}
// [adaptor impl] bool QAbstractTableModel::event(QEvent *)
bool cbs_event_1217_0(QEvent *arg1)
// [adaptor impl] bool QAbstractTableModel::event(QEvent *event)
bool cbs_event_1217_0(QEvent *_event)
{
return QAbstractTableModel::event(arg1);
return QAbstractTableModel::event(_event);
}
virtual bool event(QEvent *arg1)
virtual bool event(QEvent *_event)
{
if (cb_event_1217_0.can_issue()) {
return cb_event_1217_0.issue<QAbstractTableModel_Adaptor, bool, QEvent *>(&QAbstractTableModel_Adaptor::cbs_event_1217_0, arg1);
return cb_event_1217_0.issue<QAbstractTableModel_Adaptor, bool, QEvent *>(&QAbstractTableModel_Adaptor::cbs_event_1217_0, _event);
} else {
return QAbstractTableModel::event(arg1);
return QAbstractTableModel::event(_event);
}
}
// [adaptor impl] bool QAbstractTableModel::eventFilter(QObject *, QEvent *)
bool cbs_eventFilter_2411_0(QObject *arg1, QEvent *arg2)
// [adaptor impl] bool QAbstractTableModel::eventFilter(QObject *watched, QEvent *event)
bool cbs_eventFilter_2411_0(QObject *watched, QEvent *event)
{
return QAbstractTableModel::eventFilter(arg1, arg2);
return QAbstractTableModel::eventFilter(watched, event);
}
virtual bool eventFilter(QObject *arg1, QEvent *arg2)
virtual bool eventFilter(QObject *watched, QEvent *event)
{
if (cb_eventFilter_2411_0.can_issue()) {
return cb_eventFilter_2411_0.issue<QAbstractTableModel_Adaptor, bool, QObject *, QEvent *>(&QAbstractTableModel_Adaptor::cbs_eventFilter_2411_0, arg1, arg2);
return cb_eventFilter_2411_0.issue<QAbstractTableModel_Adaptor, bool, QObject *, QEvent *>(&QAbstractTableModel_Adaptor::cbs_eventFilter_2411_0, watched, event);
} else {
return QAbstractTableModel::eventFilter(arg1, arg2);
return QAbstractTableModel::eventFilter(watched, event);
}
}
@ -1098,33 +1098,33 @@ public:
}
}
// [adaptor impl] void QAbstractTableModel::childEvent(QChildEvent *)
void cbs_childEvent_1701_0(QChildEvent *arg1)
// [adaptor impl] void QAbstractTableModel::childEvent(QChildEvent *event)
void cbs_childEvent_1701_0(QChildEvent *event)
{
QAbstractTableModel::childEvent(arg1);
QAbstractTableModel::childEvent(event);
}
virtual void childEvent(QChildEvent *arg1)
virtual void childEvent(QChildEvent *event)
{
if (cb_childEvent_1701_0.can_issue()) {
cb_childEvent_1701_0.issue<QAbstractTableModel_Adaptor, QChildEvent *>(&QAbstractTableModel_Adaptor::cbs_childEvent_1701_0, arg1);
cb_childEvent_1701_0.issue<QAbstractTableModel_Adaptor, QChildEvent *>(&QAbstractTableModel_Adaptor::cbs_childEvent_1701_0, event);
} else {
QAbstractTableModel::childEvent(arg1);
QAbstractTableModel::childEvent(event);
}
}
// [adaptor impl] void QAbstractTableModel::customEvent(QEvent *)
void cbs_customEvent_1217_0(QEvent *arg1)
// [adaptor impl] void QAbstractTableModel::customEvent(QEvent *event)
void cbs_customEvent_1217_0(QEvent *event)
{
QAbstractTableModel::customEvent(arg1);
QAbstractTableModel::customEvent(event);
}
virtual void customEvent(QEvent *arg1)
virtual void customEvent(QEvent *event)
{
if (cb_customEvent_1217_0.can_issue()) {
cb_customEvent_1217_0.issue<QAbstractTableModel_Adaptor, QEvent *>(&QAbstractTableModel_Adaptor::cbs_customEvent_1217_0, arg1);
cb_customEvent_1217_0.issue<QAbstractTableModel_Adaptor, QEvent *>(&QAbstractTableModel_Adaptor::cbs_customEvent_1217_0, event);
} else {
QAbstractTableModel::customEvent(arg1);
QAbstractTableModel::customEvent(event);
}
}
@ -1143,18 +1143,18 @@ public:
}
}
// [adaptor impl] void QAbstractTableModel::timerEvent(QTimerEvent *)
void cbs_timerEvent_1730_0(QTimerEvent *arg1)
// [adaptor impl] void QAbstractTableModel::timerEvent(QTimerEvent *event)
void cbs_timerEvent_1730_0(QTimerEvent *event)
{
QAbstractTableModel::timerEvent(arg1);
QAbstractTableModel::timerEvent(event);
}
virtual void timerEvent(QTimerEvent *arg1)
virtual void timerEvent(QTimerEvent *event)
{
if (cb_timerEvent_1730_0.can_issue()) {
cb_timerEvent_1730_0.issue<QAbstractTableModel_Adaptor, QTimerEvent *>(&QAbstractTableModel_Adaptor::cbs_timerEvent_1730_0, arg1);
cb_timerEvent_1730_0.issue<QAbstractTableModel_Adaptor, QTimerEvent *>(&QAbstractTableModel_Adaptor::cbs_timerEvent_1730_0, event);
} else {
QAbstractTableModel::timerEvent(arg1);
QAbstractTableModel::timerEvent(event);
}
}
@ -1204,7 +1204,7 @@ QAbstractTableModel_Adaptor::~QAbstractTableModel_Adaptor() { }
static void _init_ctor_QAbstractTableModel_Adaptor_1302 (qt_gsi::GenericStaticMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("parent", true, "0");
static gsi::ArgSpecBase argspec_0 ("parent", true, "nullptr");
decl->add_arg<QObject * > (argspec_0);
decl->set_return_new<QAbstractTableModel_Adaptor> ();
}
@ -1213,7 +1213,7 @@ static void _call_ctor_QAbstractTableModel_Adaptor_1302 (const qt_gsi::GenericSt
{
__SUPPRESS_UNUSED_WARNING(args);
tl::Heap heap;
QObject *arg1 = args ? gsi::arg_reader<QObject * >() (args, heap) : gsi::arg_maker<QObject * >() (0, heap);
QObject *arg1 = args ? gsi::arg_reader<QObject * >() (args, heap) : gsi::arg_maker<QObject * >() (nullptr, heap);
ret.write<QAbstractTableModel_Adaptor *> (new QAbstractTableModel_Adaptor (arg1));
}
@ -1518,11 +1518,11 @@ static void _call_fp_changePersistentIndexList_5912 (const qt_gsi::GenericMethod
}
// void QAbstractTableModel::childEvent(QChildEvent *)
// void QAbstractTableModel::childEvent(QChildEvent *event)
static void _init_cbs_childEvent_1701_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("event");
decl->add_arg<QChildEvent * > (argspec_0);
decl->set_return<void > ();
}
@ -1729,7 +1729,7 @@ static void _init_fp_createIndex_c2374 (qt_gsi::GenericMethod *decl)
decl->add_arg<int > (argspec_0);
static gsi::ArgSpecBase argspec_1 ("column");
decl->add_arg<int > (argspec_1);
static gsi::ArgSpecBase argspec_2 ("data", true, "0");
static gsi::ArgSpecBase argspec_2 ("data", true, "nullptr");
decl->add_arg<void * > (argspec_2);
decl->set_return<QModelIndex > ();
}
@ -1740,7 +1740,7 @@ static void _call_fp_createIndex_c2374 (const qt_gsi::GenericMethod * /*decl*/,
tl::Heap heap;
int arg1 = gsi::arg_reader<int >() (args, heap);
int arg2 = gsi::arg_reader<int >() (args, heap);
void *arg3 = args ? gsi::arg_reader<void * >() (args, heap) : gsi::arg_maker<void * >() (0, heap);
void *arg3 = args ? gsi::arg_reader<void * >() (args, heap) : gsi::arg_maker<void * >() (nullptr, heap);
ret.write<QModelIndex > ((QModelIndex)((QAbstractTableModel_Adaptor *)cls)->fp_QAbstractTableModel_createIndex_c2374 (arg1, arg2, arg3));
}
@ -1769,11 +1769,11 @@ static void _call_fp_createIndex_c2657 (const qt_gsi::GenericMethod * /*decl*/,
}
// void QAbstractTableModel::customEvent(QEvent *)
// void QAbstractTableModel::customEvent(QEvent *event)
static void _init_cbs_customEvent_1217_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("event");
decl->add_arg<QEvent * > (argspec_0);
decl->set_return<void > ();
}
@ -1874,7 +1874,7 @@ static void _call_fp_decodeData_5302 (const qt_gsi::GenericMethod * /*decl*/, vo
static void _init_emitter_destroyed_1302 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1", true, "0");
static gsi::ArgSpecBase argspec_0 ("arg1", true, "nullptr");
decl->add_arg<QObject * > (argspec_0);
decl->set_return<void > ();
}
@ -1883,7 +1883,7 @@ static void _call_emitter_destroyed_1302 (const qt_gsi::GenericMethod * /*decl*/
{
__SUPPRESS_UNUSED_WARNING(args);
tl::Heap heap;
QObject *arg1 = args ? gsi::arg_reader<QObject * >() (args, heap) : gsi::arg_maker<QObject * >() (0, heap);
QObject *arg1 = args ? gsi::arg_reader<QObject * >() (args, heap) : gsi::arg_maker<QObject * >() (nullptr, heap);
((QAbstractTableModel_Adaptor *)cls)->emitter_QAbstractTableModel_destroyed_1302 (arg1);
}
@ -2074,11 +2074,11 @@ static void _call_fp_endResetModel_0 (const qt_gsi::GenericMethod * /*decl*/, vo
}
// bool QAbstractTableModel::event(QEvent *)
// bool QAbstractTableModel::event(QEvent *event)
static void _init_cbs_event_1217_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("event");
decl->add_arg<QEvent * > (argspec_0);
decl->set_return<bool > ();
}
@ -2097,13 +2097,13 @@ static void _set_callback_cbs_event_1217_0 (void *cls, const gsi::Callback &cb)
}
// bool QAbstractTableModel::eventFilter(QObject *, QEvent *)
// bool QAbstractTableModel::eventFilter(QObject *watched, QEvent *event)
static void _init_cbs_eventFilter_2411_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("watched");
decl->add_arg<QObject * > (argspec_0);
static gsi::ArgSpecBase argspec_1 ("arg2");
static gsi::ArgSpecBase argspec_1 ("event");
decl->add_arg<QEvent * > (argspec_1);
decl->set_return<bool > ();
}
@ -3160,11 +3160,11 @@ static void _set_callback_cbs_supportedDropActions_c0_0 (void *cls, const gsi::C
}
// void QAbstractTableModel::timerEvent(QTimerEvent *)
// void QAbstractTableModel::timerEvent(QTimerEvent *event)
static void _init_cbs_timerEvent_1730_0 (qt_gsi::GenericMethod *decl)
{
static gsi::ArgSpecBase argspec_0 ("arg1");
static gsi::ArgSpecBase argspec_0 ("event");
decl->add_arg<QTimerEvent * > (argspec_0);
decl->set_return<void > ();
}
@ -3207,7 +3207,7 @@ static gsi::Methods methods_QAbstractTableModel_Adaptor () {
methods += new qt_gsi::GenericMethod ("canFetchMore", "@hide", true, &_init_cbs_canFetchMore_c2395_0, &_call_cbs_canFetchMore_c2395_0, &_set_callback_cbs_canFetchMore_c2395_0);
methods += new qt_gsi::GenericMethod ("*changePersistentIndex", "@brief Method void QAbstractTableModel::changePersistentIndex(const QModelIndex &from, const QModelIndex &to)\nThis method is protected and can only be called from inside a derived class.", false, &_init_fp_changePersistentIndex_4682, &_call_fp_changePersistentIndex_4682);
methods += new qt_gsi::GenericMethod ("*changePersistentIndexList", "@brief Method void QAbstractTableModel::changePersistentIndexList(const QList<QModelIndex> &from, const QList<QModelIndex> &to)\nThis method is protected and can only be called from inside a derived class.", false, &_init_fp_changePersistentIndexList_5912, &_call_fp_changePersistentIndexList_5912);
methods += new qt_gsi::GenericMethod ("*childEvent", "@brief Virtual method void QAbstractTableModel::childEvent(QChildEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_childEvent_1701_0, &_call_cbs_childEvent_1701_0);
methods += new qt_gsi::GenericMethod ("*childEvent", "@brief Virtual method void QAbstractTableModel::childEvent(QChildEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_childEvent_1701_0, &_call_cbs_childEvent_1701_0);
methods += new qt_gsi::GenericMethod ("*childEvent", "@hide", false, &_init_cbs_childEvent_1701_0, &_call_cbs_childEvent_1701_0, &_set_callback_cbs_childEvent_1701_0);
methods += new qt_gsi::GenericMethod ("columnCount", "@brief Virtual method int QAbstractTableModel::columnCount(const QModelIndex &parent)\nThis method can be reimplemented in a derived class.", true, &_init_cbs_columnCount_c2395_1, &_call_cbs_columnCount_c2395_1);
methods += new qt_gsi::GenericMethod ("columnCount", "@hide", true, &_init_cbs_columnCount_c2395_1, &_call_cbs_columnCount_c2395_1, &_set_callback_cbs_columnCount_c2395_1);
@ -3219,7 +3219,7 @@ static gsi::Methods methods_QAbstractTableModel_Adaptor () {
methods += new qt_gsi::GenericMethod ("emit_columnsRemoved", "@brief Emitter for signal void QAbstractTableModel::columnsRemoved(const QModelIndex &parent, int first, int last)\nCall this method to emit this signal.", false, &_init_emitter_columnsRemoved_7372, &_call_emitter_columnsRemoved_7372);
methods += new qt_gsi::GenericMethod ("*createIndex", "@brief Method QModelIndex QAbstractTableModel::createIndex(int row, int column, void *data)\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_createIndex_c2374, &_call_fp_createIndex_c2374);
methods += new qt_gsi::GenericMethod ("*createIndex", "@brief Method QModelIndex QAbstractTableModel::createIndex(int row, int column, quintptr id)\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_createIndex_c2657, &_call_fp_createIndex_c2657);
methods += new qt_gsi::GenericMethod ("*customEvent", "@brief Virtual method void QAbstractTableModel::customEvent(QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_customEvent_1217_0, &_call_cbs_customEvent_1217_0);
methods += new qt_gsi::GenericMethod ("*customEvent", "@brief Virtual method void QAbstractTableModel::customEvent(QEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_customEvent_1217_0, &_call_cbs_customEvent_1217_0);
methods += new qt_gsi::GenericMethod ("*customEvent", "@hide", false, &_init_cbs_customEvent_1217_0, &_call_cbs_customEvent_1217_0, &_set_callback_cbs_customEvent_1217_0);
methods += new qt_gsi::GenericMethod ("data", "@brief Virtual method QVariant QAbstractTableModel::data(const QModelIndex &index, int role)\nThis method can be reimplemented in a derived class.", true, &_init_cbs_data_c3054_1, &_call_cbs_data_c3054_1);
methods += new qt_gsi::GenericMethod ("data", "@hide", true, &_init_cbs_data_c3054_1, &_call_cbs_data_c3054_1, &_set_callback_cbs_data_c3054_1);
@ -3238,9 +3238,9 @@ static gsi::Methods methods_QAbstractTableModel_Adaptor () {
methods += new qt_gsi::GenericMethod ("*endRemoveColumns", "@brief Method void QAbstractTableModel::endRemoveColumns()\nThis method is protected and can only be called from inside a derived class.", false, &_init_fp_endRemoveColumns_0, &_call_fp_endRemoveColumns_0);
methods += new qt_gsi::GenericMethod ("*endRemoveRows", "@brief Method void QAbstractTableModel::endRemoveRows()\nThis method is protected and can only be called from inside a derived class.", false, &_init_fp_endRemoveRows_0, &_call_fp_endRemoveRows_0);
methods += new qt_gsi::GenericMethod ("*endResetModel", "@brief Method void QAbstractTableModel::endResetModel()\nThis method is protected and can only be called from inside a derived class.", false, &_init_fp_endResetModel_0, &_call_fp_endResetModel_0);
methods += new qt_gsi::GenericMethod ("event", "@brief Virtual method bool QAbstractTableModel::event(QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_event_1217_0, &_call_cbs_event_1217_0);
methods += new qt_gsi::GenericMethod ("event", "@brief Virtual method bool QAbstractTableModel::event(QEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_event_1217_0, &_call_cbs_event_1217_0);
methods += new qt_gsi::GenericMethod ("event", "@hide", false, &_init_cbs_event_1217_0, &_call_cbs_event_1217_0, &_set_callback_cbs_event_1217_0);
methods += new qt_gsi::GenericMethod ("eventFilter", "@brief Virtual method bool QAbstractTableModel::eventFilter(QObject *, QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0);
methods += new qt_gsi::GenericMethod ("eventFilter", "@brief Virtual method bool QAbstractTableModel::eventFilter(QObject *watched, QEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0);
methods += new qt_gsi::GenericMethod ("eventFilter", "@hide", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0, &_set_callback_cbs_eventFilter_2411_0);
methods += new qt_gsi::GenericMethod ("fetchMore", "@brief Virtual method void QAbstractTableModel::fetchMore(const QModelIndex &parent)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_fetchMore_2395_0, &_call_cbs_fetchMore_2395_0);
methods += new qt_gsi::GenericMethod ("fetchMore", "@hide", false, &_init_cbs_fetchMore_2395_0, &_call_cbs_fetchMore_2395_0, &_set_callback_cbs_fetchMore_2395_0);
@ -3312,7 +3312,7 @@ static gsi::Methods methods_QAbstractTableModel_Adaptor () {
methods += new qt_gsi::GenericMethod ("supportedDragActions", "@hide", true, &_init_cbs_supportedDragActions_c0_0, &_call_cbs_supportedDragActions_c0_0, &_set_callback_cbs_supportedDragActions_c0_0);
methods += new qt_gsi::GenericMethod ("supportedDropActions", "@brief Virtual method QFlags<Qt::DropAction> QAbstractTableModel::supportedDropActions()\nThis method can be reimplemented in a derived class.", true, &_init_cbs_supportedDropActions_c0_0, &_call_cbs_supportedDropActions_c0_0);
methods += new qt_gsi::GenericMethod ("supportedDropActions", "@hide", true, &_init_cbs_supportedDropActions_c0_0, &_call_cbs_supportedDropActions_c0_0, &_set_callback_cbs_supportedDropActions_c0_0);
methods += new qt_gsi::GenericMethod ("*timerEvent", "@brief Virtual method void QAbstractTableModel::timerEvent(QTimerEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_timerEvent_1730_0, &_call_cbs_timerEvent_1730_0);
methods += new qt_gsi::GenericMethod ("*timerEvent", "@brief Virtual method void QAbstractTableModel::timerEvent(QTimerEvent *event)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_timerEvent_1730_0, &_call_cbs_timerEvent_1730_0);
methods += new qt_gsi::GenericMethod ("*timerEvent", "@hide", false, &_init_cbs_timerEvent_1730_0, &_call_cbs_timerEvent_1730_0, &_set_callback_cbs_timerEvent_1730_0);
return methods;
}

Some files were not shown because too many files have changed in this diff Show More