Changeset View
Changeset View
Standalone View
Standalone View
src/kdefrontend/datasources/ROOTOptionsWidget.h
- This file was added.
1 | /*************************************************************************** | ||||
---|---|---|---|---|---|
2 | File : ROOTOptionsWidget.h | ||||
3 | Project : LabPlot | ||||
4 | Description : widget providing options for the import of ROOT data | ||||
5 | -------------------------------------------------------------------- | ||||
6 | Copyright : (C) 2018 Christoph Roick (chrisito@gmx.de) | ||||
7 | **************************************************************************/ | ||||
8 | | ||||
9 | /*************************************************************************** | ||||
10 | * * | ||||
11 | * This program is free software; you can redistribute it and/or modify * | ||||
12 | * it under the terms of the GNU General Public License as published by * | ||||
13 | * the Free Software Foundation; either version 2 of the License, or * | ||||
14 | * (at your option) any later version. * | ||||
15 | * * | ||||
16 | * This program is distributed in the hope that it will be useful, * | ||||
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||||
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||||
19 | * GNU General Public License for more details. * | ||||
20 | * * | ||||
21 | * You should have received a copy of the GNU General Public License * | ||||
22 | * along with this program; if not, write to the Free Software * | ||||
23 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, * | ||||
24 | * Boston, MA 02110-1301 USA * | ||||
25 | * * | ||||
26 | ***************************************************************************/ | ||||
27 | | ||||
28 | #ifndef ROOTOPTIONSWIDGET_H | ||||
29 | #define ROOTOPTIONSWIDGET_H | ||||
30 | | ||||
31 | #include "ui_rootoptionswidget.h" | ||||
32 | | ||||
33 | class ROOTFilter; | ||||
34 | class ImportFileWidget; | ||||
35 | | ||||
36 | /// Widget providing options for the import of ROOT data | ||||
37 | class ROOTOptionsWidget : public QWidget { | ||||
38 | Q_OBJECT | ||||
39 | | ||||
40 | public: | ||||
41 | explicit ROOTOptionsWidget(QWidget*, ImportFileWidget*); | ||||
42 | void clear(); | ||||
43 | /// Fill the list of available histograms | ||||
44 | void updateContent(ROOTFilter* filter, QString fileName); | ||||
45 | /// Return a list of selected histograms | ||||
46 | const QStringList selectedROOTNames() const; | ||||
47 | int lines() const { return ui.sbPreviewLines->value(); } | ||||
48 | int startBin() const { return ui.sbFirst->value(); } | ||||
49 | int endBin() const { return ui.sbLast->value(); } | ||||
50 | int columns() const; | ||||
51 | void setNBins(int nbins); | ||||
52 | QTableWidget* previewWidget() const { return ui.twPreview; } | ||||
53 | | ||||
54 | private: | ||||
55 | Ui::ROOTOptionsWidget ui; | ||||
56 | ImportFileWidget* m_fileWidget; | ||||
57 | | ||||
58 | private slots: | ||||
59 | /// Updates the selected data set of a ROOT file when a new item is selected | ||||
60 | void rootListWidgetSelectionChanged(); | ||||
61 | }; | ||||
62 | | ||||
63 | #endif |