@@ -459,7 +459,7 @@ def setupTable(self):
459459 for c in range (1 , 4 ):
460460 item = QtGui .QTableWidgetItem ()
461461 self .extTable .setItem (r , c , item )
462- self .extTable .item (r , c ).setBackgroundColor ( QtGui . QColor (255 ,255 ,255 ))
462+ self .extTable .item (r , c ).setBackground ( QBrush ( QColor (255 ,255 ,255 ) ))
463463
464464 def moveDefault (self ):
465465 self .move (self .x0 , self .y0 )
@@ -470,7 +470,7 @@ def checkExt(self):
470470
471471 for r in range (1 , len (self .plotInfo ) + 1 ):
472472 for c in range (1 , 4 ):
473- self .extTable .item (r , c ).setBackgroundColor ( QtGui . QColor (255 ,255 ,255 ))
473+ self .extTable .item (r , c ).setBackground ( QBrush ( QColor (255 ,255 ,255 ) ))
474474
475475 for r in range (1 , self .extTable .rowCount ()):
476476 try :
@@ -495,7 +495,7 @@ def checkExt(self):
495495 self .accept ()
496496 else :
497497 for ii in range (0 , len (errCell )):
498- self .extTable .item (errCell [ii ][0 ], errCell [ii ][1 ]).setBackgroundColor ( QtGui . QColor (250 ,190 ,160 ))
498+ self .extTable .item (errCell [ii ][0 ], errCell [ii ][1 ]).setBackground ( QBrush ( QColor (250 ,190 ,160 ) ))
499499
500500 def closeEvent (self , e ):
501501 self .reject ()
@@ -1353,13 +1353,13 @@ def __init__(self, reactor, file, dir, plotInfo, yMovePos, pencolor):
13531353 self .backBtn1 .setStyleSheet ("QPushButton#backBtn1 {color:rgb(131,131,131);background-color:black;border: 2px solid rgb(131,131,131);border-radius: 5px; height: 38px; width: 70px}" )
13541354
13551355 self .saveMATBtn .setObjectName ('saveMATBtn' )
1356- self .saveMATBtn .setStyleSheet ("QPushButton#saveMATBtn {image:url(:/dvPlotter/Pictures/saveMATLAB.png);background-color: transparent; height: 23px; width: 23px;}" )
1356+ self .saveMATBtn .setStyleSheet ("QPushButton#saveMATBtn {border- image:url(:/dvPlotter/Pictures/saveMATLAB.png);background-color: transparent; height: 23px; width: 23px;}" )
13571357 self .savePDFBtn .setObjectName ('savePDFBtn' )
1358- self .savePDFBtn .setStyleSheet ("QPushButton#savePDFBtn {image:url(:/dvPlotter/Pictures/savePDF.png);background-color: transparent; height: 23px; width: 23px;}" )
1358+ self .savePDFBtn .setStyleSheet ("QPushButton#savePDFBtn {border- image:url(:/dvPlotter/Pictures/savePDF.png);background-color: transparent; height: 23px; width: 23px;}" )
13591359 self .editNotesBtn .setObjectName ('editNotesBtn' )
1360- self .editNotesBtn .setStyleSheet ("QPushButton#editNotesBtn {image:url(:/dvPlotter/Pictures/editNotes.png);background-color: transparent; height: 15px; width: 23px;}" )
1360+ self .editNotesBtn .setStyleSheet ("QPushButton#editNotesBtn {border- image:url(:/dvPlotter/Pictures/editNotes.png);background-color: transparent; height: 15px; width: 23px;}" )
13611361 self .openDVBtn .setObjectName ('openDVBtn' )
1362- self .openDVBtn .setStyleSheet ("QPushButton#openDVBtn {image:url(:/dvPlotter/Pictures/browse.png); background-color: transparent; height: 18px; width: 18px;}" )
1362+ self .openDVBtn .setStyleSheet ("QPushButton#openDVBtn {border- image:url(:/dvPlotter/Pictures/browse.png); background-color: transparent; height: 18px; width: 18px;}" )
13631363
13641364 self .layout .setColumnStretch (0 , 1 )
13651365 self .layout .setColumnStretch (1 ,5 )
@@ -1564,8 +1564,8 @@ def __init__(self, reactor, fileDV, dir, plotInfo, yMovePos ):
15641564 self .yAxis = self .plotInfo ['y axis' ]
15651565 self .zAxis = self .plotInfo ['z axis' ]
15661566
1567- self .connect (QtGui .QShortcut (QtGui .QKeySequence (QtCore .Qt .CTRL + QtCore .Qt .Key_C ), self ), QtCore .SIGNAL ('activated()' ),self .copyPlotToClip )
1568-
1567+ # self.connect(QtGui.QShortcut(QtGui.QKeySequence(QtCore.Qt.CTRL+ QtCore.Qt.Key_C), self), QtCore.SIGNAL('activated()'),self.copyPlotToClip)
1568+ QtGui . QShortcut ( QtGui . QKeySequence ( QtCore . Qt . CTRL + QtCore . Qt . Key_C ), self ). activated . connect ( self . copyPlotToClip )
15691569 self .notes = ''
15701570 self .plotTitle = self .plotInfo ['title' ]
15711571 if self .plotTitle [0 :5 ] == 'Plot ' :
@@ -1698,13 +1698,13 @@ def __init__(self, reactor, fileDV, dir, plotInfo, yMovePos ):
16981698 self .backBtn1 .setStyleSheet ("QPushButton#backBtn1 {color:rgb(131,131,131);background-color:black;border: 2px solid rgb(131,131,131);border-radius: 5px; height: 38px; width: 70px}" )
16991699
17001700 self .saveMATBtn .setObjectName ('saveMATBtn' )
1701- self .saveMATBtn .setStyleSheet ("QPushButton#saveMATBtn {image:url(:/dvPlotter/Pictures/saveMATLAB.png);background-color: transparent; height: 23px; width: 23px;}" )
1701+ self .saveMATBtn .setStyleSheet ("QPushButton#saveMATBtn {border- image:url(:/dvPlotter/Pictures/saveMATLAB.png);background-color: transparent; height: 23px; width: 23px;}" )
17021702 self .savePDFBtn .setObjectName ('savePDFBtn' )
1703- self .savePDFBtn .setStyleSheet ("QPushButton#savePDFBtn {image:url(:/dvPlotter/Pictures/savePDF.png);background-color: transparent; height: 23px; width: 23px;}" )
1703+ self .savePDFBtn .setStyleSheet ("QPushButton#savePDFBtn {border- image:url(:/dvPlotter/Pictures/savePDF.png);background-color: transparent; height: 23px; width: 23px;}" )
17041704 self .editNotesBtn .setObjectName ('editNotesBtn' )
1705- self .editNotesBtn .setStyleSheet ("QPushButton#editNotesBtn {image:url(:/dvPlotter/Pictures/editNotes.png);background-color: transparent; height: 15px; width: 23px;}" )
1705+ self .editNotesBtn .setStyleSheet ("QPushButton#editNotesBtn {border- image:url(:/dvPlotter/Pictures/editNotes.png);background-color: transparent; height: 15px; width: 23px;}" )
17061706 self .openDVBtn .setObjectName ('openDVBtn' )
1707- self .openDVBtn .setStyleSheet ("QPushButton#openDVBtn {image:url(:/dvPlotter/Pictures/browse.png); background-color: transparent; height: 18px; width: 18px;}" )
1707+ self .openDVBtn .setStyleSheet ("QPushButton#openDVBtn {border- image:url(:/dvPlotter/Pictures/browse.png); background-color: transparent; height: 18px; width: 18px;}" )
17081708
17091709
17101710
@@ -2188,9 +2188,13 @@ def __init__(self, parent = None):
21882188
21892189 self .lineNumberArea = LineNumberArea (self )
21902190
2191- self .connect (self , QtCore .SIGNAL ('blockCountChanged(int)' ), self .updateLineNumberAreaWidth )
2192- self .connect (self , QtCore .SIGNAL ('updateRequest(QRect,int)' ), self .updateLineNumberArea )
2193- self .connect (self , QtCore .SIGNAL ('cursorPositionChanged()' ), self .highlightCurrentLine )
2191+ #self.connect(self, QtCore.SIGNAL('blockCountChanged(int)'), self.updateLineNumberAreaWidth)
2192+ #self.connect(self, QtCore.SIGNAL('updateRequest(QRect,int)'), self.updateLineNumberArea)
2193+ #self.connect(self, QtCore.SIGNAL('cursorPositionChanged()'), self.highlightCurrentLine)
2194+
2195+ self .blockCountChanged .connect (self .updateLineNumberAreaWidth )
2196+ self .updateRequest .connect (self .updateLineNumberArea )
2197+ self .cursorPositionChanged .connect (self .highlightCurrentLine )
21942198
21952199 self .updateLineNumberAreaWidth (0 )
21962200
0 commit comments