Пример #1
0
 def add_items(cls, links):
     # sorted(links, key=lambda link : link['lastViewedByMeDate'])
     for index, link in enumerate(links):
         title = link['title']
         alternateLink = link['alternateLink']
         icon = util.find_icon(link)
         wf.add_item(title=title, arg=alternateLink, icon=icon, valid=True)
Пример #2
0
 def add_items(cls, links):
     # sorted(links, key=lambda link : link['lastViewedByMeDate'])
     for index, link in enumerate(links):
         title = link['title']
         alternateLink = link['alternateLink']
         icon = util.find_icon(link)
         wf.add_item(
             title=title,
             arg=alternateLink,
             icon=icon,
             valid=True)
Пример #3
0
    def __init__(self, *args, **kwargs):
        QtGui.QWidget.__init__(self, *args, **kwargs)

        self.layout = QtGui.QHBoxLayout(self)
        self.patch = QtGui.QImage(QtCore.QSize(64, 32), QtGui.QImage.Format_Indexed8)
        self.patch.fill(0)

        self.picker_button = QtGui.QToolButton(self)
        self.picker_button.setIcon(find_icon("palette-icon.png"))
        self.picker_button.setAutoRaise(True)
##        wrapper = QtGui.QWidget(self)
##        wrapper_layout = QtGui.QHBoxLayout(wrapper)
##        wrapper_layout.addWidget(self.patch
##        wrapper.setLayout(wrapper_layout)
##        self.layout.addWidget(self.patch, 1, QtCore.Qt.AlignLeft)
        self.layout.addWidget(self.picker_button, 0, QtCore.Qt.AlignLeft)
        self.setLayout(self.layout)

        self.color_dialog = QtGui.QColorDialog(self)        

        link(self.picker_button.pressed, self.show_dialog)