tdf#130857 qt weld: Implement QtInstanceWidget::get_text_height
[LibreOffice.git] / dbaccess / source / ui / inc / RelationTableView.hxx
blob6c178a3de937c05c0ebf90a089beb27c0f3927f8
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #pragma once
21 #include "JoinTableView.hxx"
22 #include <comphelper/containermultiplexer.hxx>
23 #include <cppuhelper/basemutex.hxx>
24 #include <rtl/ref.hxx>
26 namespace dbaui
28 class ORelationDesignView;
30 class ORelationTableView : public ::cppu::BaseMutex,
31 public OJoinTableView,
32 public ::comphelper::OContainerListener
34 VclPtr<OTableConnection> m_pExistingConnection; ///< is set when a connection was dragged on an existing connection
35 TTableConnectionData::value_type m_pCurrentlyTabConnData; ///< set when we creating a connection with more than one keycolumn
36 ::rtl::Reference< comphelper::OContainerListenerAdapter> m_pContainerListener;
37 bool m_bInRemove;
39 virtual void ConnDoubleClicked(VclPtr<OTableConnection>& rConnection) override;
40 virtual void AddTabWin(const OUString& _rComposedName, const OUString& rWinName, bool bNewTable = false) override;
42 virtual VclPtr<OTableWindow> createWindow(const TTableWindowData::value_type& _pData) override;
44 /** determines whether the classes Init method should accept a query
45 name, or only table names */
46 virtual bool allowQueries() const override;
48 // OContainerListener
49 virtual void _elementInserted( const css::container::ContainerEvent& _rEvent ) override;
50 virtual void _elementRemoved( const css::container::ContainerEvent& _rEvent ) override;
51 virtual void _elementReplaced( const css::container::ContainerEvent& _rEvent ) override;
53 public:
54 ORelationTableView( vcl::Window* pParent, ORelationDesignView* pView );
55 virtual ~ORelationTableView() override;
56 virtual void dispose() override;
58 virtual void RemoveTabWin( OTableWindow* pTabWin ) override;
59 virtual void AddConnection(const OJoinExchangeData& jxdSource, const OJoinExchangeData& jxdDest) override;
60 virtual bool RemoveConnection(VclPtr<OTableConnection>& rConn, bool _bDelete) override;
62 virtual void ReSync() override;
64 /// Creates a dialogue for a completely new relation.
65 void AddNewRelation();
67 /// used by AddTabDlg to check if tables can be added
68 virtual bool IsAddAllowed() override;
70 virtual void lookForUiActivities() override;
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */