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