diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2014-02-06 16:05:37 +0000 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2014-02-06 17:54:27 +0000 |
commit | a8d102c2406b8c027afb32d61271e0a2c301f133 (patch) | |
tree | 02e5226738c4a3a645c5b1246c06607650f91b45 /vcl/unx | |
parent | Simplify control item switch statements (diff) | |
download | core-a8d102c2406b8c027afb32d61271e0a2c301f133.tar.gz core-a8d102c2406b8c027afb32d61271e0a2c301f133.zip |
fdo#72187 Implement KDE4 picker notifications
This notifies the XFilePickerListener of filter changes and file
selection changes.
Change-Id: I749c5f7420f020a3a2fbb764acb5c45d40972cf1
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/kde4/KDE4FilePicker.cxx | 22 | ||||
-rw-r--r-- | vcl/unx/kde4/KDE4FilePicker.hxx | 4 |
2 files changed, 26 insertions, 0 deletions
diff --git a/vcl/unx/kde4/KDE4FilePicker.cxx b/vcl/unx/kde4/KDE4FilePicker.cxx index f92142aa0423..54f7458d55bc 100644 --- a/vcl/unx/kde4/KDE4FilePicker.cxx +++ b/vcl/unx/kde4/KDE4FilePicker.cxx @@ -189,7 +189,12 @@ KDE4FilePicker::KDE4FilePicker( const uno::Reference<uno::XComponentContext>& ) // Destructor proxy connect( this, SIGNAL( cleanupProxySignal() ), this, SLOT( cleanupProxy() ), Qt::BlockingQueuedConnection ); + connect( this, SIGNAL( checkProtocolSignal() ), this, SLOT( checkProtocol() ), Qt::BlockingQueuedConnection ); + + // XFilePickerListener notifications + connect( _dialog, SIGNAL( filterChanged(const QString&) ), this, SLOT( filterChanged(const QString&) )); + connect( _dialog, SIGNAL( selectionChanged() ), this, SLOT( selectionChanged() )); } KDE4FilePicker::~KDE4FilePicker() @@ -783,6 +788,23 @@ void KDE4FilePicker::checkProtocol() KMessageBox::error( _dialog, KIO::buildErrorString( KIO::ERR_UNSUPPORTED_PROTOCOL, _dialog->baseUrl().protocol())); } +void KDE4FilePicker::filterChanged(const QString &) +{ + FilePickerEvent aEvent; + aEvent.ElementId = LISTBOX_FILTER; + OSL_TRACE( "filter changed" ); + if (m_xListener.is()) + m_xListener->controlStateChanged( aEvent ); +} + +void KDE4FilePicker::selectionChanged() +{ + FilePickerEvent aEvent; + OSL_TRACE( "file selection changed" ); + if (m_xListener.is()) + m_xListener->fileSelectionChanged( aEvent ); +} + #include "KDE4FilePicker.moc" /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/unx/kde4/KDE4FilePicker.hxx b/vcl/unx/kde4/KDE4FilePicker.hxx index 69e7eb26bdda..6dc97df86cc2 100644 --- a/vcl/unx/kde4/KDE4FilePicker.hxx +++ b/vcl/unx/kde4/KDE4FilePicker.hxx @@ -230,6 +230,10 @@ private Q_SLOTS: void cleanupProxy(); void checkProtocol(); + // emit XFilePickerListener controlStateChanged event + void filterChanged(const QString &filter); + // emit XFilePickerListener fileSelectionChanged event + void selectionChanged(); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |