From 2c1e750c049e75aec9eed68cb8eef162a10eac52 Mon Sep 17 00:00:00 2001 From: deepa-chaudhari Date: Tue, 16 Jun 2015 18:08:39 +0530 Subject: Osdagmain page --- osdagMainPage.py | 35 +++++ osdagpage.ui | 451 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ ui_osdagpage.py | 263 ++++++++++++++++++++++++++++++++ 3 files changed, 749 insertions(+) create mode 100644 osdagMainPage.py create mode 100644 osdagpage.ui create mode 100644 ui_osdagpage.py diff --git a/osdagMainPage.py b/osdagMainPage.py new file mode 100644 index 0000000..8665cbc --- /dev/null +++ b/osdagMainPage.py @@ -0,0 +1,35 @@ +''' +Created on 16-Jun-2015 + +@author: deepa +''' +import sys +from PyQt4 import QtGui,QtCore +from ui_osdagpage import Ui_MainWindow + +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) + + def changePage(self, current, previous): + if not current: + current = previous + + self.ui.myStackedWidget.setCurrentIndex(self.ui.myListWidget.row(current)) + + +if __name__ == '__main__': + app = QtGui.QApplication(sys.argv) + window = OsdagMainWindow() + window.show() + sys.exit(app.exec_()) \ No newline at end of file diff --git a/osdagpage.ui b/osdagpage.ui new file mode 100644 index 0000000..221c56a --- /dev/null +++ b/osdagpage.ui @@ -0,0 +1,451 @@ + + + MainWindow + + + + 0 + 0 + 1019 + 674 + + + + MainWindow + + + + + + + + + + 300 + 0 + + + + QListWidget::item { + color:#00ff00; + background-color:#5930ac; + } +QListWidget{background-color:#83AC30; +} + QListWidget:item:selected:active { + background: #000000;} + + + QFrame::Box + + + QFrame::Raised + + + 5 + + + 2 + + + + 48 + 48 + + + + 5 + + + + Create : + + + + 12 + 75 + true + + + + NoItemFlags + + + + + Connections + + + + 12 + 50 + false + + + + + ../../Pictures/images (3).jpg../../Pictures/images (3).jpg + + + + + Tesion Members + + + + 12 + + + + + ../../Pictures/images (3).jpg../../Pictures/images (3).jpg + + + + + Compression Members + + + + 12 + + + + + ../../Pictures/images (3).jpg../../Pictures/images (3).jpg + + + + + Flexural Members + + + + 12 + + + + + ../../Pictures/images (3).jpg../../Pictures/images (3).jpg + + + + + Beam-Column + + + + 12 + + + + + ../../Pictures/images (3).jpg../../Pictures/images (3).jpg + + + + + Plate Girders + + + + 12 + + + + + ../../Pictures/images (3).jpg../../Pictures/images (3).jpg + + + + + Gantry Girders + + + + 12 + + + + + ../../Pictures/images (3).jpg../../Pictures/images (3).jpg + + + + + + + + QPushButton {background-color: #5930ac; color: #00ff00;} + + + Help + + + + + + + QPushButton {background-color: #5930ac; color: #00ff00;} +QPushButton:pressed { background-color: #000000 } + + + Open File + + + + + + + 1 + + + + + + 60 + 100 + 151 + 131 + + + + + + + ../../Pictures/cfd_logo.png + + + true + + + + + + 240 + 110 + 461 + 121 + + + + + + + ../../Pictures/banner12.png + + + true + + + + + + 740 + 540 + 84 + 81 + + + + + + + ../../Pictures/logo.png + + + true + + + + + + + + + + 12 + + + + QTabBar::tab { height: 30px; width: 180px; } + + + + QTabWidget::Rounded + + + 1 + + + + Shear Connection + + + + + 50 + 110 + 137 + 27 + + + + + 11 + + + + + + + Cleat + + + + + + 50 + 150 + 137 + 27 + + + + + 11 + + + + End Plate + + + + + + 50 + 190 + 137 + 27 + + + + + 11 + + + + Fin Plate + + + + + + 430 + 400 + 186 + 32 + + + + + 12 + 75 + false + true + + + + QPushButton { + color:#00ff00; + background-color:#5930ac; + border-style: outset; + border-width: 2px; + border-radius: 10px; + border-color: #00ff00;} + +QPushButton:pressed { background-color: #000000 } + + + + + Start + + + + + + 50 + 230 + 137 + 27 + + + + + 11 + + + + Seated + + + + + + Moment + + + + + + + + + + + 380 + 240 + 211 + 81 + + + + + 17 + 75 + true + true + + + + QLabel{ color : #5930ac;} + + + Comming soon! + + + false + + + + + + + + + + + + + 0 + 0 + 1019 + 30 + + + + + + + diff --git a/ui_osdagpage.py b/ui_osdagpage.py new file mode 100644 index 0000000..b48d828 --- /dev/null +++ b/ui_osdagpage.py @@ -0,0 +1,263 @@ +# -*- coding: utf-8 -*- + +# Form implementation generated from reading ui file 'osdagpage.ui' +# +# Created: Tue Jun 16 17:27:55 2015 +# by: PyQt4 UI code generator 4.10.4 +# +# WARNING! All changes made in this file will be lost! + +from PyQt4 import QtCore, QtGui + +try: + _fromUtf8 = QtCore.QString.fromUtf8 +except AttributeError: + def _fromUtf8(s): + return s + +try: + _encoding = QtGui.QApplication.UnicodeUTF8 + def _translate(context, text, disambig): + return QtGui.QApplication.translate(context, text, disambig, _encoding) +except AttributeError: + def _translate(context, text, disambig): + return QtGui.QApplication.translate(context, text, disambig) + +class Ui_MainWindow(object): + def setupUi(self, MainWindow): + MainWindow.setObjectName(_fromUtf8("MainWindow")) + MainWindow.resize(1019, 674) + self.centralwidget = QtGui.QWidget(MainWindow) + self.centralwidget.setObjectName(_fromUtf8("centralwidget")) + self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget) + self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) + self.gridLayout = QtGui.QGridLayout() + self.gridLayout.setObjectName(_fromUtf8("gridLayout")) + self.myListWidget = QtGui.QListWidget(self.centralwidget) + self.myListWidget.setMinimumSize(QtCore.QSize(300, 0)) + self.myListWidget.setStyleSheet(_fromUtf8("QListWidget::item {\n" +" color:#00ff00;\n" +" background-color:#5930ac;\n" +" }\n" +"QListWidget{background-color:#83AC30;\n" +"}\n" +" QListWidget:item:selected:active {\n" +" background: #000000;}")) + self.myListWidget.setFrameShape(QtGui.QFrame.Box) + self.myListWidget.setFrameShadow(QtGui.QFrame.Raised) + self.myListWidget.setLineWidth(5) + self.myListWidget.setMidLineWidth(2) + self.myListWidget.setIconSize(QtCore.QSize(48, 48)) + self.myListWidget.setSpacing(5) + self.myListWidget.setObjectName(_fromUtf8("myListWidget")) + item = QtGui.QListWidgetItem() + font = QtGui.QFont() + font.setPointSize(12) + font.setBold(True) + font.setWeight(75) + item.setFont(font) + item.setFlags(QtCore.Qt.NoItemFlags) + self.myListWidget.addItem(item) + item = QtGui.QListWidgetItem() + font = QtGui.QFont() + font.setPointSize(12) + font.setBold(False) + font.setWeight(50) + item.setFont(font) + icon = QtGui.QIcon() + icon.addPixmap(QtGui.QPixmap(_fromUtf8("../../Pictures/images (3).jpg")), QtGui.QIcon.Normal, QtGui.QIcon.Off) + item.setIcon(icon) + self.myListWidget.addItem(item) + item = QtGui.QListWidgetItem() + font = QtGui.QFont() + font.setPointSize(12) + item.setFont(font) + item.setIcon(icon) + self.myListWidget.addItem(item) + item = QtGui.QListWidgetItem() + font = QtGui.QFont() + font.setPointSize(12) + item.setFont(font) + item.setIcon(icon) + self.myListWidget.addItem(item) + item = QtGui.QListWidgetItem() + font = QtGui.QFont() + font.setPointSize(12) + item.setFont(font) + item.setIcon(icon) + self.myListWidget.addItem(item) + item = QtGui.QListWidgetItem() + font = QtGui.QFont() + font.setPointSize(12) + item.setFont(font) + item.setIcon(icon) + self.myListWidget.addItem(item) + item = QtGui.QListWidgetItem() + font = QtGui.QFont() + font.setPointSize(12) + item.setFont(font) + item.setIcon(icon) + self.myListWidget.addItem(item) + item = QtGui.QListWidgetItem() + font = QtGui.QFont() + font.setPointSize(12) + item.setFont(font) + item.setIcon(icon) + self.myListWidget.addItem(item) + self.gridLayout.addWidget(self.myListWidget, 0, 0, 1, 2) + self.pushButton_2 = QtGui.QPushButton(self.centralwidget) + self.pushButton_2.setStyleSheet(_fromUtf8("QPushButton {background-color: #5930ac; color: #00ff00;}")) + self.pushButton_2.setObjectName(_fromUtf8("pushButton_2")) + self.gridLayout.addWidget(self.pushButton_2, 1, 1, 1, 1) + self.pushButton = QtGui.QPushButton(self.centralwidget) + self.pushButton.setStyleSheet(_fromUtf8("QPushButton {background-color: #5930ac; color: #00ff00;}\n" +"QPushButton:pressed { background-color: #000000 }")) + self.pushButton.setObjectName(_fromUtf8("pushButton")) + self.gridLayout.addWidget(self.pushButton, 1, 0, 1, 1) + self.myStackedWidget = QtGui.QStackedWidget(self.centralwidget) + self.myStackedWidget.setObjectName(_fromUtf8("myStackedWidget")) + self.osdagPage = QtGui.QWidget() + self.osdagPage.setObjectName(_fromUtf8("osdagPage")) + self.label = QtGui.QLabel(self.osdagPage) + self.label.setGeometry(QtCore.QRect(60, 100, 151, 131)) + self.label.setText(_fromUtf8("")) + self.label.setPixmap(QtGui.QPixmap(_fromUtf8("../../Pictures/cfd_logo.png"))) + self.label.setScaledContents(True) + self.label.setObjectName(_fromUtf8("label")) + self.label_2 = QtGui.QLabel(self.osdagPage) + self.label_2.setGeometry(QtCore.QRect(240, 110, 461, 121)) + self.label_2.setText(_fromUtf8("")) + self.label_2.setPixmap(QtGui.QPixmap(_fromUtf8("../../Pictures/banner12.png"))) + self.label_2.setScaledContents(True) + self.label_2.setObjectName(_fromUtf8("label_2")) + self.label_3 = QtGui.QLabel(self.osdagPage) + self.label_3.setGeometry(QtCore.QRect(740, 540, 84, 81)) + self.label_3.setText(_fromUtf8("")) + self.label_3.setPixmap(QtGui.QPixmap(_fromUtf8("../../Pictures/logo.png"))) + self.label_3.setScaledContents(True) + self.label_3.setObjectName(_fromUtf8("label_3")) + self.myStackedWidget.addWidget(self.osdagPage) + self.connectionPage = QtGui.QWidget() + self.connectionPage.setObjectName(_fromUtf8("connectionPage")) + self.gridLayout_2 = QtGui.QGridLayout(self.connectionPage) + self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2")) + self.myTabWidget = QtGui.QTabWidget(self.connectionPage) + font = QtGui.QFont() + font.setPointSize(12) + self.myTabWidget.setFont(font) + self.myTabWidget.setStyleSheet(_fromUtf8("QTabBar::tab { height: 30px; width: 180px; }\n" +"")) + self.myTabWidget.setTabShape(QtGui.QTabWidget.Rounded) + self.myTabWidget.setObjectName(_fromUtf8("myTabWidget")) + self.tab = QtGui.QWidget() + self.tab.setObjectName(_fromUtf8("tab")) + self.radioButton = QtGui.QRadioButton(self.tab) + self.radioButton.setGeometry(QtCore.QRect(50, 110, 137, 27)) + font = QtGui.QFont() + font.setPointSize(11) + self.radioButton.setFont(font) + self.radioButton.setStyleSheet(_fromUtf8("")) + self.radioButton.setObjectName(_fromUtf8("radioButton")) + self.radioButton_2 = QtGui.QRadioButton(self.tab) + self.radioButton_2.setGeometry(QtCore.QRect(50, 150, 137, 27)) + font = QtGui.QFont() + font.setPointSize(11) + self.radioButton_2.setFont(font) + self.radioButton_2.setObjectName(_fromUtf8("radioButton_2")) + self.radioButton_3 = QtGui.QRadioButton(self.tab) + self.radioButton_3.setGeometry(QtCore.QRect(50, 190, 137, 27)) + font = QtGui.QFont() + font.setPointSize(11) + self.radioButton_3.setFont(font) + self.radioButton_3.setObjectName(_fromUtf8("radioButton_3")) + self.pushButton_3 = QtGui.QPushButton(self.tab) + self.pushButton_3.setGeometry(QtCore.QRect(430, 400, 186, 32)) + font = QtGui.QFont() + font.setPointSize(12) + font.setBold(True) + font.setItalic(False) + font.setWeight(75) + self.pushButton_3.setFont(font) + self.pushButton_3.setStyleSheet(_fromUtf8("QPushButton {\n" +" color:#00ff00;\n" +" background-color:#5930ac;\n" +" border-style: outset;\n" +" border-width: 2px;\n" +" border-radius: 10px;\n" +" border-color: #00ff00;}\n" +"\n" +"QPushButton:pressed { background-color: #000000 }\n" +" \n" +"")) + self.pushButton_3.setObjectName(_fromUtf8("pushButton_3")) + self.radioButton_4 = QtGui.QRadioButton(self.tab) + self.radioButton_4.setGeometry(QtCore.QRect(50, 230, 137, 27)) + font = QtGui.QFont() + font.setPointSize(11) + self.radioButton_4.setFont(font) + self.radioButton_4.setObjectName(_fromUtf8("radioButton_4")) + self.myTabWidget.addTab(self.tab, _fromUtf8("")) + self.tab_2 = QtGui.QWidget() + self.tab_2.setObjectName(_fromUtf8("tab_2")) + self.myTabWidget.addTab(self.tab_2, _fromUtf8("")) + self.gridLayout_2.addWidget(self.myTabWidget, 0, 0, 1, 1) + self.myStackedWidget.addWidget(self.connectionPage) + self.tensionPage = QtGui.QWidget() + self.tensionPage.setObjectName(_fromUtf8("tensionPage")) + self.label_4 = QtGui.QLabel(self.tensionPage) + self.label_4.setGeometry(QtCore.QRect(380, 240, 211, 81)) + font = QtGui.QFont() + font.setPointSize(17) + font.setBold(True) + font.setItalic(True) + font.setWeight(75) + self.label_4.setFont(font) + self.label_4.setStyleSheet(_fromUtf8("QLabel{ color : #5930ac;}")) + self.label_4.setScaledContents(False) + self.label_4.setObjectName(_fromUtf8("label_4")) + self.myStackedWidget.addWidget(self.tensionPage) + self.gridLayout.addWidget(self.myStackedWidget, 0, 2, 1, 1) + self.verticalLayout.addLayout(self.gridLayout) + MainWindow.setCentralWidget(self.centralwidget) + self.menubar = QtGui.QMenuBar(MainWindow) + self.menubar.setGeometry(QtCore.QRect(0, 0, 1019, 30)) + self.menubar.setObjectName(_fromUtf8("menubar")) + MainWindow.setMenuBar(self.menubar) + + self.retranslateUi(MainWindow) + self.myStackedWidget.setCurrentIndex(1) + self.myTabWidget.setCurrentIndex(1) + QtCore.QMetaObject.connectSlotsByName(MainWindow) + + def retranslateUi(self, MainWindow): + MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None)) + __sortingEnabled = self.myListWidget.isSortingEnabled() + self.myListWidget.setSortingEnabled(False) + item = self.myListWidget.item(0) + item.setText(_translate("MainWindow", "Create :", None)) + item = self.myListWidget.item(1) + item.setText(_translate("MainWindow", "Connections", None)) + item = self.myListWidget.item(2) + item.setText(_translate("MainWindow", "Tesion Members", None)) + item = self.myListWidget.item(3) + item.setText(_translate("MainWindow", "Compression Members", None)) + item = self.myListWidget.item(4) + item.setText(_translate("MainWindow", "Flexural Members", None)) + item = self.myListWidget.item(5) + item.setText(_translate("MainWindow", "Beam-Column", None)) + item = self.myListWidget.item(6) + item.setText(_translate("MainWindow", "Plate Girders", None)) + item = self.myListWidget.item(7) + item.setText(_translate("MainWindow", "Gantry Girders", None)) + self.myListWidget.setSortingEnabled(__sortingEnabled) + self.pushButton_2.setText(_translate("MainWindow", "Help", None)) + self.pushButton.setText(_translate("MainWindow", "Open File", None)) + self.radioButton.setText(_translate("MainWindow", "Cleat", None)) + self.radioButton_2.setText(_translate("MainWindow", "End Plate", None)) + self.radioButton_3.setText(_translate("MainWindow", "Fin Plate", None)) + self.pushButton_3.setText(_translate("MainWindow", "Start", None)) + self.radioButton_4.setText(_translate("MainWindow", "Seated", None)) + self.myTabWidget.setTabText(self.myTabWidget.indexOf(self.tab), _translate("MainWindow", "Shear Connection", None)) + self.myTabWidget.setTabText(self.myTabWidget.indexOf(self.tab_2), _translate("MainWindow", "Moment", None)) + self.label_4.setText(_translate("MainWindow", "Comming soon!", None)) + -- cgit