1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
/*!
* \file
*
* \author Peter Harvey <pharvey@peterharvey.org>
* \author \sa AUTHORS file
* \version 2
* \date 2007
* \license Copyright unixODBC Project 2007-2008, LGPL
*/
#ifndef CDATASOURCENAMELIST_H
#define CDATASOURCENAMELIST_H
#include "CODBCInst.h"
#include <QTableWidget>
/*!
* \brief A simple table widget listing Data Source Names (DSN's).
*
* You can use this widget to present a list of DSN's so that one can
* simply be selected. Simply instantiating the widget is enough to
* display the DSN's. Then one can get the selected DSN by calling the
* getter functions;
*
* \li getDataSourceName
* \li getDescription
*
* This widget can also be used as the core widget for managing the DSN's
* by connecting to the following slots;
*
* \li slotAdd
* \li slotEdit
* \li slotDelete
*
* \note ODBC_USER_DSN's can be edited with normal privileges but ODBC_SYSTEM_DSN's,
* typically, will require elevated system privileges such as 'root' access.
*
* \sa CDriverList
* CDataSources
*/
class CDataSourceNameList : public QTableWidget
{
Q_OBJECT
public:
CDataSourceNameList( QWidget* pwidgetParent = NULL, int nSource = ODBC_BOTH_DSN );
virtual ~CDataSourceNameList();
QString getDataSourceName();
QString getDescription();
public slots:
void slotAdd();
void slotEdit();
void slotDelete();
void slotLoad();
void slotDoubleClick( QTableWidgetItem *pItem );
private:
int nSource;
};
#endif
|