Source: /app/hbasic/hbasic/gui_db_access/db_dlg_password.h


Annotated List
Files
Globals
Hierarchy
Index
/* **************************************************************************
 File: dlg_password.h
 Desc: Get user and password for database Connection
 ----------------------------------------------------------------------------
	copyright            : (C) 2001 HBasic project (Marcus Engels)
 ***************************************************************************/

/* **************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

/* ----------------------------------------------------------------------- */
/* Classlist: List of classes that will be defined in this source file.    */
/* ----------------------------------------------------------------------- */

/*
  Class dlgPassword : This class provides the dialog used to set up
   database connections or connect to a selected database.
*/

/* ----------------------------------------------------------------------- */
/* Changelog: Description of important changes within this file.           */
/*            Please report with date, maintainer and change description.  */
/* ----------------------------------------------------------------------- */

#ifndef DLG_PASSWORD_H
#define DLG_PASSWORD_H

#include 
#include 

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

class QTabWidget;
class dlgPassword;
class QVBox;
class QHBox;

#include "../src/structs.h"
#include "../src/project.h"

class connectEntry : public QListViewItem
{
public:
	connectEntry( QListView *parent, QString *text, HBDatabase *sptr);

	HBDatabase *db_ptr;
};

/**
  Class dlgPassword : This class provides the dialog used to set up
   database connections or connect to a selected database.
*/

class dlgPassword : public QDialog
{
Q_OBJECT

public:
	dlgPassword( QWidget *parent, HBDatabase *dsn_desc_ptr );
	QListView *lv_connect_info;
	void selectTabWidget( short new_page );

private:
	short db_list_changed;   /* TRUE if entry has been deleted or changed. */
	short edit_mode;
	QVBox *vb_main_wgt;
	QHBox *hb_button;
	HBDatabase *selected_db;

	QTabWidget *tab_dblist;
	QGroupBox *gp_frame;
	QPushButton *btn_ok;

	QPushButton *btn_selconnect;
	QPushButton *btn_seltables;
	QLineEdit *db_host;
	QLineEdit *hbdb_name;  /* database name in HBasic */
	QLineEdit *db_name;    /* database name on DB server */
	QLineEdit *db_desc;
	QComboBox *db_driver;
	QLineEdit *db_user;
	QLineEdit *db_password;
	QCheckBox *cb_save_pw;

	QPushButton *btn_new;
	QPushButton *btn_open;
	QPushButton *btn_delete;
	QPushButton *btn_select_all;

	void resizeEvent( QResizeEvent *evt );
	void showDatabaseList();

	void createConnect( void );
	void disconnectEvents( void );
	void selectDatabase( HBDatabase *dsn_ptr );

protected slots:
	void slotDbSelected( QListViewItem *selected_db );
	void slotOkClicked( void );
	void slotOpenTable( void );
	void slotHostChanged( const QString & new_hostname );
	void slotHbDbNameChanged( const QString & new_dbname );
	void slotDbNameChanged( const QString & new_hostname );
	void slotUserChanged( const QString & new_hostname );
	void slotPasswordChanged( const QString & new_hostname );
	void slotDriverChanged( const QString & new_password );
	void slotDescChanged( const QString & new_hostname );
	void slotSavePwChanged( int new_state );
	void deleteSelectedDb( void );
	void createNewDb( void );
};

#endif

Generated by: root on linux on Sun Jul 13 18:06:35 2003, using kdoc 2.0a54.