Quark  0.1
Field Class Reference

A class representing a field (a column) in a Quark table model. More...

#include <Field.h++>

Public Member Functions

 Field (const QString &name=QString())
 
virtual ~Field ()
 Destructor. More...
 
FieldsetAlignment (Qt::Alignment alignment)
 Sets the text alignment for the field. More...
 
FieldsetHeaderAlignment (Qt::Alignment alignment)
 Sets the text alignment for the column header for the field. More...
 
FieldsetPreferredCharWidth (int width)
 Sets the preferred width of the column, in characters. More...
 
FieldsetPreferredPixelWidth (int width)
 Sets the preferred width of the column, in pixels. More...
 
QString name () const
 Returns the field's name. More...
 
Qt::Alignment alignment () const
 Returns the field's alignment. More...
 
Qt::Alignment headerAlignment () const
 Returns the field's column header alignment. More...
 
int preferredCharWidth () const
 Returns the field's preferred width, in characters. More...
 
int preferredPixelWidth () const
 Returns the field's preferred width, in pixels. More...
 
int preferredWidth (const QFontMetrics &fm) const
 Returns the field's preferred width, in pixels, using the supplied font metrics to calculate it from the preferred width in characters. More...
 

Detailed Description

A class representing a field (a column) in a Quark table model.

Instances of this object are created by calling AbstractTableModelBase::addField().

Constructor & Destructor Documentation

◆ Field()

Field ( const QString &  name = QString())

◆ ~Field()

virtual ~Field ( )
virtual

Destructor.

Member Function Documentation

◆ alignment()

Qt::Alignment alignment ( ) const
inline

Returns the field's alignment.

◆ headerAlignment()

Qt::Alignment headerAlignment ( ) const
inline

Returns the field's column header alignment.

◆ name()

QString name ( ) const
inline

Returns the field's name.

◆ preferredCharWidth()

int preferredCharWidth ( ) const
inline

Returns the field's preferred width, in characters.

◆ preferredPixelWidth()

int preferredPixelWidth ( ) const
inline

Returns the field's preferred width, in pixels.

◆ preferredWidth()

int preferredWidth ( const QFontMetrics &  fm) const

Returns the field's preferred width, in pixels, using the supplied font metrics to calculate it from the preferred width in characters.

◆ setAlignment()

Field& setAlignment ( Qt::Alignment  alignment)

Sets the text alignment for the field.

◆ setHeaderAlignment()

Field& setHeaderAlignment ( Qt::Alignment  alignment)

Sets the text alignment for the column header for the field.

◆ setPreferredCharWidth()

Field& setPreferredCharWidth ( int  width)

Sets the preferred width of the column, in characters.

◆ setPreferredPixelWidth()

Field& setPreferredPixelWidth ( int  width)

Sets the preferred width of the column, in pixels.


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