Skip to content

Commit

Permalink
Add options dialog + plot title
Browse files Browse the repository at this point in the history
  • Loading branch information
paullric committed Aug 27, 2022
1 parent 8891d2b commit c8ba70a
Show file tree
Hide file tree
Showing 9 changed files with 895 additions and 167 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ NCFLAGS=`nc-config --cflags --libs`
RPATH=`wx-config --prefix`/lib

# build the executable
cd src && $CXX -std=c++11 -fpermissive -Wl,-rpath,${RPATH} -o ${PREFIX}/ncvis ncvis.cpp kdtree.cpp wxNcVisFrame.cpp wxNcVisExportDialog.cpp wxImagePanel.cpp GridDataSampler.cpp ColorMap.cpp netcdf.cpp ncvalues.cpp Announce.cpp TimeObj.cpp ShpFile.cpp schrift.cpp lodepng.cpp ${WXFLAGS} ${NCFLAGS}
cd src && $CXX -std=c++11 -fpermissive -Wl,-rpath,${RPATH} -o ${PREFIX}/ncvis ncvis.cpp kdtree.cpp wxNcVisFrame.cpp wxNcVisOptionsDialog.cpp wxNcVisExportDialog.cpp wxImagePanel.cpp GridDataSampler.cpp ColorMap.cpp netcdf.cpp ncvalues.cpp Announce.cpp TimeObj.cpp ShpFile.cpp schrift.cpp lodepng.cpp ${WXFLAGS} ${NCFLAGS}
64 changes: 64 additions & 0 deletions src/NcVisPlotOptions.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
///////////////////////////////////////////////////////////////////////////////
///
/// \file NcVisPlotOptions.h
/// \author Paul Ullrich
/// \version August 25, 2022
///

#ifndef _NCVISPLOTOPTIONS_H_
#define _NCVISPLOTOPTIONS_H_

///////////////////////////////////////////////////////////////////////////////

class NcVisPlotOptions {

public:
/// <summary>
/// Constructor.
/// </summary>
NcVisPlotOptions() :
m_fShowTitle(true),
m_fShowTickmarkLabels(false),
m_fShowGrid(false)
{ }

public:
/// <summary>
/// Equality operator.
/// </summary>
bool operator==(const NcVisPlotOptions & plotopts) const {
return (
(m_fShowTitle == plotopts.m_fShowTitle) &&
(m_fShowTickmarkLabels == plotopts.m_fShowTickmarkLabels) &&
(m_fShowGrid == plotopts.m_fShowGrid));
}

/// <summary>
/// Inequality operator.
/// </summary>
bool operator!=(const NcVisPlotOptions & plotopts) const {
return !((*this) == plotopts);
}

public:
/// <summary>
/// Show the title in the image.
/// </summary>
bool m_fShowTitle;

/// <summary>
/// Show tickmark labels in the image.
/// </summary>
bool m_fShowTickmarkLabels;

/// <summary>
/// Show grid in the image.
/// </summary>
bool m_fShowGrid;

};

///////////////////////////////////////////////////////////////////////////////

#endif // _NCVISPLOTOPTIONS_H_

Loading

0 comments on commit c8ba70a

Please sign in to comment.