LibreOffice Module vcl (master)  1
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Slots | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
Qt5FilePicker Class Reference

#include <Qt5FilePicker.hxx>

Inheritance diagram for Qt5FilePicker:
[legend]
Collaboration diagram for Qt5FilePicker:
[legend]

Public Member Functions

 Qt5FilePicker (css::uno::Reference< css::uno::XComponentContext > const &context, QFileDialog::FileMode, bool bShowFileExtensionInFilterTitle=false, bool bUseNativeDialog=false)
 
virtual ~Qt5FilePicker () override
 
virtual void SAL_CALL addFilePickerListener (const css::uno::Reference< css::ui::dialogs::XFilePickerListener > &xListener) override
 
virtual void SAL_CALL removeFilePickerListener (const css::uno::Reference< css::ui::dialogs::XFilePickerListener > &xListener) override
 
virtual void SAL_CALL appendFilter (const OUString &rTitle, const OUString &rFilter) override
 
virtual void SAL_CALL setCurrentFilter (const OUString &rTitle) override
 
virtual OUString SAL_CALL getCurrentFilter () override
 
virtual void SAL_CALL appendFilterGroup (const OUString &rGroupTitle, const css::uno::Sequence< css::beans::StringPair > &rFilters) override
 
virtual void SAL_CALL cancel () override
 
virtual void SAL_CALL setTitle (const OUString &rTitle) override
 
virtual sal_Int16 SAL_CALL execute () override
 
virtual void SAL_CALL setMultiSelectionMode (sal_Bool bMode) override
 
virtual void SAL_CALL setDefaultName (const OUString &rName) override
 
virtual void SAL_CALL setDisplayDirectory (const OUString &rDirectory) override
 
virtual OUString SAL_CALL getDisplayDirectory () override
 
virtual css::uno::Sequence< OUString > SAL_CALL getFiles () override
 
virtual void SAL_CALL setValue (sal_Int16 nControlId, sal_Int16 nControlAction, const css::uno::Any &rValue) override
 
virtual css::uno::Any SAL_CALL getValue (sal_Int16 nControlId, sal_Int16 nControlAction) override
 
virtual void SAL_CALL enableControl (sal_Int16 nControlId, sal_Bool bEnable) override
 
virtual void SAL_CALL setLabel (sal_Int16 nControlId, const OUString &rLabel) override
 
virtual OUString SAL_CALL getLabel (sal_Int16 nControlId) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSelectedFiles () override
 
virtual void SAL_CALL initialize (const css::uno::Sequence< css::uno::Any > &rArguments) override
 
virtual void disposing (const css::lang::EventObject &rEvent)
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &rServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
virtual OUString SAL_CALL getDirectory () override
 
virtual void SAL_CALL setDescription (const OUString &rDescription) override
 

Protected Member Functions

virtual void addCustomControl (sal_Int16 controlId)
 
void setCustomControlWidgetLayout (QGridLayout *pLayout)
 

Static Protected Member Functions

static css::uno::Any handleGetListValue (QComboBox *pWidget, sal_Int16 nControlAction)
 
static void handleSetListValue (QComboBox *pQComboBox, sal_Int16 nAction, const css::uno::Any &rValue)
 

Protected Attributes

css::uno::Reference< css::ui::dialogs::XFilePickerListener > m_xListener
 
std::unique_ptr< QFileDialog > m_pFileDialog
 the non-native file picker dialog More...
 
osl::Mutex m_aHelperMutex
 mutex used by the WeakComponentImplHelper More...
 
QStringList m_aNamedFilterList
 to keep the original sequence More...
 
QHash< QString, QString > m_aTitleToFilterMap
 
QHash< QString, QString > m_aNamedFilterToExtensionMap
 
QString m_aCurrentFilter
 
QWidget * m_pExtraControls
 widget to contain extra custom controls More...
 
QGridLayout * m_pLayout
 layout for extra custom controls More...
 
QLabel * m_pFilenameLabel
 label to display the filename More...
 
QLabel * m_pFilterLabel
 label to display the filter More...
 
QHash< sal_Int16, QWidget * > m_aCustomWidgetsMap
 map of SAL control ID's to widget More...
 
bool m_bIsFolderPicker
 

Private Slots

void filterSelected (const QString &)
 
void currentChanged (const QString &)
 
void updateAutomaticFileExtension ()
 

Private Member Functions

 Qt5FilePicker (const Qt5FilePicker &)=delete
 
Qt5FilePickeroperator= (const Qt5FilePicker &)=delete
 

Static Private Member Functions

static QString getResString (const char *pRedId)
 

Private Attributes

css::uno::Reference< css::uno::XComponentContext > m_context
 
bool m_bShowFileExtensionInFilterTitle
 

Detailed Description

Definition at line 56 of file Qt5FilePicker.hxx.

Constructor & Destructor Documentation

Qt5FilePicker::Qt5FilePicker ( css::uno::Reference< css::uno::XComponentContext > const &  context,
QFileDialog::FileMode  ,
bool  bShowFileExtensionInFilterTitle = false,
bool  bUseNativeDialog = false 
)
explicit
virtual Qt5FilePicker::~Qt5FilePicker ( )
overridevirtual
Qt5FilePicker::Qt5FilePicker ( const Qt5FilePicker )
privatedelete

Member Function Documentation

virtual void Qt5FilePicker::addCustomControl ( sal_Int16  controlId)
protectedvirtual
virtual void SAL_CALL Qt5FilePicker::addFilePickerListener ( const css::uno::Reference< css::ui::dialogs::XFilePickerListener > &  xListener)
overridevirtual
virtual void SAL_CALL Qt5FilePicker::appendFilter ( const OUString &  rTitle,
const OUString &  rFilter 
)
overridevirtual
virtual void SAL_CALL Qt5FilePicker::appendFilterGroup ( const OUString &  rGroupTitle,
const css::uno::Sequence< css::beans::StringPair > &  rFilters 
)
overridevirtual
virtual void SAL_CALL Qt5FilePicker::cancel ( )
overridevirtual
void Qt5FilePicker::currentChanged ( const QString &  )
privateslot
virtual void Qt5FilePicker::disposing ( const css::lang::EventObject &  rEvent)
virtual
Exceptions
css::uno::RuntimeException
virtual void SAL_CALL Qt5FilePicker::enableControl ( sal_Int16  nControlId,
sal_Bool  bEnable 
)
overridevirtual
virtual sal_Int16 SAL_CALL Qt5FilePicker::execute ( )
overridevirtual
void Qt5FilePicker::filterSelected ( const QString &  )
privateslot
virtual OUString SAL_CALL Qt5FilePicker::getCurrentFilter ( )
overridevirtual
virtual OUString SAL_CALL Qt5FilePicker::getDirectory ( )
overridevirtual
virtual OUString SAL_CALL Qt5FilePicker::getDisplayDirectory ( )
overridevirtual
virtual css::uno::Sequence<OUString> SAL_CALL Qt5FilePicker::getFiles ( )
overridevirtual
virtual OUString SAL_CALL Qt5FilePicker::getImplementationName ( )
overridevirtual
virtual OUString SAL_CALL Qt5FilePicker::getLabel ( sal_Int16  nControlId)
overridevirtual
static QString Qt5FilePicker::getResString ( const char *  pRedId)
staticprivate
virtual css::uno::Sequence<OUString> SAL_CALL Qt5FilePicker::getSelectedFiles ( )
overridevirtual
virtual css::uno::Sequence<OUString> SAL_CALL Qt5FilePicker::getSupportedServiceNames ( )
overridevirtual
virtual css::uno::Any SAL_CALL Qt5FilePicker::getValue ( sal_Int16  nControlId,
sal_Int16  nControlAction 
)
overridevirtual
static css::uno::Any Qt5FilePicker::handleGetListValue ( QComboBox *  pWidget,
sal_Int16  nControlAction 
)
staticprotected
static void Qt5FilePicker::handleSetListValue ( QComboBox *  pQComboBox,
sal_Int16  nAction,
const css::uno::Any &  rValue 
)
staticprotected
virtual void SAL_CALL Qt5FilePicker::initialize ( const css::uno::Sequence< css::uno::Any > &  rArguments)
overridevirtual
Qt5FilePicker& Qt5FilePicker::operator= ( const Qt5FilePicker )
privatedelete
virtual void SAL_CALL Qt5FilePicker::removeFilePickerListener ( const css::uno::Reference< css::ui::dialogs::XFilePickerListener > &  xListener)
overridevirtual
virtual void SAL_CALL Qt5FilePicker::setCurrentFilter ( const OUString &  rTitle)
overridevirtual
void Qt5FilePicker::setCustomControlWidgetLayout ( QGridLayout *  pLayout)
inlineprotected

Definition at line 162 of file Qt5FilePicker.hxx.

virtual void SAL_CALL Qt5FilePicker::setDefaultName ( const OUString &  rName)
overridevirtual
virtual void SAL_CALL Qt5FilePicker::setDescription ( const OUString &  rDescription)
overridevirtual
virtual void SAL_CALL Qt5FilePicker::setDisplayDirectory ( const OUString &  rDirectory)
overridevirtual
virtual void SAL_CALL Qt5FilePicker::setLabel ( sal_Int16  nControlId,
const OUString &  rLabel 
)
overridevirtual
virtual void SAL_CALL Qt5FilePicker::setMultiSelectionMode ( sal_Bool  bMode)
overridevirtual
virtual void SAL_CALL Qt5FilePicker::setTitle ( const OUString &  rTitle)
overridevirtual
virtual void SAL_CALL Qt5FilePicker::setValue ( sal_Int16  nControlId,
sal_Int16  nControlAction,
const css::uno::Any &  rValue 
)
overridevirtual
virtual sal_Bool SAL_CALL Qt5FilePicker::supportsService ( const OUString &  rServiceName)
overridevirtual
void Qt5FilePicker::updateAutomaticFileExtension ( )
privateslot

Member Data Documentation

QString Qt5FilePicker::m_aCurrentFilter
protected

Definition at line 80 of file Qt5FilePicker.hxx.

QHash<sal_Int16, QWidget*> Qt5FilePicker::m_aCustomWidgetsMap
protected

map of SAL control ID's to widget

Definition at line 86 of file Qt5FilePicker.hxx.

osl::Mutex Qt5FilePicker::m_aHelperMutex
protected

mutex used by the WeakComponentImplHelper

Definition at line 74 of file Qt5FilePicker.hxx.

QStringList Qt5FilePicker::m_aNamedFilterList
protected

to keep the original sequence

Definition at line 76 of file Qt5FilePicker.hxx.

QHash<QString, QString> Qt5FilePicker::m_aNamedFilterToExtensionMap
protected

Definition at line 79 of file Qt5FilePicker.hxx.

QHash<QString, QString> Qt5FilePicker::m_aTitleToFilterMap
protected

Definition at line 77 of file Qt5FilePicker.hxx.

bool Qt5FilePicker::m_bIsFolderPicker
protected

Definition at line 88 of file Qt5FilePicker.hxx.

bool Qt5FilePicker::m_bShowFileExtensionInFilterTitle
private

Definition at line 67 of file Qt5FilePicker.hxx.

css::uno::Reference<css::uno::XComponentContext> Qt5FilePicker::m_context
private

Definition at line 61 of file Qt5FilePicker.hxx.

QWidget* Qt5FilePicker::m_pExtraControls
protected

widget to contain extra custom controls

Definition at line 82 of file Qt5FilePicker.hxx.

std::unique_ptr<QFileDialog> Qt5FilePicker::m_pFileDialog
protected

the non-native file picker dialog

Definition at line 72 of file Qt5FilePicker.hxx.

QLabel* Qt5FilePicker::m_pFilenameLabel
protected

label to display the filename

Definition at line 84 of file Qt5FilePicker.hxx.

QLabel* Qt5FilePicker::m_pFilterLabel
protected

label to display the filter

Definition at line 85 of file Qt5FilePicker.hxx.

QGridLayout* Qt5FilePicker::m_pLayout
protected

layout for extra custom controls

Definition at line 83 of file Qt5FilePicker.hxx.

css::uno::Reference<css::ui::dialogs::XFilePickerListener> Qt5FilePicker::m_xListener
protected

Definition at line 70 of file Qt5FilePicker.hxx.


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