コード例 #1
0
ファイル: UI_FifthTab.py プロジェクト: koukoujiang/DeployTool
    def setupUi(self, Form):
        self.LabelSrc = QLabel('请选择源路径', self)
        self.LineSrc = QLineEdit(Conf().GetLastFile_LabelSrc)
        self.BtnSrc = QPushButton('Src', self)
        #self.BtnSrc.clicked.connect(self.ButtonSrcShowDialog)

        self.LabelDst = QLabel('请选择目标路径', self)
        self.LineDst = QLineEdit(Conf().GetLastFile_LabelDst, self)
        self.BtnDst = QPushButton('Dst', self)
        #self.BtnDst.clicked.connect(self.ButtonDstShowDialog)

        self.CheckBoxKeyFile = QCheckBox('仅提取指定文件(文件名请用逗号隔开)', self)
        self.LineKeyFile = QLineEdit('', self)

        upgrid = QGridLayout()
        #grid.setSpacing(10)
        upgrid.addWidget(self.LabelSrc, 1, 0)
        upgrid.addWidget(self.LineSrc, 1, 1)
        upgrid.addWidget(self.BtnSrc, 1, 2)
        upgrid.addWidget(self.LabelDst, 2, 0)
        upgrid.addWidget(self.LineDst, 2, 1)
        upgrid.addWidget(self.BtnDst, 2, 2)
        upgrid.addWidget(self.CheckBoxKeyFile, 3, 0, Qt.AlignRight)
        upgrid.addWidget(
            self.LineKeyFile,
            3,
            1,
        )
        upgrid.setColumnStretch(0, 1)
        upgrid.setColumnStretch(1, 3)

        self.LabelTime = QLabel('请输入时间差,单位:小时', self)
        self.SpinBoxTime = QDoubleSpinBox()
        self.SpinBoxTime.setValue(1.00)
        self.SpinBoxTime.setMaximum(720.00)
        self.BtnGetLastFile = QPushButton('GetLastFile', self)
        #self.BtnGetLastFile.clicked.connect(self.FirstSinalEmit)

        h0layout = QHBoxLayout()
        h0layout.addWidget(self.LabelTime)
        h0layout.addWidget(self.SpinBoxTime)
        h0layout.addWidget(self.BtnGetLastFile)

        vlayout = QVBoxLayout()
        vlayout.addLayout(h0layout)

        MainGrid = QGridLayout()
        MainGrid.addLayout(upgrid, 0, 0)
        MainGrid.addLayout(vlayout, 1, 0)
        self.setLayout(MainGrid)

        #self.setWindowIcon(QIcon('image/icon.png'))
        self.setWindowTitle('DFRZ DeployTool')
コード例 #2
0
 def ButtonJudge(self):
     if self.ButtonGroup.checkedId() == 0:
         self.LabelChooseWebSite.setText(Conf().ServerPath_WebServer)
     elif self.ButtonGroup.checkedId() == 1:
         self.LabelChooseWebSite.setText(Conf().ServerPath_WebServer +
                                         Conf().ServerPath_Monitor)
     elif self.ButtonGroup.checkedId() == 2:
         self.LabelChooseWebSite.setText(Conf().ServerPath_WebServer +
                                         Conf().ServerPath_Admin)
     elif self.ButtonGroup.checkedId() == 3:
         self.LabelChooseWebSite.setText(Conf().ServerPath_WebServer +
                                         Conf().ServerPath_Cms)
     elif self.ButtonGroup.checkedId() == 4:
         self.LabelChooseWebSite.setText(Conf().ServerPath_WebServer +
                                         Conf().ServerPath_CS)
     elif self.ButtonGroup.checkedId() == 5:
         self.LabelChooseWebSite.setText(Conf().ServerPath_WebServer +
                                         Conf().ServerPath_Event)
     elif self.ButtonGroup.checkedId() == 6:
         self.LabelChooseWebSite.setText(Conf().ServerPath_WebServer +
                                         Conf().ServerPath_glwww)
     elif self.ButtonGroup.checkedId() == 7:
         self.LabelChooseWebSite.setText(Conf().ServerPath_WebServer +
                                         Conf().ServerPath_GqAdmin)
     elif self.ButtonGroup.checkedId() == 8:
         self.LabelChooseWebSite.setText(Conf().ServerPath_WebServer +
                                         Conf().ServerPath_M)
     elif self.ButtonGroup.checkedId() == 9:
         self.LabelChooseWebSite.setText(Conf().ServerPath_WebServer +
                                         Conf().ServerPath_MiRGJ)
     elif self.ButtonGroup.checkedId() == 10:
         self.LabelChooseWebSite.setText(Conf().ServerPath_WebServer +
                                         Conf().ServerPath_MiRZR)
     elif self.ButtonGroup.checkedId() == 11:
         self.LabelChooseWebSite.setText(Conf().ServerPath_WebServer +
                                         Conf().ServerPath_Open)
     elif self.ButtonGroup.checkedId() == 12:
         self.LabelChooseWebSite.setText(Conf().ServerPath_WebServer +
                                         Conf().ServerPath_Resource)
     elif self.ButtonGroup.checkedId() == 13:
         self.LabelChooseWebSite.setText(Conf().ServerPath_WebServer +
                                         Conf().ServerPath_RGJ)
     elif self.ButtonGroup.checkedId() == 14:
         self.LabelChooseWebSite.setText(Conf().ServerPath_WebServer +
                                         Conf().ServerPath_Stock)
     elif self.ButtonGroup.checkedId() == 15:
         self.LabelChooseWebSite.setText(Conf().ServerPath_WebServer +
                                         Conf().ServerPath_StockUserCenter)
     elif self.ButtonGroup.checkedId() == 16:
         self.LabelChooseWebSite.setText(Conf().ServerPath_WebServer +
                                         Conf().ServerPath_Strategy)
     elif self.ButtonGroup.checkedId() == 17:
         self.LabelChooseWebSite.setText(Conf().ServerPath_WebServer +
                                         Conf().ServerPath_UserCenter)
     elif self.ButtonGroup.checkedId() == 18:
         self.LabelChooseWebSite.setText(Conf().ServerPath_WebServer +
                                         Conf().ServerPath_WWW)
     elif self.ButtonGroup.checkedId() == 50:
         self.LabelChooseWebSite.setText(Conf().ServerPath_ApiServer)
     elif self.ButtonGroup.checkedId() == 51:
         self.LabelChooseWebSite.setText(Conf().ServerPath_ApiServer +
                                         Conf().ServerPath_APIGL)
     elif self.ButtonGroup.checkedId() == 52:
         self.LabelChooseWebSite.setText(Conf().ServerPath_ApiServer +
                                         Conf().ServerPath_APIGQ)
     elif self.ButtonGroup.checkedId() == 53:
         self.LabelChooseWebSite.setText(Conf().ServerPath_ApiServer +
                                         Conf().ServerPath_APIRGJ)
     elif self.ButtonGroup.checkedId() == 54:
         self.LabelChooseWebSite.setText(Conf().ServerPath_ApiServer +
                                         Conf().ServerPath_APIRZR)
コード例 #3
0
 def ButtonChooseFolder(self):
     fname = QFileDialog.getExistingDirectory(self, 'Open file',
                                              Conf().DeployAndBackup_Src)
     self.LineChooseFolder.setText(fname)
コード例 #4
0
 def ButtonDstShowDialog(self):
     fname = QFileDialog.getExistingDirectory(self, 'Open file',
                                              Conf().GetLastFile_Dst)
     self.LineDst.setText(fname)
コード例 #5
0
 def ButtonSrcShowDialog(self):
     fname = QFileDialog.getExistingDirectory(self, 'Open file',
                                              Conf().GetLastFile_Src)
     self.LineSrc.setText(fname)
コード例 #6
0
    def setupUi(self, Form):

        self.ButtonGroup = QButtonGroup()
        SecondGrid = QGridLayout()

        self.CheckBox_0 = QCheckBox('WebServer', self)
        self.CheckBox_1 = QCheckBox(Conf().ServerPath_Monitor, self)
        self.CheckBox_2 = QCheckBox(Conf().ServerPath_Admin, self)
        self.CheckBox_3 = QCheckBox(Conf().ServerPath_Cms, self)
        self.CheckBox_4 = QCheckBox(Conf().ServerPath_CS, self)
        self.CheckBox_5 = QCheckBox(Conf().ServerPath_Event, self)
        self.CheckBox_6 = QCheckBox(Conf().ServerPath_glwww, self)
        self.CheckBox_7 = QCheckBox(Conf().ServerPath_GqAdmin, self)
        self.CheckBox_8 = QCheckBox(Conf().ServerPath_M, self)
        self.CheckBox_9 = QCheckBox(Conf().ServerPath_MiRGJ, self)
        self.CheckBox_10 = QCheckBox(Conf().ServerPath_MiRZR, self)
        self.CheckBox_11 = QCheckBox(Conf().ServerPath_Open, self)
        self.CheckBox_12 = QCheckBox(Conf().ServerPath_Resource, self)
        self.CheckBox_13 = QCheckBox(Conf().ServerPath_RGJ, self)
        self.CheckBox_14 = QCheckBox(Conf().ServerPath_Stock, self)
        self.CheckBox_15 = QCheckBox(Conf().ServerPath_StockUserCenter, self)
        self.CheckBox_16 = QCheckBox(Conf().ServerPath_Strategy, self)
        self.CheckBox_17 = QCheckBox(Conf().ServerPath_UserCenter, self)
        a = 2
        b = 1
        if b < a:
            self.CheckBox_18 = QCheckBox(Conf().ServerPath_WWW, self)
            self.ButtonGroup.addButton(self.CheckBox_18, 18)
            SecondGrid.addWidget(self.CheckBox_18, 9, 1)

        self.CheckBox_50 = QCheckBox('ApiServer', self)
        self.CheckBox_51 = QCheckBox(Conf().ServerPath_APIGL, self)
        self.CheckBox_52 = QCheckBox(Conf().ServerPath_APIGQ, self)
        self.CheckBox_53 = QCheckBox(Conf().ServerPath_APIRGJ, self)
        self.CheckBox_53 = QCheckBox(Conf().ServerPath_APIRZR, self)

        self.LabelChooseWebSite = QLabel('Please choose the website', self)
        self.LabelWebSiteConf = QLabel('Web站点配置文件名:' + '  ' + 'WebSite.conf',
                                       self)

        self.ButtonGroup.addButton(self.CheckBox_0, 0)
        self.ButtonGroup.addButton(self.CheckBox_1, 1)
        self.ButtonGroup.addButton(self.CheckBox_2, 2)
        self.ButtonGroup.addButton(self.CheckBox_3, 3)
        self.ButtonGroup.addButton(self.CheckBox_4, 4)
        self.ButtonGroup.addButton(self.CheckBox_5, 5)
        self.ButtonGroup.addButton(self.CheckBox_6, 6)
        self.ButtonGroup.addButton(self.CheckBox_7, 7)
        self.ButtonGroup.addButton(self.CheckBox_8, 8)
        self.ButtonGroup.addButton(self.CheckBox_9, 9)
        self.ButtonGroup.addButton(self.CheckBox_10, 10)
        self.ButtonGroup.addButton(self.CheckBox_11, 11)
        self.ButtonGroup.addButton(self.CheckBox_12, 12)
        self.ButtonGroup.addButton(self.CheckBox_13, 13)
        self.ButtonGroup.addButton(self.CheckBox_14, 14)
        self.ButtonGroup.addButton(self.CheckBox_15, 15)
        self.ButtonGroup.addButton(self.CheckBox_16, 16)
        self.ButtonGroup.addButton(self.CheckBox_17, 17)

        self.ButtonGroup.addButton(self.CheckBox_50, 50)
        self.ButtonGroup.addButton(self.CheckBox_51, 51)
        self.ButtonGroup.addButton(self.CheckBox_52, 52)
        self.ButtonGroup.addButton(self.CheckBox_53, 53)

        self.ButtonGroup.buttonClicked.connect(self.ButtonJudge)

        self.BtnOK = QPushButton('OK', self)
        self.BtnOK.clicked.connect(self.accept)

        SecondGrid.addWidget(self.CheckBox_0, 0, 0)
        SecondGrid.addWidget(self.CheckBox_1, 1, 0)
        SecondGrid.addWidget(self.CheckBox_2, 1, 1)
        SecondGrid.addWidget(self.CheckBox_3, 2, 0)
        SecondGrid.addWidget(self.CheckBox_4, 2, 1)
        SecondGrid.addWidget(self.CheckBox_5, 3, 0)
        SecondGrid.addWidget(self.CheckBox_6, 3, 1)
        SecondGrid.addWidget(self.CheckBox_7, 4, 0)
        SecondGrid.addWidget(self.CheckBox_8, 4, 1)
        SecondGrid.addWidget(self.CheckBox_9, 5, 0)
        SecondGrid.addWidget(self.CheckBox_10, 5, 1)
        SecondGrid.addWidget(self.CheckBox_11, 6, 0)
        SecondGrid.addWidget(self.CheckBox_12, 6, 1)
        SecondGrid.addWidget(self.CheckBox_13, 7, 0)
        SecondGrid.addWidget(self.CheckBox_14, 7, 1)
        SecondGrid.addWidget(self.CheckBox_15, 8, 0)
        SecondGrid.addWidget(self.CheckBox_16, 8, 1)
        SecondGrid.addWidget(self.CheckBox_17, 9, 0)

        SecondGrid.addWidget(self.CheckBox_50, 10, 0)
        SecondGrid.addWidget(self.CheckBox_51, 11, 0)
        SecondGrid.addWidget(self.CheckBox_52, 11, 1)
        SecondGrid.addWidget(self.CheckBox_53, 12, 0)

        SecondGrid.addWidget(self.LabelWebSiteConf, 14, 0)
        SecondGrid.addWidget(self.LabelChooseWebSite, 15, 0)
        SecondGrid.addWidget(self.BtnOK, 16, 1)

        self.setLayout(SecondGrid)
        self.setGeometry(300, 300, 800, 600)
        self.setWindowIcon(QIcon('image/icon.png'))
        self.setWindowTitle('DFRZ DeployTool')