Add export format options: CSV, JSON, PPM
[gencolormap.git] / gui.hpp
1 /*
2  * Copyright (C) 2015, 2016 Computer Graphics Group, University of Siegen
3  * Written by Martin Lambers <martin.lambers@uni-siegen.de>
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a copy
6  * of this software and associated documentation files (the "Software"), to deal
7  * in the Software without restriction, including without limitation the rights
8  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9  * copies of the Software, and to permit persons to whom the Software is
10  * furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included in
13  * all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
18  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21  * SOFTWARE.
22  */
23
24 #ifndef GUI_HPP
25 #define GUI_HPP
26
27 #include <QMainWindow>
28
29 class ColorMapWidget;
30 class ColorMapBrewerSequentialWidget;
31 class ColorMapBrewerDivergingWidget;
32 class ColorMapBrewerQualitativeWidget;
33 class ColorMapPLSequentialLightnessWidget;
34 class ColorMapPLSequentialSaturationWidget;
35 class ColorMapPLSequentialRainbowWidget;
36 class ColorMapPLSequentialBlackBodyWidget;
37 class ColorMapPLDivergingLightnessWidget;
38 class ColorMapPLDivergingSaturationWidget;
39 class ColorMapPLQualitativeHueWidget;
40 class ColorMapCubeHelixWidget;
41 class ColorMapMorelandWidget;
42 class ColorMapMcNamesWidget;
43 class ColorMapTestWidget;
44 class QTabWidget;
45 class QLabel;
46
47
48 class GUI : public QMainWindow
49 {
50 Q_OBJECT
51
52 public:
53     GUI();
54     ~GUI();
55
56 private:
57     ColorMapBrewerSequentialWidget* _brewerseq_widget;
58     ColorMapBrewerDivergingWidget* _brewerdiv_widget;
59     ColorMapBrewerQualitativeWidget* _brewerqual_widget;
60     ColorMapPLSequentialLightnessWidget *_plseq_lightness_widget;
61     ColorMapPLSequentialSaturationWidget *_plseq_saturation_widget;
62     ColorMapPLSequentialRainbowWidget *_plseq_rainbow_widget;
63     ColorMapPLSequentialBlackBodyWidget *_plseq_blackbody_widget;
64     ColorMapPLDivergingLightnessWidget *_pldiv_lightness_widget;
65     ColorMapPLDivergingSaturationWidget *_pldiv_saturation_widget;
66     ColorMapPLQualitativeHueWidget *_plqual_hue_widget;
67     ColorMapCubeHelixWidget* _cubehelix_widget;
68     ColorMapMorelandWidget* _moreland_widget;
69     ColorMapMcNamesWidget* _mcnames_widget;
70     QTabWidget* _category_widget;
71     QTabWidget* _category_seq_widget;
72     QTabWidget* _category_div_widget;
73     QTabWidget* _category_qual_widget;
74     QLabel* _reference_label;
75     QLabel* _clipped_label;
76     QLabel* _colormap_label;
77     ColorMapTestWidget* _test_widget;
78
79     ColorMapWidget* currentWidget();
80
81 private slots:
82     void update();
83
84     void file_export_png();
85     void file_export_csv();
86     void edit_reset();
87     void edit_copy_as_img();
88     void edit_copy_as_txt();
89     void help_about();
90 };
91
92 #endif