forked from openlp/openlp
First half of song removal review UI.
This commit is contained in:
parent
1640bc6531
commit
709c398205
@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
||||
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
||||
|
||||
###############################################################################
|
||||
# OpenLP - Open Source Lyrics Projection #
|
||||
@ -35,7 +35,7 @@ import os
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import Receiver, Settings, SettingsManager, translate
|
||||
from openlp.core.lib import Receiver, Settings, SettingsManager, translate, build_icon
|
||||
from openlp.core.lib.ui import UiStrings, critical_error_message_box
|
||||
from openlp.core.ui.wizard import OpenLPWizard, WizardStrings
|
||||
from openlp.plugins.songs.lib.db import Song
|
||||
@ -86,20 +86,30 @@ class DuplicateSongRemovalForm(OpenLPWizard):
|
||||
"""
|
||||
self.searchingPage = QtGui.QWizardPage()
|
||||
self.searchingPage.setObjectName('searchingPage')
|
||||
self.verticalLayout = QtGui.QVBoxLayout(self.searchingPage)
|
||||
self.verticalLayout.setObjectName('verticalLayout')
|
||||
self.searchingVerticalLayout = QtGui.QVBoxLayout(self.searchingPage)
|
||||
self.searchingVerticalLayout.setObjectName('searchingVerticalLayout')
|
||||
self.duplicateSearchProgressBar = QtGui.QProgressBar(self.searchingPage)
|
||||
self.duplicateSearchProgressBar.setObjectName(u'duplicateSearchProgressBar')
|
||||
self.duplicateSearchProgressBar.setFormat(WizardStrings.PercentSymbolFormat)
|
||||
self.verticalLayout.addWidget(self.duplicateSearchProgressBar)
|
||||
self.searchingVerticalLayout.addWidget(self.duplicateSearchProgressBar)
|
||||
self.foundDuplicatesEdit = QtGui.QPlainTextEdit(self.searchingPage)
|
||||
self.foundDuplicatesEdit.setUndoRedoEnabled(False)
|
||||
self.foundDuplicatesEdit.setReadOnly(True)
|
||||
self.foundDuplicatesEdit.setObjectName('foundDuplicatesEdit')
|
||||
self.verticalLayout.addWidget(self.foundDuplicatesEdit)
|
||||
self.searchingVerticalLayout.addWidget(self.foundDuplicatesEdit)
|
||||
self.addPage(self.searchingPage)
|
||||
self.reviewPage = QtGui.QWizardPage()
|
||||
self.reviewPage.setObjectName('reviewPage')
|
||||
self.headerVerticalLayout = QtGui.QVBoxLayout(self.reviewPage)
|
||||
self.headerVerticalLayout.setObjectName('headerVerticalLayout')
|
||||
self.reviewCounterLabel = QtGui.QLabel(self.reviewPage)
|
||||
self.reviewCounterLabel.setObjectName('reviewCounterLabel')
|
||||
self.headerVerticalLayout.addWidget(self.reviewCounterLabel)
|
||||
self.songsHorizontalLayout = QtGui.QHBoxLayout()
|
||||
self.songsHorizontalLayout.setObjectName('songsHorizontalLayout')
|
||||
self.songReviewWidget = SongReviewWidget(self.reviewPage)
|
||||
self.songsHorizontalLayout.addWidget(self.songReviewWidget)
|
||||
self.headerVerticalLayout.addLayout(self.songsHorizontalLayout)
|
||||
self.addPage(self.reviewPage)
|
||||
|
||||
def retranslateUi(self):
|
||||
@ -113,6 +123,9 @@ class DuplicateSongRemovalForm(OpenLPWizard):
|
||||
'This wizard will help you to remove duplicate songs from the song database.'))
|
||||
self.searchingPage.setTitle(translate('Wizard', 'Searching for doubles'))
|
||||
self.searchingPage.setSubTitle(translate('Wizard', 'The song database is searched for double songs.'))
|
||||
self.reviewPage.setTitle(translate('Wizard', 'Review duplicate songs'))
|
||||
self.reviewPage.setSubTitle(translate('Wizard',
|
||||
'This page shows all duplicate songs to review which ones to remove and which ones to keep.'))
|
||||
|
||||
def customPageChanged(self, pageId):
|
||||
"""
|
||||
@ -154,3 +167,23 @@ class DuplicateSongRemovalForm(OpenLPWizard):
|
||||
the actual importing.
|
||||
"""
|
||||
pass
|
||||
|
||||
class SongReviewWidget(QtGui.QWidget):
|
||||
def __init__(self, parent):
|
||||
QtGui.QWidget.__init__(self, parent)
|
||||
self.setupUi()
|
||||
self.retranslateUi()
|
||||
|
||||
def setupUi(self):
|
||||
self.songVerticalLayout = QtGui.QVBoxLayout(self)
|
||||
self.songVerticalLayout.setObjectName('songVerticalLayout')
|
||||
self.songGroupBox = QtGui.QGroupBox(self)
|
||||
self.songGroupBox.setObjectName('songGroupBox')
|
||||
self.songVerticalLayout.addWidget(self.songGroupBox)
|
||||
self.songRemoveButton = QtGui.QPushButton(self)
|
||||
self.songRemoveButton.setObjectName('songRemoveButton')
|
||||
self.songRemoveButton.setIcon(build_icon(u':/songs/song_delete.png'))
|
||||
self.songVerticalLayout.addWidget(self.songRemoveButton)
|
||||
|
||||
def retranslateUi(self):
|
||||
self.songRemoveButton.setText(u'Remove')
|
||||
|
Loading…
Reference in New Issue
Block a user