def __init__(self, downloads_indicator, parent=None): QStatusBar.__init__(self, parent) self.setMaximumHeight(STATUS_BAR_HEIGHT) self.setMinimumHeight(STATUS_BAR_HEIGHT) self.sb_background = 'status bar private background' if getattr(parent, 'is_private', False) else 'status bar background' if parent: f = parent.font() f.setPixelSize(min(f.pixelSize(), self.maximumHeight() - 4)) self.setFont(f) self.status_msg = Status(self) self.status_msg.hidden.connect(self.search_bar_hidden) self.status_msg.search.edit.do_search.connect(self.do_search) self.show_search = self.status_msg.show_search self.show_message = self.status_msg.show_message self.set_permanent_message = self.status_msg self.addWidget(self.status_msg) self.mode_label = ModeLabel() self.update_mode = self.mode_label.update_mode self.passthrough_button = PassthroughButton(self) self.passthrough_button.toggled.connect(self.change_passthrough) self.update_passthrough_state = self.passthrough_button.update_state self.addPermanentWidget(self.mode_label) self.addPermanentWidget(downloads_indicator) self.addPermanentWidget(self.passthrough_button) self.setStyleSheet(''' QStatusBar { color: FG; background: BG; } QStatusBar QLabel { color: FG; background: BG; } '''.replace( 'FG', color('status bar foreground', 'palette(window-text)')).replace( 'BG', color(self.sb_background, 'palette(window)')) )
def __init__(self, parent=None): QStatusBar.__init__(self, parent) self.version = get_version() self.base_msg = '%s %s' % (__appname__, self.version) self.device_string = '' self.update_label = UpdateLabel('') self.total = self.current = self.selected = self.library_total = 0 self.addPermanentWidget(self.update_label) self.update_label.setVisible(False) self.defmsg = VersionLabel(self) self.addWidget(self.defmsg) self.set_label()
def __init__(self, parent=None): QStatusBar.__init__(self, parent) self.default_message = __appname__ + ' ' + _('version') + ' ' + \ __version__ + ' ' + _('created by Kovid Goyal') self.device_string = '' self._font = QFont() self._font.setBold(True) self.setFont(self._font) self.w = QLabel(self.default_message) self.w.setFont(self._font) self.addWidget(self.w)
def __init__(self, parent=None): QStatusBar.__init__(self, parent) self.version = get_version() self.base_msg = '%s %s' % (__appname__, self.version) self.device_string = '' self.update_label = UpdateLabel('') self.total = self.current = self.selected = self.library_total = 0 self.addPermanentWidget(self.update_label) self.update_label.setVisible(False) self._font = QFont() self._font.setBold(True) self.setFont(self._font) self.defmsg = QLabel('') self.defmsg.setFont(self._font) self.addWidget(self.defmsg) self.set_label()