Exemple #1
0
    def showConnection(self):

        folder = str(
            QtGui.QFileDialog.getSaveFileName(self,
                                              "Select Workspace Directory",
                                              "../../Osdag_Workspace",
                                              "File folder"))
        if not os.path.exists(folder):
            os.makedirs(folder, 0755)

        root_path = folder
        images_html_folder = ['images_html']
        for create_folder in images_html_folder:
            os.mkdir(os.path.join(root_path, create_folder))

        if self.ui.rdbtn_finplate.isChecked():
            launchFinPlateController(self, folder)
            self.ui.myStackedWidget.setCurrentIndex(0)

        elif self.ui.rdbtn_cleat.isChecked():
            launchCleatAngleController(self, folder)
            self.ui.myStackedWidget.setCurrentIndex(0)

        elif self.ui.rdbtn_endplate.isChecked():
            launchEndPlateController(self, folder)
            self.ui.myStackedWidget.setCurrentIndex(0)
            # QtGui.QMessageBox.about(self,"INFO","End plate connection design is coming soon!")

        elif self.ui.rdbtn_seat.isChecked():
            QtGui.QMessageBox.about(
                self, "INFO", "Seated connection design is coming soon!")

        else:
            QtGui.QMessageBox.about(self, "INFO",
                                    "Please select appropriate connection")
    def show_design_connection(self):

        config = ConfigParser.ConfigParser()
        config.readfp(open(r'Osdag.config'))
        default_workspace_path = config.get('default_workspace', 'path1')
        folder = QFileDialog.getExistingDirectory(self, 'Select Folder',
                                                  default_workspace_path)
        folder = str(folder)
        if not os.path.exists(folder):
            if folder == '':
                pass
            else:
                os.mkdir(folder, 0755)

        root_path = folder
        images_html_folder = ['images_html']
        flag = True
        for create_folder in images_html_folder:
            if root_path == '':
                flag = False
                return flag
            else:
                try:
                    os.mkdir(os.path.join(root_path, create_folder))
                except OSError:
                    shutil.rmtree(os.path.join(folder, create_folder))
                    os.mkdir(os.path.join(root_path, create_folder))

        if self.ui.rdbtn_finplate.isChecked():
            launchFinPlateController(self, folder)
            self.ui.myStackedWidget.setCurrentIndex(0)

        elif self.ui.rdbtn_cleat.isChecked():
            launch_cleatangle_controller(self, folder)
            self.ui.myStackedWidget.setCurrentIndex(0)

        elif self.ui.rdbtn_endplate.isChecked():
            launch_endplate_controller(self, folder)
            self.ui.myStackedWidget.setCurrentIndex(0)
            # QMessageBox.about(self,"INFO","End plate connection design is coming soon!")

        elif self.ui.rdbtn_seat.isChecked():
            launchSeatedAngleController(self, folder)
            self.ui.myStackedWidget.setCurrentIndex(0)

        else:
            QMessageBox.about(self, "INFO",
                              "Please select appropriate connection")
 def showFinPlate(self):
     
     if self.ui.finPlateRdBtn.isChecked():
         launchFinPlateController(self)
         
     elif self.ui.cleatRdBtn.isChecked():
         QtGui.QMessageBox.about(self,"INFO","Cleat connection design is coming soon!")
     
     elif self.ui.endPlateRdBtn.isChecked():
         QtGui.QMessageBox.about(self,"INFO","End plate connection design is coming soon!")
     
     elif self.ui.seatedRdBtn.isChecked():
         QtGui.QMessageBox.about(self,"INFO","Seated connection design is coming soon!")
     
     else:
         QtGui.QMessageBox.about(self,"INFO","Please select appropriate connection")
 def showFinPlate(self):
     
     if self.ui.finPlateRdBtn.isChecked():
         launchFinPlateController(self)
         
     elif self.ui.cleatRdBtn.isChecked():
         QtGui.QMessageBox.about(self,"INFO","Cleat connection design is coming soon!")
     
     elif self.ui.endPlateRdBtn.isChecked():
         QtGui.QMessageBox.about(self,"INFO","End plate connection design is coming soon!")
     
     elif self.ui.seatedRdBtn.isChecked():
         QtGui.QMessageBox.about(self,"INFO","Seated connection design is coming soon!")
     
     else:
         QtGui.QMessageBox.about(self,"INFO","Please select appropriate connection")
 def showConnection(self):
     
     if self.ui.rdbtn_finplate.isChecked():
         launchFinPlateController(self)
         self.ui.myStackedWidget.setCurrentIndex(0)
         
     elif self.ui.rdbtn_cleatangle.isChecked():
         QtGui.QMessageBox.about(self,"INFO","Cleat connection design is coming soon!")
     
     elif self.ui.rdbtn_endplate.isChecked():
         QtGui.QMessageBox.about(self,"INFO","End plate connection design is coming soon!")
     
     elif self.ui.rdbtn_seated.isChecked():
         QtGui.QMessageBox.about(self,"INFO","Seated connection design is coming soon!")
     
     else:
         QtGui.QMessageBox.about(self,"INFO","Please select appropriate connection")
Exemple #6
0
    def show_shear_connection(self):
        folder = self.select_workspace_folder()
        folder = str(folder)
        if not os.path.exists(folder):
            if folder == '':
                pass
            else:
                os.mkdir(folder, 0755)

        root_path = folder
        images_html_folder = ['images_html']
        flag = True
        for create_folder in images_html_folder:
            if root_path == '':
                flag = False
                return flag
            else:
                try:
                    os.mkdir(os.path.join(root_path, create_folder))
                except OSError:
                    shutil.rmtree(os.path.join(folder, create_folder))
                    os.mkdir(os.path.join(root_path, create_folder))

        if self.ui.rdbtn_finplate.isChecked():
            launchFinPlateController(self, folder)
            self.ui.myStackedWidget.setCurrentIndex(0)

        elif self.ui.rdbtn_cleat.isChecked():
            launch_cleatangle_controller(self, folder)
            self.ui.myStackedWidget.setCurrentIndex(0)

        elif self.ui.rdbtn_endplate.isChecked():
            launch_endplate_controller(self, folder)
            self.ui.myStackedWidget.setCurrentIndex(0)
        # QMessageBox.about(self,"INFO","End plate connection design is coming soon!")

        elif self.ui.rdbtn_seat.isChecked():
            launchSeatedAngleController(self, folder)
            self.ui.myStackedWidget.setCurrentIndex(0)

        else:
            QMessageBox.about(self, "INFO",
                              "Please select appropriate connection")
Exemple #7
0
    def showConnection(self):

        if self.ui.rdbtn_finplate.isChecked():
            launchFinPlateController(self)
            self.ui.myStackedWidget.setCurrentIndex(0)

        elif self.ui.rdbtn_cleat.isChecked():
            launchCleatAngleController(self)
            self.ui.myStackedWidget.setCurrentIndex(0)

        elif self.ui.rdbtn_endplate.isChecked():
            launchEndPlateController(self)
            self.ui.myStackedWidget.setCurrentIndex(0)
            # QtGui.QMessageBox.about(self,"INFO","End plate connection design is coming soon!")

        elif self.ui.rdbtn_seated.isChecked():
            QtGui.QMessageBox.about(
                self, "INFO", "Seated connection design is coming soon!")

        else:
            QtGui.QMessageBox.about(self, "INFO",
                                    "Please select appropriate connection")