qprogressdialog.sip 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. // qprogressdialog.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtWidgets Python extension module.
  4. //
  5. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. //
  7. // This file is part of PyQt6.
  8. //
  9. // This file may be used under the terms of the GNU General Public License
  10. // version 3.0 as published by the Free Software Foundation and appearing in
  11. // the file LICENSE included in the packaging of this file. Please review the
  12. // following information to ensure the GNU General Public License version 3.0
  13. // requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  14. //
  15. // If you do not wish to use this file under the terms of the GPL version 3.0
  16. // then you may purchase a commercial license. For more information contact
  17. // info@riverbankcomputing.com.
  18. //
  19. // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  20. // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21. class QProgressDialog : public QDialog
  22. {
  23. %TypeHeaderCode
  24. #include <qprogressdialog.h>
  25. %End
  26. public:
  27. QProgressDialog(QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags());
  28. QProgressDialog(const QString &labelText, const QString &cancelButtonText, int minimum, int maximum, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags());
  29. virtual ~QProgressDialog();
  30. void setLabel(QLabel *label /Transfer/);
  31. void setCancelButton(QPushButton *button /Transfer/);
  32. void setBar(QProgressBar *bar /Transfer/);
  33. bool wasCanceled() const;
  34. int minimum() const;
  35. int maximum() const;
  36. void setRange(int minimum, int maximum);
  37. int value() const;
  38. virtual QSize sizeHint() const;
  39. QString labelText() const;
  40. int minimumDuration() const;
  41. void setAutoReset(bool b);
  42. bool autoReset() const;
  43. void setAutoClose(bool b);
  44. bool autoClose() const;
  45. public slots:
  46. void cancel();
  47. void reset();
  48. void setMaximum(int maximum);
  49. void setMinimum(int minimum);
  50. void setValue(int progress);
  51. void setLabelText(const QString &);
  52. void setCancelButtonText(const QString &);
  53. void setMinimumDuration(int ms);
  54. signals:
  55. void canceled();
  56. protected:
  57. virtual void resizeEvent(QResizeEvent *);
  58. virtual void closeEvent(QCloseEvent *);
  59. virtual void changeEvent(QEvent *);
  60. virtual void showEvent(QShowEvent *e);
  61. void forceShow();
  62. public:
  63. void open();
  64. void open(SIP_PYOBJECT slot /TypeHint="PYQT_SLOT"/);
  65. %MethodCode
  66. QObject *receiver;
  67. QByteArray slot_signature;
  68. if ((sipError = pyqt6_qtwidgets_get_connection_parts(a0, sipCpp, "()", false, &receiver, slot_signature)) == sipErrorNone)
  69. {
  70. sipCpp->open(receiver, slot_signature.constData());
  71. }
  72. else if (sipError == sipErrorContinue)
  73. {
  74. sipError = sipBadCallableArg(0, a0);
  75. }
  76. %End
  77. };