LibreOffice Module dbaccess (master) 1
Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
dbaui::OGeneralPage Class Reference

#include <generalpage.hxx>

Inheritance diagram for dbaui::OGeneralPage:
[legend]
Collaboration diagram for dbaui::OGeneralPage:
[legend]

Public Member Functions

virtual ~OGeneralPage () override
 
void SetTypeSelectHandler (const Link< OGeneralPage &, void > &_rHandler)
 set a handler which gets called every time the user selects a new type More...
 
const OUString & GetSelectedType () const
 get the currently selected datasource type More...
 
- Public Member Functions inherited from dbaui::OGenericAdministrationPage
 OGenericAdministrationPage (weld::Container *pPage, weld::DialogController *pController, const OUString &rUIXMLDescription, const OUString &rId, const SfxItemSet &rAttrSet)
 
void SetModifiedHandler (const Link< OGenericAdministrationPage const *, void > &_rHandler)
 set a handler which gets called every time something on the page has been modified More...
 
void SetAdminDialog (IDatabaseSettingsDialog *_pDialog, IItemSetHelper *_pItemSetHelper)
 Sets the ParentDialog. More...
 
void SetServiceFactory (const css::uno::Reference< css::uno::XComponentContext > &rxORB)
 Sets the ServiceFactory. More...
 
bool getSelectedDataSource (OUString &_sReturn, OUString const &_sCurr)
 opens a dialog filled with all data sources available for this type and returns the selected on. More...
 
virtual void initializePage () override
 
virtual bool commitPage (::vcl::WizardTypes::CommitPageReason _eReason) override
 
virtual bool canAdvance () const override
 
void SetRoadmapStateValue (bool _bDoEnable)
 
bool GetRoadmapStateValue () const
 
- Public Member Functions inherited from SfxTabPage
void SetDialogController (SfxOkDialogController *pDialog)
 
virtual ~SfxTabPage () override
 
void set_visible (bool bVisible)
 
const SfxItemSetGetItemSet () const
 
virtual bool FillItemSet (SfxItemSet *)
 
virtual void Reset (const SfxItemSet *)
 
virtual bool DeferResetToFirstActivation ()
 
bool HasExchangeSupport () const
 
void SetExchangeSupport ()
 
virtual void ActivatePage (const SfxItemSet &)
 
virtual DeactivateRC DeactivatePage (SfxItemSet *pSet)
 
void SetUserData (const OUString &rString)
 
const OUString & GetUserData () const
 
virtual void FillUserData ()
 
virtual bool IsReadOnly () const
 
virtual void PageCreated (const SfxAllItemSet &aSet)
 
virtual void ChangesApplied ()
 
void SetFrame (const css::uno::Reference< css::frame::XFrame > &xFrame)
 
css::uno::Reference< css::frame::XFrame > GetFrame () const
 
const SfxItemSetGetDialogExampleSet () const
 
OUString GetHelpId () const
 
OUString GetConfigId () const
 
bool IsVisible () const
 
weld::WindowGetFrameWeld () const
 
std::unordered_map< OUString, css::uno::Any > & getAdditionalProperties ()
 

Protected Member Functions

 OGeneralPage (weld::Container *pPage, weld::DialogController *pController, const OUString &_rUIXMLDescription, const SfxItemSet &_rItems)
 
virtual void Reset (const SfxItemSet *_rCoreAttrs) override
 default implementation: call implInitControls with the given item set and _bSaveValue = sal_False More...
 
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 given set More...
 
virtual OUString getDatasourceName (const SfxItemSet &_rSet)
 
virtual bool approveDatasourceType (::dbaccess::DATASOURCE_TYPE eType, OUString &_inout_rDisplayName)
 
virtual void fillControls (std::vector< std::unique_ptr< ISaveValueWrapper > > &_rControlList) override
 will be called inside <method>implInitControls</method> to save the value if necessary More...
 
virtual void fillWindows (std::vector< std::unique_ptr< ISaveValueWrapper > > &_rControlList) override
 will be called inside <method>implInitControls</method> to disable if necessary More...
 
void onTypeSelected (const OUString &_sURLPrefix)
 
void initializeTypeList ()
 Initializes the listbox, which contains entries each representing a connection to an existing database. More...
 
void implSetCurrentType (const OUString &_eType)
 
void switchMessage (std::u16string_view _sURLPrefix)
 
virtual void setParentTitle (const OUString &_sURLPrefix)
 sets the title of the parent dialog More...
 
 DECL_LINK (OnDatasourceTypeSelected, weld::ComboBox &, void)
 
- Protected Member Functions inherited from dbaui::OGenericAdministrationPage
virtual DeactivateRC DeactivatePage (SfxItemSet *pSet) override
 default implementation: call FillItemSet, call prepareLeave, More...
 
virtual void Reset (const SfxItemSet *_rCoreAttrs) override
 default implementation: call implInitControls with the given item set and _bSaveValue = sal_False More...
 
virtual void ActivatePage (const SfxItemSet &_rSet) override
 default implementation: call implInitControls with the given item set and _bSaveValue = sal_True More...
 
virtual void Activate () override
 
virtual void callModifiedHdl (weld::Widget *=nullptr)
 
virtual bool prepareLeave ()
 called from within DeactivatePage. The page is allowed to be deactivated if this method returns sal_True More...
 
virtual void implInitControls (const SfxItemSet &_rSet, bool _bSaveValue)
 called from within Reset and ActivatePage, use to initialize the controls with the items from the given set More...
 
virtual void fillControls (std::vector< std::unique_ptr< ISaveValueWrapper > > &_rControlList)=0
 will be called inside <method>implInitControls</method> to save the value if necessary More...
 
virtual void fillWindows (std::vector< std::unique_ptr< ISaveValueWrapper > > &_rControlList)=0
 will be called inside <method>implInitControls</method> to disable if necessary More...
 
 DECL_LINK (OnControlModified, weld::Widget *, void)
 This link be used for controls where the tabpage does not need to take any special action when the control is modified. More...
 
 DECL_LINK (OnControlEntryModifyHdl, weld::Entry &, void)
 
 DECL_LINK (OnControlSpinButtonModifyHdl, weld::SpinButton &, void)
 
 DECL_LINK (OnControlModifiedButtonClick, weld::Toggleable &, void)
 
 DECL_LINK (OnTestConnectionButtonClickHdl, weld::Button &, void)
 
- Protected Member Functions inherited from SfxTabPage
 SfxTabPage (weld::Container *pPage, weld::DialogController *pController, const OUString &rUIXMLDescription, const OUString &rID, const SfxItemSet *rAttrSet)
 
sal_uInt16 GetWhich (sal_uInt16 nSlot, bool bDeep=true) const
 
TypedWhichId< T > GetWhich (TypedWhichId< T > nSlot, bool bDeep=true) const
 
const SfxPoolItemGetOldItem (const SfxItemSet &rSet, sal_uInt16 nSlot, bool bDeep=true)
 
const T * GetOldItem (const SfxItemSet &rSet, TypedWhichId< T > nSlot, bool bDeep=true)
 
SfxOkDialogControllerGetDialogController () const
 

Protected Attributes

OUString m_eCurrentSelection
 
std::unique_ptr< weld::ComboBoxm_xDatasourceType
 
::dbaccess::ODsnTypeCollectionm_pCollection
 
std::vector< OUString > m_aURLPrefixes
 the DSN type collection instance More...
 
- Protected Attributes inherited from dbaui::OGenericAdministrationPage
IDatabaseSettingsDialogm_pAdminDialog
 
IItemSetHelperm_pItemSetHelper
 
css::uno::Reference< css::uno::XComponentContext > m_xORB
 

Private Types

enum  SPECIAL_MESSAGE {
  smNone ,
  smUnsupportedType
}
 

Private Member Functions

bool approveDatasourceType (std::u16string_view _sURLPrefix, OUString &_inout_rDisplayName)
 
void insertDatasourceTypeEntryData (const OUString &_sType, const OUString &sDisplayName)
 

Private Attributes

std::unique_ptr< weld::Labelm_xSpecialMessage
 currently selected type More...
 
SPECIAL_MESSAGE m_eLastMessage
 
Link< OGeneralPage &, void > m_aTypeSelectHandler
 
bool m_bInitTypeList: 1
 to be called if a new type is selected More...
 

Additional Inherited Members

- Static Public Member Functions inherited from dbaui::OGenericAdministrationPage
static void fillBool (SfxItemSet &_rSet, const weld::CheckButton *pCheckBox, sal_uInt16 _nID, bool bOptionalBool, bool &_bChangedSomething, bool _bRevertValue=false)
 fills the Boolean value into the item set when the value changed. More...
 
static void fillInt32 (SfxItemSet &_rSet, const weld::SpinButton *pEdit, TypedWhichId< SfxInt32Item > _nID, bool &_bChangedSomething)
 fills the int value into the item set when the value changed. More...
 
static void fillString (SfxItemSet &_rSet, const weld::Entry *pEdit, TypedWhichId< SfxStringItem > _nID, bool &_bChangedSomething)
 fills the String value into the item set when the value changed. More...
 
static void fillString (SfxItemSet &_rSet, const dbaui::OConnectionURLEdit *pEdit, TypedWhichId< SfxStringItem > _nID, bool &_bChangedSomething)
 
- Static Public Member Functions inherited from SfxTabPage
static const SfxPoolItemGetItem (const SfxItemSet &rSet, sal_uInt16 nSlot, bool bDeep=true)
 
static const T * GetItem (const SfxItemSet &rSet, TypedWhichId< T > nSlot, bool bDeep=true)
 
- Static Protected Member Functions inherited from dbaui::OGenericAdministrationPage
static void getFlags (const SfxItemSet &_rSet, bool &_rValid, bool &_rReadonly)
 analyze the invalid and the readonly flag which may be present in the set More...
 

Detailed Description

Definition at line 30 of file generalpage.hxx.

Member Enumeration Documentation

◆ SPECIAL_MESSAGE

Enumerator
smNone 
smUnsupportedType 

Definition at line 40 of file generalpage.hxx.

Constructor & Destructor Documentation

◆ OGeneralPage()

dbaui::OGeneralPage::OGeneralPage ( weld::Container pPage,
weld::DialogController pController,
const OUString &  _rUIXMLDescription,
const SfxItemSet _rItems 
)
protected

◆ ~OGeneralPage()

dbaui::OGeneralPage::~OGeneralPage ( )
overridevirtual

Definition at line 70 of file generalpage.cxx.

Member Function Documentation

◆ approveDatasourceType() [1/2]

bool dbaui::OGeneralPage::approveDatasourceType ( ::dbaccess::DATASOURCE_TYPE  eType,
OUString &  _inout_rDisplayName 
)
protectedvirtual

◆ approveDatasourceType() [2/2]

bool dbaui::OGeneralPage::approveDatasourceType ( std::u16string_view  _sURLPrefix,
OUString &  _inout_rDisplayName 
)
private

◆ DECL_LINK()

dbaui::OGeneralPage::DECL_LINK ( OnDatasourceTypeSelected  ,
weld::ComboBox ,
void   
)
protected

◆ fillControls()

void dbaui::OGeneralPage::fillControls ( std::vector< std::unique_ptr< ISaveValueWrapper > > &  _rControlList)
overrideprotectedvirtual

will be called inside <method>implInitControls</method> to save the value if necessary

Parameters
_rControlListThe list must be filled with the controls. It is not allowed to clear the list before pushing data into it.

Implements dbaui::OGenericAdministrationPage.

Definition at line 345 of file generalpage.cxx.

References m_xDatasourceType.

◆ fillWindows()

void dbaui::OGeneralPage::fillWindows ( std::vector< std::unique_ptr< ISaveValueWrapper > > &  _rControlList)
overrideprotectedvirtual

will be called inside <method>implInitControls</method> to disable if necessary

Parameters
_rControlListThe list must be filled with the controls. It is not allowed to clear the list before pushing data into it.

Implements dbaui::OGenericAdministrationPage.

Definition at line 340 of file generalpage.cxx.

References m_xSpecialMessage.

◆ getDatasourceName()

OUString dbaui::OGeneralPage::getDatasourceName ( const SfxItemSet _rSet)
protectedvirtual

◆ GetSelectedType()

const OUString & dbaui::OGeneralPage::GetSelectedType ( ) const
inline

get the currently selected datasource type

Definition at line 68 of file generalpage.hxx.

References m_eCurrentSelection.

Referenced by dbaui::ODbTypeWizDialogSetup::activateDatabasePath(), and dbaui::ODbTypeWizDialogSetup::CreateDatabase().

◆ implInitControls()

void dbaui::OGeneralPage::implInitControls ( const SfxItemSet _rSet,
bool  _bSaveValue 
)
overrideprotectedvirtual

called from within Reset and ActivatePage, use to initialize the controls with the items from the given set

Parameters
_bSaveValueif set to sal_True, the implementation should call SaveValue on all relevant controls

Reimplemented from dbaui::OGenericAdministrationPage.

Reimplemented in dbaui::OGeneralPageDialog, and dbaui::OGeneralPageWizard.

Definition at line 210 of file generalpage.cxx.

References getDatasourceName(), dbaui::OGenericAdministrationPage::implInitControls(), initializeTypeList(), m_eCurrentSelection, m_xDatasourceType, onTypeSelected(), setParentTitle(), and switchMessage().

Referenced by dbaui::OGeneralPageDialog::implInitControls(), and dbaui::OGeneralPageWizard::implInitControls().

◆ implSetCurrentType()

void dbaui::OGeneralPage::implSetCurrentType ( const OUString &  _eType)
protected

◆ initializeTypeList()

void dbaui::OGeneralPage::initializeTypeList ( )
protected

Initializes the listbox, which contains entries each representing a connection to an existing database.

Definition at line 94 of file generalpage.cxx.

References approveDatasourceType(), dbaccess::ODsnTypeCollection::begin(), dbaccess::ODsnTypeCollection::end(), insertDatasourceTypeEntryData(), m_bInitTypeList, m_pCollection, m_xDatasourceType, sDisplayName, and dbaccess::ODsnTypeCollection::TypeIterator().

Referenced by implInitControls().

◆ insertDatasourceTypeEntryData()

void dbaui::OGeneralPage::insertDatasourceTypeEntryData ( const OUString &  _sType,
const OUString &  sDisplayName 
)
private

Definition at line 326 of file generalpage.cxx.

References m_aURLPrefixes, m_xDatasourceType, and sDisplayName.

Referenced by getDatasourceName(), and initializeTypeList().

◆ onTypeSelected()

void dbaui::OGeneralPage::onTypeSelected ( const OUString &  _sURLPrefix)
protected

◆ Reset()

void dbaui::OGeneralPage::Reset ( const SfxItemSet _rCoreAttrs)
overrideprotectedvirtual

default implementation: call implInitControls with the given item set and _bSaveValue = sal_False

Reimplemented from dbaui::OGenericAdministrationPage.

Definition at line 358 of file generalpage.cxx.

References implSetCurrentType(), and dbaui::OGenericAdministrationPage::Reset().

◆ setParentTitle()

void dbaui::OGeneralPage::setParentTitle ( const OUString &  _sURLPrefix)
protectedvirtual

sets the title of the parent dialog

Reimplemented in dbaui::OGeneralPageDialog.

Definition at line 174 of file generalpage.cxx.

Referenced by implInitControls().

◆ SetTypeSelectHandler()

void dbaui::OGeneralPage::SetTypeSelectHandler ( const Link< OGeneralPage &, void > &  _rHandler)
inline

set a handler which gets called every time the user selects a new type

Definition at line 65 of file generalpage.hxx.

References m_aTypeSelectHandler.

Referenced by dbaui::ODbTypeWizDialog::createPage(), and dbaui::ODbTypeWizDialogSetup::SetGeneralPage().

◆ switchMessage()

void dbaui::OGeneralPage::switchMessage ( std::u16string_view  _sURLPrefix)
protected

Member Data Documentation

◆ m_aTypeSelectHandler

Link<OGeneralPage&,void> dbaui::OGeneralPage::m_aTypeSelectHandler
private

Definition at line 47 of file generalpage.hxx.

Referenced by onTypeSelected(), and SetTypeSelectHandler().

◆ m_aURLPrefixes

std::vector< OUString> dbaui::OGeneralPage::m_aURLPrefixes
protected

the DSN type collection instance

Definition at line 59 of file generalpage.hxx.

Referenced by dbaui::OGeneralPageDialog::FillItemSet(), dbaui::OGeneralPageWizard::FillItemSet(), and insertDatasourceTypeEntryData().

◆ m_bInitTypeList

bool dbaui::OGeneralPage::m_bInitTypeList
private

to be called if a new type is selected

Definition at line 48 of file generalpage.hxx.

Referenced by initializeTypeList().

◆ m_eCurrentSelection

OUString dbaui::OGeneralPage::m_eCurrentSelection
protected

◆ m_eLastMessage

SPECIAL_MESSAGE dbaui::OGeneralPage::m_eLastMessage
private

Definition at line 45 of file generalpage.hxx.

Referenced by switchMessage().

◆ m_pCollection

::dbaccess::ODsnTypeCollection* dbaui::OGeneralPage::m_pCollection
protected

◆ m_xDatasourceType

std::unique_ptr<weld::ComboBox> dbaui::OGeneralPage::m_xDatasourceType
protected

◆ m_xSpecialMessage

std::unique_ptr<weld::Label> dbaui::OGeneralPage::m_xSpecialMessage
private

currently selected type

Definition at line 38 of file generalpage.hxx.

Referenced by fillWindows(), and switchMessage().


The documentation for this class was generated from the following files: