kexi

KexiStartupDialog Class Reference

#include <KexiStartupDialog.h>

List of all members.


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.


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, QWidget *parent=0, const char *name=0)
 ~KexiStartupDialog ()
int result () const
KexiProjectDataselectedProjectData () const
QString selectedFileName () const
QValueList< KexiProjectData::ObjectInfoautoopenObjects () const
KexiDB::ConnectionDataselectedExistingConnection () 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 (QWidget *page)
void tabShown (QWidget *w)
void templateSelected (const QString &fileName)
void recentProjectItemExecuted (KexiProjectData *data)
void existingFileSelected (const QString &f)
void showSimpleConnForOpenExisting ()
void showAdvancedConnForOpenExisting ()
void connectionItemForOpenExistingExecuted (ConnectionDataLVItem *item)
void connectionItemForOpenExistingHighlighted (ConnectionDataLVItem *item)

Protected Member Functions

virtual bool eventFilter (QObject *o, QEvent *e)
void updateDialogOKButton (QWidget *w)
int activePageIndex () const

Member Enumeration Documentation

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

Enumerator:
CancelResult  The user has pressed 'Cancel'.
CreateBlankResult  The user has selected a template.
CreateFromTemplateResult  The user has selected a template to be used for creating a new db.
ImportResult  The user has chosen to import db.
OpenExistingResult  The user has chosen an existing connection or db file.
OpenRecentResult  The user has selected one of recently used databases.

Definition at line 60 of file KexiStartupDialog.h.

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 77 of file KexiStartupDialog.h.

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 83 of file KexiStartupDialog.h.


Constructor & Destructor Documentation

KexiStartupDialog::KexiStartupDialog ( int  dialogType,
int  dialogOptions,
KexiDBConnectionSet connSet,
KexiProjectSet recentProjects,
QWidget *  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.


Member Function Documentation

bool KexiStartupDialog::shouldBeShown (  )  [static]

Returns:
true if startup dialog should be shown (info is taken from kexi config)

Definition at line 209 of file KexiStartupDialog.cpp.

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.

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.

QString 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.

QValueList< 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.

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.

void KexiStartupDialog::show (  )  [virtual]

Reimplemented for internal reasons

Definition at line 215 of file KexiStartupDialog.cpp.

void KexiStartupDialog::slotPageShown ( QWidget *  page  )  [protected, slot]

slot activated when one of page in templates window is shown

Definition at line 398 of file KexiStartupDialog.cpp.

void KexiStartupDialog::tabShown ( QWidget *  w  )  [protected, slot]

Any tab has been selected.

Definition at line 489 of file KexiStartupDialog.cpp.

void KexiStartupDialog::recentProjectItemExecuted ( KexiProjectData data  )  [protected, slot]

helper

Definition at line 648 of file KexiStartupDialog.cpp.

bool KexiStartupDialog::eventFilter ( QObject *  o,
QEvent *  e 
) [protected, virtual]

used for accepting templates dialog with just return key press

Definition at line 657 of file KexiStartupDialog.cpp.

void KexiStartupDialog::updateDialogOKButton ( QWidget *  w  )  [protected]

helper: updates a state of dialog's OK button

Definition at line 500 of file KexiStartupDialog.cpp.

int KexiStartupDialog::activePageIndex (  )  const [protected]

internal reimplementation

Definition at line 675 of file KexiStartupDialog.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys