summaryrefslogtreecommitdiff
path: root/osdagMainPage.py
blob: 981f3a2388b97e196cbb8f4884bae87f53aa27c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
'''
Created on 16-Jun-2015

@author: deepa
'''
import sys
from PyQt4 import QtGui,QtCore
from ui_osdagpage import Ui_MainWindow
from Connections.Shear.Finplate.finPlateMain import launchFinPlateController
#from finPlateMain import *

#from finPlateMain import launchFinPlateController


class OsdagMainWindow(QtGui.QMainWindow):

    def __init__(self):
        QtGui.QMainWindow.__init__(self)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        
        self.ui.myListWidget.currentItemChanged.connect(self.changePage)
        self.ui.myListWidget.setCurrentRow(0)
        self.ui.shearBtnStart.clicked.connect(self.showFinPlate)
        
    def changePage(self, current, previous):
        if not current:
            current = previous

        self.ui.myStackedWidget.setCurrentIndex(self.ui.myListWidget.row(current))
    
    def showFinPlate(self):
        
        if self.ui.finPlateRdBtn.isChecked():
            launchFinPlateController(self)
            #QtGui.QMessageBox.about(self,"info","finplate clicked")
        elif self.ui.cleatRdBtn.isChecked():
            QtGui.QMessageBox.about(self,"info","cleat clicked")
        elif self.ui.endPlateRdBtn.isChecked():
            QtGui.QMessageBox.about(self,"info","endplateclicked")
        elif self.ui.seatedRdBtn.isChecked():
            QtGui.QMessageBox.about(self,"info","seated clicked")
        else:
            QtGui.QMessageBox.about(self,"info","Please select desire radio button")
            
        
    

    
if __name__ == '__main__':
    app = QtGui.QApplication(sys.argv)
    window = OsdagMainWindow()
    window.show()
    sys.exit(app.exec_())