Exemple #1
0
def show_settings():
    global cur_difficulty
    window = SettingsWindow(root, cur_difficulty)
    window.grab_set()
    root.wait_window(window)
    if window.setting_chosen != None:
        cur_difficulty = window.setting_chosen
        new_game()
    def initComponents(self):
        self.__settingsWindow = SettingsWindow()
        self.__resultWindow = ResultWindow()
        self.__displayWindow = DisplayWindow()
        self.__reviseWindow = ReviseWindow()

        self.__layout = QGridLayout()
    def __init__(self):
        super().__init__()
        self.title = "Precorder Extractor"
        self.tray_icon_path = os.path.join(base_dir, 'views', 'static', 'circle.png')
        self.app_icon_path = os.path.join(base_dir, 'views', 'static', 'circle.png')
        self.width = config.windowWidth
        self.height = config.windowHeight
        self.currentWidth = self.width
        self.currentHeight = self.height
        self.currentCP = QPoint(0, 0)
        self.screenSize = QDesktopWidget().screenGeometry(-1)
        self.current_epg = {}
        self.current_epg_obj = None
        self.custom_epg = False
        self.child_epg = None
        self.child_position = None
        self.updateCurrentPosition = 0
        self.updateOldPosition = 0
        self.vlc_media_buffering_state = False
        self.updateStep = config.updateStep
        self.bufferValue = config.bufferValue
        self.waitingFramePath = config.lastFramePath
        self.timePostitonSecond = 0
        self.listExtractingPlayers = []
        self.listStoringPlayers = []
        self.updateWindowState = False
        self.media_state = False
        self.settingsWindow = SettingsWindow()
        self.logsWindow = LogsWindow()

        self.initLabels()
        self.initVLC()
        self.registerObj()
        self.initUI()
Exemple #4
0
	def show_settings(self, widget):
		settings = SettingsWindow(self._app)
		settings.show()
Exemple #5
0
 def show_settings(self, widget):
     settings = SettingsWindow(self._app)
     settings.show()
Exemple #6
0
    def __init__(self, parent, conn, link=None, new_conn=None):
        SettingsWindow.__init__(self, parent)

        if not link:
            link = comlink.links[conn.script]

        self.connect(self.applyBut, SIGNAL("clicked()"), self.useValues)
        self.connect(self.cancelBut, SIGNAL("clicked()"), self.slotCancel)

        self.scanpop = None
        self.link = link
        self.conn = conn
        self.new_conn = new_conn
        self.channel = None
        self.auth_dict = {"TLS":[], "TTLS":["PAP","MSCHAPV2"], "PEAP":["MSCHAPV2", "MD5"]}
        self.apmac = ''
        self.auth_client_cert = ""
        self.auth_ca_cert = ""
        self.auth_private_key = ""
        self.auth_private_key_pass = ""

        self.fillLabels()

        self.devices = QPopupMenu()
        self.connect(self.devices, SIGNAL("activated(int)"), self.slotDeviceSelect)
        self.devices_but.setPopup(self.devices)

        self.address.setValidator(QRegExpValidator(QRegExp("[0123456789.:]*"), self.address))
        self.netmask.setValidator(QRegExpValidator(QRegExp("[0123456789.:]*"), self.netmask))
        self.gateway.setValidator(QRegExpValidator(QRegExp("[0123456789.:]*"), self.gateway))

        if "remote" in link.modes:
            if "scan" in link.modes:
                self.scanpop = Scanner(self)
                comlink.remote_hook.append(self.scanpop.slotRemotes)
                self.scanBut.setPopup(self.scanpop)
            else:
                self.scanBut.hide()

            if "devicemode" in link.modes:
                for dev_mode in link.device_modes:
                    self.selected_device_mode.insertItem(dev_mode)
            else:
                self.selected_device_mode.hide()
        else:
            self.scanBut.hide()
            self.remote.hide()
            self.selected_device_mode.hide()
            self.ssidLabel.hide()

        if "auth" in link.modes:
            self.security_mode_combo.insertItem(i18n("No authentication"))

            for mode in self.link.auth_modes:
                self.security_mode_combo.insertItem(mode.name)
            for enc in self.auth_dict:
                self.auth_mode_combo.insertItem(enc)

            self.connect(self.security_mode_combo, SIGNAL("activated(int)"), self.slotSecurityToggle)
            self.connect(self.auth_passphrase_line, SIGNAL("textChanged(const QString &)"), self.slotPasswordCheck)
            self.connect(self.auth_mode_combo, SIGNAL("activated(int)"), self.slotAuthToggle)
            self.connect(self.auth_ca_cert_but, SIGNAL("clicked()"), self.getCaCert)
            self.connect(self.auth_client_cert_but, SIGNAL("clicked()"), self.getClientCert)
            self.connect(self.auth_private_key_but, SIGNAL("clicked()"), self.getPrivateKey)

            self.slotSecurityToggle()
        else:
            self.authenticationGroupBox.hide()

        if "net" in link.modes:
            self.connect(self.dhcpButtonGroup, SIGNAL("clicked(int)"), self.slotNetToggle)
            if not self.conn:
                self.connect(self.address, SIGNAL("textChanged(const QString &)"), self.slotAddr)

            self.connect(self.auto_addr, SIGNAL("clicked()"), self.slotFields)

            for msk in ["255.0.0.0", "255.255.0.0", "255.255.255.0"]:
                self.netmask.insertItem(msk)

            self.connect(self.auto_gate, SIGNAL("clicked()"), self.slotFields)
            self.connect(self.dns_group, SIGNAL("clicked(int)"), self.slotNetToggle)
        else:
            self.addressGroupBox.hide()
            self.dnsGroupBox.hide()

        self.setValues()
        self.slotPasswordCheck()
        self.adjustSize()

        comlink.device_hook.append(self.slotDevices)
        comlink.queryDevices(link.script)

        self.show()