Salome HOME
updated copyright message
[modules/gui.git] / src / GUI_PY / test_dockwidgets.py
1 # Copyright (C) 2014-2023  CEA, EDF, OPEN CASCADE
2 #
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 from salome.gui.dockwidgets import *
21
22 print("-- Search dock windows by title")
23 ob = findDockWidgetByTitle( "Object Browser" )
24 if ob:
25     print("object browser:", ob)
26 else:
27     print("object browser was not found")
28
29 pc  = findDockWidgetByTitle( "Python Console" )
30 if pc:
31     print("python console:", pc)
32 else:
33     print("python console was not found")
34 print() 
35
36 print("-- Search dock windows by name")
37 ob = findDockWidgetByName( "objectBrowserDock" )
38 if ob:
39     print("object browser:", ob)
40 else:
41     print("object browser was not found")
42 pc  = findDockWidgetByName( "pythonConsoleDock" )
43 if pc:
44     print("python console:", pc)
45 else:
46     print("python console was not found")
47 print() 
48
49 print("-- Search dock windows by id")
50 ob = findDockWidgetById( SalomePyQt.WT_ObjectBrowser )
51 if ob:
52     print("object browser:", ob)
53 else:
54     print("object browser was not found")
55 pc  = findDockWidgetById( SalomePyQt.WT_PyConsole )
56 if pc:
57     print("python console:", pc)
58 else:
59     print("python console was not found")
60 print() 
61
62 print("-- Tabify dock windows")
63 tabifyDockWidgets( findDockWidgetById( SalomePyQt.WT_ObjectBrowser ),
64                    findDockWidgetById( SalomePyQt.WT_PyConsole ) )