2009-10-06 21:07:12 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
2012-12-29 13:35:16 +00:00
|
|
|
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
2009-10-06 21:07:12 +00:00
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# OpenLP - Open Source Lyrics Projection #
|
|
|
|
# --------------------------------------------------------------------------- #
|
2015-12-31 22:46:06 +00:00
|
|
|
# Copyright (c) 2008-2016 OpenLP Developers #
|
2009-10-06 21:07:12 +00:00
|
|
|
# --------------------------------------------------------------------------- #
|
|
|
|
# This program is free software; you can redistribute it and/or modify it #
|
|
|
|
# under the terms of the GNU General Public License as published by the Free #
|
|
|
|
# Software Foundation; version 2 of the License. #
|
|
|
|
# #
|
|
|
|
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
|
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
|
|
|
# more details. #
|
|
|
|
# #
|
|
|
|
# You should have received a copy of the GNU General Public License along #
|
|
|
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
|
|
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
|
|
|
###############################################################################
|
2013-02-01 20:52:42 +00:00
|
|
|
"""
|
|
|
|
The UI widgets of the plugin view dialog
|
|
|
|
#"""
|
2015-11-07 00:49:40 +00:00
|
|
|
from PyQt5 import QtCore, QtWidgets
|
2011-02-12 04:09:03 +00:00
|
|
|
|
2013-10-13 20:36:42 +00:00
|
|
|
from openlp.core.common import UiStrings, translate
|
2014-05-03 15:01:43 +00:00
|
|
|
from openlp.core.lib import build_icon
|
2013-01-11 00:19:11 +00:00
|
|
|
from openlp.core.lib.ui import create_button_box
|
|
|
|
|
2009-10-06 21:07:12 +00:00
|
|
|
|
|
|
|
class Ui_PluginViewDialog(object):
|
2013-02-01 20:52:42 +00:00
|
|
|
"""
|
|
|
|
The UI of the plugin view dialog
|
|
|
|
"""
|
2015-11-02 20:52:22 +00:00
|
|
|
def setupUi(self, plugin_view_dialog):
|
2013-02-01 20:52:42 +00:00
|
|
|
"""
|
|
|
|
Set up the UI
|
|
|
|
"""
|
2015-11-02 20:52:22 +00:00
|
|
|
plugin_view_dialog.setObjectName('plugin_view_dialog')
|
|
|
|
plugin_view_dialog.setWindowIcon(build_icon(u':/icon/openlp-logo.svg'))
|
|
|
|
plugin_view_dialog.setWindowModality(QtCore.Qt.ApplicationModal)
|
2015-11-07 00:49:40 +00:00
|
|
|
self.plugin_layout = QtWidgets.QVBoxLayout(plugin_view_dialog)
|
2013-12-24 15:55:01 +00:00
|
|
|
self.plugin_layout.setObjectName('plugin_layout')
|
2015-11-07 00:49:40 +00:00
|
|
|
self.list_layout = QtWidgets.QHBoxLayout()
|
2013-12-24 15:55:01 +00:00
|
|
|
self.list_layout.setObjectName('list_layout')
|
2015-11-07 00:49:40 +00:00
|
|
|
self.plugin_list_widget = QtWidgets.QListWidget(plugin_view_dialog)
|
2013-12-24 15:55:01 +00:00
|
|
|
self.plugin_list_widget.setObjectName('plugin_list_widget')
|
|
|
|
self.list_layout.addWidget(self.plugin_list_widget)
|
2015-11-07 00:49:40 +00:00
|
|
|
self.plugin_info_group_box = QtWidgets.QGroupBox(plugin_view_dialog)
|
2013-12-24 15:55:01 +00:00
|
|
|
self.plugin_info_group_box.setObjectName('plugin_info_group_box')
|
2015-11-07 00:49:40 +00:00
|
|
|
self.plugin_info_layout = QtWidgets.QFormLayout(self.plugin_info_group_box)
|
2013-12-24 15:55:01 +00:00
|
|
|
self.plugin_info_layout.setObjectName('plugin_info_layout')
|
2015-11-07 00:49:40 +00:00
|
|
|
self.status_label = QtWidgets.QLabel(self.plugin_info_group_box)
|
2013-12-24 15:55:01 +00:00
|
|
|
self.status_label.setObjectName('status_label')
|
2015-11-07 00:49:40 +00:00
|
|
|
self.status_combo_box = QtWidgets.QComboBox(self.plugin_info_group_box)
|
2013-12-24 15:55:01 +00:00
|
|
|
self.status_combo_box.addItems(('', ''))
|
|
|
|
self.status_combo_box.setObjectName('status_combo_box')
|
|
|
|
self.plugin_info_layout.addRow(self.status_label, self.status_combo_box)
|
2015-11-07 00:49:40 +00:00
|
|
|
self.version_label = QtWidgets.QLabel(self.plugin_info_group_box)
|
2013-12-24 15:55:01 +00:00
|
|
|
self.version_label.setObjectName('version_label')
|
2015-11-07 00:49:40 +00:00
|
|
|
self.version_number_label = QtWidgets.QLabel(self.plugin_info_group_box)
|
2013-12-24 15:55:01 +00:00
|
|
|
self.version_number_label.setObjectName('version_number_label')
|
|
|
|
self.plugin_info_layout.addRow(self.version_label, self.version_number_label)
|
2015-11-07 00:49:40 +00:00
|
|
|
self.about_label = QtWidgets.QLabel(self.plugin_info_group_box)
|
2013-12-24 15:55:01 +00:00
|
|
|
self.about_label.setObjectName('about_label')
|
2015-11-07 00:49:40 +00:00
|
|
|
self.about_text_browser = QtWidgets.QTextBrowser(self.plugin_info_group_box)
|
2013-12-24 15:55:01 +00:00
|
|
|
self.about_text_browser.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse)
|
|
|
|
self.about_text_browser.setObjectName('aboutTextBrowser')
|
|
|
|
self.plugin_info_layout.addRow(self.about_label, self.about_text_browser)
|
|
|
|
self.list_layout.addWidget(self.plugin_info_group_box)
|
|
|
|
self.plugin_layout.addLayout(self.list_layout)
|
2015-11-02 20:52:22 +00:00
|
|
|
self.button_box = create_button_box(plugin_view_dialog, 'button_box', ['ok'])
|
2013-12-24 15:55:01 +00:00
|
|
|
self.plugin_layout.addWidget(self.button_box)
|
2015-11-02 20:52:22 +00:00
|
|
|
self.retranslateUi(plugin_view_dialog)
|
2009-10-06 21:07:12 +00:00
|
|
|
|
2015-11-02 20:52:22 +00:00
|
|
|
def retranslateUi(self, plugin_view_dialog):
|
2013-02-01 20:52:42 +00:00
|
|
|
"""
|
|
|
|
Translate the UI on the fly
|
|
|
|
"""
|
2015-11-02 20:52:22 +00:00
|
|
|
plugin_view_dialog.setWindowTitle(translate('OpenLP.PluginForm', 'Manage Plugins'))
|
2013-12-24 15:55:01 +00:00
|
|
|
self.plugin_info_group_box.setTitle(translate('OpenLP.PluginForm', 'Plugin Details'))
|
|
|
|
self.version_label.setText('%s:' % UiStrings().Version)
|
|
|
|
self.about_label.setText('%s:' % UiStrings().About)
|
|
|
|
self.status_label.setText(translate('OpenLP.PluginForm', 'Status:'))
|
|
|
|
self.status_combo_box.setItemText(0, translate('OpenLP.PluginForm', 'Active'))
|
|
|
|
self.status_combo_box.setItemText(1, translate('OpenLP.PluginForm', 'Inactive'))
|