qhelpenginecore.sip 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. // qhelpenginecore.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtHelp 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 QHelpEngineCore : public QObject
  22. {
  23. %TypeHeaderCode
  24. #include <qhelpenginecore.h>
  25. %End
  26. %ConvertToSubClassCode
  27. static struct class_graph {
  28. const char *name;
  29. sipTypeDef **type;
  30. int yes, no;
  31. } graph[] = {
  32. {sipName_QHelpContentModel, &sipType_QHelpContentModel, -1, 1},
  33. {sipName_QHelpContentWidget, &sipType_QHelpContentWidget, -1, 2},
  34. {sipName_QHelpEngineCore, &sipType_QHelpEngineCore, 11, 3},
  35. {sipName_QHelpFilterEngine, &sipType_QHelpFilterEngine, -1, 4},
  36. {sipName_QHelpFilterSettingsWidget, &sipType_QHelpFilterSettingsWidget, -1, 5},
  37. {sipName_QHelpIndexModel, &sipType_QHelpIndexModel, -1, 6},
  38. {sipName_QHelpIndexWidget, &sipType_QHelpIndexWidget, -1, 7},
  39. {sipName_QHelpSearchEngine, &sipType_QHelpSearchEngine, -1, 8},
  40. #if QT_VERSION >= 0x060800
  41. {sipName_QHelpSearchEngineCore, &sipType_QHelpSearchEngineCore, -1, 9},
  42. #else
  43. {0, 0, -1, 9},
  44. #endif
  45. {sipName_QHelpSearchQueryWidget, &sipType_QHelpSearchQueryWidget, -1, 10},
  46. {sipName_QHelpSearchResultWidget, &sipType_QHelpSearchResultWidget, -1, -1},
  47. {sipName_QHelpEngine, &sipType_QHelpEngine, -1, -1},
  48. };
  49. int i = 0;
  50. sipType = NULL;
  51. do
  52. {
  53. struct class_graph *cg = &graph[i];
  54. if (cg->name != NULL && sipCpp->inherits(cg->name))
  55. {
  56. sipType = *cg->type;
  57. i = cg->yes;
  58. }
  59. else
  60. i = cg->no;
  61. }
  62. while (i >= 0);
  63. %End
  64. public:
  65. QHelpEngineCore(const QString &collectionFile, QObject *parent /TransferThis/ = 0);
  66. virtual ~QHelpEngineCore();
  67. bool setupData();
  68. QString collectionFile() const;
  69. void setCollectionFile(const QString &fileName);
  70. bool copyCollectionFile(const QString &fileName);
  71. static QString namespaceName(const QString &documentationFileName);
  72. bool registerDocumentation(const QString &documentationFileName);
  73. bool unregisterDocumentation(const QString &namespaceName);
  74. QString documentationFileName(const QString &namespaceName);
  75. QStringList registeredDocumentations() const;
  76. QUrl findFile(const QUrl &url) const;
  77. QByteArray fileData(const QUrl &url) const;
  78. bool removeCustomValue(const QString &key);
  79. QVariant customValue(const QString &key, const QVariant &defaultValue = QVariant()) const;
  80. bool setCustomValue(const QString &key, const QVariant &value);
  81. static QVariant metaData(const QString &documentationFileName, const QString &name);
  82. QString error() const;
  83. bool autoSaveFilter() const;
  84. void setAutoSaveFilter(bool save);
  85. signals:
  86. void setupStarted();
  87. void setupFinished();
  88. void warning(const QString &msg);
  89. public:
  90. QHelpFilterEngine *filterEngine() const;
  91. QList<QUrl> files(const QString namespaceName, const QString &filterName, const QString &extensionFilter = QString());
  92. void setUsesFilterEngine(bool uses);
  93. bool usesFilterEngine() const;
  94. QList<QHelpLink> documentsForIdentifier(const QString &id) const;
  95. QList<QHelpLink> documentsForIdentifier(const QString &id, const QString &filterName) const;
  96. QList<QHelpLink> documentsForKeyword(const QString &keyword) const;
  97. QList<QHelpLink> documentsForKeyword(const QString &keyword, const QString &filterName) const;
  98. bool isReadOnly() const;
  99. void setReadOnly(bool enable);
  100. };