Table.h
Go to the documentation of this file.
/***************************************************************************
File : Table.h
Project : QtiPlot
--------------------------------------------------------------------
Copyright : (C) 2006 by Ion Vasilief, Knut Franke
Email (use @ for *) : ion_vasilief*yahoo.fr
Description : Table worksheet class
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, *
* Boston, MA 02110-1301 USA *
* *
***************************************************************************/
#ifndef TABLE_H
#define TABLE_H
#include <q3table.h>
#include <q3header.h>
#include <QVarLengthArray>
#include <QLocale>
#include <MdiSubWindow.h>
#include <ScriptingEnv.h>
#include <Script.h>
class MyTable : public Q3Table
{
public:
MyTable(QWidget * parent = 0, const char * name = 0);
MyTable(int numRows, int numCols, QWidget * parent = 0, const char * name = 0);
private:
void activateNextCell();
};
class Table: public MdiSubWindow, public scripted
{
Q_OBJECT
public:
enum PlotDesignation{All = -1, None = 0, X = 1, Y = 2, Z = 3, xErr = 4, yErr = 5, Label = 6};
enum ColType{Numeric = 0, Text = 1, Date = 2, Time = 3, Month = 4, Day = 5};
enum NumericFormat{Default = 0, Decimal = 1, Scientific = 2};
enum ImportMode {
NewColumns,
NewRows,
Overwrite
};
Table(ScriptingEnv *env, int r,int c, const QString &label, ApplicationWindow* parent, const QString& name = QString(), Qt::WFlags f=0);
Q3TableSelection getSelection();
void setNumericPrecision(int prec);
void updateDecimalSeparators(const QLocale& oldSeparators);
void setAutoUpdateValues(bool on = true);
virtual QString sizeToString();
double avg(int col, int startRow = 0, int endRow = -1);
double sum(int col, int startRow = 0, int endRow = -1);
double minColumnValue(int col, int startRow = 0, int endRow = -1);
double maxColumnValue(int col, int startRow = 0, int endRow = -1);
Table* extractData(const QString& name, const QString& condition, int startRow = 0, int endRow = -1);
static QDateTime dateTime(double val);
static double fromDateTime(const QDateTime& dt);
static double fromTime(const QTime& t);
public slots:
MyTable* table(){return d_table;};
void copy(Table *m, bool values = true);
int numRows();
int numCols();
void setNumRows(int rows);
void setNumCols(int cols);
void resizeRows(int);
void resizeCols(int);
double cell(int row, int col);
void setCell(int row, int col, double val);
QString text(int row, int col);
QStringList columnsList();
QStringList colNames(){return col_label;}
QString colName(int col);
void setColName(int col, const QString& text, bool enumerateRight = false, bool warn = true);
QString colLabel(int col);
int colIndex(const QString& name);
int colPlotDesignation(int col){return col_plot_type[col];};
void setColPlotDesignation(int col, PlotDesignation pd);
void setPlotDesignation(PlotDesignation pd, bool rightColumns = false);
QList<int> plotDesignations(){return col_plot_type;};
void setHeader(QStringList header);
void loadHeader(QStringList header);
void setHeaderColType();
void setText(int row,int col,const QString & text);
void setRandomValues();
void setRandomValues(int col, int startRow = 0, int endRow = -1);
void setNormalRandomValues();
void setNormalRandomValues(int col, int startRow = 0, int endRow = -1, double sigma = 1.0);
void setAscValues();
void cellEdited(int,int col);
void moveCurrentCell();
void clearCell(int row, int col);
bool isEmptyRow(int row);
bool isEmptyColumn(int col);
int nonEmptyRows();
void print();
void print(QPrinter *);
void print(const QString& fileName);
void exportPDF(const QString& fileName);
bool eventFilter(QObject *object, QEvent *e);
void customEvent( QEvent* e);
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){return d_table->isColumnHidden(col);};
void sortColAsc();
void sortColDesc();
void sortColumn(int col = -1, int order = 0);
void sortTableDialog();
void sort(int type = 0, int order = 0, const QString& leadCol = QString());
void sortColumns(int type = 0, int order = 0, const QString& leadCol = QString());
void sortColumns(const QStringList& cols, int type = 0, int order = 0, const QString& leadCol = QString());
void sortColumnsDialog();
void normalizeCol(int col=-1);
void normalizeSelection();
void normalize();
QVarLengthArray<double> col(int ycol);
void columnRange(int c, double *min, double *max);
int firstXCol();
bool noXColumn();
bool noYColumn();
int colX(int col);
int colY(int col, int xCol = -1, const QStringList& lst = QStringList());
QStringList getCommands(){return commands;};
void clearCommands();
void setCommands(const QStringList& com);
void setCommands(const QString& com);
void setCommand(int col, const QString& com);
bool calculate(int col, int startRow, int endRow, bool forceMuParser = false, bool notifyChanges = true);
bool muParserCalculate(int col, int startRow, int endRow, bool notifyChanges = true);
bool calculate();
void updateValues(Table*, const QString& columnName);
void deleteSelectedRows();
void deleteRows(int startRow, int endRow);
void insertRow();
void moveRow(bool up = true);
void cutSelection();
void copySelection();
void clearSelection();
void pasteSelection();
void selectAllTable();
void deselect();
void clear();
void init(int rows, int cols);
QStringList writableSelectedColumns();
QStringList selectedColumns();
QStringList selectedYColumns();
QStringList selectedErrColumns();
QStringList selectedYLabels();
QStringList drawableColumnSelection();
QStringList YColumns();
int selectedColsNumber();
void setColumnWidth(int width, bool allCols);
void setColumnWidth(int col, int width);
int columnWidth(int col);
QStringList columnWidths();
void setColWidths(const QStringList& widths);
void adjustColumnsWidth(bool selection = true);
void setSelectedCol(int col){selectedCol = col;};
int selectedColumn(){return selectedCol;};
int firstSelectedColumn();
int numSelectedRows();
bool isRowSelected(int row, bool full=false) { return d_table->isRowSelected(row, full); }
bool isColumnSelected(int col, bool full=false) { return d_table->isColumnSelected(col, full); }
void goToRow(int row);
void goToColumn(int col);
void columnNumericFormat(int col, char *f, int *precision);
void columnNumericFormat(int col, int *f, int *precision);
int columnType(int col){return colTypes[col];};
QList<int> columnTypes(){return colTypes;};
void setColumnTypes(QList<int> ctl){colTypes = ctl;};
void setColumnTypes(const QStringList& ctl);
void setColumnType(int col, ColType val) { colTypes[col] = val; }
void saveToMemory(double **cells){d_saved_cells = cells;};
void saveToMemory();
void freeMemory();
bool isReadOnlyColumn(int col);
void setReadOnlyColumn(int col, bool on = true);
QString columnFormat(int col){return col_format[col];};
QStringList getColumnsFormat(){return col_format;};
void setColumnsFormat(const QStringList& lst);
void setTextFormat(int col);
void setColNumericFormat(int col);
void setColNumericFormat(int f, int prec, int col, bool updateCells = true);
bool setDateFormat(const QString& format, int col, bool updateCells = true);
bool setTimeFormat(const QString& format, int col, bool updateCells = true);
void setMonthFormat(const QString& format, int col, bool updateCells = true);
void setDayFormat(const QString& format, int col, bool updateCells = true);
bool exportExcel(const QString& fname, bool withLabels, bool exportComments, bool exportSelection);
bool exportOdsSpreadsheet(const QString& fname, bool withLabels, bool exportComments, bool exportSelection);
bool exportODF(const QString& fname, bool withLabels, bool exportComments, bool exportSelection);
bool exportASCII(const QString& fname, const QString& separator, bool withLabels = false,
bool exportComments = false, bool exportSelection = false);
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());
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(){return d_table->verticalHeader()->width();};
QString comment(int col);
void setColComment(int col, const QString& s);
QStringList colComments(){return comments;};
void setColComments(const QStringList& lst){comments = lst;};
void showComments(bool on = true);
bool commentsEnabled(){return d_show_comments;}
void notifyChanges();
void notifyChanges(const QString& colName);
void colWidthModified(int, int, int);
signals:
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);
protected:
MyTable *d_table;
private:
void clearCol();
bool d_show_comments;
QStringList commands, col_format, comments, col_label;
QList<int> colTypes, col_plot_type;
int selectedCol;
int d_numeric_precision;
double **d_saved_cells;
void setColumnHeader(int index, const QString& label);
};
#endif
Table::modifiedData
void modifiedData(Table *, const QString &)
Table::setDayFormat
void setDayFormat(const QString &format, int col, bool updateCells=true)
Definition: Table.cpp:2392
Table::numSelectedRows
int numSelectedRows()
Definition: Table.cpp:1196
Table::selectAllTable
void selectAllTable()
Definition: Table.cpp:1443
Table::restore
void restore(const QStringList &lst)
Definition: Table.cpp:3555
Table::selectedCol
int selectedCol
Definition: Table.h:377
Table::isColumnHidden
bool isColumnHidden(int col)
Definition: Table.h:160
Table::freeMemory
void freeMemory()
Definition: Table.cpp:2195
Table::plotDesignations
QList< int > plotDesignations()
Definition: Table.h:116
Table::colIndex
int colIndex(const QString &name)
Definition: Table.cpp:2564
Table::drawableColumnSelection
QStringList drawableColumnSelection()
Definition: Table.cpp:1151
Table::notifyChanges
void notifyChanges()
This slot notifies the main application that the table has been modified. Triggers the update of 2D p...
Definition: Table.cpp:3606
Table::addCol
virtual void addCol(PlotDesignation pd=Y)
Definition: Table.cpp:1323
Table::comment
QString comment(int col)
Definition: Table.cpp:984
MyTable::activateNextCell
void activateNextCell()
Definition: Table.cpp:4003
Table::importASCII
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())
Definition: Table.cpp:2727
Table::getCommands
QStringList getCommands()
Definition: Table.h:217
Table::columnTypes
QList< int > columnTypes()
Definition: Table.h:286
Table::saveColumnWidths
QString saveColumnWidths()
Definition: Table.cpp:833
Table::changedColHeader
void changedColHeader(const QString &, const QString &)
Table::isColumnSelected
bool isColumnSelected(int col, bool full=false)
Definition: Table.h:276
Table::exportASCII
bool exportASCII(const QString &fname, const QString &separator, bool withLabels=false, bool exportComments=false, bool exportSelection=false)
Definition: Table.cpp:3129
Table::insertCol
void insertCol()
Definition: Table.cpp:1308
Table::col
QVarLengthArray< double > col(int ycol)
Definition: Table.cpp:1217
Table::exportExcel
bool exportExcel(const QString &fname, bool withLabels, bool exportComments, bool exportSelection)
Definition: Table.cpp:2975
Table::deleteSelectedRows
void deleteSelectedRows()
Definition: Table.cpp:1402
Table::YColumns
QStringList YColumns()
Definition: Table.cpp:1120
Table::cutSelection
void cutSelection()
Selection Operations.
Definition: Table.cpp:1437
Table::insertRow
void insertRow()
Definition: Table.cpp:1313
Table::setColumnType
void setColumnType(int col, ColType val)
Definition: Table.h:289
Table::col_plot_type
QList< int > col_plot_type
Definition: Table.h:376
MyTable
Definition: Table.h:41
Table::fromTime
static double fromTime(const QTime &t)
Definition: Table.cpp:2280
Table::showComments
void showComments(bool on=true)
Definition: Table.cpp:3674
Table::None
Definition: Table.h:62
Table::Label
Definition: Table.h:62
Table::minColumnValue
double minColumnValue(int col, int startRow=0, int endRow=-1)
Definition: Table.cpp:3936
Table::sortColumn
void sortColumn(int col=-1, int order=0)
Sort the specified column.
Definition: Table.cpp:1984
Table::setBackgroundColor
void setBackgroundColor(const QColor &col)
Definition: Table.cpp:151
Table::setNormalRandomValues
void setNormalRandomValues()
Definition: Table.cpp:2464
Table::save
virtual void save(const QString &fn, const QString &geometry, bool=false)
Definition: Table.cpp:912
Table::ImportMode
ImportMode
Definition: Table.h:65
Table::muParserCalculate
bool muParserCalculate(int col, int startRow, int endRow, bool notifyChanges=true)
Compute specified cells from column formula (optimized for muParser).
Definition: Table.cpp:539
Table::setColumnsFormat
void setColumnsFormat(const QStringList &lst)
Definition: Table.cpp:2258
Table::setAutoUpdateValues
void setAutoUpdateValues(bool on=true)
Definition: Table.cpp:133
Table::moveRow
void moveRow(bool up=true)
Definition: Table.cpp:3858
Table::customEvent
void customEvent(QEvent *e)
Definition: Table.cpp:3413
Table::Text
Definition: Table.h:63
Table::colLabel
QString colLabel(int col)
Definition: Table.cpp:976
ScriptingEnv
An interpreter for evaluating scripting code. Abstract.
Definition: ScriptingEnv.h:50
Table::setCommands
void setCommands(const QStringList &com)
Set all column formulae.
Definition: Table.cpp:509
Table::NewRows
add file as new rows to this table
Definition: Table.h:67
Table::clearCol
void clearCol()
Definition: Table.cpp:1373
ScriptingEnv.h
Table::showAllColumns
void showAllColumns()
Definition: Table.cpp:3841
Table::col_format
QStringList col_format
Definition: Table.h:375
Table::adjustColumnsWidth
void adjustColumnsWidth(bool selection=true)
Definition: Table.cpp:1028
Table::verticalHeaderWidth
int verticalHeaderWidth()
Definition: Table.h:340
Table::updateDecimalSeparators
void updateDecimalSeparators(const QLocale &oldSeparators)
Updates the decimal separators when importing ASCII files on user request.
Definition: Table.cpp:3702
Table::sortColumnsDialog
void sortColumnsDialog()
Display a dialog with some options for sorting the selected columns.
Definition: Table.cpp:1840
Table::clearCell
void clearCell(int row, int col)
Definition: Table.cpp:1386
Table::clearSelection
void clearSelection()
Definition: Table.cpp:1453
Table::noYColumn
bool noYColumn()
Definition: Table.cpp:2717
Table::moveCurrentCell
void moveCurrentCell()
Definition: Table.cpp:3275
Table::pasteSelection
void pasteSelection()
Definition: Table.cpp:1566
Table::setAscValues
void setAscValues()
Definition: Table.cpp:2673
Table::selectedColumn
int selectedColumn()
Definition: Table.h:272
Table::swapColumns
void swapColumns(int, int)
Definition: Table.cpp:3762
Table::Numeric
Definition: Table.h:63
Table::getSelection
Q3TableSelection getSelection()
Definition: Table.cpp:820
Table::setHeaderFont
void setHeaderFont(const QFont &fnt)
Definition: Table.cpp:179
Table::setRandomValues
void setRandomValues()
Definition: Table.cpp:2425
Table::columnsList
QStringList columnsList()
Definition: Table.cpp:1177
Table::Y
Definition: Table.h:62
Table::addedCol
void addedCol(const QString &)
Table::saveToMemory
void saveToMemory()
Definition: Table.cpp:2158
Table::colTypes
QList< int > colTypes
Definition: Table.h:376
Table::saveHeader
QString saveHeader()
Definition: Table.cpp:874
Table::selectedYLabels
QStringList selectedYLabels()
Definition: Table.cpp:1167
Table::colPlotDesignation
int colPlotDesignation(int col)
Definition: Table.h:113
Script.h
Table::setReadOnlyColumn
void setReadOnlyColumn(int col, bool on=true)
Definition: Table.cpp:3735
Table::colX
int colX(int col)
Definition: Table.cpp:335
Table::sortTableDialog
void sortTableDialog()
Display a dialog with some options for sorting all columns.
Definition: Table.cpp:1848
Table::setHeaderColor
void setHeaderColor(const QColor &col)
Definition: Table.cpp:169
Table::colValuesDialog
void colValuesDialog()
Table::removedCol
void removedCol(const QString &)
Table::saveComments
QString saveComments()
Definition: Table.cpp:862
Table::NewColumns
add file as new columns to this table
Definition: Table.h:66
Table::isEmptyColumn
bool isEmptyColumn(int col)
Definition: Table.cpp:2101
Table::resizeRows
void resizeRows(int)
Definition: Table.cpp:3446
Table::setCommand
void setCommand(int col, const QString &com)
Set formula for column col.
Definition: Table.cpp:516
Table::clear
void clear()
Definition: Table.cpp:3630
Table::normalizeCol
void normalizeCol(int col=-1)
Definition: Table.cpp:1812
Table::setText
void setText(int row, int col, const QString &text)
Definition: Table.cpp:2153
Table::deleteRows
void deleteRows(int startRow, int endRow)
Definition: Table.cpp:1408
Table::setTextFont
void setTextFont(const QFont &fnt)
Definition: Table.cpp:161
min
#define min(a, b)
Definition: ShapiroWilkTest.cpp:36
Table::yErr
Definition: Table.h:62
Table::xErr
Definition: Table.h:62
Table::copySelection
void copySelection()
Definition: Table.cpp:1521
Table::hideColumn
void hideColumn(int col, bool=true)
Definition: Table.cpp:3823
Table::dateTime
static QDateTime dateTime(double val)
Definition: Table.cpp:2266
Table::copy
void copy(Table *m, bool values=true)
Definition: Table.cpp:3525
Table::optionsDialog
void optionsDialog()
Table::setHeaderColType
void setHeaderColType()
Definition: Table.cpp:2571
Table::setColNumericFormat
void setColNumericFormat(int col)
Definition: Table.cpp:2210
Table::exportODF
bool exportODF(const QString &fname, bool withLabels, bool exportComments, bool exportSelection)
Definition: Table.cpp:2986
Table::d_table
MyTable * d_table
Definition: Table.h:369
Table::setColComment
void setColComment(int col, const QString &s)
Definition: Table.cpp:992
Table::selectedYColumns
QStringList selectedYColumns()
Definition: Table.cpp:1130
Table::normalizeSelection
void normalizeSelection()
Definition: Table.cpp:1781
Table::hideSelectedColumns
void hideSelectedColumns()
Definition: Table.cpp:3833
Table::moveColumnBy
void moveColumnBy(int cols)
Definition: Table.cpp:3785
Table::All
Definition: Table.h:62
Table::colName
QString colName(int col)
Definition: Table.cpp:1055
ApplicationWindow
QtiPlot's main window.
Definition: ApplicationWindow.h:133
Table::Overwrite
replace content of table with the imported file
Definition: Table.h:68
Table::setTimeFormat
bool setTimeFormat(const QString &format, int col, bool updateCells=true)
Definition: Table.cpp:2321
Table::Scientific
Definition: Table.h:64
Table::deselect
void deselect()
Definition: Table.cpp:1448
Table::setDateFormat
bool setDateFormat(const QString &format, int col, bool updateCells=true)
Definition: Table.cpp:2285
Table::firstXCol
int firstXCol()
Definition: Table.cpp:965
Table::removeCol
void removeCol()
Definition: Table.cpp:1726
Table::columnWidth
int columnWidth(int col)
Definition: Table.cpp:468
Table::sizeToString
virtual QString sizeToString()
Size of the widget as a string.
Definition: Table.cpp:3852
Table::setPlotDesignation
void setPlotDesignation(PlotDesignation pd, bool rightColumns=false)
Definition: Table.cpp:397
Table::colY
int colY(int col, int xCol=-1, const QStringList &lst=QStringList())
Definition: Table.cpp:349
Table::setNumCols
void setNumCols(int cols)
Definition: Table.cpp:3424
Table::updateValues
void updateValues(Table *, const QString &columnName)
Recalculates values in all columns with formulas containing.
Definition: Table.cpp:800
Table::numCols
int numCols()
Definition: Table.cpp:2085
Table::sortColDesc
void sortColDesc()
Sort the current column in descending order.
Definition: Table.cpp:2075
Table::avg
double avg(int col, int startRow=0, int endRow=-1)
Definition: Table.cpp:3905
Table::colComments
QStringList colComments()
Definition: Table.h:344
Table::commands
QStringList commands
Definition: Table.h:375
Table::saveColumnTypes
QString saveColumnTypes()
Definition: Table.cpp:841
Table::getColumnsFormat
QStringList getColumnsFormat()
Definition: Table.h:299
Table::setTextColor
void setTextColor(const QColor &col)
Definition: Table.cpp:156
Table::Z
Definition: Table.h:62
Table::exportOdsSpreadsheet
bool exportOdsSpreadsheet(const QString &fname, bool withLabels, bool exportComments, bool exportSelection)
Definition: Table.cpp:2962
Table::d_show_comments
bool d_show_comments
Definition: Table.h:374
Table::writableSelectedColumns
QStringList writableSelectedColumns()
Definition: Table.cpp:2649
Table::ColType
ColType
Definition: Table.h:63
Table::setColName
void setColName(int col, const QString &text, bool enumerateRight=false, bool warn=true)
Definition: Table.cpp:1063
Table::goToRow
void goToRow(int row)
Scroll to row (row starts with 1)
Definition: Table.cpp:3643
Table::columnWidths
QStringList columnWidths()
Definition: Table.cpp:473
Table::col_label
QStringList col_label
Definition: Table.h:375
Table::X
Definition: Table.h:62
Table::columnFormat
QString columnFormat(int col)
Definition: Table.h:298
Table::extractData
Table * extractData(const QString &name, const QString &condition, int startRow=0, int endRow=-1)
Definition: Table.cpp:733
Table::setColWidths
void setColWidths(const QStringList &widths)
Definition: Table.cpp:482
Table::setColComments
void setColComments(const QStringList &lst)
Definition: Table.h:345
Table::cellEdited
void cellEdited(int, int col)
Definition: Table.cpp:300
Table::setColumnWidth
void setColumnWidth(int width, bool allCols)
Definition: Table.cpp:1008
Table::setSelectedCol
void setSelectedCol(int col)
Definition: Table.h:271
Table::d_saved_cells
double ** d_saved_cells
Definition: Table.h:379
Table::sortColumns
void sortColumns(int type=0, int order=0, const QString &leadCol=QString())
Sort selected columns as in sortColumns(const QStringList&,int,int,const QString&).
Definition: Table.cpp:1863
Table::isEmptyRow
bool isEmptyRow(int row)
Definition: Table.cpp:2090
Table::sort
void sort(int type=0, int order=0, const QString &leadCol=QString())
Sort all columns as in sortColumns(const QStringList&,int,int,const QString&).
Definition: Table.cpp:1856
Table::noXColumn
bool noXColumn()
Definition: Table.cpp:2707
Table::table
MyTable * table()
Definition: Table.h:92
MdiSubWindow::showContextMenu
void showContextMenu()
Show the context menu.
Table::resizedTable
void resizedTable(QWidget *)
Table::sortColAsc
void sortColAsc()
Sort the current column in ascending order.
Definition: Table.cpp:2070
Table::nonEmptyRows
int nonEmptyRows()
Definition: Table.cpp:2115
Table::columnType
int columnType(int col)
Definition: Table.h:284
Table::saveHiddenColumnsInfo
QString saveHiddenColumnsInfo()
Definition: Table.cpp:904
Table::comments
QStringList comments
Definition: Table.h:375
Table::Time
Definition: Table.h:63
Table::selectedErrColumns
QStringList selectedErrColumns()
Definition: Table.cpp:1140
Table::setHeader
void setHeader(QStringList header)
Definition: Table.cpp:2558
Table::selectedColsNumber
int selectedColsNumber()
Definition: Table.cpp:1207
Table::colWidthModified
void colWidthModified(int, int, int)
Notifies the main application that the width of a table column has been modified by the user...
Definition: Table.cpp:144
Table::Default
Definition: Table.h:64
Table::exportPDF
void exportPDF(const QString &fileName)
Definition: Table.cpp:184
Table::colNames
QStringList colNames()
Definition: Table.h:107
Table::addColumns
void addColumns(int c)
Definition: Table.cpp:1349
Table::columnNumericFormat
void columnNumericFormat(int col, char *f, int *precision)
Definition: Table.cpp:442
Table::saveToMemory
void saveToMemory(double **cells)
Definition: Table.h:291
Table::setMonthFormat
void setMonthFormat(const QString &format, int col, bool updateCells=true)
Definition: Table.cpp:2359
MdiSubWindow
Base class of all MDI client windows.
Definition: MdiSubWindow.h:51
scripted
Interface for maintaining a reference to the current ScriptingEnv.
Definition: Script.h:152
Table::loadHeader
void loadHeader(QStringList header)
Definition: Table.cpp:2509
MyTable::MyTable
MyTable(QWidget *parent=0, const char *name=0)
Definition: Table.cpp:3995
Table::Date
Definition: Table.h:63
Table::maxColumnValue
double maxColumnValue(int col, int startRow=0, int endRow=-1)
Definition: Table.cpp:3963
Table::d_numeric_precision
int d_numeric_precision
Definition: Table.h:378
Table::setTextFormat
void setTextFormat(int col)
Definition: Table.cpp:2204
Table::goToColumn
void goToColumn(int col)
Scroll to column (column starts with 1)
Definition: Table.cpp:3652
Table::PlotDesignation
PlotDesignation
Definition: Table.h:62
Table::saveReadOnlyInfo
QString saveReadOnlyInfo()
Definition: Table.cpp:896
Table::Decimal
Definition: Table.h:64
Table::NumericFormat
NumericFormat
Definition: Table.h:64
Table::cell
double cell(int row, int col)
Return the value of the cell as a double.
Definition: Table.cpp:2125
Table::isReadOnlyColumn
bool isReadOnlyColumn(int col)
Definition: Table.cpp:3727
Table::setCell
void setCell(int row, int col, double val)
Definition: Table.cpp:2136
Table
MDI window providing a spreadsheet table with column logic.
Definition: Table.h:57
MdiSubWindow.h
Table::Month
Definition: Table.h:63
Table::normalize
void normalize()
Definition: Table.cpp:1793
Table::resizeCols
void resizeCols(int)
Definition: Table.cpp:3480
Table::colIndexChanged
void colIndexChanged(int, int)
Table::setNumRows
void setNumRows(int rows)
Definition: Table.cpp:3419
Table::setColPlotDesignation
void setColPlotDesignation(int col, PlotDesignation pd)
Definition: Table.cpp:420
Table::calculate
bool calculate()
Compute selected cells from column formulae; use current cell if there's no selection.
Definition: Table.cpp:529
Table::Day
Definition: Table.h:63
Table::saveCommands
QString saveCommands()
Definition: Table.cpp:849
Table::selectedColumns
QStringList selectedColumns()
Definition: Table.cpp:1110
Table::sum
double sum(int col, int startRow=0, int endRow=-1)
Definition: Table.cpp:3881
Table::fromDateTime
static double fromDateTime(const QDateTime &dt)
Definition: Table.cpp:2275
Table::firstSelectedColumn
int firstSelectedColumn()
Definition: Table.cpp:1186
Table::init
void init(int rows, int cols)
Definition: Table.cpp:76
Table::print
void print()
Definition: Table.cpp:189
Table::columnRange
void columnRange(int c, double *min, double *max)
Definition: Table.cpp:1230
MdiSubWindow::name
QString name()
Return the window name.
Definition: MdiSubWindow.h:84
Table::setColumnHeader
void setColumnHeader(int index, const QString &label)
Internal function to change the column header.
Definition: Table.cpp:3662
Table::Table
Table(ScriptingEnv *env, int r, int c, const QString &label, ApplicationWindow *parent, const QString &name=QString(), Qt::WFlags f=0)
Definition: Table.cpp:70
Table::numRows
int numRows()
Definition: Table.cpp:2080
Table::setColumnTypes
void setColumnTypes(QList< int > ctl)
Definition: Table.h:287
Table::moveColumn
virtual void moveColumn(int, int, int)
Definition: Table.cpp:3747
Table::clearCommands
void clearCommands()
Clear all column formulae.
Definition: Table.cpp:502
Table::isRowSelected
bool isRowSelected(int row, bool full=false)
Definition: Table.h:275
Table::insertCols
virtual void insertCols(int start, int count)
Definition: Table.cpp:1269
Table::commentsEnabled
bool commentsEnabled()
Definition: Table.h:347
Table::setNumericPrecision
void setNumericPrecision(int prec)
Sets the number of significant digits.
Definition: Table.cpp:3690
Table::text
QString text(int row, int col)
Definition: Table.cpp:2148
Table::eventFilter
bool eventFilter(QObject *object, QEvent *e)
Definition: Table.cpp:3297