QicsTable Documentation Set

QicsDataVariant Class Reference

A variant data item. More...

#include <QicsDataItem.h>

Inherits QicsDataItem.

List of all members.

Public Types

enum  QicsWideKeyAction { Del_DeleteSelected, CtrlA_SelectAll }
enum  QicsBoxBorders {
  TopBorder = 1, BottomBorder = 2, LeftBorder = 4, RightBorder = 8,
  AllBorders = 1+2+4+8
enum  QicsCopyPolicy {
  CopyData = 1, CopyAttributes = 2, CopyDimensions = 4, CopySpans = 8,
  CopyAll = 1+2+4+8
enum  QicsClearPolicy { ClearData = 1, ClearAttributes = 2, ClearSpans = 4, ClearAll = 1+2+4 }
enum  QicsSortMode { QicsStableSort = 0, QicsQuickSort }
enum  QicsCellOverflowBehavior { Clip = 0, Overflow, ToolTip }
enum  QicsCurrentCellStyle { Spreadsheet = 0, NormalSelected }
enum  QicsSelectionStyle { Normal = 0, Exclusive }
enum  QicsSelectCurrentCellPolicy { Follow = 0, Static }
enum  QicsFillHandleEventType { FillHandlePressed = 0, FillHandleReleased, FillHandleDoubleClicked, FillHandleDragged }
enum  QicsGridCellClipping { AllowPartial = 0, NoDisplayOnPartial, UseClippedSymbol }
enum  QicsGridType { TableGrid = 0, RowHeaderGrid, ColumnHeaderGrid }
enum  QicsHeaderType { RowHeader = 0, ColumnHeader }
enum  QicsIndexType { NoIndex = 0, RowIndex, ColumnIndex, RowAndColumnIndex }
enum  QicsLineStyle { None = 0, Plain, Raised, Sunken }
enum  QicsRepaintBehavior { RepaintOff = 0, RepaintOn = 1, RepaintCalcOnly = 2 }
enum  QicsScrollBarMode { Auto = 0, AlwaysOff, AlwaysOn }
enum  QicsScrollDirection {
  ScrollNone = 0, ScrollUp = 1, ScrollDown = 2, ScrollLeft = 4,
  ScrollRight = 8, ScrollToRow = 16, ScrollToColumn = 32
enum  QicsSelectionPolicy {
  SelectNone = 0, SelectSingle, SelectMultiple, SelectSingleRow,
enum  QicsSelectionType {
  SelectionNone = 0, SelectionBegin, SelectionDrag, SelectionEnd,
  SelectionExtend, SelectionAdd, SelectionReplace
enum  QicsSortOrder { Ascending = 0, Descending }
enum  QicsTableDisplayOption { DisplayNever = 0, DisplayAlways, DisplayFirstPage }
enum  QicsTraversalKeyEditBehavior { TraverseWithinCell = 0, TraverseBetweenCells }
enum  QicsCurrentCellDraggingPolicy { DragCurrent = 0, DragSelection }
enum  QicsCellWidthMode { ChangeOnlyHeight = 0, ChangeHeightWidth }
enum  QicsCellDecorationStyle { Flat = 0, Styled = 1 }

Public Member Functions

 QicsDataVariant ()
 QicsDataVariant (const QicsDataVariant &ds)
 QicsDataVariant (QVariant::Type type)
 QicsDataVariant (int typeOrUserType, const void *copy)
 QicsDataVariant (const QVariant &p)
 QicsDataVariant (QDataStream &s)
 QicsDataVariant (int val)
 QicsDataVariant (uint val)
 QicsDataVariant (qlonglong val)
 QicsDataVariant (qulonglong val)
 QicsDataVariant (bool val)
 QicsDataVariant (double val)
 QicsDataVariant (const char *val)
 QicsDataVariant (const QByteArray &val)
 QicsDataVariant (const QBitArray &val)
 QicsDataVariant (const QString &val)
 QicsDataVariant (const QLatin1String &val)
 QicsDataVariant (const QStringList &val)
 QicsDataVariant (const QChar &c)
 QicsDataVariant (const QDate &val)
 QicsDataVariant (const QTime &val)
 QicsDataVariant (const QDateTime &val)
 QicsDataVariant (const QList< QVariant > &val)
 QicsDataVariant (const QMap< QString, QVariant > &val)
 QicsDataVariant (const QSize &val)
 QicsDataVariant (const QSizeF &val)
 QicsDataVariant (const QPoint &val)
 QicsDataVariant (const QPointF &val)
 QicsDataVariant (const QLine &val)
 QicsDataVariant (const QLineF &val)
 QicsDataVariant (const QRect &val)
 QicsDataVariant (const QRectF &val)
 QicsDataVariant (const QUrl &val)
 QicsDataVariant (const QLocale &l)
 QicsDataVariant (const QRegExp &regExp)
 QicsDataVariant (Qt::GlobalColor color)
QicsDataItemcreate (void) const
QicsDataItemclone (void) const
virtual QString typeString (void) const
virtual QicsDataItemType type (void) const
virtual bool setString (const QString &qs)
virtual QString format (const char *fmt_string) const
bool setData (const QVariant &v)
QVariant data (void) const
virtual const QString string (void) const
int compareTo (const QicsDataItem &x) const
void encode (QDataStream &ds) const

Static Public Member Functions

static QString typeName (void)
static QicsDataItemdecode (QDataStream &ds)
static QicsDataItemfromString (const QString &str)
static void registerType (const QString type_name, QicsDataItemParser parser, QicsDataItemDecoder decoder)
static void registerTypeI (const QString type_name, QicsDataItemParser parser, QicsDataItemDecoderWithType decoder)
static void registerParser (QicsDataItemParser parser)

Protected Attributes

QVariant myData

Detailed Description

A variant data item.

Represents an variant value.

Member Enumeration Documentation

enum Qics::QicsWideKeyAction [inherited]

Denotes global key actions available for the table grid.

enum Qics::QicsBoxBorders [inherited]

Denotes the box borders of cell region.

enum Qics::QicsCopyPolicy [inherited]

Denotes the copying policy during copy/paste and drag/drop operations.

enum Qics::QicsClearPolicy [inherited]

Denotes the clearing policy during cut and delete operations.

enum Qics::QicsSortMode [inherited]

Denotes the sort algorithm which is used.

enum Qics::QicsCellOverflowBehavior [inherited]

Denotes the behavior of grids when handling cells whose contents cannot be displayed in the boundaries of the cell.

enum Qics::QicsCurrentCellStyle [inherited]

Denotes the visual style that the current cell of the table will be drawn with.

enum Qics::QicsSelectionStyle [inherited]

enum Qics::QicsSelectCurrentCellPolicy [inherited]

enum Qics::QicsGridCellClipping [inherited]

Denotes the policy for displaying text that is too long to fit in its cell.

enum Qics::QicsGridType [inherited]

Specifies a type of grid object.

enum Qics::QicsHeaderType [inherited]

Specifies the type of table header.

enum Qics::QicsIndexType [inherited]

Specifies the type of table index.

enum Qics::QicsLineStyle [inherited]

Denotes the style of lines and borders in the table widget.

enum Qics::QicsRepaintBehavior [inherited]

Specifies the recalculation and repainting behavior of tables and grids.

enum Qics::QicsScrollBarMode [inherited]

Specifies the various modes of QicsTable's scroll bars.

enum Qics::QicsScrollDirection [inherited]

Denotes a direction for scrolling operations, or that an absolute scroll should occur.

enum Qics::QicsSelectionPolicy [inherited]

Denotes the selection policy for the table.

enum Qics::QicsSortOrder [inherited]

Specifies whenever ordering should be ascending or descending.

enum Qics::QicsTableDisplayOption [inherited]

Specifies a printing display policy for elements of the table.

enum Qics::QicsTraversalKeyEditBehavior [inherited]

Specifies the behavior of the traversal keys. (left, right, up, down, etc) while editing a cell.

enum Qics::QicsCurrentCellDraggingPolicy [inherited]

Specifies the behavior of drag&drop operations when it has began from current cell.

enum Qics::QicsCellWidthMode [inherited]

Specifies the behavior of set cell font.

enum Qics::QicsCellDecorationStyle [inherited]

Specifies the cell decoration style for headers.

Constructor & Destructor Documentation

QicsDataVariant::QicsDataVariant (  )  [inline]

Constructs a new data item. The initial value of this item is the invalid QVariant.

QicsDataVariant::QicsDataVariant ( const QicsDataVariant ds  ) 

Copy Constructor

Member Function Documentation

QicsDataItem* QicsDataVariant::create ( void   )  const [inline, virtual]

A "virtual constructor". Returns an empty, newly allocated object of the same type as this object.

Implements QicsDataItem.

QicsDataItem* QicsDataVariant::clone ( void   )  const [inline, virtual]

A "virtual copy constructor". Returns a newly allocated copy of this object.

Implements QicsDataItem.

static QString QicsDataVariant::typeName ( void   )  [inline, static]

Returns "qvariant".

virtual QString QicsDataVariant::typeString ( void   )  const [inline, virtual]

Returns QicsDataVariant::typeName()

Implements QicsDataItem.

virtual QicsDataItemType QicsDataVariant::type ( void   )  const [inline, virtual]

Returns the data type of the item, QicsDataItem_Variant

Implements QicsDataItem.

virtual bool QicsDataVariant::setString ( const QString &  qs  )  [inline, virtual]

Converts (if necessary) qs to the appropriate data type and sets the contents of the data item to that value.

Implements QicsDataItem.

virtual QString QicsDataVariant::format ( const char *   )  const [inline, virtual]

Converts (if necessary) the contents of the data item to a formatted QString using the supplied formatting string, and returns the formatted string. The exact definition of the formatting string varies among data types.

Reimplemented from QicsDataItem.

bool QicsDataVariant::setData ( const QVariant &  v  )  [inline]

Sets the value of this data item to v.

QVariant QicsDataVariant::data ( void   )  const [inline]

Returns a copy of the value of this data item.

virtual const QString QicsDataVariant::string ( void   )  const [inline, virtual]

Converts (if necessary) the contents of the data item to a QString and returns that string.

Implements QicsDataItem.

int QicsDataVariant::compareTo ( const QicsDataItem x  )  const [virtual]

Compare another data item x to me for the purpose of sorting. compareTo returns a value < 0 if this items is less than x, 0 if this item == x, and > 0 if this item is greater than x.

Reimplemented from QicsDataItem.

void QicsDataVariant::encode ( QDataStream &  ds  )  const [inline, virtual]

Encodes the value of the data item onto stream ds.

Implements QicsDataItem.

static QicsDataItem* QicsDataVariant::decode ( QDataStream &  ds  )  [static]

Returns a new string data item based on the data encoded in ds.

Reimplemented from QicsDataItem.

static QicsDataItem* QicsDataVariant::fromString ( const QString &  str  )  [static]

Returns a new data item based on the content of the string.

Reimplemented from QicsDataItem.

static void QicsDataItem::registerType ( const QString  type_name,
QicsDataItemParser  parser,
QicsDataItemDecoder  decoder 
) [static, inherited]

Used to register a new, user-defined type so that the type can be used in streaming, drag and drop, and cut and paste operations. User-defined data item parsers will be called in the order that their types are registered.

type_name name of the new type
parser static member function of the new type that parses an item from a QString
decoder static member function of the new type that decodes an item from a QDataStream
See also:

static void QicsDataItem::registerParser ( QicsDataItemParser  parser  )  [static, inherited]

Used to register a new data item parser algorithm. This parser can be used to reimplement the default parsing "algorithm" of QicsDataItem. If a user defined parser method cannot successfully parse a string, it should return 0. If the user defined parser cannot parse a string, the default QicsDataItem parsing algorithm will be used. The default algorithm first tries any individual user defined type parsers (see registerType()), then attempts to parse the built in types.

parser the new data item parser method
See also:

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

All trademarks and copyrights on this page are properties of their respective owners.
The rest is copyright 1999-2006 Integrated Computer Solutions, Inc.