Vespucci  1.0.0
mapviewer.h
Go to the documentation of this file.
1 /************************************************************************************
2  Copyright (C) 2014-2016 Wright State University - All Rights Reserved
3 
4  This file is part of Vespucci.
5 
6  Vespucci is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  Vespucci is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with Vespucci. If not, see <http://www.gnu.org/licenses/>.
18 ***************************************************************************************/
19 
20 #ifndef MAPVIEWER_H
21 #define MAPVIEWER_H
22 
23 #include <QMainWindow>
24 #include "Data/Imaging/mapdata.h"
25 #include "GUI/Display/mapplot.h"
28 #include "GUI/Display/mapplot.h"
29 
30 class ScaleBarDialog;
31 class MapData;
32 class SpectrumViewer;
33 class MainWindow;
34 class VespucciWorkspace;
35 class MapPlot;
36 
37 namespace Ui {
38 class MapViewer;
39 class MapPlot;
40 }
41 
45 class MapViewer : public QMainWindow
46 {
47  Q_OBJECT
48 public:
49  MapViewer(MainWindow *parent, QStringList map_keys, QSharedPointer<VespucciWorkspace> ws);
50  QCPColorGradient GetGradient(int gradient_number);
51  MapPlot *mapPlot();
52  ~MapViewer();
53 signals:
54  void RequestSpectrumPlot(QString dataset_key, QString map_name, size_t index);
55  void RequestHeldSpectrumPlot(QString dataset_key, QString map_name, size_t index);
56 public slots:
57  void SpectrumRequested(size_t index);
58  void SetStatusbar(double x, double y, double z);
59 private slots:
60  void on_actionInterpolate_toggled(bool arg1);
61 
62  void on_actionSave_Image_As_triggered();
63 
64  void on_actionShow_Axes_toggled(bool arg1);
65 
66  void on_actionShow_Color_Scale_toggled(bool arg1);
67 
68  void on_actionSet_Color_Scheme_triggered();
69 
70  void on_actionAdd_Scale_Bar_triggered();
71 
72  void on_actionLock_Size_toggled(bool arg1);
73 
74  void on_actionReset_Size_triggered();
75 
76  void on_actionReproportion_triggered();
77 
78  void on_actionSet_Font_triggered();
79 
80  void on_actionSet_Color_Scale_Label_triggered();
81 
82  void on_actionSet_Global_Color_Scale_triggered();
83 
84  void on_actionCenter_Color_Scale_at_0_triggered();
85 
86 protected:
87  void keyPressEvent(QKeyEvent *event);
88  void showEvent(QShowEvent *event);
89 
90 private:
91  Ui::MapViewer *ui;
95  QString name_;
96 
100  QString *directory_;
101 
102  QStringList map_keys_;
103  QStringList data_keys_;
104  QSharedPointer<VespucciWorkspace> workspace_;
105  QLabel *statusbar_label_;
106 
107 
108 };
109 
110 #endif // MAPVIEWER_H
111 
The MapData class Class for processed map data. Images are created from this data.
Definition: mapdata.h:44
Definition: ahcadialog.h:26
The VespucciWorkspace class A class which contains all "global variables" (that aren&#39;t held in MainWi...
The MapPlot class A subclass of QCustomPlot for handling a specfic kind of color map. Provides a wrapper for a QCPColorScale and a QCPColorMap which are child widgets.
Definition: mapplot.h:33
The MapViewer class Displays the image created by MapData.
Definition: mapviewer.h:45
Defines a color gradient for use with e.g. QCPColorMap.
Definition: qcustomplot.h:1905
The MainWindow class The main window of the program, this is where the user performs most operations...
Definition: mainwindow.h:58
The ScaleBarDialog class Dialog for the user to create a scale bar on the image.