Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so dont bother with any of their useless mail servers here and just use oauth login instead. Thank the nice Russians for causing that. :)
Paste
Pasted by freeppe ( 16 years ago )
#include <QtGui/QApplication>
#include <QtCore>
#include <QtDBus>
#ifndef QCBADAPTER_H
#define QCBADAPTER_H
class QCBAdapter: public QDBusAbstractAdaptor
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "DBus.Manager.PrintString")
Q_PROPERTY(QString str READ read_str WRITE write_str)
public:
//QApplication *app;
QString str;
QCBAdapter(QCoreApplication *application)
: QDBusAbstractAdaptor(application)
{
}
Q_INVOKABLE QString read_str()
{
printf("Выводим строкуn");
return str;
}
Q_INVOKABLE void write_str(const QString &newContent;)
{
printf("Изменяем строкуn");
str = newContent;
}
public slots:
Q_NOREPLY void emptyClipboard()
{
printf("Очищаем строкуn");
str = "";
}
};
#endif // QCBADAPTER_H
Revise this Paste