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

#include <QtFilePicker.hxx>

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

Public Member Functions

 QtFilePicker (css::uno::Reference< css::uno::XComponentContext > context, QFileDialog::FileMode, bool bUseNative=false)
 
virtual ~QtFilePicker () 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 setDialogTitle (const OUString &) override
 
virtual void SAL_CALL startExecuteModal (const css::uno::Reference< css::ui::dialogs::XDialogClosedListener > &) 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
 
void SAL_CALL disposing (const css::lang::EventObject &rEvent) override
 
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
 
void SAL_CALL queryTermination (const css::lang::EventObject &aEvent) override
 
void SAL_CALL notifyTermination (const css::lang::EventObject &aEvent) override
 

Protected Member Functions

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

Protected Attributes

std::unique_ptr< QFileDialog > m_pFileDialog
 the file picker dialog More...
 
QWidget * m_pExtraControls
 widget to contain extra custom controls More...
 

Private Slots

void filterSelected (const QString &)
 
void currentChanged (const QString &)
 
virtual void updateAutomaticFileExtension ()
 
void finished (int)
 

Private Member Functions

 QtFilePicker (const QtFilePicker &)=delete
 
QtFilePickeroperator= (const QtFilePicker &)=delete
 
void prepareExecute ()
 

Static Private Member Functions

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

Private Attributes

css::uno::Reference< css::uno::XComponentContext > m_context
 
css::uno::Reference< css::ui::dialogs::XFilePickerListener > m_xListener
 
css::uno::Reference< css::ui::dialogs::XDialogClosedListener > m_xClosedListener
 
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
 
QGridLayout * m_pLayout
 layout for extra custom controls More...
 
QHash< sal_Int16, QWidget * > m_aCustomWidgetsMap
 map of SAL control ID's to widget More...
 
const bool m_bIsFolderPicker
 
QWidget * m_pParentWidget
 

Detailed Description

Definition at line 58 of file qt5/QtFilePicker.hxx.

Constructor & Destructor Documentation

◆ QtFilePicker() [1/2]

QtFilePicker::QtFilePicker ( css::uno::Reference< css::uno::XComponentContext >  context,
QFileDialog::FileMode  ,
bool  bUseNative = false 
)
explicit

◆ ~QtFilePicker()

virtual QtFilePicker::~QtFilePicker ( )
overridevirtual

◆ QtFilePicker() [2/2]

QtFilePicker::QtFilePicker ( const QtFilePicker )
privatedelete

Member Function Documentation

◆ addCustomControl()

virtual void QtFilePicker::addCustomControl ( sal_Int16  controlId)
protectedvirtual

◆ addFilePickerListener()

virtual void SAL_CALL QtFilePicker::addFilePickerListener ( const css::uno::Reference< css::ui::dialogs::XFilePickerListener > &  xListener)
overridevirtual

◆ appendFilter()

virtual void SAL_CALL QtFilePicker::appendFilter ( const OUString &  rTitle,
const OUString &  rFilter 
)
overridevirtual

◆ appendFilterGroup()

virtual void SAL_CALL QtFilePicker::appendFilterGroup ( const OUString &  rGroupTitle,
const css::uno::Sequence< css::beans::StringPair > &  rFilters 
)
overridevirtual

◆ cancel()

virtual void SAL_CALL QtFilePicker::cancel ( )
overridevirtual

◆ currentChanged

void QtFilePicker::currentChanged ( const QString &  )
privateslot

◆ disposing()

void SAL_CALL QtFilePicker::disposing ( const css::lang::EventObject &  rEvent)
override

◆ enableControl()

virtual void SAL_CALL QtFilePicker::enableControl ( sal_Int16  nControlId,
sal_Bool  bEnable 
)
overridevirtual

◆ execute()

virtual sal_Int16 SAL_CALL QtFilePicker::execute ( )
overridevirtual

◆ filterSelected

void QtFilePicker::filterSelected ( const QString &  )
privateslot

◆ finished

void QtFilePicker::finished ( int  )
privateslot

◆ getCurrentFilter()

virtual OUString SAL_CALL QtFilePicker::getCurrentFilter ( )
overridevirtual

◆ getDirectory()

virtual OUString SAL_CALL QtFilePicker::getDirectory ( )
overridevirtual

◆ getDisplayDirectory()

virtual OUString SAL_CALL QtFilePicker::getDisplayDirectory ( )
overridevirtual

◆ getFiles()

virtual css::uno::Sequence< OUString > SAL_CALL QtFilePicker::getFiles ( )
overridevirtual

◆ getImplementationName()

virtual OUString SAL_CALL QtFilePicker::getImplementationName ( )
overridevirtual

◆ getLabel()

virtual OUString SAL_CALL QtFilePicker::getLabel ( sal_Int16  nControlId)
overridevirtual

◆ getResString()

static QString QtFilePicker::getResString ( TranslateId  pRedId)
staticprivate

◆ getSelectedFiles()

virtual css::uno::Sequence< OUString > SAL_CALL QtFilePicker::getSelectedFiles ( )
overridevirtual

◆ getSupportedServiceNames()

virtual css::uno::Sequence< OUString > SAL_CALL QtFilePicker::getSupportedServiceNames ( )
overridevirtual

◆ getValue()

virtual css::uno::Any SAL_CALL QtFilePicker::getValue ( sal_Int16  nControlId,
sal_Int16  nControlAction 
)
overridevirtual

◆ handleGetListValue()

static css::uno::Any QtFilePicker::handleGetListValue ( const QComboBox *  pWidget,
sal_Int16  nControlAction 
)
staticprivate

◆ handleSetListValue()

static void QtFilePicker::handleSetListValue ( QComboBox *  pQComboBox,
sal_Int16  nAction,
const css::uno::Any &  rValue 
)
staticprivate

◆ initialize()

virtual void SAL_CALL QtFilePicker::initialize ( const css::uno::Sequence< css::uno::Any > &  rArguments)
overridevirtual

◆ notifyTermination()

void SAL_CALL QtFilePicker::notifyTermination ( const css::lang::EventObject &  aEvent)
override

◆ operator=()

QtFilePicker & QtFilePicker::operator= ( const QtFilePicker )
privatedelete

◆ prepareExecute()

void QtFilePicker::prepareExecute ( )
private

◆ queryTermination()

void SAL_CALL QtFilePicker::queryTermination ( const css::lang::EventObject &  aEvent)
override

◆ removeFilePickerListener()

virtual void SAL_CALL QtFilePicker::removeFilePickerListener ( const css::uno::Reference< css::ui::dialogs::XFilePickerListener > &  xListener)
overridevirtual

◆ setCurrentFilter()

virtual void SAL_CALL QtFilePicker::setCurrentFilter ( const OUString &  rTitle)
overridevirtual

◆ setCustomControlWidgetLayout()

void QtFilePicker::setCustomControlWidgetLayout ( QGridLayout *  pLayout)
inlineprotected

Definition at line 163 of file qt5/QtFilePicker.hxx.

◆ setDefaultName()

virtual void SAL_CALL QtFilePicker::setDefaultName ( const OUString &  rName)
overridevirtual

◆ setDescription()

virtual void SAL_CALL QtFilePicker::setDescription ( const OUString &  rDescription)
overridevirtual

◆ setDialogTitle()

virtual void SAL_CALL QtFilePicker::setDialogTitle ( const OUString &  )
overridevirtual

◆ setDisplayDirectory()

virtual void SAL_CALL QtFilePicker::setDisplayDirectory ( const OUString &  rDirectory)
overridevirtual

◆ setLabel()

virtual void SAL_CALL QtFilePicker::setLabel ( sal_Int16  nControlId,
const OUString &  rLabel 
)
overridevirtual

◆ setMultiSelectionMode()

virtual void SAL_CALL QtFilePicker::setMultiSelectionMode ( sal_Bool  bMode)
overridevirtual

◆ setTitle()

virtual void SAL_CALL QtFilePicker::setTitle ( const OUString &  rTitle)
overridevirtual

◆ setValue()

virtual void SAL_CALL QtFilePicker::setValue ( sal_Int16  nControlId,
sal_Int16  nControlAction,
const css::uno::Any &  rValue 
)
overridevirtual

◆ startExecuteModal()

virtual void SAL_CALL QtFilePicker::startExecuteModal ( const css::uno::Reference< css::ui::dialogs::XDialogClosedListener > &  )
overridevirtual

◆ supportsService()

virtual sal_Bool SAL_CALL QtFilePicker::supportsService ( const OUString &  rServiceName)
overridevirtual

◆ updateAutomaticFileExtension

virtual void QtFilePicker::updateAutomaticFileExtension ( )
privatevirtualslot

Member Data Documentation

◆ m_aCurrentFilter

QString QtFilePicker::m_aCurrentFilter
private

Definition at line 74 of file qt5/QtFilePicker.hxx.

◆ m_aCustomWidgetsMap

QHash<sal_Int16, QWidget*> QtFilePicker::m_aCustomWidgetsMap
private

map of SAL control ID's to widget

Definition at line 77 of file qt5/QtFilePicker.hxx.

◆ m_aHelperMutex

osl::Mutex QtFilePicker::m_aHelperMutex
private

mutex used by the WeakComponentImplHelper

Definition at line 68 of file qt5/QtFilePicker.hxx.

◆ m_aNamedFilterList

QStringList QtFilePicker::m_aNamedFilterList
private

to keep the original sequence

Definition at line 70 of file qt5/QtFilePicker.hxx.

◆ m_aNamedFilterToExtensionMap

QHash<QString, QString> QtFilePicker::m_aNamedFilterToExtensionMap
private

Definition at line 73 of file qt5/QtFilePicker.hxx.

◆ m_aTitleToFilterMap

QHash<QString, QString> QtFilePicker::m_aTitleToFilterMap
private

Definition at line 71 of file qt5/QtFilePicker.hxx.

◆ m_bIsFolderPicker

const bool QtFilePicker::m_bIsFolderPicker
private

Definition at line 79 of file qt5/QtFilePicker.hxx.

◆ m_context

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

Definition at line 63 of file qt5/QtFilePicker.hxx.

◆ m_pExtraControls

QWidget* QtFilePicker::m_pExtraControls
protected

widget to contain extra custom controls

Definition at line 85 of file qt5/QtFilePicker.hxx.

◆ m_pFileDialog

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

the file picker dialog

Definition at line 84 of file qt5/QtFilePicker.hxx.

◆ m_pLayout

QGridLayout* QtFilePicker::m_pLayout
private

layout for extra custom controls

Definition at line 76 of file qt5/QtFilePicker.hxx.

◆ m_pParentWidget

QWidget* QtFilePicker::m_pParentWidget
private

Definition at line 81 of file qt5/QtFilePicker.hxx.

◆ m_xClosedListener

css::uno::Reference<css::ui::dialogs::XDialogClosedListener> QtFilePicker::m_xClosedListener
private

Definition at line 66 of file qt5/QtFilePicker.hxx.

◆ m_xListener

css::uno::Reference<css::ui::dialogs::XFilePickerListener> QtFilePicker::m_xListener
private

Definition at line 65 of file qt5/QtFilePicker.hxx.


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