MAK Data Logger API Documentation for DIS
Home
Modules
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
libsrc
lgrGui
lgrZoomableWidget.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 1992-2010 VT MAK
3
** All rights reserved.
4
******************************************************************************/
5
8
9
#ifndef lgrZoomableWidget_H_
10
#define lgrZoomableWidget_H_
11
12
#include "
lgrGui.h
"
13
#include "
qtFloatMath.h
"
14
15
#include <QtGui/QWidget>
16
17
class
QRectF;
18
class
QPoint;
19
class
QRect;
20
21
namespace
MAKLogger
22
{
23
class
DtLgrGuiModel;
24
26
class
DT_DLL_LGRGUI
DtLgrZoomableWidget
:
public
QWidget
27
{
28
Q_OBJECT
29
30
public
:
31
33
DtLgrZoomableWidget
(
QWidget
* parent);
34
36
virtual
~
DtLgrZoomableWidget
();
37
40
QRectF scaledViewport(QRect orignalViewport,QPoint margins)
const
;
41
43
void
drawCursor(QPainter& painter,
double
firstVisibleTime,
44
double
lastVisibleTime,
double
cursorTime,
int
xOffset,
bool
active);
45
47
QRect cursorBounds(
double
firstVisibleTime,
double
lastVisibleTime,
48
double
cursorTime,
int
xOffset);
49
51
double
firstVisibleTime(
double
firstTime,
double
lastTime)
const
;
52
54
double
firstVisibleTime(
DtLgrGuiModel
& model)
const
;
55
57
double
lastVisibleTime(
double
firstTime,
double
lastTime)
const
;
58
60
double
lastVisibleTime(
DtLgrGuiModel
& model)
const
;
61
64
float
leftOffset
()
const
{
return
myLeftOffset; };
65
68
float
rightOffset
()
const
{
return
myRightOffset; };
69
71
float
horizontalMargin()
const
;
72
74
void
setHorizontalMargin(
float
margin);
75
76
77
// Called in paint to set the the time use to check if a update is required.
78
void
setDrawTimes(
DtLgrGuiModel
& model);
79
80
public
slots:
81
virtual
void
setOffsets(
float
left,
float
right);
82
83
virtual
void
testForUpdate(
DtLgrGuiModel
& model);
84
85
signals:
86
void
offsetsChanged(
float
left,
float
right);
87
88
protected
:
89
float
myLeftOffset
;
90
float
myRightOffset
;
91
float
myHorizontalMargin
;
92
double
myDrawnFirstVisibleTime
;
93
double
myDrawnLastVisibleTime
;
94
double
myDrawnCurrentVisibleTime
;
95
};
96
97
}
98
99
#endif
Document ID: Generated on Sun Dec 15 18:04:30 EST 2013 from SVN revision 134418
Copyright © 2005-2012 VT MÄK. All Rights Reserved (
www.mak.com
)