ctkDICOMTableManager.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*=========================================================================
  2. Library: CTK
  3. Copyright (c) Kitware Inc.
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0.txt
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. =========================================================================*/
  14. #ifndef CTKDICOMTABLEMANAGER_H
  15. #define CTKDICOMTABLEMANAGER_H
  16. #include "ctkDICOMWidgetsExport.h"
  17. #include "ctkDICOMDatabase.h"
  18. // Qt includes
  19. #include <QWidget>
  20. #include <QSharedPointer>
  21. class ctkDICOMTableManagerPrivate;
  22. class ctkDICOMDatabase;
  23. class QItemSelection;
  24. /// \ingroup DICOM_Widgets
  25. class ctkDICOMTableManager : public QWidget
  26. {
  27. Q_OBJECT
  28. public:
  29. typedef QWidget Superclass;
  30. explicit ctkDICOMTableManager(QWidget* parent = 0);
  31. ctkDICOMTableManager(ctkDICOMDatabase* db, QWidget* parent = 0);
  32. virtual ~ctkDICOMTableManager();
  33. /**
  34. * @brief Set the ctkDICOMDatabase
  35. * @param db the dicom database which should be used
  36. */
  37. void setCTKDICOMDatabase(ctkDICOMDatabase* db);
  38. /**
  39. * Property for setting the table layout either to vertical or horizontal alignment
  40. */
  41. Q_PROPERTY(Qt::Orientation tableOrientation READ tableOrientation WRITE setTableOrientation)
  42. void setTableOrientation(const Qt::Orientation&);
  43. Qt::Orientation tableOrientation();
  44. /**
  45. * @brief Deletes the selected row from the database
  46. */
  47. void deleteSelectedRows();
  48. Q_SIGNALS:
  49. // Signals for propagating selection changes of the different tables
  50. void patientsSelectionChanged(const QItemSelection&, const QItemSelection&);
  51. void studiesSelectionChanged(const QItemSelection&, const QItemSelection&);
  52. void seriesSelectionChanged(const QItemSelection&, const QItemSelection&);
  53. void patientsSelectionChanged(const QStringList &uids);
  54. void studiesSelectionChanged(const QStringList &uids);
  55. void seriesSelectionChanged(const QStringList &uids);
  56. protected:
  57. QScopedPointer<ctkDICOMTableManagerPrivate> d_ptr;
  58. private:
  59. Q_DECLARE_PRIVATE(ctkDICOMTableManager)
  60. Q_DISABLE_COPY(ctkDICOMTableManager)
  61. };
  62. #endif // CTKDICOMTABLEMANAGER_H