Esempio n. 1
0
    def __init__(self, dialog):

        # init gui
        Ui_MainWindow.__init__(self)
        self.setupUi(dialog)

        # create cfg/output folder and settings file if not existing, load globals, defaults and credentials
        self.initGlobals()
        self.setDefValues()

        # tab1
        self.projectTable.horizontalHeader().setSectionResizeMode(0, QtWidgets.QHeaderView.Stretch)
        self.resultTab_tab1.setColumnWidth(self.tab1["check"],40)

        self.updateButton.clicked.connect(self.update_tab1)
        self.startButton.clicked.connect(self.start_tab1)
        self.exportButton.clicked.connect(lambda: self.exportTable(self.resultTab_tab1))
        self.addButton.clicked.connect(self.add_tab1)
        self.clearButton.clicked.connect(lambda: self.clear(self.projectTable))
        self.saveButton.clicked.connect(self.save_tab1)
        # self.drawButton.clicked.connect(self.draw_thread)
        self.drawButton.clicked.connect(self.draw)
        self.projectList = []

        # tab 2
        self.startButton_tab2.clicked.connect(self.start_tab2)
        self.clearButton_tab2.clicked.connect(lambda: self.clear(self.resultTab_tab2))
        self.updateButton_tab2.clicked.connect(self.update_tab2)
        self.exportButton_tab2.clicked.connect(lambda: self.exportTable(self.resultTab_tab2))
        self.searchResult_tab2 = []
        self.buttons = []
Esempio n. 2
0
 def __init__(self):
     super(Lab, self).__init__()
     QMainWindow.__init__(self, parent=None)
     Ui_MainWindow.__init__(self)
     self.setupUi(self)
     self.image_view.setAcceptDrops(True)
     self.image_view.installEventFilter(self)
     self.image_view.getImageItem().setOpts(axisOrder='row-major')
Esempio n. 3
0
 def __init__(self, MainWindow):
     # constructor padre
     Ui_MainWindow.__init__(self)
     self.setupUi(MainWindow)
     self.setupMenu()
     # lista para soportar la multiventana
     self.windows = []
     self.plotWindows = []
     self.FS = 48000
Esempio n. 4
0
    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))
Esempio n. 5
0
 def __init__(self):
     QtWidgets.QMainWindow.__init__(self)
     Ui_MainWindow.__init__(self)
     self.setupUi(self)
     self.statusBar().setSizeGripEnabled(False)
     self.chooseFileButton.clicked.connect(self.openfile)
     self.imgString = ""
     self.imgPath = ""
     self.key = ""
     self.keyEdit.textChanged.connect(self.changetext)
     self.randomizeButton.clicked.connect(self.randomkey)
     self.encryptOwnButton.clicked.connect(self.encryptown)
     self.decryptOwnButton.clicked.connect(self.decryptown)
     self.encryptXorButton.clicked.connect(self.encryptxor)
     self.decryptXorButton.clicked.connect(self.decryptxor)
Esempio n. 6
0
    def __init__(self, window):
        global lst_profiles, grid_cars, configs_loaded
        Ui_MainWindow.__init__(self)
        self.setupUi(window)

        # Handles the menubar items
        self.actionExit.triggered.connect(menu_action_exit)
        self.actionChange_RVGL_Path.triggered.connect(
            choose_custom_rvgl_location)

        # Handles the buttons
        self.btn_launch.clicked.connect(execute_rvgl)
        self.btn_save.clicked.connect(save_profile)
        self.btn_delete.clicked.connect(delete_profile)

        # Handles the Parameters
        checkboxes = []
        for i_layout in range(6):
            layout = getattr(self, 'layout_params_{}'.format(i_layout + 1))
            for i in range(layout.count()):
                widget = layout.itemAt(i).widget()
                if isinstance(widget, QtWidgets.QCheckBox):
                    checkboxes.append(widget)

        for checkbox in checkboxes:
            checkbox.clicked.connect(
                lambda _, chk=checkbox: handle_param_click(checkbox=chk))

        # Handles the profiles list
        lst_profiles = self.lst_profiles
        grid_cars = self.tbl_cars

        lst_profiles.clicked.connect(self.profile_clicked)

        if configs_loaded:
            # Populate the profiles list
            for profile in configs['profiles']:
                lst_profiles.addItem(profile)

            # Loads the default checkboxes from config
            if len(configs['profiles']) > 0:
                first_profile = list(configs['profiles'].keys())[0]
                self.load_profile(first_profile)
Esempio n. 7
0
 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)
Esempio n. 8
0
    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()
Esempio n. 9
0
    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()
Esempio n. 10
0
 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)
Esempio n. 11
0
 def __init__(self, mainWindow):
     Ui_MainWindow.__init__(self)
     QtWidgets.QWidget.__init__(self)
     self.setupUi(mainWindow)
Esempio n. 12
0
    def __init__(self, dialog):
        Ui_MainWindow.__init__(self)
        self.setupUi(dialog)

        self.getSerialPorts()

        self.SerialThreadClass = SerialThreadClass()
        self.SerialThreadClass.serialSignal.connect(self.updateConsole)

        self.actionAbout.triggered.connect(self.launchAboutWindow)
        self.actionExit.triggered.connect(self.close_application)

        self.HomeButton.pressed.connect(self.sendHomingCycleCommand)
        self.ZeroPositionButton.pressed.connect(self.sendZeroPositionCommand)
        self.KillAlarmLockButton.pressed.connect(self.sendKillAlarmCommand)

        self.G0MoveRadioButton.clicked.connect(self.FeedRateBoxHide)
        self.G1MoveRadioButton.clicked.connect(self.FeedRateBoxHide)

        self.FKGoButtonArt1.pressed.connect(self.FKMoveArt1)
        self.FKSliderArt1.valueChanged.connect(self.FKSliderUpdateArt1)
        self.SpinBoxArt1.valueChanged.connect(self.FKSpinBoxUpdateArt1)
        self.FKDec10ButtonArt1.pressed.connect(self.FKDec10Art1)
        self.FKDec1ButtonArt1.pressed.connect(self.FKDec1Art1)
        self.FKDec0_1ButtonArt1.pressed.connect(self.FKDec0_1Art1)
        self.FKInc0_1ButtonArt1.pressed.connect(self.FKInc0_1Art1)
        self.FKInc1ButtonArt1.pressed.connect(self.FKInc1Art1)
        self.FKInc10ButtonArt1.pressed.connect(self.FKInc10Art1)

        self.FKGoButtonArt2.pressed.connect(self.FKMoveArt2)
        self.FKSliderArt2.valueChanged.connect(self.FKSliderUpdateArt2)
        self.SpinBoxArt2.valueChanged.connect(self.FKSpinBoxUpdateArt2)
        self.FKDec10ButtonArt2.pressed.connect(self.FKDec10Art2)
        self.FKDec1ButtonArt2.pressed.connect(self.FKDec1Art2)
        self.FKDec0_1ButtonArt2.pressed.connect(self.FKDec0_1Art2)
        self.FKInc0_1ButtonArt2.pressed.connect(self.FKInc0_1Art2)
        self.FKInc1ButtonArt2.pressed.connect(self.FKInc1Art2)
        self.FKInc10ButtonArt2.pressed.connect(self.FKInc10Art2)

        self.FKGoButtonArt3.pressed.connect(self.FKMoveArt3)
        self.FKSliderArt3.valueChanged.connect(self.FKSliderUpdateArt3)
        self.SpinBoxArt3.valueChanged.connect(self.FKSpinBoxUpdateArt3)
        self.FKDec10ButtonArt3.pressed.connect(self.FKDec10Art3)
        self.FKDec1ButtonArt3.pressed.connect(self.FKDec1Art3)
        self.FKDec0_1ButtonArt3.pressed.connect(self.FKDec0_1Art3)
        self.FKInc0_1ButtonArt3.pressed.connect(self.FKInc0_1Art3)
        self.FKInc1ButtonArt3.pressed.connect(self.FKInc1Art3)
        self.FKInc10ButtonArt3.pressed.connect(self.FKInc10Art3)

        self.FKGoButtonArt4.pressed.connect(self.FKMoveArt4)
        self.FKSliderArt4.valueChanged.connect(self.FKSliderUpdateArt4)
        self.SpinBoxArt4.valueChanged.connect(self.FKSpinBoxUpdateArt4)
        self.FKDec10ButtonArt4.pressed.connect(self.FKDec10Art4)
        self.FKDec1ButtonArt4.pressed.connect(self.FKDec1Art4)
        self.FKDec0_1ButtonArt4.pressed.connect(self.FKDec0_1Art4)
        self.FKInc0_1ButtonArt4.pressed.connect(self.FKInc0_1Art4)
        self.FKInc1ButtonArt4.pressed.connect(self.FKInc1Art4)
        self.FKInc10ButtonArt4.pressed.connect(self.FKInc10Art4)

        self.FKGoButtonArt5.pressed.connect(self.FKMoveArt5)
        self.FKSliderArt5.valueChanged.connect(self.FKSliderUpdateArt5)
        self.SpinBoxArt5.valueChanged.connect(self.FKSpinBoxUpdateArt5)
        self.FKDec10ButtonArt5.pressed.connect(self.FKDec10Art5)
        self.FKDec1ButtonArt5.pressed.connect(self.FKDec1Art5)
        self.FKDec0_1ButtonArt5.pressed.connect(self.FKDec0_1Art5)
        self.FKInc0_1ButtonArt5.pressed.connect(self.FKInc0_1Art5)
        self.FKInc1ButtonArt5.pressed.connect(self.FKInc1Art5)
        self.FKInc10ButtonArt5.pressed.connect(self.FKInc10Art5)

        self.FKGoButtonArt6.pressed.connect(self.FKMoveArt6)
        self.FKSliderArt6.valueChanged.connect(self.FKSliderUpdateArt6)
        self.SpinBoxArt6.valueChanged.connect(self.FKSpinBoxUpdateArt6)
        self.FKDec10ButtonArt6.pressed.connect(self.FKDec10Art6)
        self.FKDec1ButtonArt6.pressed.connect(self.FKDec1Art6)
        self.FKDec0_1ButtonArt6.pressed.connect(self.FKDec0_1Art6)
        self.FKInc0_1ButtonArt6.pressed.connect(self.FKInc0_1Art6)
        self.FKInc1ButtonArt6.pressed.connect(self.FKInc1Art6)
        self.FKInc10ButtonArt6.pressed.connect(self.FKInc10Art6)

        self.FKGoAllButton.pressed.connect(self.FKMoveAll)

        self.GoButtonGripper.pressed.connect(self.MoveGripper)
        self.SliderGripper.valueChanged.connect(self.SliderUpdateGripper)
        self.SpinBoxGripper.valueChanged.connect(self.SpinBoxUpdateGripper)
        self.Dec10ButtonGripper.pressed.connect(self.Dec10Gripper)
        self.Dec1ButtonGripper.pressed.connect(self.Dec1Gripper)
        self.Inc1ButtonGripper.pressed.connect(self.Inc1Gripper)
        self.Inc10ButtonGripper.pressed.connect(self.Inc10Gripper)

        self.SerialPortRefreshButton.pressed.connect(self.getSerialPorts)
        self.ConnectButton.pressed.connect(self.connectSerial)

        self.ConsoleButtonSend.pressed.connect(self.sendSerialCommand)
        self.ConsoleInput.returnPressed.connect(self.sendSerialCommand)
    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)
        
        webpage = self.webView.page()
        webpage.unsupportedContent.connect(self.webpageunsupportedcontent)
        webpage.setForwardUnsupportedContent(True)
        webpage.setLinkDelegationPolicy(QtWebKit.QWebPage.DelegateAllLinks)
        
        settings = self.webView.settings()
        settings.setAttribute(QtWebKit.QWebSettings.LocalContentCanAccessRemoteUrls, False)
        settings.setAttribute(QtWebKit.QWebSettings.LocalContentCanAccessFileUrls, False)
        settings.setAttribute(QtWebKit.QWebSettings.LocalStorageDatabaseEnabled, False)
        settings.setAttribute(QtWebKit.QWebSettings.LocalStorageEnabled, False)
        settings.setAttribute(QtWebKit.QWebSettings.DeveloperExtrasEnabled, True)
        settings.setAttribute(QtWebKit.QWebSettings.AutoLoadImages, True)
        settings.setAttribute(QtWebKit.QWebSettings.PluginsEnabled, True)
        settings.setAttribute(QtWebKit.QWebSettings.JavascriptEnabled, True)
        settings.setAttribute(QtWebKit.QWebSettings.JavascriptCanOpenWindows, True)
        settings.setAttribute(QtWebKit.QWebSettings.JavascriptCanAccessClipboard, False)
        settings.setAttribute(QtWebKit.QWebSettings.JavascriptCanCloseWindows, False)
        settings.setAttribute(QtWebKit.QWebSettings.PrivateBrowsingEnabled, False)
        settings.setAttribute(QtWebKit.QWebSettings.WebGLEnabled, False)
        settings.setAttribute(QtWebKit.QWebSettings.JavaEnabled, False)
        settings.setAttribute(QtWebKit.QWebSettings.AcceleratedCompositingEnabled, False)
        settings.setAttribute(QtWebKit.QWebSettings.DnsPrefetchEnabled, True)
        settings.setLocalStoragePath(userdir  + userprogpath + 'cache')
        settings.setMaximumPagesInCache(20)
        settings.setOfflineStoragePath(userdir  + userprogpath + 'cache')
        
        self.webView_2.setRenderHints(QPainter.SmoothPixmapTransform | QPainter.Antialiasing | QPainter.TextAntialiasing | QPainter.HighQualityAntialiasing)
        self.webView.setRenderHints(QPainter.SmoothPixmapTransform | QPainter.Antialiasing | QPainter.TextAntialiasing | QPainter.HighQualityAntialiasing)

        self.webView_2.loadFinished.connect(self.onLoad)
        self.webView_2.linkClicked.connect(self.loadgithubissue)

        
        self.settings_2 = self.webView_2.settings()
        self.settings_2.setAttribute(QtWebKit.QWebSettings.LocalContentCanAccessRemoteUrls, True)
        self.settings_2.setAttribute(QtWebKit.QWebSettings.LocalContentCanAccessFileUrls, True)
        self.settings_2.setAttribute(QtWebKit.QWebSettings.LocalStorageDatabaseEnabled, True)
        self.settings_2.setAttribute(QtWebKit.QWebSettings.LocalStorageEnabled, True)
        self.settings_2.setAttribute(QtWebKit.QWebSettings.DeveloperExtrasEnabled, True)
        self.settings_2.setAttribute(QtWebKit.QWebSettings.AutoLoadImages, True)
        self.settings_2.setAttribute(QtWebKit.QWebSettings.PluginsEnabled, False)
        self.settings_2.setAttribute(QtWebKit.QWebSettings.JavascriptEnabled, True)
        self.settings_2.setAttribute(QtWebKit.QWebSettings.JavascriptCanOpenWindows, True)
        self.settings_2.setAttribute(QtWebKit.QWebSettings.JavascriptCanAccessClipboard, True)
        self.settings_2.setAttribute(QtWebKit.QWebSettings.JavascriptCanCloseWindows, False)
        self.settings_2.setAttribute(QtWebKit.QWebSettings.PrivateBrowsingEnabled, False)
        self.settings_2.setAttribute(QtWebKit.QWebSettings.WebGLEnabled, False)
        self.settings_2.setAttribute(QtWebKit.QWebSettings.JavaEnabled, False)
        self.settings_2.setAttribute(QtWebKit.QWebSettings.AcceleratedCompositingEnabled, False)
        self.settings_2.setAttribute(QtWebKit.QWebSettings.DnsPrefetchEnabled, False)
        self.settings_2.setLocalStoragePath(userdir  + userprogpath + 'cache')
        self.settings_2.setMaximumPagesInCache(20)
        self.settings_2.setOfflineStoragePath(userdir  + userprogpath + 'cache')
        
        self.myHub = Hub()
        self.myHub.on_client_event.connect(self.setcurrentpdfpage)
        self.page_2 = self.webView_2.page()
        self.page_2.setLinkDelegationPolicy(QtWebKit.QWebPage.DelegateAllLinks)
        self.page_2.settings().setAttribute(QtWebKit.QWebSettings.DeveloperExtrasEnabled, True)
        self.frame_2 = self.page_2.mainFrame()

        self.readSettings()
        self.loadbrowserbookmarks()
        self.loadpdfcomboboxes()
        os.chdir(userdir + userprogpath)

        
        if not self.loadpdfjs:
            self.downlopdedpdfs = True            
            self.createhtmlfrompdf()
            
        if self.loadpdfjs:
            if platform.system() == "Windows":
                if platform.release() == 'XP':
                    pass
                else:
                    self.webView_2.load(QtCore.QUrl(userdir + userprogpath + SEP('web/viewer.html?file=pdftoload.pdf')))
            else:
                self.webView_2.load(QtCore.QUrl(userdir + userprogpath + SEP('web/viewer.html?file=pdftoload.pdf')))
        else:
            self.loadcurrenthtml()
            
        self.downloader = QtWebKit.QWebView()
        self.downloader.page().setForwardUnsupportedContent(True)
        self.downloader.page().unsupportedContent.connect(self.downloadstart)
        self.downloader.page().loadFinished.connect(self.checkdownload)
        self.downloadmanager = QtNetwork.QNetworkAccessManager()
        self.downloadmanager.finished.connect(self.downloadfinished)