CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
ctkDicomAbstractApp.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  Library: CTK
4 
5  Copyright (c) German Cancer Research Center,
6  Division of Medical and Biological Informatics
7 
8  Licensed under the Apache License, Version 2.0 (the "License");
9  you may not use this file except in compliance with the License.
10  You may obtain a copy of the License at
11 
12  http://www.apache.org/licenses/LICENSE-2.0
13 
14  Unless required by applicable law or agreed to in writing, software
15  distributed under the License is distributed on an "AS IS" BASIS,
16  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  See the License for the specific language governing permissions and
18  limitations under the License.
19 
20 =============================================================================*/
21 
22 #ifndef CTKDICOMABSTRACTAPP_H
23 #define CTKDICOMABSTRACTAPP_H
24 
26 #include <ctkDicomAppInterface.h>
27 #include <QScopedPointer>
28 #include <org_commontk_dah_hostedapp_Export.h>
29 
30 class ctkDicomAbstractAppPrivate;
32 class ctkPluginContext;
34 
35 #ifdef _MSC_VER
36 // disable inheritance by dominance warnings
37 #pragma warning( disable : 4250 )
38 #endif
39 
49 class org_commontk_dah_hostedapp_EXPORT ctkDicomAbstractApp : public ctkDicomAbstractExchangeCache, public ctkDicomAppInterface
50 {
51  Q_OBJECT
52  Q_INTERFACES(ctkDicomAppInterface)
53 
54 public:
55 
62 
67  virtual ~ctkDicomAbstractApp();
68 
69 
79  virtual bool setState(ctkDicomAppHosting::State newState);
80 
87 
93  virtual ctkDicomHostInterface* getHostInterface() const;
94 
96 
102  void setInternalState(ctkDicomAppHosting::State state);
103 
104 Q_SIGNALS:
111  void startProgress();
112 
119  void resumeProgress();
120 
127  void suspendProgress();
128 
138  void cancelProgress();
139 
147  void exitHostedApp();
148 
155  void releaseResources();
156 
157 private:
158  Q_DECLARE_PRIVATE(ctkDicomAbstractApp)
159  const QScopedPointer<ctkDicomAbstractAppPrivate> d_ptr;
160 };
161 
162 #endif // CTKDICOMABSTRACTAPP_H
virtual ctkDicomExchangeInterface * getOtherSideExchangeService() const =0
Gets the exchange service of the other side.
Provides a basic implementation for an application app.
virtual ctkDicomAppHosting::State getState()=0
virtual bool setState(ctkDicomAppHosting::State newState)=0
Provides a basic convenience methods for the data exchange.