Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
asn1-value-editor
Commits
d8ec099d
Commit
d8ec099d
authored
Mar 17, 2016
by
Maxime Perrotin
Browse files
Update the SQL interface
parent
0a95a46d
Changes
2
Hide whitespace changes
Inline
Side-by-side
asn1_value_editor/UserWidgets.py
View file @
d8ec099d
...
...
@@ -70,7 +70,7 @@ class SQLTelecommands(TC):
''' Handle Postgresql databases for telecommands '''
name
=
'Get from db'
def
__init__
(
self
,
parent
=
None
):
def
__init__
(
self
,
parent
=
None
,
asn1_typename
):
''' Initialise the widget '''
# to do here = create a table widget, and place all the entries
# of the given ASN.1 type
...
...
@@ -82,7 +82,11 @@ class SQLTelecommands(TC):
'''' check if there is a sql_db directory, return False otherwise '''
return
True
def
sql2asn1
(
self
,
lineNb
):
def
getPageIndexes
(
self
,
offset
,
number
):
# Thanasssis, please fill this one
pass
def
sql2asn1
(
self
,
idx
):
''' Thanassis: please retrieve the db entry for index "lineNb"
and convert it to an ASN.1 native type '''
pass
...
...
@@ -127,6 +131,7 @@ class SQLTelemetries(TM):
@
staticmethod
def
applicable
():
'''' check if there is a sql_db directory, return False otherwise '''
# Thanassis, please fill
return
True
if
__name__
==
'__main__'
:
...
...
asn1_value_editor/gui.py
View file @
d8ec099d
...
...
@@ -40,7 +40,7 @@ log.addHandler(handler_console)
from
ColorFormatter
import
ColorFormatter
from
asn1_value_editor
import
asn1Editor
,
asn1Viewer
,
__version__
,
UserWidgets
from
asn1_value_editor
import
asn1Editor
,
asn1Viewer
,
__version__
from
plotmanager
import
PlotManager
import
vn
...
...
@@ -71,7 +71,8 @@ from sdlHandler import sdlHandler
from
PySide.QtCore
import
QThread
,
QFile
,
Qt
,
Signal
,
QObject
from
PySide.QtGui
import
(
QApplication
,
QStatusBar
,
QLabel
,
QWidget
,
QListWidget
,
QPushButton
,
QDockWidget
,
QTabWidget
,
QMenu
,
QAction
)
QListWidget
,
QPushButton
,
QDockWidget
,
QTabWidget
,
QMenu
,
QAction
,
QComboBox
)
from
PySide.QtUiTools
import
QUiLoader
...
...
@@ -398,12 +399,12 @@ def gui():
# retrieve user widgets for TM and TC
customTC
,
customTM
=
[],
[]
for
each
in
UserWidgets
.
__all__
:
widget
=
getattr
(
UserWidget
,
each
)
if
widget
.
__base__
==
UserWidget
.
TC
:
customTC
.
append
(
widget
)
elif
widget
.
__base__
==
UserWidget
.
TM
:
customTM
.
append
(
widget
)
#
for each in UserWidgets.__all__:
#
widget = getattr(UserWidget, each)
#
if widget.__base__ == UserWidget.TC:
#
customTC.append(widget)
#
elif widget.__base__ == UserWidget.TM:
#
customTM.append(widget)
if
isinstance
(
editor
,
asn1Viewer
):
# TM Viewer
hasTM
=
True
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment