Vespucci  1.0.0
MapData Class Reference

The MapData class Class for processed map data. Images are created from this data. More...

#include <mapdata.h>

Public Member Functions

 MapData (QString name, QString type, QStringList data_keys, uword data_column, QSharedPointer< VespucciWorkspace > workspace)
 MapData::~MapData Deletes everything the new keyword is used on in this object. Destructor triggered when this is removed from VespucciDataset list. More...
 
 ~MapData ()
 
QString name ()
 MapData::name. More...
 
QString type ()
 MapData::type. More...
 
void SetMapPlot (MapPlot *plot)
 
void setGradient (const QCPColorGradient &gradient)
 MapData::setGradient. More...
 
void SetColorScaleTickCount (int ticks)
 
void ShowMapWindow (bool show)
 MapData::ShowMapWindow Shows or hides the map window. More...
 
void HideMapWindow ()
 MapData::HideMapWindow Closes the map window. More...
 
bool MapWindowVisible ()
 MapData::MapWindowVisible. More...
 
void CreateImage (QCPColorGradient color_scheme, bool interpolation, int tick_count)
 MapData::CreateImage. More...
 
void SetMapData (QCPColorMapData *map_data)
 
void SetXDescription (QString description)
 MapData::SetXDescription. More...
 
void SetYDescription (QString description)
 MapData::SetYDescription. More...
 
void setSize (int key_size, int value_size)
 
bool interpolate ()
 MapData::interpolate. More...
 
void setInterpolate (bool enabled)
 MapData::setInterpolate. More...
 
void ShowColorScale (bool enabled)
 MapData::ShowColorScale. More...
 
void ShowAxes (bool enabled)
 MapData::ShowAxes. More...
 
void SetDataRange (QCPRange new_range)
 MapData::SetDataRange. More...
 
bool savePdf (const QString &fileName, int width, int height)
 MapData::savePDF. More...
 
bool savePng (const QString &fileName, int width=0, int height=0, double scale=1.0, int quality=-1)
 MapData::savePng. More...
 
bool saveJpg (const QString &fileName, int width=0, int height=0, double scale=1.0, int quality=-1)
 MapData::saveJpg. More...
 
bool saveBmp (const QString &fileName, int width=0, int height=0, double scale=1.0)
 MapData::saveBmp. More...
 
bool saveTiff (const QString &fileName, int width=0, int height=0, double scale=1.0, int quality=0)
 MapData::saveTiff. More...
 
void DrawScaleBar (double width, double height, QString units, QColor color, QString position, QFont font)
 MapData::DrawScaleBar. More...
 
void RescaleMapWidget ()
 MapData::RescaleMapWidget Changes the proportions of the map window back to the initial proportions. Maintains the longest of the resized dimensions and adjusts the other dimension accordingly. More...
 
void LockMapDisplaySize (bool lock)
 MapData::LockMapDisplaySize. More...
 
void ResetMapWidgetSize ()
 MapData::ResetMapWidgetSize Returns the size of the map window to the original proportions. More...
 
void SetFonts (const QFont &font)
 
QString global_gradient_key ()
 
double min ()
 MapData::min. More...
 
double max ()
 
void SetName (QString name, QString type)
 MapData::set_name. More...
 
void SetGlobalGradient (QString name)
 
void UpdateGlobalGradient ()
 
QStringList keys ()
 
MapPlotmap_qcp ()
 

Detailed Description

The MapData class Class for processed map data. Images are created from this data.

Definition at line 44 of file mapdata.h.

Constructor & Destructor Documentation

MapData::MapData ( QString  name,
QString  type,
QStringList  data_keys,
uword  data_column,
QSharedPointer< VespucciWorkspace workspace 
)

MapData::~MapData Deletes everything the new keyword is used on in this object. Destructor triggered when this is removed from VespucciDataset list.

Definition at line 29 of file mapdata.cpp.

MapData::~MapData ( )

Definition at line 55 of file mapdata.cpp.

Member Function Documentation

void MapData::CreateImage ( QCPColorGradient  color_scheme,
bool  interpolation,
int  tick_count 
)

MapData::CreateImage.

Parameters
color_scheme
interpolationCreates the image by sending data to the QCustomPlot widgets.

Definition at line 154 of file mapdata.cpp.

void MapData::DrawScaleBar ( double  width,
double  height,
QString  units,
QColor  color,
QString  position,
QFont  font 
)

MapData::DrawScaleBar.

Parameters
widthThe width of the bar in map units.
heightThe height of the bar.
unitsThe number to display on the bar label.
colorThe color of the bar.
positionThe position of the bar (Top or Bottom, Left or Right)
fontThe desired font for the bar label. Draws a scale bar object on the map.

Definition at line 369 of file mapdata.cpp.

QString MapData::global_gradient_key ( )

Definition at line 504 of file mapdata.cpp.

void MapData::HideMapWindow ( )

MapData::HideMapWindow Closes the map window.

Definition at line 134 of file mapdata.cpp.

bool MapData::interpolate ( )

MapData::interpolate.

Returns
Whether or not map is interpolated See QCustomPlot::QCPColorMap::interpolate().

Definition at line 189 of file mapdata.cpp.

QStringList MapData::keys ( )

Definition at line 112 of file mapdata.cpp.

void MapData::LockMapDisplaySize ( bool  lock)

MapData::LockMapDisplaySize.

Parameters
lockWhether the window should be locked or unlocked Locks the size of the map window to maintain proportions

Definition at line 480 of file mapdata.cpp.

MapPlot * MapData::map_qcp ( )

Definition at line 117 of file mapdata.cpp.

bool MapData::MapWindowVisible ( )

MapData::MapWindowVisible.

Returns
Whether or not map window is visible.

Definition at line 144 of file mapdata.cpp.

double MapData::max ( )

Definition at line 518 of file mapdata.cpp.

double MapData::min ( )

MapData::min.

Returns

Definition at line 513 of file mapdata.cpp.

QString MapData::name ( )

MapData::name.

Returns
The name of the map.

Definition at line 64 of file mapdata.cpp.

void MapData::RescaleMapWidget ( )

MapData::RescaleMapWidget Changes the proportions of the map window back to the initial proportions. Maintains the longest of the resized dimensions and adjusts the other dimension accordingly.

Definition at line 464 of file mapdata.cpp.

void MapData::ResetMapWidgetSize ( )

MapData::ResetMapWidgetSize Returns the size of the map window to the original proportions.

Definition at line 491 of file mapdata.cpp.

bool MapData::saveBmp ( const QString &  fileName,
int  width = 0,
int  height = 0,
double  scale = 1.0 
)

MapData::saveBmp.

Parameters
fileName
width
height
scale
Returns
Saves the map as a bitmap. See QCustomPlot::saveBmp.

Definition at line 246 of file mapdata.cpp.

bool MapData::saveJpg ( const QString &  fileName,
int  width = 0,
int  height = 0,
double  scale = 1.0,
int  quality = -1 
)

MapData::saveJpg.

Parameters
fileName
width
height
scale
quality
Returns
Saves the map as a JPEG. See QCustomPlot::saveJpg

Definition at line 308 of file mapdata.cpp.

bool MapData::savePdf ( const QString &  fileName,
int  width,
int  height 
)

MapData::savePDF.

Parameters
fileName
width
height
scale
Returns
Saves the map as a PDF. See QCustomPlot::saveBmp.

Definition at line 268 of file mapdata.cpp.

bool MapData::savePng ( const QString &  fileName,
int  width = 0,
int  height = 0,
double  scale = 1.0,
int  quality = -1 
)

MapData::savePng.

Parameters
fileName
width
height
scale
quality
Returns
Saves map as a png. See QCustomPlot::savePng.

Definition at line 287 of file mapdata.cpp.

bool MapData::saveTiff ( const QString &  fileName,
int  width = 0,
int  height = 0,
double  scale = 1.0,
int  quality = 0 
)

MapData::saveTiff.

Parameters
fileName
width
height
scale
quality
Returns
Saves the map as a tiff. See QCustomPlot::saveRastered.

Definition at line 329 of file mapdata.cpp.

void MapData::SetColorScaleTickCount ( int  ticks)

Definition at line 355 of file mapdata.cpp.

void MapData::SetDataRange ( QCPRange  new_range)

MapData::SetDataRange.

Parameters
new_rangeSets the data range of the map. This is used to allow common data ranges on maps that share the global color scheme, so that for a given numerical value the color is the same on all maps with this scheme.

Definition at line 454 of file mapdata.cpp.

void MapData::SetFonts ( const QFont &  font)

Definition at line 499 of file mapdata.cpp.

void MapData::SetGlobalGradient ( QString  name)

Definition at line 97 of file mapdata.cpp.

void MapData::setGradient ( const QCPColorGradient gradient)

MapData::setGradient.

Parameters
gradientSets the color gradient of the map.

Definition at line 347 of file mapdata.cpp.

void MapData::setInterpolate ( bool  enabled)

MapData::setInterpolate.

Parameters
enabledWhether or not image should be interpolated. Toggles image interpolation on or off. See QCustomPlot::QCPColorMap::setInterpolate.

Definition at line 198 of file mapdata.cpp.

void MapData::SetMapData ( QCPColorMapData map_data)
void MapData::SetMapPlot ( MapPlot plot)

Definition at line 78 of file mapdata.cpp.

void MapData::SetName ( QString  name,
QString  type 
)

MapData::set_name.

Parameters
name
typeSets the title of the window, default name for saved files and display name in main window.

Definition at line 89 of file mapdata.cpp.

void MapData::setSize ( int  key_size,
int  value_size 
)
void MapData::SetXDescription ( QString  description)

MapData::SetXDescription.

Parameters
descriptionSets description for the X axis in the spectrum viewer.

Definition at line 171 of file mapdata.cpp.

void MapData::SetYDescription ( QString  description)

MapData::SetYDescription.

Parameters
descriptionSets description for the Y axis in the spectrum viewer.

Definition at line 180 of file mapdata.cpp.

void MapData::ShowAxes ( bool  enabled)

MapData::ShowAxes.

Parameters
enabledWhether or not axes should be visible on map. Toggles the axes on and off.

Definition at line 217 of file mapdata.cpp.

void MapData::ShowColorScale ( bool  enabled)

MapData::ShowColorScale.

Parameters
enabledWhether or not color scale should be visible. Toggles the color scale bar on or off.

Definition at line 208 of file mapdata.cpp.

void MapData::ShowMapWindow ( bool  show)

MapData::ShowMapWindow Shows or hides the map window.

Definition at line 125 of file mapdata.cpp.

QString MapData::type ( )

MapData::type.

Returns
A string describing the type of map.

Definition at line 73 of file mapdata.cpp.

void MapData::UpdateGlobalGradient ( )

Definition at line 105 of file mapdata.cpp.


The documentation for this class was generated from the following files: