DCOP and slots
    Thiago Macieira 
    thiago.macieira at kdemail.net
       
    Tue Jan 13 15:25:56 GMT 2004
    
    
  
David Faure wrote:
>Tried putting k_dcop: under public slots: ? Does that work, or does
> moc think slots end there?
>
>The only other way I can think of is an inline forwarder method
>(but this requires using a different name for the public slot, and for
> the DCOP method).
You can also try by defining the DCOP interface in one class with pure 
virtual members and then inherit that class, while declaring that 
function as a slot.
More or less like this:
class MyClassIface: virtual public DCOPObject
{
  K_DCOP
k_dcop:
  virtual void something(const QString&) = 0;
};
class MyClass: public QObject, public MyClassIface
{
  Q_OBJECT
  K_DCOP
public slots:
  virtual void something(const QString&);
};
Note: I haven't tested and I have no idea if this works.
PS: wasn't there a recommendation that DCOP interfaces should be used 
instead of exposing the main class?
-- 
  Thiago Macieira  -  Registered Linux user #65028
   thiagom (AT) mail (dot) com
    ICQ UIN: 1967141   PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040113/6bc629f9/attachment.sig>
    
    
More information about the kde-core-devel
mailing list