Exemple #1
0
    RELEASE_FORMATS,
    RELEASE_PRIMARY_GROUPS,
    RELEASE_SECONDARY_GROUPS,
)
from picard.const.sys import IS_WIN

from picard.ui.options import (
    OptionsPage,
    register_options_page,
)
from picard.ui.ui_options_releases import Ui_ReleasesOptionsPage
from picard.ui.widgets import ClickableSlider

_DEFAULT_SCORE = 0.5
_release_type_scores = [(g, _DEFAULT_SCORE)
                        for g in list(RELEASE_PRIMARY_GROUPS.keys()) +
                        list(RELEASE_SECONDARY_GROUPS.keys())]


class TipSlider(ClickableSlider):

    _offset = QtCore.QPoint(0, -30)
    _step = 5
    _pagestep = 25
    _minimum = 0
    _maximum = 100

    def __init__(self, *args):
        super().__init__(*args)

        self.style = QtWidgets.QApplication.style()
Exemple #2
0
from operator import itemgetter
from locale import strxfrm
from PyQt5 import QtCore, QtWidgets
from picard import config
from picard.ui.options import OptionsPage, register_options_page
from picard.ui.ui_options_releases import Ui_ReleasesOptionsPage
from picard.const import (RELEASE_COUNTRIES,
                          RELEASE_FORMATS,
                          RELEASE_PRIMARY_GROUPS,
                          RELEASE_SECONDARY_GROUPS)
from picard.i18n import gettext_attr


_DEFAULT_SCORE = 0.5
_release_type_scores = [(g, _DEFAULT_SCORE) for g in list(RELEASE_PRIMARY_GROUPS.keys()) + list(RELEASE_SECONDARY_GROUPS.keys())]


class ReleaseTypeScore:

    def __init__(self, group, layout, label, cell):
        row, column = cell  # it uses 2 cells (r,c and r,c+1)
        self.group = group
        self.layout = layout
        self.label = QtWidgets.QLabel(self.group)
        self.label.setText(label)
        self.layout.addWidget(self.label, row, column, 1, 1)
        self.slider = QtWidgets.QSlider(self.group)
        self.slider.setMaximum(100)
        self.slider.setOrientation(QtCore.Qt.Horizontal)
        self.layout.addWidget(self.slider, row, column + 1, 1, 1)
Exemple #3
0
from operator import itemgetter
from locale import strcoll
from PyQt4 import QtCore, QtGui
from picard import config
from picard.ui.options import OptionsPage, register_options_page
from picard.ui.ui_options_releases import Ui_ReleasesOptionsPage
from picard.const import (RELEASE_COUNTRIES,
                          RELEASE_FORMATS,
                          RELEASE_PRIMARY_GROUPS,
                          RELEASE_SECONDARY_GROUPS)
from picard.i18n import ugettext_attr


_DEFAULT_SCORE = 0.5
_release_type_scores = [(g, _DEFAULT_SCORE) for g in RELEASE_PRIMARY_GROUPS.keys() + RELEASE_SECONDARY_GROUPS.keys()]


class ReleaseTypeScore:

    def __init__(self, group, layout, label, cell):
        row, column = cell  # it uses 2 cells (r,c and r,c+1)
        self.group = group
        self.layout = layout
        self.label = QtGui.QLabel(self.group)
        self.label.setText(label)
        self.layout.addWidget(self.label, row, column, 1, 1)
        self.slider = QtGui.QSlider(self.group)
        self.slider.setMaximum(100)
        self.slider.setOrientation(QtCore.Qt.Horizontal)
        self.layout.addWidget(self.slider, row, column + 1, 1, 1)
Exemple #4
0
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

from operator import itemgetter
from locale import strcoll
from PyQt4 import QtCore, QtGui
from picard import config
from picard.ui.options import OptionsPage, register_options_page
from picard.ui.ui_options_releases import Ui_ReleasesOptionsPage
from picard.const import (RELEASE_COUNTRIES, RELEASE_FORMATS,
                          RELEASE_PRIMARY_GROUPS, RELEASE_SECONDARY_GROUPS)
from picard.i18n import ugettext_attr

_DEFAULT_SCORE = 0.5
_release_type_scores = [
    (g, _DEFAULT_SCORE)
    for g in RELEASE_PRIMARY_GROUPS.keys() + RELEASE_SECONDARY_GROUPS.keys()
]


class ReleaseTypeScore:
    def __init__(self, group, layout, label, cell):
        row, column = cell  # it uses 2 cells (r,c and r,c+1)
        self.group = group
        self.layout = layout
        self.label = QtGui.QLabel(self.group)
        self.label.setText(label)
        self.layout.addWidget(self.label, row, column, 1, 1)
        self.slider = QtGui.QSlider(self.group)
        self.slider.setMaximum(100)
        self.slider.setOrientation(QtCore.Qt.Horizontal)
        self.layout.addWidget(self.slider, row, column + 1, 1, 1)