merge the formfield patch from ooo-build
[ooovba.git] / dbaccess / source / ui / querydesign / querydlg.hxx
blob8cdcefbd2a187ad35472391ccfe486f9f7d4b426
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: querydlg.hxx,v $
10 * $Revision: 1.8 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef DBAUI_QUERYDLG_HXX
31 #define DBAUI_QUERYDLG_HXX
32 #ifndef _SV_DIALOG_HXX //autogen
33 #include <vcl/dialog.hxx>
34 #endif
36 #ifndef _SV_BUTTON_HXX //autogen
37 #include <vcl/button.hxx>
38 #endif
40 #ifndef _SV_FIXED_HXX //autogen
41 #include <vcl/fixed.hxx>
42 #endif
43 #ifndef _SV_LSTBOX_HXX
44 #include <vcl/lstbox.hxx>
45 #endif
47 #ifndef DBAUI_ENUMTYPES_HXX
48 #include "QEnumTypes.hxx"
49 #endif
51 #ifndef DBAUI_RELCONTROLIFACE_HXX
52 #include "RelControliFace.hxx"
53 #endif
54 #ifndef DBAUI_JOINTABLEVIEW_HXX
55 #include "JoinTableView.hxx"
56 #endif
59 namespace dbaui
61 class OQueryTableConnectionData;
62 class OTableListBoxControl;
63 class OQueryTableView;
64 class OJoinControl;
65 class DlgQryJoin : public ModalDialog
66 ,public IRelationControlInterface
68 protected:
69 FixedText aML_HelpText;
70 OKButton aPB_OK;
71 CancelButton aPB_CANCEL;
72 HelpButton aPB_HELP;
74 OJoinControl* m_pJoinControl;
75 OTableListBoxControl* m_pTableControl;
76 OJoinTableView::OTableWindowMap* m_pTableMap;
77 OQueryTableView* m_pTableView;
79 EJoinType eJoinType;
80 TTableConnectionData::value_type m_pConnData; // enth"alt linke und rechte Tabelle
81 TTableConnectionData::value_type m_pOrigConnData;
82 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection;
85 DECL_LINK( OKClickHdl, Button* );
86 DECL_LINK( LBChangeHdl, ListBox* );
87 DECL_LINK( NaturalToggleHdl, CheckBox* );
89 /** setJoinType enables and set the new join type
90 @param _eNewJoinType the new jointype
92 void setJoinType(EJoinType _eNewJoinType);
93 public:
94 DlgQryJoin( OQueryTableView * pParent,
95 const TTableConnectionData::value_type& pData,
96 OJoinTableView::OTableWindowMap* _pTableMap,
97 const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection,
98 BOOL _bAllowTableSelect);
99 virtual ~DlgQryJoin();
100 EJoinType GetJoinType() const { return eJoinType; };
102 /** getConnectionData returns the current connection data
103 @return the current connectiondata
105 virtual TTableConnectionData::value_type getConnectionData() const;
107 /** setValid set the valid inside, can be used for OK buttons
108 @param _bValid true when the using control allows an update
110 virtual void setValid(sal_Bool _bValid);
112 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > getConnection() { return m_xConnection; }
114 /** notifyConnectionChange is callback which is called when the table selection has changed and a new connection exists
115 @param _pConnectionData the connection which exists between the new tables
117 virtual void notifyConnectionChange();
120 #endif // DBAUI_QUERYDLG_HXX