2 ## This file is part of the sigrok-meter project.
4 ## Copyright (C) 2014 Jens Steinhauser <jens.steinhauser@gmail.com>
6 ## This program is free software; you can redistribute it and/or modify
7 ## it under the terms of the GNU General Public License as published by
8 ## the Free Software Foundation; either version 2 of the License, or
9 ## (at your option) any later version.
11 ## This program is distributed in the hope that it will be useful,
12 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ## GNU General Public License for more details.
16 ## You should have received a copy of the GNU General Public License
17 ## along with this program; if not, see <http://www.gnu.org/licenses/>.
22 def load_modules(force_pyside
):
24 import PySide
.QtCore
as _QtCore
25 import PySide
.QtGui
as _QtGui
28 # Use version 2 API in all cases, because that's what PySide uses.
30 sip
.setapi('QVariant', 2)
31 sip
.setapi('QDate', 2)
32 sip
.setapi('QDateTime', 2)
33 sip
.setapi('QString', 2)
34 sip
.setapi('QTextStream', 2)
35 sip
.setapi('QTime', 2)
37 sip
.setapi('QVariant', 2)
39 import PyQt4
.QtCore
as _QtCore
40 import PyQt4
.QtGui
as _QtGui
42 # Add PySide compatible names.
43 _QtCore
.Signal
= _QtCore
.pyqtSignal
44 _QtCore
.Slot
= _QtCore
.pyqtSlot
46 sys
.stderr
.write('Import of PyQt4 failed, using PySide,\n')
47 import PySide
.QtCore
as _QtCore
48 import PySide
.QtGui
as _QtGui
55 import pyqtgraph
as _pyqtgraph
56 import pyqtgraph
.dockarea
as _pyqtgraph_dockarea
58 pyqtgraph
= _pyqtgraph
59 pyqtgraph
.dockarea
= _pyqtgraph_dockarea