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 
68 
69 
79  virtual bool setState(ctkDicomAppHosting::State newState);
80 
87 
94 
96 
103 
104 Q_SIGNALS:
112 
120 
128 
139 
148 
156 
157 private:
158  Q_DECLARE_PRIVATE(ctkDicomAbstractApp)
159  const QScopedPointer<ctkDicomAbstractAppPrivate> d_ptr;
160 };
161 
162 #endif // CTKDICOMABSTRACTAPP_H
Provides a basic implementation for an application app.
ctkDicomAbstractApp(ctkPluginContext *context)
virtual bool setState(ctkDicomAppHosting::State newState)
Method triggered by the host. Changes the state of the hosted application.
void suspendProgress()
ctkDicomAppHosting::SUSPENDED state received.
virtual ~ctkDicomAbstractApp()
void exitHostedApp()
ctkDicomAppHosting::EXIT state received and legal.
virtual ctkDicomAppHosting::State getState()
Sends the current state the app is in to the hosting system.
void resumeProgress()
ctkDicomAppHosting::INPROGRESS state received when the app is in the ctkDicomAppHosting::SUSPENDED st...
virtual ctkDicomHostInterface * getHostInterface() const
Gets a handle to the host, in order to call methods on it.
ctkDicomExchangeInterface * getOtherSideExchangeService() const
Gets the exchange service of the other side.
void setInternalState(ctkDicomAppHosting::State state)
Sets the internal representation of the current state.
void cancelProgress()
ctkDicomAppHosting::CANCELED state received.
void startProgress()
ctkDicomAppHosting::INPROGRESS state received and legal.
void releaseResources()
ctkDicomAppHosting::IDLE state received and legal.
Provides a basic convenience methods for the data exchange.