Update git submodules
[LibreOffice.git] / dbaccess / source / ui / dlg / ConnectionPage.hxx
blob19e76946254a9a68779620c888bf9b44af3192b7
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 .
20 #pragma once
22 #include "ConnectionHelper.hxx"
24 namespace dbaui
27 // OConnectionTabPage
29 /** implements the connection page of the data source properties dialog.
31 class OConnectionTabPage final : public OConnectionHelper
33 private:
34 // user authentication
35 std::unique_ptr<weld::Label> m_xFL2;
36 std::unique_ptr<weld::Label> m_xUserNameLabel;
37 std::unique_ptr<weld::Entry> m_xUserName;
38 std::unique_ptr<weld::CheckButton> m_xPasswordRequired;
40 // jdbc driver
41 std::unique_ptr<weld::Label> m_xFL3;
42 std::unique_ptr<weld::Label> m_xJavaDriverLabel;
43 std::unique_ptr<weld::Entry> m_xJavaDriver;
44 std::unique_ptr<weld::Button> m_xTestJavaDriver;
46 // connection test
47 std::unique_ptr<weld::Button> m_xTestConnection;
49 // called when the test connection button was clicked
50 DECL_LINK(OnTestJavaClickHdl, weld::Button&, void);
51 DECL_LINK(OnEditModified, weld::Entry&, void);
53 public:
54 OConnectionTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs);
55 static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet);
56 virtual ~OConnectionTabPage() override;
57 virtual bool FillItemSet (SfxItemSet* _rCoreAttrs) override;
59 virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) override;
61 /** changes the connection URL.
62 <p>The new URL must be of the type which is currently selected, only the parts which do not
63 affect the type may be changed (compared to the previous URL).</p>
65 private:
66 /** enables the test connection button, if allowed
68 virtual bool checkTestConnection() override;
70 } // namespace dbaui
72 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */