update dev300-m58
[ooovba.git] / dbaccess / source / ui / querydesign / QTableWindow.hxx
bloba658a3302889fc086e864e7a8efe1c72d5685f7e
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: QTableWindow.hxx,v $
10 * $Revision: 1.9 $
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_QUERY_TABLEWINDOW_HXX
31 #define DBAUI_QUERY_TABLEWINDOW_HXX
33 #ifndef DBAUI_TABLEWINDOW_HXX
34 #include "TableWindow.hxx"
35 #endif
36 #ifndef DBAUI_QUERY_TABLEWINDOWDATA_HXX
37 #include "QTableWindowData.hxx"
38 #endif
39 #ifndef DBAUI_TABLEFIELDDESC_HXX
40 #include "TableFieldDescription.hxx"
41 #endif
42 #ifndef _RTTI_HXX
43 #include <tools/rtti.hxx>
44 #endif
46 namespace dbaui
48 //==================================================================
49 class OQueryTableWindow : public OTableWindow
51 sal_Int32 m_nAliasNum;
52 ::rtl::OUString m_strInitialAlias;
53 public:
54 OQueryTableWindow( Window* pParent, const TTableWindowData::value_type& pTabWinData, sal_Unicode* pszInitialAlias = NULL );
55 virtual ~OQueryTableWindow();
57 ::rtl::OUString GetAliasName() const
59 return static_cast<OQueryTableWindowData*>(GetData().get())->GetAliasName();
61 void SetAliasName(const ::rtl::OUString& strNewAlias)
63 static_cast<OQueryTableWindowData*>(GetData().get())->SetAliasName(strNewAlias);
66 // spaeter Constructor, die Basisklasse ERZEUGT beim ersten Aufruf die Listbox
67 virtual BOOL Init();
69 inline sal_Int32 GetAliasNum() const { return m_nAliasNum; }
71 BOOL ExistsField(const ::rtl::OUString& strFieldName, OTableFieldDescRef& rInfo);
72 BOOL ExistsAVisitedConn() const;
74 virtual ::rtl::OUString GetName() const { return GetWinName(); }
76 protected:
77 virtual void KeyInput( const KeyEvent& rEvt );
79 virtual void OnEntryDoubleClicked(SvLBoxEntry* pEntry);
80 // wird aus dem DoubleClickHdl der ListBox heraus aufgerufen
81 /** delete the user data with the equal type as created within createUserData
82 @param _pUserData
83 The user data store in the listbox entries. Created with a call to createUserData.
84 _pUserData may be <NULL/>.
86 virtual void deleteUserData(void*& _pUserData);
88 /** creates user information that will be append at the ListBoxentry
89 @param _xColumn
90 The corresponding column, can be <NULL/>.
91 @param _bPrimaryKey
92 <TRUE/> when the column belongs to the primary key
93 @return
94 the user data which will be append at the listbox entry, may be <NULL/>
96 virtual void* createUserData(const ::com::sun::star::uno::Reference<
97 ::com::sun::star::beans::XPropertySet>& _xColumn,
98 bool _bPrimaryKey);
101 #endif // DBAUI_QUERY_TABLEWINDOW_HXX