Kexi API Documentation (2.0 alpha)

KexiConnSelectorWidget Class Reference

#include <KexiConnSelector.h>

Inheritance diagram for KexiConnSelectorWidget:

QWidget List of all members.

Detailed Description

Widget that allows to select a database connection (without choosing database itself)

Definition at line 55 of file KexiConnSelector.h.

Public Types

enum  ConnType { FileBased = 1, ServerBased = 2 }

Public Slots

void showSimpleConn ()
void showAdvancedConn ()
virtual void setFocus ()
void hideHelpers ()
void hideConnectonIcon ()

Signals

void connectionItemExecuted (ConnectionDataLVItem *item)
void connectionItemHighlighted (ConnectionDataLVItem *item)

Public Member Functions

 KexiConnSelectorWidget (KexiDBConnectionSet &conn_set, const QString &startDirOrVariable, QWidget *parent=0, const char *name=0)
virtual ~KexiConnSelectorWidget ()
int selectedConnectionType () const
KexiDB::ConnectionDataselectedConnectionData () const
QString selectedFileName ()
void setSelectedFileName (const QString &fileName)
QListView * connectionsList () const
void setConfirmOverwrites (bool set)
bool confirmOverwrites () const

Public Attributes

KexiConnSelectorBase * m_remote
KexiStartupFileDialogm_fileDlg

Protected Slots

void slotConnectionItemExecuted (QListViewItem *item)
void slotRemoteAddBtnClicked ()
void slotRemoteEditBtnClicked ()
void slotRemoteRemoveBtnClicked ()
void slotConnectionSelectionChanged ()
void slotPrjTypeSelected (int id)


Member Enumeration Documentation

enum KexiConnSelectorWidget::ConnType
 

Enumeration values:
FileBased 
ServerBased 

Definition at line 60 of file KexiConnSelector.h.


Constructor & Destructor Documentation

KexiConnSelectorWidget::KexiConnSelectorWidget KexiDBConnectionSet conn_set,
const QString startDirOrVariable,
QWidget parent = 0,
const char *  name = 0
 

Constructs a KexiConnSelector which contain conn_set as connection set. conn_set can be altered, because Add/Edit/Remove buttons are available to users. startDirOrVariable can be provided to specify a start dir for file browser (it can also contain a configuration variable name with ":" prefix as described in KRecentDirs documentation).

Definition at line 103 of file KexiConnSelector.cpp.

References KexiDB::Driver::defaultFileBasedDriverMimeType(), m_fileDlg, m_remote, slotConnectionItemExecuted(), slotConnectionSelectionChanged(), slotPrjTypeSelected(), slotRemoteAddBtnClicked(), slotRemoteEditBtnClicked(), and slotRemoteRemoveBtnClicked().

KexiConnSelectorWidget::~KexiConnSelectorWidget  )  [virtual]
 

Definition at line 163 of file KexiConnSelector.cpp.


Member Function Documentation

bool KexiConnSelectorWidget::confirmOverwrites  )  const
 

Definition at line 346 of file KexiConnSelector.cpp.

Referenced by KexiNewProjectWizard::accept().

void KexiConnSelectorWidget::connectionItemExecuted ConnectionDataLVItem item  )  [signal]
 

Referenced by slotConnectionItemExecuted().

void KexiConnSelectorWidget::connectionItemHighlighted ConnectionDataLVItem item  )  [signal]
 

Referenced by slotConnectionSelectionChanged().

QListView * KexiConnSelectorWidget::connectionsList  )  const
 

Definition at line 311 of file KexiConnSelector.cpp.

References m_remote.

void KexiConnSelectorWidget::hideConnectonIcon  )  [slot]
 

Definition at line 426 of file KexiConnSelector.cpp.

References m_remote.

void KexiConnSelectorWidget::hideHelpers  )  [slot]
 

Hides helpers on the server based connection page (sometimes it's convenient not to have these):

  • "Select existing database server's connection..." (label at the top)
  • "Click "Back" button" (label at the bottom)
  • "Back" button itself

Definition at line 325 of file KexiConnSelector.cpp.

Referenced by KexiNewProjectWizard::KexiNewProjectWizard().

KexiDB::ConnectionData * KexiConnSelectorWidget::selectedConnectionData  )  const
 

Returns:
data of selected connection, if server-based connection was selected. Returns NULL if no selection has been made or file-based connection has been selected.
See also:
selectedConnectionType()

Definition at line 261 of file KexiConnSelector.cpp.

References ConnectionDataLVItem::data(), and m_remote.

Referenced by KexiNewProjectWizard::next(), KexiNewProjectWizard::projectConnectionData(), and KexiNewProjectWizard::showPage().

int KexiConnSelectorWidget::selectedConnectionType  )  const
 

After accepting this dialog this method returns wherher user selected file- or server- based connection (ConnType enum).

Definition at line 241 of file KexiConnSelector.cpp.

References FileBased, m_fileDlg, and ServerBased.

Referenced by selectedFileName(), and setSelectedFileName().

QString KexiConnSelectorWidget::selectedFileName  ) 
 

Returns:
the name of database file, if file-based connection was selected. Returns null string if no selection has been made or server-based connection has been selected.
See also:
selectedConnectionType()

Definition at line 269 of file KexiConnSelector.cpp.

References KexiStartupFileDialog::currentFileName(), FileBased, m_fileDlg, and selectedConnectionType().

Referenced by KexiNewProjectWizard::projectDBName().

void KexiConnSelectorWidget::setConfirmOverwrites bool  set  ) 
 

If true, user will be asked to accept overwriting existing project. This is true by default.

Definition at line 339 of file KexiConnSelector.cpp.

References m_fileDlg, and KexiStartupFileDialog::setConfirmOverwrites().

Referenced by KexiNewProjectWizard::setConfirmOverwrites().

void KexiConnSelectorWidget::setFocus  )  [virtual, slot]
 

Definition at line 316 of file KexiConnSelector.cpp.

References m_fileDlg, m_remote, and KexiStartupFileDialog::setFocus().

Referenced by KexiNewProjectWizard::showPage().

void KexiConnSelectorWidget::setSelectedFileName const QString fileName  ) 
 

Sets selected filename to fileName. Only works when selectedConnectionType()==FileBased.

Definition at line 276 of file KexiConnSelector.cpp.

References FileBased, m_fileDlg, and selectedConnectionType().

Referenced by KexiMigration::ImportWizard::ImportWizard().

void KexiConnSelectorWidget::showAdvancedConn  )  [slot]
 

Definition at line 173 of file KexiConnSelector.cpp.

References slotPrjTypeSelected().

Referenced by KexiMigration::ImportWizard::ImportWizard(), KexiNewProjectWizard::KexiNewProjectWizard(), and KexiNewProjectWizard::showPage().

void KexiConnSelectorWidget::showSimpleConn  )  [slot]
 

Definition at line 217 of file KexiConnSelector.cpp.

References m_fileDlg, KexiStartupFileDialog::Opening, and KexiStartupFileDialog::setConfirmOverwrites().

Referenced by KexiMigration::ImportWizard::ImportWizard(), KexiNewProjectWizard::KexiNewProjectWizard(), KexiNewProjectWizard::showPage(), and slotPrjTypeSelected().

void KexiConnSelectorWidget::slotConnectionItemExecuted QListViewItem item  )  [protected, slot]
 

Definition at line 283 of file KexiConnSelector.cpp.

References connectionItemExecuted().

Referenced by KexiConnSelectorWidget().

void KexiConnSelectorWidget::slotConnectionSelectionChanged  )  [protected, slot]
 

Definition at line 288 of file KexiConnSelector.cpp.

References connectionItemHighlighted(), and m_remote.

Referenced by KexiConnSelectorWidget(), slotPrjTypeSelected(), slotRemoteAddBtnClicked(), slotRemoteEditBtnClicked(), and slotRemoteRemoveBtnClicked().

void KexiConnSelectorWidget::slotPrjTypeSelected int  id  )  [protected, slot]
 

Definition at line 180 of file KexiConnSelector.cpp.

References m_remote, showSimpleConn(), and slotConnectionSelectionChanged().

Referenced by KexiConnSelectorWidget(), and showAdvancedConn().

void KexiConnSelectorWidget::slotRemoteAddBtnClicked  )  [protected, slot]
 

Todo:
msg?

Definition at line 358 of file KexiConnSelector.cpp.

References KexiDBConnectionDialog::currentProjectData(), m_remote, and slotConnectionSelectionChanged().

Referenced by KexiConnSelectorWidget().

void KexiConnSelectorWidget::slotRemoteEditBtnClicked  )  [protected, slot]
 

Todo:
msg?

Definition at line 381 of file KexiConnSelector.cpp.

References KexiDBConnectionDialog::currentProjectData(), ConnectionDataLVItem::data(), m_remote, slotConnectionSelectionChanged(), and ConnectionDataLVItem::update().

Referenced by KexiConnSelectorWidget().

void KexiConnSelectorWidget::slotRemoteRemoveBtnClicked  )  [protected, slot]
 

Definition at line 403 of file KexiConnSelector.cpp.

References ConnectionDataLVItem::data(), m_remote, and slotConnectionSelectionChanged().

Referenced by KexiConnSelectorWidget().


Member Data Documentation

KexiStartupFileDialog* KexiConnSelectorWidget::m_fileDlg
 

Definition at line 102 of file KexiConnSelector.h.

Referenced by KexiNewProjectWizard::accept(), KexiConnSelectorWidget(), KexiNewProjectWizard::KexiNewProjectWizard(), selectedConnectionType(), selectedFileName(), setConfirmOverwrites(), setFocus(), setSelectedFileName(), KexiNewProjectWizard::showPage(), and showSimpleConn().

KexiConnSelectorBase* KexiConnSelectorWidget::m_remote
 

Definition at line 100 of file KexiConnSelector.h.

Referenced by connectionsList(), hideConnectonIcon(), KexiConnSelectorWidget(), KexiNewProjectWizard::KexiNewProjectWizard(), selectedConnectionData(), setFocus(), slotConnectionSelectionChanged(), slotPrjTypeSelected(), slotRemoteAddBtnClicked(), slotRemoteEditBtnClicked(), and slotRemoteRemoveBtnClicked().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:49:52 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003