docs: describe the pmdaroot process interfaces
[pcp.git] / src / pmchart / timeaxis.h
blob87a3108487ef964fe1bf9e185c2c021d3e93a903
1 /*
2 * Copyright (c) 2007, Aconex. All Rights Reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * for more details.
14 #ifndef TIMEAXIS_H
15 #define TIMEAXIS_H
17 #include <qwt_plot_canvas.h>
18 #include <qwt_plot_layout.h>
19 #include <qwt_plot.h>
20 #include <QResizeEvent>
22 class Tab;
24 class TimeAxis : public QwtPlot
26 Q_OBJECT
27 public:
28 TimeAxis(QWidget *);
30 void init();
31 void resetFont();
32 void clearScaleCache();
33 double scaleValue(double delta, int count);
34 double delta(void) { return my.delta; }
35 double points(void) { return my.points; }
36 void noArchiveSources();
37 void print(QPainter *, QRect &, bool);
39 protected:
40 void resizeEvent(QResizeEvent *);
42 private:
43 struct {
44 int points;
45 double delta;
46 double scale;
47 } my;
50 #endif /* TIMEAXIS_H */