• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

kaddressbook

Signals | Public Member Functions | List of all members
QCsvModel Class Reference

#include <qcsvmodel.h>

Inherits QAbstractTableModel.

Signals

void finishedLoading ()
 

Public Member Functions

 QCsvModel (QObject *parent)
 
 ~QCsvModel ()
 
virtual int columnCount (const QModelIndex &parent=QModelIndex()) const
 
virtual QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
 
QChar delimiter () const
 
virtual Qt::ItemFlags flags (const QModelIndex &index) const
 
bool load (QIODevice *device)
 
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const
 
virtual bool setData (const QModelIndex &index, const QVariant &data, int role=Qt::EditRole)
 
void setDelimiter (const QChar &delimiter)
 
void setStartRow (uint startRow)
 
void setTextCodec (QTextCodec *textCodec)
 
void setTextQuote (const QChar &textQuote)
 
uint startRow () const
 
QTextCodec * textCodec () const
 
QChar textQuote () const
 

Detailed Description

Definition at line 25 of file qcsvmodel.h.

Constructor & Destructor Documentation

QCsvModel::QCsvModel ( QObject *  parent)
explicit

Creates a new csv model.

Definition at line 147 of file qcsvmodel.cpp.

QCsvModel::~QCsvModel ( )

Destroys the csv model.

Definition at line 161 of file qcsvmodel.cpp.

Member Function Documentation

int QCsvModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
virtual

Inherited from QAbstractTableModel.

Definition at line 263 of file qcsvmodel.cpp.

QVariant QCsvModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
virtual

Inherited from QAbstractTableModel.

Definition at line 281 of file qcsvmodel.cpp.

QChar QCsvModel::delimiter ( ) const

Returns the delimiter that is used as delimiter for fields.

Definition at line 216 of file qcsvmodel.cpp.

void QCsvModel::finishedLoading ( )
signal

This signal is emitted whenever the model has loaded all data.

Qt::ItemFlags QCsvModel::flags ( const QModelIndex &  index) const
virtual

Inherited from QAbstractTableModel.

Definition at line 326 of file qcsvmodel.cpp.

bool QCsvModel::load ( QIODevice *  device)

Loads the data from the device into the model.

Definition at line 166 of file qcsvmodel.cpp.

int QCsvModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
virtual

Inherited from QAbstractTableModel.

Definition at line 272 of file qcsvmodel.cpp.

bool QCsvModel::setData ( const QModelIndex &  index,
const QVariant &  data,
int  role = Qt::EditRole 
)
virtual

Inherited from QAbstractTableModel.

Definition at line 313 of file qcsvmodel.cpp.

void QCsvModel::setDelimiter ( const QChar &  delimiter)

Sets the character that is used as delimiter for fields.

The default is ' '.

Definition at line 200 of file qcsvmodel.cpp.

void QCsvModel::setStartRow ( uint  startRow)

Sets the row from where the parsing shall be started.

Some csv files have some kind of header in the first line with the column titles. To retrieve only the real data, set the start row to '1' in this case.

The default start row is 0.

Definition at line 221 of file qcsvmodel.cpp.

void QCsvModel::setTextCodec ( QTextCodec *  textCodec)

Sets the text codec that shall be used for parsing the csv list.

The default is the system locale.

Definition at line 242 of file qcsvmodel.cpp.

void QCsvModel::setTextQuote ( const QChar &  textQuote)

Sets the character that is used for quoting.

The default is '"'.

Definition at line 179 of file qcsvmodel.cpp.

uint QCsvModel::startRow ( ) const

Returns the start row.

Definition at line 237 of file qcsvmodel.cpp.

QTextCodec * QCsvModel::textCodec ( ) const

Returns the text codec that is used for parsing the csv list.

Definition at line 258 of file qcsvmodel.cpp.

QChar QCsvModel::textQuote ( ) const

Returns the character that is used for quoting.

Definition at line 195 of file qcsvmodel.cpp.


The documentation for this class was generated from the following files:
  • qcsvmodel.h
  • qcsvmodel.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kaddressbook

Skip menu "kaddressbook"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal