ctkCommandLineModuleAppLogic_p.h 2.5 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 CTKCOMMANDLINEMODULEAPPLOGIC_P_H
  16. #define CTKCOMMANDLINEMODULEAPPLOGIC_P_H
  17. // Qt includes
  18. #include <QUuid>
  19. // CTK includes
  20. #include <ctkDicomAbstractApp.h>
  21. #include <ctkDicomHostInterface.h>
  22. #include <ctkCmdLineModuleManager.h>
  23. #include <ctkServiceTracker.h>
  24. // ui of this application
  25. #include "ui_ctkCommandLineModuleAppWidget.h"
  26. struct ctkDicomHostInterface;
  27. class ctkCmdLineModuleInstance;
  28. class QWidget;
  29. class ctkCommandLineModuleAppLogic : public ctkDicomAbstractApp
  30. {
  31. Q_OBJECT
  32. Q_INTERFACES(ctkDicomAppInterface)
  33. public:
  34. ctkCommandLineModuleAppLogic(const QString & modulelocation);
  35. virtual ~ctkCommandLineModuleAppLogic();
  36. // ctkDicomAppInterface
  37. /**
  38. * Method triggered by the host. By calling this method, the Hosting System is asking the Hosted Application to take whatever steps are
  39. * needed to make its GUI visible as the topmost window, and to gain focus.
  40. * \return TRUE if the Hosted Application received the request and will act on it. Otherwise it returns FALSE
  41. */
  42. virtual bool bringToFront(const QRect& requestedScreenArea);
  43. // some logic
  44. /** Test function for checking */
  45. void do_something();
  46. protected Q_SLOTS:
  47. void onStartProgress();
  48. void onResumeProgress();
  49. void onSuspendProgress();
  50. void onCancelProgress();
  51. void onExitHostedApp();
  52. void onReleaseResources();
  53. void onLoadDataClicked();
  54. void onCreateSecondaryCapture();
  55. void onDataAvailable();
  56. private:
  57. QWidget * AppWidget;
  58. Ui::ctkCommandLineModuleAppWidget ui;
  59. QString ModuleLocation;
  60. ctkCmdLineModuleManager ModuleManager;
  61. ctkCmdLineModuleInstance* ModuleInstance;
  62. QString OutputLocation;
  63. ctkDicomAppHosting::AvailableData* ResultData;
  64. }; // ctkCommandLineModuleAppLogic
  65. #endif // CTKCOMMANDLINEMODULEAPPLOGIC_P_H