#include <KexiStartup.h>
Public Types | |
| enum | DetectDriverForFileOptions { DontConvert = 1 , ThisIsAProjectFile = 2 , ThisIsAShortcutToAProjectFile = 4 , ThisIsAShortcutToAConnectionData = 8 , SkipMessages = 16 } |
| Public Types inherited from KexiStartupData | |
| enum | Action { DoNothing , CreateBlankProject , CreateFromTemplate , OpenProject , ImportProject , Exit } |
Public Member Functions | |
| virtual tristate | init (int argc, char **argv) |
| KexiProjectData * | selectProject (KexiDB::ConnectionData *cdata, bool &cancelled, TQWidget *parent=0) |
| Public Member Functions inherited from KexiStartupData | |
| virtual bool | init () |
| Action | action () const |
| KexiProjectData * | projectData () const |
| KexiStartupData::Import | importActionData () const |
| bool | forcedDesignMode () const |
| bool | forcedUserMode () const |
| bool | isProjectNavigatorVisible () const |
| Public Member Functions inherited from Kexi::ObjectStatus | |
| ObjectStatus (const TQString &message, const TQString &description) | |
| ObjectStatus (KexiDB::Object *dbObject, const TQString &message, const TQString &description) | |
| const ObjectStatus & | status () const |
| bool | error () const |
| void | setStatus (const TQString &message, const TQString &description) |
| void | setStatus (KexiDB::Object *dbObject, const TQString &message=TQString(), const TQString &description=TQString()) |
| void | setStatus (KexiDB::ResultInfo *result, const TQString &message=TQString(), const TQString &description=TQString()) |
| void | setStatus (KexiDB::Object *dbObject, KexiDB::ResultInfo *result, const TQString &message=TQString(), const TQString &description=TQString()) |
| void | clearStatus () |
| TQString | singleStatusString () const |
| void | append (const ObjectStatus &otherStatus) |
| KexiDB::Object * | dbObject () const |
| operator KexiDB::MessageHandler * () | |
Static Public Member Functions | |
| static tristate | detectActionForFile (KexiStartupData::Import &detectedImportAction, TQString &detectedDriverName, const TQString &_suggestedDriverName, const TQString &dbFileName, TQWidget *parent=0, int options=0) |
Protected Slots | |
| void | slotSaveShortcutFileChanges () |
Protected Member Functions | |
| bool | getAutoopenObjects (TDECmdLineArgs *args, const TQCString &action_name) |
Protected Attributes | |
| KexiStartupHandlerPrivate * | d |
| Protected Attributes inherited from KexiStartupData | |
| KexiProjectData * | m_projectData |
| Action | m_action |
| KexiStartupData::Import | m_importActionData |
| bool | m_forcedUserMode: 1 |
| bool | m_forcedDesignMode: 1 |
| bool | m_isProjectNavigatorVisible: 1 |
| bool | m_createDB: 1 |
| bool | m_dropDB: 1 |
| bool | m_alsoOpenDB: 1 |
| Protected Attributes inherited from Kexi::ObjectStatus | |
| TQGuardedPtr< TQObject > | dbObj |
| KexiDB::MessageHandler * | msgHandler |
Additional Inherited Members | |
| Public Attributes inherited from Kexi::ObjectStatus | |
| TQString | message |
| TQString | description |
Detailed Description
Handles startup actions for Kexi application.
Definition at line 61 of file KexiStartup.h.
Member Enumeration Documentation
◆ DetectDriverForFileOptions
Options for detectDriverForFile()
Definition at line 85 of file KexiStartup.h.
Constructor & Destructor Documentation
◆ KexiStartupHandler()
| KexiStartupHandler::KexiStartupHandler | ( | ) |
Definition at line 196 of file KexiStartup.cpp.
◆ ~KexiStartupHandler()
|
virtual |
Definition at line 203 of file KexiStartup.cpp.
Member Function Documentation
◆ detectActionForFile()
|
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.
detectedDriverName can contain following special strings:
- "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 739 of file KexiStartup.cpp.
◆ getAutoopenObjects()
|
protected |
Definition at line 208 of file KexiStartup.cpp.
◆ init()
|
virtual |
- Todo
- Show error message from KexiDBConnShortcutFile when there's one implemented. For we're displaying generic error msg.
Definition at line 266 of file KexiStartup.cpp.
◆ selectProject()
| KexiProjectData * KexiStartupHandler::selectProject | ( | KexiDB::ConnectionData * | cdata, |
| bool & | cancelled, | ||
| TQWidget * | 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 894 of file KexiStartup.cpp.
◆ slotSaveShortcutFileChanges
|
protectedslot |
Definition at line 939 of file KexiStartup.cpp.
Member Data Documentation
◆ d
|
protected |
Definition at line 128 of file KexiStartup.h.
The documentation for this class was generated from the following files:
