qdatawidgetmapper.sip 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // qdatawidgetmapper.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 QDataWidgetMapper : public QObject
  22. {
  23. %TypeHeaderCode
  24. #include <qdatawidgetmapper.h>
  25. %End
  26. public:
  27. enum SubmitPolicy
  28. {
  29. AutoSubmit,
  30. ManualSubmit,
  31. };
  32. explicit QDataWidgetMapper(QObject *parent /TransferThis/ = 0);
  33. virtual ~QDataWidgetMapper();
  34. void setModel(QAbstractItemModel *model /KeepReference/);
  35. QAbstractItemModel *model() const;
  36. void setItemDelegate(QAbstractItemDelegate *delegate /KeepReference/);
  37. QAbstractItemDelegate *itemDelegate() const;
  38. void setRootIndex(const QModelIndex &index);
  39. QModelIndex rootIndex() const;
  40. void setOrientation(Qt::Orientation aOrientation);
  41. Qt::Orientation orientation() const;
  42. void setSubmitPolicy(QDataWidgetMapper::SubmitPolicy policy);
  43. QDataWidgetMapper::SubmitPolicy submitPolicy() const;
  44. void addMapping(QWidget *widget, int section);
  45. void addMapping(QWidget *widget, int section, const QByteArray &propertyName);
  46. void removeMapping(QWidget *widget);
  47. QByteArray mappedPropertyName(QWidget *widget) const;
  48. int mappedSection(QWidget *widget) const;
  49. QWidget *mappedWidgetAt(int section) const;
  50. void clearMapping();
  51. int currentIndex() const;
  52. public slots:
  53. void revert();
  54. virtual void setCurrentIndex(int index);
  55. void setCurrentModelIndex(const QModelIndex &index);
  56. bool submit();
  57. void toFirst();
  58. void toLast();
  59. void toNext();
  60. void toPrevious();
  61. signals:
  62. void currentIndexChanged(int index);
  63. };