LibreOffice Module dbaccess (master) 1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Attributes | List of all members
dbaui::OGenericAdministrationPage Class Referenceabstract

#include <adminpages.hxx>

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

Public Member Functions

 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 ()
 

Static Public Member Functions

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)
 

Protected Member Functions

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
 

Static Protected Member Functions

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...
 

Protected Attributes

IDatabaseSettingsDialogm_pAdminDialog
 
IItemSetHelperm_pItemSetHelper
 
css::uno::Reference< css::uno::XComponentContext > m_xORB
 

Private Attributes

Link< OGenericAdministrationPage const *, void > m_aModifiedHandler
 
bool m_abEnableRoadmap
 to be called if something on the page has been modified More...
 

Detailed Description

Definition at line 87 of file adminpages.hxx.

Constructor & Destructor Documentation

◆ OGenericAdministrationPage()

dbaui::OGenericAdministrationPage::OGenericAdministrationPage ( weld::Container pPage,
weld::DialogController pController,
const OUString &  rUIXMLDescription,
const OUString &  rId,
const SfxItemSet rAttrSet 
)

Member Function Documentation

◆ Activate()

void dbaui::OGenericAdministrationPage::Activate ( )
overrideprotectedvirtual

◆ ActivatePage()

void dbaui::OGenericAdministrationPage::ActivatePage ( const SfxItemSet _rSet)
overrideprotectedvirtual

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

Reimplemented from SfxTabPage.

Definition at line 88 of file adminpages.cxx.

References implInitControls().

Referenced by Activate().

◆ callModifiedHdl()

virtual void dbaui::OGenericAdministrationPage::callModifiedHdl ( weld::Widget = nullptr)
inlineprotectedvirtual

◆ canAdvance()

bool dbaui::OGenericAdministrationPage::canAdvance ( ) const
overridevirtual

Definition at line 186 of file adminpages.cxx.

◆ commitPage()

bool dbaui::OGenericAdministrationPage::commitPage ( ::vcl::WizardTypes::CommitPageReason  _eReason)
overridevirtual

Reimplemented in dbaui::OConnectionTabPageSetup, and dbaui::OPostgresConnectionPageSetup.

Definition at line 182 of file adminpages.cxx.

◆ DeactivatePage()

DeactivateRC dbaui::OGenericAdministrationPage::DeactivatePage ( SfxItemSet pSet)
overrideprotectedvirtual

default implementation: call FillItemSet, call prepareLeave,

Reimplemented from SfxTabPage.

Reimplemented in dbaui::OTableSubscriptionPage.

Definition at line 63 of file adminpages.cxx.

References SfxTabPage::FillItemSet(), and prepareLeave().

Referenced by dbaui::OTableSubscriptionPage::DeactivatePage().

◆ DECL_LINK() [1/5]

dbaui::OGenericAdministrationPage::DECL_LINK ( OnControlEntryModifyHdl  ,
weld::Entry ,
void   
)
protected

◆ DECL_LINK() [2/5]

dbaui::OGenericAdministrationPage::DECL_LINK ( OnControlModified  ,
weld::Widget ,
void   
)
protected

This link be used for controls where the tabpage does not need to take any special action when the control is modified.

The implementation just calls callModifiedHdl.

◆ DECL_LINK() [3/5]

dbaui::OGenericAdministrationPage::DECL_LINK ( OnControlModifiedButtonClick  ,
weld::Toggleable ,
void   
)
protected

◆ DECL_LINK() [4/5]

dbaui::OGenericAdministrationPage::DECL_LINK ( OnControlSpinButtonModifyHdl  ,
weld::SpinButton ,
void   
)
protected

◆ DECL_LINK() [5/5]

dbaui::OGenericAdministrationPage::DECL_LINK ( OnTestConnectionButtonClickHdl  ,
weld::Button ,
void   
)
protected

◆ fillBool()

void dbaui::OGenericAdministrationPage::fillBool ( SfxItemSet _rSet,
const weld::CheckButton pCheckBox,
sal_uInt16  _nID,
bool  bOptionalBool,
bool &  _bChangedSomething,
bool  _bRevertValue = false 
)
static

fills the Boolean value into the item set when the value changed.

Parameters
_rSetThe item set where to put the new value into.
_pCheckBoxThe check box which is checked.
_nIDThe id in the itemset to set with the new value.
_bChangedSomething<TRUE> if something changed otherwise <FALSE>
_bRevertValueset to <TRUE> if the display value should be reverted before putting it into the set

Definition at line 190 of file adminpages.cxx.

References weld::Toggleable::get_active(), weld::Toggleable::get_state(), weld::Toggleable::get_state_changed_from_saved(), SfxItemSet::Put(), dbaui::OptionalBoolItem::SetValue(), and TRISTATE_INDET.

Referenced by dbaui::GeneratedValuesPage::FillItemSet(), dbaui::OConnectionTabPage::FillItemSet(), dbaui::OSpreadSheetConnectionPageSetup::FillItemSet(), dbaui::OLDAPConnectionPageSetup::FillItemSet(), dbaui::OAuthentificationPageSetup::FillItemSet(), dbaui::ODbaseDetailsPage::FillItemSet(), dbaui::OOdbcDetailsPage::FillItemSet(), dbaui::OUserDriverDetailsPage::FillItemSet(), dbaui::MySQLNativePage::FillItemSet(), and dbaui::OLDAPDetailsPage::FillItemSet().

◆ fillControls()

virtual void dbaui::OGenericAdministrationPage::fillControls ( std::vector< std::unique_ptr< ISaveValueWrapper > > &  _rControlList)
protectedpure virtual

◆ fillInt32()

void dbaui::OGenericAdministrationPage::fillInt32 ( SfxItemSet _rSet,
const weld::SpinButton pEdit,
TypedWhichId< SfxInt32Item _nID,
bool &  _bChangedSomething 
)
static

fills the int value into the item set when the value changed.

Parameters
_rSetThe item set where to put the new value into.
_pEditThe check box which is checked.
_nIDThe id in the itemset to set with the new value.
_bChangedSomething<TRUE> if something changed otherwise <FALSE>

Definition at line 211 of file adminpages.cxx.

References weld::SpinButton::get_value(), weld::Entry::get_value_changed_from_saved(), and SfxItemSet::Put().

Referenced by dbaui::OLDAPConnectionPageSetup::FillItemSet(), dbaui::OGeneralSpecialJDBCConnectionPageSetup::FillItemSet(), dbaui::OPostgresConnectionPageSetup::FillItemSet(), dbaui::OUserDriverDetailsPage::FillItemSet(), dbaui::OGeneralSpecialJDBCDetailsPage::FillItemSet(), dbaui::OLDAPDetailsPage::FillItemSet(), and dbaui::MySQLNativeSettings::FillItemSet().

◆ fillString() [1/2]

void dbaui::OGenericAdministrationPage::fillString ( SfxItemSet _rSet,
const dbaui::OConnectionURLEdit pEdit,
TypedWhichId< SfxStringItem _nID,
bool &  _bChangedSomething 
)
static

◆ fillString() [2/2]

void dbaui::OGenericAdministrationPage::fillString ( SfxItemSet _rSet,
const weld::Entry pEdit,
TypedWhichId< SfxStringItem _nID,
bool &  _bChangedSomething 
)
static

◆ fillWindows()

virtual void dbaui::OGenericAdministrationPage::fillWindows ( std::vector< std::unique_ptr< ISaveValueWrapper > > &  _rControlList)
protectedpure virtual

◆ getFlags()

void dbaui::OGenericAdministrationPage::getFlags ( const SfxItemSet _rSet,
bool &  _rValid,
bool &  _rReadonly 
)
staticprotected

◆ GetRoadmapStateValue()

bool dbaui::OGenericAdministrationPage::GetRoadmapStateValue ( ) const
inline

Definition at line 143 of file adminpages.hxx.

References m_abEnableRoadmap.

◆ getSelectedDataSource()

bool dbaui::OGenericAdministrationPage::getSelectedDataSource ( OUString &  _sReturn,
OUString const &  _sCurr 
)

opens a dialog filled with all data sources available for this type and returns the selected on.

Parameters
_eTypeThe type for which the data source dialog should be opened.
_sReturn<OUT> contains the selected name.
Returns
<FALSE> if an error occurred, otherwise <TRUE>

Definition at line 121 of file adminpages.cxx.

References Application::CreateMessageDialog(), DBA_RES, dbaui::OOdbcEnumeration::getDatasourceNames(), SfxTabPage::GetFrameWeld(), dbaui::OOdbcEnumeration::getLibraryName(), dbaui::ODatasourceSelectDialog::GetSelected(), dbaui::OOdbcEnumeration::isLoaded(), RET_OK, dbaui::ODatasourceSelectDialog::run(), and dbaui::ODatasourceSelectDialog::Select().

◆ implInitControls()

void dbaui::OGenericAdministrationPage::implInitControls ( const SfxItemSet _rSet,
bool  _bSaveValue 
)
protectedvirtual

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 in dbaui::SpecialSettingsPage, dbaui::GeneratedValuesPage, dbaui::OConnectionHelper, dbaui::OConnectionTabPage, dbaui::OConnectionTabPageSetup, dbaui::OTextConnectionPageSetup, dbaui::OLDAPConnectionPageSetup, dbaui::MySQLNativeSetupPage, dbaui::OGeneralSpecialJDBCConnectionPageSetup, dbaui::OJDBCConnectionPageSetup, dbaui::OMySQLIntroPageSetup, dbaui::OPostgresConnectionPageSetup, dbaui::OAuthentificationPageSetup, dbaui::OFinalDBPageSetup, dbaui::OCommonBehaviourTabPage, dbaui::ODbaseDetailsPage, dbaui::OOdbcDetailsPage, dbaui::OUserDriverDetailsPage, dbaui::OGeneralSpecialJDBCDetailsPage, dbaui::MySQLNativePage, dbaui::OLDAPDetailsPage, dbaui::OTextDetailsPage, dbaui::OGeneralPage, dbaui::OGeneralPageDialog, dbaui::OGeneralPageWizard, dbaui::OTableSubscriptionPage, and dbaui::OUserAdmin.

Definition at line 150 of file adminpages.cxx.

References fillControls(), fillWindows(), and getFlags().

Referenced by ActivatePage(), dbaui::IMPL_LINK_NOARG(), dbaui::GeneratedValuesPage::implInitControls(), dbaui::OConnectionHelper::implInitControls(), dbaui::OLDAPConnectionPageSetup::implInitControls(), dbaui::MySQLNativeSetupPage::implInitControls(), dbaui::OGeneralSpecialJDBCConnectionPageSetup::implInitControls(), dbaui::OPostgresConnectionPageSetup::implInitControls(), dbaui::OCommonBehaviourTabPage::implInitControls(), dbaui::OGeneralPage::implInitControls(), dbaui::OTableSubscriptionPage::implInitControls(), dbaui::OUserAdmin::implInitControls(), and Reset().

◆ initializePage()

void dbaui::OGenericAdministrationPage::initializePage ( )
overridevirtual

Definition at line 176 of file adminpages.cxx.

References dbaui::IItemSetHelper::getOutputSet(), m_pItemSetHelper, and Reset().

◆ prepareLeave()

virtual bool dbaui::OGenericAdministrationPage::prepareLeave ( )
inlineprotectedvirtual

called from within DeactivatePage. The page is allowed to be deactivated if this method returns sal_True

Reimplemented in dbaui::OTextConnectionPageSetup, and dbaui::OTextDetailsPage.

Definition at line 160 of file adminpages.hxx.

Referenced by DeactivatePage().

◆ Reset()

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

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

Reimplemented from SfxTabPage.

Reimplemented in dbaui::OGeneralPage.

Definition at line 75 of file adminpages.cxx.

References implInitControls().

Referenced by initializePage(), and dbaui::OGeneralPage::Reset().

◆ SetAdminDialog()

void dbaui::OGenericAdministrationPage::SetAdminDialog ( IDatabaseSettingsDialog _pDialog,
IItemSetHelper _pItemSetHelper 
)
inline

Sets the ParentDialog.

Parameters
_pAdminDialogthe ParentDialog
_pItemSetHelperthe itemset helper

Definition at line 110 of file adminpages.hxx.

References m_pAdminDialog, and m_pItemSetHelper.

◆ SetModifiedHandler()

void dbaui::OGenericAdministrationPage::SetModifiedHandler ( const Link< OGenericAdministrationPage const *, void > &  _rHandler)
inline

set a handler which gets called every time something on the page has been modified

Definition at line 102 of file adminpages.hxx.

References m_aModifiedHandler.

◆ SetRoadmapStateValue()

void dbaui::OGenericAdministrationPage::SetRoadmapStateValue ( bool  _bDoEnable)
inline

◆ SetServiceFactory()

void dbaui::OGenericAdministrationPage::SetServiceFactory ( const css::uno::Reference< css::uno::XComponentContext > &  rxORB)
inline

Sets the ServiceFactory.

Parameters
_rxORBThe service factory.

Definition at line 121 of file adminpages.hxx.

References m_xORB.

Member Data Documentation

◆ m_abEnableRoadmap

bool dbaui::OGenericAdministrationPage::m_abEnableRoadmap
private

to be called if something on the page has been modified

Definition at line 92 of file adminpages.hxx.

Referenced by GetRoadmapStateValue(), and SetRoadmapStateValue().

◆ m_aModifiedHandler

Link<OGenericAdministrationPage const *, void> dbaui::OGenericAdministrationPage::m_aModifiedHandler
private

Definition at line 91 of file adminpages.hxx.

Referenced by callModifiedHdl(), and SetModifiedHandler().

◆ m_pAdminDialog

IDatabaseSettingsDialog* dbaui::OGenericAdministrationPage::m_pAdminDialog
protected

◆ m_pItemSetHelper

IItemSetHelper* dbaui::OGenericAdministrationPage::m_pItemSetHelper
protected

Definition at line 95 of file adminpages.hxx.

Referenced by Activate(), initializePage(), and SetAdminDialog().

◆ m_xORB

css::uno::Reference< css::uno::XComponentContext > dbaui::OGenericAdministrationPage::m_xORB
protected

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