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

#include <generalpage.hxx>

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

Public Types

enum  CreationMode {
  eCreateNew ,
  eConnectExternal ,
  eOpenExisting
}
 

Public Member Functions

 OGeneralPageWizard (weld::Container *pPage, ODbTypeWizDialogSetup *pController, const SfxItemSet &_rItems)
 
virtual ~OGeneralPageWizard () override
 
void SetCreationModeHandler (const Link< OGeneralPageWizard &, void > &_rHandler)
 
CreationMode GetDatabaseCreationMode () const
 
void SetDocumentSelectionHandler (const Link< OGeneralPageWizard &, void > &_rHandler)
 
void SetChooseDocumentHandler (const Link< OGeneralPageWizard &, void > &_rHandler)
 
OUString GetSelectedDocumentURL () const
 
- Public Member Functions inherited from dbaui::OGeneralPage
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 ()
 

Private Member Functions

void insertEmbeddedDBTypeEntryData (const OUString &_sType, const OUString &sDisplayName)
 
void EnableControls ()
 
virtual bool FillItemSet (SfxItemSet *_rCoreAttrs) override
 
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) override
 
virtual bool approveDatasourceType (::dbaccess::DATASOURCE_TYPE eType, OUString &_inout_rDisplayName) override
 
OUString getEmbeddedDBName (const SfxItemSet &_rSet)
 
void initializeEmbeddedDBList ()
 
void SetupModeSelected ()
 
 DECL_LINK (OnEmbeddedDBTypeSelected, weld::ComboBox &, void)
 
 DECL_LINK (OnSetupModeSelected, weld::Toggleable &, void)
 
 DECL_LINK (OnDocumentSelected, weld::ComboBox &, void)
 
 DECL_LINK (OnOpenDocument, weld::Button &, void)
 

Private Attributes

std::unique_ptr< weld::RadioButtonm_xRB_CreateDatabase
 
std::unique_ptr< weld::RadioButtonm_xRB_OpenExistingDatabase
 
std::unique_ptr< weld::RadioButtonm_xRB_ConnectDatabase
 
std::unique_ptr< weld::Labelm_xFT_EmbeddedDBLabel
 
std::unique_ptr< weld::ComboBoxm_xEmbeddedDBType
 
std::unique_ptr< weld::Labelm_xFT_DocListLabel
 
std::unique_ptr< OpenDocumentListBoxm_xLB_DocumentList
 
std::unique_ptr< OpenDocumentButtonm_xPB_OpenDatabase
 
std::unique_ptr< weld::Labelm_xFT_NoEmbeddedDBLabel
 
OUString m_aBrowsedDocumentURL
 
CreationMode m_eOriginalCreationMode
 
Link< OGeneralPageWizard &, void > m_aCreationModeHandler
 
Link< OGeneralPageWizard &, void > m_aDocumentSelectionHandler
 to be called if a new type is selected More...
 
Link< OGeneralPageWizard &, void > m_aChooseDocumentHandler
 to be called when a document in the RecentDoc list is selected More...
 
bool m_bInitEmbeddedDBList: 1
 to be called when a recent document has been definitely chosen More...
 
bool m_bIsDisplayedTypesEmpty: 1
 
std::vector< OUString > m_aEmbeddedURLPrefixes
 

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)
 
- Protected Member Functions inherited from dbaui::OGeneralPage
 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
 
- 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...
 
- Protected Attributes inherited from dbaui::OGeneralPage
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
 

Detailed Description

Definition at line 115 of file generalpage.hxx.

Member Enumeration Documentation

◆ CreationMode

Enumerator
eCreateNew 
eConnectExternal 
eOpenExisting 

Definition at line 121 of file generalpage.hxx.

Constructor & Destructor Documentation

◆ OGeneralPageWizard()

dbaui::OGeneralPageWizard::OGeneralPageWizard ( weld::Container pPage,
ODbTypeWizDialogSetup pController,
const SfxItemSet _rItems 
)

◆ ~OGeneralPageWizard()

dbaui::OGeneralPageWizard::~OGeneralPageWizard ( )
overridevirtual

Definition at line 500 of file generalpage.cxx.

Member Function Documentation

◆ approveDatasourceType()

bool dbaui::OGeneralPageWizard::approveDatasourceType ( ::dbaccess::DATASOURCE_TYPE  eType,
OUString &  _inout_rDisplayName 
)
overrideprivatevirtual

◆ DECL_LINK() [1/4]

dbaui::OGeneralPageWizard::DECL_LINK ( OnDocumentSelected  ,
weld::ComboBox ,
void   
)
private

◆ DECL_LINK() [2/4]

dbaui::OGeneralPageWizard::DECL_LINK ( OnEmbeddedDBTypeSelected  ,
weld::ComboBox ,
void   
)
private

◆ DECL_LINK() [3/4]

dbaui::OGeneralPageWizard::DECL_LINK ( OnOpenDocument  ,
weld::Button ,
void   
)
private

◆ DECL_LINK() [4/4]

dbaui::OGeneralPageWizard::DECL_LINK ( OnSetupModeSelected  ,
weld::Toggleable ,
void   
)
private

◆ EnableControls()

void dbaui::OGeneralPageWizard::EnableControls ( )
private

◆ FillItemSet()

bool dbaui::OGeneralPageWizard::FillItemSet ( SfxItemSet _rCoreAttrs)
overrideprivatevirtual

◆ GetDatabaseCreationMode()

OGeneralPageWizard::CreationMode dbaui::OGeneralPageWizard::GetDatabaseCreationMode ( ) const

◆ getDatasourceName()

OUString dbaui::OGeneralPageWizard::getDatasourceName ( const SfxItemSet _rSet)
overrideprivatevirtual

◆ getEmbeddedDBName()

OUString dbaui::OGeneralPageWizard::getEmbeddedDBName ( const SfxItemSet _rSet)
private

◆ GetSelectedDocumentURL()

OUString dbaui::OGeneralPageWizard::GetSelectedDocumentURL ( ) const

◆ implInitControls()

void dbaui::OGeneralPageWizard::implInitControls ( const SfxItemSet _rSet,
bool  _bSaveValue 
)
overrideprivatevirtual

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

Definition at line 513 of file generalpage.cxx.

References GetDatabaseCreationMode(), getEmbeddedDBName(), dbaui::OGenericAdministrationPage::getFlags(), dbaui::OGeneralPage::implInitControls(), initializeEmbeddedDBList(), m_bIsDisplayedTypesEmpty, m_eOriginalCreationMode, dbaui::OGeneralPage::m_xDatasourceType, m_xEmbeddedDBType, m_xFT_DocListLabel, m_xFT_EmbeddedDBLabel, m_xFT_NoEmbeddedDBLabel, m_xLB_DocumentList, m_xPB_OpenDatabase, m_xRB_CreateDatabase, m_xRB_OpenExistingDatabase, and SetupModeSelected().

◆ initializeEmbeddedDBList()

void dbaui::OGeneralPageWizard::initializeEmbeddedDBList ( )
private

◆ insertEmbeddedDBTypeEntryData()

void dbaui::OGeneralPageWizard::insertEmbeddedDBTypeEntryData ( const OUString &  _sType,
const OUString &  sDisplayName 
)
private

◆ SetChooseDocumentHandler()

void dbaui::OGeneralPageWizard::SetChooseDocumentHandler ( const Link< OGeneralPageWizard &, void > &  _rHandler)
inline

Definition at line 162 of file generalpage.hxx.

References m_aChooseDocumentHandler.

Referenced by dbaui::ODbTypeWizDialogSetup::SetGeneralPage().

◆ SetCreationModeHandler()

void dbaui::OGeneralPageWizard::SetCreationModeHandler ( const Link< OGeneralPageWizard &, void > &  _rHandler)
inline

Definition at line 158 of file generalpage.hxx.

References m_aCreationModeHandler.

Referenced by dbaui::ODbTypeWizDialogSetup::SetGeneralPage().

◆ SetDocumentSelectionHandler()

void dbaui::OGeneralPageWizard::SetDocumentSelectionHandler ( const Link< OGeneralPageWizard &, void > &  _rHandler)
inline

◆ SetupModeSelected()

void dbaui::OGeneralPageWizard::SetupModeSelected ( )
private

Member Data Documentation

◆ m_aBrowsedDocumentURL

OUString dbaui::OGeneralPageWizard::m_aBrowsedDocumentURL
private

Definition at line 144 of file generalpage.hxx.

Referenced by GetSelectedDocumentURL().

◆ m_aChooseDocumentHandler

Link<OGeneralPageWizard&,void> dbaui::OGeneralPageWizard::m_aChooseDocumentHandler
private

to be called when a document in the RecentDoc list is selected

Definition at line 149 of file generalpage.hxx.

Referenced by SetChooseDocumentHandler().

◆ m_aCreationModeHandler

Link<OGeneralPageWizard&,void> dbaui::OGeneralPageWizard::m_aCreationModeHandler
private

Definition at line 147 of file generalpage.hxx.

Referenced by SetCreationModeHandler(), and SetupModeSelected().

◆ m_aDocumentSelectionHandler

Link<OGeneralPageWizard&,void> dbaui::OGeneralPageWizard::m_aDocumentSelectionHandler
private

to be called if a new type is selected

Definition at line 148 of file generalpage.hxx.

Referenced by SetDocumentSelectionHandler().

◆ m_aEmbeddedURLPrefixes

std::vector< OUString> dbaui::OGeneralPageWizard::m_aEmbeddedURLPrefixes
private

Definition at line 173 of file generalpage.hxx.

Referenced by insertEmbeddedDBTypeEntryData().

◆ m_bInitEmbeddedDBList

bool dbaui::OGeneralPageWizard::m_bInitEmbeddedDBList
private

to be called when a recent document has been definitely chosen

Definition at line 151 of file generalpage.hxx.

Referenced by initializeEmbeddedDBList().

◆ m_bIsDisplayedTypesEmpty

bool dbaui::OGeneralPageWizard::m_bIsDisplayedTypesEmpty
private

Definition at line 152 of file generalpage.hxx.

Referenced by implInitControls(), and initializeEmbeddedDBList().

◆ m_eOriginalCreationMode

CreationMode dbaui::OGeneralPageWizard::m_eOriginalCreationMode
private

Definition at line 145 of file generalpage.hxx.

Referenced by FillItemSet(), and implInitControls().

◆ m_xEmbeddedDBType

std::unique_ptr<weld::ComboBox> dbaui::OGeneralPageWizard::m_xEmbeddedDBType
private

◆ m_xFT_DocListLabel

std::unique_ptr<weld::Label> dbaui::OGeneralPageWizard::m_xFT_DocListLabel
private

Definition at line 137 of file generalpage.hxx.

Referenced by EnableControls(), and implInitControls().

◆ m_xFT_EmbeddedDBLabel

std::unique_ptr<weld::Label> dbaui::OGeneralPageWizard::m_xFT_EmbeddedDBLabel
private

Definition at line 134 of file generalpage.hxx.

Referenced by EnableControls(), and implInitControls().

◆ m_xFT_NoEmbeddedDBLabel

std::unique_ptr<weld::Label> dbaui::OGeneralPageWizard::m_xFT_NoEmbeddedDBLabel
private

Definition at line 141 of file generalpage.hxx.

Referenced by implInitControls(), and OGeneralPageWizard().

◆ m_xLB_DocumentList

std::unique_ptr<OpenDocumentListBox> dbaui::OGeneralPageWizard::m_xLB_DocumentList
private

◆ m_xPB_OpenDatabase

std::unique_ptr<OpenDocumentButton> dbaui::OGeneralPageWizard::m_xPB_OpenDatabase
private

Definition at line 139 of file generalpage.hxx.

Referenced by EnableControls(), implInitControls(), and OGeneralPageWizard().

◆ m_xRB_ConnectDatabase

std::unique_ptr<weld::RadioButton> dbaui::OGeneralPageWizard::m_xRB_ConnectDatabase
private

Definition at line 132 of file generalpage.hxx.

Referenced by EnableControls(), GetDatabaseCreationMode(), and OGeneralPageWizard().

◆ m_xRB_CreateDatabase

std::unique_ptr<weld::RadioButton> dbaui::OGeneralPageWizard::m_xRB_CreateDatabase
private

◆ m_xRB_OpenExistingDatabase

std::unique_ptr<weld::RadioButton> dbaui::OGeneralPageWizard::m_xRB_OpenExistingDatabase
private

Definition at line 131 of file generalpage.hxx.

Referenced by EnableControls(), FillItemSet(), implInitControls(), and OGeneralPageWizard().


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