Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
[email protected] webmail now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!

Paste

Pasted by freeppe ( 14 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

Your Name: Code Language: