本文整理匯總了Python中gui.Ui_MainWindow.__init__方法的典型用法代碼示例。如果您正苦於以下問題:Python Ui_MainWindow.__init__方法的具體用法?Python Ui_MainWindow.__init__怎麽用?Python Ui_MainWindow.__init__使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類gui.Ui_MainWindow
的用法示例。
在下文中一共展示了Ui_MainWindow.__init__方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: from gui import Ui_MainWindow [as 別名]
# 或者: from gui.Ui_MainWindow import __init__ [as 別名]
def __init__(self, dialog):
Ui_MainWindow.__init__(self)
self.setupUi(dialog)
self.scriptOpen.clicked.connect(self.getFileName)
self.targetOpen.clicked.connect(self.getTargetName)
self.convertPy.clicked.connect(self.pyConvert)
self.process = QtCore.QProcess()
self.process.readyRead.connect(self.dataReady)
self.process.started.connect(lambda: self.convertPy.setEnabled(False))
self.process.finished.connect(lambda: self.convertPy.setEnabled(True))
示例2: __init__
# 需要導入模塊: from gui import Ui_MainWindow [as 別名]
# 或者: from gui.Ui_MainWindow import __init__ [as 別名]
def __init__(self):
QtGui.QMainWindow.__init__(self)
Ui_MainWindow.__init__(self)
self.setupUi(self)
#initialize a rank array to hold all the scores
self.rank = []
self.count = 0
#string holder for displaying score
self.outputRank = ""
#figure->canvas->widget
self.figure = plt.figure()
self.canvas = FigureCanvas(self.figure)
self.canvas.setParent(self.widget)
#events
self.pushButton.clicked.connect(self.pushButton_clicked)
self.pushButton_2.clicked.connect(self.pushButton_clicked)
self.pushButton_3.clicked.connect(self.results)
self.pushButton_4.clicked.connect(self.ranks)
示例3: __init__
# 需要導入模塊: from gui import Ui_MainWindow [as 別名]
# 或者: from gui.Ui_MainWindow import __init__ [as 別名]
def __init__(self, parent=None):
Ui_MainWindow.__init__(self)
QMainWindow.__init__(self)
self.setupUi(self)
self.btn_take_screenshot.clicked.connect(self.btn_take_screenshot_clicked)
self.btn_save.clicked.connect(self.btn_save_clicked)
self.btn_upload.clicked.connect(self.btn_upload_clicked)
self.progress_bar.hide()
self.screenshot = None
self.supported_extensions = ['png', 'bmp', 'jpeg', 'jpg']
# create filter
self.filter = "Images ({})".format(' '.join(
("*." + extension) for extension in self.supported_extensions))
# load app settings
self.settings = QSettings('ppkt', 'python_uploader')
self._take_screenshot()
示例4: __init__
# 需要導入模塊: from gui import Ui_MainWindow [as 別名]
# 或者: from gui.Ui_MainWindow import __init__ [as 別名]
def __init__(self, *args):
QtGui.QMainWindow.__init__(self, *args)
Ui_MainWindow.__init__(self, self)
self.mode = QtGui.QApplication.arguments()[2]
self.create_connects_for_proxy_editing()
self.set_registry_path()
if self.mode == "admin":
if self.get_bitbox_install_path():
self.set_bitbox_current_settings()
else:
self.set_default_policy()
self.MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow",
"Security Policy Manager - Administrator Mode", None, QtGui.QApplication.UnicodeUTF8))
self.create_load_button()
self.create_connects_admin_mode()
else:
if self.get_bitbox_install_path():
self.MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow",
"Security Policy Manager - User Mode", None, QtGui.QApplication.UnicodeUTF8))
self.create_reset_button()
self.create_connects_user_mode()
self.set_bitbox_current_settings()
else:
sys.exit(0)
示例5: __init__
# 需要導入模塊: from gui import Ui_MainWindow [as 別名]
# 或者: from gui.Ui_MainWindow import __init__ [as 別名]
def __init__(self):
QtGui.QMainWindow.__init__(self)
Ui_MainWindow.__init__(self)
self.setupUi(self)
self.downloadlist = []
self.threads = []
self.loadpdfjs = False
self.downloading = False
self.checkforpdfupdates = False
self.deletingoldpdfs = False
self.downlopdedpdfs = False
self.usecsszoom = False
self.fullScreen = False
self.filename = ''
self.combohighlighted = 0
self.lastprogramupdatechecktime = 1
self.lastpdfupdatechecktime = 1
self.pdftoimagesdpi = 150
self.currentpdfpage = 1
self.numofpdfpages = 0
self.currenthtmlpath = str
self.doubleSpinBox.valueChanged.connect(self.setzoomincss)
self.spinBox_4.valueChanged.connect(self.setpdfdpi)
self.tabWidget.currentChanged.connect(self.tabchangedwindowtitle)
self.checkBox.stateChanged.connect(self.pdfjscheckboxstatechanged)
self.checkBox_5.stateChanged.connect(self.cssscalecheckboxstatechanged)
self.comboBox.highlighted.connect(self.comboboxlasthighlighted)
self.Intbuttonmaxima.pressed.connect(lambda: self.loadurl(self.Intbuttonmaxima))
self.Intbuttonnorfa.clicked.connect(lambda: self.loadurl(self.Intbuttonnorfa))
self.Intbuttoniki.clicked.connect(lambda: self.loadurl(self.Intbuttoniki))
self.Intbuttonrimi.clicked.connect(lambda: self.loadurl(self.Intbuttonrimi))
self.intbuttonaibe.clicked.connect(lambda: self.loadurl(self.intbuttonaibe))
self.intbuttonFRESH_MARKET.clicked.connect(lambda: self.loadurl(self.intbuttonFRESH_MARKET))
self.intbuttonSenukai.clicked.connect(lambda: self.loadurl(self.intbuttonSenukai))
self.intbuttonMoki_Vezi.clicked.connect(lambda: self.loadurl(self.intbuttonMoki_Vezi))
self.intbuttonJysk.clicked.connect(lambda: self.loadurl(self.intbuttonJysk))
self.intbuttonPROMO.clicked.connect(lambda: self.loadurl(self.intbuttonPROMO))
self.intbuttonPRISMA.clicked.connect(lambda: self.loadurl(self.intbuttonPRISMA))
self.intbuttonEUROKOS.clicked.connect(lambda: self.loadurl(self.intbuttonEUROKOS))
self.intbuttonDrogas.clicked.connect(lambda: self.loadurl(self.intbuttonDrogas))
self.intbuttonERMITAZAS.clicked.connect(lambda: self.loadurl(self.intbuttonERMITAZAS))
self.pushButton_22.clicked.connect(lambda: self.webView.load(QtCore.QUrl("about:blank")))
self.pushButton.clicked.connect(self.webView.reload)
self.pushButton_3.clicked.connect(self.webView.stop)
self.pushButton_4.clicked.connect(self.webView.forward)
self.pushButton_5.clicked.connect(self.webView.back)
self.pushButton_2.clicked.connect(self.loadurlfromlineedit)
self.pushButton_7.clicked.connect(self.checkforprogramupdates)
self.pushButton_8.clicked.connect(lambda: self.deleteoldpdfs(self.spinBox.value()))
self.pushButton_8.clicked.connect(self.stupidworkaround)
self.pushButton_10.clicked.connect(self.deleteimages)
self.pushButton_6.clicked.connect(self.nextpage)
self.pushButton_11.clicked.connect(self.previouspage)
self.pushButton_12.clicked.connect(self.addbookmarks)
self.pushButton_13.clicked.connect(self.switchtab)
# self.pushButton_10.setEnabled(False)
self.webView.loadStarted.connect(self.updatelineedit)
self.webView.loadFinished.connect(self.updatelineedit)
self.webView.urlChanged.connect(self.updatelineedit)
self.webView.linkClicked.connect(self.webviewlinkclicked)
self.webView.statusBarMessage.connect(self.webviewstatusbarmessage)
self.webView.titleChanged.connect(self.webviewtitlechanged)
self.lineEdit.returnPressed.connect(self.loadurlfromlineedit)
self.webView.loadProgress.connect(self.pageloadprogress)
self.pushButtondownloadpdf.clicked.connect(self.updatepdfs)
self.comboBox.activated.connect(self.loadsite)
self.comboBox_2.activated.connect(lambda: self.loadpdf(self.comboBox_2))
self.comboBox_3.activated.connect(lambda: self.loadpdf(self.comboBox_3))
self.comboBox_4.activated.connect(lambda: self.loadpdf(self.comboBox_4))
self.comboBox_6.activated.connect(lambda: self.loadpdf(self.comboBox_6))
self.comboBox_5.activated.connect(lambda: self.loadpdf(self.comboBox_5))
self.comboBox_7.activated.connect(lambda: self.loadpdf(self.comboBox_7))
self.comboBox_8.activated.connect(lambda: self.loadpdf(self.comboBox_8))
self.comboBox_9.activated.connect(lambda: self.loadpdf(self.comboBox_9))
self.comboBox_10.activated.connect(lambda: self.loadpdf(self.comboBox_10))
self.comboBox_11.activated.connect(lambda: self.loadpdf(self.comboBox_11))
self.comboBox_12.activated.connect(lambda: self.loadpdf(self.comboBox_12))
self.comboBox_13.activated.connect(lambda: self.loadpdf(self.comboBox_13))
self.comboBox_14.activated.connect(lambda: self.loadpdf(self.comboBox_14))
self.combolist = [('Maxima', self.comboBox_2, 'Maxima'), ('Rimi', self.comboBox_6, 'Rimi'), ('Iki', self.comboBox_4, 'Iki'), ('Norfa', self.comboBox_3, 'Norfa'), ('Aibe', self.comboBox_5, 'Aibė'), ('FRESH_MARKET', self.comboBox_7, 'FRESH MARKET'), ('Senukai', self.comboBox_8, 'Senukai'), ('Moki_Vezi', self.comboBox_9, 'Moki*Veži'), ('PROMO_CashCarry', self.comboBox_10, 'PROMO CashCarry'), ('PRISMA', self.comboBox_11, 'PRISMA'), ('EUROKOS', self.comboBox_12, 'EUROKOS'), ('Drogas', self.comboBox_13, 'Drogas'), ('ERMITAZAS', self.comboBox_14, 'ERMITAŽAS')]
self.pushbuttonlist = [self.Intbuttonmaxima, self.Intbuttoniki, self.Intbuttonrimi, self.Intbuttonnorfa, self.intbuttonaibe, self.intbuttonFRESH_MARKET, self.intbuttonSenukai, self.intbuttonMoki_Vezi, self.intbuttonJysk, self.intbuttonPROMO, self.intbuttonPRISMA, self.intbuttonEUROKOS, self.intbuttonDrogas, self.intbuttonERMITAZAS]
self.checkboxlist = [('Maxima', self.checkboxmaxima), ('Norfa', self.checkBoxnorfa), ('Iki', self.checkBoxiki), ('Rimi', self.checkBoxrimi), ('Aibe', self.checkboxAibe), ('FRESH_MARKET', self.checkboxFRESH_MARKET), ('PROMO_CashCarry', self.checkboxPROMO), ('PRISMA', self.checkboxPRISMA), ('EUROKOS', self.checkboxEUROKOS), ('Drogas', self.checkboxDrogas), ('ERMITAZAS', self.checkboxERMITAZAS), ('Senukai', self.checkboxSenukai), ('Moki_Vezi', self.checkboxMoki_Vezi)]
if platform.system() == "Windows":
self.checkBox.setEnabled(False)
self.lineEdit.insert('about:blank')
self.lineEdit.setDragEnabled(True)
self.lineEdit.installEventFilter(self)
self.comboBox.installEventFilter(self)
self.comboBox.setAcceptDrops(True)
self.pushButton_9.setFocusPolicy(QtCore.Qt.NoFocus)
self.pushButton_9.installEventFilter(self)
self.comboBoxview = self.comboBox.view()
self.comboBoxview.setDragDropMode(QtGui.QAbstractItemView.DragOnly)
QtGui.QShortcut(QtGui.QKeySequence("F11"), self, self.toogleFullScreen)
#.........這裏部分代碼省略.........