Medical Imaging Interaction Toolkit
2024.06.00
Medical Imaging Interaction Toolkit
QmitkScalarBar.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 QmitkScalarBar_h
14
#define QmitkScalarBar_h
15
16
#include <
MitkQtOverlaysExports.h
>
17
#include <
mitkCommon.h
>
18
19
#include <QPen>
20
#include <QWidget>
21
22
class
MITKQTOVERLAYS_EXPORT
QmitkScalarBar
:
public
QWidget
23
{
24
Q_OBJECT
25
public
:
26
enum
alignment
27
{
28
vertical = 0,
29
horizontal = 1
30
};
31
35
QmitkScalarBar
(QWidget *parent =
nullptr
);
36
40
~
QmitkScalarBar
()
override
;
41
42
virtual
void
SetScaleFactor(
double
scale);
43
44
virtual
void
SetAlignment(alignment align);
45
46
void
SetPen(
const
QPen &pen);
47
48
void
SetNumberOfSubdivisions(
unsigned
int
subs);
49
50
unsigned
int
GetNumberOfSubdivisions();
51
52
protected
:
53
void
paintEvent(QPaintEvent *event)
override
;
54
55
void
SetupGeometry(alignment align);
56
57
void
CleanUpLines();
58
// void moveEvent(QMoveEvent*);
59
60
alignment
m_Alignment
;
61
62
double
m_ScaleFactor
;
63
64
QLine *
m_MainLine
;
65
66
std::vector<QLine *>
m_SubDivisionLines
;
67
68
QPen
m_Pen
;
69
70
unsigned
int
m_NumberOfSubDivisions
;
71
};
72
73
#endif
MitkQtOverlaysExports.h
QmitkScalarBar::m_Alignment
alignment m_Alignment
Definition:
QmitkScalarBar.h:60
QmitkScalarBar::m_Pen
QPen m_Pen
Definition:
QmitkScalarBar.h:68
QmitkScalarBar::alignment
alignment
Definition:
QmitkScalarBar.h:26
QmitkScalarBar::m_SubDivisionLines
std::vector< QLine * > m_SubDivisionLines
Definition:
QmitkScalarBar.h:66
QmitkScalarBar
Definition:
QmitkScalarBar.h:22
QmitkScalarBar::m_NumberOfSubDivisions
unsigned int m_NumberOfSubDivisions
Definition:
QmitkScalarBar.h:70
QmitkScalarBar::m_ScaleFactor
double m_ScaleFactor
Definition:
QmitkScalarBar.h:62
mitkCommon.h
QmitkScalarBar::m_MainLine
QLine * m_MainLine
Definition:
QmitkScalarBar.h:64
MITKQTOVERLAYS_EXPORT
#define MITKQTOVERLAYS_EXPORT
Definition:
MitkQtOverlaysExports.h:15
src
MITK
Modules
QtOverlays
QmitkScalarBar.h
Generated on Mon Jun 17 2024 12:43:31 for Medical Imaging Interaction Toolkit by
1.8.17