forked from openlp/openlp
Added QR code and link to iOS remote app and test to HTML Builder.
lp:~knightrider0xd/openlp/ios-app (revision 2650) [SUCCESS] https://ci.openlp.io/job/Branch-01-Pull/1499/ [SUCCESS] https://ci.openlp.io/job/Branch-02-Functional-Tests/1410/ [SUCCESS] https://ci.openlp.io/job/Branch-03-Interface-Tests/1348/ [SUCCESS] https://ci.openlp.io/job/Branch-04a-Windows_Functional_Tests/1145/ [SUCCESS] https://ci.openlp.io/job/Branch-04b-Windows_Interface_Tests/736/ [SUCCESS] https://ci.openlp.io/job/B... bzr-revno: 2653
This commit is contained in:
commit
f4697a6051
@ -144,18 +144,33 @@ class RemoteTab(SettingsTab):
|
||||
self.android_app_group_box = QtWidgets.QGroupBox(self.right_column)
|
||||
self.android_app_group_box.setObjectName('android_app_group_box')
|
||||
self.right_layout.addWidget(self.android_app_group_box)
|
||||
self.qr_layout = QtWidgets.QVBoxLayout(self.android_app_group_box)
|
||||
self.qr_layout.setObjectName('qr_layout')
|
||||
self.qr_code_label = QtWidgets.QLabel(self.android_app_group_box)
|
||||
self.qr_code_label.setPixmap(QtGui.QPixmap(':/remotes/android_app_qr.png'))
|
||||
self.qr_code_label.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.qr_code_label.setObjectName('qr_code_label')
|
||||
self.qr_layout.addWidget(self.qr_code_label)
|
||||
self.qr_description_label = QtWidgets.QLabel(self.android_app_group_box)
|
||||
self.qr_description_label.setObjectName('qr_description_label')
|
||||
self.qr_description_label.setOpenExternalLinks(True)
|
||||
self.qr_description_label.setWordWrap(True)
|
||||
self.qr_layout.addWidget(self.qr_description_label)
|
||||
self.android_qr_layout = QtWidgets.QVBoxLayout(self.android_app_group_box)
|
||||
self.android_qr_layout.setObjectName('android_qr_layout')
|
||||
self.android_qr_code_label = QtWidgets.QLabel(self.android_app_group_box)
|
||||
self.android_qr_code_label.setPixmap(QtGui.QPixmap(':/remotes/android_app_qr.png'))
|
||||
self.android_qr_code_label.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.android_qr_code_label.setObjectName('android_qr_code_label')
|
||||
self.android_qr_layout.addWidget(self.android_qr_code_label)
|
||||
self.android_qr_description_label = QtWidgets.QLabel(self.android_app_group_box)
|
||||
self.android_qr_description_label.setObjectName('android_qr_description_label')
|
||||
self.android_qr_description_label.setOpenExternalLinks(True)
|
||||
self.android_qr_description_label.setWordWrap(True)
|
||||
self.android_qr_layout.addWidget(self.android_qr_description_label)
|
||||
self.ios_app_group_box = QtWidgets.QGroupBox(self.right_column)
|
||||
self.ios_app_group_box.setObjectName('ios_app_group_box')
|
||||
self.right_layout.addWidget(self.ios_app_group_box)
|
||||
self.ios_qr_layout = QtWidgets.QVBoxLayout(self.ios_app_group_box)
|
||||
self.ios_qr_layout.setObjectName('ios_qr_layout')
|
||||
self.ios_qr_code_label = QtWidgets.QLabel(self.ios_app_group_box)
|
||||
self.ios_qr_code_label.setPixmap(QtGui.QPixmap(':/remotes/ios_app_qr.png'))
|
||||
self.ios_qr_code_label.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.ios_qr_code_label.setObjectName('ios_qr_code_label')
|
||||
self.ios_qr_layout.addWidget(self.ios_qr_code_label)
|
||||
self.ios_qr_description_label = QtWidgets.QLabel(self.ios_app_group_box)
|
||||
self.ios_qr_description_label.setObjectName('ios_qr_description_label')
|
||||
self.ios_qr_description_label.setOpenExternalLinks(True)
|
||||
self.ios_qr_description_label.setWordWrap(True)
|
||||
self.ios_qr_layout.addWidget(self.ios_qr_description_label)
|
||||
self.left_layout.addStretch()
|
||||
self.right_layout.addStretch()
|
||||
self.twelve_hour_check_box.stateChanged.connect(self.on_twelve_hour_check_box_changed)
|
||||
@ -176,10 +191,15 @@ class RemoteTab(SettingsTab):
|
||||
self.thumbnails_check_box.setText(translate('RemotePlugin.RemoteTab',
|
||||
'Show thumbnails of non-text slides in remote and stage view.'))
|
||||
self.android_app_group_box.setTitle(translate('RemotePlugin.RemoteTab', 'Android App'))
|
||||
self.qr_description_label.setText(
|
||||
self.android_qr_description_label.setText(
|
||||
translate('RemotePlugin.RemoteTab', 'Scan the QR code or click <a href="%s">download</a> to install the '
|
||||
'Android app from Google Play.') %
|
||||
'https://play.google.com/store/apps/details?id=org.openlp.android2')
|
||||
self.ios_app_group_box.setTitle(translate('RemotePlugin.RemoteTab', 'iOS App'))
|
||||
self.ios_qr_description_label.setText(
|
||||
translate('RemotePlugin.RemoteTab', 'Scan the QR code or click <a href="%s">download</a> to install the '
|
||||
'iOS app from the App Store.') %
|
||||
'https://itunes.apple.com/app/id1096218725')
|
||||
self.https_settings_group_box.setTitle(translate('RemotePlugin.RemoteTab', 'HTTPS Server'))
|
||||
self.https_error_label.setText(
|
||||
translate('RemotePlugin.RemoteTab', 'Could not find an SSL certificate. The HTTPS server will not be '
|
||||
|
BIN
resources/images/ios_app_qr.png
Normal file
BIN
resources/images/ios_app_qr.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 758 B |
@ -206,5 +206,6 @@
|
||||
</qresource>
|
||||
<qresource prefix="remotes">
|
||||
<file>android_app_qr.png</file>
|
||||
<file>ios_app_qr.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@ -197,6 +197,7 @@ FOOTER_CSS_BASE = """
|
||||
"""
|
||||
FOOTER_CSS = FOOTER_CSS_BASE % ('nowrap')
|
||||
FOOTER_CSS_WRAP = FOOTER_CSS_BASE % ('normal')
|
||||
FOOTER_CSS_INVALID = ''
|
||||
|
||||
|
||||
class Htmbuilder(TestCase, TestMixin):
|
||||
@ -359,6 +360,27 @@ class Htmbuilder(TestCase, TestMixin):
|
||||
# THEN: Footer should wrap
|
||||
self.assertEqual(FOOTER_CSS_WRAP, css, 'The footer strings should be equal.')
|
||||
|
||||
def build_footer_invalid_test(self):
|
||||
"""
|
||||
Test the build_footer_css() function
|
||||
"""
|
||||
# GIVEN: Create a theme.
|
||||
css = []
|
||||
item = MagicMock()
|
||||
item.theme_data = None
|
||||
item.footer = 'FAIL'
|
||||
height = 1024
|
||||
|
||||
# WHEN: Settings say that footer should wrap
|
||||
css.append(build_footer_css(item, height))
|
||||
item.theme_data = 'TEST'
|
||||
item.footer = None
|
||||
css.append(build_footer_css(item, height))
|
||||
|
||||
# THEN: Footer should wrap
|
||||
self.assertEqual(FOOTER_CSS_INVALID, css[0], 'The footer strings should be blank.')
|
||||
self.assertEqual(FOOTER_CSS_INVALID, css[1], 'The footer strings should be blank.')
|
||||
|
||||
def webkit_version_test(self):
|
||||
"""
|
||||
Test the webkit_version() function
|
||||
|
Loading…
Reference in New Issue
Block a user