4 Bacula® - The Network Backup Solution
6 Copyright (C) 2007-2014 Free Software Foundation Europe e.V.
8 The main author of Bacula is Kern Sibbald, with contributions from many
9 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 Bacula® is a registered trademark of Kern Sibbald.
21 * Dirk Bartley, March 2007
26 #include "ui_jobplotcontrols.h"
28 #include <qwt_legend.h>
29 #include <qwt_plot_curve.h>
31 #include <qwt_plot_marker.h>
32 #include <qwt_plot_curve.h>
33 #include <qwt_symbol.h>
34 #include <qwt_scale_map.h>
35 #include <qwt_scale_draw.h>
39 * Structure to hold data items of jobs when and how much.
40 * If I worked at it I could eliminate this. It's just the way it evolved.
50 * Class for the purpose of having a single object to pass data to the JobPlot
51 * Constructor. The other option was a constructor with this many passed
52 * values or some sort of code to parse a list. I liked this best at the time.
58 JobPlotPass& operator=(const JobPlotPass&);
60 Qt::CheckState recordLimitCheck;
61 Qt::CheckState daysLimitCheck;
74 * Class to Change the display of the time scale to display dates.
76 class DateTimeScaleDraw : public QwtScaleDraw
79 virtual QwtText label(double v) const
81 QDateTime dtlabel(QDateTime::fromTime_t((uint)v));
82 return dtlabel.toString("M-d-yy");
87 * These are the user interface control widgets as a separate class.
88 * Separately for the purpos of having the controls in a Scroll Area.
90 class JobPlotControls : public QWidget, public Ui::JobPlotControlsForm
101 class JobPlot : public Pages
106 JobPlot(QTreeWidgetItem *parentTreeWidgetItem, JobPlotPass &);
108 virtual void currentStackItem();
111 void setPlotType(QString);
112 void setFileSymbolType(int);
113 void setByteSymbolType(int);
114 void fileCheckChanged(int);
115 void byteCheckChanged(int);
119 void fillSymbolCombo(QComboBox *q);
120 void setSymbolType(int, int type);
122 void writeSettings();
123 void readSplitterSettings();
124 void readControlSettings();
125 void setupControls();
129 JobPlotControls* controls;
130 QList<PlotJobData *> m_pjd;
131 QwtPlotCurve *m_fileCurve;
132 QwtPlotCurve *m_byteCurve;
133 /* from the user interface before using scroll area */
134 void setupUserInterface();
135 QGridLayout *m_gridLayout;
136 QSplitter *m_splitter;
140 #endif /* _JOBPLOT_H_ */