26
26
27
27
except :
28
28
matplotlib .use ('Qt5Agg' )
29
+ # noinspection PyUnresolvedReferences
29
30
from PySide2 import QtCore
30
31
except ImportError as _e :
31
32
if 'DLL load failed' in str (_e ):
60
61
QSplitter , QHBoxLayout , QToolBar , QPlainTextEdit , QScrollArea , QFileDialog , QMessageBox , QTableWidgetItem , \
61
62
QLabel , QTableWidget , QListWidgetItem , QTextEdit , QDialogButtonBox
62
63
except ImportError :
64
+ # noinspection PyUnresolvedReferences
63
65
import PySide2 as PySide
66
+ # noinspection PyUnresolvedReferences
64
67
from PySide2 .QtGui import QIcon , QKeySequence , QFont , QTextOption , QPixmap , QImage
68
+ # noinspection PyUnresolvedReferences
65
69
from PySide2 .QtCore import Qt , SIGNAL , QSize , QSettings , QCoreApplication , QPoint
70
+ # noinspection PyUnresolvedReferences
66
71
from PySide2 .QtWidgets import QListWidget , QMainWindow , QDialog , QApplication , QAbstractItemView , \
67
72
QTabWidget , QWidget , QComboBox , QPushButton , QCheckBox , QRadioButton , QGridLayout , QVBoxLayout , \
68
73
QSplitter , QHBoxLayout , QToolBar , QPlainTextEdit , QScrollArea , QFileDialog , QMessageBox , QTableWidgetItem , \
@@ -135,6 +140,7 @@ def __init__(self, app, ini=None, base_dir=None, plot_scale=1):
135
140
self .setWindowIcon (self ._icon ('Icon' , False ))
136
141
137
142
if base_dir is None and batchjob :
143
+ # noinspection PyUnresolvedReferences
138
144
base_dir = batchjob .getCodeRootPath ()
139
145
if base_dir :
140
146
os .chdir (base_dir )
@@ -414,7 +420,7 @@ def _createWidgets(self):
414
420
self .pushButtonRemove .setToolTip ("Remove a chain root" )
415
421
self .pushButtonRemove .setEnabled (False )
416
422
self .pushButtonRemove .setMaximumWidth (30 * self .dpiScale ())
417
- self .connect ( self . pushButtonRemove , SIGNAL ( " clicked()" ), self .removeRoot )
423
+ self .pushButtonRemove . clicked . connect ( self .removeRoot )
418
424
419
425
self .comboBoxParamTag = QComboBox (self .selectWidget )
420
426
self .comboBoxParamTag .clear ()
@@ -430,23 +436,23 @@ def _createWidgets(self):
430
436
431
437
self .listParametersX = QListWidget (self .selectWidget )
432
438
self .listParametersX .clear ()
433
- self .connect ( self . listParametersX , SIGNAL ( " itemChanged(QListWidgetItem *)" ), self .itemCheckChange )
439
+ self .listParametersX . itemChanged . connect ( self .itemCheckChange )
434
440
435
441
self .listParametersY = QListWidget (self .selectWidget )
436
442
self .listParametersY .clear ()
437
- self .connect ( self . listParametersY , SIGNAL ( " itemChanged(QListWidgetItem *)" ), self .itemCheckChange )
443
+ self .listParametersY . itemChanged . connect ( self .itemCheckChange )
438
444
439
445
self .selectAllX = QCheckBox ("Select All" , self .selectWidget )
440
446
self .selectAllX .setCheckState (Qt .Unchecked )
441
- self .connect ( self . selectAllX , SIGNAL ( " clicked()" ), self .statusSelectAllX )
447
+ self .selectAllX . clicked . connect ( self .statusSelectAllX )
442
448
443
449
self .selectAllY = QCheckBox ("Select All" , self .selectWidget )
444
450
self .selectAllY .setCheckState (Qt .Unchecked )
445
- self .connect ( self . selectAllY , SIGNAL ( " clicked()" ), self .statusSelectAllY )
451
+ self .selectAllX . clicked . connect ( self .statusSelectAllY )
446
452
447
453
self .toggleFilled = QRadioButton ("Filled" )
448
454
self .toggleLine = QRadioButton ("Line" )
449
- self .connect ( self . toggleLine , SIGNAL ( " toggled(bool)" ), self .statusPlotType )
455
+ self .toggleLine . toggled . connect ( self .statusPlotType )
450
456
451
457
self .checkShade = QCheckBox ("Shaded" , self .selectWidget )
452
458
self .checkShade .setEnabled (False )
@@ -456,14 +462,14 @@ def _createWidgets(self):
456
462
self .checkInsideLegend .setVisible (False )
457
463
458
464
self .toggleColor = QRadioButton ("Color by:" )
459
- self .connect ( self . toggleColor , SIGNAL ( " toggled(bool)" ), self .statusPlotType )
465
+ self .toggleColor . toggled . connect ( self .statusPlotType )
460
466
461
467
self .comboBoxColor = QComboBox (self )
462
468
self .comboBoxColor .clear ()
463
469
self .comboBoxColor .setEnabled (False )
464
470
465
471
self .toggleZ = QRadioButton ("Z-axis:" , self .selectWidget )
466
- self .connect ( self . toggleZ , SIGNAL ( " toggled(bool)" ), self .statusPlotType )
472
+ self .toggleZ . toggled . connect ( self .statusPlotType )
467
473
self .comboBoxZ = QComboBox (self )
468
474
self .comboBoxZ .clear ()
469
475
self .comboBoxZ .setEnabled (False )
@@ -476,10 +482,10 @@ def _createWidgets(self):
476
482
477
483
self .trianglePlot = QCheckBox ("Triangle Plot" , self .selectWidget )
478
484
self .trianglePlot .setCheckState (Qt .Unchecked )
479
- self .connect ( self . trianglePlot , SIGNAL ( " toggled(bool)" ), self .statusTriangle )
485
+ self .trianglePlot . toggled . connect ( self .statusTriangle )
480
486
481
487
self .pushButtonPlot = QPushButton ("Make plot" , self .selectWidget )
482
- self .connect ( self . pushButtonPlot , SIGNAL ( " clicked()" ), self .plotData )
488
+ self .pushButtonPlot . clicked . connect ( self .plotData )
483
489
484
490
def h_stack (* items ):
485
491
widget = QWidget (self .selectWidget )
@@ -583,9 +589,9 @@ def h_stack(*items):
583
589
584
590
self .pushButtonPlot2 = QPushButton ("Make plot" , self .editWidget )
585
591
self .pushButtonPlot2 .setToolTip ("Ctrl+Return" )
586
- self .connect ( self . pushButtonPlot2 , SIGNAL ( " clicked()" ), self .plotData2 )
592
+ self .pushButtonPlot2 . clicked . connect ( self .plotData2 )
587
593
shortcut = QShortcut (QKeySequence (self .tr ("Ctrl+Return" )), self )
588
- self . connect (shortcut , SIGNAL ( "activated()" ), self .plotData2 )
594
+ shortcut . activated . connect (self .plotData2 )
589
595
590
596
layoutEdit = QVBoxLayout ()
591
597
layoutEdit .addWidget (self .toolBar )
@@ -752,6 +758,7 @@ def reLoad(self):
752
758
adir = self .getSettings ().value ('lastSearchDirectory' )
753
759
if adir :
754
760
if batchjob :
761
+ # noinspection PyUnresolvedReferences
755
762
batchjob .resetGrid (adir )
756
763
self .openDirectory (adir )
757
764
if self .plotter :
0 commit comments