LibreOffice Module svx (master) 1
|
helper class to control controls needed to input a database location More...
#include <databaselocationinput.hxx>
Public Member Functions | |
DatabaseLocationInputController (const css::uno::Reference< css::uno::XComponentContext > &_rContext, SvtURLBox &_rLocationInput, weld::Button &_rBrowseButton, weld::Window &_rDialog) | |
~DatabaseLocationInputController () | |
void | setURL (const OUString &_rURL) |
sets the given URL at the input control, after translating it into a system path More... | |
OUString | getURL () const |
returns the current database location, in form of a URL (not a system path) More... | |
bool | prepareCommit () |
prepares committing the database location entered in the input field More... | |
Private Attributes | |
::std::unique_ptr< DatabaseLocationInputController_Impl > | m_pImpl |
helper class to control controls needed to input a database location
If you allow, in your dialog, to save a database document, then you usually have an URLBox for inputting the actual location, and a push button to browse for a location.
This helper class controls such two UI elements.
Definition at line 45 of file databaselocationinput.hxx.
svx::DatabaseLocationInputController::DatabaseLocationInputController | ( | const css::uno::Reference< css::uno::XComponentContext > & | _rContext, |
SvtURLBox & | _rLocationInput, | ||
weld::Button & | _rBrowseButton, | ||
weld::Window & | _rDialog | ||
) |
Definition at line 219 of file databaselocationinput.cxx.
References m_pImpl.
svx::DatabaseLocationInputController::~DatabaseLocationInputController | ( | ) |
Definition at line 225 of file databaselocationinput.cxx.
OUString svx::DatabaseLocationInputController::getURL | ( | ) | const |
returns the current database location, in form of a URL (not a system path)
Definition at line 239 of file databaselocationinput.cxx.
References m_pImpl.
bool svx::DatabaseLocationInputController::prepareCommit | ( | ) |
prepares committing the database location entered in the input field
Effectively, this method checks whether the file in the location already exists, and if so, it asks the user whether to overwrite it.
If the method is called multiple times, this check only happens when the location changed since the last call.
Definition at line 229 of file databaselocationinput.cxx.
References m_pImpl.
void svx::DatabaseLocationInputController::setURL | ( | const OUString & | _rURL | ) |
sets the given URL at the input control, after translating it into a system path
Definition at line 234 of file databaselocationinput.cxx.
References m_pImpl.
|
private |
Definition at line 76 of file databaselocationinput.hxx.
Referenced by getURL(), prepareCommit(), and setURL().