kexi

KexiDBConnectionSet Class Reference

#include <kexidbconnectionset.h>

List of all members.


Detailed Description

Stores information about multiple connection-data items.

Definition at line 29 of file kexidbconnectionset.h.


Public Member Functions

 KexiDBConnectionSet ()
 ~KexiDBConnectionSet ()
void load ()
bool addConnectionData (KexiDB::ConnectionData *data, const QString &filename=QString::null)
bool saveConnectionData (KexiDB::ConnectionData *oldData, KexiDB::ConnectionData *newData)
bool removeConnectionData (KexiDB::ConnectionData *data)
const KexiDB::ConnectionData::Listlist () const
QString fileNameForConnectionData (KexiDB::ConnectionData *data) const
KexiDB::ConnectionDataconnectionDataForFileName (const QString &fileName) const

Member Function Documentation

bool KexiDBConnectionSet::addConnectionData ( KexiDB::ConnectionData data,
const QString &  filename = QString::null 
)

Adds data as connection data. data will be owned by a KexiDBConnectionSet object. If filename is not empty, it will be kept for use in saveConnectionData(). saveConnectionData() is called automatically, if there's no filename provided or the filename is already used, a new unique will be generated.

Returns:
true on successfull creating corresponding .kexic file

create

Definition at line 55 of file kexidbconnectionset.cpp.

KexiDB::ConnectionData * KexiDBConnectionSet::connectionDataForFileName ( const QString &  fileName  )  const

Returns:
a connection data for a .kexic shortcut filename. 0 is returned if the filename does not match.

Definition at line 180 of file kexidbconnectionset.cpp.

QString KexiDBConnectionSet::fileNameForConnectionData ( KexiDB::ConnectionData data  )  const

Returns:
a filename of a connection data file for data.

Definition at line 172 of file kexidbconnectionset.cpp.

const KexiDB::ConnectionData::List & KexiDBConnectionSet::list (  )  const

Returns:
the list of connection data items.

Definition at line 139 of file kexidbconnectionset.cpp.

void KexiDBConnectionSet::load (  ) 

Loads connection data set from storage, currently from .kexic files saved in dirs returned by KStandardDirs::findDirs("data", "connections")

Definition at line 151 of file kexidbconnectionset.cpp.

bool KexiDBConnectionSet::removeConnectionData ( KexiDB::ConnectionData data  ) 

Removed data from this set.

Returns:
true on successful removing of corresponding .kexic file

Definition at line 125 of file kexidbconnectionset.cpp.

bool KexiDBConnectionSet::saveConnectionData ( KexiDB::ConnectionData oldData,
KexiDB::ConnectionData newData 
)

Saves changes made to oldData to a file which name has been provided by addConnectionData(). This function does nothing if oldData hasn't been added to this set.

Returns:
true on success (data is then copied from newData to oldData)

Definition at line 99 of file kexidbconnectionset.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys