Commit 9eb17650 authored by Maxime Perrotin's avatar Maxime Perrotin

Add UserWidgets to give user customisation power

parent a5a6d3a7
# -*- coding: utf-8 -*-
''' User can customise the TASTE auto-generated GUIs using by modifying this
There are two base class: TC and TM
TC correspond to ASN.1 messages sent from the GUI to the application
and TM is the opposite.
Creat subclasses, they will be dynamically loaded and the widget will
be placed in a docking window.
(c) 2016 European Space Agency
Author: Maxime Perrotin
import sys
from PySide.QtCore import (QObject, Signal, Slot, Qt, QRectF, QPointF, QPoint)
from PySide.QtGui import QWidget
__author__ = "Maxime Perrotin"
__license__ = "LGPL"
__version__ = "1.0"
__url__ = ""
#__all__ = ['']
class TM(QWidget):
''' Subclasses of TM will receive ASN.1 data from the GUI whenever a
value is updated (through a Qt slot)
def __init__(self, asn1_type=None, parent=None):
''' Initialisation of the Widget '''
def update(self, value):
''' Receive ASN.1 value - Specify actual type in subclasses (Slot)'''
class TC(QWidget):
''' Subclasses of TC can be used to provide ASN.1 data to the main GUI
and to automatically send it to the application.
Example of uses: Buttons, SQL interface...
Define your widget and send signals at will.
send = Signal()
update = Signal() # User to specify type
def __init__(self, asn1_type=None, parent=None):
''' Initialisation of the Widget '''
if __name__ == '__main__':
print 'This module can only be imported from the main TASTE guis
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment