4 Bacula® - The Network Backup Solution
6 Copyright (C) 2007-2007 Free Software Foundation Europe e.V.
8 The main author of Bacula is Kern Sibbald, with contributions from
9 many others, a complete list can be found in the file AUTHORS.
10 This program is Free Software; you can redistribute it and/or
11 modify it under the terms of version two of the GNU General Public
12 License as published by the Free Software Foundation and included
15 This program is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 Bacula® is a registered trademark of John Walker.
26 The licensor of Bacula is the Free Software Foundation Europe
27 (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
28 Switzerland, email:ftf@fsfeurope.org.
33 * Dirk Bartley, March 2007
38 #include "ui_jobplotcontrols.h"
40 #include <qwt_legend.h>
41 #include <qwt_plot_curve.h>
43 #include <qwt_plot_marker.h>
44 #include <qwt_plot_curve.h>
45 #include <qwt_symbol.h>
46 #include <qwt_scale_map.h>
47 #include <qwt_scale_draw.h>
51 * Structure to hold data items of jobs when and how much.
52 * If I worked at it I could eliminate this. It's just the way it evolved.
62 * Class for the purpose of having a single object to pass data to the JobPlot
63 * Constructor. The other option was a constructor with this many passed
64 * values or some sort of code to parse a list. I liked this best at the time.
70 JobPlotPass& operator=(const JobPlotPass&);
72 Qt::CheckState recordLimitCheck;
73 Qt::CheckState daysLimitCheck;
86 * Class to Change the display of the time scale to display dates.
88 class DateTimeScaleDraw : public QwtScaleDraw
91 virtual QwtText label(double v) const
93 QDateTime dtlabel(QDateTime::fromTime_t((uint)v));
94 return dtlabel.toString("M-d-yy");
99 * These are the user interface control widgets as a separate class.
100 * Separately for the purpos of having the controls in a Scroll Area.
102 class JobPlotControls : public QWidget, public Ui::JobPlotControlsForm
113 class JobPlot : public Pages
118 JobPlot(QTreeWidgetItem *parentTreeWidgetItem, JobPlotPass &);
120 virtual void currentStackItem();
123 void setPlotType(QString);
124 void setFileSymbolType(int);
125 void setByteSymbolType(int);
126 void fileCheckChanged(int);
127 void byteCheckChanged(int);
131 void setSymbolType(int, int type);
133 void writeSettings();
134 void readSplitterSettings();
135 void readControlSettings();
136 void setupControls();
140 JobPlotControls* controls;
141 QList<PlotJobData *> m_pjd;
142 QwtPlotCurve *m_fileCurve;
143 QwtPlotCurve *m_byteCurve;
144 /* from the user interface before using scroll area */
145 void setupUserInterface();
146 QGridLayout *m_gridLayout;
147 QSplitter *m_splitter;
151 #endif /* _JOBPLOT_H_ */