MeVisLab Web Toolkit Reference
Loading...
Searching...
No Matches
GUI.py
Go to the documentation of this file.
3HORIZONTAL = 0
4
6VERTICAL = 1
7
8
9
10
27
31 def setClientSettings(clientSettings):
32 pass
33
34
35 def showError():
36 pass
37
38
42 pass
43
44
50 def initialize(args):
51 pass
52
53
57 pass
58
59
61 pass
62
63
77 pass
78
79
92 pass
93
94
106 pass
107
108
122 pass
123
124
138 pass
139
140
145 pass
146
147
150 pass
151
152
159 def enableLeaveCurrentPageConfirmationDialog(message, conditionalCallback):
160 pass
161
162
164 def shutdown():
165 pass
166
167
169 pass
170
171
178 def createModule(moduleType, moduleName, moduleIsReadyCallback, connectionSettings):
179 pass
180
181
187 def module(moduleName):
188 pass
189
190
193 def modules():
194 pass
195
196
206 def createBrowserWindow(windowName, windowTitle, specs):
207 pass
208
209
214 def getBrowserWindow(windowName):
215 pass
216
217
222 def closeBrowserWindow(windowName):
223 pass
224
225
226
228
229
232 pass
233
234
237 pass
238
239
243 def moduleWindowCreated(windowControl):
244 pass
245
246
249 pass
250
251
254 pass
255
256
259 pass
260
261 #@}
262
263
264
267 pass
268
269
270
271
274
279 pass
280
281
290 pass
291
292
297 pass
298
299
300
301
303class AuthenticationManager(MLAB.Core.Object):
304
309 pass
310
311
316 def setAuthentication(username, password):
317 pass
318
319
322 pass
323
324
331
338
340 pass
341
342
347 pass
348
349
350
351
354class BaseBoxControl(WidgetControl):
355 pass
356
357
358
359
362class Box(Widget):
363 pass
364
365
366
367
371 pass
372
373
374
375
379
385 def setUnchecksOnClick(unchecksOnClick):
386 pass
387
388
389
390
393class ButtonBoxControl(BaseBoxControl):
394 pass
395
396
397
398
402 pass
403
404
405
406
410 pass
411
412
413
414
418 pass
419
420
421
422
426 pass
427
428
429
430
434 pass
435
436
437
438
442 pass
443
444
445
446
450 pass
451
452
453
454
458 pass
459
460
461
462
465 pass
466
467
468
469
482
484class CommonButtonGroupItem(MLAB.Core.Object):
485 pass
486
487
488
489
492 pass
493
494
495
496
500
503 pass
504
505
506
507
510class DateTimeControl(WidgetControl):
511 pass
512
513
514
515
518 pass
519
520
521
522
526 pass
527
528
529
530
534 pass
535
536
537
538
542 pass
543
544
545
546
550 pass
551
552
553
554
558 pass
559
560
561
562
566 pass
567
568
569
570
578
582 pass
583
584
585
586
590 pass
591
592
593
594
598 pass
599
600
601
602
605 pass
606
607
608
609
612 pass
613
614
615
616
619 pass
620
621
622
623
627 pass
628
629
630
631
635 pass
636
637
638
639
646
650 pass
651
652
653
654
657 pass
658
659
660
661
664 pass
665
666
667
668
671 pass
672
673
674
675
678 pass
679
680
681
682
685 pass
686
687
688
689
693 pass
694
695
696
697
701 pass
702
703
704
705
709
713 pass
714
715
718 pass
719
720
721
722
725class LineEditControl(WidgetControl):
726 pass
727
728
729
730
733
735
736
739 pass
740
741 #@}
742
743
744
747
752 pass
753
754
763 pass
764
765
771 pass
772
773
776 pass
777
778
784 pass
785
786
794 def _handleModuleContextReady(moduleContext, moduleCreationStatus):
795 pass
796
797
799 pass
800
801
803 pass
804
805
807 pass
808
809
814 pass
815
816
822 def getModule(moduleName):
823 pass
824
825
828 pass
829
830
833 pass
834
835
837 def showIDEs():
838 pass
839
840
841
842
845class NumberEdit(Widget):
846
850 pass
851
852
855 pass
856
857
865 pass
866
867
868
869
872class NumberEditControl(WidgetControl):
873 pass
874
875
876
877
880 pass
881
882
883
884
888 pass
889
890
891
892
896
901 def appendToDOM(domParent):
902 pass
903
904
905
906
908class PluginBase(MLAB.Core.Object):
909
913 def module():
914 pass
915
916
921 pass
922
923
927 def loadStyles(finishedLoadingCallback):
928 pass
929
930
931
932
935class ProgressBar(Widget):
936 pass
937
938
939
940
944 pass
945
946
947
948
955
958 pass
959
960
961
962
965
970 pass
971
972
976 def getSlave():
977 pass
978
979
984 pass
985
986
991 def resizeViewport(w, h):
992 pass
993
994
1000 pass
1001
1002
1006 def setSizeHint(sizeHint):
1007 pass
1008
1009
1013 pass
1014
1015
1020 pass
1021
1022
1027 pass
1028
1029
1034 pass
1035
1036
1041 pass
1042
1043
1048 pass
1049
1050
1055 pass
1056
1057
1062 pass
1063
1064
1066 def destroy():
1067 pass
1068
1069
1073 pass
1074
1075
1080 pass
1081
1082
1086 pass
1087
1088
1089
1091
1092
1096 def metaInformationChanged(metaInformation):
1097 pass
1098
1099 #@}
1100
1101
1102
1106
1108
1109
1113 def viewerRepainted(metaInformation):
1114 pass
1115
1116
1121 pass
1122
1123 #@}
1124
1125
1126
1132
1137 pass
1138
1139
1144 pass
1145
1146
1153 def resizeViewport(w, h, deviceWidth, deviceHeight):
1154 pass
1155
1156
1162 pass
1163
1164
1168 def setSizeHint(sizeHint):
1169 pass
1170
1171
1175 pass
1176
1177
1182 pass
1183
1184
1189 pass
1190
1191
1196 pass
1197
1198
1203 pass
1204
1205
1210 pass
1211
1212
1217 pass
1218
1219
1225 pass
1226
1227
1230 pass
1231
1232
1233
1235
1236
1241 def viewportSizeChanged(width, height):
1242 pass
1243
1244 #@}
1245
1246
1247
1251 pass
1252
1253
1254
1255
1259 pass
1260
1261
1262
1263
1267 pass
1268
1269
1270
1271
1275 pass
1276
1277
1278
1279
1283 pass
1284
1285
1286
1287
1291 pass
1292
1293
1294
1295
1299 pass
1300
1301
1302
1303
1307 pass
1308
1309
1310
1311
1315 pass
1316
1317
1318
1319
1323 pass
1324
1325
1326
1327
1331 pass
1332
1333
1334
1335
1339 pass
1340
1341
1342
1343
1347 pass
1348
1349
1350
1351
1355 pass
1356
1357
1358
1359
1363 pass
1364
1365
1366
1367
1370 pass
1371
1372
1373
1374
1378 pass
1379
1380
1381
1382
1386 pass
1387
1388
1389
1390
1393 pass
1394
1395
1396
1397
1401 pass
1402
1403
1404
1405
1409 pass
1410
1411
1412
1413
1417 pass
1418
1419
1420
1421
1425 pass
1426
1427
1428
1429
1437
1443
1447 pass
1448
1449
1453 pass
1454
1455
1459 pass
1460
1461
1462
1463
1467class WidgetControl(WidgetControlModuleInterface):
1468
1473 def __init__(mdlTree, module):
1474 pass
1475
1476
1481 def destroy():
1482 pass
1483
1484
1488 def getName():
1489 pass
1490
1491
1496 pass
1497
1498
1499
1500
1502class WidgetControlFactory:
1503 pass
1504
1505
1506
1507
1512
1517 pass
1518
1519
1524 pass
1525
1526
1530 def createSubControl(mdlTree):
1531 pass
1532
1533
1537 def log(message):
1538 pass
1539
1540
1544 def logError(error):
1545 pass
1546
1547
1551 def logException(exception):
1552 pass
1553
1554
1559 pass
1560
1561
1566 def field(fieldName):
1567 pass
1568
1569
1575 def sendBaseFieldMessage(baseFieldMessageClass, data):
1576 pass
1577
1578
1583 def sendGenericRequest(request, args):
1584 pass
1585
1586
1590 def sendMessage(message):
1591 pass
1592
1593
1594
1595
1597class WidgetFactory:
1598 pass
1599
1600
1601
1602
1606 pass
1607
1608
1609
1610
1615
1618 pass
1619
1620
1625 def control(controlName):
1626 pass
1627
1628
1634 pass
1635
1636
1637
1639
1640
1644 def windowCreated(windowControl):
1645 pass
1646
1647 #@}
1648
1650 pass
1651
1652
1658def setDOMElementEnabled(domElement, enabled):
1659 pass
1660
1661
1672def setDOMElementVisible(domElement, visible):
1673 pass
1674
1675
1680 pass
1681
1682
1687 pass
1688
1689
1695def hasStyleSheetClass(domElement, styleSheetClass):
1696 pass
1697
1698
1705def addStyleSheetClass(domElement, styleSheetClass):
1706 pass
1707
1708
1714def removeStyleSheetClass(domElement, styleSheetClass):
1715 pass
1716
1717
1722def removeStyleProperty(domElement, property):
1723 pass
1724
1725
1730def getGlobalPosition(domElement):
1731 pass
1732
1733
1738def getDOMWindow(domElement):
1739 pass
1740
1741
1746def blurElement(domElement):
1747 pass
1748
Base class for objects with signals and slots.
Definition Core.py:1925
__init__()
Creates a new MLAB.Core.Object.
Definition Core.py:1928
getCursorURL()
Returns the url to a cursor file, the location might be configurable in future.
Definition GUI.py:296
getURLToMLABRoot()
Returns the url to MLAB_ROOT.
Definition GUI.py:289
The application class manages the steps to create the web application.
Definition GUI.py:26
showError()
Displays an error as an alert.
Definition GUI.py:35
moduleWindowCreated(windowControl)
Is emitted when a module panel is created.
Definition GUI.py:243
createModule(moduleType, moduleName, moduleIsReadyCallback, connectionSettings)
Creates a new module.
Definition GUI.py:178
closeBrowserWindow(windowName)
Closes a window that was created by MLAB.GUI.Application.createBrowserWindow().
Definition GUI.py:222
createBrowserWindow(windowName, windowTitle, specs)
Creates a new browser window with the given name, title, and specifications.
Definition GUI.py:206
getArguments()
Returns the application arguments, which may be specified as url arguments or as attributes of the ar...
Definition GUI.py:41
modules()
Returns all parent modules that are created.
Definition GUI.py:193
setRequestTimeoutHandler(handler)
Sets the request timeout handler.
Definition GUI.py:137
setDisconnectedHandler(handler)
Sets the disconnected handler.
Definition GUI.py:121
modulesAreReady()
Is emitted immediately when the module objects are fully initialized.
Definition GUI.py:258
_notifyModulesAreReady(modules)
Definition GUI.py:149
module(moduleName)
Returns the module by the given name.
Definition GUI.py:187
allPluginsLoaded()
Is emitted when all plugins have been loaded.
Definition GUI.py:253
_createModuleContextCreator()
Definition GUI.py:60
_allPluginsLoaded()
This is called when all plugins have been loaded.
Definition GUI.py:144
hideLoadDialog()
Is emitted when a load dialog should be hidden again.
Definition GUI.py:236
showLoadDialog()
Is emitted when a load dialog should be shown.
Definition GUI.py:231
enableLeaveCurrentPageConfirmationDialog(message, conditionalCallback)
Registers a handler for the beforeunload event that may cause a confirmation dialog to popup.
Definition GUI.py:159
_handleCoreModulesLoaded()
This is called after the core modules (core and gui) have been loaded.
Definition GUI.py:56
getBrowserWindow(windowName)
Returns a window that was created by MLAB.GUI.Application.createBrowserWindow().
Definition GUI.py:214
setConnectionErrorHandler(handler)
Sets the connection error handler.
Definition GUI.py:76
setConnectedHandler(handler)
Sets the connected handler.
Definition GUI.py:105
shutdown()
Shuts the application down by disconnecting all module contexts and closing all browser windows.
Definition GUI.py:164
setConnectionTimeoutHandler(handler)
Sets the connection timeout handler.
Definition GUI.py:91
creatingModuleContexts()
Is emitted immediately before the module contexts are created.
Definition GUI.py:248
setClientSettings(clientSettings)
Sets the settings from the client which should be passed to the remote worker process.
Definition GUI.py:31
initialize(args)
Initializes the global application instance.
Definition GUI.py:50
getUnauthenticatedModuleContexts()
Returns all unauthenticated module context.
Definition GUI.py:335
hasAnyUnauthenticatedModuleContext()
Returns true if at least one unauthenticated module context exists.
Definition GUI.py:328
setAuthentication(username, password)
Sets the authentication data.
Definition GUI.py:316
requestAuthentication()
Asks the user for a user name and password to be passed as authentication to the modules.
Definition GUI.py:346
addUnauthenticatedModuleContext(moduleContext)
Definition GUI.py:321
getAuthentication()
Returns the authentication data.
Definition GUI.py:308
setUnchecksOnClick(unchecksOnClick)
Sets if the button is unchecked when it is clicked and checked.
Definition GUI.py:385
checkableButtonsDefault()
Returns true if buttons are checkable by default or not.
Definition GUI.py:477
setEditable()
Set whether the date input is editable.
Definition GUI.py:502
HTML container for the items.
Definition GUI.py:604
Item container inside ItemView.
Definition GUI.py:684
isReturnPressed()
Returns true when the return key is pressed.
Definition GUI.py:712
setEditable()
Set whether the text is editable.
Definition GUI.py:717
layoutChanged()
Is emitted whenever the layout of the table has changed.
Definition GUI.py:738
_createModuleContext(data)
This method creates an MLAB.Core.ModuleContext instance.
Definition GUI.py:762
hasAnyModule()
Returns true if any module was created.
Definition GUI.py:751
getMeVisLabData()
Returns custom data attributes with the given tag name.
Definition GUI.py:775
getModules()
Returns all top level modules.
Definition GUI.py:813
_parseAttributeData()
Returns an object with the attributes given in the argument string.
Definition GUI.py:770
notifyBodyIsVisible()
Calls MLAB.Core.Module.setBodyIsVisible() on each module.
Definition GUI.py:832
showIDEs()
Calls MLAB.Core.Module.showIDE() on each module.
Definition GUI.py:837
_handleModuleContextReady(moduleContext, moduleCreationStatus)
This method is passed as a callback to MLAB.Core.ModuleContext.setModuleContextReadyCallback().
Definition GUI.py:794
createModuleContexts()
Collects all DOM elements that have the "data-mevislab-create-macro" attribute and creates module con...
Definition GUI.py:783
disconnectModules()
Calls MLAB.Core.Module.closeConnection() for each module.
Definition GUI.py:827
getModule(moduleName)
Returns the module by the given name.
Definition GUI.py:822
isReturnPressed()
Returns true when the return key is pressed.
Definition GUI.py:849
setEditable()
Set whether the text is editable.
Definition GUI.py:854
_updateValue()
Reads the input value and validates it, if a validator is available.
Definition GUI.py:864
appendToDOM(domParent)
Called when this panel is top level, otherwise setupChildren() and setupFinished() are called from ML...
Definition GUI.py:901
loadStyles(finishedLoadingCallback)
Loads all resources and calls setup() and the given callback function when all resources have finishe...
Definition GUI.py:927
module()
Returns the module that loaded this plugin.
Definition GUI.py:913
resourcesBaseUrl()
Returns the resources base URL.
Definition GUI.py:920
setupTypicalTags()
Reimplements MLAB.GUI.WidgetControl.setupTypicalTags() to check if a fixed size is given.
Definition GUI.py:1061
metaInformationChanged(metaInformation)
Is emitted whenever new image meta information is received from the server.
Definition GUI.py:1096
setSizeHint(sizeHint)
Sets the size hint for the viewport.
Definition GUI.py:1006
slaveWasAdded()
Called from the slave when it is added.
Definition GUI.py:969
useSizeHintHeight()
Returns true if the height of the size hint should be used.
Definition GUI.py:1054
getMinimumSize()
Returns the minimum size of the viewport.
Definition GUI.py:1040
resizeViewportToSizeHint()
This method resizes the viewport to the size hint, or the viewport size if the size hint is invalid.
Definition GUI.py:1012
useSizeHintWidth()
Returns true if the width of the size hint should be used.
Definition GUI.py:1047
setMinimumSize(size)
Sets the maximum size of the viewport.
Definition GUI.py:1033
getViewportSize()
Returns the viewport size.
Definition GUI.py:983
setScaleImageOnResize(flag)
Sets if scaling of the image on the canvas is done on resize.
Definition GUI.py:999
fieldChanged()
Reimplemented from MLAB.GUI.WidgetControl to react on changes of the base field type.
Definition GUI.py:1085
_createSlave()
Creates the remote rendering slave.
Definition GUI.py:1079
getMaximumSize()
Returns the maximum size of the viewport.
Definition GUI.py:1026
setMaximumSize(size)
Sets the maximum size of the viewport.
Definition GUI.py:1019
getSlave()
Returns the remote rendering slave.
Definition GUI.py:976
_destroySlave()
Deactivates the slave (MLAB.Core.RemoteRenderingSlave.remove()) and removes it from the remote render...
Definition GUI.py:1072
resizeViewport(w, h)
Resizes the viewport.
Definition GUI.py:991
Base class for remote rendering widgets.
Definition GUI.py:1131
resizeViewportToSizeHint()
This method resizes the viewport to the size hint, or the viewport size if the size hint is invalid.
Definition GUI.py:1174
getMaximumSize()
Returns the maximum size of the viewport.
Definition GUI.py:1188
_setDOMElementVisible()
Sets the visibility of this widget.
Definition GUI.py:1229
getViewportSize()
Returns the viewport size.
Definition GUI.py:1143
viewportSizeChanged(width, height)
Is emitted when the size of the viewport has changed.
Definition GUI.py:1241
slaveWasAdded()
Called from the slave when it is added.
Definition GUI.py:1136
resizeViewport(w, h, deviceWidth, deviceHeight)
Resizes the viewport.
Definition GUI.py:1153
setMinimumSize(size)
Sets the maximum size of the viewport.
Definition GUI.py:1195
useSizeHintWidth()
Returns true if the width of the size hint should be used.
Definition GUI.py:1209
getViewport()
Returns the viewport DOM element.
Definition GUI.py:1224
getMinimumSize()
Returns the minimum size of the viewport.
Definition GUI.py:1202
setSizeHint(sizeHint)
Sets the size hint for the viewport.
Definition GUI.py:1168
setMaximumSize(size)
Sets the maximum size of the viewport.
Definition GUI.py:1181
useSizeHintHeight()
Returns true if the height of the size hint should be used.
Definition GUI.py:1216
setScaleImageOnResize(flag)
Sets if scaling of the image on the canvas is done on resize.
Definition GUI.py:1161
viewerRepainted(metaInformation)
Is emitted when the viewer shows a new image.
Definition GUI.py:1113
contextMenuRequested(position)
Is emitted when a context menu was requested on the viewer.
Definition GUI.py:1120
Base class for MLAB.GUI.WidgetControl which is an interface for all module related communication.
Definition GUI.py:1511
getModule()
Returns the module.
Definition GUI.py:1558
sendBaseFieldMessage(baseFieldMessageClass, data)
Creates a base field message using the provided class and data.
Definition GUI.py:1575
setDOMDocument(A)
Sets a new owner document to this.
Definition GUI.py:1523
createSubControl(mdlTree)
Calls MLAB.Core.Module.createControl() and returns the control, or null if it could not be created.
Definition GUI.py:1530
field(fieldName)
Looks for a field and it by calling MLAB.Core.Module.getFieldByRawName().
Definition GUI.py:1566
sendGenericRequest(request, args)
Passes the request and arguments to MLAB.Core.Module.sendGenericRequest().
Definition GUI.py:1583
logError(error)
Logs an error message by calling MLAB.Core.Module.logError().
Definition GUI.py:1544
log(message)
Logs a message by calling MLAB.Core.Module.log().
Definition GUI.py:1537
getDOMDocument()
Returns the owner document of this.
Definition GUI.py:1516
sendMessage(message)
Sends the message via MLAB.Core.Module.sendMessage() to the server.
Definition GUI.py:1590
logException(exception)
Logs an exception by calling MLAB.Core.Module.logException().
Definition GUI.py:1551
This is the base class for all widget controls.
Definition GUI.py:1467
destroy()
The destructor.
Definition GUI.py:1481
getQualifiedName()
Returns the name of the control containing all sub module names.
Definition GUI.py:1495
getName()
Returns the name of the control.
Definition GUI.py:1488
The base class for widgets.
Definition GUI.py:1442
visitChildren()
Visits all children recursively and calls visitor with each child as argument.
Definition GUI.py:1452
isEnabled()
Returns if the widget is enabled.
Definition GUI.py:1458
isVisible()
Returns if the widget is visible.
Definition GUI.py:1446
A window controller creates MDL controls for modules using the MLAB.GUI.WidgetControlFactory from the...
Definition GUI.py:1614
windowCreated(windowControl)
Is emitted when a Window is created.
Definition GUI.py:1644
createPanel()
Creates a panel from an MDL window.
Definition GUI.py:1633
control(controlName)
Returns the first widget control with the given name.
Definition GUI.py:1625
__init__()
Creates a new window controller.
Definition GUI.py:1617
debugRemoteMessages()
Returns true if remote messages are being printed to the debugging console.
Definition GUI.py:278
getDOMWindow(domElement)
Returns the window of the given domElement.
Definition GUI.py:1738
removeStyleProperty(domElement, property)
Remove a property from the style attribute of a DOM element.
Definition GUI.py:1722
getNextID()
Increments the last id by 1 and returns it.
Definition GUI.py:1649
setDOMElementVisible(domElement, visible)
Shows/hides the given DOM element.
Definition GUI.py:1672
isDOMElementEnabled()
Returns if the DOM element is enabled.
Definition GUI.py:1686
setDOMElementEnabled(domElement, enabled)
Enables/disables the given DOM element.
Definition GUI.py:1658
addStyleSheetClass(domElement, styleSheetClass)
Appends the given style sheet class to the DOM element.
Definition GUI.py:1705
isDOMElementVisible()
Returns if the DOM element is visible.
Definition GUI.py:1679
hasStyleSheetClass(domElement, styleSheetClass)
Returns true if the dom element has the given style sheet class, or false otherwise.
Definition GUI.py:1695
getGlobalPosition(domElement)
Returns the global position of the given domElement.
Definition GUI.py:1730
removeStyleSheetClass(domElement, styleSheetClass)
Removes the given style sheet class from the DOM element.
Definition GUI.py:1714
blurElement(domElement)
Blurs (removes the focus) of the given DOM element.
Definition GUI.py:1746