28 #ifndef dooble_charts_h
29 #define dooble_charts_h
31 #ifdef DOOBLE_QTCHARTS_PRESENT
33 #if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
34 using namespace QtCharts;
41 #include "ui_dooble_charts.h"
59 CHART_ANIMATION_DURATION = 0,
60 CHART_ANIMATION_OPTIONS,
61 CHART_BACKGROUND_COLOR,
62 CHART_BACKGROUND_ROUNDNESS,
63 CHART_BACKGROUND_VISIBLE,
65 CHART_DROP_SHADOW_ENABLED,
67 CHART_LOCALIZE_NUMBERS,
74 CHART_PLOT_AREA_BACKGROUND_VISIBLE,
84 CHART_AXIS_X_ALIGNMENT_HORIZONTAL,
85 CHART_AXIS_X_ALIGNMENT_VERTICAL,
87 CHART_AXIS_X_GRID_LINE_COLOR,
88 CHART_AXIS_X_GRID_VISIBLE,
89 CHART_AXIS_X_LABELS_ANGLE,
90 CHART_AXIS_X_LABELS_COLOR,
91 CHART_AXIS_X_LABELS_FONT,
92 CHART_AXIS_X_LABELS_VISIBLE,
93 CHART_AXIS_X_LINE_VISIBLE,
94 CHART_AXIS_X_MINOR_GRID_LINE_COLOR,
95 CHART_AXIS_X_MINOR_GRID_LINE_VISIBLE,
96 CHART_AXIS_X_ORIENTATION,
98 CHART_AXIS_X_SHADES_BORDER_COLOR,
99 CHART_AXIS_X_SHADES_COLOR,
100 CHART_AXIS_X_SHADES_VISIBLE,
101 CHART_AXIS_X_TITLE_COLOR,
102 CHART_AXIS_X_TITLE_FONT,
103 CHART_AXIS_X_TITLE_TEXT,
104 CHART_AXIS_X_TITLE_VISIBLE,
105 CHART_AXIS_X_VISIBLE,
106 CHART_AXIS_Y_ALIGNMENT_HORIZONTAL,
107 CHART_AXIS_Y_ALIGNMENT_VERTICAL,
109 CHART_AXIS_Y_GRID_LINE_COLOR,
110 CHART_AXIS_Y_GRID_VISIBLE,
111 CHART_AXIS_Y_LABELS_ANGLE,
112 CHART_AXIS_Y_LABELS_COLOR,
113 CHART_AXIS_Y_LABELS_FONT,
114 CHART_AXIS_Y_LABELS_VISIBLE,
115 CHART_AXIS_Y_LINE_VISIBLE,
116 CHART_AXIS_Y_MINOR_GRID_LINE_COLOR,
117 CHART_AXIS_Y_MINOR_GRID_LINE_VISIBLE,
118 CHART_AXIS_Y_ORIENTATION,
119 CHART_AXIS_Y_REVERSE,
120 CHART_AXIS_Y_SHADES_BORDER_COLOR,
121 CHART_AXIS_Y_SHADES_COLOR,
122 CHART_AXIS_Y_SHADES_VISIBLE,
123 CHART_AXIS_Y_TITLE_COLOR,
124 CHART_AXIS_Y_TITLE_FONT,
125 CHART_AXIS_Y_TITLE_TEXT,
126 CHART_AXIS_Y_TITLE_VISIBLE,
127 CHART_AXIS_Y_VISIBLE,
133 DATA_EXTRACTION_SCRIPT,
135 DATA_SOURCE_READ_BUFFER_SIZE,
136 DATA_SOURCE_READ_RATE,
144 LEGEND_BACKGROUND_VISIBLE,
150 LEGEND_REVERSE_MARKERS,
151 LEGEND_SHOW_TOOL_TIPS,
161 XY_SERIES_POINTS_VISIBLE,
162 XY_SERIES_POINT_LABELS_CLIPPING,
163 XY_SERIES_POINT_LABELS_COLOR,
164 XY_SERIES_POINT_LABELS_FONT,
165 XY_SERIES_POINT_LABELS_FORMAT,
166 XY_SERIES_POINT_LABELS_VISIBLE,
167 XY_SERIES_USE_OPENGL,
170 XY_SERIES_X_AXIS_LABEL_FORMAT,
171 XY_SERIES_X_AXIS_MAX,
172 XY_SERIES_X_AXIS_MIN,
173 XY_SERIES_X_AXIS_MINOR_TICK_COUNT,
174 XY_SERIES_X_AXIS_TICK_ANCHOR,
175 XY_SERIES_X_AXIS_TICK_COUNT,
176 XY_SERIES_X_AXIS_TICK_INTERVAL,
177 XY_SERIES_X_AXIS_TICK_TYPE,
179 XY_SERIES_Y_AXIS_LABEL_FORMAT,
180 XY_SERIES_Y_AXIS_MAX,
181 XY_SERIES_Y_AXIS_MIN,
182 XY_SERIES_Y_AXIS_MINOR_TICK_COUNT,
183 XY_SERIES_Y_AXIS_TICK_ANCHOR,
184 XY_SERIES_Y_AXIS_TICK_COUNT,
185 XY_SERIES_Y_AXIS_TICK_INTERVAL,
186 XY_SERIES_Y_AXIS_TICK_TYPE,
191 static const QString s_axis_properties_strings[];
192 static const QString s_chart_properties_strings[];
193 static const QString s_data_properties_strings[];
194 static const QString s_legend_properties_strings[];
195 QHash<dooble_charts::Properties, QVariant> data_properties(
void)
const;
196 QHash<dooble_charts::Properties, QVariant> legend_properties(
void)
const;
197 QHash<dooble_charts::Properties, QVariant> x_axis_properties(
void)
const;
198 QHash<dooble_charts::Properties, QVariant> y_axis_properties(
void)
const;
200 QPixmap pixmap(
void)
const;
201 QString name(
void)
const;
202 QWidget *frame(
void)
const;
203 QWidget *view(
void)
const;
204 #ifdef DOOBLE_QTCHARTS_PRESENT
205 static QChart::AnimationOptions string_to_chart_animation_options
207 static QChart::ChartTheme string_to_chart_theme(
const QString &t);
208 static QLegend::MarkerShape string_to_legend_marker_shape(
const QString &t);
209 static QString chart_animation_option_to_string
210 (
const QChart::AnimationOptions chart_animation_options);
211 static QString chart_theme_to_string(
const QChart::ChartTheme chart_theme);
212 static QString chart_type_to_string(
const QChart::ChartType chart_type);
213 static QString legend_marker_shape_to_string
214 (
const QLegend::MarkerShape marker_shape);
216 static QString property_to_name(
const dooble_charts::Properties property);
217 static QString type_from_database(
const QString &name);
218 static void purge(
void);
219 virtual QHash<dooble_charts::Properties, QVariant> properties(
void)
const;
220 virtual void decouple(
void);
221 virtual void open(
const QString &name);
222 virtual void save(QString &error);
225 QHash<QString, QVariant> data_properties_for_database(
void)
const;
226 QHash<QString, QVariant> legend_properties_for_database(
void)
const;
227 QHash<QString, QVariant> properties_for_database(
void)
const;
228 QHash<QString, QVariant> x_axis_properties_for_database(
void)
const;
229 QHash<QString, QVariant> y_axis_properties_for_database(
void)
const;
230 QMultiHash<dooble_charts::Properties, QVariant> all_properties(
void)
const;
231 virtual void create_default_device(
void);
234 #ifdef DOOBLE_QTCHARTS_PRESENT
236 QChartView *m_chart_view;
239 #ifdef DOOBLE_QTCHARTS_PRESENT
240 QMap<int, QPointer<QAbstractSeries> > m_series;
242 QMap<int, QPointer<dooble_charts_iodevice> > m_iodevices;
244 #ifdef DOOBLE_QTCHARTS_PRESENT
245 QPointer<QAbstractAxis> m_x_axis;
246 QPointer<QAbstractAxis> m_y_axis;
248 Ui_dooble_charts m_ui;
249 bool m_print_preview;
253 virtual void slot_clear(
void);
254 virtual void slot_data_ready(
const QVector<double> &vector,
255 const int index) = 0;
256 virtual void slot_item_changed(QStandardItem *item);
257 virtual void slot_play(
void);
258 virtual void slot_pause(
void);
259 virtual void slot_print(
void);
260 virtual void slot_print_preview(QPrinter *printer);
261 virtual void slot_print_preview(
void);
262 virtual void slot_save(
void);
263 virtual void slot_stop(
void);
264 void slot_apply_properties_after_theme_changed(
void);
Definition: dooble_charts_iodevice.h:37
Definition: dooble_charts_property_editor.h:93
Definition: dooble_charts.h:49