LibreOffice Module sw (master) 1
dbtree.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#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_DBTREE_HXX
20#define INCLUDED_SW_SOURCE_UIBASE_INC_DBTREE_HXX
21
22#include <memory>
23#include <vcl/weld.hxx>
24
25#include <swdllapi.h>
26
28class SwWrtShell;
29
31{
34
36 std::unique_ptr<weld::TreeView> m_xTreeView;
37 std::unique_ptr<weld::TreeIter> m_xScratchIter;
38
39 DECL_DLLPRIVATE_LINK(RequestingChildrenHdl, const weld::TreeIter&, bool);
40 SAL_DLLPRIVATE void InitTreeList();
41
42public:
43 SwDBTreeList(std::unique_ptr<weld::TreeView> xTreeView);
45
46 OUString GetDBName(OUString& rTableName, OUString& rColumnName, sal_Bool* pbIsTable = nullptr);
47
48 void Select( std::u16string_view rDBName, std::u16string_view rTableName,
49 std::u16string_view rColumnName );
50
51 void ShowColumns(bool bShowCol);
52
53 void SetWrtShell(SwWrtShell& rSh);
54
55 void AddDataSource(const OUString& rSource);
56
57 void connect_changed(const Link<weld::TreeView&, void>& rLink) { m_xTreeView->connect_changed(rLink); }
58 void connect_row_activated(const Link<weld::TreeView&, bool>& rLink) { m_xTreeView->connect_row_activated(rLink); }
59 std::unique_ptr<weld::TreeIter> make_iterator(const weld::TreeIter* pOrig = nullptr) const { return m_xTreeView->make_iterator(pOrig); }
60 bool get_selected(weld::TreeIter* pIter) const { return m_xTreeView->get_selected(pIter); }
61 bool iter_parent(weld::TreeIter& rIter) const { return m_xTreeView->iter_parent(rIter); }
62 int get_iter_depth(const weld::TreeIter& rIter) const { return m_xTreeView->get_iter_depth(rIter); }
63 void set_size_request(int nWidth, int nHeight) { m_xTreeView->set_size_request(nWidth, nHeight); }
64};
65
66#endif
67
68/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool m_bInitialized
Definition: dbtree.hxx:32
bool get_selected(weld::TreeIter *pIter) const
Definition: dbtree.hxx:60
void connect_row_activated(const Link< weld::TreeView &, bool > &rLink)
Definition: dbtree.hxx:58
void set_size_request(int nWidth, int nHeight)
Definition: dbtree.hxx:63
rtl::Reference< SwDBTreeList_Impl > m_pImpl
Definition: dbtree.hxx:35
bool iter_parent(weld::TreeIter &rIter) const
Definition: dbtree.hxx:61
int get_iter_depth(const weld::TreeIter &rIter) const
Definition: dbtree.hxx:62
std::unique_ptr< weld::TreeIter > m_xScratchIter
Definition: dbtree.hxx:37
std::unique_ptr< weld::TreeView > m_xTreeView
Definition: dbtree.hxx:36
void connect_changed(const Link< weld::TreeView &, void > &rLink)
Definition: dbtree.hxx:57
DECL_DLLPRIVATE_LINK(RequestingChildrenHdl, const weld::TreeIter &, bool)
std::unique_ptr< weld::TreeIter > make_iterator(const weld::TreeIter *pOrig=nullptr) const
Definition: dbtree.hxx:59
bool m_bShowColumns
Definition: dbtree.hxx:33
Used by the UI to modify the document model.
Definition: wrtsh.hxx:97
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
unsigned char sal_Bool