tdf#130857 qt weld: Implement QtInstanceWidget::get_text_height
[LibreOffice.git] / dbaccess / source / ui / querydesign / querydlg.hxx
blob3da416c6e9278de208f1a3e97c920a87220a43ba
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 <vcl/weld.hxx>
23 #include <QEnumTypes.hxx>
25 #include <RelControliFace.hxx>
26 #include <JoinTableView.hxx>
29 namespace dbaui
31 class OTableListBoxControl;
32 class OQueryTableView;
33 class DlgQryJoin final : public weld::GenericDialogController
34 , public IRelationControlInterface
36 EJoinType eJoinType;
37 TTableConnectionData::value_type m_pConnData; // contains left and right table
38 TTableConnectionData::value_type m_pOrigConnData;
39 css::uno::Reference< css::sdbc::XConnection > m_xConnection;
41 std::unique_ptr<weld::Label> m_xML_HelpText;
42 std::unique_ptr<weld::Button> m_xPB_OK;
43 std::unique_ptr<weld::ComboBox> m_xLB_JoinType;
44 std::unique_ptr<weld::CheckButton> m_xCBNatural;
45 std::unique_ptr<OTableListBoxControl> m_xTableControl;
47 DECL_LINK(OKClickHdl, weld::Button&, void);
48 DECL_LINK(LBChangeHdl, weld::ComboBox&, void);
49 DECL_LINK(NaturalToggleHdl, weld::Toggleable&, void);
51 /** setJoinType enables and set the new join type
52 @param _eNewJoinType the new jointype
54 void setJoinType(EJoinType _eNewJoinType);
55 public:
56 DlgQryJoin( const OQueryTableView * pParent,
57 const TTableConnectionData::value_type& pData,
58 const OJoinTableView::OTableWindowMap* _pTableMap,
59 const css::uno::Reference< css::sdbc::XConnection >& _xConnection,
60 bool _bAllowTableSelect);
61 virtual ~DlgQryJoin() override;
62 EJoinType GetJoinType() const { return eJoinType; };
64 /** setValid set the valid inside, can be used for OK buttons
65 @param _bValid true when the using control allows an update
67 virtual void setValid(bool _bValid) override;
69 /** notifyConnectionChange is callback which is called when the table selection has changed and a new connection exists
70 @param _pConnectionData the connection which exists between the new tables
72 virtual void notifyConnectionChange() override;
77 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */