def init_top_layout(self):
title = QtWidgets.QLabel('Check All Functions')
title.setStyleSheet('font: 16pt;')
description = QtWidgets.QLabel((
'Query FIRST\'s server for function metadata.\n'
'If a function within this IDB matches a signature found in '
'FIRST then it and its metadata will be available for you to '
'select below to apply to your IDB. Select the function you '
'wish to apply existing metadata to in order to view the '
'possible matches.'))
description.setWordWrap(True)
description.setStyleSheet('text-size: 90%')
vbox_text = QtWidgets.QVBoxLayout()
vbox_text.addWidget(title)
vbox_text.addWidget(description)
widget = QtWidgets.QWidget()
widget.setFixedWidth(100)
vbox_legend = QtWidgets.QVBoxLayout(widget)
grid_legend = QtWidgets.QGridLayout()
style = 'background-color: #{0:06x}; border: 1px solid #c0c0c0;'
colors = [FIRST.color_applied, FIRST.color_selected]
text = ['Applied', 'Selected']
for i in xrange(len(colors)):
box = QtWidgets.QLabel()
box.setFixedHeight(10)
box.setFixedWidth(10)
box.setStyleSheet(style.format(colors[i].color().rgb() & 0xFFFFFF))
grid_legend.addWidget(box, i, 0)
grid_legend.addWidget(QtWidgets.QLabel(text[i]), i, 1)
vbox_legend.addLayout(grid_legend)
vbox_legend.setAlignment(Qt.AlignRight | Qt.AlignBottom)
vbox_legend.setContentsMargins(20, 0, 0, 0)
self.top_layout.addLayout(vbox_text)
self.top_layout.addWidget(widget)
评论列表
文章目录