# Path: eclectusqt/forms/VocabularyPageUI.py
# class MyQListView(QtGui.QListView):
# class Ui_Form(object):
#     def keyPressEvent(self, event):
#     def setupUi(self, Form):
#     def retranslateUi(self, Form):
# 
# Path: eclectusqt/util.py
# def getIcon(fileName):
# def getData(fileName):
# def getLocalData(fileName):
# def getDataPaths():
# def readConfigString(config, option, default=None):
# def _readConfig(config, option, default, conversionFunc):
# def readConfigInt(config, option, default=None):
#     def __init__(self, parent):
#     def javaScriptConsoleMessage(self, message, lineNumber, sourceID):
#     def javaScriptAlert(self, frame, msg):
# class HandyWebpage(QWebPage):


import re
import locale
import codecs
import os
import sys
import functools
from datetime import date
from PyQt4.QtCore import Qt, SIGNAL, QVariant, QModelIndex, QAbstractListModel
from PyQt4.QtGui import QWidget, QAction, QAbstractItemView, QShortcut, QMenu
from PyKDE4.kdeui import KIcon, KMenu, KStandardAction, KMessageBox
from PyKDE4.kdecore import i18n, KUrl
from PyKDE4.kio import KFileDialog
from eclectusqt.forms import VocabularyPageUI
from eclectusqt import util
        return self.createIndex(row, column, self.vocabularyList[row])

    def find(self, entry):
        # TODO
        for i, e in enumerate(self.vocabularyList):
            for key in entry.keys():
                if key in e and e[key] != entry[key]:
                    break
            else:
                return self.index(i)

    def insertRows(self, row, count, parent=QModelIndex()):
        self.beginInsertRows(parent, row, row+count-1)
        for i in range(row, row + count):
            self.vocabularyList.insert(i, None)
        self.endInsertRows()

        self._buildVocabularyHeadwordIndex()
        return True

    def removeRows(self, row, count, parent=QModelIndex()):
        self.beginRemoveRows(parent, row, row+count-1)
        for i in range(row, row + count):
            del self.vocabularyList[row]
        self.endRemoveRows()

        self._buildVocabularyHeadwordIndex()
        return True



# Path: eclectusqt/forms/VocabularyPageUI.py
# class MyQListView(QtGui.QListView):
# class Ui_Form(object):
#     def keyPressEvent(self, event):
#     def setupUi(self, Form):
#     def retranslateUi(self, Form):
# 
# Path: eclectusqt/util.py
# def getIcon(fileName):
# def getData(fileName):
# def getLocalData(fileName):
# def getDataPaths():
# def readConfigString(config, option, default=None):
# def _readConfig(config, option, default, conversionFunc):
# def readConfigInt(config, option, default=None):
#     def __init__(self, parent):
#     def javaScriptConsoleMessage(self, message, lineNumber, sourceID):
#     def javaScriptAlert(self, frame, msg):
# class HandyWebpage(QWebPage):


# Path: eclectusqt/vocabularypage.py
import re
import locale
import codecs
import os
import sys
import functools
from datetime import date
from PyQt4.QtCore import Qt, SIGNAL, QVariant, QModelIndex, QAbstractListModel
from PyQt4.QtGui import QWidget, QAction, QAbstractItemView, QShortcut, QMenu
from PyKDE4.kdeui import KIcon, KMenu, KStandardAction, KMessageBox
from PyKDE4.kdecore import i18n, KUrl
from PyKDE4.kio import KFileDialog
from eclectusqt.forms import VocabularyPageUI
from eclectusqt import util

        return self.createIndex(row, column, self.vocabularyList[row])

    def find(self, entry):
        # TODO
        for i, e in enumerate(self.vocabularyList):
            for key in entry.keys():
                if key in e and e[key] != entry[key]:
                    break
            else:
                return self.index(i)

    def insertRows(self, row, count, parent=QModelIndex()):
        self.beginInsertRows(parent, row, row+count-1)
        for i in range(row, row + count):
            self.vocabularyList.insert(i, None)
        self.endInsertRows()

        self._buildVocabularyHeadwordIndex()
        return True

    def removeRows(self, row, count, parent=QModelIndex()):
        self.beginRemoveRows(parent, row, row+count-1)
        for i in range(row, row + count):
            del self.vocabularyList[row]
        self.endRemoveRows()

        self._buildVocabularyHeadwordIndex()
        return True



class VocabularyPage(QWidget, VocabularyPageUI.Ui_Form):