4 Bacula(R) - The Network Backup Solution
6 Copyright (C) 2000-2016 Kern Sibbald
8 The original author of Bacula is Kern Sibbald, with contributions
9 from many others, a complete list can be found in the file AUTHORS.
11 You may use this file and others of this release according to the
12 license defined in the LICENSE file, which includes the Affero General
13 Public License, v3.0 ("AGPLv3") and some additional permissions and
14 terms pursuant to its AGPLv3 Section 7.
16 This notice must be preserved when any source code is
17 conveyed and/or propagated.
19 Bacula(R) is a registered trademark of Kern Sibbald.
22 * Dirk Bartley, March 2007
25 #if QT_VERSION >= 0x050000
31 #include "ui_jobplotcontrols.h"
33 #include <qwt_legend.h>
34 #include <qwt_plot_curve.h>
36 #include <qwt_plot_marker.h>
37 #include <qwt_plot_curve.h>
38 #include <qwt_symbol.h>
39 #include <qwt_scale_map.h>
40 #include <qwt_scale_draw.h>
44 * Structure to hold data items of jobs when and how much.
45 * If I worked at it I could eliminate this. It's just the way it evolved.
55 * Class for the purpose of having a single object to pass data to the JobPlot
56 * Constructor. The other option was a constructor with this many passed
57 * values or some sort of code to parse a list. I liked this best at the time.
63 JobPlotPass& operator=(const JobPlotPass&);
65 Qt::CheckState recordLimitCheck;
66 Qt::CheckState daysLimitCheck;
79 * Class to Change the display of the time scale to display dates.
81 class DateTimeScaleDraw : public QwtScaleDraw
84 virtual QwtText label(double v) const
86 QDateTime dtlabel(QDateTime::fromTime_t((uint)v));
87 return dtlabel.toString("M-d-yy");
92 * These are the user interface control widgets as a separate class.
93 * Separately for the purpos of having the controls in a Scroll Area.
95 class JobPlotControls : public QWidget, public Ui::JobPlotControlsForm
106 class JobPlot : public Pages
111 JobPlot(QTreeWidgetItem *parentTreeWidgetItem, JobPlotPass &);
113 virtual void currentStackItem();
116 void setPlotType(QString);
117 void setFileSymbolType(int);
118 void setByteSymbolType(int);
119 void fileCheckChanged(int);
120 void byteCheckChanged(int);
124 void fillSymbolCombo(QComboBox *q);
125 void setSymbolType(int, int type);
127 void writeSettings();
128 void readSplitterSettings();
129 void readControlSettings();
130 void setupControls();
134 JobPlotControls* controls;
135 QList<PlotJobData *> m_pjd;
136 QwtPlotCurve *m_fileCurve;
137 QwtPlotCurve *m_byteCurve;
138 /* from the user interface before using scroll area */
139 void setupUserInterface();
140 QGridLayout *m_gridLayout;
141 QSplitter *m_splitter;
145 #endif /* _JOBPLOT_H_ */