Logo Search packages:      
Sourcecode: qtiplot version File versions  Download package

TableStatistics Class Reference

#include <TableStatistics.h>

Inheritance diagram for TableStatistics:

Table MyWidget scripted

List of all members.

Detailed Description

Table that computes and displays statistics on another Table.

Future Plans

Make it possible to add new columns/rows to be monitored.

Definition at line 40 of file TableStatistics.h.

Public Types

enum  CaptionPolicy { Name = 0, Label = 1, Both = 2 }
 Possible window captions. More...
enum  ColType {
  Numeric = 0, Text = 1, Date = 2, Time = 3,
  Month = 4, Day = 5
enum  PlotDesignation {
  All = -1, None = 0, X = 1, Y = 2,
  Z = 3, xErr = 4, yErr = 5, Label = 6
enum  Status { Hidden = -1, Normal = 0, Minimized = 1, Maximized = 2 }
enum  Type { row, column }
 supported statistics types

Public Slots

bool calculate ()
 Compute selected cells from column formulae; use current cell if there's no selection.
bool calculate (int col, int startRow, int endRow)
 Compute specified cells from column formula.
double cell (int row, int col)
 Return the value of the cell as a double.
void cellEdited (int, int col)
void changeColWidth (int width, int col)
void changeColWidth (int width, bool allCols)
void clearCell (int row, int col)
QVarLengthArray< double > col (int ycol)
QString colComment (int col)
QStringList colComments ()
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, int *f, int *precision)
void columnNumericFormat (int col, char *f, int *precision)
QStringList columnsList ()
int columnType (int col)
Q3ValueList< int > columnTypes ()
int columnWidth (int col)
QStringList columnWidths ()
void colWidthModified (int, int, int)
 Notifies the main application that the width of a table column has been modified by the user.
int colX (int col)
int colY (int col)
bool commentsEnabled ()
void copy (Table *m)
QStringList drawableColumnSelection ()
bool exportASCII (const QString &fname, const QString &separator, bool withLabels=false, bool exportComments=false, bool exportSelection=false)
void exportPDF (const QString &fileName)
int firstSelectedColumn ()
int firstXCol ()
void freeMemory ()
QStringList getColumnsFormat ()
QStringList getCommands ()
void goToRow (int row)
 Scroll to row (row starts with 1).
void importASCII (const QString &fname, const QString &sep, int ignoredLines, bool renameCols, bool stripSpaces, bool simplifySpaces, bool importComments, bool newTable, const QString &commentString, bool readOnly=false)
void importMultipleASCIIFiles (const QString &fname, const QString &sep, int ignoredLines, bool renameCols, bool stripSpaces, bool simplifySpaces, bool importComments, const QString &commentString, bool readOnly, int importFileAs)
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 ()
int nonEmptyRows ()
void notifyChanges ()
 This slot notifies the main application that the table has been modified. Triggers the update of 2D plots.
bool noXColumn ()
bool noYColumn ()
int numCols ()
int numRows ()
int numSelectedRows ()
Q3ValueList< int > plotDesignations ()
void print (const QString &fileName)
void print ()
void removeCol (const QString &)
 remove statistics of removed columns (to be connected with Table::removedCol)
void renameCol (const QString &, const QString &)
 handle renaming of columns (to be connected with Table::changedColHeader)
void resizeCols (int)
void resizeRows (int)
void restore (const QStringList &lst)
 Not implemented yet.
QString saveAsTemplate (const QString &geometryInfo)
QString saveText ()
void saveToMemory ()
void saveToMemory (double **cells)
int selectedColsNumber ()
int selectedColumn ()
QStringList selectedColumns ()
QStringList selectedErrColumns ()
QStringList selectedYColumns ()
QStringList selectedYLabels ()
void setAscValues ()
void setBackgroundColor (const QColor &col)
void setCell (int row, int col, double val)
void setColComment (int col, const QString &s)
void setColComments (const QStringList &lst)
void setColName (int col, const QString &text, bool enumerateRight=false)
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 (const QStringList &ctl)
void setColumnTypes (Q3ValueList< int > ctl)
void setColWidths (const QStringList &widths)
void setCommand (int col, const QString &com)
 Set formula for column col.
void setCommands (const QString &com)
 Set all column formulae.
void setCommands (const QStringList &com)
 Set all column formulae.
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 setHeaderColor (const QColor &col)
void setHeaderColType ()
void setHeaderFont (const QFont &fnt)
void setMonthFormat (const QString &format, int col, bool updateCells=true)
void setNumCols (int cols)
void setNumRows (int rows)
void setPlotDesignation (PlotDesignation pd, bool rightColumns=false)
void setRandomValues ()
void setReadOnlyColumn (int col, bool on=true)
void setSelectedCol (int col)
void setText (int row, int col, const QString &text)
void setTextColor (const QColor &col)
void setTextFont (const QFont &fnt)
void setTextFormat (int col)
bool setTimeFormat (const QString &format, int col, bool updateCells=true)
void showComments (bool on=true)
MyTable * table ()
QString text (int row, int col)
void update (Table *, const QString &colName)
 update statistics after a column has changed (to be connected with Table::modifiedData)
int verticalHeaderWidth ()
QStringList YColumns ()
Column Operations
void addCol (PlotDesignation pd=Y)
void addColumns (int c, bool readOnly=false)
void clearCol ()
void insertCol ()
void insertCols (int start, int count)
void moveColumn (int, int, int)
void moveColumnBy (int cols)
void removeCol (const QStringList &list)
void removeCol ()
void swapColumns (int, int)
void clear ()
void clearSelection ()
void copySelection ()
void cutSelection ()
 Selection Operations.
void deselect ()
void pasteSelection ()
void selectAllTable ()
Event Handlers
void contextMenuEvent (QContextMenuEvent *e)
void customEvent (QEvent *e)
bool eventFilter (QObject *object, QEvent *e)
 Filters other object's events (customizes title bar's context menu).
Row Operations
void deleteRows (int startRow, int endRow)
void deleteSelectedRows ()
void insertRow ()
Saving and Restoring
QString & getNewSpecifications ()
QString & getSpecifications ()
QString newCaption ()
QString oldCaption ()
void restore (QString &spec)
QString saveColumnTypes ()
QString saveColumnWidths ()
QString saveCommands ()
QString saveComments ()
QString saveHeader ()
QString saveReadOnlyInfo ()
void setNewSpecifications ()
void setSpecifications (const QString &s)
void normalize ()
void normalizeCol (int col=-1)
void normalizeSelection ()
void sort (int type=0, int order=0, const QString &leadCol=QString())
 Sort all columns as in sortColumns(const QStringList&,int,int,const QString&).
void sortColAsc ()
 Sort the current column in ascending order.
void sortColDesc ()
 Sort the current column in descending order.
void sortColumn (int col=-1, int order=0)
 Sort the specified column.
void sortColumns (const QStringList &cols, int type=0, int order=0, const QString &leadCol=QString())
 Sort the specified columns.
void sortColumns (int type=0, int order=0, const QString &leadCol=QString())
 Sort selected columns as in sortColumns(const QStringList&,int,int,const QString&).
void sortColumnsDialog ()
 Display a dialog with some options for sorting the selected columns.
void sortTableDialog ()
 Display a dialog with some options for sorting all columns.


void changedColHeader (const QString &, const QString &)
void closedWindow (MyWidget *)
 Emitted when the window was closed.
void colValuesDialog ()
void createTable (const QString &, int, int, const QString &)
void hiddenWindow (MyWidget *)
 Emitted when the window was hidden.
void modifiedData (Table *, const QString &)
void modifiedWindow (QWidget *)
void moved ()
void optionsDialog ()
void removedCol (const QString &)
void resizedTable (QWidget *)
void resizedWindow (QWidget *)
void showContextMenu (bool selection)
void showTitleBarMenu ()
 Emitted when the title bar recieves a QContextMenuEvent.
void statusChanged (MyWidget *)
 Emitted when the window status changed.

Public Member Functions

void askOnCloseEvent (bool ask)
 Toggle the "ask on close" flag.
QString aspect ()
 Return the window status as a string.
Tablebase () const
 return the base table of which statistics are displayed
QString birthDate ()
 Return the creation date.
CaptionPolicy captionPolicy ()
 Return the caption policy.
void closeEvent (QCloseEvent *)
 Close event handler.
Folderfolder ()
 Returns the pointer to the parent folder of the window.
Q3TableSelection getSelection ()
QLocale locale ()
QString name ()
 Return the window name.
void resetHeader ()
void resizeEvent (QResizeEvent *)
virtual QString saveToString (const QString &geometry, bool=false)
void scriptingChangeEvent (ScriptingChangeEvent *)
void setBirthDate (const QString &s)
 Set the creation date.
void setCaptionPolicy (CaptionPolicy policy)
 Set the caption policy.
void setFolder (Folder *f)
 Initializes the pointer to the parent folder of the window.
virtual void setHidden ()
 Notifies that a window was hidden by a direct user action.
void setLocale (const QLocale &l)
void setMaximized ()
void setMinimized ()
void setName (const QString &s)
 Set the window name.
void setNormal ()
void setNumericPrecision (int prec)
 Sets the number of significant digits.
void setStatus (Status s)
 Set the window status flag (hidden, normal, minimized or maximized).
void setWindowLabel (const QString &s)
 Set the window label.
virtual QString sizeToString ()
 Size of the widget as a string.
Status status ()
 Return the window status flag (hidden, normal, minimized or maximized).
 TableStatistics (ScriptingEnv *env, QWidget *parent, Table *base, Type, QList< int > targets)
Type type () const
 return the type of statistics
void updateDecimalSeparators (const QLocale &oldSeparators)
 Updates the decimal separators when importing ASCII files on user request.
void updateDecimalSeparators ()
 Updates the decimal separators in the numerical columns on user request.
QString windowLabel ()
 Return the window label.

Protected Member Functions

virtual void changeEvent (QEvent *event)
 Catches parent changes (in order to gain access to the title bar).

Protected Attributes

MyTable * d_table
QWidget * titleBar
 Title bar of this MDI window if it currently belongs to a QWorkspace, NULL else.

Private Attributes

QList< int > d_targets
Type d_type

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

Generated by  Doxygen 1.6.0   Back to index