LibreOffice Module dbaccess (master) 1
adtabdlg.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#pragma once
20
21#include <memory>
22#include <com/sun/star/sdbc/XConnection.hpp>
23#include <vcl/weld.hxx>
24#include "tabletree.hxx"
25
26namespace dbaui
27{
31 {
32 public:
33 virtual void updateTableObjectList( bool _bAllowViews ) = 0;
34 virtual OUString getSelectedName( OUString& _out_rAliasName ) const = 0;
35 virtual bool isLeafSelected() const = 0;
36
37 virtual ~TableObjectListFacade();
38 };
39
41 {
42 public:
43 virtual css::uno::Reference< css::sdbc::XConnection >
44 getConnection() const = 0;
45 virtual bool allowViews() const = 0;
46 virtual bool allowQueries() const = 0;
47 virtual bool allowAddition() const = 0;
48 virtual void addTableWindow( const OUString& _rQualifiedTableName, const OUString& _rAliasName ) = 0;
49 virtual void onWindowClosing() = 0;
50
51 protected:
53 };
54
56 {
58 std::unique_ptr< TableObjectListFacade > m_xCurrentList;
59
60 std::unique_ptr<weld::RadioButton> m_xCaseTables;
61 std::unique_ptr<weld::RadioButton> m_xCaseQueries;
62
63 std::unique_ptr<OTableTreeListBox> m_xTableList;
64 std::unique_ptr<weld::TreeView> m_xQueryList;
65
66 std::unique_ptr<weld::Button> m_xAddButton;
67 std::unique_ptr<weld::Button> m_xCloseButton;
68
69 DECL_LINK( AddClickHdl, weld::Button&, void );
70 DECL_LINK( CloseClickHdl, weld::Button&, void);
71 DECL_LINK( TableListDoubleClickHdl, weld::TreeView&, bool );
72 DECL_LINK( TableListSelectHdl, weld::TreeView&, void );
73 DECL_LINK( OnTypeSelected, weld::Toggleable&, void );
74
75 public:
76 OAddTableDlg(weld::Window* _pParent,
77 IAddTableDialogContext& _rContext);
78 virtual ~OAddTableDlg() override;
79
80 void Update();
81 void OnClose();
82
83 static OUString getDialogTitleForContext(
84 IAddTableDialogContext const & _rContext );
85
86 private:
87 bool impl_isAddAllowed();
88
90 {
93 };
94 void impl_switchTo( ObjectList _eList );
95 };
96}
97
98/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Reference< css::sdbc::XConnection > getConnection() const =0
virtual void onWindowClosing()=0
virtual bool allowQueries() const =0
virtual void addTableWindow(const OUString &_rQualifiedTableName, const OUString &_rAliasName)=0
virtual bool allowAddition() const =0
virtual bool allowViews() const =0
static OUString getDialogTitleForContext(IAddTableDialogContext const &_rContext)
Definition: adtabdlg.cxx:455
std::unique_ptr< weld::RadioButton > m_xCaseTables
Definition: adtabdlg.hxx:60
DECL_LINK(TableListDoubleClickHdl, weld::TreeView &, bool)
std::unique_ptr< weld::RadioButton > m_xCaseQueries
Definition: adtabdlg.hxx:61
std::unique_ptr< weld::Button > m_xCloseButton
Definition: adtabdlg.hxx:67
IAddTableDialogContext & m_rContext
Definition: adtabdlg.hxx:57
DECL_LINK(AddClickHdl, weld::Button &, void)
DECL_LINK(OnTypeSelected, weld::Toggleable &, void)
DECL_LINK(TableListSelectHdl, weld::TreeView &, void)
std::unique_ptr< weld::TreeView > m_xQueryList
Definition: adtabdlg.hxx:64
DECL_LINK(CloseClickHdl, weld::Button &, void)
std::unique_ptr< weld::Button > m_xAddButton
Definition: adtabdlg.hxx:66
void impl_switchTo(ObjectList _eList)
Definition: adtabdlg.cxx:376
virtual ~OAddTableDlg() override
Definition: adtabdlg.cxx:372
bool impl_isAddAllowed()
Definition: adtabdlg.cxx:450
OAddTableDlg(weld::Window *_pParent, IAddTableDialogContext &_rContext)
Definition: adtabdlg.cxx:333
std::unique_ptr< OTableTreeListBox > m_xTableList
Definition: adtabdlg.hxx:63
std::unique_ptr< TableObjectListFacade > m_xCurrentList
Definition: adtabdlg.hxx:58
unifies the access to a list of table/query objects
Definition: adtabdlg.hxx:31
virtual void updateTableObjectList(bool _bAllowViews)=0
virtual OUString getSelectedName(OUString &_out_rAliasName) const =0
virtual bool isLeafSelected() const =0