KDbProperties

Search for usage in LXR

#include <KDbProperties.h>

Inheritance diagram for KDbProperties:

Public Member Functions

QString caption (const QString &name)
 
QStringList names ()
 
bool setCaption (const QString &name, const QString &caption)
 
bool setValue (const QString &name, const QVariant &value)
 
QVariant value (const QString &name)
 
- Public Member Functions inherited from KDbResultable
 KDbResultable (const KDbResultable &other)
 
void clearResult ()
 
KDbMessageHandlermessageHandler () const
 
KDbResultableoperator= (const KDbResultable &other)
 
KDbResult result () const
 
virtual QString serverResultName () const
 
void setMessageHandler (KDbMessageHandler *handler)
 
void showMessage ()
 

Protected Member Functions

 KDbProperties (KDbConnection *conn)
 

Protected Attributes

KDbConnectionm_conn
 
- Protected Attributes inherited from KDbResultable
Private *const d
 
KDbResult m_result
 

Detailed Description

A set of storable database properties.

Todo
implement KConfigBase interface here?

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

Definition at line 34 of file KDbProperties.h.

Constructor & Destructor Documentation

◆ ~KDbProperties()

KDbProperties::~KDbProperties ( )
override

Definition at line 29 of file KDbProperties.cpp.

◆ KDbProperties()

KDbProperties::KDbProperties ( KDbConnection * conn)
explicitprotected
Todo
IMPORTANT: replace QPointer<KDbConnection> m_conn;

Definition at line 24 of file KDbProperties.cpp.

Member Function Documentation

◆ caption()

QString KDbProperties::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 124 of file KDbProperties.cpp.

◆ names()

QStringList KDbProperties::names ( )
Returns
a list of available property names.

Definition at line 141 of file KDbProperties.cpp.

◆ setCaption()

bool KDbProperties::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 KDbProperties.cpp.

◆ setValue()

bool KDbProperties::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. KDbConnection

Definition at line 33 of file KDbProperties.cpp.

◆ value()

QVariant KDbProperties::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 KDbProperties.cpp.

Member Data Documentation

◆ m_conn

KDbConnection* KDbProperties::m_conn
protected

Definition at line 64 of file KDbProperties.h.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:21:01 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.