Kaydet (Commit) a8d102c2 authored tarafından Jan-Marek Glogowski's avatar Jan-Marek Glogowski

fdo#72187 Implement KDE4 picker notifications

This notifies the XFilePickerListener of filter changes and file
selection changes.

Change-Id: I749c5f7420f020a3a2fbb764acb5c45d40972cf1
üst 24e8b90d
......@@ -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: */
......@@ -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: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment