A spreadsheet, within a spreadsheet file.A spreadsheet consists of cells of type ESpreadsheetCell, which are ordered in rows and columns. An object of this type can be used to manipulate the hold data (see e. g. setData(ESpreadsheetCell)). To retrieve the cell content use data(int, int).
More...
#include <espreadsheet.h>
|
| ESpreadsheet (ESpreadsheetProvider *provider, QObject *parent=NULL) |
|
QString | name () const |
|
virtual void | setName (QString name) |
|
ESpreadsheetProvider * | provider () const |
|
void | setProvider (ESpreadsheetProvider *provider) |
|
bool | setData (QAbstractItemModel *model, ESpreadsheet::Headers header=ESpreadsheet::HeaderNone, QModelIndex root=QModelIndex()) |
| Adds the data of the childs of index root to this spreadsheet. More...
|
|
virtual bool | setData (ESpreadsheetCell cell)=0 |
| Adds value to this spreadsheet at ESpreadsheetCell::row() and ESpreadsheetCell::column of cell . More...
|
|
bool | setForeground (int row, int column, QBrush foreground) |
| Sets the foreground of cell row and column to foreground . More...
|
|
bool | setBackground (int row, int column, QBrush background) |
| Sets the background of cell row and column to background . More...
|
|
bool | setFont (int row, int column, QFont font) |
| Sets the font of cell row and column to font . More...
|
|
bool | setAlignment (int row, int column, Qt::AlignmentFlag alignment) |
| Sets the alignment of cell row and column to alignment . More...
|
|
bool | data (QAbstractItemModel *model, QModelIndex root=QModelIndex()) const |
| Loads the data of this spreadsheet into model as childs of index root . More...
|
|
virtual ESpreadsheetCell | data (int row, int column) const =0 |
| Returns the data of the cell row , column . More...
|
|
virtual int | rowCount () const =0 |
| Returns the number of rows within this spreadsheet. More...
|
|
virtual int | columnCount () const =0 |
| Returns the number of columns within this spreadsheet. More...
|
|
| EObject (QObject *parent=0) |
|
virtual | ~EObject () |
|
void | connectByPass (QObject *object) |
|
|
virtual void | reloadSettings () |
| Used to reload the settings. More...
|
|
void | error (const QString &message) |
|
void | warning (const QString &message) |
|
void | information (const QString &message) |
|
void | reloadEnableActions () |
| Request reloading of enabled actions in EMainWindow. More...
|
|
void | addMenu (QMenu *newMenu, const QString &parent, QString before=QString()) |
|
void | addAction (QAction *newAction, const QString &parent, QString before=QString()) |
|
void | addToolBar (QToolBar *newToolBar, Qt::ToolBarArea area=Qt::TopToolBarArea) |
|
void | addNewDockWidget (QDockWidget *widget, const Qt::DockWidgetArea &area) |
|
void | setCentralWidget (QWidget *centralWidget) |
|
void | showSettings () |
|
void | showHelp (const QString &page) |
|
void | showStatusWidget (QWidget *widget) |
|
void | reloadSettingsRequest () |
| Indicates, that a reload of the settings is needed. More...
|
|
void | doReloadSettings () |
| Emitted to bring the reload request back to the farest child. More...
|
|
static void | connectByPass (QObject *parent, QObject *child) |
|
virtual void | errorByPass (const QString &message) |
|
virtual void | warningByPass (const QString &message) |
|
virtual void | informationByPass (const QString &message) |
|
virtual void | reloadEnableActionsByPass () |
|
virtual void | addMenuByPass (QMenu *newMenu, const QString &parent, QString before=QString()) |
|
virtual void | addActionByPass (QAction *newAction, const QString &parent, QString before=QString()) |
|
virtual void | addToolBarByPass (QToolBar *newToolBar, Qt::ToolBarArea area=Qt::TopToolBarArea) |
|
virtual void | addNewDockWidgetByPass (QDockWidget *widget, const Qt::DockWidgetArea &area) |
|
virtual void | setCentralWidgetByPass (QWidget *centralWidget) |
|
virtual void | showSettingsByPass () |
|
virtual void | showHelpByPass (const QString &page) |
|
virtual void | showStatusWidgetByPass (QWidget *widget) |
|
virtual void | reloadSettingsRequestByPass () |
|
A spreadsheet, within a spreadsheet file.
A spreadsheet consists of cells of type ESpreadsheetCell, which are ordered in rows and columns. An object of this type can be used to manipulate the hold data (see e. g. setData(ESpreadsheetCell)). To retrieve the cell content use data(int, int).
ESpreadsheet can also deal with QAbstractItemModel. It provides the functions setData(QAbstractItemModel*, QModelIndex) and data(QAbstractItemModel*, QModelIndex) to write and read data from and into a QAbstractItemModel.
To append an spreadsheet to a file (and getting an pointer to an ESpreadsheet object back), use ESpreadsheetHandler::appendSpreadsheet().
To implement your own ESpreadsheet subclass within your ESpreadsheetProvider, implement setData(ESpreadsheetCell), data(int, int), rowCount() and columnCount(). May be you also want to overload setName().
- See Also
- ESpreadsheetCell
-
ESpreadsheetHandler
-
ESpreadsheetProvider
Used by setData(QAbstractItemModel*, QModelIndex, Header) to determine which header to add.
Enumerator |
---|
HeaderNone |
|
HeaderVertical |
|
HeaderHorizontal |
|
HeaderAll |
|
ESpreadsheet::ESpreadsheet |
( |
QObject * |
parent = NULL | ) |
|
|
protected |
Constructs an ESpreadsheet without a provider.
You should set a provider with setProvider() within the constructor of your subclass!
virtual int ESpreadsheet::columnCount |
( |
| ) |
const |
|
pure virtual |
bool ESpreadsheet::data |
( |
QAbstractItemModel * |
model, |
|
|
QModelIndex |
root = QModelIndex() |
|
) |
| const |
Loads the data of this spreadsheet into model
as childs of index root
.
Internally it uses data(int row, int column);
QString ESpreadsheet::name |
( |
| ) |
const |
virtual int ESpreadsheet::rowCount |
( |
| ) |
const |
|
pure virtual |
bool ESpreadsheet::setAlignment |
( |
int |
row, |
|
|
int |
column, |
|
|
Qt::AlignmentFlag |
alignment |
|
) |
| |
bool ESpreadsheet::setBackground |
( |
int |
row, |
|
|
int |
column, |
|
|
QBrush |
background |
|
) |
| |
bool ESpreadsheet::setData |
( |
QAbstractItemModel * |
model, |
|
|
ESpreadsheet::Headers |
header = ESpreadsheet::HeaderNone , |
|
|
QModelIndex |
root = QModelIndex() |
|
) |
| |
bool ESpreadsheet::setFont |
( |
int |
row, |
|
|
int |
column, |
|
|
QFont |
font |
|
) |
| |
bool ESpreadsheet::setForeground |
( |
int |
row, |
|
|
int |
column, |
|
|
QBrush |
foreground |
|
) |
| |
void ESpreadsheet::setName |
( |
QString |
name | ) |
|
|
virtual |
QString ESpreadsheet::myName |
|
private |
The documentation for this class was generated from the following files: