1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 #ifndef INCLUDED_DBACCESS_SOURCE_UI_QUERYDESIGN_QUERYDLG_HXX
20 #define INCLUDED_DBACCESS_SOURCE_UI_QUERYDESIGN_QUERYDLG_HXX
21 #include <vcl/dialog.hxx>
23 #include <vcl/button.hxx>
25 #include <vcl/fixed.hxx>
26 #include <vcl/lstbox.hxx>
28 #include "QEnumTypes.hxx"
30 #include "RelControliFace.hxx"
31 #include "JoinTableView.hxx"
36 class OTableListBoxControl
;
37 class OQueryTableView
;
38 class DlgQryJoin
: public ModalDialog
39 ,public IRelationControlInterface
42 VclPtr
<FixedText
> m_pML_HelpText
;
43 VclPtr
<OKButton
> m_pPB_OK
;
44 VclPtr
<ListBox
> m_pLB_JoinType
;
45 VclPtr
<CheckBox
> m_pCBNatural
;
47 OTableListBoxControl
* m_pTableControl
;
48 OJoinTableView::OTableWindowMap
* m_pTableMap
;
49 VclPtr
<OQueryTableView
> m_pTableView
;
52 TTableConnectionData::value_type m_pConnData
; // contains left and right table
53 TTableConnectionData::value_type m_pOrigConnData
;
54 ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XConnection
> m_xConnection
;
57 DECL_LINK( OKClickHdl
, Button
* );
58 DECL_LINK( LBChangeHdl
, ListBox
* );
59 DECL_LINK( NaturalToggleHdl
, CheckBox
* );
61 /** setJoinType enables and set the new join type
62 @param _eNewJoinType the new jointype
64 void setJoinType(EJoinType _eNewJoinType
);
66 DlgQryJoin( OQueryTableView
* pParent
,
67 const TTableConnectionData::value_type
& pData
,
68 OJoinTableView::OTableWindowMap
* _pTableMap
,
69 const ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XConnection
>& _xConnection
,
70 bool _bAllowTableSelect
);
71 virtual ~DlgQryJoin();
72 virtual void dispose() SAL_OVERRIDE
;
73 EJoinType
GetJoinType() const { return eJoinType
; };
75 /** getConnectionData returns the current connection data
76 @return the current connectiondata
78 virtual TTableConnectionData::value_type
getConnectionData() const SAL_OVERRIDE
;
80 /** setValid set the valid inside, can be used for OK buttons
81 @param _bValid true when the using control allows an update
83 virtual void setValid(bool _bValid
) SAL_OVERRIDE
;
85 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XConnection
> getConnection() SAL_OVERRIDE
{ return m_xConnection
; }
87 /** notifyConnectionChange is callback which is called when the table selection has changed and a new connection exists
88 @param _pConnectionData the connection which exists between the new tables
90 virtual void notifyConnectionChange() SAL_OVERRIDE
;
93 #endif // INCLUDED_DBACCESS_SOURCE_UI_QUERYDESIGN_QUERYDLG_HXX
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */