Difference between revisions of "HowToCreateYourPlugin"

From user's Wiki!
Jump to: navigation, search
(Build your new plugin)
(Create a new widget and a new processor)
Line 43: Line 43:
  
 
{|
 
{|
|[[File: StartNewModuleMyPanelWidget.jpg|300px |StartNewModule fields for new panelwidget|thumb|left]]
+
|[[File: StartNewModuleMyPanelWidget.jpg|400px |StartNewModule fields for new panelwidget|thumb|left]]
 
|}
 
|}
  
Line 55: Line 55:
 
{|
 
{|
 
|[[File: FoldersProcessors.jpg|300px |processors|thumb|upright]]
 
|[[File: FoldersProcessors.jpg|300px |processors|thumb|upright]]
|[[File: FoldersWidgets.jpg|300px |widgets files|thumb|upright]]
+
|[[File: FoldersWidgets.jpg|400px |widgets files|thumb|upright]]
 
|}
 
|}
 
  
 
== Build your new plugin ==
 
== Build your new plugin ==

Revision as of 11:01, 25 February 2011

This section describes how to create a new plugin for GIMIAS. The first time you create a plugin you have at least to create one panel widget in order to be able to use it.

Create Folders and templates

In order to generate the folder structure and the basic files needed for your new plug-in, run the StartNewModule tool from the installation path.

1. Specify the name of your new plugin in the Name field (e.g. MyPlugin)

2. Specify the folder where you want to put your new plugin in the Root field (e.g.MyProject/MyProject_src/plugins)

3. Select GIMIAS Plugin in the Type combo box

4. Specify the Toolkit csn file (e.g. csnMyProjectToolkit.py)

5. Specify the Gimias csn file (e.g. csnMyProject.py)

6. Press the Start New Module button

StartNewModule fields for new plugin

The new plugin folder is created in the specified Root Path and the new plugin is added to the python file csnMyProjectPlugins.py.


Plugin Folder Structure

Create a new widget and a new processor

Use StartNewModule to add a new functionality to your plugin.

1. Specify the name of the new functionality in the Name field (e.g. MyFunctionality)

2. Specify the plugin in which you want to add the new functionality in the Root field (e.g. MyProject/MyProject_src/plugins/MyPlugin)

3. Select GIMIAS Plugin Widget in the Type combo box

4. Press the Start New Module button. A new panel widget and a new processor will be automatically added to the plugin.


StartNewModule fields for new panelwidget


This will create in your plugin folder:

• a new folder containing the new processor

• a new folder containing the new panel widget

processors
widgets files

Build your new plugin

Use CSnake to build the GIMIAS solution containing your new plugin. Open CSnake, specify csnMyProject.py as the source file and generate the new Gimias solution:

1. press Update and select the Instance gimias

2. press Create CMake files and Run CMake

3. press Launch IDE

4. compile Gimias in Visual Studio


CSnake Configuration for your plugin


Next/Previous Steps: