summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx')
-rw-r--r--dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx52
1 files changed, 45 insertions, 7 deletions
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
index d1974fa731b5..909cfede5806 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
@@ -25,6 +25,8 @@
#include "admincontrols.hxx"
#include "TextConnectionHelper.hxx"
+#include <curledit.hxx>
+
namespace dbaui
{
class ODbTypeWizDialogSetup;
@@ -123,10 +125,10 @@ namespace dbaui
OGeneralSpecialJDBCConnectionPageSetup(weld::Container* pPage, weld::DialogController* pController
, const SfxItemSet& _rCoreAttrs
, sal_uInt16 _nPortId
- , const char* pDefaultPortResId
- , const char* pHelpTextResId
- , const char* pHeaderTextResId
- , const char* pDriverClassId );
+ , TranslateId pDefaultPortResId
+ , TranslateId pHelpTextResId
+ , TranslateId pHeaderTextResId
+ , TranslateId pDriverClassId );
virtual ~OGeneralSpecialJDBCConnectionPageSetup() override;
static std::unique_ptr<OGenericAdministrationPage> CreateMySQLJDBCTabPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet );
static std::unique_ptr<OGenericAdministrationPage> CreateOracleJDBCTabPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet );
@@ -141,7 +143,7 @@ namespace dbaui
DECL_LINK(OnTestJavaClickHdl, weld::Button&, void);
OUString m_sDefaultJdbcDriverName;
- sal_uInt16 m_nPortId;
+ TypedWhichId<SfxInt32Item> m_nPortId;
std::unique_ptr<weld::Label> m_xHeaderText;
std::unique_ptr<weld::Label> m_xFTHelpText;
@@ -211,9 +213,45 @@ namespace dbaui
std::unique_ptr<weld::RadioButton> m_xNATIVEDatabase;
Link<OMySQLIntroPageSetup *, void> maClickHdl;
- DECL_LINK(OnSetupModeSelected, weld::ToggleButton&, void);
+ DECL_LINK(OnSetupModeSelected, weld::Toggleable&, void);
+ };
+
+ // OPostgresPageSetup
+ class OPostgresConnectionPageSetup final : public OGenericAdministrationPage
+ {
+ public:
+ OPostgresConnectionPageSetup(weld::Container* pPage, weld::DialogController* pController
+ , const SfxItemSet& _rCoreAttrs
+ , sal_uInt16 _nPortId );
+ virtual ~OPostgresConnectionPageSetup() override;
+ static std::unique_ptr<OGenericAdministrationPage> CreatePostgresTabPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rAttrSet );
+ ::dbaccess::ODsnTypeCollection* m_pCollection;
+
+ private:
+ virtual bool FillItemSet( SfxItemSet* _rCoreAttrs ) override;
+ virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) override;
+ virtual void fillControls(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList) override;
+ virtual void fillWindows(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList) override;
+ virtual bool commitPage( ::vcl::WizardTypes::CommitPageReason _eReason ) override;
+
+ TypedWhichId<SfxInt32Item> m_nPortId;
+
+ std::unique_ptr<weld::Entry> m_xETDatabasename;
+ std::unique_ptr<weld::Entry> m_xETHostname;
+ std::unique_ptr<weld::SpinButton> m_xNFPortNumber;
+ std::unique_ptr<OConnectionURLEdit> m_xConnectionURL;
+
+ /** used for the connection URL
+ @param _rURL
+ The URL to check.
+ */
+ void impl_setURL( std::u16string_view _rURL, bool _bPrefix );
+ void setURLNoPrefix( std::u16string_view _rURL );
+ void setURL( std::u16string_view _rURL );
+ bool commitURL();
};
+
// OAuthentificationPageSetup
class OAuthentificationPageSetup final : public OGenericAdministrationPage
{
@@ -249,7 +287,7 @@ namespace dbaui
bool IsTableWizardToBeStarted() const;
void enableTableWizardCheckBox( bool _bSupportsTableCreation);
- DECL_LINK(OnOpenSelected, weld::ToggleButton&, void);
+ DECL_LINK(OnOpenSelected, weld::Toggleable&, void);
protected:
virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) override;
virtual void fillControls(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList) override;