def __init__(self):
        # REG WINDOW
        super(Window, self).__init__()
        self.setGeometry(810, 415, 300, 250)
        self.setWindowTitle("NodeMA Tool")

        extractAction = QtGui.QAction("&Open File...", self)
        extractAction.setShortcut("Ctrl+O")

        mainMenu = self.menuBar()
        fileMenu = mainMenu.addMenu('&File')
        fileMenu.addAction(extractAction)
        extractAction.triggered.connect(self.showOpenFileWin)

        self.intro()
Ejemplo n.º 2
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(1115, 652)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.horizontalLayout_2 = QtGui.QHBoxLayout(self.centralwidget)
        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
        self.tabMain = QtGui.QTabWidget(self.centralwidget)
        self.tabMain.setObjectName(_fromUtf8("tabMain"))
        self.tab = QtGui.QWidget()
        self.tab.setObjectName(_fromUtf8("tab"))
        self.verticalLayout_3 = QtGui.QVBoxLayout(self.tab)
        self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
        self.gridLayout_4 = QtGui.QGridLayout()
        self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4"))
        self.label_6 = QtGui.QLabel(self.tab)
        self.label_6.setObjectName(_fromUtf8("label_6"))
        self.gridLayout_4.addWidget(self.label_6, 0, 0, 1, 1)
        self.txtLambda0 = QtGui.QLineEdit(self.tab)
        self.txtLambda0.setAlignment(QtCore.Qt.AlignRight
                                     | QtCore.Qt.AlignTrailing
                                     | QtCore.Qt.AlignVCenter)
        self.txtLambda0.setObjectName(_fromUtf8("txtLambda0"))
        self.gridLayout_4.addWidget(self.txtLambda0, 0, 1, 1, 1)
        self.label = QtGui.QLabel(self.tab)
        self.label.setObjectName(_fromUtf8("label"))
        self.gridLayout_4.addWidget(self.label, 1, 0, 1, 1)
        self.cbSuperstrate = QtGui.QComboBox(self.tab)
        font = QtGui.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.cbSuperstrate.setFont(font)
        self.cbSuperstrate.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.cbSuperstrate.setStyleSheet(_fromUtf8("text-align: right;"))
        self.cbSuperstrate.setEditable(True)
        self.cbSuperstrate.setObjectName(_fromUtf8("cbSuperstrate"))
        self.gridLayout_4.addWidget(self.cbSuperstrate, 1, 1, 1, 1)
        self.verticalLayout_3.addLayout(self.gridLayout_4)
        self.tblStack = QtGui.QTableWidget(self.tab)
        self.tblStack.setHorizontalScrollBarPolicy(
            QtCore.Qt.ScrollBarAlwaysOff)
        self.tblStack.setAlternatingRowColors(True)
        self.tblStack.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)
        self.tblStack.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
        self.tblStack.setObjectName(_fromUtf8("tblStack"))
        self.tblStack.setColumnCount(2)
        self.tblStack.setRowCount(1)
        item = QtGui.QTableWidgetItem()
        self.tblStack.setVerticalHeaderItem(0, item)
        item = QtGui.QTableWidgetItem()
        self.tblStack.setHorizontalHeaderItem(0, item)
        item = QtGui.QTableWidgetItem()
        self.tblStack.setHorizontalHeaderItem(1, item)
        item = QtGui.QTableWidgetItem()
        item.setTextAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
        self.tblStack.setItem(0, 0, item)
        item = QtGui.QTableWidgetItem()
        self.tblStack.setItem(0, 1, item)
        self.tblStack.horizontalHeader().setSortIndicatorShown(False)
        self.tblStack.horizontalHeader().setStretchLastSection(True)
        self.tblStack.verticalHeader().setVisible(False)
        self.verticalLayout_3.addWidget(self.tblStack)
        self.horizontalLayout_7 = QtGui.QHBoxLayout()
        self.horizontalLayout_7.setObjectName(_fromUtf8("horizontalLayout_7"))
        self.btnAddLayer = QtGui.QPushButton(self.tab)
        self.btnAddLayer.setText(_fromUtf8(""))
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(_fromUtf8("gui/icons/list-add.svg")),
                       QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.btnAddLayer.setIcon(icon)
        self.btnAddLayer.setObjectName(_fromUtf8("btnAddLayer"))
        self.horizontalLayout_7.addWidget(self.btnAddLayer)
        self.btnRemoveLayer = QtGui.QPushButton(self.tab)
        self.btnRemoveLayer.setText(_fromUtf8(""))
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(_fromUtf8("gui/icons/list-remove.svg")),
                        QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.btnRemoveLayer.setIcon(icon1)
        self.btnRemoveLayer.setObjectName(_fromUtf8("btnRemoveLayer"))
        self.horizontalLayout_7.addWidget(self.btnRemoveLayer)
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                       QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_7.addItem(spacerItem)
        self.verticalLayout_3.addLayout(self.horizontalLayout_7)
        self.horizontalLayout_4 = QtGui.QHBoxLayout()
        self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4"))
        self.label_2 = QtGui.QLabel(self.tab)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.horizontalLayout_4.addWidget(self.label_2)
        self.cbSubstrate = QtGui.QComboBox(self.tab)
        self.cbSubstrate.setEditable(True)
        self.cbSubstrate.setObjectName(_fromUtf8("cbSubstrate"))
        self.horizontalLayout_4.addWidget(self.cbSubstrate)
        self.verticalLayout_3.addLayout(self.horizontalLayout_4)
        self.tabMain.addTab(self.tab, _fromUtf8(""))
        self.tab_3 = QtGui.QWidget()
        self.tab_3.setObjectName(_fromUtf8("tab_3"))
        self.tabMain.addTab(self.tab_3, _fromUtf8(""))
        self.tab_2 = QtGui.QWidget()
        self.tab_2.setObjectName(_fromUtf8("tab_2"))
        self.verticalLayout_4 = QtGui.QVBoxLayout(self.tab_2)
        self.verticalLayout_4.setObjectName(_fromUtf8("verticalLayout_4"))
        self.horizontalLayout_11 = QtGui.QHBoxLayout()
        self.horizontalLayout_11.setObjectName(
            _fromUtf8("horizontalLayout_11"))
        self.label_5 = QtGui.QLabel(self.tab_2)
        self.label_5.setObjectName(_fromUtf8("label_5"))
        self.horizontalLayout_11.addWidget(self.label_5)
        self.cbPlotType = QtGui.QComboBox(self.tab_2)
        self.cbPlotType.setObjectName(_fromUtf8("cbPlotType"))
        self.horizontalLayout_11.addWidget(self.cbPlotType)
        self.horizontalLayout_11.setStretch(1, 1)
        self.verticalLayout_4.addLayout(self.horizontalLayout_11)
        self.groupBox = QtGui.QGroupBox(self.tab_2)
        self.groupBox.setMinimumSize(QtCore.QSize(0, 0))
        self.groupBox.setMaximumSize(QtCore.QSize(16777215, 220))
        self.groupBox.setObjectName(_fromUtf8("groupBox"))
        self.horizontalLayout_8 = QtGui.QHBoxLayout(self.groupBox)
        self.horizontalLayout_8.setObjectName(_fromUtf8("horizontalLayout_8"))
        self.horizontalLayout_9 = QtGui.QHBoxLayout()
        self.horizontalLayout_9.setObjectName(_fromUtf8("horizontalLayout_9"))
        self.groupBox_2 = QtGui.QGroupBox(self.groupBox)
        self.groupBox_2.setObjectName(_fromUtf8("groupBox_2"))
        self.gridLayout = QtGui.QGridLayout(self.groupBox_2)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.lineEdit_2 = QtGui.QLineEdit(self.groupBox_2)
        self.lineEdit_2.setEnabled(False)
        self.lineEdit_2.setMaximumSize(QtCore.QSize(50, 16777215))
        self.lineEdit_2.setObjectName(_fromUtf8("lineEdit_2"))
        self.gridLayout.addWidget(self.lineEdit_2, 2, 2, 1, 1)
        self.radioButton = QtGui.QRadioButton(self.groupBox_2)
        self.radioButton.setChecked(True)
        self.radioButton.setObjectName(_fromUtf8("radioButton"))
        self.gridLayout.addWidget(self.radioButton, 0, 0, 1, 3)
        self.lineEdit = QtGui.QLineEdit(self.groupBox_2)
        self.lineEdit.setEnabled(False)
        self.lineEdit.setMaximumSize(QtCore.QSize(50, 16777215))
        self.lineEdit.setObjectName(_fromUtf8("lineEdit"))
        self.gridLayout.addWidget(self.lineEdit, 2, 0, 1, 1)
        self.label_3 = QtGui.QLabel(self.groupBox_2)
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.gridLayout.addWidget(self.label_3, 2, 1, 1, 1)
        self.radioButton_2 = QtGui.QRadioButton(self.groupBox_2)
        self.radioButton_2.setObjectName(_fromUtf8("radioButton_2"))
        self.gridLayout.addWidget(self.radioButton_2, 1, 0, 1, 3)
        self.horizontalLayout_9.addWidget(self.groupBox_2)
        self.groupBox_3 = QtGui.QGroupBox(self.groupBox)
        self.groupBox_3.setObjectName(_fromUtf8("groupBox_3"))
        self.verticalLayout_2 = QtGui.QVBoxLayout(self.groupBox_3)
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        self.radioButton_3 = QtGui.QRadioButton(self.groupBox_3)
        self.radioButton_3.setChecked(True)
        self.radioButton_3.setObjectName(_fromUtf8("radioButton_3"))
        self.verticalLayout_2.addWidget(self.radioButton_3)
        self.radioButton_4 = QtGui.QRadioButton(self.groupBox_3)
        self.radioButton_4.setObjectName(_fromUtf8("radioButton_4"))
        self.verticalLayout_2.addWidget(self.radioButton_4)
        self.horizontalLayout_9.addWidget(self.groupBox_3)
        self.horizontalLayout_8.addLayout(self.horizontalLayout_9)
        self.verticalLayout_4.addWidget(self.groupBox)
        self.groupBox_4 = QtGui.QGroupBox(self.tab_2)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.groupBox_4.sizePolicy().hasHeightForWidth())
        self.groupBox_4.setSizePolicy(sizePolicy)
        self.groupBox_4.setMinimumSize(QtCore.QSize(0, 0))
        self.groupBox_4.setMaximumSize(QtCore.QSize(16777215, 220))
        self.groupBox_4.setObjectName(_fromUtf8("groupBox_4"))
        self.horizontalLayout_6 = QtGui.QHBoxLayout(self.groupBox_4)
        self.horizontalLayout_6.setObjectName(_fromUtf8("horizontalLayout_6"))
        self.horizontalLayout_10 = QtGui.QHBoxLayout()
        self.horizontalLayout_10.setObjectName(
            _fromUtf8("horizontalLayout_10"))
        self.groupBox_5 = QtGui.QGroupBox(self.groupBox_4)
        self.groupBox_5.setObjectName(_fromUtf8("groupBox_5"))
        self.gridLayout_2 = QtGui.QGridLayout(self.groupBox_5)
        self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
        self.radioButton_7 = QtGui.QRadioButton(self.groupBox_5)
        self.radioButton_7.setChecked(True)
        self.radioButton_7.setObjectName(_fromUtf8("radioButton_7"))
        self.gridLayout_2.addWidget(self.radioButton_7, 0, 0, 1, 3)
        self.radioButton_8 = QtGui.QRadioButton(self.groupBox_5)
        self.radioButton_8.setObjectName(_fromUtf8("radioButton_8"))
        self.gridLayout_2.addWidget(self.radioButton_8, 1, 0, 1, 3)
        self.lineEdit_3 = QtGui.QLineEdit(self.groupBox_5)
        self.lineEdit_3.setEnabled(False)
        self.lineEdit_3.setMaximumSize(QtCore.QSize(50, 16777215))
        self.lineEdit_3.setObjectName(_fromUtf8("lineEdit_3"))
        self.gridLayout_2.addWidget(self.lineEdit_3, 2, 0, 1, 1)
        self.label_4 = QtGui.QLabel(self.groupBox_5)
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.gridLayout_2.addWidget(self.label_4, 2, 1, 1, 1)
        self.lineEdit_4 = QtGui.QLineEdit(self.groupBox_5)
        self.lineEdit_4.setEnabled(False)
        self.lineEdit_4.setMaximumSize(QtCore.QSize(50, 16777215))
        self.lineEdit_4.setObjectName(_fromUtf8("lineEdit_4"))
        self.gridLayout_2.addWidget(self.lineEdit_4, 2, 2, 1, 1)
        self.horizontalLayout_10.addWidget(self.groupBox_5)
        self.groupBox_6 = QtGui.QGroupBox(self.groupBox_4)
        self.groupBox_6.setObjectName(_fromUtf8("groupBox_6"))
        self.verticalLayout_5 = QtGui.QVBoxLayout(self.groupBox_6)
        self.verticalLayout_5.setObjectName(_fromUtf8("verticalLayout_5"))
        self.radioButton_5 = QtGui.QRadioButton(self.groupBox_6)
        self.radioButton_5.setChecked(True)
        self.radioButton_5.setObjectName(_fromUtf8("radioButton_5"))
        self.verticalLayout_5.addWidget(self.radioButton_5)
        self.radioButton_6 = QtGui.QRadioButton(self.groupBox_6)
        self.radioButton_6.setObjectName(_fromUtf8("radioButton_6"))
        self.verticalLayout_5.addWidget(self.radioButton_6)
        self.horizontalLayout_10.addWidget(self.groupBox_6)
        self.horizontalLayout_6.addLayout(self.horizontalLayout_10)
        self.verticalLayout_4.addWidget(self.groupBox_4)
        self.groupBox_7 = QtGui.QGroupBox(self.tab_2)
        self.groupBox_7.setObjectName(_fromUtf8("groupBox_7"))
        self.gridLayout_3 = QtGui.QGridLayout(self.groupBox_7)
        self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3"))
        self.listWidget = QtGui.QListWidget(self.groupBox_7)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
                                       QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.listWidget.sizePolicy().hasHeightForWidth())
        self.listWidget.setSizePolicy(sizePolicy)
        self.listWidget.setMaximumSize(QtCore.QSize(130, 16777215))
        self.listWidget.setObjectName(_fromUtf8("listWidget"))
        self.gridLayout_3.addWidget(self.listWidget, 0, 0, 5, 1)
        self.pushButton = QtGui.QPushButton(self.groupBox_7)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
                                       QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.pushButton.sizePolicy().hasHeightForWidth())
        self.pushButton.setSizePolicy(sizePolicy)
        self.pushButton.setObjectName(_fromUtf8("pushButton"))
        self.gridLayout_3.addWidget(self.pushButton, 0, 1, 1, 1)
        self.pushButton_5 = QtGui.QPushButton(self.groupBox_7)
        self.pushButton_5.setObjectName(_fromUtf8("pushButton_5"))
        self.gridLayout_3.addWidget(self.pushButton_5, 1, 1, 1, 1)
        self.pushButton_4 = QtGui.QPushButton(self.groupBox_7)
        self.pushButton_4.setObjectName(_fromUtf8("pushButton_4"))
        self.gridLayout_3.addWidget(self.pushButton_4, 2, 1, 1, 1)
        self.pushButton_2 = QtGui.QPushButton(self.groupBox_7)
        self.pushButton_2.setObjectName(_fromUtf8("pushButton_2"))
        self.gridLayout_3.addWidget(self.pushButton_2, 3, 1, 1, 1)
        self.pushButton_3 = QtGui.QPushButton(self.groupBox_7)
        self.pushButton_3.setObjectName(_fromUtf8("pushButton_3"))
        self.gridLayout_3.addWidget(self.pushButton_3, 4, 1, 1, 1)
        self.gridLayout_3.setColumnMinimumWidth(0, 1)
        self.verticalLayout_4.addWidget(self.groupBox_7)
        spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
                                        QtGui.QSizePolicy.Expanding)
        self.verticalLayout_4.addItem(spacerItem1)
        self.tabMain.addTab(self.tab_2, _fromUtf8(""))
        self.horizontalLayout_2.addWidget(self.tabMain)
        self.verticalLayout = QtGui.QVBoxLayout()
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.pltMain = MatplotlibWidget(self.centralwidget)
        self.pltMain.setObjectName(_fromUtf8("pltMain"))
        self.verticalLayout.addWidget(self.pltMain)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        spacerItem2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                        QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem2)
        self.btnUpdate = QtGui.QPushButton(self.centralwidget)
        self.btnUpdate.setObjectName(_fromUtf8("btnUpdate"))
        self.horizontalLayout.addWidget(self.btnUpdate)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.horizontalLayout_2.addLayout(self.verticalLayout)
        self.horizontalLayout_2.setStretch(1, 1)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1115, 21))
        self.menubar.setObjectName(_fromUtf8("menubar"))
        self.menuFile = QtGui.QMenu(self.menubar)
        self.menuFile.setObjectName(_fromUtf8("menuFile"))
        self.menuPlot = QtGui.QMenu(self.menubar)
        self.menuPlot.setObjectName(_fromUtf8("menuPlot"))
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        MainWindow.setStatusBar(self.statusbar)
        self.actionQuit = QtGui.QAction(MainWindow)
        self.actionQuit.setObjectName(_fromUtf8("actionQuit"))
        self.actionNew = QtGui.QAction(MainWindow)
        self.actionNew.setObjectName(_fromUtf8("actionNew"))
        self.actionSave = QtGui.QAction(MainWindow)
        self.actionSave.setObjectName(_fromUtf8("actionSave"))
        self.actionOpen = QtGui.QAction(MainWindow)
        self.actionOpen.setObjectName(_fromUtf8("actionOpen"))
        self.actionExport = QtGui.QAction(MainWindow)
        self.actionExport.setObjectName(_fromUtf8("actionExport"))
        self.menuFile.addAction(self.actionNew)
        self.menuFile.addAction(self.actionOpen)
        self.menuFile.addAction(self.actionSave)
        self.menuFile.addSeparator()
        self.menuFile.addAction(self.actionQuit)
        self.menuPlot.addAction(self.actionExport)
        self.menubar.addAction(self.menuFile.menuAction())
        self.menubar.addAction(self.menuPlot.menuAction())

        self.retranslateUi(MainWindow)
        self.tabMain.setCurrentIndex(0)
        QtCore.QObject.connect(self.actionQuit,
                               QtCore.SIGNAL(_fromUtf8("triggered()")),
                               MainWindow.close)
        QtCore.QObject.connect(self.radioButton_2,
                               QtCore.SIGNAL(_fromUtf8("toggled(bool)")),
                               self.lineEdit.setEnabled)
        QtCore.QObject.connect(self.radioButton_2,
                               QtCore.SIGNAL(_fromUtf8("toggled(bool)")),
                               self.lineEdit_2.setEnabled)
        QtCore.QObject.connect(self.radioButton_8,
                               QtCore.SIGNAL(_fromUtf8("toggled(bool)")),
                               self.lineEdit_3.setEnabled)
        QtCore.QObject.connect(self.radioButton_8,
                               QtCore.SIGNAL(_fromUtf8("toggled(bool)")),
                               self.lineEdit_4.setEnabled)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)