eric7.UI.SymbolsWidget

Module implementing a widget to select a symbol in various formats.

Global Attributes

None

Classes

SymbolsModel Class implementing the model for the symbols widget.
SymbolsWidget Class implementing a widget to select a symbol in various formats.

Functions

None


SymbolsModel

Class implementing the model for the symbols widget.

Derived from

QAbstractTableModel

Class Attributes

None

Class Methods

None

Methods

SymbolsModel Constructor
__isDigit Private method to check, if a character is a digit.
__isLetter Private method to check, if a character is a letter.
__isMark Private method to check, if a character is a mark character.
__isPunct Private method to check, if a character is a punctuation character.
__isSymbol Private method to check, if a character is a symbol.
columnCount Public method to get the number of columns of the model.
data Public method to get data from the model.
getLocale Public method to get the used locale.
getTableBoundaries Public method to get the first and last character position of the given table.
getTableIndex Public method to get the current table index.
getTableNames Public method to get a list of table names.
headerData Public method to get header data from the model.
rowCount Public method to get the number of rows of the model.
selectTable Public method to select the shown character table.

Static Methods

None

SymbolsModel (Constructor)

SymbolsModel(parent=None)

Constructor

parent (QObject)
reference to the parent object

SymbolsModel.__isDigit

__isDigit(char)

Private method to check, if a character is a digit.

char (str)
character to test
Return:
flag indicating a digit
Return Type:
bool

SymbolsModel.__isLetter

__isLetter(char)

Private method to check, if a character is a letter.

char (str)
character to test
Return:
flag indicating a letter
Return Type:
bool

SymbolsModel.__isMark

__isMark(char)

Private method to check, if a character is a mark character.

char (str)
character to test
Return:
flag indicating a mark character
Return Type:
bool

SymbolsModel.__isPunct

__isPunct(char)

Private method to check, if a character is a punctuation character.

char (str)
character to test
Return:
flag indicating a punctuation character
Return Type:
boolean)

SymbolsModel.__isSymbol

__isSymbol(char)

Private method to check, if a character is a symbol.

char (str)
character to test
Return:
flag indicating a symbol
Return Type:
bool

SymbolsModel.columnCount

columnCount(parent)

Public method to get the number of columns of the model.

parent (QModelIndex)
parent index
Return:
number of columns
Return Type:
int

SymbolsModel.data

data(index, role=Qt.ItemDataRole.DisplayRole)

Public method to get data from the model.

index (QModelIndex)
index to get data for
role (int)
role of the data to retrieve
Return:
requested data
Return Type:
Any

SymbolsModel.getLocale

getLocale()

Public method to get the used locale.

Return:
used locale
Return Type:
QLocale

SymbolsModel.getTableBoundaries

getTableBoundaries(index)

Public method to get the first and last character position of the given table.

index (int)
index of the character table
Return:
first and last character position
Return Type:
tuple of (int, int)

SymbolsModel.getTableIndex

getTableIndex()

Public method to get the current table index.

Return:
current table index
Return Type:
int

SymbolsModel.getTableNames

getTableNames()

Public method to get a list of table names.

Return:
list of table names
Return Type:
list of str

SymbolsModel.headerData

headerData(section, orientation, role=Qt.ItemDataRole.DisplayRole)

Public method to get header data from the model.

section (int)
section number
orientation (Qt.Orientation)
orientation
role (Qt.ItemDataRole)
role of the data to retrieve
Return:
requested data
Return Type:
Any

SymbolsModel.rowCount

rowCount(parent)

Public method to get the number of rows of the model.

parent (QModelIndex)
parent index
Return:
number of columns
Return Type:
int

SymbolsModel.selectTable

selectTable(index)

Public method to select the shown character table.

index (int)
index of the character table
Up


SymbolsWidget

Class implementing a widget to select a symbol in various formats.

Signals

insertSymbol(str)
emitted after the user has selected a symbol

Derived from

QWidget, Ui_SymbolsWidget

Class Attributes

None

Class Methods

None

Methods

SymbolsWidget Constructor
__currentRowChanged Private slot recording the currently selected row.
on_symbolSpinBox_editingFinished Private slot to move the table to the entered symbol id.
on_symbolsTable_activated Private slot to signal the selection of a symbol.
on_tableCombo_currentIndexChanged Private slot to select the current character table.

Static Methods

None

SymbolsWidget (Constructor)

SymbolsWidget(parent=None)

Constructor

parent (QWidget)
reference to the parent widget

SymbolsWidget.__currentRowChanged

__currentRowChanged(current, _previous)

Private slot recording the currently selected row.

current (QModelIndex)
current index
_previous (QModelIndex)
previous current index (unused)

SymbolsWidget.on_symbolSpinBox_editingFinished

on_symbolSpinBox_editingFinished()

Private slot to move the table to the entered symbol id.

SymbolsWidget.on_symbolsTable_activated

on_symbolsTable_activated(index)

Private slot to signal the selection of a symbol.

index (QModelIndex)
index of the selected symbol

SymbolsWidget.on_tableCombo_currentIndexChanged

on_tableCombo_currentIndexChanged(index)

Private slot to select the current character table.

index (int)
index of the character table
Up