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


Public Types

enum  Result { CancelResult = 0, TemplateResult = 1, OpenExistingResult = 2, OpenRecentResult = 3 }
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
QString selectedTemplateKey () const
KexiProjectDataselectedProjectData () const
QString selectedExistingFile () 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 templatesPageShown (QWidget *page)
void templateItemExecuted (QIconViewItem *item)
void templateItemSelected (QIconViewItem *item)
void tabShown (QWidget *w)
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' TemplateResult 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 78 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 87 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 93 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 206 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 263 of file KexiStartupDialog.cpp.

int KexiStartupDialog::result (  )  const

Executes dialog.

Returns:
one of Result values. Use this after dialog is closed.

Definition at line 280 of file KexiStartupDialog.cpp.

QString KexiStartupDialog::selectedTemplateKey (  )  const

Returns:
key string of selected database template if result() is TemplateResult, otherwise null string. The key is of form: "<group>/<name>", for example: "business/address_book". For blank databases "blank" key is used - then additional information about selected connection should be used with appropriate methods.

Definition at line 558 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 660 of file KexiStartupDialog.cpp.

QString KexiStartupDialog::selectedExistingFile (  )  const

Returns:
name of selected Kexi project file (if "Open Existing" tab was selected and this file was clicked). Returns empty string if no such selection has been made or other tab was selected.

Definition at line 628 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 635 of file KexiStartupDialog.cpp.

void KexiStartupDialog::show (  )  [virtual]

Reimplemented for internal reasons

Definition at line 269 of file KexiStartupDialog.cpp.

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

slot activated when one of page in templates window is shown

Definition at line 423 of file KexiStartupDialog.cpp.

void KexiStartupDialog::templateItemExecuted ( QIconViewItem *  item  )  [protected, slot]

Any icon view item has been executed (dblclicked).

Definition at line 466 of file KexiStartupDialog.cpp.

void KexiStartupDialog::templateItemSelected ( QIconViewItem *  item  )  [protected, slot]

Any icon view item has been selected.

Definition at line 461 of file KexiStartupDialog.cpp.

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

Any tab has been selected.

Definition at line 509 of file KexiStartupDialog.cpp.

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

helper

Definition at line 668 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 677 of file KexiStartupDialog.cpp.

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

helper: updates a state of dialog's OK button

Definition at line 520 of file KexiStartupDialog.cpp.

int KexiStartupDialog::activePageIndex (  )  const [protected]

internal reimplementation

Definition at line 694 of file KexiStartupDialog.cpp.


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