Results 1 to 2 of 2

Thread: Plugin Interfaces

  1. #1
    Join Date
    Feb 2006
    Posts
    32
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Plugin Interfaces

    Hi, I am writing a MapViewer application which will support plugins. I am currently trying to define an interface for my plug-ins but I keep asking myself the same question: Why don't I just had one method, initialize() which takes a MainWindow* pointer then all plug-ins become "general" and can connect to any signal they want to?

    Due to Qt's excellent signal/slot mechanism this seems like the way to go - why limit your plug-ins to a specific interface? Am I missing something obvious here?

  2. #2
    Join Date
    Jan 2006
    Posts
    22
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Plugin Interfaces

    Due to Qt's excellent signal/slot mechanism this seems like the way to go - why limit your plug-ins to a specific interface? Am I missing something obvious here?
    One of the advantages of plugins is the possibility for third party to add functionality to an app. Consider an image filter-plugin: Which method is used to set the input image, which one for getting the output image? Specifiying the interface solves this problem.

    In fact, the interface thing has nothing to do with plugins. In case of the image filter it's the same for a non-plugin approach. You could write a new class for every image filter, but this won't be useable - instead you make a Filter interface (or a baseclass).
    Last edited by orb9; 27th February 2006 at 14:02.

Similar Threads

  1. Trouble with plugin system's documentation
    By niklas in forum Qt Programming
    Replies: 8
    Last Post: 6th March 2009, 22:07
  2. Plugin implementation question
    By JPNaude in forum Qt Programming
    Replies: 12
    Last Post: 27th August 2008, 20:24
  3. Plugin interfaces, signals and slots
    By QPlace in forum Qt Programming
    Replies: 8
    Last Post: 9th August 2007, 21:19
  4. QVariant and Plugin interfaces
    By QPlace in forum Qt Programming
    Replies: 9
    Last Post: 6th August 2007, 00:04
  5. QPluginLoader not recognizing a plugin
    By KShots in forum Qt Programming
    Replies: 3
    Last Post: 29th June 2007, 14:13

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.