Worksheet Class Reference

[libkorigin Index] [libkorigin Heirarchy]


This is the main data worksheet for the korigin project. More...

#include </home/mh/korigin/korigin/doc/tmp/worksheet.h>

Inherits: QWidget

Public Members

Public Slots

Protected Members

Signals


Detailed Description

This is the main data worksheet for the korigin project. It is a very nasty code and perhaps it will be revisited the next time.


const char* name() const

return the name of the worksheet

static Worksheet* openWorksheetFromDisk()

reads a worksheet from disk. First a filedialog is shown. Returns 0 if file not found. Otherwise returns the Worksheet opened.

static Worksheet* loadFromDisk(QFile* file)

Reads a worksheet out of an already opened file. The "[worksheet]" entry should already be read out.

Column findColumn(const char* name)

Find the column to the specified column name

QPopupMenu* getMenu(QPopupMenu* predefined)

returns a pointer to the worksheets main popup for the main menu

QPopupMenu* getEditMenu(QPopupMenu* predefined)

returns a pointer to the worksheets edit popup for toplevel

const char* getDescription() const

returns a description string for the toplevel widget

QPixmap* getSymbol()

depending on wheather worksheet is active or not two different pixmaps will be returned

TreeItem* treeitem()

return a tree item for the main tree view

Worksheet(int _numRows=DEFAULTNUMROWS, int _numCols=DEFAULTNUMCOLS, QWidget* parent=0, const char* name=0)

if _numCols = 0 the worksheet waits for the insertColumn (ID) command the _numRows can then have a indifferent value

Parameters:
name not really needed, this is not the worksheets name but a name used by QObject

~Worksheet()

deletes the worksheet and also removes the nameentry of the worksheet in the worksheets name list (static members).

void setCellContent(int row, int col, char* content)

set cell content of a specific row, col. Not needed in the moment.

const char* getCellContent(int row, int col) const

get cell content of a specific row, col. Not needed in the moment.

Column* getSelected()

returns the IDs of the Worksheets marked columns This means: the x and xerror (implicit marked columns) and the marked columns.

Returns the FIRST occurance of x and xerr until now. If there is nothing selected the function will return NULL. If you have multiple x in your worksheet the first occurance of x will be returned or just highlight x.

All not found columns will return NULL.

void setTable(Table* ta)

Set the worksheet data table. The table name will be checked because double occurance of same name is not allowed. The name will be changed if necessary. Also repaints the worksheet.

Table* getTable()

return the worksheets data table

void insertColumn(int n, int type, int position)

insert Columns into the worksheet, the first function will also allocate memory and set the title to a title not already given in the worksheet

insert "n" columns ot "type" 1 = Data 2 = Label before "position". The memory will be allocated at Mr. M by Worksheet

void saveToDisk(QFile* file)

save worksheet into file. file is a already opened QFile. This slot does not show any widget. Therefore use saveWorksheet. Important for session saving later.

void saveWorksheetAs()

save the worksheet onto disk. This slot shows a filedialog and opens the file selected. Then it calls saveToDisk. Afterwards it closes the opend file.

void repaint()

repaints the worksheet. Perhaps needed if data changes

void gotDeleteEvent()

the worksheet gets a closeEvent and the user choosed to delete the data from the worksheet. The Worksheet should be deleted out of the list of worksheets.

See Also:
~Worksheet

void activeWSChanged(Worksheet*)

mouseclick into the worksheet emits this signal because this action changes the active worksheet displayed by toplevel.

void treeItemChanged()

emitted when the tree item of the worksheet changes, i.e. when the description or the icon changes.

void dataChanged()

Plots have to react with repaint on this signal. Not yet emitted.

void updateDescription()

It could happen, that the description of a table in the toplevel widget should change. Not yet emitted.


  • Author: Martin Häfner mh@ap-dec717c.physik.uni-karlsruhe.de
  • Version: 0.3
  • Documentation generated by mh@jeff_clever on Thu Feb 5 14:15:25 MET 1998
Kdoc