Version 3.6.0.2, tag libreoffice-3.6.0.2
[LibreOffice.git] / dbaccess / source / ui / dlg / dsselect.hxx
blob0081cb9e6d79282dcf2ab466ec99563855a940f6
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef _DBAUI_DSSELECT_HXX_
30 #define _DBAUI_DSSELECT_HXX_
32 #include "dsntypes.hxx"
33 #include "odbcconfig.hxx"
34 #include "commontypes.hxx"
36 #include <vcl/dialog.hxx>
37 #include <vcl/lstbox.hxx>
38 #include <vcl/button.hxx>
39 #include <vcl/group.hxx>
40 #include <vcl/fixed.hxx>
41 #include <rtl/ustring.hxx>
43 #include <memory>
45 class SfxItemSet;
46 //.........................................................................
47 namespace dbaui
49 //.........................................................................
51 //=========================================================================
52 //= ODatasourceSelector
53 //=========================================================================
54 class ODatasourceSelectDialog : public ModalDialog
56 protected:
57 FixedText m_aDescription;
58 ListBox m_aDatasource;
59 OKButton m_aOk;
60 CancelButton m_aCancel;
61 HelpButton m_aHelp;
62 #ifdef HAVE_ODBC_ADMINISTRATION
63 PushButton m_aManageDatasources;
64 #endif
65 SfxItemSet* m_pOutputSet;
66 #ifdef HAVE_ODBC_ADMINISTRATION
67 ::std::auto_ptr< OOdbcManagement >
68 m_pODBCManagement;
69 #endif
71 public:
72 ODatasourceSelectDialog( Window* _pParent, const StringBag& _rDatasources, SfxItemSet* _pOutputSet = NULL );
73 ~ODatasourceSelectDialog();
75 inline String GetSelected() const { return m_aDatasource.GetSelectEntry();}
76 void Select( const String& _rEntry ) { m_aDatasource.SelectEntry(_rEntry); }
78 virtual sal_Bool Close();
80 protected:
81 DECL_LINK( ListDblClickHdl, ListBox * );
82 #ifdef HAVE_ODBC_ADMINISTRATION
83 DECL_LINK( ManageClickHdl, void* );
84 DECL_LINK( ManageProcessFinished, void* );
85 #endif
86 void fillListBox(const StringBag& _rDatasources);
89 //.........................................................................
90 } // namespace dbaui
91 //.........................................................................
93 #endif // _DBAUI_DSSELECT_HXX_
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */