kexi

KexiDBConnectionSet Class Reference

#include <kexidbconnectionset.h>

Inherits TQObject.

Public Member Functions

void load ()
 
bool addConnectionData (KexiDB::ConnectionData *data, const TQString &filename=TQString())
 
bool saveConnectionData (KexiDB::ConnectionData *oldData, KexiDB::ConnectionData *newData)
 
bool removeConnectionData (KexiDB::ConnectionData *data)
 
const KexiDB::ConnectionData::List & list () const
 
TQString fileNameForConnectionData (KexiDB::ConnectionData *data) const
 
KexiDB::ConnectionData * connectionDataForFileName (const TQString &fileName) const
 

Detailed Description

Stores information about multiple connection-data items.

Definition at line 29 of file kexidbconnectionset.h.

Constructor & Destructor Documentation

◆ KexiDBConnectionSet()

KexiDBConnectionSet::KexiDBConnectionSet ( )

Definition at line 44 of file kexidbconnectionset.cpp.

◆ ~KexiDBConnectionSet()

KexiDBConnectionSet::~KexiDBConnectionSet ( )

Definition at line 50 of file kexidbconnectionset.cpp.

Member Function Documentation

◆ addConnectionData()

bool KexiDBConnectionSet::addConnectionData ( KexiDB::ConnectionData *  data,
const TQString &  filename = TQString() 
)

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 successful creating corresponding .kexic file

create

Definition at line 55 of file kexidbconnectionset.cpp.

◆ connectionDataForFileName()

KexiDB::ConnectionData * KexiDBConnectionSet::connectionDataForFileName ( const TQString &  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.

◆ fileNameForConnectionData()

TQString KexiDBConnectionSet::fileNameForConnectionData ( KexiDB::ConnectionData *  data) const
Returns
a filename of a connection data file for data.

Definition at line 172 of file kexidbconnectionset.cpp.

◆ list()

const KexiDB::ConnectionData::List & KexiDBConnectionSet::list ( ) const
Returns
the list of connection data items.

Definition at line 139 of file kexidbconnectionset.cpp.

◆ load()

void KexiDBConnectionSet::load ( )

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

Definition at line 151 of file kexidbconnectionset.cpp.

◆ removeConnectionData()

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.

◆ saveConnectionData()

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: