![]() |
CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
|
Provides a basic implementation for an application app. More...
#include <Plugins/org.commontk.dah.hostedapp/ctkDicomAbstractApp.h>
Signals | |
void | cancelProgress () |
ctkDicomAppHosting::CANCELED state received. More... | |
void | exitHostedApp () |
ctkDicomAppHosting::EXIT state received and legal. More... | |
void | releaseResources () |
ctkDicomAppHosting::IDLE state received and legal. More... | |
void | resumeProgress () |
ctkDicomAppHosting::INPROGRESS state received when the app is in the ctkDicomAppHosting::SUSPENDED state. More... | |
void | startProgress () |
ctkDicomAppHosting::INPROGRESS state received and legal. More... | |
void | suspendProgress () |
ctkDicomAppHosting::SUSPENDED state received. More... | |
![]() | |
void | dataAvailable () |
void | internalDataAvailable () |
Public Member Functions | |
ctkDicomAbstractApp (ctkPluginContext *context) | |
virtual ctkDicomHostInterface * | getHostInterface () const |
Gets a handle to the host, in order to call methods on it. More... | |
ctkDicomExchangeInterface * | getOtherSideExchangeService () const |
Gets the exchange service of the other side. More... | |
virtual ctkDicomAppHosting::State | getState () |
Sends the current state the app is in to the hosting system. More... | |
void | setInternalState (ctkDicomAppHosting::State state) |
Sets the internal representation of the current state. More... | |
virtual bool | setState (ctkDicomAppHosting::State newState) |
Method triggered by the host. Changes the state of the hosted application. More... | |
virtual | ~ctkDicomAbstractApp () |
![]() | |
void | cleanIncomingData () |
Clean internal data stucture that keeps the incoming data. More... | |
ctkDicomAbstractExchangeCache () | |
Construct object. More... | |
virtual QList< ctkDicomAppHosting::ObjectLocator > | getData (const QList< QUuid > &objectUUIDs, const QList< QString > &acceptableTransferSyntaxUIDs, bool includeBulkData) |
Provide ctkDicomAppHosting::ObjectLocators to the other side. More... | |
const ctkDicomAppHosting::AvailableData & | getIncomingAvailableData () const |
Return the incoming available data. More... | |
bool | lastIncomingData () const |
Return whether the incoming data was marked as lastData. More... | |
bool | notifyDataAvailable (const ctkDicomAppHosting::AvailableData &data, bool lastData) |
Receive notification from other side. More... | |
ctkDicomObjectLocatorCache * | objectLocatorCache () const |
Return the cache for outgoing data. More... | |
bool | publishData (const ctkDicomAppHosting::AvailableData &availableData, bool lastData) |
Publish data to other side. More... | |
void | releaseData (const QList< QUuid > &objectUUIDs) |
virtual | ~ctkDicomAbstractExchangeCache () |
Destructor. More... | |
![]() | |
virtual | ~ctkDicomExchangeInterface () |
![]() | |
virtual bool | bringToFront (const QRect &requestedScreenArea)=0 |
Provides a basic implementation for an application app.
The methods of the ctkDicomAppInterface have to be implemented for the business logic.
Definition at line 49 of file ctkDicomAbstractApp.h.
ctkDicomAbstractApp::ctkDicomAbstractApp | ( | ctkPluginContext * | context | ) |
context |
|
virtual |
|
signal |
ctkDicomAppHosting::CANCELED state received.
The CANCELED state is particular because it leads to ctkDicomAppHosting::IDLE when the app has canceled the process. Therefore the notification the app entered this CANCELED state is sent straight away by the setState method.
The slot connected to this signal MUST NOT notify CANCELED, but MUST notify IDLE when the resources have been released.
|
signal |
ctkDicomAppHosting::EXIT state received and legal.
An EXIT notification is sent by setState, no communication with the hosting system is needed anymore. A slot connected to this should stop the application process for good.
|
virtual |
Gets a handle to the host, in order to call methods on it.
|
virtual |
Gets the exchange service of the other side.
If we are a host, this must return the exchange service of the hosted app and vice versa.
Implements ctkDicomAbstractExchangeCache.
|
virtual |
Sends the current state the app is in to the hosting system.
Implements ctkDicomAppInterface.
|
signal |
ctkDicomAppHosting::IDLE state received and legal.
It means the current state was COMPLETED, and it is now time to release the resources, the hosting system doesn't need them any more.
|
signal |
ctkDicomAppHosting::INPROGRESS state received when the app is in the ctkDicomAppHosting::SUSPENDED state.
Corresponding slot responsible for calling getHostInterface()->notifyStateChanged(ctkDicomAppHosting::INPROGRESS); when resumed.
void ctkDicomAbstractApp::setInternalState | ( | ctkDicomAppHosting::State | state | ) |
Sets the internal representation of the current state.
state |
|
virtual |
Method triggered by the host. Changes the state of the hosted application.
Goes through the transitions and emits signals when relevant to trigger actions. Checks for the legality of a transition.
newState |
Implements ctkDicomAppInterface.
|
signal |
ctkDicomAppHosting::INPROGRESS state received and legal.
the slot connected to this is responsible for notifying the hosting service that it is really in progress by a call to getHostInterface()->notifyStateChanged(ctkDicomAppHosting::INPROGRESS);
|
signal |
ctkDicomAppHosting::SUSPENDED state received.
Corresponding slot responsible for calling getHostInterface()->notifyStateChanged(ctkDicomAppHosting::SUSPENDED); when resources have been released.