QtiPlot  0.9.8.2
Public Types | Public Slots | Public Member Functions | Static Public Member Functions | List of all members
Table Class Reference

MDI window providing a spreadsheet table with column logic. More...

#include <Table.h>

Inheritance diagram for Table:
MdiSubWindow scripted TableStatistics

Public Types

enum  ColType {
  Numeric = 0, Text = 1, Date = 2, Time = 3,
  Month = 4, Day = 5
}
 
enum  ImportMode { NewColumns, NewRows, Overwrite }
 
enum  NumericFormat { Default = 0, Decimal = 1, Scientific = 2 }
 
enum  PlotDesignation {
  All = -1, None = 0, X = 1, Y = 2,
  Z = 3, xErr = 4, yErr = 5, Label = 6
}
 
- Public Types inherited from MdiSubWindow
enum  CaptionPolicy { Name = 0, Label = 1, Both = 2 }
 Possible window captions. More...
 
enum  Status { Hidden = -1, Normal = 0, Minimized = 1, Maximized = 2 }
 

Public Slots

void adjustColumnsWidth (bool selection=true)
 
bool calculate (int col, int startRow, int endRow, bool forceMuParser=false, bool notifyChanges=true)
 Compute specified cells from column formula. More...
 
bool calculate ()
 Compute selected cells from column formulae; use current cell if there's no selection. More...
 
double cell (int row, int col)
 Return the value of the cell as a double. More...
 
void cellEdited (int, int col)
 
void clearCell (int row, int col)
 
void clearCommands ()
 Clear all column formulae. More...
 
QVarLengthArray< double > col (int ycol)
 
int colIndex (const QString &name)
 
QString colLabel (int col)
 
QString colName (int col)
 
QStringList colNames ()
 
int colPlotDesignation (int col)
 
QString columnFormat (int col)
 
void columnNumericFormat (int col, char *f, int *precision)
 
void columnNumericFormat (int col, int *f, int *precision)
 
void columnRange (int c, double *min, double *max)
 
QStringList columnsList ()
 
int columnType (int col)
 
QList< int > columnTypes ()
 
int columnWidth (int col)
 
QStringList columnWidths ()
 
int colX (int col)
 
int colY (int col, int xCol=-1)
 
void copy (Table *m, bool values=true)
 
QStringList drawableColumnSelection ()
 
bool exportASCII (const QString &fname, const QString &separator, bool withLabels=false, bool exportComments=false, bool exportSelection=false)
 
bool exportExcel (const QString &fname, bool withLabels, bool exportComments, bool exportSelection)
 
bool exportODF (const QString &fname, bool withLabels, bool exportComments, bool exportSelection)
 
bool exportOdsSpreadsheet (const QString &fname, bool withLabels, bool exportComments, bool exportSelection)
 
void exportPDF (const QString &fileName)
 
int firstSelectedColumn ()
 
int firstXCol ()
 
void freeMemory ()
 
QStringList getColumnsFormat ()
 
QStringList getCommands ()
 
void goToColumn (int col)
 Scroll to column (column starts with 1) More...
 
void goToRow (int row)
 Scroll to row (row starts with 1) More...
 
void importASCII (const QString &fname, const QString &sep="\t", int ignoredLines=0, bool renameCols=false, bool stripSpaces=false, bool simplifySpaces=false, bool importComments=false, const QString &commentString="", bool readOnly=false, ImportMode importAs=Overwrite, const QLocale &importLocale=QLocale(), int endLine=0, int maxRows=-1, const QList< int > &newColTypes=QList< int >(), const QStringList &colFormats=QStringList())
 
void init (int rows, int cols)
 
bool isColumnSelected (int col, bool full=false)
 
bool isEmptyColumn (int col)
 
bool isEmptyRow (int row)
 
bool isReadOnlyColumn (int col)
 
bool isRowSelected (int row, bool full=false)
 
void loadHeader (QStringList header)
 
void moveCurrentCell ()
 
bool muParserCalculate (int col, int startRow, int endRow, bool notifyChanges=true)
 Compute specified cells from column formula (optimized for muParser). More...
 
int nonEmptyRows ()
 
bool noXColumn ()
 
bool noYColumn ()
 
int numCols ()
 
int numRows ()
 
int numSelectedRows ()
 
QList< int > plotDesignations ()
 
void print ()
 
void print (QPrinter *)
 
void print (const QString &fileName)
 
void resizeCols (int)
 
void resizeRows (int)
 
void saveToMemory (double **cells)
 
void saveToMemory ()
 
int selectedColsNumber ()
 
int selectedColumn ()
 
QStringList selectedColumns ()
 
QStringList selectedErrColumns ()
 
QStringList selectedYColumns ()
 
QStringList selectedYLabels ()
 
void setAscValues ()
 
void setCell (int row, int col, double val)
 
void setColName (int col, const QString &text, bool enumerateRight=false, bool warn=true)
 
void setColNumericFormat (int col)
 
void setColNumericFormat (int f, int prec, int col, bool updateCells=true)
 
void setColPlotDesignation (int col, PlotDesignation pd)
 
void setColumnsFormat (const QStringList &lst)
 
void setColumnType (int col, ColType val)
 
void setColumnTypes (QList< int > ctl)
 
void setColumnTypes (const QStringList &ctl)
 
void setColumnWidth (int width, bool allCols)
 
void setColumnWidth (int col, int width)
 
void setColWidths (const QStringList &widths)
 
void setCommand (int col, const QString &com)
 Set formula for column col. More...
 
void setCommands (const QStringList &com)
 Set all column formulae. More...
 
void setCommands (const QString &com)
 Set all column formulae. More...
 
bool setDateFormat (const QString &format, int col, bool updateCells=true)
 
void setDayFormat (const QString &format, int col, bool updateCells=true)
 
void setHeader (QStringList header)
 
void setHeaderColType ()
 
void setMonthFormat (const QString &format, int col, bool updateCells=true)
 
void setNormalRandomValues ()
 
void setNormalRandomValues (int col, int startRow=0, int endRow=-1, double sigma=1.0)
 
void setNumCols (int cols)
 
void setNumRows (int rows)
 
void setPlotDesignation (PlotDesignation pd, bool rightColumns=false)
 
void setRandomValues ()
 
void setRandomValues (int col, int startRow=0, int endRow=-1)
 
void setReadOnlyColumn (int col, bool on=true)
 
void setSelectedCol (int col)
 
void setText (int row, int col, const QString &text)
 
void setTextFormat (int col)
 
bool setTimeFormat (const QString &format, int col, bool updateCells=true)
 
MyTabletable ()
 
QString text (int row, int col)
 
void updateValues (Table *, const QString &columnName)
 Recalculates values in all columns with formulas containing. More...
 
QStringList writableSelectedColumns ()
 
QStringList YColumns ()
 
Event Handlers
bool eventFilter (QObject *object, QEvent *e)
 
void customEvent (QEvent *e)
 
Column Operations
void removeCol ()
 
void removeCol (const QStringList &list)
 
void insertCol ()
 
virtual void insertCols (int start, int count)
 
virtual void addCol (PlotDesignation pd=Y)
 
void addColumns (int c)
 
virtual void moveColumn (int, int, int)
 
void swapColumns (int, int)
 
void moveColumnBy (int cols)
 
void hideSelectedColumns ()
 
void showAllColumns ()
 
void hideColumn (int col, bool=true)
 
bool isColumnHidden (int col)
 
Sorting
void sortColAsc ()
 Sort the current column in ascending order. More...
 
void sortColDesc ()
 Sort the current column in descending order. More...
 
void sortColumn (int col=-1, int order=0)
 Sort the specified column. More...
 
void sortTableDialog ()
 Display a dialog with some options for sorting all columns. More...
 
void sort (int type=0, int order=0, const QString &leadCol=QString())
 Sort all columns as in sortColumns(const QStringList&,int,int,const QString&). More...
 
void sortColumns (int type=0, int order=0, const QString &leadCol=QString())
 Sort selected columns as in sortColumns(const QStringList&,int,int,const QString&). More...
 
void sortColumns (const QStringList &cols, int type=0, int order=0, const QString &leadCol=QString())
 Sort the specified columns. More...
 
void sortColumnsDialog ()
 Display a dialog with some options for sorting the selected columns. More...
 
Normalization
void normalizeCol (int col=-1)
 
void normalizeSelection ()
 
void normalize ()
 
Row Operations
void deleteSelectedRows ()
 
void deleteRows (int startRow, int endRow)
 
void insertRow ()
 
void moveRow (bool up=true)
 
void cutSelection ()
 Selection Operations. More...
 
void copySelection ()
 
void clearSelection ()
 
void pasteSelection ()
 
void selectAllTable ()
 
void deselect ()
 
void clear ()
 
- Public Slots inherited from MdiSubWindow
void notifyChanges ()
 Notifies the main application that the window has been modified. More...
 
virtual void print ()
 
virtual void print (QPrinter *)
 

Public Member Functions

double avg (int col, int startRow=0, int endRow=-1)
 
TableextractData (const QString &name, const QString &condition, int startRow=0, int endRow=-1)
 
Q3TableSelection getSelection ()
 
double maxColumnValue (int col, int startRow=0, int endRow=-1)
 
double minColumnValue (int col, int startRow=0, int endRow=-1)
 
void setAutoUpdateValues (bool on=true)
 
void setNumericPrecision (int prec)
 Sets the number of significant digits. More...
 
virtual QString sizeToString ()
 Size of the widget as a string. More...
 
double sum (int col, int startRow=0, int endRow=-1)
 
 Table (ScriptingEnv *env, int r, int c, const QString &label, ApplicationWindow *parent, const QString &name=QString(), Qt::WFlags f=0)
 
void updateDecimalSeparators (const QLocale &oldSeparators)
 Updates the decimal separators when importing ASCII files on user request. More...
 
- Public Member Functions inherited from MdiSubWindow
ApplicationWindowapplicationWindow ()
 Returns a pointer to the parent application. More...
 
void askOnCloseEvent (bool ask)
 Toggle the "ask on close" flag. More...
 
QString aspect ()
 Return the window status as a string. More...
 
QString birthDate ()
 Return the creation date. More...
 
CaptionPolicy captionPolicy ()
 Return the caption policy. More...
 
void closeEvent (QCloseEvent *)
 Close event handler. More...
 
bool eventFilter (QObject *object, QEvent *e)
 Filters other object's events (customizes title bar's context menu) More...
 
virtual void exportPDF (const QString &)
 
Folderfolder ()
 Returns the pointer to the parent folder of the window. More...
 
 MdiSubWindow (const QString &label=QString(), ApplicationWindow *app=0, const QString &name=QString(), Qt::WFlags f=0)
 Constructor. More...
 
QSize minRestoreSize ()
 Returns the size the window had before a change state event to minimized. More...
 
QString name ()
 Return the window name. More...
 
void resizeEvent (QResizeEvent *)
 
virtual void restore (const QStringList &)
 Not implemented yet. More...
 
void restoreWindow ()
 Show window making sure that layers in MultiLayer windows are not resized. More...
 
virtual void save (const QString &, const QString &, bool=false)
 
void setBirthDate (const QString &s)
 Set the creation date. More...
 
void setCaptionPolicy (CaptionPolicy policy)
 Set the caption policy. More...
 
void setFolder (Folder *f)
 Initializes the pointer to the parent folder of the window. More...
 
virtual void setHidden ()
 Notifies that a window was hidden by a direct user action. More...
 
void setMaximized ()
 
void setMinimized ()
 
void setName (const QString &s)
 Set the window name. More...
 
void setNormal ()
 
void setStatus (Status s)
 Set the window status flag (hidden, normal, minimized or maximized) More...
 
void setWindowLabel (const QString &s)
 Set the window label. More...
 
Status status ()
 Return the window status flag (hidden, normal, minimized or maximized) More...
 
QString windowLabel ()
 Return the window label. More...
 
- Public Member Functions inherited from scripted
 scripted (ScriptingEnv *env)
 
void scriptingChangeEvent (ScriptingChangeEvent *)
 
ScriptingEnvscriptingEnv ()
 
 ~scripted ()
 

Static Public Member Functions

static QDateTime dateTime (double val)
 
static double fromDateTime (const QDateTime &dt)
 
static double fromTime (const QTime &t)
 
- Static Public Member Functions inherited from MdiSubWindow
static QString parseAsciiFile (const QString &fname, const QString &commentString, int endLine, int ignoreFirstLines, int maxRows, int &rows)
 Static function used as a workaround for ASCII files having end line char != '
'. More...
 

Saving and Restoring

MyTabled_table
 
bool d_show_comments
 
QStringList commands
 
QStringList col_format
 
QStringList comments
 
QStringList col_label
 
QList< int > colTypes
 
QList< int > col_plot_type
 
int selectedCol
 
int d_numeric_precision
 
double ** d_saved_cells
 
virtual void save (const QString &fn, const QString &geometry, bool=false)
 
void restore (const QStringList &lst)
 
QString saveHeader ()
 
QString saveComments ()
 
QString saveCommands ()
 
QString saveColumnWidths ()
 
QString saveColumnTypes ()
 
QString saveReadOnlyInfo ()
 
QString saveHiddenColumnsInfo ()
 
void setBackgroundColor (const QColor &col)
 
void setTextColor (const QColor &col)
 
void setHeaderColor (const QColor &col)
 
void setTextFont (const QFont &fnt)
 
void setHeaderFont (const QFont &fnt)
 
int verticalHeaderWidth ()
 
QString comment (int col)
 
void setColComment (int col, const QString &s)
 
QStringList colComments ()
 
void setColComments (const QStringList &lst)
 
void showComments (bool on=true)
 
bool commentsEnabled ()
 
void notifyChanges ()
 This slot notifies the main application that the table has been modified. Triggers the update of 2D plots. More...
 
void notifyChanges (const QString &colName)
 
void colWidthModified (int, int, int)
 Notifies the main application that the width of a table column has been modified by the user. More...
 
void changedColHeader (const QString &, const QString &)
 
void removedCol (const QString &)
 
void addedCol (const QString &)
 
void removedCol (int)
 
void colIndexChanged (int, int)
 
void modifiedData (Table *, const QString &)
 
void optionsDialog ()
 
void colValuesDialog ()
 
void resizedTable (QWidget *)
 
void showContextMenu (bool selection)
 
void clearCol ()
 
void setColumnHeader (int index, const QString &label)
 Internal function to change the column header. More...
 

Additional Inherited Members

- Signals inherited from MdiSubWindow
void closedWindow (MdiSubWindow *)
 Emitted when the window was closed. More...
 
void hiddenWindow (MdiSubWindow *)
 Emitted when the window was hidden. More...
 
void modifiedWindow (MdiSubWindow *)
 
void resizedWindow (MdiSubWindow *)
 
void showContextMenu ()
 Show the context menu. More...
 
void statusChanged (MdiSubWindow *)
 Emitted when the window status changed. More...
 
- Protected Member Functions inherited from MdiSubWindow
virtual void changeEvent (QEvent *event)
 Catches status changes. More...
 
- Protected Attributes inherited from scripted
ScriptingEnvscriptEnv
 

Detailed Description

MDI window providing a spreadsheet table with column logic.

Future Plans

Port to the Model/View approach used in Qt4 and get rid of the Qt3Support dependancy. [ assigned to thzs ]

Member Enumeration Documentation

Enumerator
Numeric 
Text 
Date 
Time 
Month 
Day 
Enumerator
NewColumns 

add file as new columns to this table

NewRows 

add file as new rows to this table

Overwrite 

replace content of table with the imported file

Enumerator
Default 
Decimal 
Scientific 
Enumerator
All 
None 
X 
Y 
Z 
xErr 
yErr 
Label 

Constructor & Destructor Documentation

Table::Table ( ScriptingEnv env,
int  r,
int  c,
const QString &  label,
ApplicationWindow parent,
const QString &  name = QString(),
Qt::WFlags  f = 0 
)

References init().

Member Function Documentation

void Table::addCol ( PlotDesignation  pd = Y)
virtualslot
void Table::addColumns ( int  c)
slot
void Table::addedCol ( const QString &  )
signal

Referenced by addCol(), and addColumns().

void Table::adjustColumnsWidth ( bool  selection = true)
slot
double Table::avg ( int  col,
int  startRow = 0,
int  endRow = -1 
)

References colTypes, d_table, Numeric, and sum().

Referenced by muParserScript::avg().

bool Table::calculate ( int  col,
int  startRow,
int  endRow,
bool  forceMuParser = false,
bool  notifyChanges = true 
)
slot
bool Table::calculate ( )
slot

Compute selected cells from column formulae; use current cell if there's no selection.

References col(), and getSelection().

Referenced by updateValues().

double Table::cell ( int  row,
int  col 
)
slot
void Table::cellEdited ( int  row,
int  col 
)
slot
void Table::changedColHeader ( const QString &  ,
const QString &   
)
signal
void Table::clear ( )
slot
void Table::clearCell ( int  row,
int  col 
)
slot
void Table::clearCol ( )
private

References colName(), d_table, modifiedData(), and selectedCol.

Referenced by clearSelection().

void Table::clearCommands ( )
slot

Clear all column formulae.

References commands.

Referenced by ExtractDataDialog::clearFormulas(), and SetColValuesDialog::clearFormulas().

void Table::clearSelection ( )
slot
QVarLengthArray< double > Table::col ( int  ycol)
slot
QStringList Table::colComments ( )
inlineslot

References comments.

Referenced by copy().

int Table::colIndex ( const QString &  name)
slot

References col_label.

Referenced by FFTDialog::activateDataSet(), ErrDialog::add(), Graph::addCurves(), Graph3D::addRibbon(), Graph3D::changeDataColumn(), RangeSelectorTool::clearMultipleSelection(), RangeSelectorTool::clearSelectedCurve(), clearSelection(), Graph3D::copy(), BaselineDialog::createBaseline(), CreateBinMatrixDialog::CreateBinMatrixDialog(), ApplicationWindow::differentiate(), Graph3D::dropEvent(), RangeSelectorTool::emitStatusText(), SubtractLineTool::finalize(), PieCurve::initLabels(), Graph::insertCurve(), Graph3D::insertNewData(), IntegrationDialog::integrateTable(), SubtractDataDialog::interpolate(), QwtHistogram::loadData(), VectorCurve::loadData(), ErrorBarsCurve::loadData(), PieCurve::loadData(), BoxCurve::loadData(), DataCurve::loadData(), GriddingDialog::loadDataFromTable(), DataCurve::loadLabels(), DataPickerTool::movePoint(), ApplicationWindow::multilayerPlot(), normalizeSelection(), LegendWidget::parse(), Graph::parseAxisTitle(), DataPickerTool::pasteSelection(), RangeSelectorTool::pasteSelection(), pasteSelection(), PlotWizard::plot3D(), ApplicationWindow::plotXYZ(), removeCol(), DataPickerTool::removePoint(), Graph3D::restore(), TranslateCurveTool::selectCurvePoint(), TranslateCurveTool::selectDestination(), DataPickerTool::selectTableRow(), setAscValues(), Statistics::setData(), Correlation::setDataFromTable(), Convolution::setDataFromTable(), FFT::setDataFromTable(), Filter::setDataFromTable(), Graph::setLabelsTextFormat(), setNormalRandomValues(), setPlotDesignation(), setRandomValues(), ApplicationWindow::setReadOnlyCol(), ApplicationWindow::setReadOnlyColumns(), ApplicationWindow::setReadWriteColumns(), Graph3D::setScales(), DataPickerTool::setSelection(), FFTDialog::setTable(), Fit::setWeightingData(), ApplicationWindow::showBinMatrixDialog(), ApplicationWindow::showTable(), sortColumns(), ApplicationWindow::stemPlot(), BaselineDialog::subtractBaseline(), ApplicationWindow::swapColumns(), muParserScript::tablecol(), DataCurve::tableRow(), ApplicationWindow::tableToMatrixRegularXYZ(), TableStatistics::update(), Graph3D::updateData(), and writableSelectedColumns().

void Table::colIndexChanged ( int  ,
int   
)
signal
QString Table::colLabel ( int  col)
slot
QString Table::colName ( int  col)
slot
QStringList Table::colNames ( )
inlineslot
int Table::colPlotDesignation ( int  col)
inlineslot
QString Table::columnFormat ( int  col)
inlineslot
void Table::columnNumericFormat ( int  col,
char *  f,
int *  precision 
)
slot
void Table::columnNumericFormat ( int  col,
int *  f,
int *  precision 
)
slot

References col(), and col_format.

void Table::columnRange ( int  c,
double *  min,
double *  max 
)
slot
QStringList Table::columnsList ( )
slot
int Table::columnType ( int  col)
inlineslot
QList<int> Table::columnTypes ( )
inlineslot

References colTypes.

Referenced by copy().

int Table::columnWidth ( int  col)
slot

References d_table.

Referenced by copy(), and TableDialog::updateColumn().

QStringList Table::columnWidths ( )
slot

References d_table.

void Table::colValuesDialog ( )
signal
void Table::colWidthModified ( int  ,
int  ,
int   
)
slot

Notifies the main application that the width of a table column has been modified by the user.

References MdiSubWindow::modifiedWindow(), and setHeaderColType().

Referenced by init().

int Table::colX ( int  col)
slot
int Table::colY ( int  col,
int  xCol = -1 
)
slot
QString Table::comment ( int  col)
slot
bool Table::commentsEnabled ( )
inlineslot

References d_show_comments.

Referenced by copy(), and TableDialog::TableDialog().

void Table::copy ( Table m,
bool  values = true 
)
slot
void Table::copySelection ( )
slot
void Table::customEvent ( QEvent *  e)
slot
void Table::cutSelection ( )
slot

Selection Operations.

References clearSelection(), and copySelection().

QDateTime Table::dateTime ( double  val)
static
void Table::deleteRows ( int  startRow,
int  endRow 
)
slot
void Table::deleteSelectedRows ( )
slot

References d_table, and deleteRows().

void Table::deselect ( )
slot

References d_table.

QStringList Table::drawableColumnSelection ( )
slot
bool Table::eventFilter ( QObject *  object,
QEvent *  e 
)
slot
bool Table::exportASCII ( const QString &  fname,
const QString &  separator,
bool  withLabels = false,
bool  exportComments = false,
bool  exportSelection = false 
)
slot
bool Table::exportExcel ( const QString &  fname,
bool  withLabels,
bool  exportComments,
bool  exportSelection 
)
slot
bool Table::exportODF ( const QString &  fname,
bool  withLabels,
bool  exportComments,
bool  exportSelection 
)
slot

References cell(), colNames(), comments, d_table, and table().

Referenced by exportASCII().

bool Table::exportOdsSpreadsheet ( const QString &  fname,
bool  withLabels,
bool  exportComments,
bool  exportSelection 
)
slot
void Table::exportPDF ( const QString &  fileName)
slot

References print().

Table * Table::extractData ( const QString &  name,
const QString &  condition,
int  startRow = 0,
int  endRow = -1 
)
int Table::firstSelectedColumn ( )
slot
int Table::firstXCol ( )
slot

References col_plot_type, d_table, and X.

Referenced by FFTDialog::setTable().

void Table::freeMemory ( )
slot

References d_saved_cells, and d_table.

Referenced by TableDialog::closeEvent().

double Table::fromDateTime ( const QDateTime &  dt)
static
double Table::fromTime ( const QTime &  t)
static
QStringList Table::getColumnsFormat ( )
inlineslot

References col_format.

Referenced by copy().

QStringList Table::getCommands ( )
inlineslot
Q3TableSelection Table::getSelection ( )
void Table::goToColumn ( int  col)
slot

Scroll to column (column starts with 1)

References d_table, and numCols().

void Table::goToRow ( int  row)
slot

Scroll to row (row starts with 1)

References d_table, and numRows().

void Table::hideColumn ( int  col,
bool  hide = true 
)
slot
void Table::hideSelectedColumns ( )
slot
void Table::importASCII ( const QString &  fname,
const QString &  sep = "\t",
int  ignoredLines = 0,
bool  renameCols = false,
bool  stripSpaces = false,
bool  simplifySpaces = false,
bool  importComments = false,
const QString &  commentString = "",
bool  readOnly = false,
ImportMode  importAs = Overwrite,
const QLocale &  importLocale = QLocale(),
int  endLine = 0,
int  maxRows = -1,
const QList< int > &  newColTypes = QList<int>(),
const QStringList &  colFormats = QStringList() 
)
slot
void Table::init ( int  rows,
int  cols 
)
slot
void Table::insertCol ( )
slot

References insertCols(), and selectedCol.

void Table::insertCols ( int  start,
int  count 
)
virtualslot
void Table::insertRow ( )
slot
bool Table::isColumnHidden ( int  col)
inlineslot
bool Table::isColumnSelected ( int  col,
bool  full = false 
)
inlineslot

References d_table.

Referenced by ApplicationWindow::showColStatistics().

bool Table::isEmptyColumn ( int  col)
slot
bool Table::isEmptyRow ( int  row)
slot

References d_table, and text().

Referenced by nonEmptyRows(), and save().

bool Table::isReadOnlyColumn ( int  col)
slot
bool Table::isRowSelected ( int  row,
bool  full = false 
)
inlineslot

References d_table.

Referenced by ApplicationWindow::showRowStatistics().

void Table::loadHeader ( QStringList  header)
slot
double Table::maxColumnValue ( int  col,
int  startRow = 0,
int  endRow = -1 
)

References cell(), colTypes, d_table, and Numeric.

Referenced by muParserScript::max().

double Table::minColumnValue ( int  col,
int  startRow = 0,
int  endRow = -1 
)

References cell(), colTypes, d_table, min, and Numeric.

Referenced by muParserScript::min().

void Table::modifiedData ( Table ,
const QString &   
)
signal
void Table::moveColumn ( int  ,
int  fromIndex,
int  toIndex 
)
virtualslot
void Table::moveColumnBy ( int  cols)
slot
void Table::moveCurrentCell ( )
slot

References col(), d_table, and numRows().

Referenced by init().

void Table::moveRow ( bool  up = true)
slot
bool Table::muParserCalculate ( int  col,
int  startRow,
int  endRow,
bool  notifyChanges = true 
)
slot
int Table::nonEmptyRows ( )
slot

References d_table, and isEmptyRow().

void Table::normalize ( )
slot
void Table::normalizeCol ( int  col = -1)
slot
void Table::normalizeSelection ( )
slot
void Table::notifyChanges ( )
slot
void Table::notifyChanges ( const QString &  colName)
slot
bool Table::noXColumn ( )
slot
bool Table::noYColumn ( )
slot

References col_plot_type, d_table, and Y.

Referenced by ApplicationWindow::validFor3DPlot().

int Table::numCols ( )
slot

References d_table.

Referenced by ErrDialog::add(), CurvesDialog::addFolderItems(), Correlation::addResultCurve(), Convolution::addResultCurve(), ApplicationWindow::addWindowsListToCompleter(), TableDialog::apply(), SetColValuesDialog::apply(), ApplicationWindow::clone(), muParserScript::col(), ApplicationWindow::columnsList(), ApplicationWindow::fitLinear(), ApplicationWindow::fitSlope(), goToColumn(), ApplicationWindow::initCompleter(), GriddingDialog::loadDataFromTable(), DataCurve::loadLabels(), ApplicationWindow::moveColumnLast(), ApplicationWindow::openTable(), ApplicationWindow::openTableStatistics(), Differentiation::output(), StatisticTest::outputResultsTo(), Anova::outputResultsTo(), ApplicationWindow::removeWindowFromLists(), restore(), StatisticTest::resultTable(), Anova::resultTable(), TableStatistics::save(), saveCommands(), TableStatistics::setBase(), setColumnTypes(), setCommands(), TableDialog::setDateTimeFormat(), TableDialog::setDayFormat(), Graph::setLabelsTextFormat(), TableDialog::setMonthFormat(), TableDialog::setNumericFormat(), ExtractDataDialog::setTable(), SetColValuesDialog::setTable(), TableDialog::setTextFormat(), ApplicationWindow::showColsDialog(), ApplicationWindow::showColStatistics(), Fit::showConfidenceLimits(), AnovaDialog::showCurrentFolder(), Fit::showPredictionLimits(), Fit::showResiduals(), ApplicationWindow::showTableContextMenu(), muParserScript::tableCell(), muParserScript::tablecol(), ApplicationWindow::tableToMatrix(), ApplicationWindow::tableToMatrixRegularXYZ(), TableStatistics::update(), TableDialog::updateColumn(), SetColValuesDialog::updateColumn(), ApplicationWindow::updateCompleter(), AssociationsDialog::updateTable(), SubtractDataDialog::updateTableColumns(), BaselineDialog::updateTableColumns(), updateValues(), ApplicationWindow::validFor2DPlot(), ApplicationWindow::validFor3DPlot(), and Fit::writeParametersToTable().

int Table::numRows ( )
slot

References d_table.

Referenced by ErrDialog::add(), Correlation::addResultCurve(), Graph3D::addRibbon(), DrawPointTool::appendPoint(), FrequencyCountDialog::apply(), calculate(), ApplicationWindow::clone(), muParserScript::col(), BaselineDialog::createBaseline(), DataCurve::DataCurve(), extractData(), FrequencyCountDialog::FrequencyCountDialog(), goToRow(), Graph::insertCurve(), SubtractDataDialog::interpolate(), DataCurve::isFullRange(), Graph3D::loadData(), moveCurrentCell(), muParserCalculate(), Graph::openBoxDiagram(), ApplicationWindow::openGraph(), Differentiation::output(), StatisticTest::outputResultsTo(), Anova::outputResultsTo(), Graph::plotBox(), Graph::plotPie(), Graph::plotVectors(), TableStatistics::save(), TableStatistics::setBase(), CurveRangeDialog::setCurvesToModify(), CurveRangeDialog::setCurveToModify(), Statistics::setData(), Convolution::setDataFromTable(), Correlation::setDataFromTable(), FFT::setDataFromTable(), Filter::setDataFromTable(), setDayFormat(), DataCurve::setFullRange(), Graph::setLabelsTextFormat(), setMonthFormat(), ExtractDataDialog::setTable(), SetColValuesDialog::setTable(), IntegrationDialog::setTable(), Fit::setWeightingData(), ApplicationWindow::showDeleteRowsDialog(), ApplicationWindow::showRowsDialog(), ApplicationWindow::showRowStatistics(), ApplicationWindow::showTableContextMenu(), ApplicationWindow::stemPlot(), muParserScript::tableCell(), muParserScript::tablecol(), TableStatistics::TableStatistics(), ApplicationWindow::tableToMatrix(), ApplicationWindow::tableToMatrixRegularXYZ(), Graph3D::updateDataXY(), Graph3D::updateScales(), updateValues(), and Fit::writeParametersToTable().

int Table::numSelectedRows ( )
slot
void Table::optionsDialog ( )
signal

Referenced by eventFilter().

void Table::pasteSelection ( )
slot
QList<int> Table::plotDesignations ( )
inlineslot

References col_plot_type.

Referenced by copy().

void Table::print ( )
slot

Referenced by calculate(), exportPDF(), and print().

void Table::print ( QPrinter *  printer)
slot

References d_table, and text().

void Table::print ( const QString &  fileName)
slot
void Table::removeCol ( )
slot

References selectedColumns().

Referenced by TableStatistics::setBase().

void Table::removeCol ( const QStringList &  list)
slot
void Table::removedCol ( const QString &  )
signal
void Table::removedCol ( int  )
signal
void Table::resizeCols ( int  c)
slot
void Table::resizedTable ( QWidget *  )
signal
void Table::resizeRows ( int  r)
slot
void Table::restore ( const QStringList &  lst)
slot
void Table::save ( const QString &  fn,
const QString &  geometry,
bool  saveAsTemplate = false 
)
virtualslot
QString Table::saveColumnTypes ( )
slot

References col_format, colTypes, and d_table.

Referenced by TableStatistics::save(), and save().

QString Table::saveColumnWidths ( )
slot

References d_table.

Referenced by TableStatistics::save(), and save().

QString Table::saveCommands ( )
slot

References col(), commands, and numCols().

Referenced by TableStatistics::save(), and save().

QString Table::saveComments ( )
slot

References comments, and d_table.

Referenced by TableStatistics::save(), and save().

QString Table::saveHeader ( )
slot

References col_plot_type, colLabel(), d_table, Label, X, xErr, Y, yErr, and Z.

Referenced by TableStatistics::save(), and save().

QString Table::saveHiddenColumnsInfo ( )
slot

References d_table.

Referenced by TableStatistics::save(), and save().

QString Table::saveReadOnlyInfo ( )
slot

References d_table.

Referenced by TableStatistics::save(), and save().

void Table::saveToMemory ( double **  cells)
inlineslot

References d_saved_cells.

Referenced by TableDialog::updateColumn().

void Table::saveToMemory ( )
slot
void Table::selectAllTable ( )
slot

References d_table.

Referenced by init().

int Table::selectedColsNumber ( )
slot
int Table::selectedColumn ( )
inlineslot
QStringList Table::selectedColumns ( )
slot
QStringList Table::selectedErrColumns ( )
slot

References col_label, col_plot_type, d_table, xErr, and yErr.

QStringList Table::selectedYColumns ( )
slot
QStringList Table::selectedYLabels ( )
slot

References col_label, col_plot_type, d_table, and Y.

Referenced by Graph::plotBox().

void Table::setAscValues ( )
slot
void Table::setAutoUpdateValues ( bool  on = true)
void Table::setBackgroundColor ( const QColor &  col)
slot

References d_table.

void Table::setCell ( int  row,
int  col,
double  val 
)
slot
void Table::setColComment ( int  col,
const QString &  s 
)
slot
void Table::setColComments ( const QStringList &  lst)
inlineslot
void Table::setColName ( int  col,
const QString &  text,
bool  enumerateRight = false,
bool  warn = true 
)
slot
void Table::setColNumericFormat ( int  col)
slot

References col(), colTypes, and Numeric.

Referenced by TableDialog::setNumericFormat().

void Table::setColNumericFormat ( int  f,
int  prec,
int  col,
bool  updateCells = true 
)
slot
void Table::setColPlotDesignation ( int  col,
PlotDesignation  pd 
)
slot
void Table::setColumnHeader ( int  index,
const QString &  label 
)
private

Internal function to change the column header.

References comments, d_show_comments, and d_table.

Referenced by setHeaderColType().

void Table::setColumnsFormat ( const QStringList &  lst)
slot

References col_format.

void Table::setColumnType ( int  col,
ColType  val 
)
inlineslot
void Table::setColumnTypes ( QList< int >  ctl)
inlineslot
void Table::setColumnTypes ( const QStringList &  ctl)
slot

References col_format, colTypes, and numCols().

void Table::setColumnWidth ( int  width,
bool  allCols 
)
slot
void Table::setColumnWidth ( int  col,
int  width 
)
slot
void Table::setColWidths ( const QStringList &  widths)
slot
void Table::setCommand ( int  col,
const QString &  com 
)
slot
void Table::setCommands ( const QStringList &  com)
slot
void Table::setCommands ( const QString &  com)
slot

Set all column formulae.

References setCommands().

bool Table::setDateFormat ( const QString &  format,
int  col,
bool  updateCells = true 
)
slot
void Table::setDayFormat ( const QString &  format,
int  col,
bool  updateCells = true 
)
slot
void Table::setHeader ( QStringList  header)
slot
void Table::setHeaderColor ( const QColor &  col)
slot

Highlighting of the header text

References d_table.

Referenced by ConfigDialog::apply(), and ApplicationWindow::customTable().

void Table::setHeaderColType ( )
slot
void Table::setHeaderFont ( const QFont &  fnt)
slot
void Table::setMonthFormat ( const QString &  format,
int  col,
bool  updateCells = true 
)
slot
void Table::setNormalRandomValues ( )
slot
void Table::setNormalRandomValues ( int  col,
int  startRow = 0,
int  endRow = -1,
double  sigma = 1.0 
)
slot
void Table::setNumCols ( int  cols)
slot
void Table::setNumericPrecision ( int  prec)

Sets the number of significant digits.

References col_format, colTypes, d_numeric_precision, d_table, and Numeric.

Referenced by ApplicationWindow::customTable().

void Table::setNumRows ( int  rows)
slot
void Table::setPlotDesignation ( PlotDesignation  pd,
bool  rightColumns = false 
)
slot
void Table::setRandomValues ( )
slot
void Table::setRandomValues ( int  col,
int  startRow = 0,
int  endRow = -1 
)
slot
void Table::setReadOnlyColumn ( int  col,
bool  on = true 
)
slot
void Table::setSelectedCol ( int  col)
inlineslot
void Table::setText ( int  row,
int  col,
const QString &  text 
)
slot
void Table::setTextColor ( const QColor &  col)
slot

References d_table.

void Table::setTextFont ( const QFont &  fnt)
slot
void Table::setTextFormat ( int  col)
slot

References col(), colTypes, and Text.

Referenced by TableDialog::setTextFormat().

bool Table::setTimeFormat ( const QString &  format,
int  col,
bool  updateCells = true 
)
slot
void Table::showAllColumns ( )
slot
void Table::showComments ( bool  on = true)
slot
void Table::showContextMenu ( bool  selection)
signal
QString Table::sizeToString ( )
virtual

Size of the widget as a string.

Reimplemented from MdiSubWindow.

References d_table.

void Table::sort ( int  type = 0,
int  order = 0,
const QString &  leadCol = QString() 
)
slot
void Table::sortColAsc ( )
slot

Sort the current column in ascending order.

See Also
sortColDesc(), sortColumn(), Q3Table::currentColumn()

References selectedColumns(), and sortColumns().

void Table::sortColDesc ( )
slot

Sort the current column in descending order.

See Also
sortColAsc(), sortColumn(), Q3Table::currentColumn()

References selectedColumns(), and sortColumns().

void Table::sortColumn ( int  col = -1,
int  order = 0 
)
slot

Sort the specified column.

Parameters
colthe column to be sorted
order0 means ascending, anything else means descending

References cell(), col(), col_format, colName(), columnNumericFormat(), columnType(), d_table, Date, dateTime(), fromDateTime(), modifiedData(), MdiSubWindow::modifiedWindow(), Numeric, Text, and Time.

Referenced by sortColumns().

void Table::sortColumns ( int  type = 0,
int  order = 0,
const QString &  leadCol = QString() 
)
slot
void Table::sortColumns ( const QStringList &  cols,
int  type = 0,
int  order = 0,
const QString &  leadCol = QString() 
)
slot

Sort the specified columns.

Parameters
colsthe columns to be sorted
type0 means sort individually (as in sortColumn()), anything else means together
order0 means ascending, anything else means descending
leadColfor sorting together, the column which determines the permutation

References MdiSubWindow::applicationWindow(), cell(), col(), col_format, colIndex(), colName(), columnNumericFormat(), columnType(), compare_qstrings(), d_table, Date, dateTime(), fromDateTime(), modifiedData(), MdiSubWindow::modifiedWindow(), Numeric, setAutoUpdateValues(), sortColumn(), Text, text(), and Time.

void Table::sortColumnsDialog ( )
slot

Display a dialog with some options for sorting the selected columns.

The sorting itself is done using sortColumns(int,int,const QString&).

References MdiSubWindow::applicationWindow(), SortDialog::insertColumnsList(), selectedColumns(), sort(), and sortColumns().

Referenced by ApplicationWindow::sortSelection().

void Table::sortTableDialog ( )
slot

Display a dialog with some options for sorting all columns.

The sorting itself is done using sort(int,int,const QString&).

References MdiSubWindow::applicationWindow(), colNames(), SortDialog::insertColumnsList(), and sort().

Referenced by ApplicationWindow::sortActiveTable().

double Table::sum ( int  col,
int  startRow = 0,
int  endRow = -1 
)

References colTypes, d_table, and Numeric.

Referenced by avg(), and muParserScript::sum().

void Table::swapColumns ( int  col1,
int  col2 
)
slot
MyTable* Table::table ( )
inlineslot
QString Table::text ( int  row,
int  col 
)
slot
void Table::updateDecimalSeparators ( const QLocale &  oldSeparators)

Updates the decimal separators when importing ASCII files on user request.

References colTypes, columnNumericFormat(), d_table, and Numeric.

Referenced by importASCII().

void Table::updateValues ( Table t,
const QString &  columnName 
)
slot

Recalculates values in all columns with formulas containing.

Parameters
columnName

References calculate(), col_label, colLabel(), colTypes, commands, numCols(), Numeric, and numRows().

Referenced by notifyChanges(), and setAutoUpdateValues().

int Table::verticalHeaderWidth ( )
inlineslot

References d_table.

Referenced by ApplicationWindow::importASCII().

QStringList Table::writableSelectedColumns ( )
slot
QStringList Table::YColumns ( )
slot

Member Data Documentation

QStringList Table::col_format
private
QStringList Table::col_label
private
QList<int> Table::col_plot_type
private
QList<int> Table::colTypes
private
QStringList Table::commands
private
QStringList Table::comments
private
int Table::d_numeric_precision
private
double** Table::d_saved_cells
private
bool Table::d_show_comments
private
MyTable* Table::d_table
protected

Referenced by addCol(), addColumns(), adjustColumnsWidth(), avg(), calculate(), cell(), cellEdited(), clear(), clearCell(), clearCol(), clearSelection(), col(), colLabel(), columnRange(), columnsList(), columnWidth(), columnWidths(), colX(), colY(), comment(), copy(), copySelection(), deleteRows(), deleteSelectedRows(), deselect(), drawableColumnSelection(), eventFilter(), exportASCII(), exportODF(), extractData(), firstSelectedColumn(), firstXCol(), freeMemory(), getSelection(), goToColumn(), goToRow(), hideColumn(), hideSelectedColumns(), importASCII(), init(), insertCols(), insertRow(), isColumnHidden(), isColumnSelected(), isEmptyColumn(), isEmptyRow(), isReadOnlyColumn(), isRowSelected(), maxColumnValue(), minColumnValue(), moveColumnBy(), moveCurrentCell(), moveRow(), muParserCalculate(), nonEmptyRows(), normalize(), normalizeCol(), notifyChanges(), noXColumn(), noYColumn(), numCols(), numRows(), numSelectedRows(), pasteSelection(), print(), TableStatistics::removeCol(), removeCol(), resizeCols(), resizeRows(), save(), saveColumnTypes(), saveColumnWidths(), saveComments(), saveHeader(), saveHiddenColumnsInfo(), saveReadOnlyInfo(), saveToMemory(), selectAllTable(), selectedColsNumber(), selectedColumns(), selectedErrColumns(), selectedYColumns(), selectedYLabels(), setAscValues(), setBackgroundColor(), setCell(), setColComment(), setColName(), setColNumericFormat(), setColPlotDesignation(), setColumnHeader(), setColumnWidth(), setColWidths(), setDateFormat(), setDayFormat(), setHeaderColor(), setHeaderColType(), setHeaderFont(), setMonthFormat(), setNormalRandomValues(), setNumCols(), setNumericPrecision(), setNumRows(), setPlotDesignation(), setRandomValues(), setReadOnlyColumn(), setText(), setTextColor(), setTextFont(), setTimeFormat(), showAllColumns(), showComments(), sizeToString(), sortColumn(), sortColumns(), sum(), swapColumns(), table(), TableStatistics::TableStatistics(), text(), updateDecimalSeparators(), verticalHeaderWidth(), writableSelectedColumns(), and YColumns().

int Table::selectedCol
private

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