Line data Source code
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_DBACCESS_SOURCE_UI_QUERYDESIGN_QUERYDLG_HXX
20 : #define INCLUDED_DBACCESS_SOURCE_UI_QUERYDESIGN_QUERYDLG_HXX
21 : #include <vcl/dialog.hxx>
22 :
23 : #include <vcl/button.hxx>
24 :
25 : #include <vcl/fixed.hxx>
26 : #include <vcl/lstbox.hxx>
27 :
28 : #include "QEnumTypes.hxx"
29 :
30 : #include "RelControliFace.hxx"
31 : #include "JoinTableView.hxx"
32 :
33 :
34 : namespace dbaui
35 : {
36 : class OTableListBoxControl;
37 : class OQueryTableView;
38 : class DlgQryJoin : public ModalDialog
39 : ,public IRelationControlInterface
40 : {
41 : protected:
42 : VclPtr<FixedText> m_pML_HelpText;
43 : VclPtr<OKButton> m_pPB_OK;
44 : VclPtr<ListBox> m_pLB_JoinType;
45 : VclPtr<CheckBox> m_pCBNatural;
46 :
47 : OTableListBoxControl* m_pTableControl;
48 : OJoinTableView::OTableWindowMap* m_pTableMap;
49 : VclPtr<OQueryTableView> m_pTableView;
50 :
51 : EJoinType eJoinType;
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;
55 :
56 :
57 : DECL_LINK( OKClickHdl, Button* );
58 : DECL_LINK( LBChangeHdl, ListBox* );
59 : DECL_LINK( NaturalToggleHdl, CheckBox* );
60 :
61 : /** setJoinType enables and set the new join type
62 : @param _eNewJoinType the new jointype
63 : */
64 : void setJoinType(EJoinType _eNewJoinType);
65 : public:
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 0 : EJoinType GetJoinType() const { return eJoinType; };
74 :
75 : /** getConnectionData returns the current connection data
76 : @return the current connectiondata
77 : */
78 : virtual TTableConnectionData::value_type getConnectionData() const SAL_OVERRIDE;
79 :
80 : /** setValid set the valid inside, can be used for OK buttons
81 : @param _bValid true when the using control allows an update
82 : */
83 : virtual void setValid(bool _bValid) SAL_OVERRIDE;
84 :
85 0 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > getConnection() SAL_OVERRIDE { return m_xConnection; }
86 :
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
89 : */
90 : virtual void notifyConnectionChange() SAL_OVERRIDE;
91 : };
92 : }
93 : #endif // INCLUDED_DBACCESS_SOURCE_UI_QUERYDESIGN_QUERYDLG_HXX
94 :
95 :
96 :
97 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|