1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_DBACCESS_SOURCE_UI_QUERYDESIGN_QTABLEWINDOW_HXX
20 #define INCLUDED_DBACCESS_SOURCE_UI_QUERYDESIGN_QTABLEWINDOW_HXX
22 #include "TableWindow.hxx"
23 #include "QTableWindowData.hxx"
24 #include "TableFieldDescription.hxx"
25 #include <tools/rtti.hxx>
29 class OQueryTableWindow
: public OTableWindow
31 sal_Int32 m_nAliasNum
;
32 OUString m_strInitialAlias
;
34 OQueryTableWindow( vcl::Window
* pParent
, const TTableWindowData::value_type
& pTabWinData
, sal_Unicode
* pszInitialAlias
= NULL
);
36 OUString
GetAliasName() const
38 return static_cast<OQueryTableWindowData
*>(GetData().get())->GetAliasName();
40 void SetAliasName(const OUString
& strNewAlias
)
42 static_cast<OQueryTableWindowData
*>(GetData().get())->SetAliasName(strNewAlias
);
45 // late Constructor, the base class CREATES Listbox on first call
46 virtual bool Init() SAL_OVERRIDE
;
48 inline sal_Int32
GetAliasNum() const { return m_nAliasNum
; }
50 bool ExistsField(const OUString
& strFieldName
, OTableFieldDescRef
& rInfo
);
51 bool ExistsAVisitedConn() const;
53 virtual OUString
GetName() const SAL_OVERRIDE
{ return GetWinName(); }
56 virtual void KeyInput( const KeyEvent
& rEvt
) SAL_OVERRIDE
;
58 virtual void OnEntryDoubleClicked(SvTreeListEntry
* pEntry
) SAL_OVERRIDE
;
59 // is called from DoubleClickHdl of the ListBox
60 /** delete the user data with the equal type as created within createUserData
62 The user data store in the listbox entries. Created with a call to createUserData.
63 _pUserData may be <NULL/>.
65 virtual void deleteUserData(void*& _pUserData
) SAL_OVERRIDE
;
67 /** creates user information that will be append at the ListBoxentry
69 The corresponding column, can be <NULL/>.
71 <TRUE/> when the column belongs to the primary key
73 the user data which will be append at the listbox entry, may be <NULL/>
75 virtual void* createUserData(const ::com::sun::star::uno::Reference
<
76 ::com::sun::star::beans::XPropertySet
>& _xColumn
,
77 bool _bPrimaryKey
) SAL_OVERRIDE
;
80 #endif // INCLUDED_DBACCESS_SOURCE_UI_QUERYDESIGN_QTABLEWINDOW_HXX
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */