ctkExampleDicomAppLogic_p.h 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /*=============================================================================
  2. Library: CTK
  3. Copyright (c) German Cancer Research Center,
  4. Division of Medical and Biological Informatics
  5. Licensed under the Apache License, Version 2.0 (the "License");
  6. you may not use this file except in compliance with the License.
  7. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. =============================================================================*/
  15. #ifndef CTKEXAMPLEDICOMAPPLOGIC_P_H
  16. #define CTKEXAMPLEDICOMAPPLOGIC_P_H
  17. // Qt includes
  18. #include <QUuid>
  19. // CTK includes
  20. #include <ctkDicomAbstractApp.h>
  21. #include <ctkDicomHostInterface.h>
  22. #include <ctkServiceTracker.h>
  23. // ui of this application
  24. #include "ui_ctkExampleDicomAppWidget.h"
  25. struct ctkDicomHostInterface;
  26. class QWidget;
  27. class ctkExampleDicomAppLogic : public ctkDicomAbstractApp
  28. {
  29. Q_OBJECT
  30. Q_INTERFACES(ctkDicomAppInterface)
  31. public:
  32. ctkExampleDicomAppLogic();
  33. virtual ~ctkExampleDicomAppLogic();
  34. // ctkDicomAppInterface
  35. /**
  36. * Method triggered by the host. By calling this method, the Hosting System is asking the Hosted Application to take whatever steps are
  37. * needed to make its GUI visible as the topmost window, and to gain focus.
  38. * \return TRUE if the Hosted Application received the request and will act on it. Otherwise it returns FALSE
  39. */
  40. virtual bool bringToFront(const QRect& requestedScreenArea);
  41. // ctkDicomExchangeInterface
  42. /**
  43. * The source of the data calls this method with descriptions of the available data that it can provide to the
  44. * recipient. If the source of the data expects that additional data will become available, it shall pass FALSE
  45. * in the lastData parameter. Otherwise, it shall pass TRUE.
  46. * \return TRUE if the recipient of the data successfully received the AvailableData list.
  47. */
  48. virtual bool notifyDataAvailable(const ctkDicomAppHosting::AvailableData& data, bool lastData);
  49. // some logic
  50. /** Test function for checking */
  51. void do_something();
  52. protected slots:
  53. void onStartProgress();
  54. void onResumeProgress();
  55. void onSuspendProgress();
  56. void onCancelProgress();
  57. void onExitHostedApp();
  58. void onReleaseResources();
  59. void onLoadDataClicked();
  60. void onCreateSecondaryCapture();
  61. private:
  62. QWidget * AppWidget;
  63. Ui::ctkExampleDicomAppWidget ui;
  64. QUuid uuid;
  65. ctkDicomAppHosting::AvailableData* ResultData;
  66. }; // ctkExampleDicomAppLogic
  67. #endif // ctkExampleDicomAppLogic_P_H