Medical Imaging Interaction Toolkit  2018.4.99-1640525a
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 (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef MITKSTATUSBAR_H
14 #define MITKSTATUSBAR_H
16 #include <MitkCoreExports.h>
17 #include <itkObject.h>
18 #include <mitkPoint.h>
19 #include <itkIndex.h>
20 
21 namespace mitk
22 {
23  //##Documentation
24  //## @brief Sending a message to the applications StatusBar
25  //##
26  //## Holds a GUI dependent StatusBarImplementation and sends the text further.
27  //## nearly equal to itk::OutputWindow,
28  //## no Window, but one line of text and a delay for clear.
29  //## all mitk-classes use this class to display text on GUI-StatusBar.
30  //## The mainapplication has to set the internal held StatusBarImplementation with SetInstance(..).
31  //## @ingroup Interaction
32  class MITKCORE_EXPORT StatusBar : public itk::Object
33  {
34  public:
35  itkTypeMacro(StatusBar, itk::Object);
36 
37  //##Documentation
38  //## @brief static method to get the GUI dependent StatusBar-instance
39  //## so the methods DisplayText, etc. can be called
40  //## No reference counting, cause of decentral static use!
41  static StatusBar *GetInstance();
42 
43  //##Documentation
44  //## @brief Supply a GUI- dependent StatusBar. Has to be set by the application
45  //## to connect the application dependent subclass of mitkStatusBar
46  //## if you create an instance, then call ->Delete() on the supplied
47  //## instance after setting it.
48  static void SetImplementation(StatusBarImplementation *instance);
49 
50  //##Documentation
51  //## @brief Send a string to the applications StatusBar
52  void DisplayText(const char *t);
53  //##Documentation
54  //## @brief Send a string with a time delay to the applications StatusBar
55  void DisplayText(const char *t, int ms);
56  void DisplayErrorText(const char *t);
57  void DisplayWarningText(const char *t);
58  void DisplayWarningText(const char *t, int ms);
59  void DisplayGenericOutputText(const char *t);
60  void DisplayDebugText(const char *t);
61  void DisplayGreyValueText(const char *t);
62 
63  //##Documentation
64  //## @brief Display position, index, time and pixel value
65  void DisplayImageInfo(mitk::Point3D point, itk::Index<3> index, mitk::ScalarType time, mitk::ScalarType pixelValue);
66  //## @brief Display rotation, index, time and custom pixel value
67  void DisplayImageInfo(mitk::Point3D point, itk::Index<3> index, mitk::ScalarType time, const char *pixelValue);
68  //##Documentation
69  //## @brief Display placeholder text for invalid information
70  void DisplayImageInfoInvalid();
71 
72  //##Documentation
73  //## @brief removes any temporary message being shown.
74  void Clear();
75 
76  //##Documentation
77  //## @brief Set the SizeGrip of the window
78  //## (the triangle in the lower right Windowcorner for changing the size)
79  //## to enabled or disabled
80  void SetSizeGripEnabled(bool enable);
81 
82  protected:
83  StatusBar();
84  ~StatusBar() override;
85 
88  };
89 
90 } // end namespace mitk
91 #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:86
static StatusBar * m_Instance
Definition: mitkStatusBar.h:87
Sending a message to the applications StatusBar.
Definition: mitkStatusBar.h:32