File: CManageDataSourceNames.cpp

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 (50 lines) | stat: -rw-r--r-- 1,600 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
/*!
 * \file
 *
 * \author  Peter Harvey <pharvey@peterharvey.org>
 * \author  \sa AUTHORS file
 * \version 2
 * \date    2007
 * \license Copyright unixODBC Project 2007-2008, LGPL
 */
#include <QtGui>

#include "CManageDataSourceNames.h"

#include "CDataSourceNames.h"
#include "CDataSourceNamesFile.h"
#include "CPage.h"

#include "DataSourceName48.xpm"

CManageDataSourceNames::CManageDataSourceNames( QWidget *pwidgetParent )
    : QTabWidget( pwidgetParent )
{
    pDataSourceNamesUser    = new CDataSourceNames( this, ODBC_USER_DSN );
    pDataSourceNamesSystem  = new CDataSourceNames( this, ODBC_SYSTEM_DSN );
    pDataSourceNamesFile    = new CDataSourceNamesFile( this );

    CPage *ppageUser    = new CPage( this, QString::null, pDataSourceNamesUser, pDataSourceNamesUser->windowIcon(), pDataSourceNamesUser->windowHelp() ); 
    CPage *ppageSystem  = new CPage( this, QString::null, pDataSourceNamesSystem, pDataSourceNamesSystem->windowIcon(), pDataSourceNamesSystem->windowHelp() ); 
    CPage *ppageFile    = new CPage( this, QString::null, pDataSourceNamesFile, pDataSourceNamesFile->windowIcon(), pDataSourceNamesFile->windowHelp() ); 

    addTab( ppageUser, tr( "User" ) );
    addTab( ppageSystem, tr( "System" ) );
    addTab( ppageFile, tr( "File" ) );

    setWindowIcon( QPixmap( xpmDataSourceName48 ) );
    setWindowTitle( tr( "Data Source Names" ) );
}

CManageDataSourceNames::~CManageDataSourceNames()
{
}

void CManageDataSourceNames::slotLoad()
{
    pDataSourceNamesUser->slotLoad();
    pDataSourceNamesSystem->slotLoad();
    pDataSourceNamesFile->slotLoad();
}