D-Bus interface

From QStarDict wiki
Jump to: navigation, search

QStarDict supports D-Bus message bus.

Contents

List of available methods

void org.qstardict.dbus.showPopup(QString text)
void org.qstardict.dbus.showTranslation(QString text)
QString org.qstardict.dbus.translate(QString text) // return translation in pure text format
QString org.qstardict.dbus.translateHtml(QString text) // return translation in HTML format
QDBusVariant org.freedesktop.DBus.Properties.Get(QString interface_name, QString property_name)
void org.freedesktop.DBus.Properties.Set(QString interface_name, QString property_name, QDBusVariant value)
QString org.freedesktop.DBus.Introspectable.Introspect()

List of available properties

readwrite int org.qstardict.dbus.mainWindowVisible

Using

You can call these methods from your applications or by using the qdbus program. This command

qdbus org.qstardict.dbus /qstardict org.qstardict.dbus.showPopup "text"

will show a QStarDict popup window with a translation of the "text".

See also

Hiding and showing QStarDict window with D-Bus

Personal tools