/usr/share/sip/PyQt4/QtGui/qapplication.sip is in python-qt4-dev 4.9.1-2ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 | // qapplication.sip generated by MetaSIP on Fri Feb 10 10:35:12 2012
//
// This file is part of the QtGui Python extension module.
//
// Copyright (c) 2011 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt.
//
// This file may be used under the terms of the GNU General Public
// License versions 2.0 or 3.0 as published by the Free Software
// Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3
// included in the packaging of this file. Alternatively you may (at
// your option) use any later version of the GNU General Public
// License if such license has been publicly approved by Riverbank
// Computing Limited (or its successors, if any) and the KDE Free Qt
// Foundation. In addition, as a special exception, Riverbank gives you
// certain additional rights. These rights are described in the Riverbank
// GPL Exception version 1.1, which can be found in the file
// GPL_EXCEPTION.txt in this package.
//
// If you are unsure which license is appropriate for your use, please
// contact the sales department at sales@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.
%If (WS_X11)
// Mapped type for XEvent.
// Map XEvent onto sip.voidptr so that Python code can use the struct module to
// read and/or update it.
%MappedType XEvent /NoRelease, DocType="sip.voidptr"/
{
%TypeHeaderCode
#include <qapplication.h>
%End
%ConvertToTypeCode
void *addr = sipConvertToVoidPtr(sipPy);
if (!sipIsErr)
return !PyErr_Occurred();
*sipCppPtr = reinterpret_cast<XEvent *>(addr);
return 0;
%End
%ConvertFromTypeCode
return sipConvertFromVoidPtr(sipCpp);
%End
};
%End
%If (WS_X11)
void qt_x11_wait_for_window_manager(QWidget *widget);
%End
%If (WS_MACX)
void qt_set_sequence_auto_mnemonic(bool enable);
%End
%If (WS_MACX)
void qt_mac_secure_keyboard(bool enable);
%End
%If (WS_MACX)
void qt_mac_set_dock_menu(QMenu *menu /KeepReference/);
%End
%If (WS_MACX)
void qt_mac_set_menubar_icons(bool enable);
%End
%If (WS_MACX)
void qt_mac_set_menubar_merge(bool enable);
%End
%If (WS_MACX)
void qt_mac_set_native_menubar(bool enable);
%End
%If (WS_MACX)
void qt_mac_set_press_and_hold_context(bool enable);
%End
// class QMacCocoaViewContainer : public QWidget
%If (WS_MACX)
%If (Qt_4_5_0 -)
class QMacCocoaViewContainer : QWidget
{
%TypeHeaderCode
#include <QMacCocoaViewContainer>
%End
public:
QMacCocoaViewContainer(void *cocoaViewToWrap, QWidget *parent /TransferThis/ = 0);
virtual ~QMacCocoaViewContainer();
void setCocoaView(void *cocoaViewToWrap);
void *cocoaView() const;
private:
QMacCocoaViewContainer(const QMacCocoaViewContainer &);
};
%End
%End
// QApplication *qApp
QApplication *qApp {
%AccessCode
// Qt implements this has a #define to a function call so we have to handle
// it like this.
return qApp;
%End
};
class QApplication : QCoreApplication
{
%TypeHeaderCode
#include <qapplication.h>
%End
%ConvertToSubClassCode
static struct class_graph {
const char *name;
sipTypeDef **type;
int yes, no;
} graph[] = {
{sipName_QStandardItemModel, &sipType_QStandardItemModel, -1, 1},
{sipName_QDrag, &sipType_QDrag, -1, 2},
#if QT_VERSION >= 0x040600
{sipName_QGraphicsAnchor, &sipType_QGraphicsAnchor, -1, 3},
#else
{0, 0, -1, 3},
#endif
#if QT_VERSION >= 0x040200
{sipName_QCompleter, &sipType_QCompleter, -1, 4},
#else
{0, 0, -1, 4},
#endif
{sipName_QProxyModel, &sipType_QProxyModel, -1, 5},
{sipName_QAbstractTextDocumentLayout, &sipType_QAbstractTextDocumentLayout, 42, 6},
{sipName_QMovie, &sipType_QMovie, -1, 7},
{sipName_QWidget, &sipType_QWidget, 43, 8},
#if QT_VERSION >= 0x040600
{sipName_QGesture, &sipType_QGesture, 123, 9},
#else
{0, 0, 123, 9},
#endif
{sipName_QSound, &sipType_QSound, -1, 10},
#if QT_VERSION >= 0x040600
{sipName_QMouseEventTransition, &sipType_QMouseEventTransition, -1, 11},
#else
{0, 0, -1, 11},
#endif
{sipName_QClipboard, &sipType_QClipboard, -1, 12},
{sipName_QSyntaxHighlighter, &sipType_QSyntaxHighlighter, -1, 13},
#if QT_VERSION >= 0x040200
{sipName_QGraphicsScene, &sipType_QGraphicsScene, -1, 14},
#else
{0, 0, -1, 14},
#endif
{sipName_QAbstractProxyModel, &sipType_QAbstractProxyModel, 128, 15},
{sipName_QPyTextObject, &sipType_QPyTextObject, -1, 16},
{sipName_QButtonGroup, &sipType_QButtonGroup, -1, 17},
{sipName_QAction, &sipType_QAction, 130, 18},
#if QT_VERSION >= 0x040600
{sipName_QGraphicsObject, &sipType_QGraphicsObject, 131, 19},
#else
{0, 0, 131, 19},
#endif
{sipName_QDirModel, &sipType_QDirModel, -1, 20},
#if QT_VERSION >= 0x040200 && defined(SIP_FEATURE_PyQt_SystemTrayIcon)
{sipName_QSystemTrayIcon, &sipType_QSystemTrayIcon, -1, 21},
#else
{0, 0, -1, 21},
#endif
#if QT_VERSION >= 0x040200
{sipName_QDataWidgetMapper, &sipType_QDataWidgetMapper, -1, 22},
#else
{0, 0, -1, 22},
#endif
#if QT_VERSION >= 0x040600
{sipName_QKeyEventTransition, &sipType_QKeyEventTransition, -1, 23},
#else
{0, 0, -1, 23},
#endif
{sipName_QActionGroup, &sipType_QActionGroup, -1, 24},
#if QT_VERSION >= 0x040200
{sipName_QUndoGroup, &sipType_QUndoGroup, -1, 25},
#else
{0, 0, -1, 25},
#endif
#if QT_VERSION >= 0x040600
{sipName_QGraphicsEffect, &sipType_QGraphicsEffect, 134, 26},
#else
{0, 0, 134, 26},
#endif
{sipName_QLayout, &sipType_QLayout, 138, 27},
{sipName_QItemSelectionModel, &sipType_QItemSelectionModel, -1, 28},
{sipName_QValidator, &sipType_QValidator, 144, 29},
{sipName_QApplication, &sipType_QApplication, -1, 30},
{sipName_QStyle, &sipType_QStyle, 147, 31},
#if QT_VERSION >= 0x040200
{sipName_QUndoStack, &sipType_QUndoStack, -1, 32},
#else
{0, 0, -1, 32},
#endif
{sipName_QTextDocument, &sipType_QTextDocument, -1, 33},
#if defined(SIP_FEATURE_PyQt_SessionManager)
{sipName_QSessionManager, &sipType_QSessionManager, -1, 34},
#else
{0, 0, -1, 34},
#endif
#if QT_VERSION >= 0x040200
{sipName_QGraphicsItemAnimation, &sipType_QGraphicsItemAnimation, -1, 35},
#else
{0, 0, -1, 35},
#endif
{sipName_QInputContext, &sipType_QInputContext, -1, 36},
{sipName_QAbstractItemDelegate, &sipType_QAbstractItemDelegate, 148, 37},
{sipName_QTextObject, &sipType_QTextObject, 150, 38},
#if QT_VERSION >= 0x040600
{sipName_QGraphicsTransform, &sipType_QGraphicsTransform, 154, 39},
#else
{0, 0, 154, 39},
#endif
{sipName_QStringListModel, &sipType_QStringListModel, -1, 40},
{sipName_QShortcut, &sipType_QShortcut, -1, 41},
#if QT_VERSION >= 0x040400
{sipName_QFileSystemModel, &sipType_QFileSystemModel, -1, -1},
#else
{0, 0, -1, -1},
#endif
#if QT_VERSION >= 0x040400
{sipName_QPlainTextDocumentLayout, &sipType_QPlainTextDocumentLayout, -1, -1},
#else
{0, 0, -1, -1},
#endif
{sipName_QDesktopWidget, &sipType_QDesktopWidget, -1, 44},
{sipName_QAbstractSpinBox, &sipType_QAbstractSpinBox, 75, 45},
{sipName_QComboBox, &sipType_QComboBox, 80, 46},
{sipName_QSplitterHandle, &sipType_QSplitterHandle, -1, 47},
#if QT_VERSION >= 0x040400 && defined(SIP_FEATURE_PyQt_PrintPreviewWidget)
{sipName_QPrintPreviewWidget, &sipType_QPrintPreviewWidget, -1, 48},
#else
{0, 0, -1, 48},
#endif
{sipName_QFrame, &sipType_QFrame, 81, 49},
{sipName_QToolBar, &sipType_QToolBar, -1, 50},
{sipName_QRubberBand, &sipType_QRubberBand, -1, 51},
#if defined(Q_WS_X11)
{sipName_QX11EmbedContainer, &sipType_QX11EmbedContainer, -1, 52},
#else
{0, 0, -1, 52},
#endif
{sipName_QLineEdit, &sipType_QLineEdit, -1, 53},
{sipName_QGroupBox, &sipType_QGroupBox, -1, 54},
{sipName_QMenu, &sipType_QMenu, -1, 55},
#if QT_VERSION >= 0x040500 && defined(Q_WS_MAC)
{sipName_QMacCocoaViewContainer, &sipType_QMacCocoaViewContainer, -1, 56},
#else
{0, 0, -1, 56},
#endif
{sipName_QAbstractButton, &sipType_QAbstractButton, 103, 57},
#if defined(Q_WS_X11)
{sipName_QX11EmbedWidget, &sipType_QX11EmbedWidget, -1, 58},
#else
{0, 0, -1, 58},
#endif
{sipName_QFocusFrame, &sipType_QFocusFrame, -1, 59},
{sipName_QDialog, &sipType_QDialog, 108, 60},
#if QT_VERSION >= 0x040200
{sipName_QDialogButtonBox, &sipType_QDialogButtonBox, -1, 61},
#else
{0, 0, -1, 61},
#endif
{sipName_QMainWindow, &sipType_QMainWindow, -1, 62},
{sipName_QAbstractSlider, &sipType_QAbstractSlider, 120, 63},
#if QT_VERSION >= 0x040200
{sipName_QCalendarWidget, &sipType_QCalendarWidget, -1, 64},
#else
{0, 0, -1, 64},
#endif
#if defined(SIP_FEATURE_PyQt_SizeGrip)
{sipName_QSizeGrip, &sipType_QSizeGrip, -1, 65},
#else
{0, 0, -1, 65},
#endif
{sipName_QStatusBar, &sipType_QStatusBar, -1, 66},
{sipName_QProgressBar, &sipType_QProgressBar, -1, 67},
#if QT_VERSION >= 0x040300
{sipName_QMdiSubWindow, &sipType_QMdiSubWindow, -1, 68},
#else
{0, 0, -1, 68},
#endif
{sipName_QTabWidget, &sipType_QTabWidget, -1, 69},
{sipName_QSplashScreen, &sipType_QSplashScreen, -1, 70},
#if QT_VERSION >= 0x040300
{sipName_QWizardPage, &sipType_QWizardPage, -1, 71},
#else
{0, 0, -1, 71},
#endif
{sipName_QWorkspace, &sipType_QWorkspace, -1, 72},
{sipName_QDockWidget, &sipType_QDockWidget, -1, 73},
{sipName_QMenuBar, &sipType_QMenuBar, -1, 74},
{sipName_QTabBar, &sipType_QTabBar, -1, -1},
{sipName_QDoubleSpinBox, &sipType_QDoubleSpinBox, -1, 76},
{sipName_QSpinBox, &sipType_QSpinBox, -1, 77},
{sipName_QDateTimeEdit, &sipType_QDateTimeEdit, 78, -1},
{sipName_QTimeEdit, &sipType_QTimeEdit, -1, 79},
{sipName_QDateEdit, &sipType_QDateEdit, -1, -1},
#if QT_VERSION >= 0x040200
{sipName_QFontComboBox, &sipType_QFontComboBox, -1, -1},
#else
{0, 0, -1, -1},
#endif
{sipName_QLabel, &sipType_QLabel, -1, 82},
{sipName_QAbstractScrollArea, &sipType_QAbstractScrollArea, 87, 83},
{sipName_QToolBox, &sipType_QToolBox, -1, 84},
{sipName_QStackedWidget, &sipType_QStackedWidget, -1, 85},
{sipName_QLCDNumber, &sipType_QLCDNumber, -1, 86},
{sipName_QSplitter, &sipType_QSplitter, -1, -1},
#if QT_VERSION >= 0x040200
{sipName_QGraphicsView, &sipType_QGraphicsView, -1, 88},
#else
{0, 0, -1, 88},
#endif
{sipName_QTextEdit, &sipType_QTextEdit, 93, 89},
{sipName_QAbstractItemView, &sipType_QAbstractItemView, 94, 90},
{sipName_QScrollArea, &sipType_QScrollArea, -1, 91},
#if QT_VERSION >= 0x040400
{sipName_QPlainTextEdit, &sipType_QPlainTextEdit, -1, 92},
#else
{0, 0, -1, 92},
#endif
#if QT_VERSION >= 0x040300
{sipName_QMdiArea, &sipType_QMdiArea, -1, -1},
#else
{0, 0, -1, -1},
#endif
{sipName_QTextBrowser, &sipType_QTextBrowser, -1, -1},
{sipName_QHeaderView, &sipType_QHeaderView, -1, 95},
{sipName_QTableView, &sipType_QTableView, 99, 96},
{sipName_QListView, &sipType_QListView, 100, 97},
{sipName_QTreeView, &sipType_QTreeView, 102, 98},
#if QT_VERSION >= 0x040300
{sipName_QColumnView, &sipType_QColumnView, -1, -1},
#else
{0, 0, -1, -1},
#endif
{sipName_QTableWidget, &sipType_QTableWidget, -1, -1},
{sipName_QListWidget, &sipType_QListWidget, -1, 101},
#if QT_VERSION >= 0x040200
{sipName_QUndoView, &sipType_QUndoView, -1, -1},
#else
{0, 0, -1, -1},
#endif
{sipName_QTreeWidget, &sipType_QTreeWidget, -1, -1},
{sipName_QCheckBox, &sipType_QCheckBox, -1, 104},
{sipName_QPushButton, &sipType_QPushButton, 107, 105},
{sipName_QRadioButton, &sipType_QRadioButton, -1, 106},
{sipName_QToolButton, &sipType_QToolButton, -1, -1},
#if QT_VERSION >= 0x040400
{sipName_QCommandLinkButton, &sipType_QCommandLinkButton, -1, -1},
#else
{0, 0, -1, -1},
#endif
{sipName_QErrorMessage, &sipType_QErrorMessage, -1, 109},
{sipName_QFontDialog, &sipType_QFontDialog, -1, 110},
{sipName_QFileDialog, &sipType_QFileDialog, -1, 111},
{sipName_QColorDialog, &sipType_QColorDialog, -1, 112},
{sipName_QInputDialog, &sipType_QInputDialog, -1, 113},
#if QT_VERSION >= 0x040300
{sipName_QWizard, &sipType_QWizard, -1, 114},
#else
{0, 0, -1, 114},
#endif
#if defined(SIP_FEATURE_PyQt_Printer)
{sipName_QAbstractPrintDialog, &sipType_QAbstractPrintDialog, 119, 115},
#else
{0, 0, 119, 115},
#endif
{sipName_QMessageBox, &sipType_QMessageBox, -1, 116},
#if defined(SIP_FEATURE_PyQt_PrintDialog)
{sipName_QPageSetupDialog, &sipType_QPageSetupDialog, -1, 117},
#else
{0, 0, -1, 117},
#endif
{sipName_QProgressDialog, &sipType_QProgressDialog, -1, 118},
#if QT_VERSION >= 0x040400 && defined(SIP_FEATURE_PyQt_PrintPreviewDialog)
{sipName_QPrintPreviewDialog, &sipType_QPrintPreviewDialog, -1, -1},
#else
{0, 0, -1, -1},
#endif
#if defined(SIP_FEATURE_PyQt_PrintDialog)
{sipName_QPrintDialog, &sipType_QPrintDialog, -1, -1},
#else
{0, 0, -1, -1},
#endif
{sipName_QDial, &sipType_QDial, -1, 121},
{sipName_QScrollBar, &sipType_QScrollBar, -1, 122},
{sipName_QSlider, &sipType_QSlider, -1, -1},
#if QT_VERSION >= 0x040600
{sipName_QSwipeGesture, &sipType_QSwipeGesture, -1, 124},
#else
{0, 0, -1, 124},
#endif
#if QT_VERSION >= 0x040600
{sipName_QPinchGesture, &sipType_QPinchGesture, -1, 125},
#else
{0, 0, -1, 125},
#endif
#if QT_VERSION >= 0x040600
{sipName_QTapAndHoldGesture, &sipType_QTapAndHoldGesture, -1, 126},
#else
{0, 0, -1, 126},
#endif
#if QT_VERSION >= 0x040600
{sipName_QTapGesture, &sipType_QTapGesture, -1, 127},
#else
{0, 0, -1, 127},
#endif
#if QT_VERSION >= 0x040600
{sipName_QPanGesture, &sipType_QPanGesture, -1, -1},
#else
{0, 0, -1, -1},
#endif
{sipName_QSortFilterProxyModel, &sipType_QSortFilterProxyModel, -1, 129},
#if QT_VERSION >= 0x040800
{sipName_QIdentityProxyModel, &sipType_QIdentityProxyModel, -1, -1},
#else
{0, 0, -1, -1},
#endif
#if QT_VERSION >= 0x040200
{sipName_QWidgetAction, &sipType_QWidgetAction, -1, -1},
#else
{0, 0, -1, -1},
#endif
#if QT_VERSION >= 0x040400
{sipName_QGraphicsWidget, &sipType_QGraphicsWidget, 133, 132},
#else
{0, 0, 133, 132},
#endif
#if QT_VERSION >= 0x040200
{sipName_QGraphicsTextItem, &sipType_QGraphicsTextItem, -1, -1},
#else
{0, 0, -1, -1},
#endif
#if QT_VERSION >= 0x040400
{sipName_QGraphicsProxyWidget, &sipType_QGraphicsProxyWidget, -1, -1},
#else
{0, 0, -1, -1},
#endif
#if QT_VERSION >= 0x040600
{sipName_QGraphicsColorizeEffect, &sipType_QGraphicsColorizeEffect, -1, 135},
#else
{0, 0, -1, 135},
#endif
#if QT_VERSION >= 0x040600
{sipName_QGraphicsDropShadowEffect, &sipType_QGraphicsDropShadowEffect, -1, 136},
#else
{0, 0, -1, 136},
#endif
#if QT_VERSION >= 0x040600
{sipName_QGraphicsBlurEffect, &sipType_QGraphicsBlurEffect, -1, 137},
#else
{0, 0, -1, 137},
#endif
#if QT_VERSION >= 0x040600
{sipName_QGraphicsOpacityEffect, &sipType_QGraphicsOpacityEffect, -1, -1},
#else
{0, 0, -1, -1},
#endif
{sipName_QStackedLayout, &sipType_QStackedLayout, -1, 139},
#if QT_VERSION >= 0x040400
{sipName_QFormLayout, &sipType_QFormLayout, -1, 140},
#else
{0, 0, -1, 140},
#endif
{sipName_QGridLayout, &sipType_QGridLayout, -1, 141},
{sipName_QBoxLayout, &sipType_QBoxLayout, 142, -1},
{sipName_QHBoxLayout, &sipType_QHBoxLayout, -1, 143},
{sipName_QVBoxLayout, &sipType_QVBoxLayout, -1, -1},
{sipName_QRegExpValidator, &sipType_QRegExpValidator, -1, 145},
{sipName_QIntValidator, &sipType_QIntValidator, -1, 146},
{sipName_QDoubleValidator, &sipType_QDoubleValidator, -1, -1},
{sipName_QCommonStyle, &sipType_QCommonStyle, -1, -1},
{sipName_QItemDelegate, &sipType_QItemDelegate, -1, 149},
#if QT_VERSION >= 0x040400
{sipName_QStyledItemDelegate, &sipType_QStyledItemDelegate, -1, -1},
#else
{0, 0, -1, -1},
#endif
{sipName_QTextBlockGroup, &sipType_QTextBlockGroup, 152, 151},
{sipName_QTextFrame, &sipType_QTextFrame, 153, -1},
{sipName_QTextList, &sipType_QTextList, -1, -1},
{sipName_QTextTable, &sipType_QTextTable, -1, -1},
#if QT_VERSION >= 0x040600
{sipName_QGraphicsRotation, &sipType_QGraphicsRotation, -1, 155},
#else
{0, 0, -1, 155},
#endif
#if QT_VERSION >= 0x040600
{sipName_QGraphicsScale, &sipType_QGraphicsScale, -1, -1},
#else
{0, 0, -1, -1},
#endif
};
int i = 0;
sipType = NULL;
do
{
struct class_graph *cg = &graph[i];
if (cg->name != NULL && sipCpp->inherits(cg->name))
{
sipType = *cg->type;
i = cg->yes;
}
else
i = cg->no;
}
while (i >= 0);
%End
public:
QApplication(SIP_PYLIST argv /DocType="list-of-str"/) /PostHook=__pyQtQAppHook__/ [(int &argc, char **argv)];
%MethodCode
// The Python interface is a list of argument strings that is modified.
int argc;
char **argv;
// Convert the list.
if ((argv = qpycore_ArgvToC(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);
Py_END_ALLOW_THREADS
// Now modify the original list.
qpycore_UpdatePyArgv(a0, argc, argv);
}
%End
QApplication(SIP_PYLIST argv /DocType="list-of-str"/, bool GUIenabled) /PostHook=__pyQtQAppHook__/ [(int &argc, char **argv, bool GUIenabled)];
%MethodCode
// The Python interface is a list of argument strings that is modified.
int argc;
char **argv;
// Convert the list.
if ((argv = qpycore_ArgvToC(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, a1);
Py_END_ALLOW_THREADS
// Now modify the original list.
qpycore_UpdatePyArgv(a0, argc, argv);
}
%End
enum Type
{
Tty,
GuiClient,
GuiServer,
};
QApplication(SIP_PYLIST argv /DocType="list-of-str"/, QApplication::Type /Constrained/) /PostHook=__pyQtQAppHook__/ [(int &argc, char **argv, QApplication::Type)];
%MethodCode
// The Python interface is a list of argument strings that is modified.
int argc;
char **argv;
// Convert the list.
if ((argv = qpycore_ArgvToC(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, a1);
Py_END_ALLOW_THREADS
// Now modify the original list.
qpycore_UpdatePyArgv(a0, argc, argv);
}
%End
%If (WS_X11)
QApplication(Display *display, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0) /PostHook=__pyQtQAppHook__/;
%End
%If (WS_X11)
QApplication(Display *dpy, SIP_PYLIST argv /DocType="list-of-str"/, Qt::HANDLE visual = 0, Qt::HANDLE cmap = 0) /PostHook=__pyQtQAppHook__/ [(Display *display, int &argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0)];
%MethodCode
// The Python interface is a list of argument strings that is modified.
int argc;
char **argv;
// Convert the list.
if ((argv = qpycore_ArgvToC(a1, argc)) == NULL)
sipIsErr = 1;
else
{
// Create it now the arguments are right.
static int nargc;
nargc = argc;
Py_BEGIN_ALLOW_THREADS
sipCpp = new sipQApplication(a0, nargc, argv, a2, a3);
Py_END_ALLOW_THREADS
// Now modify the original list.
qpycore_UpdatePyArgv(a1, argc, argv);
}
%End
%End
virtual ~QApplication();
%MethodCode
// Make sure all top level widgets are not owned by Python and so won't be
// destroyed by the garbage collector after QApplication is destroyed.
QWidgetList tlw = QApplication::topLevelWidgets();
for (int i = 0; i < tlw.count(); ++i)
{
PyObject *sw = sipGetPyObject(tlw.at(i), sipType_QWidget);
if (sw)
sipTransferTo(sw, 0);
}
// Handle all other QObject instances that we want to make sure are deleted
// before the QApplication is deleted.
qtgui_delete_tracked();
%End
static QApplication::Type type();
static QStyle *style();
static void setStyle(QStyle * /Transfer/);
static QStyle *setStyle(const QString &);
enum ColorSpec
{
NormalColor,
CustomColor,
ManyColor,
};
static int colorSpec();
static void setColorSpec(int);
static QCursor *overrideCursor();
static void setOverrideCursor(const QCursor &);
static void changeOverrideCursor(const QCursor &);
static void restoreOverrideCursor();
static QPalette palette();
static QPalette palette(const QWidget *);
static QPalette palette(const char *className);
static void setPalette(const QPalette &palette, const char *className = 0);
%If (- Qt_4_2_0)
static QFont font(const QWidget *widget = 0);
%End
static void setFont(const QFont &font, const char *className = 0);
static QFontMetrics fontMetrics();
static void setWindowIcon(const QIcon &icon);
static QIcon windowIcon();
static QWidgetList allWidgets();
static QWidgetList topLevelWidgets();
static QDesktopWidget *desktop();
static QWidget *activePopupWidget();
static QWidget *activeModalWidget();
static QClipboard *clipboard();
static QWidget *focusWidget();
static QWidget *activeWindow();
static void setActiveWindow(QWidget *act);
static QWidget *widgetAt(const QPoint &p);
static QWidget *widgetAt(int x, int y);
static QWidget *topLevelAt(const QPoint &p);
static QWidget *topLevelAt(int x, int y);
static void syncX();
static void beep();
static Qt::KeyboardModifiers keyboardModifiers();
static Qt::MouseButtons mouseButtons();
static void setDesktopSettingsAware(bool);
static bool desktopSettingsAware();
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 setGlobalStrut(const QSize &);
static QSize globalStrut();
static void setStartDragTime(int ms);
static int startDragTime();
static void setStartDragDistance(int l);
static int startDragDistance();
static void setLayoutDirection(Qt::LayoutDirection direction);
static Qt::LayoutDirection layoutDirection();
static bool isRightToLeft();
static bool isLeftToRight();
static bool isEffectEnabled(Qt::UIEffect);
static void setEffectEnabled(Qt::UIEffect effect, bool enabled = true);
%If (WS_X11)
virtual bool x11EventFilter(XEvent *);
%End
%If (WS_X11)
int x11ProcessEvent(XEvent *);
%End
%If (PyQt_SessionManager)
bool isSessionRestored() const;
%End
%If (PyQt_SessionManager)
QString sessionId() const;
%End
%If (PyQt_SessionManager)
QString sessionKey() const;
%End
%If (PyQt_SessionManager)
virtual void commitData(QSessionManager &sm);
%End
%If (PyQt_SessionManager)
virtual void saveState(QSessionManager &sm);
%End
void setInputContext(QInputContext * /Transfer/);
QInputContext *inputContext() const;
static int exec() /PostHook=__pyQtPostEventLoopHook__,PreHook=__pyQtPreEventLoopHook__,PyName=exec_,ReleaseGIL/;
%If (Py_v3)
static int exec() /PostHook=__pyQtPostEventLoopHook__,PreHook=__pyQtPreEventLoopHook__,ReleaseGIL/;
%End
virtual bool notify(QObject *, QEvent *) /ReleaseGIL/;
static void setQuitOnLastWindowClosed(bool quit);
static bool quitOnLastWindowClosed();
signals:
%If (Qt_4_2_0 -)
%If (PyQt_SessionManager)
void commitDataRequest(QSessionManager &sessionManager);
%End
%End
void focusChanged(QWidget *old, QWidget *now);
void lastWindowClosed();
%If (Qt_4_2_0 -)
%If (PyQt_SessionManager)
void saveStateRequest(QSessionManager &sessionManager);
%End
%End
%If (Qt_4_5_0 -)
void fontDatabaseChanged();
%End
public slots:
static void aboutQt();
static void closeAllWindows();
%If (Qt_4_2_0 -)
void setStyleSheet(const QString &sheet);
%End
protected:
virtual bool event(QEvent *);
public:
%If (Qt_4_2_0 -)
static QFont font();
%End
%If (Qt_4_2_0 -)
static QFont font(const QWidget *);
%End
%If (Qt_4_2_0 -)
static QFont font(const char *className);
%End
%If (Qt_4_2_0 -)
static QLocale keyboardInputLocale();
%End
%If (Qt_4_2_0 -)
static Qt::LayoutDirection keyboardInputDirection();
%End
%If (Qt_4_2_0 -)
QString styleSheet() const;
%End
%If (Qt_4_3_0 -)
static void alert(QWidget *widget, int msecs = 0) /ReleaseGIL/;
%End
%If (Qt_4_5_0 -)
static void setGraphicsSystem(const QString &);
%End
public slots:
%If (Qt_4_6_0 -)
void setAutoSipEnabled(const bool enabled);
%End
public:
%If (Qt_4_6_0 -)
bool autoSipEnabled() const;
%End
%If (Qt_4_8_0 -)
static Qt::KeyboardModifiers queryKeyboardModifiers();
%End
private:
QApplication(const QApplication &);
};
%ModuleHeaderCode
// Used to track QObject instances that must be explicitly destroyed before the
// QApplication instance is destroyed. Typically these are instances that
// sometimes don't have a parent (and are not QWidgets).
void qtgui_track(QObject *o);
void qtgui_untrack(QObject *o);
void qtgui_delete_tracked();
extern char **(*qpycore_ArgvToC)(PyObject *, int &);
extern void (*qpycore_UpdatePyArgv)(PyObject *, int, char **);
extern const char *(*qpycore_pyqtsignal_get_parts)(PyObject *, QObject **);
%End
%ModuleCode
// Symbols imported from the QtCore module.
char **(*qpycore_ArgvToC)(PyObject *, int &);
void (*qpycore_UpdatePyArgv)(PyObject *, int, char **);
const char *(*qpycore_pyqtsignal_get_parts)(PyObject *, QObject **);
// Forward declarations of the low level exported functions.
#if defined(Q_WS_X11)
void qt_x11_wait_for_window_manager(QWidget *widget);
#endif
#if defined(Q_WS_MAC)
void qt_set_sequence_auto_mnemonic(bool enable);
void qt_mac_secure_keyboard(bool enable);
void qt_mac_set_dock_menu(QMenu *menu);
void qt_mac_set_menubar_icons(bool enable);
void qt_mac_set_menubar_merge(bool enable);
void qt_mac_set_native_menubar(bool enable);
void qt_mac_set_press_and_hold_context(bool enable);
#endif
// These are the implementations of the functions that handle object tracking.
#include <QObjectCleanupHandler>
QObjectCleanupHandler *qtgui_cleanup_handler = 0;
void qtgui_track(QObject *o)
{
if (!qtgui_cleanup_handler)
qtgui_cleanup_handler = new QObjectCleanupHandler;
qtgui_cleanup_handler->add(o);
}
void qtgui_untrack(QObject *o)
{
// Note that we specifically untrack a tracked object rather than let Qt
// detect the object being destroyed and doing it itself. This is done to
// work around a problem in threaded applications.
if (qtgui_cleanup_handler)
qtgui_cleanup_handler->remove(o);
}
void qtgui_delete_tracked()
{
if (qtgui_cleanup_handler)
{
// Watch out for recursive calls (which should never happen).
QObjectCleanupHandler *hnd = qtgui_cleanup_handler;
qtgui_cleanup_handler = 0;
Py_BEGIN_ALLOW_THREADS
delete hnd;
Py_END_ALLOW_THREADS
}
}
%End
%PostInitialisationCode
// Import helpers from the QtCore module.
qpycore_ArgvToC = (char **(*)(PyObject *, int &))sipImportSymbol("qpycore_ArgvToC");
qpycore_UpdatePyArgv = (void (*)(PyObject *, int, char **))sipImportSymbol("qpycore_UpdatePyArgv");
qpycore_pyqtsignal_get_parts = (const char *(*)(PyObject *, QObject **))sipImportSymbol("qpycore_pyqtsignal_get_parts");
%End
|