Ejemplo n.º 1
0
    def initUI(self):
        self.label = QtGui.QLabel(self.title,self)
        self.label.setFixedWidth(100)
        self.label.setFixedHeight(30)
        kwargs ={ 
            'data':self.data['data'],
            'data_max':self.data['data_max'],
            'data_min':self.data['data_min'],
            'btn_img':self.range_btn_img,
            'btn_img_active':self.range_btn_img_active
        }
        self.distribution_slider = QDistributionSlider(**kwargs)
        self.delete_button = QHoverButton(
            self,self.del_btn_img,self.del_btn_img_active)
        self.layout = QtGui.QHBoxLayout(self)
        
        self.layout.addWidget(self.label)
        self.layout.addWidget(self.distribution_slider)
        self.layout.addWidget(self.delete_button)

        self.connect(self.delete_button,
            QtCore.SIGNAL('clicked()'),
            self.on_delete_btn_press)
        self.setFixedWidth(500)
        self.setFixedHeight(40)
Ejemplo n.º 2
0
    def initUI(self):
        self.label = QtGui.QLabel(self.title, self)
        self.label.setFixedWidth(100)
        self.label.setFixedHeight(30)
        kwargs = {
            'data': self.data['data'],
            'data_max': self.data['data_max'],
            'data_min': self.data['data_min'],
            'btn_img': self.range_btn_img,
            'btn_img_active': self.range_btn_img_active
        }
        self.distribution_slider = QDistributionSlider(**kwargs)
        self.delete_button = QHoverButton(self, self.del_btn_img,
                                          self.del_btn_img_active)
        self.layout = QtGui.QHBoxLayout(self)

        self.layout.addWidget(self.label)
        self.layout.addWidget(self.distribution_slider)
        self.layout.addWidget(self.delete_button)

        self.connect(self.delete_button, QtCore.SIGNAL('clicked()'),
                     self.on_delete_btn_press)
        self.setFixedWidth(500)
        self.setFixedHeight(40)
Ejemplo n.º 3
0
class QScreenerItem(QtGui.QFrame):
    def __init__(self, parent, title, data, id, range_btn_img,
                 range_btn_img_active, del_btn_img, del_btn_img_active):
        super(QScreenerItem, self).__init__(parent)
        self.title = title
        self.data = data
        self.id = id
        self.range_btn_img = range_btn_img
        self.range_btn_img_active = range_btn_img_active
        self.del_btn_img = del_btn_img
        self.del_btn_img_active = del_btn_img_active
        self.closed = False
        self.initUI()

    def initUI(self):
        self.label = QtGui.QLabel(self.title, self)
        self.label.setFixedWidth(100)
        self.label.setFixedHeight(30)
        kwargs = {
            'data': self.data['data'],
            'data_max': self.data['data_max'],
            'data_min': self.data['data_min'],
            'btn_img': self.range_btn_img,
            'btn_img_active': self.range_btn_img_active
        }
        self.distribution_slider = QDistributionSlider(**kwargs)
        self.delete_button = QHoverButton(self, self.del_btn_img,
                                          self.del_btn_img_active)
        self.layout = QtGui.QHBoxLayout(self)

        self.layout.addWidget(self.label)
        self.layout.addWidget(self.distribution_slider)
        self.layout.addWidget(self.delete_button)

        self.connect(self.delete_button, QtCore.SIGNAL('clicked()'),
                     self.on_delete_btn_press)
        self.setFixedWidth(500)
        self.setFixedHeight(40)

    def visible(self, new_status=None):
        if new_status == None:
            pass
        else:
            self.closed = new_status
        return self.closed

    def on_delete_btn_press(self):
        self.closed = False
        self.emit(QtCore.SIGNAL('close(QString)'), self.id)

    def get_value(self):
        return self.distribution_slider.get_value()

    def set_value(self, lvalue, rvalue):
        self.distribution_slider.set_value(lvalue, rvalue)

    def reset(self):
        self.distribution_slider.reset()

    def update_data(self, data):
        self.distribution_slider.update_data(data['data'], data['data_max'],
                                             data['data_min'])
Ejemplo n.º 4
0
class QScreenerItem(QtGui.QFrame):
    def __init__(self,parent,title,data,id,
        range_btn_img,
        range_btn_img_active,
        del_btn_img,
        del_btn_img_active):
        super(QScreenerItem,self).__init__(parent)
        self.title = title
        self.data = data
        self.id = id
        self.range_btn_img = range_btn_img
        self.range_btn_img_active = range_btn_img_active
        self.del_btn_img = del_btn_img
        self.del_btn_img_active = del_btn_img_active
        self.closed = False
        self.initUI()

    def initUI(self):
        self.label = QtGui.QLabel(self.title,self)
        self.label.setFixedWidth(100)
        self.label.setFixedHeight(30)
        kwargs ={ 
            'data':self.data['data'],
            'data_max':self.data['data_max'],
            'data_min':self.data['data_min'],
            'btn_img':self.range_btn_img,
            'btn_img_active':self.range_btn_img_active
        }
        self.distribution_slider = QDistributionSlider(**kwargs)
        self.delete_button = QHoverButton(
            self,self.del_btn_img,self.del_btn_img_active)
        self.layout = QtGui.QHBoxLayout(self)
        
        self.layout.addWidget(self.label)
        self.layout.addWidget(self.distribution_slider)
        self.layout.addWidget(self.delete_button)

        self.connect(self.delete_button,
            QtCore.SIGNAL('clicked()'),
            self.on_delete_btn_press)
        self.setFixedWidth(500)
        self.setFixedHeight(40)

    def visible(self,new_status=None):
        if new_status == None:
            pass
        else:
            self.closed = new_status
        return self.closed

    def on_delete_btn_press(self):
        self.closed = False
        self.emit(QtCore.SIGNAL('close(QString)'),self.id)

    def get_value(self):
        return self.distribution_slider.get_value()

    def set_value(self,lvalue,rvalue):
        self.distribution_slider.set_value(lvalue,rvalue)

    def reset(self):
        self.distribution_slider.reset()

    def update_data(self,data):
        self.distribution_slider.update_data(data['data'],
            data['data_max'],data['data_min'])