File: CDataSourceNamesFile.h

package info (click to toggle)
unixodbc 2.2.14p2-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 14,628 kB
  • ctags: 12,533
  • sloc: ansic: 104,243; cpp: 38,571; sh: 15,958; makefile: 2,727; sql: 1
file content (67 lines) | stat: -rw-r--r-- 1,796 bytes parent folder | download | duplicates (2)
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
64
65
66
67
/*!
 * \file
 *
 * \author  Peter Harvey <pharvey@peterharvey.org>
 * \author  \sa AUTHORS file
 * \version 2
 * \date    2007
 * \license Copyright unixODBC Project 2007-2008, LGPL
 */
#ifndef CDATASOURCENAMESFILE_H
#define CDATASOURCENAMESFILE_H

#include "CODBCInst.h"

#define ODBC_HELP_DATASOURCES_FILE "File Data Source Names (DSN's) are files which hold connection options. These are more versatile than regular DSN's because the files can be shared over a network and/or easily distributed throughout a network."

class CDataSourceNamesFileModel;
class CFileSelector;
class QListView;
class QLabel;

/*! 
 * \class   CDataSourceNamesFile
 *
 * \brief   Widget to allow User to manage FileDSN's including setting default dir.
 *
 *          Presents a list of FileDSN's in the given Path. The User may;
 *          change the Path and add/remove/edit a selected FileDSN.
 *
 * \note    Elevated privileges (root) may be required to add/remove/edit a FileDSN. This
 *          depends largely on where the FileDSN is located.
 *
 * \sa      CManageDataSources
 *          CManageDrivers
 *          CStats
 *          CTracing
 *          CAbout
 */
class CDataSourceNamesFile : public QWidget
{
    Q_OBJECT
public:
    CDataSourceNamesFile( QWidget* pwidgetParent = NULL );
    virtual ~CDataSourceNamesFile();

    QString windowHelp() { return QString( tr( ODBC_HELP_DATASOURCES_FILE ) ); }

public slots:
    void slotLoad();
   
protected slots:
    void slotAdd();
    void slotEdit();
    void slotDelete();
    void slotSetDefault();

protected:
    QLabel *                    plabelDefault;
    CFileSelector *             pFileSelector;
    CDataSourceNamesFileModel * pDataSourceNamesFileModel;
    QListView *                 pListView;

    QString getDefault();
};

#endif