forked from openlp/openlp
Lists from the web now
This commit is contained in:
parent
b4156c809b
commit
0e773c7a1b
@ -44,8 +44,14 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard):
|
|||||||
|
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
# check to see if we have web access
|
# check to see if we have web access
|
||||||
self.webAccess = get_web_page(u'http://openlp.org1')
|
self.webAccess = get_web_page(u'http://openlp.org/files/frw/themes.lst')
|
||||||
print self.webAccess
|
print self.webAccess
|
||||||
|
if self.webAccess:
|
||||||
|
self.themes = self.webAccess.read()
|
||||||
|
songs = get_web_page(u'http://openlp.org/files/frw/songs.lst')
|
||||||
|
self.songs = songs.read()
|
||||||
|
bibles = get_web_page(u'http://openlp.org/files/frw/bibles.lst')
|
||||||
|
self.bibles = bibles.read()
|
||||||
QtGui.QWizard.__init__(self, parent)
|
QtGui.QWizard.__init__(self, parent)
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
QtCore.QObject.connect(self.autoLanguageCheckBox,
|
QtCore.QObject.connect(self.autoLanguageCheckBox,
|
||||||
@ -78,6 +84,26 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard):
|
|||||||
self.qmList = LanguageManager.get_qm_list()
|
self.qmList = LanguageManager.get_qm_list()
|
||||||
for key in sorted(self.qmList.keys()):
|
for key in sorted(self.qmList.keys()):
|
||||||
self.LanguageComboBox.addItem(key)
|
self.LanguageComboBox.addItem(key)
|
||||||
|
treewidgetitem = QtGui.QTreeWidgetItem(self.selectionTreeWidget)
|
||||||
|
treewidgetitem.setText(0, u'Songs')
|
||||||
|
self.__loadChild(treewidgetitem, self.songs)
|
||||||
|
treewidgetitem = QtGui.QTreeWidgetItem(self.selectionTreeWidget)
|
||||||
|
treewidgetitem.setText(0, u'Bibles')
|
||||||
|
self.__loadChild(treewidgetitem, self.bibles)
|
||||||
|
treewidgetitem = QtGui.QTreeWidgetItem(self.selectionTreeWidget)
|
||||||
|
treewidgetitem.setText(0, u'Themes')
|
||||||
|
self.__loadChild(treewidgetitem, self.themes)
|
||||||
|
|
||||||
|
def __loadChild(self, tree, list):
|
||||||
|
list = list.split(u'\n')
|
||||||
|
for item in list:
|
||||||
|
if item:
|
||||||
|
child = QtGui.QTreeWidgetItem(tree)
|
||||||
|
child.setText(0, item)
|
||||||
|
child.setCheckState(0, QtCore.Qt.Unchecked)
|
||||||
|
child.setFlags(QtCore.Qt.ItemIsUserCheckable |
|
||||||
|
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
|
||||||
|
#self.themeSelectionComboBox.addItem(theme)
|
||||||
|
|
||||||
def accept(self):
|
def accept(self):
|
||||||
self.__pluginStatus(self.songsCheckBox, u'songs/status')
|
self.__pluginStatus(self.songsCheckBox, u'songs/status')
|
||||||
|
@ -250,10 +250,10 @@ p, li { white-space: pre-wrap; }
|
|||||||
<widget class="QGroupBox" name="internetGroupBox">
|
<widget class="QGroupBox" name="internetGroupBox">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>30</x>
|
<x>20</x>
|
||||||
<y>50</y>
|
<y>0</y>
|
||||||
<width>441</width>
|
<width>501</width>
|
||||||
<height>191</height>
|
<height>281</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@ -261,31 +261,30 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<widget class="QTreeWidget" name="selectionTreeWidget">
|
||||||
<item>
|
<property name="horizontalScrollBarPolicy">
|
||||||
<widget class="QCheckBox" name="downLoadSongsCheckBox">
|
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||||
<property name="text">
|
|
||||||
<string>Sample Songs </string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="showDropIndicator" stdset="0">
|
||||||
</item>
|
<bool>false</bool>
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="downLoadBibleCheckBox">
|
|
||||||
<property name="text">
|
|
||||||
<string>Bible XXX (Repeat per bible)</string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="alternatingRowColors">
|
||||||
</item>
|
<bool>true</bool>
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="downLoadThemeCheckBox">
|
|
||||||
<property name="text">
|
|
||||||
<string>Theme XXX (Repeat per theme)</string>
|
|
||||||
</property>
|
</property>
|
||||||
|
<property name="selectionMode">
|
||||||
|
<enum>QAbstractItemView::NoSelection</enum>
|
||||||
|
</property>
|
||||||
|
<attribute name="headerVisible">
|
||||||
|
<bool>false</bool>
|
||||||
|
</attribute>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">1</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWizardPage" name="DefaultsPage">
|
<widget class="QWizardPage" name="DefaultsPage">
|
||||||
|
Loading…
Reference in New Issue
Block a user