← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~googol/openlp/alerts into lp:openlp

 

Andreas Preikschat has proposed merging lp:~googol/openlp/alerts into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~googol/openlp/alerts/+merge/71896

Hello,

- changed instance varaibles to camelCase
-- 
https://code.launchpad.net/~googol/openlp/alerts/+merge/71896
Your team OpenLP Core is requested to review the proposed merge of lp:~googol/openlp/alerts into lp:openlp.
=== modified file 'openlp/plugins/alerts/lib/alertstab.py'
--- openlp/plugins/alerts/lib/alertstab.py	2011-06-12 16:02:52 +0000
+++ openlp/plugins/alerts/lib/alertstab.py	2011-08-17 14:20:25 +0000
@@ -44,85 +44,85 @@
         self.fontGroupBox.setObjectName(u'fontGroupBox')
         self.fontLayout = QtGui.QFormLayout(self.fontGroupBox)
         self.fontLayout.setObjectName(u'fontLayout')
-        self.FontLabel = QtGui.QLabel(self.fontGroupBox)
-        self.FontLabel.setObjectName(u'FontLabel')
-        self.FontComboBox = QtGui.QFontComboBox(self.fontGroupBox)
-        self.FontComboBox.setObjectName(u'FontComboBox')
-        self.fontLayout.addRow(self.FontLabel, self.FontComboBox)
-        self.FontColorLabel = QtGui.QLabel(self.fontGroupBox)
-        self.FontColorLabel.setObjectName(u'FontColorLabel')
-        self.ColorLayout = QtGui.QHBoxLayout()
-        self.ColorLayout.setObjectName(u'ColorLayout')
-        self.FontColorButton = QtGui.QPushButton(self.fontGroupBox)
-        self.FontColorButton.setObjectName(u'FontColorButton')
-        self.ColorLayout.addWidget(self.FontColorButton)
-        self.ColorLayout.addSpacing(20)
-        self.BackgroundColorLabel = QtGui.QLabel(self.fontGroupBox)
-        self.BackgroundColorLabel.setObjectName(u'BackgroundColorLabel')
-        self.ColorLayout.addWidget(self.BackgroundColorLabel)
-        self.BackgroundColorButton = QtGui.QPushButton(self.fontGroupBox)
-        self.BackgroundColorButton.setObjectName(u'BackgroundColorButton')
-        self.ColorLayout.addWidget(self.BackgroundColorButton)
-        self.fontLayout.addRow(self.FontColorLabel, self.ColorLayout)
-        self.FontSizeLabel = QtGui.QLabel(self.fontGroupBox)
-        self.FontSizeLabel.setObjectName(u'FontSizeLabel')
-        self.FontSizeSpinBox = QtGui.QSpinBox(self.fontGroupBox)
-        self.FontSizeSpinBox.setObjectName(u'FontSizeSpinBox')
-        self.fontLayout.addRow(self.FontSizeLabel, self.FontSizeSpinBox)
-        self.TimeoutLabel = QtGui.QLabel(self.fontGroupBox)
-        self.TimeoutLabel.setObjectName(u'TimeoutLabel')
-        self.TimeoutSpinBox = QtGui.QSpinBox(self.fontGroupBox)
-        self.TimeoutSpinBox.setMaximum(180)
-        self.TimeoutSpinBox.setObjectName(u'TimeoutSpinBox')
-        self.fontLayout.addRow(self.TimeoutLabel, self.TimeoutSpinBox)
+        self.fontLabel = QtGui.QLabel(self.fontGroupBox)
+        self.fontLabel.setObjectName(u'fontLabel')
+        self.fontComboBox = QtGui.QFontComboBox(self.fontGroupBox)
+        self.fontComboBox.setObjectName(u'fontComboBox')
+        self.fontLayout.addRow(self.fontLabel, self.fontComboBox)
+        self.fontColorLabel = QtGui.QLabel(self.fontGroupBox)
+        self.fontColorLabel.setObjectName(u'fontColorLabel')
+        self.colorLayout = QtGui.QHBoxLayout()
+        self.colorLayout.setObjectName(u'colorLayout')
+        self.fontColorButton = QtGui.QPushButton(self.fontGroupBox)
+        self.fontColorButton.setObjectName(u'fontColorButton')
+        self.colorLayout.addWidget(self.fontColorButton)
+        self.colorLayout.addSpacing(20)
+        self.backgroundColorLabel = QtGui.QLabel(self.fontGroupBox)
+        self.backgroundColorLabel.setObjectName(u'backgroundColorLabel')
+        self.colorLayout.addWidget(self.backgroundColorLabel)
+        self.backgroundColorButton = QtGui.QPushButton(self.fontGroupBox)
+        self.backgroundColorButton.setObjectName(u'backgroundColorButton')
+        self.colorLayout.addWidget(self.backgroundColorButton)
+        self.fontLayout.addRow(self.fontColorLabel, self.colorLayout)
+        self.fontSizeLabel = QtGui.QLabel(self.fontGroupBox)
+        self.fontSizeLabel.setObjectName(u'fontSizeLabel')
+        self.fontSizeSpinBox = QtGui.QSpinBox(self.fontGroupBox)
+        self.fontSizeSpinBox.setObjectName(u'fontSizeSpinBox')
+        self.fontLayout.addRow(self.fontSizeLabel, self.fontSizeSpinBox)
+        self.timeoutLabel = QtGui.QLabel(self.fontGroupBox)
+        self.timeoutLabel.setObjectName(u'timeoutLabel')
+        self.timeoutSpinBox = QtGui.QSpinBox(self.fontGroupBox)
+        self.timeoutSpinBox.setMaximum(180)
+        self.timeoutSpinBox.setObjectName(u'timeoutSpinBox')
+        self.fontLayout.addRow(self.timeoutLabel, self.timeoutSpinBox)
         create_valign_combo(self, self.fontGroupBox, self.fontLayout)
         self.leftLayout.addWidget(self.fontGroupBox)
         self.leftLayout.addStretch()
-        self.PreviewGroupBox = QtGui.QGroupBox(self.rightColumn)
-        self.PreviewGroupBox.setObjectName(u'PreviewGroupBox')
-        self.PreviewLayout = QtGui.QVBoxLayout(self.PreviewGroupBox)
-        self.PreviewLayout.setObjectName(u'PreviewLayout')
-        self.FontPreview = QtGui.QLineEdit(self.PreviewGroupBox)
-        self.FontPreview.setObjectName(u'FontPreview')
-        self.PreviewLayout.addWidget(self.FontPreview)
-        self.rightLayout.addWidget(self.PreviewGroupBox)
+        self.previewGroupBox = QtGui.QGroupBox(self.rightColumn)
+        self.previewGroupBox.setObjectName(u'previewGroupBox')
+        self.previewLayout = QtGui.QVBoxLayout(self.previewGroupBox)
+        self.previewLayout.setObjectName(u'previewLayout')
+        self.fontPreview = QtGui.QLineEdit(self.previewGroupBox)
+        self.fontPreview.setObjectName(u'fontPreview')
+        self.previewLayout.addWidget(self.fontPreview)
+        self.rightLayout.addWidget(self.previewGroupBox)
         self.rightLayout.addStretch()
         # Signals and slots
-        QtCore.QObject.connect(self.BackgroundColorButton,
+        QtCore.QObject.connect(self.backgroundColorButton,
             QtCore.SIGNAL(u'pressed()'), self.onBackgroundColorButtonClicked)
-        QtCore.QObject.connect(self.FontColorButton,
+        QtCore.QObject.connect(self.fontColorButton,
             QtCore.SIGNAL(u'pressed()'), self.onFontColorButtonClicked)
-        QtCore.QObject.connect(self.FontComboBox,
+        QtCore.QObject.connect(self.fontComboBox,
             QtCore.SIGNAL(u'activated(int)'), self.onFontComboBoxClicked)
-        QtCore.QObject.connect(self.TimeoutSpinBox,
+        QtCore.QObject.connect(self.timeoutSpinBox,
             QtCore.SIGNAL(u'valueChanged(int)'), self.onTimeoutSpinBoxChanged)
-        QtCore.QObject.connect(self.FontSizeSpinBox,
+        QtCore.QObject.connect(self.fontSizeSpinBox,
             QtCore.SIGNAL(u'valueChanged(int)'), self.onFontSizeSpinBoxChanged)
 
     def retranslateUi(self):
         self.fontGroupBox.setTitle(
             translate('AlertsPlugin.AlertsTab', 'Font'))
-        self.FontLabel.setText(
+        self.fontLabel.setText(
             translate('AlertsPlugin.AlertsTab', 'Font name:'))
-        self.FontColorLabel.setText(
+        self.fontColorLabel.setText(
             translate('AlertsPlugin.AlertsTab', 'Font color:'))
-        self.BackgroundColorLabel.setText(
+        self.backgroundColorLabel.setText(
             translate('AlertsPlugin.AlertsTab', 'Background color:'))
-        self.FontSizeLabel.setText(
+        self.fontSizeLabel.setText(
             translate('AlertsPlugin.AlertsTab', 'Font size:'))
-        self.FontSizeSpinBox.setSuffix(UiStrings().FontSizePtUnit)
-        self.TimeoutLabel.setText(
+        self.fontSizeSpinBox.setSuffix(UiStrings().FontSizePtUnit)
+        self.timeoutLabel.setText(
             translate('AlertsPlugin.AlertsTab', 'Alert timeout:'))
-        self.TimeoutSpinBox.setSuffix(UiStrings().Seconds)
-        self.PreviewGroupBox.setTitle(UiStrings().Preview)
-        self.FontPreview.setText(UiStrings().OLPV2)
+        self.timeoutSpinBox.setSuffix(UiStrings().Seconds)
+        self.previewGroupBox.setTitle(UiStrings().Preview)
+        self.fontPreview.setText(UiStrings().OLPV2)
 
     def onBackgroundColorButtonClicked(self):
         new_color = QtGui.QColorDialog.getColor(
             QtGui.QColor(self.bg_color), self)
         if new_color.isValid():
             self.bg_color = new_color.name()
-            self.BackgroundColorButton.setStyleSheet(
+            self.backgroundColorButton.setStyleSheet(
                 u'background-color: %s' % self.bg_color)
             self.updateDisplay()
 
@@ -134,15 +134,15 @@
             QtGui.QColor(self.font_color), self)
         if new_color.isValid():
             self.font_color = new_color.name()
-            self.FontColorButton.setStyleSheet(
+            self.fontColorButton.setStyleSheet(
                 u'background-color: %s' % self.font_color)
             self.updateDisplay()
 
     def onTimeoutSpinBoxChanged(self):
-        self.timeout = self.TimeoutSpinBox.value()
+        self.timeout = self.timeoutSpinBox.value()
 
     def onFontSizeSpinBoxChanged(self):
-        self.font_size = self.FontSizeSpinBox.value()
+        self.font_size = self.fontSizeSpinBox.value()
         self.updateDisplay()
 
     def load(self):
@@ -160,16 +160,16 @@
         self.location = settings.value(
             u'location', QtCore.QVariant(1)).toInt()[0]
         settings.endGroup()
-        self.FontSizeSpinBox.setValue(self.font_size)
-        self.TimeoutSpinBox.setValue(self.timeout)
-        self.FontColorButton.setStyleSheet(
+        self.fontSizeSpinBox.setValue(self.font_size)
+        self.timeoutSpinBox.setValue(self.timeout)
+        self.fontColorButton.setStyleSheet(
             u'background-color: %s' % self.font_color)
-        self.BackgroundColorButton.setStyleSheet(
+        self.backgroundColorButton.setStyleSheet(
             u'background-color: %s' % self.bg_color)
         self.verticalComboBox.setCurrentIndex(self.location)
         font = QtGui.QFont()
         font.setFamily(self.font_face)
-        self.FontComboBox.setCurrentFont(font)
+        self.fontComboBox.setCurrentFont(font)
         self.updateDisplay()
 
     def save(self):
@@ -178,7 +178,7 @@
         settings.setValue(u'background color', QtCore.QVariant(self.bg_color))
         settings.setValue(u'font color', QtCore.QVariant(self.font_color))
         settings.setValue(u'font size', QtCore.QVariant(self.font_size))
-        self.font_face = self.FontComboBox.currentFont().family()
+        self.font_face = self.fontComboBox.currentFont().family()
         settings.setValue(u'font face', QtCore.QVariant(self.font_face))
         settings.setValue(u'timeout', QtCore.QVariant(self.timeout))
         self.location = self.verticalComboBox.currentIndex()
@@ -187,10 +187,10 @@
 
     def updateDisplay(self):
         font = QtGui.QFont()
-        font.setFamily(self.FontComboBox.currentFont().family())
+        font.setFamily(self.fontComboBox.currentFont().family())
         font.setBold(True)
         font.setPointSize(self.font_size)
-        self.FontPreview.setFont(font)
-        self.FontPreview.setStyleSheet(u'background-color: %s; color: %s' %
+        self.fontPreview.setFont(font)
+        self.fontPreview.setStyleSheet(u'background-color: %s; color: %s' %
             (self.bg_color, self.font_color))
 


Follow ups