4 Bacula(R) - The Network Backup Solution
6 Copyright (C) 2000-2015 Kern Sibbald
7 Copyright (C) 2007-2014 Free Software Foundation Europe e.V.
9 The original author of Bacula is Kern Sibbald, with contributions
10 from many others, a complete list can be found in the file AUTHORS.
12 You may use this file and others of this release according to the
13 license defined in the LICENSE file, which includes the Affero General
14 Public License, v3.0 ("AGPLv3") and some additional permissions and
15 terms pursuant to its AGPLv3 Section 7.
17 This notice must be preserved when any source code is
18 conveyed and/or propagated.
20 Bacula(R) is a registered trademark of Kern Sibbald.
23 * Dirk Bartley, March 2007
28 #include "ui_jobplotcontrols.h"
30 #include <qwt_legend.h>
31 #include <qwt_plot_curve.h>
33 #include <qwt_plot_marker.h>
34 #include <qwt_plot_curve.h>
35 #include <qwt_symbol.h>
36 #include <qwt_scale_map.h>
37 #include <qwt_scale_draw.h>
41 * Structure to hold data items of jobs when and how much.
42 * If I worked at it I could eliminate this. It's just the way it evolved.
52 * Class for the purpose of having a single object to pass data to the JobPlot
53 * Constructor. The other option was a constructor with this many passed
54 * values or some sort of code to parse a list. I liked this best at the time.
60 JobPlotPass& operator=(const JobPlotPass&);
62 Qt::CheckState recordLimitCheck;
63 Qt::CheckState daysLimitCheck;
76 * Class to Change the display of the time scale to display dates.
78 class DateTimeScaleDraw : public QwtScaleDraw
81 virtual QwtText label(double v) const
83 QDateTime dtlabel(QDateTime::fromTime_t((uint)v));
84 return dtlabel.toString("M-d-yy");
89 * These are the user interface control widgets as a separate class.
90 * Separately for the purpos of having the controls in a Scroll Area.
92 class JobPlotControls : public QWidget, public Ui::JobPlotControlsForm
103 class JobPlot : public Pages
108 JobPlot(QTreeWidgetItem *parentTreeWidgetItem, JobPlotPass &);
110 virtual void currentStackItem();
113 void setPlotType(QString);
114 void setFileSymbolType(int);
115 void setByteSymbolType(int);
116 void fileCheckChanged(int);
117 void byteCheckChanged(int);
121 void fillSymbolCombo(QComboBox *q);
122 void setSymbolType(int, int type);
124 void writeSettings();
125 void readSplitterSettings();
126 void readControlSettings();
127 void setupControls();
131 JobPlotControls* controls;
132 QList<PlotJobData *> m_pjd;
133 QwtPlotCurve *m_fileCurve;
134 QwtPlotCurve *m_byteCurve;
135 /* from the user interface before using scroll area */
136 void setupUserInterface();
137 QGridLayout *m_gridLayout;
138 QSplitter *m_splitter;
142 #endif /* _JOBPLOT_H_ */