Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkStatusBar.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef MITKSTATUSBAR_H
18 #define MITKSTATUSBAR_H
20 #include <MitkCoreExports.h>
21 #include <itkObject.h>
22 #include <mitkPoint.h>
23 #include <itkIndex.h>
24 
25 namespace mitk
26 {
27  //##Documentation
28  //## @brief Sending a message to the applications StatusBar
29  //##
30  //## Holds a GUI dependent StatusBarImplementation and sends the text further.
31  //## nearly equal to itk::OutputWindow,
32  //## no Window, but one line of text and a delay for clear.
33  //## all mitk-classes use this class to display text on GUI-StatusBar.
34  //## The mainapplication has to set the internal held StatusBarImplementation with SetInstance(..).
35  //## @ingroup Interaction
36  class MITKCORE_EXPORT StatusBar : public itk::Object
37  {
38  public:
39  itkTypeMacro(StatusBar, itk::Object);
40 
41  //##Documentation
42  //## @brief static method to get the GUI dependent StatusBar-instance
43  //## so the methods DisplayText, etc. can be called
44  //## No reference counting, cause of decentral static use!
45  static StatusBar *GetInstance();
46 
47  //##Documentation
48  //## @brief Supply a GUI- dependent StatusBar. Has to be set by the application
49  //## to connect the application dependent subclass of mitkStatusBar
50  //## if you create an instance, then call ->Delete() on the supplied
51  //## instance after setting it.
52  static void SetImplementation(StatusBarImplementation *instance);
53 
54  //##Documentation
55  //## @brief Send a string to the applications StatusBar
56  void DisplayText(const char *t);
57  //##Documentation
58  //## @brief Send a string with a time delay to the applications StatusBar
59  void DisplayText(const char *t, int ms);
60  void DisplayErrorText(const char *t);
61  void DisplayWarningText(const char *t);
62  void DisplayWarningText(const char *t, int ms);
63  void DisplayGenericOutputText(const char *t);
64  void DisplayDebugText(const char *t);
65  void DisplayGreyValueText(const char *t);
66 
67  //##Documentation
68  //## @brief Display position, index, time and pixel value
69  void DisplayImageInfo(mitk::Point3D point, itk::Index<3> index, mitk::ScalarType time, mitk::ScalarType pixelValue);
70  //## @brief Display rotation, index, time and custom pixel value
71  void DisplayImageInfo(mitk::Point3D point, itk::Index<3> index, mitk::ScalarType time, const char *pixelValue);
72  //##Documentation
73  //## @brief Display placeholder text for invalid information
74  void DisplayImageInfoInvalid();
75 
76  //##Documentation
77  //## @brief removes any temporary message being shown.
78  void Clear();
79 
80  //##Documentation
81  //## @brief Set the SizeGrip of the window
82  //## (the triangle in the lower right Windowcorner for changing the size)
83  //## to enabled or disabled
84  void SetSizeGripEnabled(bool enable);
85 
86  protected:
87  StatusBar();
88  virtual ~StatusBar();
89 
92  };
93 
94 } // end namespace mitk
95 #endif /* define MITKSTATUSBAR_H */
#define MITKCORE_EXPORT
double ScalarType
DataCollection - Class to facilitate loading/accessing structured data.
GUI indepentent Interface for all Gui depentent implementations of a StatusBar.
static StatusBarImplementation * m_Implementation
Definition: mitkStatusBar.h:90
static StatusBar * m_Instance
Definition: mitkStatusBar.h:91
Sending a message to the applications StatusBar.
Definition: mitkStatusBar.h:36