LibEngsas
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ESpreadsheetCsv Class Reference

#include <espreadsheetcsv.h>

+ Inheritance diagram for ESpreadsheetCsv:
+ Collaboration diagram for ESpreadsheetCsv:

Public Member Functions

 ESpreadsheetCsv (QString absFilePath, QString separator, QString textmarker, QTextCodec *encoding, ESpreadsheetProvider *provider)
 ~ESpreadsheetCsv ()
bool setData (ESpreadsheetCell cell)
 Adds value to this spreadsheet at ESpreadsheetCell::row() and ESpreadsheetCell::column of cell.
ESpreadsheetCell data (int row, int column) const
 Returns the data of the cell row, column.
int rowCount () const
 Returns the number of rows within this spreadsheet.
int columnCount () const
 Returns the number of columns within this spreadsheet.
bool writeData ()
- Public Member Functions inherited from ESpreadsheet
 ESpreadsheet (ESpreadsheetProvider *provider, QObject *parent=NULL)
QString name () const
virtual void setName (QString name)
ESpreadsheetProviderprovider () 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.
bool setForeground (int row, int column, QBrush foreground)
 Sets the foreground of cell row and column to foreground.
bool setBackground (int row, int column, QBrush background)
 Sets the background of cell row and column to background.
bool setFont (int row, int column, QFont font)
 Sets the font of cell row and column to font.
bool setAlignment (int row, int column, Qt::AlignmentFlag alignment)
 Sets the alignment of cell row and column to alignment.
bool data (QAbstractItemModel *model, QModelIndex root=QModelIndex()) const
 Loads the data of this spreadsheet into model as childs of index root.
- Public Member Functions inherited from EObject
 EObject (QObject *parent=0)
virtual ~EObject ()
void connectByPass (QObject *object)

Private Member Functions

void loadSheet ()
QList< QVariant > tokenize (QString line, bool &withinQuotes)

Private Attributes

QList< QList< QVariant > > myData
QFile * file
QString mySeparator
QString myTextmarker
QTextCodec * myEncoding

Additional Inherited Members

- Public Types inherited from ESpreadsheet
enum  Header { HeaderNone = 0x0, HeaderVertical = 0x1, HeaderHorizontal = 0x2, HeaderAll = HeaderVertical | HeaderHorizontal }
 Used by setData(QAbstractItemModel*, QModelIndex, Header) to determine which header to add. More...
- Public Slots inherited from EObject
virtual void reloadSettings ()
 Used to reload the settings.
- Signals inherited from EObject
void error (const QString &message)
void warning (const QString &message)
void information (const QString &message)
void reloadEnableActions ()
 Request reloading of enabled actions in EMainWindow.
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.
void doReloadSettings ()
 Emitted to bring the reload request back to the farest child.
- Static Public Member Functions inherited from EObject
static void connectByPass (QObject *parent, QObject *child)
- Protected Slots inherited from EObject
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 ()
- Protected Member Functions inherited from ESpreadsheet
 ESpreadsheet (QObject *parent=NULL)
 Constructs an ESpreadsheet without a provider.

Constructor & Destructor Documentation

ESpreadsheetCsv::ESpreadsheetCsv ( QString  absFilePath,
QString  separator,
QString  textmarker,
QTextCodec *  encoding,
ESpreadsheetProvider provider 
)

+ Here is the call graph for this function:

ESpreadsheetCsv::~ESpreadsheetCsv ( )

Member Function Documentation

int ESpreadsheetCsv::columnCount ( ) const
virtual

Returns the number of columns within this spreadsheet.

Note
This function should be implemented by the plugin providing an ESpreadsheetProvider.

Implements ESpreadsheet.

+ Here is the caller graph for this function:

ESpreadsheetCell ESpreadsheetCsv::data ( int  row,
int  column 
) const
virtual

Returns the data of the cell row, column.

Note
This function should be implemented by the plugin providing an ESpreadsheetProvider.

Implements ESpreadsheet.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ESpreadsheetCsv::loadSheet ( )
private

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int ESpreadsheetCsv::rowCount ( ) const
virtual

Returns the number of rows within this spreadsheet.

Note
This function should be implemented by the plugin providing an ESpreadsheetProvider.

Implements ESpreadsheet.

+ Here is the caller graph for this function:

bool ESpreadsheetCsv::setData ( ESpreadsheetCell  cell)
virtual

Adds value to this spreadsheet at ESpreadsheetCell::row() and ESpreadsheetCell::column of cell.

To manipulate the text font, provide font, alignment and foreground. To specifiy a background color, set background.

See Also
setData(QAbstractItemModel*, QModelIndex)
setForeground()
setBackground()
setFont()
setAlignment()
data(int, int)
data(QAbstractItemModel*, QModelIndex)
Note
This function should be implemented by the plugin providing an ESpreadsheetProvider.

Implements ESpreadsheet.

+ Here is the call graph for this function:

QList< QVariant > ESpreadsheetCsv::tokenize ( QString  line,
bool &  withinQuotes 
)
private

+ Here is the caller graph for this function:

bool ESpreadsheetCsv::writeData ( )

+ Here is the caller graph for this function:

Member Data Documentation

QFile* ESpreadsheetCsv::file
private
QList<QList<QVariant> > ESpreadsheetCsv::myData
private
QTextCodec* ESpreadsheetCsv::myEncoding
private
QString ESpreadsheetCsv::mySeparator
private
QString ESpreadsheetCsv::myTextmarker
private

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