Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardCharactersDialog.py

Mon, 25 Mar 2013 03:11:06 +0100

author
T.Rzepka <Tobias.Rzepka@gmail.com>
date
Mon, 25 Mar 2013 03:11:06 +0100
branch
Py2 comp.
changeset 2525
8b507a9a2d40
parent 2302
f29e9405c851
child 2791
a9577f248f04
permissions
-rw-r--r--

Script changes: Future import added, super calls modified and unicode behavior for str.

0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
2302
f29e9405c851 Updated copyright for 2013.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1965
diff changeset
3 # Copyright (c) 2004 - 2013 Detlev Offenbach <detlev@die-offenbachs.de>
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing a dialog for entering character classes.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
10 from __future__ import unicode_literals # __IGNORE_WARNING__
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
11
1112
8a7d1b9d18db Improved code quality by getting rid of star imports. That way pyflakes can do its job. A few bugs fixed found by flakes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
12 from PyQt4.QtCore import QRegExp
8a7d1b9d18db Improved code quality by getting rid of star imports. That way pyflakes can do its job. A few bugs fixed found by flakes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
13 from PyQt4.QtGui import QSizePolicy, QSpacerItem, QWidget, QHBoxLayout, QLineEdit, \
8a7d1b9d18db Improved code quality by getting rid of star imports. That way pyflakes can do its job. A few bugs fixed found by flakes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
14 QPushButton, QDialog, QScrollArea, QComboBox, QVBoxLayout, QRegExpValidator, QLabel
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
16 from .Ui_QRegExpWizardCharactersDialog import Ui_QRegExpWizardCharactersDialog
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 class QRegExpWizardCharactersDialog(QDialog, Ui_QRegExpWizardCharactersDialog):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 Class implementing a dialog for entering character classes.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 """
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
23 RegExpMode = 0
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
24 WildcardMode = 1
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
25 W3CMode = 2
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
27 def __init__(self, mode=RegExpMode, parent=None):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
31 @param mode mode of the dialog (one of RegExpMode, WildcardMode, W3CMode)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 @param parent parent widget (QWidget)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 """
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
34 super(QRegExpWizardCharactersDialog, self).__init__(parent)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 self.setupUi(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
37 self.__mode = mode
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
38
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
39 if mode == QRegExpWizardCharactersDialog.WildcardMode:
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
40 self.predefinedBox.setEnabled(False)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
41 self.predefinedBox.hide()
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
42 elif mode == QRegExpWizardCharactersDialog.RegExpMode:
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
43 self.w3cInitialIdentifierCheckBox.hide()
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
44 self.w3cNonInitialIdentifierCheckBox.hide()
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
45 self.w3cNmtokenCheckBox.hide()
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
46 self.w3cNonNmtokenCheckBox.hide()
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
47 elif mode == QRegExpWizardCharactersDialog.W3CMode:
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
48 self.__initCharacterSelectors()
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
49
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 self.comboItems = []
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
51 self.singleComboItems = [] # these are in addition to the above
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
52 self.comboItems.append((self.trUtf8("Normal character"), "-c"))
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
53 if mode == QRegExpWizardCharactersDialog.RegExpMode:
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
54 self.comboItems.append((self.trUtf8(
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
55 "Unicode character in hexadecimal notation"), "-h"))
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
56 self.comboItems.append((self.trUtf8(
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
57 "ASCII/Latin1 character in octal notation"), "-o"))
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
58 self.singleComboItems.append(("---", "-i"))
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
59 self.singleComboItems.append((self.trUtf8("Bell character (\\a)"), "\\a"))
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
60 self.singleComboItems.append((self.trUtf8("Page break (\\f)"), "\\f"))
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
61 self.singleComboItems.append((self.trUtf8("Line feed (\\n)"), "\\n"))
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
62 self.singleComboItems.append((self.trUtf8("Carriage return (\\r)"), "\\r"))
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
63 self.singleComboItems.append(
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
64 (self.trUtf8("Horizontal tabulator (\\t)"), "\\t"))
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
65 self.singleComboItems.append((self.trUtf8("Vertical tabulator (\\v)"), "\\v"))
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
66 elif mode == QRegExpWizardCharactersDialog.W3CMode:
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
67 self.comboItems.append((self.trUtf8(
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
68 "Unicode character in hexadecimal notation"), "-h"))
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
69 self.comboItems.append((self.trUtf8(
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
70 "ASCII/Latin1 character in octal notation"), "-o"))
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
71 self.singleComboItems.append(("---", "-i"))
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
72 self.singleComboItems.append((self.trUtf8("Line feed (\\n)"), "\\n"))
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
73 self.singleComboItems.append((self.trUtf8("Carriage return (\\r)"), "\\r"))
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
74 self.singleComboItems.append(
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
75 (self.trUtf8("Horizontal tabulator (\\t)"), "\\t"))
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
76 self.singleComboItems.append(("---", "-i"))
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
77 self.singleComboItems.append((self.trUtf8("Character Category"), "-ccp"))
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
78 self.singleComboItems.append((self.trUtf8("Character Block"), "-cbp"))
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
79 self.singleComboItems.append((self.trUtf8("Not Character Category"), "-ccn"))
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
80 self.singleComboItems.append((self.trUtf8("Not Character Block"), "-cbn"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
81
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
82 self.charValidator = QRegExpValidator(QRegExp(".{0,1}"), self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
83 self.hexValidator = QRegExpValidator(QRegExp("[0-9a-fA-F]{0,4}"), self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
84 self.octValidator = QRegExpValidator(QRegExp("[0-3]?[0-7]{0,2}"), self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
85
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
86 # generate dialog part for single characters
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
87 self.singlesBoxLayout = QVBoxLayout(self.singlesBox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
88 self.singlesBoxLayout.setObjectName("singlesBoxLayout")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89 self.singlesBoxLayout.setSpacing(6)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
90 self.singlesBoxLayout.setMargin(6)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
91 self.singlesBox.setLayout(self.singlesBoxLayout)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
92 self.singlesView = QScrollArea(self.singlesBox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
93 self.singlesView.setObjectName("singlesView")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
94 self.singlesBoxLayout.addWidget(self.singlesView)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
95
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
96 self.singlesItemsBox = QWidget(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
97 self.singlesView.setWidget(self.singlesItemsBox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
98 self.singlesItemsBox.setObjectName("singlesItemsBox")
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
99 self.singlesItemsBox.setMinimumWidth(1000)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
100 self.singlesItemsBoxLayout = QVBoxLayout(self.singlesItemsBox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
101 self.singlesItemsBoxLayout.setMargin(6)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
102 self.singlesItemsBoxLayout.setSpacing(6)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
103 self.singlesItemsBox.setLayout(self.singlesItemsBoxLayout)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
104 self.singlesEntries = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
105 self.__addSinglesLine()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
106
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107 hlayout0 = QHBoxLayout()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
108 hlayout0.setMargin(0)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
109 hlayout0.setSpacing(6)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
110 hlayout0.setObjectName("hlayout0")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
111 self.moreSinglesButton = QPushButton(self.trUtf8("Additional Entries"),
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
112 self.singlesBox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
113 self.moreSinglesButton.setObjectName("moreSinglesButton")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
114 hlayout0.addWidget(self.moreSinglesButton)
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
115 hspacer0 = QSpacerItem(30, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
116 hlayout0.addItem(hspacer0)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
117 self.singlesBoxLayout.addLayout(hlayout0)
464
a2b1d1770ef0 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 425
diff changeset
118 self.moreSinglesButton.clicked[()].connect(self.__addSinglesLine)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
119
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
120 # generate dialog part for character ranges
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
121 self.rangesBoxLayout = QVBoxLayout(self.rangesBox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
122 self.rangesBoxLayout.setObjectName("rangesBoxLayout")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
123 self.rangesBoxLayout.setSpacing(6)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
124 self.rangesBoxLayout.setMargin(6)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
125 self.rangesBox.setLayout(self.rangesBoxLayout)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
126 self.rangesView = QScrollArea(self.rangesBox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
127 self.rangesView.setObjectName("rangesView")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
128 self.rangesBoxLayout.addWidget(self.rangesView)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
129
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
130 self.rangesItemsBox = QWidget(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
131 self.rangesView.setWidget(self.rangesItemsBox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
132 self.rangesItemsBox.setObjectName("rangesItemsBox")
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
133 self.rangesItemsBox.setMinimumWidth(1000)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
134 self.rangesItemsBoxLayout = QVBoxLayout(self.rangesItemsBox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
135 self.rangesItemsBoxLayout.setMargin(6)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
136 self.rangesItemsBoxLayout.setSpacing(6)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
137 self.rangesItemsBox.setLayout(self.rangesItemsBoxLayout)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
138 self.rangesEntries = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
139 self.__addRangesLine()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
140
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
141 hlayout1 = QHBoxLayout()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
142 hlayout1.setMargin(0)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
143 hlayout1.setSpacing(6)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
144 hlayout1.setObjectName("hlayout1")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
145 self.moreRangesButton = QPushButton(self.trUtf8("Additional Entries"),
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
146 self.rangesBox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
147 self.moreSinglesButton.setObjectName("moreRangesButton")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
148 hlayout1.addWidget(self.moreRangesButton)
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
149 hspacer1 = QSpacerItem(30, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
150 hlayout1.addItem(hspacer1)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
151 self.rangesBoxLayout.addLayout(hlayout1)
464
a2b1d1770ef0 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 425
diff changeset
152 self.moreRangesButton.clicked[()].connect(self.__addRangesLine)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
153
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
154 def __initCharacterSelectors(self):
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
155 """
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
156 Private method to initialize the W3C character selector entries.
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
157 """
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
158 self.__characterCategories = (
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
159 # display name code
1965
96f5a76e1845 Fixed some PEP-8 related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1818
diff changeset
160 (self.trUtf8("Letter, Any"), "L"),
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
161 (self.trUtf8("Letter, Uppercase"), "Lu"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
162 (self.trUtf8("Letter, Lowercase"), "Ll"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
163 (self.trUtf8("Letter, Titlecase"), "Lt"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
164 (self.trUtf8("Letter, Modifier"), "Lm"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
165 (self.trUtf8("Letter, Other"), "Lo"),
1965
96f5a76e1845 Fixed some PEP-8 related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1818
diff changeset
166 (self.trUtf8("Mark, Any"), "M"),
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
167 (self.trUtf8("Mark, Nonspacing"), "Mn"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
168 (self.trUtf8("Mark, Spacing Combining"), "Mc"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
169 (self.trUtf8("Mark, Enclosing"), "Me"),
1965
96f5a76e1845 Fixed some PEP-8 related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1818
diff changeset
170 (self.trUtf8("Number, Any"), "N"),
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
171 (self.trUtf8("Number, Decimal Digit"), "Nd"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
172 (self.trUtf8("Number, Letter"), "Nl"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
173 (self.trUtf8("Number, Other"), "No"),
1965
96f5a76e1845 Fixed some PEP-8 related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1818
diff changeset
174 (self.trUtf8("Punctuation, Any"), "P"),
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
175 (self.trUtf8("Punctuation, Connector"), "Pc"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
176 (self.trUtf8("Punctuation, Dash"), "Pd"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
177 (self.trUtf8("Punctuation, Open"), "Ps"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
178 (self.trUtf8("Punctuation, Close"), "Pe"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
179 (self.trUtf8("Punctuation, Initial Quote"), "Pi"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
180 (self.trUtf8("Punctuation, Final Quote"), "Pf"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
181 (self.trUtf8("Punctuation, Other"), "Po"),
1965
96f5a76e1845 Fixed some PEP-8 related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1818
diff changeset
182 (self.trUtf8("Symbol, Any"), "S"),
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
183 (self.trUtf8("Symbol, Math"), "Sm"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
184 (self.trUtf8("Symbol, Currency"), "Sc"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
185 (self.trUtf8("Symbol, Modifier"), "Sk"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
186 (self.trUtf8("Symbol, Other"), "So"),
1965
96f5a76e1845 Fixed some PEP-8 related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1818
diff changeset
187 (self.trUtf8("Separator, Any"), "Z"),
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
188 (self.trUtf8("Separator, Space"), "Zs"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
189 (self.trUtf8("Separator, Line"), "Zl"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
190 (self.trUtf8("Separator, Paragraph"), "Zp"),
1965
96f5a76e1845 Fixed some PEP-8 related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1818
diff changeset
191 (self.trUtf8("Other, Any"), "C"),
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
192 (self.trUtf8("Other, Control"), "Cc"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
193 (self.trUtf8("Other, Format"), "Cf"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
194 (self.trUtf8("Other, Private Use"), "Co"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
195 (self.trUtf8("Other, Not Assigned"), "Cn"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
196 )
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
197
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
198 self.__characterBlocks = (
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
199 (self.trUtf8("Basic Latin"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
200 "IsBasicLatin"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
201 (self.trUtf8("Latin-1 Supplement"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
202 "IsLatin-1Supplement"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
203 (self.trUtf8("Latin Extended-A"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
204 "IsLatinExtended-A"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
205 (self.trUtf8("Latin Extended-B"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
206 "IsLatinExtended-B"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
207 (self.trUtf8("IPA Extensions"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
208 "IsIPAExtensions"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
209 (self.trUtf8("Spacing Modifier Letters"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
210 "IsSpacingModifierLetters"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
211 (self.trUtf8("Combining Diacritical Marks"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
212 "IsCombiningDiacriticalMarks"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
213 (self.trUtf8("Greek"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
214 "IsGreek"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
215 (self.trUtf8("Cyrillic"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
216 "IsCyrillic"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
217 (self.trUtf8("Armenian"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
218 "IsArmenian"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
219 (self.trUtf8("Hebrew"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
220 "IsHebrew"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
221 (self.trUtf8("Arabic"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
222 "IsArabic"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
223 (self.trUtf8("Syriac"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
224 "IsSyriac"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
225 (self.trUtf8("Thaana"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
226 "IsThaana"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
227 (self.trUtf8("Devanagari"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
228 "IsDevanagari"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
229 (self.trUtf8("Bengali"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
230 "IsBengali"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
231 (self.trUtf8("Gurmukhi"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
232 "IsBengali"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
233 (self.trUtf8("Gujarati"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
234 "IsGujarati"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
235 (self.trUtf8("Oriya"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
236 "IsOriya"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
237 (self.trUtf8("Tamil"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
238 "IsTamil"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
239 (self.trUtf8("Telugu"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
240 "IsTelugu"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
241 (self.trUtf8("Kannada"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
242 "IsKannada"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
243 (self.trUtf8("Malayalam"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
244 "IsMalayalam"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
245 (self.trUtf8("Sinhala"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
246 "IsSinhala"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
247 (self.trUtf8("Thai"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
248 "IsThai"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
249 (self.trUtf8("Lao"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
250 "IsLao"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
251 (self.trUtf8("Tibetan"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
252 "IsTibetan"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
253 (self.trUtf8("Myanmar"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
254 "IsMyanmar"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
255 (self.trUtf8("Georgian"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
256 "IsGeorgian"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
257 (self.trUtf8("Hangul Jamo"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
258 "IsHangulJamo"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
259 (self.trUtf8("Ethiopic"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
260 "IsEthiopic"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
261 (self.trUtf8("Cherokee"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
262 "IsCherokee"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
263 (self.trUtf8("Unified Canadian Aboriginal Syllabics"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
264 "IsUnifiedCanadianAboriginalSyllabics"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
265 (self.trUtf8("Ogham"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
266 "IsOgham"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
267 (self.trUtf8("Runic"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
268 "IsRunic"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
269 (self.trUtf8("Khmer"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
270 "IsKhmer"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
271 (self.trUtf8("Mongolian"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
272 "IsMongolian"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
273 (self.trUtf8("Latin Extended Additional"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
274 "IsLatinExtendedAdditional"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
275 (self.trUtf8("Greek Extended"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
276 "IsGreekExtended"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
277 (self.trUtf8("General Punctuation"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
278 "IsGeneralPunctuation"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
279 (self.trUtf8("Superscripts and Subscripts"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
280 "IsSuperscriptsandSubscripts"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
281 (self.trUtf8("Currency Symbols"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
282 "IsCurrencySymbols"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
283 (self.trUtf8("Combining Marks for Symbols"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
284 "IsCombiningMarksforSymbols"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
285 (self.trUtf8("Letterlike Symbols"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
286 "IsLetterlikeSymbols"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
287 (self.trUtf8("Number Forms"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
288 "IsNumberForms"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
289 (self.trUtf8("Arrows"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
290 "IsArrows"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
291 (self.trUtf8("Mathematical Operators"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
292 "IsMathematicalOperators"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
293 (self.trUtf8("Miscellaneous Technical"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
294 "IsMiscellaneousTechnical"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
295 (self.trUtf8("Control Pictures"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
296 "IsControlPictures"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
297 (self.trUtf8("Optical Character Recognition"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
298 "IsOpticalCharacterRecognition"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
299 (self.trUtf8("Enclosed Alphanumerics"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
300 "IsEnclosedAlphanumerics"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
301 (self.trUtf8("Box Drawing"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
302 "IsBoxDrawing"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
303 (self.trUtf8("Block Elements"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
304 "IsBlockElements"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
305 (self.trUtf8("Geometric Shapes"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
306 "IsGeometricShapes"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
307 (self.trUtf8("Miscellaneous Symbols"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
308 "IsMiscellaneousSymbols"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
309 (self.trUtf8("Dingbats"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
310 "IsDingbats"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
311 (self.trUtf8("Braille Patterns"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
312 "IsBraillePatterns"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
313 (self.trUtf8("CJK Radicals Supplement"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
314 "IsCJKRadicalsSupplement"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
315 (self.trUtf8("KangXi Radicals"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
316 "IsKangXiRadicals"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
317 (self.trUtf8("Ideographic Description Chars"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
318 "IsIdeographicDescriptionChars"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
319 (self.trUtf8("CJK Symbols and Punctuation"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
320 "IsCJKSymbolsandPunctuation"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
321 (self.trUtf8("Hiragana"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
322 "IsHiragana"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
323 (self.trUtf8("Katakana"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
324 "IsKatakana"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
325 (self.trUtf8("Bopomofo"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
326 "IsBopomofo"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
327 (self.trUtf8("Hangul Compatibility Jamo"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
328 "IsHangulCompatibilityJamo"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
329 (self.trUtf8("Kanbun"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
330 "IsKanbun"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
331 (self.trUtf8("Bopomofo Extended"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
332 "IsBopomofoExtended"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
333 (self.trUtf8("Enclosed CJK Letters and Months"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
334 "IsEnclosedCJKLettersandMonths"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
335 (self.trUtf8("CJK Compatibility"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
336 "IsCJKCompatibility"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
337 (self.trUtf8("CJK Unified Ideographs Extension A"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
338 "IsCJKUnifiedIdeographsExtensionA"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
339 (self.trUtf8("CJK Unified Ideographs"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
340 "IsCJKUnifiedIdeographs"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
341 (self.trUtf8("Yi Syllables"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
342 "IsYiSyllables"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
343 (self.trUtf8("Yi Radicals"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
344 "IsYiRadicals"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
345 (self.trUtf8("Hangul Syllables"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
346 "IsHangulSyllables"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
347 (self.trUtf8("Private Use"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
348 "IsPrivateUse"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
349 (self.trUtf8("CJK Compatibility Ideographs"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
350 "IsCJKCompatibilityIdeographs"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
351 (self.trUtf8("Alphabetic Presentation Forms"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
352 "IsAlphabeticPresentationForms"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
353 (self.trUtf8("Arabic Presentation Forms-A"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
354 "IsArabicPresentationForms-A"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
355 (self.trUtf8("Combining Half Marks"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
356 "IsCombiningHalfMarks"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
357 (self.trUtf8("CJK Compatibility Forms"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
358 "IsCJKCompatibilityForms"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
359 (self.trUtf8("Small Form Variants"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
360 "IsSmallFormVariants"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
361 (self.trUtf8("Arabic Presentation Forms-B"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
362 "IsArabicPresentationForms-B"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
363 (self.trUtf8("Halfwidth and Fullwidth Forms"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
364 "IsHalfwidthandFullwidthForms"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
365 (self.trUtf8("Specials"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
366 "IsSpecials"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
367 (self.trUtf8("Old Italic"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
368 "IsOldItalic"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
369 (self.trUtf8("Gothic"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
370 "IsGothic"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
371 (self.trUtf8("Deseret"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
372 "IsDeseret"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
373 (self.trUtf8("Byzantine Musical Symbols"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
374 "IsByzantineMusicalSymbols"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
375 (self.trUtf8("Musical Symbols"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
376 "IsMusicalSymbols"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
377 (self.trUtf8("Mathematical Alphanumeric Symbols"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
378 "IsMathematicalAlphanumericSymbols"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
379 (self.trUtf8("CJK Unified Ideographic Extension B"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
380 "IsCJKUnifiedIdeographicExtensionB"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
381 (self.trUtf8("CJK Compatapility Ideographic Supplement"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
382 "IsCJKCompatapilityIdeographicSupplement"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
383 (self.trUtf8("Tags"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
384 "IsTags"),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
385 )
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
386
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
387 def __populateCharTypeCombo(self, combo, isSingle):
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
388 """
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
389 Private method to populate a given character type selection combo box.
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
390
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
391 @param combo reference to the combo box to be populated (QComboBox)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
392 @param isSingle flag indicating a singles combo (boolean)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
393 """
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
394 for txt, value in self.comboItems:
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
395 combo.addItem(txt, value)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
396 if isSingle:
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
397 for txt, value in self.singleComboItems:
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
398 combo.addItem(txt, value)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
399
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
400 def __addSinglesLine(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
401 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
402 Private slot to add a line of entry widgets for single characters.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
403 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
404 hbox = QWidget(self.singlesItemsBox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
405 hboxLayout = QHBoxLayout(hbox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
406 hboxLayout.setMargin(0)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
407 hboxLayout.setSpacing(6)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
408 hbox.setLayout(hboxLayout)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
409 cb1 = QComboBox(hbox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
410 cb1.setEditable(False)
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
411 self.__populateCharTypeCombo(cb1, True)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
412 hboxLayout.addWidget(cb1)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
413 le1 = QLineEdit(hbox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
414 le1.setValidator(self.charValidator)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
415 hboxLayout.addWidget(le1)
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
416 cb1a = QComboBox(hbox)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
417 cb1a.setEditable(False)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
418 cb1a.setSizeAdjustPolicy(QComboBox.AdjustToContents)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
419 hboxLayout.addWidget(cb1a)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
420 cb1a.hide()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
421 cb2 = QComboBox(hbox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
422 cb2.setEditable(False)
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
423 self.__populateCharTypeCombo(cb2, True)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
424 hboxLayout.addWidget(cb2)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
425 le2 = QLineEdit(hbox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
426 le2.setValidator(self.charValidator)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
427 hboxLayout.addWidget(le2)
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
428 cb2a = QComboBox(hbox)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
429 cb2a.setEditable(False)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
430 cb2a.setSizeAdjustPolicy(QComboBox.AdjustToContents)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
431 hboxLayout.addWidget(cb2a)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
432 cb2a.hide()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
433 self.singlesItemsBoxLayout.addWidget(hbox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
434
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 464
diff changeset
435 cb1.activated[int].connect(self.__singlesCharTypeSelected)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 464
diff changeset
436 cb2.activated[int].connect(self.__singlesCharTypeSelected)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
437 hbox.show()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
438
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
439 self.singlesItemsBox.adjustSize()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
440
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
441 self.singlesEntries.append([cb1, le1, cb1a])
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
442 self.singlesEntries.append([cb2, le2, cb2a])
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
443
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
444 def __addRangesLine(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
445 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
446 Private slot to add a line of entry widgets for character ranges.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
447 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
448 hbox = QWidget(self.rangesItemsBox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
449 hboxLayout = QHBoxLayout(hbox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
450 hboxLayout.setMargin(0)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
451 hboxLayout.setSpacing(6)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
452 hbox.setLayout(hboxLayout)
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
453 cb1 = QComboBox(hbox)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
454 cb1.setEditable(False)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
455 self.__populateCharTypeCombo(cb1, False)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
456 hboxLayout.addWidget(cb1)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
457 l1 = QLabel(self.trUtf8("Between:"), hbox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
458 hboxLayout.addWidget(l1)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
459 le1 = QLineEdit(hbox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
460 le1.setValidator(self.charValidator)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
461 hboxLayout.addWidget(le1)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
462 l2 = QLabel(self.trUtf8("And:"), hbox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
463 hboxLayout.addWidget(l2)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
464 le2 = QLineEdit(hbox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
465 le2.setValidator(self.charValidator)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
466 hboxLayout.addWidget(le2)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
467 self.rangesItemsBoxLayout.addWidget(hbox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
468
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 464
diff changeset
469 cb1.activated[int].connect(self.__rangesCharTypeSelected)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
470 hbox.show()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
471
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
472 self.rangesItemsBox.adjustSize()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
473
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
474 self.rangesEntries.append([cb1, le1, le2])
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
475
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
476 def __populateW3cCharacterCombo(self, combo, format):
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
477 """
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
478 Private method to populate a W3C character selection combo.
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
479
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
480 @param combo combo box to be populated (QComboBox)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
481 @param format format identifier (one of "-ccp", "-ccn", "-cbp", "-cbn")
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
482 """
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
483 combo.clear()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
484
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
485 if format in ["-ccp", "-ccn"]:
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
486 comboLen = 0
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
487 for txt, code in self.__characterCategories:
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
488 combo.addItem(txt, code)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
489 comboLen = max(comboLen, len(txt))
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
490 combo.setMinimumContentsLength(comboLen)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
491 elif format in ["-cbp", "-cbn"]:
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
492 comboLen = 0
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
493 for txt, code in self.__characterBlocks:
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
494 combo.addItem(txt, code)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
495 comboLen = max(comboLen, len(txt))
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
496 combo.setMinimumContentsLength(comboLen)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
497
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
498 def __performSelectedAction(self, format, lineedit, combo):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
499 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
500 Private method performing some actions depending on the input.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
501
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
502 @param format format of the selected entry (string)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
503 @param lineedit line edit widget to act on (QLineEdit)
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
504 @param combo combo box widget to act on (QComboBox)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
505 """
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
506 if format == "-i":
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
507 return
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
508
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
509 if format in ["-c", "-h", "-o"]:
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
510 lineedit.show()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
511 lineedit.setEnabled(True)
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
512 if combo is not None:
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
513 combo.hide()
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
514 if format == "-c":
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
515 lineedit.setValidator(self.charValidator)
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
516 elif format == "-h":
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
517 lineedit.setValidator(self.hexValidator)
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
518 elif format == "-o":
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
519 lineedit.setValidator(self.octValidator)
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
520 elif format in ["-ccp", "-ccn", "-cbp", "-cbn"]:
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
521 lineedit.setEnabled(False)
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
522 lineedit.hide()
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
523 if combo is not None:
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
524 combo.show()
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
525 self.__populateW3cCharacterCombo(combo, format)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
526 else:
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
527 lineedit.setEnabled(False)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
528 lineedit.hide()
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
529 if combo is not None:
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
530 combo.hide()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
531 lineedit.clear()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
532
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
533 def __singlesCharTypeSelected(self, index):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
534 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
535 Private slot to handle the activated(int) signal of the single chars combo boxes.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
536
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
537 @param index selected list index (integer)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
538 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
539 combo = self.sender()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
540 for entriesList in self.singlesEntries:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
541 if combo == entriesList[0]:
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
542 format = combo.itemData(index)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
543 self.__performSelectedAction(format, entriesList[1], entriesList[2])
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
544 break
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
545
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
546 def __rangesCharTypeSelected(self, index):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
547 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
548 Private slot to handle the activated(int) signal of the char ranges combo boxes.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
549
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
550 @param index selected list index (integer)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
551 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
552 combo = self.sender()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
553 for entriesList in self.rangesEntries:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
554 if combo == entriesList[0]:
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
555 format = combo.itemData(index)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
556 self.__performSelectedAction(format, entriesList[1], None)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
557 self.__performSelectedAction(format, entriesList[2], None)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
558 break
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
559
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
560 def __formatCharacter(self, char, format):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
561 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
562 Private method to format the characters entered into the dialog.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
563
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
564 @param char character string entered into the dialog (string)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
565 @param format string giving a special format (-c, -h, -i or -o) or
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
566 the already formatted character (string)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
567 @return formatted character string (string)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
568 """
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
569 if format == "-c":
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
570 return char
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
571 elif format == "-i":
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
572 return ""
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
573
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
574 if self.__mode in [QRegExpWizardCharactersDialog.RegExpMode,
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
575 QRegExpWizardCharactersDialog.W3CMode]:
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
576 if format == "-h":
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
577 return "\\x{0}".format(char.lower())
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
578 elif format == "-o":
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
579 return "\\0{0}".format(char)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
580 elif format in ["-ccp", "-cbp"]:
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
581 return "\\p{{{0}}}".format(char)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
582 elif format in ["-ccn", "-cbn"]:
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
583 return "\\P{{{0}}}".format(char)
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
584 else:
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
585 return format
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
586
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
587 def getCharacters(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
588 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
589 Public method to return the character string assembled via the dialog.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
590
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
591 @return formatted string for character classes (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
592 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
593 regexp = ""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
594
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
595 # negative character range
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
596 if self.negativeCheckBox.isChecked():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
597 regexp += "^"
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
598
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
599 # predefined character ranges
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
600 if self.wordCharCheckBox.isChecked():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
601 regexp += "\\w"
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
602 if self.nonWordCharCheckBox.isChecked():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
603 regexp += "\\W"
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
604 if self.digitsCheckBox.isChecked():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
605 regexp += "\\d"
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
606 if self.nonDigitsCheckBox.isChecked():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
607 regexp += "\\D"
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
608 if self.whitespaceCheckBox.isChecked():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
609 regexp += "\\s"
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
610 if self.nonWhitespaceCheckBox.isChecked():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
611 regexp += "\\S"
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
612 if self.w3cInitialIdentifierCheckBox.isChecked():
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
613 regexp += "\\i"
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
614 if self.w3cNonInitialIdentifierCheckBox.isChecked():
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
615 regexp += "\\I"
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
616 if self.w3cNmtokenCheckBox.isChecked():
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
617 regexp += "\\c"
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
618 if self.w3cNonNmtokenCheckBox.isChecked():
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
619 regexp += "\\C"
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
620
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
621 # single characters
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
622 for entrieslist in self.singlesEntries:
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
623 format = entrieslist[0].itemData(entrieslist[0].currentIndex())
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
624 if format in ["-ccp", "-ccn", "-cbp", "-cbn"]:
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
625 char = entrieslist[2].itemData(entrieslist[2].currentIndex())
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
626 else:
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
627 char = entrieslist[1].text()
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
628 regexp += self.__formatCharacter(char, format)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
629
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
630 # character ranges
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
631 for entrieslist in self.rangesEntries:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
632 if not entrieslist[1].text() or \
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
633 not entrieslist[2].text():
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
634 continue
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
635 format = entrieslist[0].itemData(entrieslist[0].currentIndex())
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
636 char1 = entrieslist[1].text()
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
637 char2 = entrieslist[2].text()
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
638 regexp += "{0}-{1}".format(
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
639 self.__formatCharacter(char1, format),
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
640 self.__formatCharacter(char2, format))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
641
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
642 if regexp:
1818
a5e4cb4bed43 Added support for the various pattern syntaxes to the QRegExp wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
643 if regexp.startswith("\\") and regexp.count("\\") == 1 and "-" not in regexp:
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
644 return regexp
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
645 else:
425
ca5e65413fc5 Did some more string format conversions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 13
diff changeset
646 return "[{0}]".format(regexp)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
647 else:
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 464
diff changeset
648 return ""

eric ide

mercurial