LibreOffice Module dbaccess (master) 1
ConnectionPage.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
20#pragma once
21
22#include "ConnectionHelper.hxx"
23
24namespace dbaui
25{
26
27 // OConnectionTabPage
28
32 {
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;
39
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;
45
46 // connection test
47 std::unique_ptr<weld::Button> m_xTestConnection;
48
49 // called when the test connection button was clicked
50 DECL_LINK(OnTestJavaClickHdl, weld::Button&, void);
51 DECL_LINK(OnEditModified, weld::Entry&, void);
52
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;
58
59 virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) override;
60
65 private:
68 virtual bool checkTestConnection() override;
69 };
70} // namespace dbaui
71
72/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
implements the connection page of the data source properties dialog.
std::unique_ptr< weld::Label > m_xJavaDriverLabel
DECL_LINK(OnTestJavaClickHdl, weld::Button &, void)
std::unique_ptr< weld::Button > m_xTestJavaDriver
std::unique_ptr< weld::Entry > m_xJavaDriver
DECL_LINK(OnEditModified, weld::Entry &, void)
virtual void implInitControls(const SfxItemSet &_rSet, bool _bSaveValue) override
called from within Reset and ActivatePage, use to initialize the controls with the items from the giv...
virtual bool checkTestConnection() override
changes the connection URL.
std::unique_ptr< weld::Label > m_xFL2
virtual ~OConnectionTabPage() override
std::unique_ptr< weld::CheckButton > m_xPasswordRequired
OConnectionTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &_rCoreAttrs)
std::unique_ptr< weld::Label > m_xUserNameLabel
std::unique_ptr< weld::Label > m_xFL3
std::unique_ptr< weld::Button > m_xTestConnection
virtual bool FillItemSet(SfxItemSet *_rCoreAttrs) override
std::unique_ptr< weld::Entry > m_xUserName
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *_rAttrSet)