Bump version to 5.0-14
[LibreOffice.git] / dbaccess / source / ui / dlg / ConnectionPage.hxx
blob6f373cc244264bb2ebe91a8d9ff3d9b0ebf1c430
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 #ifndef INCLUDED_DBACCESS_SOURCE_UI_DLG_CONNECTIONPAGE_HXX
21 #define INCLUDED_DBACCESS_SOURCE_UI_DLG_CONNECTIONPAGE_HXX
23 #include "ConnectionHelper.hxx"
24 #include "adminpages.hxx"
25 #include <ucbhelper/content.hxx>
26 #include "curledit.hxx"
28 namespace dbaui
31 // OConnectionTabPage
33 /** implements the connection page of the data source properties dialog.
35 class OConnectionTabPage : public OConnectionHelper
37 friend class VclPtr<OConnectionTabPage>;
38 protected:
39 // user authentification
40 VclPtr<FixedText> m_pFL2;
41 VclPtr<FixedText> m_pUserNameLabel;
42 VclPtr<Edit> m_pUserName;
43 VclPtr<CheckBox> m_pPasswordRequired;
45 // jdbc driver
46 VclPtr<FixedText> m_pFL3;
47 VclPtr<FixedText> m_pJavaDriverLabel;
48 VclPtr<Edit> m_pJavaDriver;
49 VclPtr<PushButton> m_pTestJavaDriver;
51 // connection test
52 VclPtr<PushButton> m_pTestConnection;
54 // called when the test connection button was clicked
55 DECL_LINK(OnTestJavaClickHdl, PushButton*);
56 DECL_LINK(OnEditModified, Edit*);
58 public:
59 virtual ~OConnectionTabPage();
60 virtual void dispose() SAL_OVERRIDE;
61 static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* _rAttrSet );
62 virtual bool FillItemSet (SfxItemSet* _rCoreAttrs) SAL_OVERRIDE;
64 virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
66 inline void enableConnectionURL() { m_pConnectionURL->SetReadOnly(false); }
67 inline void disableConnectionURL() { m_pConnectionURL->SetReadOnly(); }
69 /** changes the connection URL.
70 <p>The new URL must be of the type which is currently selected, only the parts which do not
71 affect the type may be changed (compared to the previous URL).</p>
73 private:
74 OConnectionTabPage(vcl::Window* pParent, const SfxItemSet& _rCoreAttrs);
75 // nControlFlags is a combination of the CBTP_xxx-constants
77 private:
78 /** enables the test connection button, if allowed
80 virtual bool checkTestConnection() SAL_OVERRIDE;
82 } // namespace dbaui
84 #endif // INCLUDED_DBACCESS_SOURCE_UI_DLG_CONNECTIONPAGE_HXX
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */