Esempio n. 1
0
    def _initUI(self):
        # Widgets
        self._brw_pendbase = DirBrowseWidget()

        self._brw_exe = FileBrowseWidget()
        if os.name == 'nt':
            self._brw_exe.setNameFilter('Application files (*.exe)')
        else:
            self._brw_exe.setNameFilter('Application files (*)')

        self._spn_dumpp = QSpinBox()
        self._spn_dumpp.setMinimum(30)
        self._spn_dumpp.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)

        # Layouts
        layout = _ConfigurePanelWidget._initUI(self)
        layout.addRow("Path to pendbase directory", self._brw_pendbase)
        layout.addRow('Path to PENEPMA executable', self._brw_exe)
        layout.addRow('Interval between dump (s)', self._spn_dumpp)

        # Signals
        self._brw_pendbase.pathChanged.connect(self._onPathChanged)
        self._brw_exe.pathChanged.connect(self._onPathChanged)

        return layout
class _WinXRayConfigurePanelWidget(_ConfigurePanelWidget):

    def _initUI(self):
        # Widgets
        self._brw_exe = FileBrowseWidget()
        if os.name == 'nt':
            self._brw_exe.setNameFilter('Application files (*.exe)')
        else:
            self._brw_exe.setNameFilter('Application files (*)')

        # Layouts
        layout = _ConfigurePanelWidget._initUI(self)
        layout.addRow('Full path to WinXRay.exe', self._brw_exe)

        return layout

    def hasAcceptableInput(self):
        if not self._brw_exe.path():
            return False
        if not os.access(self._brw_exe.path(), os.X_OK):
            return False
        return True

    def setSettings(self, settings):
        if 'winxray' in settings:
            path = getattr(settings.winxray, 'exe', None)
            try:
                self._brw_exe.setPath(path)
            except ValueError:
                pass

    def updateSettings(self, settings):
        section = _ConfigurePanelWidget.updateSettings(self, settings)
        section.exe = self._brw_exe.path()
        return section
Esempio n. 3
0
class _WinXRayConfigurePanelWidget(_ConfigurePanelWidget):
    def _initUI(self):
        # Widgets
        self._brw_exe = FileBrowseWidget()
        if os.name == 'nt':
            self._brw_exe.setNameFilter('Application files (*.exe)')
        else:
            self._brw_exe.setNameFilter('Application files (*)')

        # Layouts
        layout = _ConfigurePanelWidget._initUI(self)
        layout.addRow('Full path to WinXRay.exe', self._brw_exe)

        return layout

    def hasAcceptableInput(self):
        if not self._brw_exe.path():
            return False
        if not os.access(self._brw_exe.path(), os.X_OK):
            return False
        return True

    def setSettings(self, settings):
        if 'winxray' in settings:
            path = getattr(settings.winxray, 'exe', None)
            try:
                self._brw_exe.setPath(path)
            except ValueError:
                pass

    def updateSettings(self, settings):
        section = _ConfigurePanelWidget.updateSettings(self, settings)
        section.exe = self._brw_exe.path()
        return section
Esempio n. 4
0
    def _initUI(self):
        # Widgets
        self._brw_exe = FileBrowseWidget()
        if os.name == 'nt':
            self._brw_exe.setNameFilter('Application files (*.exe)')
        else:
            self._brw_exe.setNameFilter('Application files (*)')

        # Layouts
        layout = _ConfigurePanelWidget._initUI(self)
        layout.addRow('Full path to WinXRay.exe', self._brw_exe)

        return layout
Esempio n. 5
0
class _Casino3ConfigurePanelWidget(_ConfigurePanelWidget):
    def _initUI(self, settings):
        # Widgets
        self._brw_exe = FileBrowseWidget()
        self._brw_exe.setNameFilter('Application files (*.exe)')

        # Layouts
        layout = _ConfigurePanelWidget._initUI(self, settings)
        layout.addRow('Full path to console_casino3_script.exe', self._brw_exe)

        # Defaults
        if 'casino3' in settings:
            path = getattr(settings.casino3, 'exe', None)
            try:
                self._brw_exe.setPath(path)
            except ValueError:
                pass

        return layout

    def hasAcceptableInput(self):
        if not self._brw_exe.path():
            return False
        if not os.access(self._brw_exe.path(), os.X_OK):
            return False
        return True

    def updateSettings(self, settings):
        section = _ConfigurePanelWidget.updateSettings(self, settings)
        section.exe = self._brw_exe.path()
        return section
Esempio n. 6
0
    def _initUI(self, settings):
        # Widgets
        self._brw_exe = FileBrowseWidget()
        self._brw_exe.setNameFilter('Application files (*.exe)')

        # Layouts
        layout = _ConfigurePanelWidget._initUI(self, settings)
        layout.addRow('Full path to console_casino3_script.exe', self._brw_exe)

        # Defaults
        if 'casino3' in settings:
            path = getattr(settings.casino3, 'exe', None)
            try:
                self._brw_exe.setPath(path)
            except ValueError:
                pass

        return layout
Esempio n. 7
0
    def _initUI(self):
        # Widgets
        self._brw_basedir = DirBrowseWidget()

        self._brw_exe = FileBrowseWidget()
        if os.name == 'nt':
            self._brw_exe.setNameFilter('Application files (*.exe)')
        else:
            self._brw_exe.setNameFilter('Application files (*)')

        # Layouts
        layout = _ConfigurePanelWidget._initUI(self)
        layout.addRow('Full path to base directory', self._brw_basedir)
        layout.addRow('Full path to Mccli32.exe (optional)', self._brw_exe)

        # Signals
        self._brw_basedir.pathChanged.connect(self._onPathChanged)
        self._brw_exe.pathChanged.connect(self._onPathChanged)

        return layout
Esempio n. 8
0
    def _initUI(self):
        # Widgets
        self._brw_pendbase = DirBrowseWidget()

        self._brw_exe = FileBrowseWidget()
        if os.name == 'nt':
            self._brw_exe.setNameFilter('Application files (*.exe)')
        else:
            self._brw_exe.setNameFilter('Application files (*)')

        # Layouts
        layout = _ConfigurePanelWidget._initUI(self)
        layout.addRow("Path to pendbase directory", self._brw_pendbase)
        layout.addRow('Path to PENSHOWER executable', self._brw_exe)

        # Signals
        self._brw_pendbase.pathChanged.connect(self._onPathChanged)
        self._brw_exe.pathChanged.connect(self._onPathChanged)

        return layout
Esempio n. 9
0
    def _initUI(self):
        # Controls
        self._brw_java = FileBrowseWidget()
        if os.name == 'nt':
            self._brw_java.setNameFilter('Application files (*.exe)')
        else:
            self._brw_java.setNameFilter('Application files (*)')

        self._brw_jar = FileBrowseWidget()
        self._brw_jar.setNameFilter('Jar files (*.jar)')

        # Layouts
        layout = _ConfigurePanelWidget._initUI(self)
        layout.addRow('Path to Java executable', self._brw_java)
        layout.addRow('Path to pymontecarlo-dtsa2-proza.jar', self._brw_jar)

        # Signals
        self._brw_java.pathChanged.connect(self._onPathChanged)
        self._brw_jar.pathChanged.connect(self._onPathChanged)

        return layout
    def _initUI(self):
        # Controls
        self._brw_java = FileBrowseWidget()
        if os.name == 'nt':
            self._brw_java.setNameFilter('Application files (*.exe)')
        else:
            self._brw_java.setNameFilter('Application files (*)')

        self._brw_jar = FileBrowseWidget()
        self._brw_jar.setNameFilter('Jar files (*.jar)')

        # Layouts
        layout = _ConfigurePanelWidget._initUI(self)
        layout.addRow('Path to Java executable', self._brw_java)
        layout.addRow('Path to pymontecarlo-dtsa2-nistmonte.jar', self._brw_jar)

        # Signals
        self._brw_java.pathChanged.connect(self._onPathChanged)
        self._brw_jar.pathChanged.connect(self._onPathChanged)

        return layout
    def _initUI(self):
        # Widgets
        self._brw_exe = FileBrowseWidget()
        if os.name == 'nt':
            self._brw_exe.setNameFilter('Application files (*.exe)')
        else:
            self._brw_exe.setNameFilter('Application files (*)')

        # Layouts
        layout = _ConfigurePanelWidget._initUI(self)
        layout.addRow('Full path to WinXRay.exe', self._brw_exe)

        return layout
    def _initUI(self):
        # Widgets
        self._brw_basedir = DirBrowseWidget()

        self._brw_exe = FileBrowseWidget()
        if os.name == 'nt':
            self._brw_exe.setNameFilter('Application files (*.exe)')
        else:
            self._brw_exe.setNameFilter('Application files (*)')

        # Layouts
        layout = _ConfigurePanelWidget._initUI(self)
        layout.addRow('Full path to base directory', self._brw_basedir)
        layout.addRow('Full path to Mccli32.exe (optional)', self._brw_exe)

        # Signals
        self._brw_basedir.pathChanged.connect(self._onPathChanged)
        self._brw_exe.pathChanged.connect(self._onPathChanged)

        return layout
    def _initUI(self):
        # Widgets
        self._brw_pendbase = DirBrowseWidget()

        self._brw_exe = FileBrowseWidget()
        if os.name == 'nt':
            self._brw_exe.setNameFilter('Application files (*.exe)')
        else:
            self._brw_exe.setNameFilter('Application files (*)')

        # Layouts
        layout = _ConfigurePanelWidget._initUI(self)
        layout.addRow("Path to pendbase directory", self._brw_pendbase)
        layout.addRow('Path to PENSHOWER executable', self._brw_exe)

        # Signals
        self._brw_pendbase.pathChanged.connect(self._onPathChanged)
        self._brw_exe.pathChanged.connect(self._onPathChanged)

        return layout
Esempio n. 14
0
class _PROZAConfigurePanelWidget(_ConfigurePanelWidget):
    def _initUI(self):
        # Controls
        self._brw_java = FileBrowseWidget()
        if os.name == 'nt':
            self._brw_java.setNameFilter('Application files (*.exe)')
        else:
            self._brw_java.setNameFilter('Application files (*)')

        self._brw_jar = FileBrowseWidget()
        self._brw_jar.setNameFilter('Jar files (*.jar)')

        # Layouts
        layout = _ConfigurePanelWidget._initUI(self)
        layout.addRow('Path to Java executable', self._brw_java)
        layout.addRow('Path to pymontecarlo-dtsa2-proza.jar', self._brw_jar)

        # Signals
        self._brw_java.pathChanged.connect(self._onPathChanged)
        self._brw_jar.pathChanged.connect(self._onPathChanged)

        return layout

    def _onPathChanged(self, path):
        if not path:
            return
        if not self._brw_java.baseDir():
            self._brw_java.setBaseDir(path)
        if not self._brw_jar.baseDir():
            self._brw_jar.setBaseDir(path)

    def hasAcceptableInput(self):
        if not self._brw_java.path():
            return False
        if not os.access(self._brw_java.path(), os.X_OK):
            return False
        if not self._brw_jar.path():
            return False
        return True

    def setSettings(self, settings):
        if 'proza' in settings:
            path = getattr(settings.proza, 'java', None)
            try:
                self._brw_java.setPath(path)
            except ValueError:
                pass

            path = getattr(settings.proza, 'jar', None)
            try:
                self._brw_jar.setPath(path)
            except ValueError:
                pass

    def updateSettings(self, settings):
        section = _ConfigurePanelWidget.updateSettings(self, settings)
        section.java = self._brw_java.path()
        section.jar = self._brw_jar.path()
        return section
class _NistMonteConfigurePanelWidget(_ConfigurePanelWidget):

    def _initUI(self):
        # Controls
        self._brw_java = FileBrowseWidget()
        if os.name == 'nt':
            self._brw_java.setNameFilter('Application files (*.exe)')
        else:
            self._brw_java.setNameFilter('Application files (*)')

        self._brw_jar = FileBrowseWidget()
        self._brw_jar.setNameFilter('Jar files (*.jar)')

        # Layouts
        layout = _ConfigurePanelWidget._initUI(self)
        layout.addRow('Path to Java executable', self._brw_java)
        layout.addRow('Path to pymontecarlo-dtsa2-nistmonte.jar', self._brw_jar)

        # Signals
        self._brw_java.pathChanged.connect(self._onPathChanged)
        self._brw_jar.pathChanged.connect(self._onPathChanged)

        return layout

    def _onPathChanged(self, path):
        if not path:
            return
        if not self._brw_java.baseDir():
            self._brw_java.setBaseDir(path)
        if not self._brw_jar.baseDir():
            self._brw_jar.setBaseDir(path)

    def hasAcceptableInput(self):
        if not self._brw_java.path():
            return False
        if not os.access(self._brw_java.path(), os.X_OK):
            return False
        if not self._brw_jar.path():
            return False
        return True

    def setSettings(self, settings):
        if 'nistmonte' in settings:
            path = getattr(settings.nistmonte, 'java', None)
            try:
                self._brw_java.setPath(path)
            except ValueError:
                pass

            path = getattr(settings.nistmonte, 'jar', None)
            try:
                self._brw_jar.setPath(path)
            except ValueError:
                pass

    def updateSettings(self, settings):
        section = _ConfigurePanelWidget.updateSettings(self, settings)
        section.java = self._brw_java.path()
        section.jar = self._brw_jar.path()
        return section
class _MonacoConfigurePanelWidget(_ConfigurePanelWidget):

    def _initUI(self):
        # Widgets
        self._brw_basedir = DirBrowseWidget()

        self._brw_exe = FileBrowseWidget()
        if os.name == 'nt':
            self._brw_exe.setNameFilter('Application files (*.exe)')
        else:
            self._brw_exe.setNameFilter('Application files (*)')

        # Layouts
        layout = _ConfigurePanelWidget._initUI(self)
        layout.addRow('Full path to base directory', self._brw_basedir)
        layout.addRow('Full path to Mccli32.exe (optional)', self._brw_exe)

        # Signals
        self._brw_basedir.pathChanged.connect(self._onPathChanged)
        self._brw_exe.pathChanged.connect(self._onPathChanged)

        return layout

    def _onPathChanged(self, path):
        if not path:
            return
        if not self._brw_basedir.baseDir():
            self._brw_basedir.setBaseDir(path)
        if not self._brw_exe.baseDir():
            self._brw_exe.setBaseDir(path)

    def hasAcceptableInput(self):
        basedir = self._brw_basedir.path()
        if not basedir:
            return False

        mccli32_exe = self._brw_exe.path()
        if not mccli32_exe:
            mccli32_exe = os.path.join(basedir, 'Mccli32.exe')
        if not os.path.isfile(mccli32_exe):
            return False

        return True

    def setSettings(self, settings):
        if 'monaco' in settings:
            path = getattr(settings.monaco, 'basedir', None)
            try:
                self._brw_basedir.setPath(path)
            except ValueError:
                pass

            path = getattr(settings.monaco, 'exe', None)
            try:
                self._brw_exe.setPath(path)
            except ValueError:
                pass

    def updateSettings(self, settings):
        section = _ConfigurePanelWidget.updateSettings(self, settings)
        section.basedir = self._brw_basedir.path()
        section.exe = self._brw_exe.path() or \
            os.path.join(self._brw_basedir.path(), 'Mccli32.exe')
        return section
Esempio n. 17
0
class _MonacoConfigurePanelWidget(_ConfigurePanelWidget):
    def _initUI(self):
        # Widgets
        self._brw_basedir = DirBrowseWidget()

        self._brw_exe = FileBrowseWidget()
        if os.name == 'nt':
            self._brw_exe.setNameFilter('Application files (*.exe)')
        else:
            self._brw_exe.setNameFilter('Application files (*)')

        # Layouts
        layout = _ConfigurePanelWidget._initUI(self)
        layout.addRow('Full path to base directory', self._brw_basedir)
        layout.addRow('Full path to Mccli32.exe (optional)', self._brw_exe)

        # Signals
        self._brw_basedir.pathChanged.connect(self._onPathChanged)
        self._brw_exe.pathChanged.connect(self._onPathChanged)

        return layout

    def _onPathChanged(self, path):
        if not path:
            return
        if not self._brw_basedir.baseDir():
            self._brw_basedir.setBaseDir(path)
        if not self._brw_exe.baseDir():
            self._brw_exe.setBaseDir(path)

    def hasAcceptableInput(self):
        basedir = self._brw_basedir.path()
        if not basedir:
            return False

        mccli32_exe = self._brw_exe.path()
        if not mccli32_exe:
            mccli32_exe = os.path.join(basedir, 'Mccli32.exe')
        if not os.path.isfile(mccli32_exe):
            return False

        return True

    def setSettings(self, settings):
        if 'monaco' in settings:
            path = getattr(settings.monaco, 'basedir', None)
            try:
                self._brw_basedir.setPath(path)
            except ValueError:
                pass

            path = getattr(settings.monaco, 'exe', None)
            try:
                self._brw_exe.setPath(path)
            except ValueError:
                pass

    def updateSettings(self, settings):
        section = _ConfigurePanelWidget.updateSettings(self, settings)
        section.basedir = self._brw_basedir.path()
        section.exe = self._brw_exe.path() or \
            os.path.join(self._brw_basedir.path(), 'Mccli32.exe')
        return section
Esempio n. 18
0
class _PenepmaConfigurePanelWidget(_ConfigurePanelWidget):
    def _initUI(self):
        # Widgets
        self._brw_pendbase = DirBrowseWidget()

        self._brw_exe = FileBrowseWidget()
        if os.name == 'nt':
            self._brw_exe.setNameFilter('Application files (*.exe)')
        else:
            self._brw_exe.setNameFilter('Application files (*)')

        self._spn_dumpp = QSpinBox()
        self._spn_dumpp.setMinimum(30)
        self._spn_dumpp.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)

        # Layouts
        layout = _ConfigurePanelWidget._initUI(self)
        layout.addRow("Path to pendbase directory", self._brw_pendbase)
        layout.addRow('Path to PENEPMA executable', self._brw_exe)
        layout.addRow('Interval between dump (s)', self._spn_dumpp)

        # Signals
        self._brw_pendbase.pathChanged.connect(self._onPathChanged)
        self._brw_exe.pathChanged.connect(self._onPathChanged)

        return layout

    def _onPathChanged(self, path):
        if not path:
            return
        if not self._brw_pendbase.baseDir():
            self._brw_pendbase.setBaseDir(path)
        if not self._brw_exe.baseDir():
            self._brw_exe.setBaseDir(path)

    def hasAcceptableInput(self):
        if not self._brw_pendbase.path():
            return False
        if not self._brw_exe.path():
            return False
        if not os.access(self._brw_exe.path(), os.X_OK):
            return False
        return True

    def setSettings(self, settings):
        if 'penepma' in settings:
            path = getattr(settings.penepma, 'pendbase', None)
            try:
                self._brw_pendbase.setPath(path)
            except ValueError:
                pass

            path = getattr(settings.penepma, 'exe', None)
            try:
                self._brw_exe.setPath(path)
            except ValueError:
                pass

            try:
                dumpp = int(getattr(settings.penepma, 'dumpp', 30))
                self._spn_dumpp.setValue(dumpp)
            except (TypeError, ValueError):
                pass

    def updateSettings(self, settings):
        section = _ConfigurePanelWidget.updateSettings(self, settings)
        section.pendbase = self._brw_pendbase.path()
        section.exe = self._brw_exe.path()
        section.dumpp = int(self._spn_dumpp.value())
        return section
class _PenshowerConfigurePanelWidget(_ConfigurePanelWidget):

    def _initUI(self):
        # Widgets
        self._brw_pendbase = DirBrowseWidget()

        self._brw_exe = FileBrowseWidget()
        if os.name == 'nt':
            self._brw_exe.setNameFilter('Application files (*.exe)')
        else:
            self._brw_exe.setNameFilter('Application files (*)')

        # Layouts
        layout = _ConfigurePanelWidget._initUI(self)
        layout.addRow("Path to pendbase directory", self._brw_pendbase)
        layout.addRow('Path to PENSHOWER executable', self._brw_exe)

        # Signals
        self._brw_pendbase.pathChanged.connect(self._onPathChanged)
        self._brw_exe.pathChanged.connect(self._onPathChanged)

        return layout

    def _onPathChanged(self, path):
        if not path:
            return
        if not self._brw_pendbase.baseDir():
            self._brw_pendbase.setBaseDir(path)
        if not self._brw_exe.baseDir():
            self._brw_exe.setBaseDir(path)

    def hasAcceptableInput(self):
        if not self._brw_pendbase.path():
            return False
        if not self._brw_exe.path():
            return False
        if not os.access(self._brw_exe.path(), os.X_OK):
            return False
        return True

    def setSettings(self, settings):
        if 'penshower' in settings:
            path = getattr(settings.penshower, 'pendbase', None)
            try:
                self._brw_pendbase.setPath(path)
            except ValueError:
                pass

            path = getattr(settings.penshower, 'exe', None)
            try:
                self._brw_exe.setPath(path)
            except ValueError:
                pass

    def updateSettings(self, settings):
        section = _ConfigurePanelWidget.updateSettings(self, settings)
        section.pendbase = self._brw_pendbase.path()
        section.exe = self._brw_exe.path()
        return section
Esempio n. 20
0
class _PenshowerConfigurePanelWidget(_ConfigurePanelWidget):
    def _initUI(self):
        # Widgets
        self._brw_pendbase = DirBrowseWidget()

        self._brw_exe = FileBrowseWidget()
        if os.name == 'nt':
            self._brw_exe.setNameFilter('Application files (*.exe)')
        else:
            self._brw_exe.setNameFilter('Application files (*)')

        # Layouts
        layout = _ConfigurePanelWidget._initUI(self)
        layout.addRow("Path to pendbase directory", self._brw_pendbase)
        layout.addRow('Path to PENSHOWER executable', self._brw_exe)

        # Signals
        self._brw_pendbase.pathChanged.connect(self._onPathChanged)
        self._brw_exe.pathChanged.connect(self._onPathChanged)

        return layout

    def _onPathChanged(self, path):
        if not path:
            return
        if not self._brw_pendbase.baseDir():
            self._brw_pendbase.setBaseDir(path)
        if not self._brw_exe.baseDir():
            self._brw_exe.setBaseDir(path)

    def hasAcceptableInput(self):
        if not self._brw_pendbase.path():
            return False
        if not self._brw_exe.path():
            return False
        if not os.access(self._brw_exe.path(), os.X_OK):
            return False
        return True

    def setSettings(self, settings):
        if 'penshower' in settings:
            path = getattr(settings.penshower, 'pendbase', None)
            try:
                self._brw_pendbase.setPath(path)
            except ValueError:
                pass

            path = getattr(settings.penshower, 'exe', None)
            try:
                self._brw_exe.setPath(path)
            except ValueError:
                pass

    def updateSettings(self, settings):
        section = _ConfigurePanelWidget.updateSettings(self, settings)
        section.pendbase = self._brw_pendbase.path()
        section.exe = self._brw_exe.path()
        return section