KNotify
ksolidnotify.cpp
Go to the documentation of this file.
135 void KSolidNotify::notifySolidEvent(QString event, Solid::ErrorType error, QVariant errorData, const QString & udi, const QString & errorMessage)
143 QDBusMessage m = QDBusMessage::createMethodCall( dbusDeviceNotificationsName, dbusDeviceNotificationsPath, dbusDeviceNotificationsName, "notify" );
150 m_kNotify->event(event, "hardwarenotifications", context, i18n("Devices notification"), errorMessage, KNotifyImage(), QStringList(), -1);
154 void KSolidNotify::storageSetupDone(Solid::ErrorType error, QVariant errorData, const QString &udi)
164 void KSolidNotify::storageTeardownDone(Solid::ErrorType error, QVariant errorData, const QString &udi)
169 QString errorMessage = i18n("Could not unmount the following device: %1\nOne or more files on this device are open within an application ", device.description());
174 notifySolidEvent("safetoremove", error, errorData, udi, i18nc("The term \"remove\" here means \"physically disconnect the device from the computer\", whereas \"safely\" means \"without risk of data loss\"", "The following device can now be safely removed: %1", device.description()));
178 void KSolidNotify::storageEjectDone(Solid::ErrorType error, QVariant errorData, const QString &udi)
195 QString errorMessage = i18n("Could not eject the following device: %1\nOne or more files on this device are open within an application ", discDevice.description());
200 notifySolidEvent("safetoremove", error, errorData, udi, i18n("The following device can now be safely removed: %1", device.description()));
204 void KSolidNotify::slotServiceOwnerChanged( const QString & serviceName, const QString & oldOwner, const QString & newOwner )
iterator insert(const Key &key, const T &value)
QDBusMessage call(const QDBusMessage &message, QDBus::CallMode mode, int timeout) const
static const char dbusDeviceNotificationsPath[]
Definition: ksolidnotify.cpp:42
QString simplified() const
QDBusConnection sessionBus()
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
bool isNull() const
static const char dbusDeviceNotificationsName[]
Definition: ksolidnotify.cpp:41
void setConnection(const QDBusConnection &connection)
bool isEmpty() const
int remove(const Key &key)
Definition: knotify.h:40
void onDeviceRemoved(const QString &udi)
Definition: ksolidnotify.cpp:88
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void setWatchMode(QFlags< QDBusServiceWatcher::WatchModeFlag > mode)
QObject * parent() const
QString toString() const
QDBusMessage createMethodCall(const QString &service, const QString &path, const QString &interface, const QString &method)
void addWatchedService(const QString &newService)
int event(const QString &event, const QString &fromApp, const ContextList &contexts, const QString &title, const QString &text, const KNotifyImage &image, const QStringList &actions, int timeout, WId winId=0)
Definition: knotify.cpp:134
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:08:23 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:08:23 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.