MeVisLab Web Toolkit Reference
Loading...
Searching...
No Matches
Core.py
Go to the documentation of this file.
2
3
7
13 pass
14
15
21 pass
22
23
28 pass
29
30
35 def handleMessage(message):
36 pass
37
38
44 def _setBaseType(type, generationId):
45 pass
46
47
51 def setBaseType(baseType):
52 pass
53
54
55
56
59class BaseFieldHandlerBase:
60
66 def sendBaseFieldMessage(messageClass, data):
67 pass
68
69
73 def handleMessage(message):
74 pass
75
76
77
78
81class BaseFieldHandlerFactory:
82
88 def registerHandler(baseFieldType, handlerClass):
89 pass
90
91
97 def createHandler(baseField):
98 pass
99
100
101
102
104class BaseFieldMessage(RemoteMessage):
105 pass
106
107
108
109
112 pass
113
114
115
116
119 pass
120
121
122
123
126 pass
127
128
129
130
148
151 pass
152
153
156 pass
157
158
162 pass
163
164
168 pass
169
170
177
182 pass
183
184
189 pass
190
191
197 pass
198
199
205 pass
206
207
208
209
211class DoubleField(NumberField):
212 pass
213
214
215
216
219
223 def setItems(items):
224 pass
225
226
230 def items():
231 pass
232
233
237 def setCurrentItem(item):
238 pass
239
240
241
242
244class EnumItem:
245 pass
246
247
248
249
251class Event:
252 pass
253
254
255
256
259 pass
260
261
262
263
273
275 INPUT_FIELD = 1
276
278 OUTPUT_FIELD = 2
279
281 INOUT_FIELD = 3
282
284 NON_PERSISTENT_FIELD = 4
285
287 NON_EDITABLE_FIELD = 8
288
289
291 def setTitle():
292 pass
293
294
296 def title():
297 pass
298
299
307 def setup(name, type, flags, fieldOwner):
308 pass
309
310
314 def getFlags():
315 pass
316
317
321 def isInput():
322 pass
323
324
328 def isOutput():
329 pass
330
331
335 def isInOut():
336 pass
337
338
343 pass
344
345
350 pass
351
352
357 pass
358
359
363 def getType():
364 pass
365
366
370 def getValue():
371 pass
372
373
377 def getName():
378 pass
379
380
385 pass
386
387
392 pass
393
394
397 pass
398
399
402 pass
403
404
407 pass
408
409
412 pass
413
414
417 pass
418
419
422 pass
423
424
427 pass
428
429
432 pass
433
434
437 pass
438
439
442 pass
443
444
447 pass
448
449
452 pass
453
454
461 def addListener(listener):
462 pass
463
464
467 def touch():
468 pass
469
470
475 def setValue(value):
476 pass
477
478
484 pass
485
486
490 pass
491
492
497 pass
498
499
504 pass
505
506
511 pass
512
513
517 def setStringValue(value):
518 pass
519
520
525 pass
526
527
530 pass
531
532
535 pass
536
537
541 def log(message):
542 pass
543
544
548 def logError(erro):
549 pass
550
551
555 def logException(exception):
556 pass
557
558
559
561
562
566 def fieldChanged(field):
567 pass
568
569 #@}
570
571
572
575
578 pass
579
580
581
583
584
589 def resultChanged(boolValue, value, evaluator):
590 pass
591
592 #@}
593
594
595
598 pass
599
600
601
602
606 pass
607
608
609
610
613 pass
614
615
616
617
620 pass
621
622
623
624
627 pass
628
629
630
631
634 pass
635
636
637
638
641 pass
642
643
644
645
648 pass
649
650
651
652
655 pass
656
657
658
659
666
669 pass
670
671
672
673
680
683 pass
684
685
686
687
690 pass
691
692
693
694
697 pass
698
699
700
701
704 pass
705
706
707
708
711 pass
712
713
714
715
718 pass
719
720
721
722
733
738 def setCallback(callback):
739 pass
740
741
751 def log(msg, msgType, msgOrigin, msgLogGroup, msgArguments):
752 pass
753
754
757 pass
758
759
762 pass
763
764
769 def printInBrowserConsole(msgType, arguments):
770 pass
771
772
773
774
779class MCState:
780
782 def run():
783 pass
784
785
792 pass
793
794
799 pass
800
801
806 pass
807
808
814 def _createSubModule(module, subModuleName):
815 pass
816
817
823 def _createFields(module, message):
824 pass
825
826
832 def _lookupField(rawFieldName):
833 pass
834
835
841 def _updateFieldValues(message):
842 pass
843
844
851 pass
852
853
856 pass
857
858
861 pass
862
863
864
865
870class MCStateCreatingModule(MCState):
871
874 pass
875
876
877
878
881class MCStateFailedToCreateModule(MCState):
882
884 def __init__(moduleContext):
885 pass
886
887
888
889
895class MCStateMDLReady(MCState):
896 pass
897
898
899
900
904
906 def __init__(moduleContext):
907 pass
908
909
915 def run(module, message):
916 pass
917
918
921 pass
922
923
926 pass
927
928
929
930
935class MCStateRenderingSlavesActivated(MCState):
936 pass
937
938
939
940
946 pass
947
948
949
950
953 pass
954
955
956
957
961
966 def __init__(name, type):
967 pass
968
969
972 pass
973
974
979 def getFieldByRawName(rawFieldName):
980 pass
981
982
987 pass
988
989
994 pass
995
996
1001 pass
1002
1003
1007 def parent():
1008 pass
1009
1010
1015 def module(moduleName):
1016 pass
1017
1018
1022 def addSubModule(module):
1023 pass
1024
1025
1030 pass
1031
1032
1039 pass
1040
1041
1048 def setWindowController(windowController):
1049 pass
1050
1051
1058 pass
1059
1060
1063 pass
1064
1065
1067 def destroy():
1068 pass
1069
1070
1074 def isWidgetControl(mdlTag):
1075 pass
1076
1077
1082 def control(controlName):
1083 pass
1084
1085
1087 def setWebPlugins(plugins):
1088 pass
1089
1090
1093 pass
1094
1095
1100 pass
1101
1102
1109 def addWindowDefinitions(windowTrees):
1110 pass
1111
1112
1118 def getInputFields(includeSubModuleFields):
1119 pass
1120
1121
1127 def getParameterFields(includeSubModuleFields):
1128 pass
1129
1130
1136 def getOutputFields(includeSubModuleFields):
1137 pass
1138
1139
1145 def _copyFields(dict, fieldDict):
1146 pass
1147
1148
1154 def _getFieldsRecursively(includeInputFields, includeOutputFields, includeParameterFields):
1155 pass
1156
1157
1161 def getName():
1162 pass
1163
1164
1168 def getType():
1169 pass
1170
1171
1176 def createControl(mdlTree):
1177 pass
1178
1179
1186 def sendMessage(message):
1187 pass
1188
1189
1192 pass
1193
1194
1203 def callRemoteFunction(functionName, args, responseHandler):
1204 pass
1205
1206
1215 def sendBaseFieldMessage(field, baseFieldMessageClass, data):
1216 pass
1217
1218
1224 def showDialog(windowName, windowContainer):
1225 pass
1226
1227
1233 def createWindow(windowName, windowContainer):
1234 pass
1235
1236
1242 def createPanel(windowName, windowContainer):
1243 pass
1244
1245
1252 def showPanel(windowName, windowContainer):
1253 pass
1254
1255
1259 def hidePanel(windowName):
1260 pass
1261
1262
1269 def showWindow(windowName, windowContainer):
1270 pass
1271
1272
1276 def hideWindow(windowName):
1277 pass
1278
1279
1284 def getWindow(windowName):
1285 pass
1286
1287
1291 def showIDE():
1292 pass
1293
1294
1304 def _createAndAddField(name, type, flags):
1305 pass
1306
1307
1314 pass
1315
1316
1322 def addInputField(name, type, flags):
1323 pass
1324
1325
1331 def addOutputField(name, type, flags):
1332 pass
1333
1334
1340 def addParameterField(name, type, flags):
1341 pass
1342
1343
1348 pass
1349
1350
1355 pass
1356
1357
1362 pass
1363
1364
1368 def field(fieldName):
1369 pass
1370
1371
1377 pass
1378
1379
1384 def log(message, prefix):
1385 pass
1386
1387
1392 def logError(erro, prefix):
1393 pass
1394
1395
1400 def logException(exception, prefix):
1401 pass
1402
1403
1404
1406
1407
1411 def windowCreated(windowControl):
1412 pass
1413
1414
1418 def windowsExported(windowNames):
1419 pass
1420
1421 #@}
1422
1423
1424
1427 pass
1428
1429
1430
1431
1440
1445 DISCONNECT_BY_SERVER_REJECTION = 1
1446
1452 DISCONNECT_BY_SERVER_CLOSE = 2
1453
1455 NORMAL_CLOSE = 3
1456
1458 WEBSOCKET_CLOSE_REASON_CONNECTION_LIMIT_REACHED = 4503
1459
1461 WEBSOCKET_CLOSE_REASON_INVALID_URL = 4400
1462
1464 WEBSOCKET_CLOSE_REASON_METHOD_NOT_ALLOWED = 4405
1465
1467 WEBSOCKET_CLOSE_REASON_AUTHENTICATION_FAILED = 4403
1468
1470 WEBSOCKET_CLOSE_REASON_SERVER_ERROR = 4500
1471
1473 WEBSOCKET_CLOSE_REASON_UNKNOWN_APPLICATION = 4404
1474
1476 WEBSOCKET_CLOSE_REASON_REQUEST_TIMEOUT = 4408
1477
1479 WEBSOCKET_CLOSE_REASON_AUTHENTICATION_TIMEOUT = 4504
1480
1481
1485 pass
1486
1487
1492 pass
1493
1494
1499 pass
1500
1501
1506 pass
1507
1508
1514 pass
1515
1516
1523 pass
1524
1525
1532 pass
1533
1534
1540 pass
1541
1542
1545 pass
1546
1547
1552 pass
1553
1554
1557 pass
1558
1559
1565 def showIDE():
1566 pass
1567
1568
1575 def authenticate(username, password):
1576 pass
1577
1578
1586 pass
1587
1588
1598 def handleMessage(message):
1599 pass
1600
1601
1606 pass
1607
1608
1614 def openConnection(connectionSettings):
1615 pass
1616
1617
1620 pass
1621
1622
1625 pass
1626
1627
1631 pass
1632
1633
1634
1636
1637
1641 def connected(moduleContext):
1642 pass
1643
1644
1653 def disconnected(moduleContext, reason, details, ev):
1654 pass
1655
1656 #@}
1657
1658
1659
1662 pass
1663
1664
1665
1666
1669 pass
1670
1671
1672
1673
1676 pass
1677
1678
1679
1680
1683 pass
1684
1685
1686
1687
1699
1702 SUCCESS = 0
1703
1706 MODULE_EXISTS_ALREADY = 1
1707
1710 MODULE_IS_UNKNOWN = 2
1711
1714 MODULE_CREATION_FAILED = 3
1715
1719 AUTHENTICATION_FAILED = 4
1720
1721
1722
1725 pass
1726
1727
1728
1729
1731class ModuleProcessInformationMessage(RemoteMessage):
1732 pass
1733
1734
1735
1736
1739 pass
1740
1741
1742
1743
1746 pass
1747
1748
1749
1750
1757
1760 pass
1761
1762
1763
1764
1767 pass
1768
1769
1770
1771
1774 pass
1775
1776
1777
1778
1781 pass
1782
1783
1784
1785
1788 pass
1789
1790
1791
1792
1795 pass
1796
1797
1798
1799
1803
1808 pass
1809
1810
1815 pass
1816
1817
1821 def setMaxValue(value):
1822 pass
1823
1824
1828 def setMinValue(value):
1829 pass
1830
1831
1832
1833
1925class Object:
1926
1929 pass
1930
1931
1937 def blockSignals(blocked):
1938 pass
1939
1940
1945 pass
1946
1947
1952 def registerSignal(signal):
1953 pass
1954
1955
1960 pass
1961
1962
1972 def emit(signal):
1973 pass
1974
1975
1984 def connectSignal(signal, receiver, targetSignal):
1985 pass
1986
1987
1994 def connectCallback(signal, callback):
1995 pass
1996
1997
2003 def disconnectCallback(signal, callback):
2004 pass
2005
2006
2013 def connect(signal, receiver, slot):
2014 pass
2015
2016
2022 def disconnectReceiver(signal, receiver):
2023 pass
2024
2025
2032 def disconnect(signal, receiver, signal):
2033 pass
2034
2035
2036
2037
2039class ParallelResourceLoader(ResourceLoader):
2040
2045 def _resourceLoaded(resource):
2046 pass
2047
2048
2053 pass
2054
2055
2056
2057
2059class RemoteCallInterfaceHandler(BaseFieldHandlerBase):
2060
2064 pass
2065
2066
2069 def call():
2070 pass
2071
2072
2077 def handleMessage(message):
2078 pass
2079
2080
2086 pass
2087
2088
2094 pass
2095
2096
2101 def addInterfaceObject(objectName, object):
2102 pass
2103
2104
2108 def removeInterfaceObject(objectName):
2109 pass
2110
2111
2115 def hasInterfaceObject(objectName):
2116 pass
2117
2118
2119
2120
2123class RemoteManager(Object):
2124
2131 pass
2132
2133
2137 pass
2138
2139
2144 def sendMessage(message):
2145 pass
2146
2147
2154 def sendGenericRequest(functionName, args, responseHandler):
2155 pass
2156
2157
2165 def _requestTimedOut(requestID, functionName, args):
2166 pass
2167
2168
2191 def openConnection(connectionSettings):
2192 pass
2193
2194
2197 pass
2198
2199
2201 def _setup():
2202 pass
2203
2204
2211 pass
2212
2213
2217 pass
2218
2219
2226 def handleMessageReceived(messageEvent):
2227 pass
2228
2229
2232 pass
2233
2234
2237 pass
2238
2239
2243 pass
2244
2245
2250 def log(message, prefix):
2251 pass
2252
2253
2258 def logError(message, prefix):
2259 pass
2260
2261
2266 def logException(exception, prefix):
2267 pass
2268
2269
2270
2272
2273
2278 pass
2279
2280
2285 pass
2286
2287
2291 def connected(ev):
2292 pass
2293
2294
2298 def messageReceived(message):
2299 pass
2300
2301
2306 pass
2307
2308
2311 pass
2312
2313 #@}
2314
2315
2316
2323
2326 pass
2327
2328
2332 def read(stream):
2333 pass
2334
2335
2339 def write(stream):
2340 pass
2341
2342
2345 pass
2346
2347
2348
2349
2351class RemoteRenderingBaseFieldHandler(BaseFieldHandlerBase):
2352
2356 pass
2357
2358
2363 pass
2364
2365
2369 pass
2370
2371
2376 pass
2377
2378
2383 pass
2384
2385
2387 def removeSlave(slave):
2388 pass
2389
2390
2393 pass
2394
2395
2396
2397
2400class RemoteRenderingEventHandler:
2401
2404 pass
2405
2406
2409 pass
2410
2411
2414 pass
2415
2416
2417
2418
2420class RemoteRenderingSlave(RemoteRenderingEventHandler):
2421
2423 pass
2424
2425
2430 pass
2431
2432
2437 pass
2438
2439
2444 def setBaseHandler(baseHandler):
2445 pass
2446
2447
2450 def disable():
2451 pass
2452
2453
2456 pass
2457
2458
2462 def enable():
2463 pass
2464
2465
2468 def remove():
2469 pass
2470
2471
2474 def add():
2475 pass
2476
2477
2482 pass
2483
2484
2485
2486
2508class RenderSettings:
2509
2510 def clone():
2511 pass
2512
2513
2516 pass
2517
2518
2522 pass
2523
2524
2528 pass
2529
2530
2534 pass
2535
2536
2541 pass
2542
2543
2549 pass
2550
2551
2556 pass
2557
2558
2565 pass
2566
2567
2568
2569
2571class RenderingQEventMessage(BaseFieldMessage):
2572 pass
2573
2574
2575
2576
2579 pass
2580
2581
2582
2583
2590
2597
2600 pass
2601
2602
2603
2604
2611
2618
2625
2632
2635
2639 TYPE_EMPTY = 255
2640
2641
2642
2649
2651class RenderingSetCursorShapeMessage(BaseFieldMessage):
2652 pass
2653
2654
2655
2656
2659 pass
2660
2661
2662
2663
2666 pass
2667
2668
2669
2670
2677
2680 pass
2681
2682
2683
2684
2687 pass
2688
2689
2690
2691
2694 pass
2695
2696
2697
2698
2702
2712 def __init__(type, url, attributes, resourcesUrl):
2713 pass
2714
2715
2716
2717
2722class ResourceLoader:
2723
2728 def __init__(resourceList, loadingFinishedCallback):
2729 pass
2730
2731
2736 pass
2737
2738
2739
2740
2743class ResourceManager:
2744
2748 def __init__(resourcesBaseUrl):
2749 pass
2750
2751
2760 def loadResources(scriptModules, cssModules, loadingFinishedCallback, jsLoader, cssLoader):
2761 pass
2762
2763
2764
2765
2773class ResponseHandler:
2774
2780 def __init__(responseHandler, timeoutCallback, remoteManager):
2781 pass
2782
2783
2788 def handleResponse(reply):
2789 pass
2790
2791
2792
2793
2796class ScriptResource(Resource):
2797
2802 def __init__(url, resourcesUrl):
2803 pass
2804
2805
2806
2807
2809class SequentialResourceLoader(ResourceLoader):
2810
2815 def _resourceLoaded(resource):
2816 pass
2817
2818
2819
2820
2822class StringField(Field):
2823 pass
2824
2825
2826
2827
2831
2836 def __init__(url, resourcesUrl):
2837 pass
2838
2839
2840
2841
2844class SystemInfo:
2845
2846 def isIE():
2847 pass
2848
2849
2850 def isEdge():
2851 pass
2852
2853
2857 def isIOS():
2858 pass
2859
2860
2866 pass
2867
2868
2873 def isMacOS():
2874 pass
2875
2876
2881 def isLinux():
2882 pass
2883
2884
2890 pass
2891
2892
2893
2894
2899class TextDataStream:
2900
2903 pass
2904
2905
2910 def escape(s):
2911 pass
2912
2913
2917 def unescape(s):
2918 pass
2919
2920
2921
2922
2928class Timer(Object):
2929
2933 def setSingleShot(isSingleShot):
2934 pass
2935
2936
2940 def setCallback(callback):
2941 pass
2942
2943
2946 pass
2947
2948
2953 pass
2954
2955
2957 def stop():
2958 pass
2959
2960
2962 def start():
2963 pass
2964
2965
2970 pass
2971
2972
2973
2975
2976
2978 def timeout():
2979 pass
2980
2981 #@}
2982
2983
2984
2987 pass
2988
2989
2990
2991
2994 pass
2995
2996
2997
2998
3001 pass
3002
3003
3004
3005
3008 pass
3009
3010
3011
3012
3015 pass
3016
3017
3018
3019
3022 pass
3023
3024
3025
3026
3029
3032 pass
3033
3034
3041 pass
3042
3043
3046 pass
3047
3048
3053 pass
3054
3055
3057 pass
3058
3059
3063def defineClass(className, properties, staticProperties):
3064 pass
3065
3066
3071def deriveClass(className, superClass, properties, staticProperties):
3072 pass
3073
3074
3083def connect(sender, signal, receiver, slot):
3084 pass
3085
3086
3095def disconnect(sender, signal, receiver, slot):
3096 pass
3097
3098
3104 pass
3105
3106
3119 pass
3120
3121
3125def isLetterOrNumber(charCode):
3126 pass
3127
Base class for base field handlers.
Definition Core.py:59
sendBaseFieldMessage(messageClass, data)
Passes the handled field, the message class, and the data to MLAB.Core.Module.sendBaseFieldMessage().
Definition Core.py:66
handleMessage(message)
Handles the given message of the base field.
Definition Core.py:73
registerHandler(baseFieldType, handlerClass)
Registers the class of a base field handler for the given base field type.
Definition Core.py:88
createHandler(baseField)
Creates a base field handler for the type of the given base field and returns it.
Definition Core.py:97
getBaseType()
Returns the type of the current base object.
Definition Core.py:20
handleMessage(message)
Handles base field messages by passing it to the handler.
Definition Core.py:35
_setBaseType(type, generationId)
Sets the base type and calls MLAB.Core.BaseFieldHandlerFactory.createHandler() to create a new handle...
Definition Core.py:44
getHandler()
Returns the handler that handles the messages for this field.
Definition Core.py:27
getGenerationId()
Returns the generation id of this base field.
Definition Core.py:12
setBaseType(baseType)
Sets the base type and calls MLAB.Core.BaseField._setBaseType() with the base object type.
Definition Core.py:51
The settings for the web socket connection.
Definition Core.py:147
getRequestTimeoutInterval()
Returns the request timeout, i.e.
Definition Core.py:204
getWebSocketHostName()
Returns the web socket hostname.
Definition Core.py:150
getApplicationName()
Returns the application name.
Definition Core.py:181
getWebSocketBasePath()
Returns the web socket base path.
Definition Core.py:155
getAuthenticationToken()
Returns the authentication token.
Definition Core.py:188
_getWebSocketPortFromWorkerService()
Retrieves the web socket port from the MeVisLabWorkerService http server.
Definition Core.py:174
getConnectionTimeoutInterval()
Returns the connection timeout, i.e.
Definition Core.py:196
getWebSocketProtocol()
Returns the web socket protocol.
Definition Core.py:167
getWebSocketPort()
Returns the web socket port.
Definition Core.py:161
items()
Returns the enum items.
Definition Core.py:230
setItems(items)
Sets the enum items.
Definition Core.py:223
setCurrentItem(item)
Sets the current enum item.
Definition Core.py:237
addDependencyField()
Adds a dependency field that causes reevaluate.
Definition Core.py:577
resultChanged(boolValue, value, evaluator)
Is emitted if one of the fields used in the expression is touched.
Definition Core.py:589
Attempts to implement the same type conversion logic as QVariant.
Definition Core.py:605
This class is based on the MeVisLab class MLABField.
Definition Core.py:272
touch()
Triggers a notification of all field listeners in JavaScript and in the MeVisLab process on the serve...
Definition Core.py:467
logError(erro)
Logs an error.
Definition Core.py:548
isStringField()
Returns true if this is an MLAB.Core.StringField.
Definition Core.py:441
isBaseField()
Returns true if this is an MLAB.Core.BaseField.
Definition Core.py:396
getName()
Returns the field name.
Definition Core.py:377
_valueFromString()
Converts the given string to the value type.
Definition Core.py:503
isIntegerField()
Returns true if this is an MLAB.Core.IntegerField.
Definition Core.py:426
addListener(listener)
Adds a listener to this field.
Definition Core.py:461
isOutput()
Returns true if this field is an output field.
Definition Core.py:328
isNumberField()
Returns true if this is an MLAB.Core.NumberField derived class.
Definition Core.py:436
title()
Returns the title of the field.
Definition Core.py:296
getType()
Returns the field type.
Definition Core.py:363
isPersistent()
Returns true if this field is persistent.
Definition Core.py:349
_setValueOnClientOnly(value)
Sets the field value and notifies all JavaScript field listeners.
Definition Core.py:483
isEditable()
Returns true if this field is editable.
Definition Core.py:356
isParameterField()
Returns true if this field is a parameter field.
Definition Core.py:342
setValue(value)
Sets the value.
Definition Core.py:475
logException(exception)
Logs an exception.
Definition Core.py:555
getValue()
Returns the field value.
Definition Core.py:370
getFieldOwner()
Returns the field owner.
Definition Core.py:391
setup(name, type, flags, fieldOwner)
Sets the field up.
Definition Core.py:307
isColorField()
Returns true if this is an MLAB.Core.ColorField.
Definition Core.py:406
isTriggerField()
Returns true if this is an MLAB.Core.TriggerField.
Definition Core.py:446
fieldChanged(field)
Is emitted if the field value is changed (or the field is touched).
Definition Core.py:566
lastChangeSerialID()
Get a virtual time stamp when the value was last changed from the client.
Definition Core.py:529
notifyListeners()
Notifies all JavaScript field listeners, but not the field listeners in the MeVisLab process on the s...
Definition Core.py:489
getRawName()
Returns the raw field name, which includes all sub module names.
Definition Core.py:384
isInput()
Returns true if this field is an input field.
Definition Core.py:321
isVectorField()
Returns true if this is an MLAB.Core.VectorField.
Definition Core.py:451
isDoubleField()
Returns true if this is an MLAB.Core.DoubleField.
Definition Core.py:411
isBoolField()
Returns true if this is an MLAB.Core.BoolField.
Definition Core.py:401
isFloatField()
Returns true if this is an MLAB.Core.FloatField.
Definition Core.py:421
stringValue()
Returns the value as string.
Definition Core.py:510
setLastChangeSerialID()
Set the virtual time stamp when the value is changed from the client.
Definition Core.py:534
getFlags()
Returns the flags.
Definition Core.py:314
isInOut()
Returns true if this field is an input and output field.
Definition Core.py:335
isMatrixField()
Returns true if this is an MLAB.Core.MatrixField.
Definition Core.py:431
isEnumField()
Returns true if this is an MLAB.Core.EnumField.
Definition Core.py:416
log(message)
Logs a message.
Definition Core.py:541
setTitle()
Sets the title of the field.
Definition Core.py:291
setStringValueOnClientOnly(value)
Does the same as _setValueOnClientOnly() except that the value is a string.
Definition Core.py:524
_valueToString()
Converts the given value to string.
Definition Core.py:496
setStringValue(value)
Sets the value as string.
Definition Core.py:517
The central logging class.
Definition Core.py:732
isLoggingInBrowserConsole()
Returns if logging into the browser console (https://www.w3schools.com/jsref/obj_console....
Definition Core.py:756
printInBrowserConsole(msgType, arguments)
Calls console.
Definition Core.py:769
setLogInBrowserConsole()
Sets if logging into the browser console (https://www.w3schools.com/jsref/obj_console....
Definition Core.py:761
setCallback(callback)
Definition Core.py:738
log(msg, msgType, msgOrigin, msgLogGroup, msgArguments)
Logs the given message.
Definition Core.py:751
handleMessageAndGetNextState(message)
Definition Core.py:873
__init__(moduleContext)
Creates this module context state.
Definition Core.py:884
This module context state is active when the module was created and authentication was successful.
Definition Core.py:903
__init__(moduleContext)
Creates this module context state.
Definition Core.py:906
handleMessageAndGetNextState(message)
Definition Core.py:925
_setMDLReady()
Performs the transition from this state to MLAB.Core.MCStateMDLReady.
Definition Core.py:920
This module context state is initially active.
Definition Core.py:945
This is the base class for module context states.
Definition Core.py:779
_createSubModule(module, subModuleName)
Creates a MLAB.Core.Module instance with the given name and adds it as sub module to the given module...
Definition Core.py:814
_setKnownWidgetControls()
Sets the known widget controls on the MLAB.Core.ModuleContext.
Definition Core.py:855
_handleBaseFieldMessage(message)
Looks up the target base field on the module and calls handleMessage() with the given message.
Definition Core.py:791
_createFields(module, message)
Creates all MLAB.Core.Field instances from the module info message and adds them to the MLAB....
Definition Core.py:823
_handleGenericRequest(message)
Handles a generic request message.
Definition Core.py:798
_updateFieldMinMaxValues(message)
Updates the fields min/max values from the given message data.
Definition Core.py:850
_lookupField(rawFieldName)
Determines the owning module and looks up the field by the given field name.
Definition Core.py:832
_handleWebSetupMessage()
Handles the WebSetup message.
Definition Core.py:860
run()
This method is called when this is state is made current.
Definition Core.py:782
handleMessageAndGetNextState(message)
Handles the given remote message in the appropriate way for the current state.
Definition Core.py:805
_updateFieldValues(message)
Updates the field values from the given message data.
Definition Core.py:841
The module context is the communication interface between the MLAB.Core.Module, MLAB....
Definition Core.py:1439
sendGenericRequest()
Sends the given generic request to the server.
Definition Core.py:1624
connected(moduleContext)
Is emitted when the connection to the server is established.
Definition Core.py:1641
showIDE()
Send the show IDE request to the MeVisLab process on the server to show the MeVisLab IDE.
Definition Core.py:1565
isModuleReady()
Returns true if the module is ready.
Definition Core.py:1491
sendMessage()
Sends the given message to the server.
Definition Core.py:1619
disconnected(moduleContext, reason, details, ev)
Is emitted when the connection to the server is disconnected.
Definition Core.py:1653
getState()
Returns the current module context state.
Definition Core.py:1551
isBodyVisible()
Returns true if the html body is already visible.
Definition Core.py:1544
handleMessage(message)
Handles the given remote message.
Definition Core.py:1598
openConnection(connectionSettings)
See MLARemoteManager.openConnection().
Definition Core.py:1614
closeConnection()
Closes the web socket connection.
Definition Core.py:1605
setDebugRemoteMessages()
Sets if debugging of sent/received remote messages is enabled.
Definition Core.py:1630
getModule()
Returns the managed module.
Definition Core.py:1556
_setKnownWidgetControls(controls)
Sets the known widget controls.
Definition Core.py:1531
notifyAboutToBeDestroyed()
Must be called when the module is being destroyed.
Definition Core.py:1484
_areKnownWidgetControlsSet()
Returns true if the known widget controls array is not empty.
Definition Core.py:1522
setRenderSettings()
Sets the render settings.
Definition Core.py:1505
isWidgetControl()
Returns true if the given MDL tag is the name of a widget control.
Definition Core.py:1539
authenticate(username, password)
Sends the given credentials as user field and password field values to the server.
Definition Core.py:1575
setBodyIsVisible()
Notifies the module context that the body of the web page is visible.
Definition Core.py:1585
hasModuleReadyMessage()
Returns true if the server sends the module ready message.
Definition Core.py:1498
This message includes the module creation status.
Definition Core.py:1698
The Module class.
Definition Core.py:960
registerFieldListener()
Registers a field listener for the given field.
Definition Core.py:1376
createControl(mdlTree)
Creates a control for the given MDL tree by calling MLABWindowController.createControl().
Definition Core.py:1176
control(controlName)
Returns the first widget control with the given name.
Definition Core.py:1082
getType()
Returns the type of this module.
Definition Core.py:1168
setWindowController(windowController)
Sets the window controller which is responsible for creating widget controls from an MDL tree.
Definition Core.py:1048
parent()
Returns the parent module of this module.
Definition Core.py:1007
windowsExported(windowNames)
Is emitted when the windows definitions have been received by the server.
Definition Core.py:1418
getWindow(windowName)
Returns the window control, or null if it was not found.
Definition Core.py:1284
getFieldByRawName(rawFieldName)
Looks up a field by its raw name, which is the name that includes the sub module names.
Definition Core.py:979
sendBaseFieldMessage(field, baseFieldMessageClass, data)
Creates a base field message using the provided class and data and sends it to the module in the MeVi...
Definition Core.py:1215
addOutputField(name, type, flags)
Creates and adds an output field.
Definition Core.py:1331
_getFieldsRecursively(includeInputFields, includeOutputFields, includeParameterFields)
Collects all fields of the given types recursively from this module and sub modules.
Definition Core.py:1154
addWindowDefinitions(windowTrees)
Adds the MDL tree.
Definition Core.py:1109
getName()
Returns the name of this module.
Definition Core.py:1161
createModuleContext()
Creates a new module context for this module.
Definition Core.py:971
module(moduleName)
Searches for a sub module and returns it if it exists.
Definition Core.py:1015
logException(exception, prefix)
Logs an exception with an optional prefix.
Definition Core.py:1400
applicationModule()
Returns the application module.
Definition Core.py:1000
removeAndDestroySubModule(moduleName)
Removes and destroys the sub module with the given name, if the sub module exists.
Definition Core.py:1029
showPanel(windowName, windowContainer)
Shows the panel.
Definition Core.py:1252
log(message, prefix)
Logs a message with an optional prefix.
Definition Core.py:1384
_createAndAddField(name, type, flags)
Creates a field from the given arguments.
Definition Core.py:1304
sendGenericRequest()
Deprecated.
Definition Core.py:1191
getWindowDefinitions()
Returns the window definitions MDL tree of this module, or null if it was not yet received from the M...
Definition Core.py:1099
callRemoteFunction(functionName, args, responseHandler)
Calls a function on the remote server by sending a generic request via the web socket connection to M...
Definition Core.py:1203
addParameterField(name, type, flags)
Creates and adds a parameter field.
Definition Core.py:1340
getOutputFields(includeSubModuleFields)
Returns the output fields.
Definition Core.py:1136
isWidgetControl(mdlTag)
Returns true if the given MDL tag is a known widget control.
Definition Core.py:1074
sendMessage(message)
Sends the message via the web socket connection to MeVisLab.
Definition Core.py:1186
createWindow(windowName, windowContainer)
Creates a window.
Definition Core.py:1233
isSubModule()
Returns true if this module is a sub module.
Definition Core.py:993
prependQualifiedModuleName()
Returns the name containing all sub modules names.
Definition Core.py:986
fieldValueChanged(field)
Handles field value changes.
Definition Core.py:1354
showDialog(windowName, windowContainer)
Shows a dialog.
Definition Core.py:1224
_removeWindowDefinitionsForSubModule(moduleName)
Removes the window definitions for the given sub module (with dotted submodule name) NOTE: window def...
Definition Core.py:1038
hideWindow(windowName)
Hides the window.
Definition Core.py:1276
showWindow(windowName, windowContainer)
Shows the window.
Definition Core.py:1269
_copyFields(dict, fieldDict)
Helper function for MLAB.Core.Module._getFieldsRecursively().
Definition Core.py:1145
getParameterFields(includeSubModuleFields)
Returns the parameter fields.
Definition Core.py:1127
getModuleContext()
Returns the ModuleContext.
Definition Core.py:1062
field(fieldName)
Returns the field with the given name or null if it does not exist.
Definition Core.py:1368
createBaseFieldHandler(baseField)
Creates a base field handler using the base field handler factory.
Definition Core.py:1313
getInputFields(includeSubModuleFields)
Returns the input fields.
Definition Core.py:1118
createPanel(windowName, windowContainer)
Creates a panel.
Definition Core.py:1242
getRemoteRenderingControl(domElement)
Returns the remote rendering control for the given DOM element.
Definition Core.py:1347
logError(erro, prefix)
Logs an error with an optional prefix.
Definition Core.py:1392
addInputField(name, type, flags)
Creates and adds an input field.
Definition Core.py:1322
setWebPlugins(plugins)
Definition Core.py:1087
destroy()
Destroys this module and all its windows.
Definition Core.py:1067
getWindowController()
Returns the window controller.
Definition Core.py:1057
requestStopProcessing()
Sends a message to the worker that it should stop the current processing.
Definition Core.py:1361
windowCreated(windowControl)
Is emitted if a Window is created.
Definition Core.py:1411
hidePanel(windowName)
Hides the panel.
Definition Core.py:1259
addSubModule(module)
Adds a sub module.
Definition Core.py:1022
The signal "minMaxValueChanged(this)" is emitted when the min/max values are changed from the backend...
Definition Core.py:1802
getMinValue()
Returns the minimum value of this number field.
Definition Core.py:1814
setMaxValue(value)
Sets the maximum value of this number field.
Definition Core.py:1821
setMinValue(value)
Sets the minimum value of this number field.
Definition Core.py:1828
getMaxValue()
Returns the maximum value of this number field.
Definition Core.py:1807
Base class for objects with signals and slots.
Definition Core.py:1925
connectCallback(signal, callback)
Connects a signal of this object to the given callback function.
Definition Core.py:1994
disconnectCallback(signal, callback)
Disconnects a signal of this object from the given callback function.
Definition Core.py:2003
signalsBlocked()
Returns true if signals are blocked.
Definition Core.py:1944
connectSignal(signal, receiver, targetSignal)
Connects a signal of this object to the signal of the receiver, so that if this signal is emitted,...
Definition Core.py:1984
blockSignals(blocked)
Sets if signals are blocked, which means that signals are suppressed in situations where they would h...
Definition Core.py:1937
isSignalRegistered()
Returns true if the given signal is registered.
Definition Core.py:1959
connect(signal, receiver, slot)
Connects a signal of this object to the slot of the receiver.
Definition Core.py:2013
__init__()
Creates a new MLAB.Core.Object.
Definition Core.py:1928
disconnect(signal, receiver, signal)
Disconnects a signal of this object from the slot of the receiver.
Definition Core.py:2032
disconnectReceiver(signal, receiver)
Disconnects a signal of this object from all slots of the receiver.
Definition Core.py:2022
registerSignal(signal)
Registers a signal.
Definition Core.py:1952
emit(signal)
Emits a signal.
Definition Core.py:1972
_resourceLoaded(resource)
Remote the given resource from the list of pending resources and calls the loading finished callback ...
Definition Core.py:2045
loadResources()
Loads all resources.
Definition Core.py:2052
addInterfaceObject(objectName, object)
Adds a local interface object that is available to a remote client under the given objectName.
Definition Core.py:2101
_handleGenericBaseRequest(message)
Handles the given generic base request message.
Definition Core.py:2093
_handleGenericBaseReply(message)
If the given generic base reply message has a valid request id (> 0), then a callback is looked up in...
Definition Core.py:2085
callWithResult()
Calls the given remote method with the given arguments.
Definition Core.py:2063
handleMessage(message)
Handles the given base field message.
Definition Core.py:2077
call()
Calls the given remote method with the given arguments.
Definition Core.py:2069
removeInterfaceObject(objectName)
Removes the local interface object.
Definition Core.py:2108
hasInterfaceObject(objectName)
Returns true if a local interface object was added with the given name, false otherwise.
Definition Core.py:2115
logException(exception, prefix)
Same as logError(), except that an exception instead of an message is expected.
Definition Core.py:2266
_setup()
Creates the web socket and registers callbacks on it.
Definition Core.py:2201
hasModuleReadyMessage()
Returns true if the server supports a module ready message.
Definition Core.py:2136
handleConnected()
This method is called directly after the remote manager is connected and emits the connected signal.
Definition Core.py:2216
handleConnectionError()
The web socket's onerror handler.
Definition Core.py:2236
logError(message, prefix)
Same as log(), except that the message is treated as an error.
Definition Core.py:2258
getRequestTimeoutInterval()
Returns the request timeout, i.e.
Definition Core.py:2130
_handleMessage()
Handle a received message.
Definition Core.py:2231
disconnected(ev)
Is emitted from the onclose method of the WebSocket.
Definition Core.py:2284
connectionError(ev)
Is emitted from the onerror method of the WebSocket.
Definition Core.py:2305
sendGenericRequest(functionName, args, responseHandler)
Calls the script function named by functionName on the application module.
Definition Core.py:2154
_requestTimedOut(requestID, functionName, args)
This method is used as a callback when waiting for a response times out.
Definition Core.py:2165
log(message, prefix)
Sends the given log message to the MeVisLab process.
Definition Core.py:2250
handleMessageReceived(messageEvent)
This method is used as the web socket onmessage callback.
Definition Core.py:2226
requestTimeout(info)
Is emitted if a request didn't receive a response in time.
Definition Core.py:2277
sendMessage(message)
Sends the given message to the connected MeVisLab process via the web socket.
Definition Core.py:2144
handleDisconnected()
This method is called directly after the remote manager is disconnected and emits the disconnected si...
Definition Core.py:2210
connected(ev)
Is emitted from the onopen method of the WebSocket.
Definition Core.py:2291
openConnection(connectionSettings)
Establishes the web socket connection to MeVisLab on the server.
Definition Core.py:2191
messageReceived(message)
Is emitted when a message is received.
Definition Core.py:2298
connectionTimeout()
Is emitted when no message was received from the server for some time.
Definition Core.py:2310
handleConnectionTimeout()
Called when no messages were received from the server for some time.
Definition Core.py:2242
closeConnection()
Closes the web socket connection.
Definition Core.py:2196
This is the base class for messages that are sent and received via a web socket to and from a MeVisLa...
Definition Core.py:2322
isBaseFieldMessage()
Returns true if this is a base field message, i.e.
Definition Core.py:2325
typeName()
Returns the type name of the message.
Definition Core.py:2344
write(stream)
Writes the message to the data stream.
Definition Core.py:2339
read(stream)
Reads the message from the data stream.
Definition Core.py:2332
addRenderingSlaves()
Adds rendering slaves to the rendering process.
Definition Core.py:2392
getRenderSettings()
returns the current render settings, which initially are a copy of the global render settings.
Definition Core.py:2362
sendRenderSettings()
sends the current rendersettings to the MeVisLab remote rendering
Definition Core.py:2355
setEnableSmoothPlayback()
Enables/disables the smooth playback mode, which is useful for streaming cine mode like movies.
Definition Core.py:2368
setFramesPerSecond()
Specify the desired maximum playback speed in frames per second.
Definition Core.py:2375
setEnableStats()
Enables/disables the display of a few rendering statistics (e.g.
Definition Core.py:2382
handleMouseEvent()
Handles the given MLAB.Core.MouseEvent.
Definition Core.py:2413
handleWheelEvent()
Handles the given MLAB.Core.WheelEvent.
Definition Core.py:2408
handleKeyEvent()
Handles the given MLAB.Core.KeyEvent.
Definition Core.py:2403
getImageMimeType()
Returns the image mime type for the given image type.
Definition Core.py:2481
add()
Adds this remote rendering slave by sending first a MLAB.Core.RenderingSlaveAddedMessage.
Definition Core.py:2474
disable()
Disables this slave.
Definition Core.py:2450
setEnableStats()
Enables/disables the display of a few rendering statistics (e.g.
Definition Core.py:2436
setEnableSmoothPlayback()
Enables/disables the smooth playback mode, which is useful for streaming cine mode like movies.
Definition Core.py:2422
remove()
Removes this slave by first sending a MLAB.Core.RenderingRenderStopStreamingMessage if streaming is e...
Definition Core.py:2468
enable()
Enables this slave.
Definition Core.py:2462
setFramesPerSecond()
Specify the desired maximum playback speed in frames per second.
Definition Core.py:2429
setBaseHandler(baseHandler)
Sets the remote rendering base handler.
Definition Core.py:2444
isStreamingEnabled()
Returns if streaming is enabled or disabled.
Definition Core.py:2548
doesSupportHiDPI()
Returns if high dpi displays are supported.
Definition Core.py:2564
setSupportHiDPI(A)
Enables or disables support for HiDPI displays.
Definition Core.py:2555
getProperty()
Returns the given property, see constructor for available properties.
Definition Core.py:2527
setProperty()
Sets the given property, see constructor for available properties.
Definition Core.py:2521
clone()
Clones the RenderSettings.
Definition Core.py:2510
setStreamingEnabled(A)
Enables or disables streaming.
Definition Core.py:2540
getSettingsDictionary()
Get the settings dictionary for sending the message to MeVisLab.
Definition Core.py:2533
This class loads resources by creating and appending DOM nodes to the HTML header.
Definition Core.py:2722
__init__(resourceList, loadingFinishedCallback)
Creates a new MLAB.Core.ResourceLoader.
Definition Core.py:2728
loadResources()
Loads all resources.
Definition Core.py:2735
__init__(resourcesBaseUrl)
Creates a new MLAB.Core.ResourceManager.
Definition Core.py:2748
loadResources(scriptModules, cssModules, loadingFinishedCallback, jsLoader, cssLoader)
Loads the given scripts and css files.
Definition Core.py:2760
Base class for resources.
Definition Core.py:2701
__init__(type, url, attributes, resourcesUrl)
Creates a new MLAB.Core.Resource.
Definition Core.py:2712
handleResponse(reply)
Clears the timeout timer and calls the responser handler callback with the given arguments.
Definition Core.py:2788
__init__(responseHandler, timeoutCallback, remoteManager)
Creates a new MLAB.Core.ResponseHandler.
Definition Core.py:2780
__init__(url, resourcesUrl)
Creates a new MLAB.Core.ScriptResource.
Definition Core.py:2802
_resourceLoaded(resource)
Remote the given resource from the list of pending resources and calls the loading finished callback ...
Definition Core.py:2815
Resource class for css files.
Definition Core.py:2830
__init__(url, resourcesUrl)
Creates a new MLAB.Core.StyleResource.
Definition Core.py:2836
isIOS()
Returns true if the system is an IOS device by checking if one of these strings is found in the user ...
Definition Core.py:2857
isLinux()
Returns true if the platform is Linux by checking if the string "Linux" is found in the navigator pla...
Definition Core.py:2881
isAndroid()
Returns true if the system is an android device by checking if the string "android" is found in the u...
Definition Core.py:2865
isWindows()
Returns true if the platform is Windows by checking if the string "Win" is found in the navigator pla...
Definition Core.py:2889
isMacOS()
Returns true if the platform is MacOS by checking if the string "Mac" is found in the navigator platf...
Definition Core.py:2873
isIE()
Check if the browser is Microsoft Internet Explorer.
Definition Core.py:2846
isEdge()
Check if the browser is Microsoft Edge.
Definition Core.py:2850
unescape(s)
Unescapes the given string.
Definition Core.py:2917
serialize()
Serializes this message into a string and returns it.
Definition Core.py:2902
escape(s)
Escapes the given string, so that it can be safely passed as base64 encoded string through a web sock...
Definition Core.py:2910
getIntervalCount()
Returns how many times the interval has been elapsed/how many times the timer has already fired.
Definition Core.py:2969
setSingleShot(isSingleShot)
Sets if this timer fires only once after the specified interval has been elapsed.
Definition Core.py:2933
start()
Starts the timer.
Definition Core.py:2962
isActive()
Returns if the timer is active.
Definition Core.py:2952
stop()
Stops the timer.
Definition Core.py:2957
setCallback(callback)
Sets a callback function to be called when the timer fires.
Definition Core.py:2940
setInterval()
Sets the timer interval in miliseconds.
Definition Core.py:2945
timeout()
Is emitted when the timer fires.
Definition Core.py:2978
setFocusRemoteRenderingOnMouseOverEnabled(enabled)
Sets if remote rendering controls should get the focus on mouseover events and loses focus on mouseou...
Definition Core.py:3040
getCurrentEventTarget()
Returns the widget that received the last mouse event.
Definition Core.py:3045
showIDE()
Shows the MeVisLab IDE on the server for this module.
Definition Core.py:1291
getRenderSettings()
Returns the render quality settings.
Definition Core.py:1513
isLetterOrNumber(charCode)
TODO: This function handles only ASCII!
Definition Core.py:3125
getMessageTypeName(msgType)
Map message type numbers to readable names.
Definition Core.py:3103
getName()
Definition Core.py:3056
notifyModuleRequiresAuthentication(statusCode)
Calls MLAB.Core.emitModuleReady() with the given status code as argument.
Definition Core.py:3052
defineClass(className, properties, staticProperties)
Definition Core.py:3063
connect(sender, signal, receiver, slot)
Connects a signal of the sender to the slots of the receiver.
Definition Core.py:3083
translatePath(path)
Translates a path beginning with a package variable $(MLAB_Xxxx_Yyyy) to an url beginning with MLAB_R...
Definition Core.py:3118
disconnect(sender, signal, receiver, slot)
Disconnects a signal of the sender from the slot of the receiver.
Definition Core.py:3095
deriveClass(className, superClass, properties, staticProperties)
Definition Core.py:3071