Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
berryGeometry.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 
14 #ifndef BERRYGEOMETRY_H_
15 #define BERRYGEOMETRY_H_
16 
18 
19 class QRect;
20 class QPoint;
21 class QWidget;
22 
23 namespace berry {
24 
26 {
27 
36  static int GetDimension(const QRect& toMeasure, bool width);
37 
47  static bool IsHorizontal(int berrySideConstant);
48 
62  static QRect GetExtrudedEdge(const QRect& toExtrude, int size,
63  int orientation);
64 
73  static void Normalize(QRect& rect);
74 
85  static int GetClosestSide(const QRect& boundary, const QPoint& toTest);
86 
97  static int GetDistanceFromEdge(const QRect& rectangle, const QPoint& testPoint,
98  int edgeOfInterest);
99 
108  static int GetOppositeSide(int directionConstant);
109 
119  static QRect ToControl(QWidget* coordinateSystem,
120  const QRect& toConvert);
121 
131  static QPoint ToControl(QWidget* coordinateSystem,
132  const QPoint& toConvert);
133 
143  static QRect ToDisplay(QWidget* coordinateSystem,
144  const QRect& toConvert);
145 
155  static QPoint ToDisplay(QWidget* coordinateSystem,
156  const QPoint& toConvert);
157 
158 };
159 
160 }
161 
162 #endif /* BERRYGEOMETRY_H_ */
berry::Geometry
Definition: berryGeometry.h:25
org_blueberry_ui_qt_Export.h
BERRY_UI_QT
#define BERRY_UI_QT
Definition: org_blueberry_ui_qt_Export.h:26
berry
Definition: QmitkPropertyItemModel.h:24