bump product version to 4.1.6.2
[LibreOffice.git] / dbaccess / source / ui / inc / RelationControl.hxx
blob5926d48f04eed644fd9a1ec2a6fd1ce6817874b7
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 DBAUI_RELATIONCONTROL_HXX
20 #define DBAUI_RELATIONCONTROL_HXX
22 #include <vcl/fixed.hxx>
23 #include <vcl/lstbox.hxx>
24 #include "JoinTableView.hxx"
26 namespace dbaui
28 //========================================================================
29 class OTableListBoxControl;
30 class IRelationControlInterface;
31 class ORelationControl;
33 class OTableListBoxControl : public Window
35 FixedLine m_aFL_InvolvedTables;
36 ListBox m_lmbLeftTable,
37 m_lmbRightTable;
38 FixedLine m_aFL_InvolvedFields;
40 ORelationControl* m_pRC_Tables;
41 const OJoinTableView::OTableWindowMap* m_pTableMap;
42 IRelationControlInterface* m_pParentDialog;
43 String m_strCurrentLeft;
44 String m_strCurrentRight;
45 private:
46 DECL_LINK( OnTableChanged, ListBox* );
47 public:
48 OTableListBoxControl(Window* _pParent,
49 const ResId& _rResId,
50 const OJoinTableView::OTableWindowMap* _pTableMap,
51 IRelationControlInterface* _pParentDialog);
52 virtual ~OTableListBoxControl();
54 /** fillListBoxes fills the list boxes with the table windows
56 void fillListBoxes();
58 /** fillAndDisable fill the listboxes only with one entry and then disable them
59 @param _pConnectionData
60 contains the data which should be filled into the listboxes
62 void fillAndDisable(const TTableConnectionData::value_type& _pConnectionData);
64 /** enables the relation control
66 * \param _bEnable when sal_True enables it, otherwise disable it.
68 void enableRelation(bool _bEnable);
70 /** NotifyCellChange notifies the browse control that the connection data has changed
72 void NotifyCellChange();
74 /** Init is a call through to the control inside this one
75 @param _pConnData
76 the connection data which is used to init the control
78 void Init(const TTableConnectionData::value_type& _pConnData);
79 void lateUIInit(Window* _pTableSeparator = NULL);
80 void lateInit();
82 sal_Bool SaveModified();
84 TTableWindowData::value_type getReferencingTable() const;
86 /** getContainer returns the container interface
87 @return the interface of the container
89 IRelationControlInterface* getContainer() const { return m_pParentDialog; }
92 #endif // DBAUI_RELATIONCONTROL_HXX
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */