Hi,

On 08/30/2011 03:22 PM, Miri Trope wrote:
Thank you for your answer.
I guess that I need more details:

1) In the MOC_H_FILES (which present in each plugin under files.cmake) should be the headers of each (like I did below) or both plugins ?

a/plugin/my.awesomeproject.exampleplugin/files.cmake
set(MOC_H_FILES
  src/internal/mitkPluginActivator.h
  src/internal/QmitkAwesomeView.h
)

a/plugin/SkullExtraction/files.cmake
set(MOC_H_FILES
  src/internal/mitkPluginActivator.h
  src/internal/QmitkSkullExtractionView.h
)
That looks good. However, I am wondering that your "SkullExtraction" plugin works. Normally, the directory name of the plug-in must match the argument to the PROJECT(...) command in SkullExtraction/CMakeLists.txt ( _ replaced with . ) and it must also follow the plug-in naming convention of your project. In your case, it should be something like my.awesomeproject.skullextreaction.

2) How should I check Q_OBJECT and Q_INTERFACES?

Here is a snapshot of my mitkPluginActivator.h (which is similar for both plugins)

class PluginActivator :
  public QObject, public ctkPluginActivator
{
  Q_OBJECT
  Q_INTERFACES(ctkPluginActivator)

public:

  void start(ctkPluginContext* context);
  void stop(ctkPluginContext* context);

}; // PluginActivator
That looks fine. If you inherit from an interface class (directly or indirectly), you should add the interface type to the Q_INTERFACES macro. You will get an error message if you forget it.

3) Why when I run the application, it's automatically viewing my first plugin (without me pressing on the icon first)?

Because it is part of the applications default perspective. Have a look at http://www.mitk.org/wiki/Article_Using_Perspectives_in_the_Workbench

Any information would be very appreciated!
Miri

Best,
Sascha
------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to