Spaces:
Running
Running
PerceptionLabPortable
/
python_embed
/Lib
/site-packages
/PyQt6
/bindings
/QtWidgets
/qapplication.sip
| // qapplication.sip generated by MetaSIP | |
| // | |
| // This file is part of the QtWidgets Python extension module. | |
| // | |
| // Copyright (c) 2025 Riverbank Computing Limited <info@riverbankcomputing.com> | |
| // | |
| // This file is part of PyQt6. | |
| // | |
| // This file may be used under the terms of the GNU General Public License | |
| // version 3.0 as published by the Free Software Foundation and appearing in | |
| // the file LICENSE included in the packaging of this file. Please review the | |
| // following information to ensure the GNU General Public License version 3.0 | |
| // requirements will be met: http://www.gnu.org/copyleft/gpl.html. | |
| // | |
| // If you do not wish to use this file under the terms of the GPL version 3.0 | |
| // then you may purchase a commercial license. For more information contact | |
| // info@riverbankcomputing.com. | |
| // | |
| // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | |
| // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
| typedef QList<QWidget *> QWidgetList; | |
| class QApplication : public QGuiApplication | |
| { | |
| %TypeHeaderCode | |
| %End | |
| %ConvertToSubClassCode | |
| static struct class_graph { | |
| const char *name; | |
| sipTypeDef **type; | |
| int yes, no; | |
| } graph[] = { | |
| {sipName_QWidget, | |
| {sipName_QAbstractItemDelegate, | |
| {sipName_QApplication, | |
| {sipName_QLayout, | |
| {sipName_QButtonGroup, | |
| {sipName_QStyle, | |
| {sipName_QCompleter, | |
| {sipName_QDataWidgetMapper, | |
| {sipName_QGesture, | |
| {sipName_QGraphicsAnchor, | |
| {sipName_QGraphicsEffect, | |
| {sipName_QGraphicsObject, | |
| {sipName_QGraphicsTransform, | |
| {sipName_QGraphicsScene, | |
| {sipName_QPlainTextDocumentLayout, | |
| {sipName_QScroller, | |
| {sipName_QSystemTrayIcon, | |
| {sipName_QWidgetAction, | |
| {sipName_QAbstractButton, | |
| {sipName_QFrame, | |
| {sipName_QAbstractSlider, | |
| {sipName_QAbstractSpinBox, | |
| {sipName_QCalendarWidget, | |
| {sipName_QDialog, | |
| {sipName_QComboBox, | |
| {sipName_QDialogButtonBox, | |
| {sipName_QDockWidget, | |
| {sipName_QFocusFrame, | |
| {sipName_QGroupBox, | |
| {sipName_QKeySequenceEdit, | |
| {sipName_QLineEdit, | |
| {sipName_QMainWindow, | |
| {sipName_QMdiSubWindow, | |
| {sipName_QMenu, | |
| {sipName_QMenuBar, | |
| {sipName_QProgressBar, | |
| {sipName_QRubberBand, | |
| {sipName_QSizeGrip, | |
| {sipName_QSplashScreen, | |
| {sipName_QSplitterHandle, | |
| {sipName_QStatusBar, | |
| {sipName_QTabBar, | |
| {sipName_QTabWidget, | |
| {sipName_QToolBar, | |
| {sipName_QWizardPage, | |
| {sipName_QCheckBox, | |
| {sipName_QPushButton, | |
| {sipName_QRadioButton, | |
| {sipName_QToolButton, | |
| {sipName_QCommandLinkButton, | |
| {sipName_QAbstractScrollArea, | |
| {sipName_QLCDNumber, | |
| {sipName_QLabel, | |
| {sipName_QSplitter, | |
| {sipName_QStackedWidget, | |
| {sipName_QToolBox, | |
| {sipName_QAbstractItemView, | |
| {sipName_QGraphicsView, | |
| {sipName_QMdiArea, | |
| {sipName_QPlainTextEdit, | |
| {sipName_QScrollArea, | |
| {sipName_QTextEdit, | |
| {sipName_QColumnView, | |
| {sipName_QHeaderView, | |
| {sipName_QListView, | |
| {sipName_QTableView, | |
| {sipName_QTreeView, | |
| {sipName_QListWidget, | |
| {sipName_QUndoView, | |
| {sipName_QTableWidget, | |
| {sipName_QTreeWidget, | |
| {sipName_QTextBrowser, | |
| {sipName_QDial, | |
| {sipName_QScrollBar, | |
| {sipName_QSlider, | |
| {sipName_QDateTimeEdit, | |
| {sipName_QDoubleSpinBox, | |
| {sipName_QSpinBox, | |
| {sipName_QDateEdit, | |
| {sipName_QTimeEdit, | |
| {sipName_QColorDialog, | |
| {sipName_QErrorMessage, | |
| {sipName_QFileDialog, | |
| {sipName_QFontDialog, | |
| {sipName_QInputDialog, | |
| {sipName_QMessageBox, | |
| {sipName_QProgressDialog, | |
| {sipName_QWizard, | |
| {sipName_QFontComboBox, | |
| {sipName_QItemDelegate, | |
| {sipName_QStyledItemDelegate, | |
| {sipName_QBoxLayout, | |
| {sipName_QFormLayout, | |
| {sipName_QGridLayout, | |
| {sipName_QStackedLayout, | |
| {sipName_QHBoxLayout, | |
| {sipName_QVBoxLayout, | |
| {sipName_QCommonStyle, | |
| {sipName_QProxyStyle, | |
| {sipName_QPanGesture, | |
| {sipName_QPinchGesture, | |
| {sipName_QSwipeGesture, | |
| {sipName_QTapAndHoldGesture, | |
| {sipName_QTapGesture, | |
| {sipName_QGraphicsBlurEffect, | |
| {sipName_QGraphicsColorizeEffect, | |
| {sipName_QGraphicsDropShadowEffect, | |
| {sipName_QGraphicsOpacityEffect, | |
| {sipName_QGraphicsWidget, | |
| {sipName_QGraphicsTextItem, | |
| {sipName_QGraphicsProxyWidget, | |
| {sipName_QGraphicsRotation, | |
| {sipName_QGraphicsScale, | |
| }; | |
| int i = 0; | |
| sipType = NULL; | |
| do | |
| { | |
| struct class_graph *cg = | |
| if (cg->name != NULL | |
| { | |
| sipType = *cg->type; | |
| i = cg->yes; | |
| } | |
| else | |
| i = cg->no; | |
| } | |
| while (i >= 0); | |
| %End | |
| public: | |
| QApplication(SIP_PYLIST argv /TypeHint="List[str]"/) /PostHook=__pyQtQAppHook__/ [(int | |
| %MethodCode | |
| // The Python interface is a list of argument strings that is modified. | |
| int argc; | |
| char **argv; | |
| // Convert the list. | |
| if ((argv = pyqt6_qtwidgets_from_argv_list(a0, argc)) == NULL) | |
| sipIsErr = 1; | |
| else | |
| { | |
| // Create it now the arguments are right. | |
| static int nargc; | |
| nargc = argc; | |
| Py_BEGIN_ALLOW_THREADS | |
| sipCpp = new sipQApplication(nargc, argv, QCoreApplication::ApplicationFlags); | |
| Py_END_ALLOW_THREADS | |
| // Now modify the original list. | |
| pyqt6_qtwidgets_update_argv_list(a0, argc, argv); | |
| } | |
| %End | |
| virtual ~QApplication() /ReleaseGIL/; | |
| %MethodCode | |
| pyqt6_qtwidgets_cleanup_qobjects(); | |
| %End | |
| static QStyle *style(); | |
| static void setStyle(QStyle * /Transfer/); | |
| static QStyle *setStyle(const QString | |
| static QPalette palette(); | |
| static QPalette palette(const QWidget *); | |
| static QPalette palette(const char *className); | |
| static void setPalette(const QPalette | |
| static QFont font(); | |
| static QFont font(const QWidget *); | |
| static QFont font(const char *className); | |
| static void setFont(const QFont | |
| static QWidgetList allWidgets(); | |
| static QWidgetList topLevelWidgets(); | |
| static QWidget *activePopupWidget(); | |
| static QWidget *activeModalWidget(); | |
| static QWidget *focusWidget(); | |
| static QWidget *activeWindow(); | |
| static void setActiveWindow(QWidget *act); | |
| static QWidget *widgetAt(const QPoint | |
| static QWidget *widgetAt(int x, int y); | |
| static QWidget *topLevelAt(const QPoint | |
| static QWidget *topLevelAt(int x, int y); | |
| static void beep(); | |
| static void alert(QWidget *widget, int msecs = 0) /ReleaseGIL/; | |
| static void setCursorFlashTime(int); | |
| static int cursorFlashTime(); | |
| static void setDoubleClickInterval(int); | |
| static int doubleClickInterval(); | |
| static void setKeyboardInputInterval(int); | |
| static int keyboardInputInterval(); | |
| static void setWheelScrollLines(int); | |
| static int wheelScrollLines(); | |
| static void setStartDragTime(int ms); | |
| static int startDragTime(); | |
| static void setStartDragDistance(int l); | |
| static int startDragDistance(); | |
| static bool isEffectEnabled(Qt::UIEffect); | |
| static void setEffectEnabled(Qt::UIEffect, bool enabled = true); | |
| static int exec() /PostHook=__pyQtPostEventLoopHook__,PreHook=__pyQtPreEventLoopHook__,ReleaseGIL/; | |
| virtual bool notify(QObject *, QEvent *) /ReleaseGIL/; | |
| bool autoSipEnabled() const; | |
| QString styleSheet() const; | |
| signals: | |
| void focusChanged(QWidget *old, QWidget *now); | |
| public slots: | |
| static void aboutQt(); | |
| static void closeAllWindows(); | |
| void setAutoSipEnabled(const bool enabled); | |
| void setStyleSheet(const QString | |
| protected: | |
| virtual bool event(QEvent *); | |
| }; | |
| %ModuleHeaderCode | |
| // Imports from QtCore. | |
| typedef void (*pyqt6_qtwidgets_cleanup_qobjects_t)(); | |
| extern pyqt6_qtwidgets_cleanup_qobjects_t pyqt6_qtwidgets_cleanup_qobjects; | |
| typedef char **(*pyqt6_qtwidgets_from_argv_list_t)(PyObject *, int | |
| extern pyqt6_qtwidgets_from_argv_list_t pyqt6_qtwidgets_from_argv_list; | |
| typedef sipErrorState (*pyqt6_qtwidgets_get_connection_parts_t)(PyObject *, QObject *, const char *, bool, QObject **, QByteArray | |
| extern pyqt6_qtwidgets_get_connection_parts_t pyqt6_qtwidgets_get_connection_parts; | |
| typedef sipErrorState (*pyqt6_qtwidgets_get_signal_signature_t)(PyObject *, QObject *, QByteArray | |
| extern pyqt6_qtwidgets_get_signal_signature_t pyqt6_qtwidgets_get_signal_signature; | |
| typedef void (*pyqt6_qtwidgets_update_argv_list_t)(PyObject *, int, char **); | |
| extern pyqt6_qtwidgets_update_argv_list_t pyqt6_qtwidgets_update_argv_list; | |
| // This is needed for Qt v5.0.0. | |
| %End | |
| %ModuleCode | |
| // Imports from QtCore. | |
| pyqt6_qtwidgets_cleanup_qobjects_t pyqt6_qtwidgets_cleanup_qobjects; | |
| pyqt6_qtwidgets_from_argv_list_t pyqt6_qtwidgets_from_argv_list; | |
| pyqt6_qtwidgets_get_connection_parts_t pyqt6_qtwidgets_get_connection_parts; | |
| pyqt6_qtwidgets_get_signal_signature_t pyqt6_qtwidgets_get_signal_signature; | |
| pyqt6_qtwidgets_update_argv_list_t pyqt6_qtwidgets_update_argv_list; | |
| %End | |
| %PostInitialisationCode | |
| // Imports from QtCore. | |
| pyqt6_qtwidgets_cleanup_qobjects = (pyqt6_qtwidgets_cleanup_qobjects_t)sipImportSymbol("pyqt6_cleanup_qobjects"); | |
| Q_ASSERT(pyqt6_qtwidgets_cleanup_qobjects); | |
| pyqt6_qtwidgets_from_argv_list = (pyqt6_qtwidgets_from_argv_list_t)sipImportSymbol("pyqt6_from_argv_list"); | |
| Q_ASSERT(pyqt6_qtwidgets_from_argv_list); | |
| pyqt6_qtwidgets_get_connection_parts = (pyqt6_qtwidgets_get_connection_parts_t)sipImportSymbol("pyqt6_get_connection_parts"); | |
| Q_ASSERT(pyqt6_qtwidgets_get_connection_parts); | |
| pyqt6_qtwidgets_get_signal_signature = (pyqt6_qtwidgets_get_signal_signature_t)sipImportSymbol("pyqt6_get_signal_signature"); | |
| Q_ASSERT(pyqt6_qtwidgets_get_signal_signature); | |
| pyqt6_qtwidgets_update_argv_list = (pyqt6_qtwidgets_update_argv_list_t)sipImportSymbol("pyqt6_update_argv_list"); | |
| Q_ASSERT(pyqt6_qtwidgets_update_argv_list); | |
| qpywidgets_post_init(); | |
| %End | |