~ubuntu-branches/ubuntu/wily/ginkgocadx/wily-proposed

« back to all changes in this revision

Viewing changes to src/cadxcore/export/contracts/iwidgetscontract.cpp

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2014-01-09 07:37:09 UTC
  • mfrom: (1.2.3)
  • Revision ID: package-import@ubuntu.com-20140109073709-rpuh5x3p3finvtze
Tags: 3.6.0.1228.33+dfsg-1
New upstream release [December 2013]

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
*
12
12
*/
13
13
#include "iwidgetscontract.h"
 
14
#include <api/icontexto.h>
 
15
#include <api/iwidgetsrenderer.h>
 
16
#include <api/iwidgetsmanager.h>
 
17
#include <api/ivista.h>
 
18
#include <api/istudycontext.h>
 
19
 
14
20
GNC::GCS::IWidgetsContract::IWidgetsContract()
15
21
{
16
22
}
27
33
bool GNC::GCS::IWidgetsContract::Inicializado()
28
34
{
29
35
        return ( (GetManager() != NULL) && (GetViewerActivo() != NULL) );
 
36
}
 
37
 
 
38
//Anotation section
 
39
//this method processes special keys like: ${VOLUME.IDX} ${SLICE.WIDTH}...
 
40
std::string GNC::GCS::IWidgetsContract::GetAnnotationValue(GNC::GCS::Contexto3D* c, const std::string& key)
 
41
{
 
42
        return GetTagValue(c, key);
 
43
}
 
44
 
 
45
//return dicom tag value from key
 
46
std::string GNC::GCS::IWidgetsContract::GetTagValue(GNC::GCS::Contexto3D* /*c*/, const std::string& key)
 
47
{
 
48
        GNC::GCS::IWidgetsManager* pManager = GetManager();
 
49
        if (pManager != NULL) {
 
50
                std::string value;
 
51
                if (pManager->GetVista()->GetEstudio()->GetTagActiveImage(key, value)) {
 
52
                        return value;
 
53
                }
 
54
        } 
 
55
        return "";
30
56
}
 
 
b'\\ No newline at end of file'