diff options
author | deepa-chaudhari | 2015-06-15 23:40:29 +0530 |
---|---|---|
committer | deepa-chaudhari | 2015-06-15 23:40:29 +0530 |
commit | ae6da92ff79412f0802b2cf5a496bb95a29401d9 (patch) | |
tree | 403587e1ca955ceebca618e56a3e508c502fc65b /Connections/Shear | |
parent | f2feca225837ad425a37d96fa5bc547abdfea73a (diff) | |
download | OsdagLive-ae6da92ff79412f0802b2cf5a496bb95a29401d9.tar.gz OsdagLive-ae6da92ff79412f0802b2cf5a496bb95a29401d9.tar.bz2 OsdagLive-ae6da92ff79412f0802b2cf5a496bb95a29401d9.zip |
qtextedit scrollbar set to the bottom of the file
Diffstat (limited to 'Connections/Shear')
-rw-r--r-- | Connections/Shear/Finplate/finPlateMain.py | 16 | ||||
-rw-r--r-- | Connections/Shear/Finplate/finplate_calc1.py | 7 |
2 files changed, 18 insertions, 5 deletions
diff --git a/Connections/Shear/Finplate/finPlateMain.py b/Connections/Shear/Finplate/finPlateMain.py index e36c791..b28143b 100644 --- a/Connections/Shear/Finplate/finPlateMain.py +++ b/Connections/Shear/Finplate/finPlateMain.py @@ -5,12 +5,13 @@ comment @author: deepa ''' from PyQt4.QtCore import QString -from PyQt4.QtGui import QMessageBox +from PyQt4.QtGui import QMessageBox, QScrollArea from OCC.TopoDS import topods, TopoDS_Shape from OCC.BRepPrimAPI import BRepPrimAPI_MakeBox, BRepPrimAPI_MakeCylinder,\ BRepPrimAPI_MakeSphere from OCC.gp import gp_Pnt from nutBoltPlacement import NutBoltArray +from PyQt4.Qt import QScrollBar #from Connections.Shear.Finplate.nutBoltPlacement import NutBoltArray ''' Created on 21-Aug-2014 @@ -65,6 +66,7 @@ class MainController(QtGui.QMainWindow): self.ui.comboType.currentIndexChanged[str].connect(self.combotype_currentindexchanged) self.ui.comboType.setCurrentIndex(0) + self.ui.comboConnLoc.currentIndexChanged[str].connect(self.setimage_connection) #self.disableViewButtons() @@ -76,6 +78,11 @@ class MainController(QtGui.QMainWindow): self.ui.btn_top.clicked.connect(self.call_Topview) self.ui.btn_side.clicked.connect(self.call_Sideview) + self.ui.textEdit.scrollToAnchor("safe") + self.ui.textEdit.ensureCursorVisible() + + + self.ui.btn3D.clicked.connect(lambda:self.call_3DModel(True)) self.ui.chkBxBeam.clicked.connect(self.call_3DBeam) self.ui.chkBxCol.clicked.connect(self.call_3DColumn) @@ -593,10 +600,10 @@ class MainController(QtGui.QMainWindow): QtGui.QMessageBox.information(None, 'info', afile.errorString()) stream = QtCore.QTextStream(afile) - #self.ui.textEdit.setFocus() self.ui.textEdit.clear() self.ui.textEdit.setHtml(stream.readAll()) - + vscrollBar = self.ui.textEdit.verticalScrollBar(); + vscrollBar.setValue(vscrollBar.maximum()); afile.close() @@ -862,7 +869,10 @@ class MainController(QtGui.QMainWindow): def design_btnclicked(self): ''' ''' + # verticalScroll = QScrollBar(self.ui.textEdit.verticalScrollBar()) + # verticalScroll.triggerAction(QScrollBar.SliderToMaximum) designLogger = logging.getLogger("Designlogger.finPlateCalc") + self.ui.textEdit.scrollToAnchor("INFO") self.ui.outputDock.setFixedSize(310,710) self.enableViewButtons() diff --git a/Connections/Shear/Finplate/finplate_calc1.py b/Connections/Shear/Finplate/finplate_calc1.py index c7a776c..416bb4c 100644 --- a/Connections/Shear/Finplate/finplate_calc1.py +++ b/Connections/Shear/Finplate/finplate_calc1.py @@ -462,9 +462,12 @@ def finConn(uiObj): # outputObj = {} if outputObj['Bolt']['status'] == True: - logger.info(": Overall finplate connection design is safe") + logger.info(": Overall finplate connection design is safe \n") + logger.info(" :===========================================================") + else: - logger.error(": Design is not safe") + logger.error(": Design is not safe \n ") + logger.info(" :===========================================================") return outputObj |