kexi

#include <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, 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

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 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
dialogTypesee DialogType description
dialogOptionssee dialogOptions description
recentProjectsa set of recent projects' info, used for "Open recent" tab
connSetconenction set used to present available conenctions in "Open Existing" tab. Pass an empty object is this tab is not used.
parentparent widget, if any.
namename of this object.

Definition at line 151 of file KexiStartupDialog.cpp.

◆ ~KexiStartupDialog()

KexiStartupDialog::~KexiStartupDialog ( )

Definition at line 203 of file KexiStartupDialog.cpp.

Member Function Documentation

◆ activePageIndex()

int KexiStartupDialog::activePageIndex ( ) const
protected

internal reimplementation

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

◆ connectionItemForOpenExistingExecuted

void KexiStartupDialog::connectionItemForOpenExistingExecuted ( ConnectionDataLVItem * item)
protectedslot

Definition at line 568 of file KexiStartupDialog.cpp.

◆ connectionItemForOpenExistingHighlighted

void KexiStartupDialog::connectionItemForOpenExistingHighlighted ( ConnectionDataLVItem * item)
protectedslot

Definition at line 575 of file KexiStartupDialog.cpp.

◆ done

void KexiStartupDialog::done ( int r)
protectedvirtualslot

Definition at line 230 of file KexiStartupDialog.cpp.

◆ eventFilter()

bool KexiStartupDialog::eventFilter ( TQObject * o,
TQEvent * e )
protectedvirtual

used for accepting templates dialog with just return key press

Definition at line 656 of file KexiStartupDialog.cpp.

◆ existingFileSelected

void KexiStartupDialog::existingFileSelected ( const TQString & f)
protectedslot

Definition at line 619 of file KexiStartupDialog.cpp.

◆ recentProjectItemExecuted

void KexiStartupDialog::recentProjectItemExecuted ( KexiProjectData * data)
protectedslot

helper

Definition at line 647 of file KexiStartupDialog.cpp.

◆ reject

void KexiStartupDialog::reject ( )
protectedvirtualslot

Definition at line 287 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 225 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 614 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 604 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 639 of file KexiStartupDialog.cpp.

◆ shouldBeShown()

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

Definition at line 208 of file KexiStartupDialog.cpp.

◆ show()

void KexiStartupDialog::show ( )
virtual

Reimplemented for internal reasons

Definition at line 214 of file KexiStartupDialog.cpp.

◆ showAdvancedConnForOpenExisting

void KexiStartupDialog::showAdvancedConnForOpenExisting ( )
protectedslot

Definition at line 598 of file KexiStartupDialog.cpp.

◆ showSimpleConnForOpenExisting

void KexiStartupDialog::showSimpleConnForOpenExisting ( )
protectedslot

Definition at line 592 of file KexiStartupDialog.cpp.

◆ slotOk

void KexiStartupDialog::slotOk ( )
protectedvirtualslot

Definition at line 580 of file KexiStartupDialog.cpp.

◆ slotPageShown

void KexiStartupDialog::slotPageShown ( TQWidget * page)
protectedslot

slot activated when one of page in templates window is shown

Definition at line 397 of file KexiStartupDialog.cpp.

◆ tabShown

void KexiStartupDialog::tabShown ( TQWidget * w)
protectedslot

Any tab has been selected.

Definition at line 488 of file KexiStartupDialog.cpp.

◆ templateSelected

void KexiStartupDialog::templateSelected ( const TQString & fileName)
protectedslot

Definition at line 684 of file KexiStartupDialog.cpp.

◆ updateDialogOKButton()

void KexiStartupDialog::updateDialogOKButton ( TQWidget * w)
protected

helper: updates a state of dialog's OK button

Definition at line 499 of file KexiStartupDialog.cpp.


The documentation for this class was generated from the following files: