xref: /AOO41X/main/dbaccess/source/ui/querydesign/querydlg.hxx (revision 2e2212a7c22e96cf6f6fab0dd042c34a45a64bd6)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef DBAUI_QUERYDLG_HXX
24 #define DBAUI_QUERYDLG_HXX
25 #ifndef _SV_DIALOG_HXX //autogen
26 #include <vcl/dialog.hxx>
27 #endif
28 
29 #ifndef _SV_BUTTON_HXX //autogen
30 #include <vcl/button.hxx>
31 #endif
32 
33 #ifndef _SV_FIXED_HXX //autogen
34 #include <vcl/fixed.hxx>
35 #endif
36 #ifndef _SV_LSTBOX_HXX
37 #include <vcl/lstbox.hxx>
38 #endif
39 
40 #ifndef DBAUI_ENUMTYPES_HXX
41 #include "QEnumTypes.hxx"
42 #endif
43 
44 #ifndef DBAUI_RELCONTROLIFACE_HXX
45 #include "RelControliFace.hxx"
46 #endif
47 #ifndef DBAUI_JOINTABLEVIEW_HXX
48 #include "JoinTableView.hxx"
49 #endif
50 
51 
52 namespace dbaui
53 {
54     class OQueryTableConnectionData;
55     class OTableListBoxControl;
56     class OQueryTableView;
57     class OJoinControl;
58     class DlgQryJoin :  public ModalDialog
59                         ,public IRelationControlInterface
60     {
61     protected:
62         FixedText               aML_HelpText;
63         OKButton                aPB_OK;
64         CancelButton            aPB_CANCEL;
65         HelpButton              aPB_HELP;
66 
67         OJoinControl*                       m_pJoinControl;
68         OTableListBoxControl*               m_pTableControl;
69         OJoinTableView::OTableWindowMap*    m_pTableMap;
70         OQueryTableView*                    m_pTableView;
71 
72         EJoinType                           eJoinType;
73         TTableConnectionData::value_type    m_pConnData; // enth"alt linke und rechte Tabelle
74         TTableConnectionData::value_type    m_pOrigConnData;
75         ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection;
76 
77 
78         DECL_LINK( OKClickHdl, Button* );
79         DECL_LINK( LBChangeHdl, ListBox* );
80         DECL_LINK( NaturalToggleHdl, CheckBox* );
81 
82         /** setJoinType enables and set the new join type
83             @param  _eNewJoinType   the new jointype
84         */
85         void setJoinType(EJoinType _eNewJoinType);
86     public:
87         DlgQryJoin( OQueryTableView * pParent,
88                     const TTableConnectionData::value_type& pData,
89                     OJoinTableView::OTableWindowMap*    _pTableMap,
90                     const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection,
91                     sal_Bool _bAllowTableSelect);
92         virtual ~DlgQryJoin();
GetJoinType() const93         EJoinType GetJoinType() const { return eJoinType; };
94 
95         /** getConnectionData returns the current connection data
96             @return the current connectiondata
97         */
98         virtual TTableConnectionData::value_type getConnectionData() const;
99 
100         /** setValid set the valid inside, can be used for OK buttons
101             @param  _bValid true when the using control allows an update
102         */
103         virtual void setValid(sal_Bool _bValid);
104 
getConnection()105         virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > getConnection() { return m_xConnection; }
106 
107         /** notifyConnectionChange is callback which is called when the table selection has changed and a new connection exists
108             @param  _pConnectionData    the connection which exists between the new tables
109         */
110         virtual void notifyConnectionChange();
111     };
112 }
113 #endif // DBAUI_QUERYDLG_HXX
114 
115 
116 
117