-
Notifications
You must be signed in to change notification settings - Fork 13
Coding your own plugins
If you want to implement your own hash for instance, or a special decoder type, or just a cool parser.
- Having a working Qt development environment
- Having a good basic knowledge on dynamic library development in C/C++
- Using QtCreator makes it easier, but that's ultimately optional. I guess anyone mastering libraries development would only need notepad.
If you are using QtCreator make sure to create a new C++ library project , and not a Qt Plugin project
New File or Project->Libraries->C++ library
The plugin itself is a factory for TransformAbstract objects.
The programme loading the plugin will use the root class (the one the one that implement the TransformFactoryPluginInterface interface) to retrieve instances of transformations objects.
To send error messages to the GUI just use the signals error(message,source) and warning(message,sources) or the Pip3lineCallback object (logError()/logWarning()/logStatus())
The individual panels will only display the last messages but all messages will appears in the logs panel.
You should not delete any TransformAbstract objects yourself, this should done automatically.
The same applies to the GUI configuration objects, Qt guarantee that these will be cleaned automatically whenever the parent GUI object is deleted.
The source code repository contains a ready-to-build example, located in defaultplugins/examplePlugin.
The source is documented, and should not be too difficult to understand.
The gui/command line tool should do most of the hard work for you, as long as you are doing yours well (i.e. cleaning memory, sanitizing any user input ..) there should not be any issue.