LibreOffice Module dbaccess (master) 1
QTableWindow.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#pragma once
20
21#include <TableWindow.hxx>
22#include "QTableWindowData.hxx"
24
25namespace dbaui
26{
28 {
29 sal_Int32 m_nAliasNum;
31 public:
32 OQueryTableWindow( vcl::Window* pParent, const TTableWindowData::value_type& pTabWinData );
33
34 OUString const & GetAliasName() const
35 {
36 return static_cast<OQueryTableWindowData*>(GetData().get())->GetAliasName();
37 }
38 void SetAliasName(const OUString& strNewAlias)
39 {
40 static_cast<OQueryTableWindowData*>(GetData().get())->SetAliasName(strNewAlias);
41 }
42
43 // late Constructor, the base class CREATES Listbox on first call
44 virtual bool Init() override;
45
46 bool ExistsField(const OUString& strFieldName, OTableFieldDescRef const & rInfo);
47 bool ExistsAVisitedConn() const;
48
49 virtual OUString GetName() const override { return GetWinName(); }
50
51 protected:
52
53 virtual void OnEntryDoubleClicked(weld::TreeIter& rEntry) override;
54 // is called from DoubleClickHdl of the ListBox
60 virtual void deleteUserData(void*& _pUserData) override;
61
70 virtual void* createUserData(const css::uno::Reference<
71 css::beans::XPropertySet>& _xColumn,
72 bool _bPrimaryKey) override;
73 };
74}
75
76/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual bool Init() override
bool ExistsField(const OUString &strFieldName, OTableFieldDescRef const &rInfo)
virtual void OnEntryDoubleClicked(weld::TreeIter &rEntry) override
OQueryTableWindow(vcl::Window *pParent, const TTableWindowData::value_type &pTabWinData)
bool ExistsAVisitedConn() const
virtual void * createUserData(const css::uno::Reference< css::beans::XPropertySet > &_xColumn, bool _bPrimaryKey) override
creates user information that will be append at the ListBoxentry
virtual OUString GetName() const override
returns the name which should be used when displaying join or relations
virtual void deleteUserData(void *&_pUserData) override
delete the user data with the equal type as created within createUserData
OUString const & GetAliasName() const
void SetAliasName(const OUString &strNewAlias)
const TTableWindowData::value_type & GetData() const
OUString const & GetWinName() const