Kexi API Documentation (2.0 alpha)

KexiDB::DatabaseProperties Class Reference

#include <dbproperties.h>

Inheritance diagram for KexiDB::DatabaseProperties:

KexiDB::Object List of all members.

Detailed Description

A set of storable database properties.

This is a convenience class that allows to store global dabatase properties without a need for creating and maintain custom table. DatabaseProperties object is accessible only using KexiDB::Connection::databaseProperties() method.

Definition at line 34 of file dbproperties.h.

Public Member Functions

bool setValue (const QString &name, const QVariant &value)
bool setCaption (const QString &name, const QString &caption)
QVariant value (const QString &name)
QString caption (const QString &name)
QStringList names ()

Protected Member Functions

 DatabaseProperties (Connection *conn)
 ~DatabaseProperties ()

Protected Attributes

QGuardedPtr< Connectionm_conn

Friends

class Connection


Constructor & Destructor Documentation

DatabaseProperties::DatabaseProperties Connection conn  )  [protected]
 

Definition at line 25 of file dbproperties.cpp.

DatabaseProperties::~DatabaseProperties  )  [protected]
 

Definition at line 31 of file dbproperties.cpp.


Member Function Documentation

QString DatabaseProperties::caption const QString name  ) 
 

Returns:
translated property caption for name. If there's no such property defined for driver, empty string value is returned.

Definition at line 122 of file dbproperties.cpp.

References m_conn, and KexiDB::Object::setError().

QStringList DatabaseProperties::names  ) 
 

Returns:
a list of available property names.

Definition at line 137 of file dbproperties.cpp.

References m_conn, and KexiDB::Object::setError().

bool DatabaseProperties::setCaption const QString name,
const QString caption
 

Sets caption for for property name. Usually it shouldn't be translated: trnaslation can be performed before displaying.

Definition at line 71 of file dbproperties.cpp.

References m_conn, and KexiDB::Object::setError().

Referenced by KexiProject::create(), and KexiProject::createInternalStructures().

bool DatabaseProperties::setValue const QString name,
const QVariant &  value
 

Sets value for property name. Optional caption can be also set. If there's no such property defined, it will be added. Existing value will be overwritten. Note that to execute this method, database must be opened in read-write mode.

Returns:
true on successful data. Connection

Definition at line 35 of file dbproperties.cpp.

References m_conn, and KexiDB::Object::setError().

Referenced by KexiProject::create(), and KexiProject::createInternalStructures().

QVariant DatabaseProperties::value const QString name  ) 
 

Returns:
property value for propeName available for this driver. If there's no such property defined for driver, Null QVariant value is returned.

Definition at line 109 of file dbproperties.cpp.

References ERR_NO_DB_PROPERTY, and m_conn.

Referenced by KexiProject::createInternalStructures(), and KexiProject::initProject().


Friends And Related Function Documentation

friend class Connection [friend]
 

Definition at line 63 of file dbproperties.h.


Member Data Documentation

QGuardedPtr<Connection> KexiDB::DatabaseProperties::m_conn [protected]
 

Definition at line 62 of file dbproperties.h.

Referenced by caption(), names(), setCaption(), setValue(), and value().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:50:40 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003