KexiDB::SimpleCommandLineApp Class Reference
#include <simplecommandlineapp.h>
Inheritance diagram for KexiDB::SimpleCommandLineApp:

Detailed Description
A skeleton for creating a simple command line database application.This class creates a KInstance object and automatically handles the following command line options:
- --driver <name> (Database driver name) or -drv
- --user <name> (Database user name) or -u
- --password (Prompt for password) or -p
- --host <name> (Server (host) name) or -h
- --port <number> (Server's port number)
- --local-socket <filename> (Server's local socket filename, if needed) or -s
You can use this helper class to create test applications or small tools that open a KexiDB-compatible database using command line arguments, do some data processing and close the database.
Definition at line 46 of file simplecommandlineapp.h.
Public Member Functions | |
| SimpleCommandLineApp (int argc, char **argv, KCmdLineOptions *options, const char *programName, const char *version, const char *shortDescription=0, int licenseType=KAboutData::License_Unknown, const char *copyrightStatement=0, const char *text=0, const char *homePageAddress=0, const char *bugsEmailAddress="submit@bugs.kde.org") | |
| ~SimpleCommandLineApp () | |
| KInstance * | instance () const |
| bool | openDatabase (const QString &databaseName) |
| bool | closeDatabase () |
| KexiDB::ConnectionData * | connectionData () const |
| KexiDB::Connection * | connection () const |
Protected Attributes | |
| Private *const | d |
| for future extensions | |
Constructor & Destructor Documentation
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
Member Function Documentation
|
|
Closes database connection previously opened using openDatabase()
Referenced by SimpleCommandLineApp::openDatabase(), and SimpleCommandLineApp::~SimpleCommandLineApp(). |
|
|
|
|
|
|
|
|
|
|
|
Opens database databaseName for connection data specified via the command line.
|
Member Data Documentation
|
|
for future extensions
Reimplemented from KexiDB::Object. Definition at line 81 of file simplecommandlineapp.h. Referenced by SimpleCommandLineApp::closeDatabase(), SimpleCommandLineApp::connection(), SimpleCommandLineApp::connectionData(), SimpleCommandLineApp::instance(), SimpleCommandLineApp::openDatabase(), and SimpleCommandLineApp::~SimpleCommandLineApp(). |
The documentation for this class was generated from the following file:
