;i7dZddlZddlZddlmZddlmZddl m Z ddl m Z ej dZe jZe Zeeedd ed ed d ZedddZedd Zedd Zedd Zedd ZeedeedeedeeedeedeeedeeedeeedeeedeejZe jdZ e j!dZ"e j!dZ#e#$d e%e dd!e%e"d"d!e%e#d#d!e%eda&d$Z'd%Z(e"j)*e'e#j)*e(eZ+e%e+e,ej-d&'Z.e./ej01d( e%e.ej-d)'Z2e2/ej01d( e%e2ej3Z4e45ej01d* e%e4ej-d+'Z6e6/ej01d( e%e6e7e8d,krej9dSdS)-a This example demonstrates the use of pyqtgraph's dock widget system. The dockarea system allows the design of user interfaces which can be rearranged by the user at runtime. Docks can be moved, resized, stacked, and torn out of the main window. This is similar in principle to the docking system built into Qt, but offers a more deterministic dock placement API (in Qt it is very difficult to programatically generate complex dock arrangements). Additionally, Qt's docks are designed to be used as small panels around the outer edge of a window. Pyqtgraph's docks were created with the notion that the entire window (or any portion of it) would consist of dockable components. N) ConsoleWidget)Dock)DockArea) QtWidgetszDockArea Exampleizpyqtgraph example: dockareaDock1)r )sizezDock2 - Console)ri,T)r closableDock3)rizDock4 (tabbed) - Plot)rz Dock5 - ImagezDock6 (tabbed) - Plotleftrightbottomtopabovea -- DockArea Example -- This window has 6 Dock widgets in it. Each dock can be dragged by its title bar to occupy a different space within the window but note that one dock has its title bar hidden). Additionally, the borders between docks may be dragged to resize. Docks that are dragged on top of one another are stacked in a tabbed layout. Double-click a dock title bar to place it in its own window. zSave dock statezRestore dock stateF)rowcolr cltatddS)NT)area saveStatestate restoreBtn setEnabledOC:\PYTHON\MyICR_Workspace\venv\Lib\site-packages\pyqtgraph/examples/dockarea.pysaverGs+ NN  E$rcDttdS)N)r restoreStaterrrrloadr"Kserz"Plot inside dock with no title bar)titledz Dock 4 plot)r$r$z Dock 6 plot__main__):__doc__numpynp pyqtgraphpgpyqtgraph.consolerpyqtgraph.dockarea.Dockrpyqtgraph.dockarea.DockArear pyqtgraph.QtrmkQAppapp QMainWindowwinrsetCentralWidgetresizesetWindowTitled1d2d3d4d5d6addDockmoveDock LayoutWidgetw1QLabellabel QPushButtonsaveBtnrr addWidgetrrr"clickedconnectw2 hideTitleBar PlotWidgetw3plotrandomnormalw4 ImageVieww5setImagew6show__name__execrrrrVs  ++++++((((((000000""""""bi"##ixzzT 40111  T' T )d;;; T' """ T ! 222 T/ *** T ! 222 R R R2 R R R b% b'2 b% R_    )  1 2 2 "Y "#7 8 8 e Uq !!! W! ### ZQA &&& R     4 ]__ RR]=>>> c""### RR]''' c""### RR\^^ BI  )  , ,--- RR]''' c""### R  z BGIIIIIr