#include <KexiStartupDialog.h>
Inherits KDialogBase.
Public Types | |
| enum | Result { CancelResult , CreateBlankResult , CreateFromTemplateResult , ImportResult , OpenExistingResult , OpenRecentResult } |
| enum | DialogType { Templates = 1 , OpenExisting = 2 , OpenRecent = 4 , Everything = (1+2+4) } |
| enum | DialogOptions { CheckBoxDoNotShowAgain = 1 } |
Public Member Functions | |
| KexiStartupDialog (int dialogType, int dialogOptions, KexiDBConnectionSet &connSet, KexiProjectSet &recentProjects, TQWidget *parent=0, const char *name=0) | |
| int | result () const |
| KexiProjectData * | selectedProjectData () const |
| TQString | selectedFileName () const |
| TQValueList< KexiProjectData::ObjectInfo > | autoopenObjects () const |
| KexiDB::ConnectionData * | selectedExistingConnection () const |
| virtual void | show () |
Static Public Member Functions | |
| static bool | shouldBeShown () |
Protected Slots | |
| virtual void | done (int r) |
| virtual void | reject () |
| virtual void | slotOk () |
| void | slotPageShown (TQWidget *page) |
| void | tabShown (TQWidget *w) |
| void | templateSelected (const TQString &fileName) |
| void | recentProjectItemExecuted (KexiProjectData *data) |
| void | existingFileSelected (const TQString &f) |
| void | showSimpleConnForOpenExisting () |
| void | showAdvancedConnForOpenExisting () |
| void | connectionItemForOpenExistingExecuted (ConnectionDataLVItem *item) |
| void | connectionItemForOpenExistingHighlighted (ConnectionDataLVItem *item) |
Protected Member Functions | |
| virtual bool | eventFilter (TQObject *o, TQEvent *e) |
| void | updateDialogOKButton (TQWidget *w) |
| int | activePageIndex () const |
Detailed Description
This class is used to show the template/open-existing/open-recent tabbed dialog on Kexi startup. If only one page is shown, tab is no displayed, so dialog becomes a normal "plain" type dialog.
Definition at line 46 of file KexiStartupDialog.h.
Member Enumeration Documentation
◆ DialogOptions
Options for a dialog (any or'ed value or 0 is ok)
- CheckBoxDoNotShowAgain Adds "do not show this window" checkbox at the bottom
Definition at line 84 of file KexiStartupDialog.h.
◆ DialogType
To configure the dialog you have to use this enum (any !=0 or'ed value is ok)
- Templates Show "Templates" tab
- OpenExisting Show "Open existing" tab
- OpenRecent Show "Recent" tab
- Everything Show everything above
Definition at line 78 of file KexiStartupDialog.h.
◆ Result
The Dialog returns one of these values depending on the input of the user. CancelResult The user pressed 'Cancel' CreateBlankResult The user selected a template CreateFromTemplateResult The user selected a template ImportResult The user selected a template OpenExistingResult The user has chosen an existing connection or db file OpenRecentResult The user selected one of recently used databases
Definition at line 61 of file KexiStartupDialog.h.
Constructor & Destructor Documentation
◆ KexiStartupDialog()
| KexiStartupDialog::KexiStartupDialog | ( | int | dialogType, |
| int | dialogOptions, | ||
| KexiDBConnectionSet & | connSet, | ||
| KexiProjectSet & | recentProjects, | ||
| TQWidget * | parent = 0, |
||
| const char * | name = 0 |
||
| ) |
Creates a dialog.
- Parameters
-
dialogType see DialogType description dialogOptions see dialogOptions description recentProjects a set of recent projects' info, used for "Open recent" tab connSet conenction set used to present available conenctions in "Open Existing" tab. Pass an empty object is this tab is not used. parent parent widget, if any. name name of this object.
Definition at line 152 of file KexiStartupDialog.cpp.
◆ ~KexiStartupDialog()
| KexiStartupDialog::~KexiStartupDialog | ( | ) |
Definition at line 204 of file KexiStartupDialog.cpp.
Member Function Documentation
◆ activePageIndex()
|
protected |
internal reimplementation
Definition at line 675 of file KexiStartupDialog.cpp.
◆ autoopenObjects()
| TQValueList< KexiProjectData::ObjectInfo > KexiStartupDialog::autoopenObjects | ( | ) | const |
- Returns
- "autoopen" objects defined for selected template. Only makes sense if template was used.
Definition at line 691 of file KexiStartupDialog.cpp.
◆ connectionItemForOpenExistingExecuted
|
protectedslot |
Definition at line 569 of file KexiStartupDialog.cpp.
◆ connectionItemForOpenExistingHighlighted
|
protectedslot |
Definition at line 576 of file KexiStartupDialog.cpp.
◆ done
|
protectedvirtualslot |
Definition at line 231 of file KexiStartupDialog.cpp.
◆ eventFilter()
|
protectedvirtual |
used for accepting templates dialog with just return key press
Definition at line 657 of file KexiStartupDialog.cpp.
◆ existingFileSelected
|
protectedslot |
Definition at line 620 of file KexiStartupDialog.cpp.
◆ recentProjectItemExecuted
|
protectedslot |
helper
Definition at line 648 of file KexiStartupDialog.cpp.
◆ reject
|
protectedvirtualslot |
Definition at line 288 of file KexiStartupDialog.cpp.
◆ result()
| int KexiStartupDialog::result | ( | ) | const |
Executes dialog.
- Returns
- one of Result values. Use this after dialog is closed.
Definition at line 226 of file KexiStartupDialog.cpp.
◆ selectedExistingConnection()
| KexiDB::ConnectionData * KexiStartupDialog::selectedExistingConnection | ( | ) | const |
- Returns
- a pointer to selected Kexi connection data. (if "Open Existing" tab was selected and this connection data was clicked). Returns NULL if no such selection has been made or other tab was selected.
Definition at line 615 of file KexiStartupDialog.cpp.
◆ selectedFileName()
| TQString KexiStartupDialog::selectedFileName | ( | ) | const |
- Returns
- name of selected Kexi project file (if result() == OpenExistingResult) or name of template file to be used for creating a new database. (if result() == CreateFromTemplateResult). Returns empty string if no such selection has been made or other tab was selected.
Definition at line 605 of file KexiStartupDialog.cpp.
◆ selectedProjectData()
| KexiProjectData * KexiStartupDialog::selectedProjectData | ( | ) | const |
- Returns
- data of selected Kexi project (if "Open Recent" tab was selected). Returns NULL if no selection has been made or other tab was selected.
Definition at line 640 of file KexiStartupDialog.cpp.
◆ shouldBeShown()
|
static |
- Returns
- true if startup dialog should be shown (info is taken from kexi config)
Definition at line 209 of file KexiStartupDialog.cpp.
◆ show()
|
virtual |
Reimplemented for internal reasons
Definition at line 215 of file KexiStartupDialog.cpp.
◆ showAdvancedConnForOpenExisting
|
protectedslot |
Definition at line 599 of file KexiStartupDialog.cpp.
◆ showSimpleConnForOpenExisting
|
protectedslot |
Definition at line 593 of file KexiStartupDialog.cpp.
◆ slotOk
|
protectedvirtualslot |
Definition at line 581 of file KexiStartupDialog.cpp.
◆ slotPageShown
|
protectedslot |
slot activated when one of page in templates window is shown
Definition at line 398 of file KexiStartupDialog.cpp.
◆ tabShown
|
protectedslot |
Any tab has been selected.
Definition at line 489 of file KexiStartupDialog.cpp.
◆ templateSelected
|
protectedslot |
Definition at line 685 of file KexiStartupDialog.cpp.
◆ updateDialogOKButton()
|
protected |
helper: updates a state of dialog's OK button
Definition at line 500 of file KexiStartupDialog.cpp.
The documentation for this class was generated from the following files:
