Difference between revisions of "Sednterp User Modules"

From Sednterp
Jump to: navigation, search
Line 68: Line 68:
 
'''jqplot'''
 
'''jqplot'''
  
:jqplot is a JavaScript library that is available for use with Sednterp for creating graphs, chart, etc, it also automatically provided in both Sednterp web and desktop applications to learn more about how to use it visit [http://www.jqplot.com/ for more.]
+
:jqplot is a JavaScript library that is available for use with Sednterp for creating graphs, chart, etc, it also automatically provided in both Sednterp web and desktop applications to learn about how to use it visit [http://www.jqplot.com/ for more.]

Revision as of 21:32, 23 August 2012

Sednterp Web and Desktop can load user created modules, written in HTML and Javascript. Both Sednterp Web and Desktop provide an editable display which the user has complete control of and platform tools to help create the module in the form of developer tools. The Sednterp distribution comes with an example module which can be edited so users can use it as a base to create their own modules.

This page shall provide documentation on how to create a user module from scratch.

The basic underlying tool you will need to know is JavaScript, you should not need to be an expert but some underlying fundamentals should be enough to create your own module.

First to create your own module you will need to place it in modules/QtScript under where you have Sednterp installed on your system. If you used the windows installer to install Sednterp you will most likely be able to find it in C:\Program Files\Sednterp

Therefore you should be saving your created modules in C:\Program Files\Sednterp\modules\QtScript

Your module file will be broken up into two parts JavaScript and HTML for the UI.

Part one: JavaScript

Your JavaScript will need to include the following 6 different functions
 /* Required Accessor Functions */
 function getModuleName()
 {
   return "MainScreen";
 }
 function getModuleVersion()
 {
   return "20120604";
 }
 function getModuleInteractionXml()
 {
   return "No Interactions";
 }
 function getModuleDate()
 {
   return "2010/06/22";
 }
 function getModuleUI()
 {
   return "qt_sednterp.ui";
 }
 function getModuleHTMLUI()
 {
   return "./modules/QtScript/module1.html";
 }

This is all you should need for Sednterp to recognize your module and try load it.

Part two: HTML UI

The HTML should be standard HTML it can include script in the head of the document and can be created any way you want for example you could create it using dreamweaver or many of the other tools out there to create HTML files. For the purpose of this tutorial I will show you how to do it with such tools.


Sednterp Developer Tools:

Developer tools are provided in the Sednterp Desktop application automatically, similar functionality maybe offer in Sednterp Web application but this would depend on the browser you employ to view the web version, therefore I will only discuss the developer tools that come with desktop application.
Load a your user module and right click on the module display like so and click "Inspect", you should see the following dialog appear. If you are familiar with the developer tools offered with google chrome this dialog should look familiar.

How to Access the Sednterp Database:


Module Window Graphics options:


jQuery:

jQuery is a JavaScript library that is available for use with Sednterp, you do not need to include it in your HTML UI file, actually it is recomended that you do not because A: it will most likely not load properly on the web version, B: it will be just another file you will have have to keep track of with your module if you link it locally, C: because it is already provided for use.

jqplot

jqplot is a JavaScript library that is available for use with Sednterp for creating graphs, chart, etc, it also automatically provided in both Sednterp web and desktop applications to learn about how to use it visit for more.