Logo Search packages:      
Sourcecode: tellico version File versions

Tellico::Data::Field Class Reference

#include <field.h>

List of all members.

Detailed Description

The Field class encapsulates all the possible properties of a entry.

A field can be one of eleven types. It has a name, a title, and a category, along with some flags characterizing certain properties

Robby Stephenson
field.h 1005 2004-12-11 23:08:59Z robby

Definition at line 35 of file field.h.

Public Types

enum  FieldFlags { AllowMultiple = 1 << 0, AllowGrouped = 1 << 1, AllowCompletion = 1 << 2, NoDelete = 1 << 3 }
enum  FormatFlag {
  FormatPlain = 0, FormatTitle = 1, FormatName = 2, FormatDate = 3,
  FormatNone = 4
enum  Type {
  Undef = 0, Line = 1, Para = 2, Choice = 3,
  Bool = 4, ReadOnly = 5, Number = 6, URL = 7,
  Table = 8, Table2 = 9, Image = 10, Dependent = 11,
  Date = 12

Public Member Functions

void addAllowed (const QString &value)
const QStringList & allowed () const
const QString & category () const
virtual Fieldclone ()
const QString & description () const
 Field (const Field &field)
 Field (const QString &name, const QString &title, const QStringList &allowed)
 Field (const QString &name, const QString &title, Type type=Line)
int flags () const
FormatFlag formatFlag () const
bool isSingleCategory () const
const QString & name () const
Fieldoperator= (const Field &field)
const QString & property (const QString &key) const
const StringMap & propertyList () const
void setAllowed (const QStringList &allowed)
void setCategory (const QString &category)
void setDescription (const QString &desc)
void setFlags (int flags)
void setFormatFlag (FormatFlag flag)
void setName (const QString &name)
void setProperty (const QString &key, const QString &value)
void setPropertyList (const StringMap &properties)
void setTitle (const QString &title)
void setType (Type type)
const QString & title () const
Type type () const
virtual ~Field ()

Static Public Member Functions

static const QStringList & articleList ()
static bool autoCapitalize ()
static bool autoFormat ()
static QString capitalize (QString str)
static QStringList defaultArticleList ()
static QStringList defaultSuffixList ()
static QStringList defaultSurnamePrefixList ()
static const QRegExp & delimiter ()
static QString format (const QString &value, FormatFlag flag)
static QString formatDate (const QString &date)
static QString formatName (const QString &name, bool multiple=true)
static QString formatTitle (const QString &title)
static void setArticleList (const QStringList &list)
static void setAutoCapitalize (bool autoCapitalize)
static void setAutoFormat (bool autoFormat)
static void setSuffixList (const QStringList &list)
static void setSurnamePrefixList (const QStringList &list)
static QStringList split (const QString &string, bool allowEmpty)
static const QStringList & suffixList ()
static const QStringList & surnamePrefixList ()
static QMap< Field::Type, QString > typeMap ()
static QStringList typeTitles ()

Private Attributes

QStringList m_allowed
QString m_category
QString m_desc
int m_flags
FormatFlag m_formatFlag
QString m_name
StringMap m_properties
QString m_title
Type m_type

Static Private Attributes

static QStringList s_articles
static QStringList s_articlesApos
static bool s_autoCapitalize = true
static bool s_autoFormat = true
static QRegExp s_delimiter = QRegExp(QString::fromLatin1("\\s*;\\s*"))
static QStringList s_noCapitalize
static QStringList s_suffixes
static QStringList s_surnamePrefixes

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

Generated by  Doxygen 1.6.0   Back to index