本文整理汇总了Python中ninja_ide.tools.ui_tools.load_table函数的典型用法代码示例。如果您正苦于以下问题:Python load_table函数的具体用法?Python load_table怎么用?Python load_table使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了load_table函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, parent, available):
QWidget.__init__(self, parent)
self._parent = parent
self._available = available
vbox = QVBoxLayout(self)
self._table = ui_tools.CheckableHeaderTable(1, 2)
self._table.setSelectionMode(QTableWidget.SingleSelection)
self._table.removeRow(0)
vbox.addWidget(self._table)
ui_tools.load_table(self._table,
(translations.TR_PROJECT_NAME, translations.TR_VERSION),
_format_for_table(available))
self._table.setColumnWidth(0, 500)
self._table.setSortingEnabled(True)
self._table.setAlternatingRowColors(True)
hbox = QHBoxLayout()
btnInstall = QPushButton(translations.TR_INSTALL)
btnInstall.setMaximumWidth(100)
hbox.addWidget(btnInstall)
hbox.addWidget(QLabel(translations.TR_NINJA_NEEDS_TO_BE_RESTARTED))
vbox.addLayout(hbox)
self.connect(btnInstall, SIGNAL("clicked()"), self._install_plugins)
self.connect(self._table, SIGNAL("itemSelectionChanged()"),
self._show_item_description)
示例2: __init__
def __init__(self, parent, available):
QWidget.__init__(self, parent)
self._parent = parent
self._available = available
vbox = QVBoxLayout(self)
self._table = QTableWidget(1, 5)
self._table.removeRow(0)
vbox.addWidget(self._table)
self._headers = ('Name', 'Version', 'Description', "Authors", "Web")
ui_tools.load_table(self._table, self._headers,
_format_for_table(available))
self._table.setColumnWidth(0, 200)
hbox = QHBoxLayout()
btnInstall = QPushButton('Install')
btnInstall.setMaximumWidth(100)
hbox.addWidget(btnInstall)
hbox.addWidget(QLabel(self.tr("NINJA needs to be restarted for " \
"changes to take effect.")))
vbox.addLayout(hbox)
# hbox = QHBoxLayout()
# hbox.addWidget(QLabel(
# self.tr("Add an external Plugin. URL Zip File:")))
# self._link = QLineEdit()
# hbox.addWidget(self._link)
# btnAdd = QPushButton(self.tr("Add"))
# hbox.addWidget(btnAdd)
# vbox.addLayout(hbox)
# lblExternalPlugin = QLabel(
# self.tr("(Write the URL of the Plugin and press 'Add')"))
# lblExternalPlugin.setAlignment(Qt.AlignRight)
# vbox.addWidget(lblExternalPlugin)
self.connect(btnInstall, SIGNAL("clicked()"), self._install_plugins)
示例3: __init__
def __init__(self, parent, available):
QWidget.__init__(self, parent)
self._parent = parent
self._available = available
vbox = QVBoxLayout(self)
self._table = QTableWidget(1, 2)
self._table.setSelectionMode(QTableWidget.SingleSelection)
self._table.removeRow(0)
vbox.addWidget(self._table)
ui_tools.load_table(self._table, (self.tr('Name'), self.tr('Version')),
_format_for_table(available))
self._table.setColumnWidth(0, 500)
self._table.setSortingEnabled(True)
self._table.setAlternatingRowColors(True)
hbox = QHBoxLayout()
btnInstall = QPushButton(self.tr('Install'))
btnInstall.setMaximumWidth(100)
hbox.addWidget(btnInstall)
hbox.addWidget(QLabel(self.tr("NINJA needs to be restarted for "
"changes to take effect.")))
vbox.addLayout(hbox)
self.connect(btnInstall, SIGNAL("clicked()"), self._install_plugins)
self.connect(self._table, SIGNAL("itemSelectionChanged()"),
self._show_item_description)
示例4: reset_table
def reset_table(self, installed):
"""Reset the list of plugins on the table on the UI"""
self._installed = installed
while self._table.rowCount() > 0:
self._table.removeRow(0)
ui_tools.load_table(self._table,
(translations.TR_PROJECT_NAME, translations.TR_VERSION),
self._installed)
示例5: __init__
def __init__(self, parent, schemes):
QWidget.__init__(self, parent)
self._parent = parent
self._schemes = schemes
vbox = QVBoxLayout(self)
self._table = QTableWidget(1, 2)
self._table.removeRow(0)
vbox.addWidget(self._table)
ui_tools.load_table(self._table, ['Name', 'URL'], self._schemes)
btnUninstall = QPushButton('Download')
btnUninstall.setMaximumWidth(100)
vbox.addWidget(btnUninstall)
self._table.setColumnWidth(0, 200)
self.connect(btnUninstall, SIGNAL("clicked()"), self._download_scheme)
示例6: __init__
def __init__(self, parent, languages):
super(LanguageWidget, self).__init__(parent)
self._parent = parent
self._languages = languages
vbox = QVBoxLayout(self)
self._table = QTableWidget(1, 2)
self._table.removeRow(0)
vbox.addWidget(self._table)
ui_tools.load_table(self._table,
[_translate("LanguagesManagerWidget", 'Language'), _translate("LanguagesManagerWidget", 'URL')], self._languages)
btnUninstall = QPushButton(_translate("LanguagesManagerWidget", 'Download'))
btnUninstall.setMaximumWidth(100)
vbox.addWidget(btnUninstall)
self._table.setColumnWidth(0, 200)
btnUninstall.clicked['bool'].connect(self._download_language)
示例7: __init__
def __init__(self, parent, installed):
QWidget.__init__(self, parent)
self._parent = parent
self._installed = installed
vbox = QVBoxLayout(self)
self._table = QTableWidget(1, 5)
self._table.removeRow(0)
self._headers = ("Name", "Version", "Description", "Authors", "Web")
vbox.addWidget(self._table)
ui_tools.load_table(self._table, self._headers, _format_for_table(installed))
self._table.setColumnWidth(0, 200)
btnUninstall = QPushButton(self.tr("Uninstall"))
btnUninstall.setMaximumWidth(100)
vbox.addWidget(btnUninstall)
self.connect(btnUninstall, SIGNAL("clicked()"), self._uninstall_plugins)
示例8: __init__
def __init__(self, parent, schemes):
QWidget.__init__(self, parent)
self._parent = parent
self._schemes = schemes
vbox = QVBoxLayout(self)
self._table = ui_tools.CheckableHeaderTable(1, 2)
self._table.removeRow(0)
vbox.addWidget(self._table)
ui_tools.load_table(self._table, [self.tr('Name'), self.tr('URL')],
self._schemes)
btnUninstall = QPushButton(self.tr('Download'))
btnUninstall.setMaximumWidth(100)
vbox.addWidget(btnUninstall)
self._table.setColumnWidth(0, 200)
self._table.setSortingEnabled(True)
self._table.setAlternatingRowColors(True)
self.connect(btnUninstall, SIGNAL("clicked()"), self._download_scheme)
示例9: __init__
def __init__(self, parent, languages):
QWidget.__init__(self, parent)
self._parent = parent
self._languages = languages
vbox = QVBoxLayout(self)
self._table = QTableWidget(1, 2)
self._table.removeRow(0)
vbox.addWidget(self._table)
ui_tools.load_table(self._table,
[self.tr('Language'), self.tr('URL')], self._languages)
btnUninstall = QPushButton(self.tr('Download'))
btnUninstall.setMaximumWidth(100)
vbox.addWidget(btnUninstall)
self._table.setColumnWidth(0, 200)
self.connect(btnUninstall, SIGNAL("clicked()"),
self._download_language)
示例10: __init__
def __init__(self, parent, languages):
super(LanguageWidget, self).__init__(parent)
self._parent = parent
self._languages = languages
vbox = QVBoxLayout(self)
self._table = ui_tools.CheckableHeaderTable(1, 2)
self._table.removeRow(0)
vbox.addWidget(self._table)
ui_tools.load_table(self._table,
[self.tr('Language'), self.tr('URL')], self._languages)
btnUninstall = QPushButton(self.tr('Download'))
btnUninstall.setMaximumWidth(100)
vbox.addWidget(btnUninstall)
self._table.setColumnWidth(0, 200)
self._table.setSortingEnabled(True)
self._table.setAlternatingRowColors(True)
btnUninstall.clicked['bool'].connect(self._download_language)
示例11: __init__
def __init__(self, parent, updates):
QWidget.__init__(self, parent)
self._parent = parent
self._updates = updates
vbox = QVBoxLayout(self)
self._table = QTableWidget(1, 2)
self._table.removeRow(0)
self._table.setSelectionMode(QTableWidget.SingleSelection)
self._table.setColumnWidth(0, 500)
vbox.addWidget(self._table)
ui_tools.load_table(self._table, TABLE_HEADER,
_format_for_table(updates))
btnUpdate = QPushButton(self.tr("Update"))
btnUpdate.setMaximumWidth(100)
vbox.addWidget(btnUpdate)
self.connect(btnUpdate, SIGNAL("clicked()"), self._update_plugins)
示例12: __init__
def __init__(self, parent, installed):
super(InstalledWidget, self).__init__(parent)
self._parent = parent
self._installed = installed
vbox = QVBoxLayout(self)
self._table = ui_tools.CheckableHeaderTable(1, 2)
self._table.setSelectionMode(QTableWidget.SingleSelection)
self._table.removeRow(0)
vbox.addWidget(self._table)
ui_tools.load_table(self._table,
(translations.TR_PROJECT_NAME, translations.TR_VERSION),
_format_for_table(installed))
self._table.setColumnWidth(0, 500)
self._table.setSortingEnabled(True)
self._table.setAlternatingRowColors(True)
btnUninstall = QPushButton(translations.TR_UNINSTALL)
btnUninstall.setMaximumWidth(100)
vbox.addWidget(btnUninstall)
btnInstall.clicked['bool'].connect(self._uninstall_plugins)
self._table.itemSelectionChanged.connect(self._show_item_description)
示例13: __init__
def __init__(self, parent, installed):
QWidget.__init__(self, parent)
self._parent = parent
self._installed = installed
vbox = QVBoxLayout(self)
self._table = ui_tools.CheckableHeaderTable(1, 2)
self._table.setSelectionMode(QTableWidget.SingleSelection)
self._table.removeRow(0)
vbox.addWidget(self._table)
ui_tools.load_table(self._table, (self.tr('Name'), self.tr('Version')),
_format_for_table(installed))
self._table.setColumnWidth(0, 500)
self._table.setSortingEnabled(True)
self._table.setAlternatingRowColors(True)
btnUninstall = QPushButton(self.tr("Uninstall"))
btnUninstall.setMaximumWidth(100)
vbox.addWidget(btnUninstall)
self.connect(btnUninstall, SIGNAL("clicked()"),
self._uninstall_plugins)
self.connect(self._table, SIGNAL("itemSelectionChanged()"),
self._show_item_description)
示例14: __init__
def __init__(self, parent, available):
QWidget.__init__(self, parent)
self._parent = parent
self._available = available
vbox = QVBoxLayout(self)
self._table = QTableWidget(1, 2)
self._table.setSelectionMode(QTableWidget.SingleSelection)
self._table.removeRow(0)
vbox.addWidget(self._table)
ui_tools.load_table(self._table, TABLE_HEADER,
_format_for_table(available))
self._table.setColumnWidth(0, 500)
hbox = QHBoxLayout()
btnInstall = QPushButton('Install')
btnInstall.setMaximumWidth(100)
hbox.addWidget(btnInstall)
hbox.addWidget(QLabel(self.tr("NINJA needs to be restarted for " \
"changes to take effect.")))
vbox.addLayout(hbox)
# hbox = QHBoxLayout()
# hbox.addWidget(QLabel(
# self.tr("Add an external Plugin. URL Zip File:")))
# self._link = QLineEdit()
# hbox.addWidget(self._link)
# btnAdd = QPushButton(self.tr("Add"))
# hbox.addWidget(btnAdd)
# vbox.addLayout(hbox)
# lblExternalPlugin = QLabel(
# self.tr("(Write the URL of the Plugin and press 'Add')"))
# lblExternalPlugin.setAlignment(Qt.AlignRight)
# vbox.addWidget(lblExternalPlugin)
self.connect(btnInstall, SIGNAL("clicked()"), self._install_plugins)
self.connect(self._table, SIGNAL("itemSelectionChanged()"),
self._show_item_description)
示例15: reset_table
def reset_table(self, installed):
self._installed = installed
while self._table.rowCount() > 0:
self._table.removeRow(0)
ui_tools.load_table(self._table, (self.tr('Name'), self.tr('Version')),
self._installed)