kexi
KexiStartupHandler Class Reference
#include <KexiStartup.h>
Inheritance diagram for KexiStartupHandler:

Detailed Description
Handles startup actions for Kexi application.
Definition at line 60 of file KexiStartup.h.
Public Types | |
enum | DetectDriverForFileOptions { DontConvert = 1, ThisIsAProjectFile = 2, ThisIsAShortcutToAProjectFile = 4, ThisIsAShortcutToAConnectionData = 8, SkipMessages = 16 } |
Public Member Functions | |
KexiStartupHandler () | |
virtual | ~KexiStartupHandler () |
virtual tristate | init (int argc, char **argv) |
KexiProjectData * | selectProject (KexiDB::ConnectionData *cdata, bool &cancelled, QWidget *parent=0) |
Static Public Member Functions | |
static tristate | detectActionForFile (KexiStartupData::Import &detectedImportAction, QString &detectedDriverName, const QString &_suggestedDriverName, const QString &dbFileName, QWidget *parent=0, int options=0) |
Protected Slots | |
void | slotSaveShortcutFileChanges () |
Protected Member Functions | |
bool | getAutoopenObjects (KCmdLineArgs *args, const QCString &action_name) |
Protected Attributes | |
KexiStartupHandlerPrivate * | d |
Member Enumeration Documentation
Options for detectDriverForFile()
- Enumerator:
Definition at line 83 of file KexiStartup.h.
Member Function Documentation
tristate KexiStartupHandler::init | ( | int | argc, | |
char ** | argv | |||
) | [virtual] |
Definition at line 270 of file KexiStartup.cpp.
tristate KexiStartupHandler::detectActionForFile | ( | KexiStartupData::Import & | detectedImportAction, | |
QString & | detectedDriverName, | |||
const QString & | _suggestedDriverName, | |||
const QString & | dbFileName, | |||
QWidget * | parent = 0 , |
|||
int | options = 0 | |||
) | [static] |
Used for opening existing file-based projects. Detects actions that should be performed for by looking at the file's mime type.
- Returns:
- true if actions should be performed or cancelled if action should be cancelled In this case there are two possibilities:
- detectedImportAction == true means "import action" should be performed
- nonempty detectedDriverName means "open action" should be performed.
- "shortcut" if the file looks like a shortcut to a project/connection file
- "connection" if the file looks like a connection data file.
parent is passed as a parent for potential error message boxes. driverName is a preferred driver name. options should be a combination of DetectDriverForFileOptions enum values.
- Todo:
- rather check this using migration drivers' X-KexiSupportedMimeTypes [strlist] property
- Todo:
- if file is ro: change project mode (but do not care if we're jsut importing)
Definition at line 742 of file KexiStartup.cpp.
KexiProjectData * KexiStartupHandler::selectProject | ( | KexiDB::ConnectionData * | cdata, | |
bool & | cancelled, | |||
QWidget * | parent = 0 | |||
) |
Allows user to select a project with KexiProjectSelectorDialog.
- Returns:
- selected project's data Returns NULL and sets cancelled to true if the dialog was cancelled. Returns NULL and sets cancelled to false if there was an error.
Definition at line 897 of file KexiStartup.cpp.
The documentation for this class was generated from the following files: