20 #ifndef ESPREADSHEET_H
21 #define ESPREADSHEET_H
30 #include <QModelIndex>
34 class QAbstractItemModel;
70 HeaderHorizontal = 0x2,
71 HeaderAll = HeaderVertical | HeaderHorizontal
73 Q_DECLARE_FLAGS(Headers, Header)
76 virtual
void setName(QString name);
95 bool setData(QAbstractItemModel* model,
ESpreadsheet::Headers header =
ESpreadsheet::HeaderNone, QModelIndex root = QModelIndex());
123 bool setForeground(
int row,
int column, QBrush foreground);
133 bool setBackground(
int row,
int column, QBrush background);
143 bool setFont(
int row,
int column, QFont font);
153 bool setAlignment(
int row,
int column, Qt::AlignmentFlag alignment);
161 bool data(QAbstractItemModel *model, QModelIndex root = QModelIndex()) const;
174 virtual
int rowCount() const = 0;
180 virtual
int columnCount() const = 0;
197 #endif // ESPREADSHEET_H
Mostly the same as EWidget but for QObject as base class.
Definition: eobject.h:42
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).
Definition: espreadsheet.h:58
#define E_CORE_EXPORT
Definition: eglobal.h:107
Header
Used by setData(QAbstractItemModel*, QModelIndex, Header) to determine which header to add...
Definition: espreadsheet.h:67
Represents one cell of a ESpreadsheetIt contains the value (see value()) of a cell and also the forma...
Definition: espreadsheetcell.h:40
Interface to implement spreadsheet providers (e. g. to create excel files or ods, ...
Definition: espreadsheetprovider.h:38