def __init__(self, main): QListWidget.__init__(self) self.setStyleSheet(""" WebPluginList { color: black; background-color: white; selection-color: blue; border-radius: 10px; selection-background-color: #437DCD; } WebPluginList:Item { border-radius: 10px; border-style: solid; background-color: white; } WebPluginList:Item:hover { border-radius: 10px; border-style: solid; background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #FAFBFE, stop: 1 #6181E0); }""") self.connect(self, SIGNAL("itemSelectionChanged()"), self.openSelected) self._main = main settings = QSettings() i = 1 for recent_project in settings.value('recentProjects', []).toStringList(): if manage_files.folder_exists(str(recent_project)): item = QListWidgetItem(str(recent_project.split('/')[-1])) item.setToolTip(recent_project) item.setIcon(QIcon(resources.images['tree-app'])) self.addItem(item) i = i + 1 if i == 10: break
def __init__(self, parent=None): QListWidget.__init__(self, parent) self.iface = backend.pm.Iface() self.defaultIcon = KIcon(('applications-other', 'unknown'), KIconLoader.SizeSmallMedium) self.connect(self, SIGNAL("itemClicked(QListWidgetItem*)"), self.groupChanged) self._list = {}
def __init__(self, parent): QListWidget.__init__(self, parent) self.update_categories() self.addAction(create_widget_action(self, "F2", self._rename_category)) self.addAction(create_widget_action(self, "Del", self._del_category)) self.addAction(create_widget_action(self, "CTRL+N", self._new_category))
def __init__(self, parent): QListWidget.__init__(self, parent) self.category_id = None self.update_articles() self.addAction(create_widget_action(self, "F2", self._rename_article)) self.addAction(create_widget_action(self, "Del", self._del_article)) self.addAction(create_widget_action(self, "CTRL+N", self._new_article))
def __init__(self, parent): QListWidget.__init__(self, parent) self.article_id = None self.update_words() self.itemDoubleClicked.connect(self._select_item) self.addAction(create_widget_action(self, "Return", self._select_item)) self.addAction(create_widget_action(self, "Delete", self._delete_item))
def __init__(self, qnotero): """ Constructor Arguments: qnotero -- a Qnotero instance """ QListWidget.__init__(self, qnotero) self.setMouseTracking(True)
def __init__(self, stacked): QListWidget.__init__(self) self.stacked = stacked self.loader = loader.loader() self.setResizeMode(QListView.Adjust) self.setMovement(QListView.Static) self.setViewMode(QListView.IconMode) self.connect(self, SIGNAL("itemPressed(QListWidgetItem *)"), self.GMShape)
def __init__(self, parent, ancestor): QListWidget.__init__(self, ancestor) self.setWindowFlags(Qt.SubWindow | Qt.FramelessWindowHint) self.textedit = parent self.completion_list = None self.case_sensitive = False self.show_single = None self.enter_select = None self.hide() self.connect(self, SIGNAL("itemActivated(QListWidgetItem*)"), self.item_selected)
def __init__(self, parent=None): QListWidget.__init__(self, parent) self.setSelectionMode(QAbstractItemView.NoSelection) self.setMovement(QListView.Static) self.setProperty('isWrapping', False) self.setLayoutMode(QListView.SinglePass) self.setSelectionRectVisible(False) self.uniformItemSizes() self.wordWrap() self.clicked.connect(self.slotSelect) self.itemActivated.connect(self.slotSelect) self.dic = None
def __init__(self, parent): QListWidget.__init__(self, parent) self.setStyleSheet( "QListWidget { background: #1a1d1f }") self._parent = parent self.setContextMenuPolicy(Qt.CustomContextMenu) # Conexión self.connect(self, SIGNAL("itemClicked(QListWidgetItem*)"), self._go_to_line) self.connect(self, SIGNAL("customContextMenuRequested(const QPoint)"), self._load_context_menu)
def __init__(self, parent = None): QListWidget.__init__(self, parent) self.setVerticalScrollMode(QAbstractItemView.ScrollPerPixel) self.setMouseTracking(True) self.setSelectionMode(QAbstractItemView.SingleSelection) self.viewport().installEventFilter(self) self.locked = False self.moved = False for i in range(100): newItem = QListWidgetItem(self) # create new ListWidgetItem (parent= ListWidget) newItem.setText("This is entry no {0}".format(i))
def __init__(self, parent=None, plots=None): QListWidget.__init__(self, parent) # # default settings now done in PlotsPreviewDialog.ui # self.setViewMode(QListView.IconMode) # self.setAcceptDrops(False) # self.setFlow(QListWidget.LeftToRight) # self.setWrapping(True) # self.setResizeMode(QListView.Adjust) # self.setSelectionMode(QAbstractItemView.ExtendedSelection) #self.setIconSize(QSize(200,200)) # self.hideInvariants = True #TODO implement/connect hide invariants checkbox in PlotsPreviewDialog self.addPlots(plots)
def __init__(self, parent, ancestor): # Currently, the parent widget is set to None: QListWidget.__init__(self, None) self.setWindowFlags(Qt.SubWindow | Qt.FramelessWindowHint) self.textedit = parent self.completion_list = None self.case_sensitive = False self.show_single = None # see note in method 'setup' self.enter_select = None srect = QApplication.desktop().availableGeometry(self) self.screen_size = (srect.width(), srect.height()) self.hide() self.connect(self, SIGNAL("itemActivated(QListWidgetItem*)"), self.item_selected)
def __init__(self, parent=None): QListWidget.__init__(self, parent) self.setVerticalScrollMode(QAbstractItemView.ScrollPerPixel) self.setMouseTracking(True) self.setSelectionMode(QAbstractItemView.SingleSelection) self.viewport().installEventFilter(self) self.locked = False self.moved = False for i in range(100): newItem = QListWidgetItem( self) # create new ListWidgetItem (parent= ListWidget) newItem.setText("This is entry no {0}".format(i))
def __init__(self, parent, ancestor): # Currently, the parent widget is set to None: QListWidget.__init__(self, None) self.setWindowFlags(Qt.SubWindow | Qt.FramelessWindowHint) self.textedit = parent self.completion_list = None self.case_sensitive = None self.show_single = None self.enter_select = None srect = QApplication.desktop().availableGeometry(self) self.screen_size = (srect.width(), srect.height()) self.hide() self.connect(self, SIGNAL("itemActivated(QListWidgetItem*)"), self.item_selected)
def __init__(self, name = None, attributes = [], selectedAttributes = []): QListWidget.__init__(self) self.menu = AttributeSelectorMenu(self) self.setSelectionMode(QAbstractItemView.ExtendedSelection) if name: self.name = name self.attributes = attributes for attribute in self.attributes: item = QListWidgetItem(attribute) item.setFlags(Qt.ItemIsSelectable | Qt.ItemIsUserCheckable | Qt.ItemIsEnabled) if attribute in selectedAttributes: item.setCheckState(Qt.Checked) else: item.setCheckState(Qt.Unchecked) self.addItem(item)
def __init__(self, parent, name=''): QListWidget.__init__(self, parent) self.name = name
def __init__(self): QListWidget.__init__(self) self.add_item() self.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
def __init__(self, browserReference): self.browser_referece = browserReference QListWidget.__init__(self) self.setMouseTracking(True) styles.set_style(self, 'recent-project') self.load_items()
def __init__(self, parent=None): # ------------------------------------------------------------------- QListWidget.__init__(self, parent); # ------------------------------------------------------------------- self.PARENT = parent; self.DEBUG = False; self.LOG_TAG = str(self.__class__.__name__).upper(); self.FOUND_ITEMS = 0; self.WIDTH = 800; self.MAX_FOUND_ITEMS_DISPLAY = 20; self.ITEMS = [ "__exec:home", ]; self.ITEMS_TTL_AVAILABLE = len( self.ITEMS ); self.setGeometry(155, 31, self.WIDTH, 300); #self.setStyleSheet( 'QListWidget{ background-color: #000: color: #fff; }' ); #self.setStyleSheet( 'QListWidget::Item{ background-color: rgba(0,0,0, 170): color: #fff; margin-top: 2px; }' ); self.setStyleSheet( """ QListView { /* make the selection span the entire width of the view */ show-decoration-selected: 1; background-color: #333; color: #FFffFF; /* border-style: solid; border-width: 4px; border-color: #fff; */ } QListView::item { border-top-style: solid; border-width: 1px; border-color: #555; padding-top: 2px; padding-bottom: 2px; } QListView::item:selected { background-color: #000; color: #F00; } QListView::item:selected:active { background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6a6ea9, stop: 1 #888dd9); background-color: #000; color: #0F0; } /* QListView::item:hover { background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #FAFBFE, stop: 1 #DCDEF1); background-color: #000; color: #0F0; } */ /* QListView::item:alternate { } QListView::item:selected:!active { background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ABAFE5, stop: 1 #8588B2); } */ """ ); # ------------------------------------------------------------------- # events #self.returnPressed.connect (self.GO_TO_URL ); #self.textChanged.connect( self.SEARCH_IN_HISTIRY ); #self.itemSelectionChanged.connect( self.SELECT_SEACH_VALUE ); #self.itemClicked.connect( self.SELECT_SEACH_VALUE ); self.UPDATE_TIMER = QTimer(); self.HAS_FOCUS = False; # ------------------------------------------------------------------- self.PARENT.SPLASH.STATUS( self.LOG_TAG+": [INIT]" ); # ------------------------------------------------------------------- self.hide();
def __init__(self, *args, **kwargs): QListWidget.__init__(self, *args, **kwargs)
def __init__(self, parent=None, types=QStringList(), delimiter=','): QListWidget.__init__(self, parent) self.__types = types self.__delimiter = delimiter
def __init__(self, parent=None): QListWidget.__init__(self, parent) self._items = []
def __init__(self): QListWidget.__init__(self) self.add_items() self.itemClicked.connect(self.item_click)
def __init__(self, browserReference): self.browser_referece = browserReference QListWidget.__init__(self) self.setMouseTracking(True) self.load_items()
def __init__(self, parent): QListWidget.__init__(self, parent) self.setObjectName("salida_compilador") self._parent = parent self.itemClicked.connect(self._ir_a_linea)