qCTKDCMTK.h 957 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef __qCTKDCMTK_h
  2. #define __qCTKDCMTK_h
  3. // QT includes
  4. #include <QObject>
  5. #include <QSqlDatabase>
  6. // qCTK includes
  7. #include <ctkPimpl.h>
  8. #include "CTKDICOMCoreExport.h"
  9. class qCTKDCMTKPrivate;
  10. class Q_CTK_DICOM_CORE_EXPORT qCTKDCMTK : public QObject
  11. {
  12. Q_OBJECT
  13. public:
  14. typedef QObject Superclass;
  15. explicit qCTKDCMTK(QObject* parent = 0);
  16. virtual ~qCTKDCMTK();
  17. ///
  18. /// open the SQLite database in @param file. If the file does not
  19. /// exist, a new database is created and initialized with the
  20. /// default schema
  21. virtual bool openDatabase(const QString& file);
  22. const QSqlDatabase& database() const;
  23. const QString& GetLastError() const;
  24. ///
  25. /// close the database. It must not be used afterwards.
  26. void closeDatabase();
  27. ///
  28. /// delete all data and reinitialize the database.
  29. bool initializeDatabase(const char* schemaFile = ":/dicom/dicom-schema.sql");
  30. private:
  31. QCTK_DECLARE_PRIVATE(qCTKDCMTK);
  32. };
  33. #endif