Minsky
|
#include <CSVDialog.h>
Public Member Functions | |
double | tableWidth () const |
width of table (in pixels) More... | |
void | loadFile () |
loads an initial sequence of lines from url. If fname contains "://", is is treated as a URL, and downloaded from the web. More... | |
void | guessSpecAndLoadFile () |
guess the spec, then load an initial sequence of like loadFile() More... | |
void | loadFileFromName (const std::string &fname) |
common implementation of loading the initial sequence of lines More... | |
void | reportFromFile (const std::string &input, const std::string &output) const |
void | requestRedraw () |
std::size_t | columnOver (double x) const |
return column mouse is over More... | |
std::size_t | rowOver (double y) const |
return row mouse is over More... | |
std::vector< std::vector< std::string > > | parseLines (size_t maxColumn=std::numeric_limits< size_t >::max()) |
void | populateHeaders () |
populate all column names from the headers row More... | |
void | populateHeader (size_t col) |
populate the name of column col with the data from the header row More... | |
void | classifyColumns () |
try to classify axis,data,ignore columns based on read in data More... | |
std::vector< size_t > | correctedUniqueValues () |
unique values in each column, ignoring initial header lines could slightly underestimate the value, and is never less than 1, even for empty columns More... | |
![]() | |
const RenderFrameArgs & | frameArgs () const |
~RenderNativeWindow () override | |
virtual void | init () |
perform any initialisation of any subclasses of this More... | |
void | renderFrame (const RenderFrameArgs &args) |
void | destroyFrame () |
void | draw () |
void | requestRedraw () |
void | macOSXRedraw () |
RenderNativeWindow & | operator= (const RenderNativeWindow &x) |
RenderNativeWindow ()=default | |
RenderNativeWindow (const RenderNativeWindow &)=default | |
virtual bool | hasScrollBars () const |
return whether this window has scrollbars (needed for MacOSX). More... | |
![]() | |
virtual void | mouseDown (float x, float y) |
virtual void | controlMouseDown (float x, float y) |
virtual void | mouseUp (float x, float y) |
virtual void | mouseMove (float x, float y) |
virtual void | zoom (double x, double y, double z) |
virtual void | moveTo (float x, float y) |
move this so that (x,y) is centred More... | |
virtual std::vector< float > | position () const |
current centre coordinates More... | |
virtual double | zoomFactor () const |
virtual bool | keyPress (const KeyPressArgs &) |
handle key press over current itemFocus, More... | |
virtual bool | getItemAt (float x, float y) |
item or wire obtained by get*At() calls More... | |
virtual bool | getWireAt (float x, float y) |
item or wire obtained by get*At() calls More... | |
Public Attributes | |
double | xoffs =80 |
double | colWidth =50 |
bool | flashNameRow =false |
DataSpec | spec |
std::string | url |
filename, or web url More... | |
![]() | |
ItemPtr | item |
item or wire obtained by get*At() calls More... | |
WirePtr | wire |
item or wire obtained by get*At() calls More... | |
Static Public Attributes | |
static const unsigned | numInitialLines =100 |
![]() | |
static ecolab::cairo::Colour | backgroundColour {0.8,0.8,0.8,1} |
Private Member Functions | |
CLASSDESC_ACCESS (DataSpec) | |
bool | redraw (int, int, int width, int height) override |
Private Attributes | |
std::vector< std::string > | initialLines |
initial lines of file More... | |
double | rowHeight =0 |
double | m_tableWidth |
Additional Inherited Members | |
![]() | |
static double | scaleFactor () |
Definition at line 35 of file CSVDialog.h.
|
private |
void CSVDialog::classifyColumns | ( | ) |
try to classify axis,data,ignore columns based on read in data
Definition at line 344 of file CSVDialog.cc.
References minsky::isNumerical(), and parseLines().
size_t CSVDialog::columnOver | ( | double | x | ) | const |
std::vector< size_t > CSVDialog::correctedUniqueValues | ( | ) |
unique values in each column, ignoring initial header lines could slightly underestimate the value, and is never less than 1, even for empty columns
Definition at line 385 of file CSVDialog.cc.
References parseLines().
void CSVDialog::guessSpecAndLoadFile | ( | ) |
guess the spec, then load an initial sequence of like loadFile()
Definition at line 102 of file CSVDialog.cc.
void CSVDialog::loadFile | ( | ) |
loads an initial sequence of lines from url. If fname contains "://", is is treated as a URL, and downloaded from the web.
Definition at line 97 of file CSVDialog.cc.
void CSVDialog::loadFileFromName | ( | const std::string & | fname | ) |
common implementation of loading the initial sequence of lines
Definition at line 111 of file CSVDialog.cc.
References minsky::stripByteOrderingMarker().
std::vector< std::vector< std::string > > CSVDialog::parseLines | ( | size_t | maxColumn = std::numeric_limits<size_t>::max() | ) |
Definition at line 300 of file CSVDialog.cc.
References parseLines().
void CSVDialog::populateHeader | ( | size_t | col | ) |
populate the name of column col with the data from the header row
Definition at line 335 of file CSVDialog.cc.
References parseLines().
void CSVDialog::populateHeaders | ( | ) |
populate all column names from the headers row
Definition at line 327 of file CSVDialog.cc.
References parseLines().
|
overrideprivate |
Definition at line 168 of file CSVDialog.cc.
References parseLines().
void CSVDialog::reportFromFile | ( | const std::string & | input, |
const std::string & | output | ||
) | const |
Definition at line 50 of file CSVDialog.cc.
References minsky::reportFromCSVFile(), and minsky::stripByteOrderingMarker().
|
inline |
Definition at line 63 of file CSVDialog.h.
size_t CSVDialog::rowOver | ( | double | y | ) | const |
|
inline |
double minsky::CSVDialog::colWidth =50 |
Definition at line 46 of file CSVDialog.h.
bool minsky::CSVDialog::flashNameRow =false |
Definition at line 47 of file CSVDialog.h.
|
private |
initial lines of file
Definition at line 37 of file CSVDialog.h.
|
private |
Definition at line 39 of file CSVDialog.h.
Referenced by tableWidth().
|
static |
Definition at line 44 of file CSVDialog.h.
Referenced by minsky::DataSpec::givenTFguessRemainder(), and minsky::DataSpec::guessFromStream().
|
private |
Definition at line 38 of file CSVDialog.h.
DataSpec minsky::CSVDialog::spec |
Definition at line 48 of file CSVDialog.h.
std::string minsky::CSVDialog::url |
filename, or web url
Definition at line 50 of file CSVDialog.h.
double minsky::CSVDialog::xoffs =80 |
Definition at line 45 of file CSVDialog.h.