#include <dbproperties.h>

Inheritance diagram for KexiDB::DatabaseProperties:
KexiDB::Object

Public Member Functions

bool setValue (const TQString &name, const TQVariant &value)
 
bool setCaption (const TQString &name, const TQString &caption)
 
TQVariant value (const TQString &name)
 
TQString caption (const TQString &name)
 
TQStringList names ()
 
- Public Member Functions inherited from KexiDB::Object
bool error () const
 
const TQString & errorMsg () const
 
int errorNum () const
 
int previousServerResult () const
 
TQString previousServerResultName () const
 
void debugError ()
 
virtual void clearError ()
 
virtual TQString serverErrorMsg ()
 
virtual int serverResult ()
 
virtual TQString serverResultName ()
 
TQString msgTitle () const
 
const TQString recentSQLString () const
 

Protected Member Functions

 DatabaseProperties (Connection *conn)
 
- Protected Member Functions inherited from KexiDB::Object
 Object (MessageHandler *handler=0)
 
virtual void setError (int code=ERR_OTHER, const TQString &msg=TQString())
 
virtual void setError (const TQString &msg)
 
virtual void setError (const TQString &title, const TQString &msg)
 
void setError (KexiDB::Object *obj, const TQString &prependMessage=TQString())
 
virtual void setError (KexiDB::Object *obj, int code, const TQString &prependMessage=TQString())
 
virtual int askQuestion (const TQString &message, KMessageBox::DialogType dlgType, KMessageBox::ButtonCode defaultResult, const KGuiItem &buttonYes=KStdGuiItem::yes(), const KGuiItem &buttonNo=KStdGuiItem::no(), const TQString &dontShowAskAgainName=TQString(), int options=KMessageBox::Notify, MessageHandler *msgHandler=0)
 
virtual void drv_clearServerResult ()
 

Protected Attributes

TQGuardedPtr< Connection > m_conn
 
- Protected Attributes inherited from KexiDB::Object
TQString m_sql
 
TQString m_errorSql
 
int m_serverResult
 
TQString m_serverResultName
 
TQString m_serverErrorMsg
 
TQString m_errMsg
 

Friends

class Connection
 

Detailed Description

A set of storable database properties.

Todo:
implement TDEConfigBase interface here?

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.

Constructor & Destructor Documentation

◆ DatabaseProperties()

DatabaseProperties::DatabaseProperties ( Connection *  conn)
protected

Definition at line 25 of file dbproperties.cpp.

◆ ~DatabaseProperties()

DatabaseProperties::~DatabaseProperties ( )
protected

Definition at line 31 of file dbproperties.cpp.

Member Function Documentation

◆ caption()

TQString DatabaseProperties::caption ( const TQString &  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.

◆ names()

TQStringList DatabaseProperties::names ( )
Returns
a list of available property names.

Definition at line 137 of file dbproperties.cpp.

◆ setCaption()

bool DatabaseProperties::setCaption ( const TQString &  name,
const TQString &  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.

◆ setValue()

bool DatabaseProperties::setValue ( const TQString &  name,
const TQVariant &  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.

◆ value()

TQVariant DatabaseProperties::value ( const TQString &  name)
Returns
property value for propeName available for this driver. If there's no such property defined for driver, Null TQVariant value is returned.

Definition at line 109 of file dbproperties.cpp.

Friends And Related Symbol Documentation

◆ Connection

friend class Connection
friend

Definition at line 63 of file dbproperties.h.

Member Data Documentation

◆ m_conn

TQGuardedPtr<Connection> KexiDB::DatabaseProperties::m_conn
protected

Definition at line 62 of file dbproperties.h.


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