KDbProperties
#include <KDbProperties.h>
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 () |
KDbMessageHandler * | messageHandler () const |
KDbResultable & | operator= (const KDbResultable &other) |
KDbResult | result () const |
virtual QString | serverResultName () const |
void | setMessageHandler (KDbMessageHandler *handler) |
void | showMessage () |
Protected Member Functions | |
KDbProperties (KDbConnection *conn) | |
Protected Attributes | |
KDbConnection * | m_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()
|
override |
Definition at line 29 of file KDbProperties.cpp.
◆ KDbProperties()
|
explicitprotected |
- Todo
- IMPORTANT: replace QPointer<KDbConnection> m_conn;
Definition at line 24 of file KDbProperties.cpp.
Member Function Documentation
◆ caption()
- 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()
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()
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()
- 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
|
protected |
Definition at line 64 of file KDbProperties.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:32 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.