LibreOffice Module dbaccess (master) 1
dsselect.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22#include <rtl/ustring.hxx>
23#include <vcl/weld.hxx>
24
25#include <memory>
26#include <set>
27
28class SfxItemSet;
29namespace dbaui
30{
31// ODatasourceSelector
33{
34 std::unique_ptr<weld::TreeView> m_xDatasource;
35#ifdef HAVE_ODBC_ADMINISTRATION
36 std::unique_ptr<OOdbcManagement> m_xODBCManagement;
37#endif
38
39public:
40 ODatasourceSelectDialog(weld::Window* pParent, const std::set<OUString>& rDatasources);
41 virtual ~ODatasourceSelectDialog() override;
42 OUString GetSelected() const { return m_xDatasource->get_selected_text(); }
43 void Select(const OUString& _rEntry) { m_xDatasource->select_text(_rEntry); }
44
45 virtual short run() override;
46
47private:
48 DECL_LINK(ListDblClickHdl, weld::TreeView&, bool);
49#ifdef HAVE_ODBC_ADMINISTRATION
50 DECL_LINK(ManageClickHdl, weld::Button&, void);
51 DECL_LINK(ManageProcessFinished, void*, void);
52#endif
53 void fillListBox(const std::set<OUString>& _rDatasources);
54};
55
56} // namespace dbaui
57
58/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual ~ODatasourceSelectDialog() override
Definition: dsselect.cxx:48
OUString GetSelected() const
Definition: dsselect.hxx:42
ODatasourceSelectDialog(weld::Window *pParent, const std::set< OUString > &rDatasources)
Definition: dsselect.cxx:32
void Select(const OUString &_rEntry)
Definition: dsselect.hxx:43
DECL_LINK(ListDblClickHdl, weld::TreeView &, bool)
void fillListBox(const std::set< OUString > &_rDatasources)
Definition: dsselect.cxx:107
std::unique_ptr< weld::TreeView > m_xDatasource
Definition: dsselect.hxx:34
virtual short run() override
Definition: dsselect.cxx:59