eric7.SqlBrowser.SqlConnectionWidget

Module implementing a widget showing the SQL connections.

Global Attributes

None

Classes

SqlConnectionWidget Class implementing a widget showing the SQL connections.

Functions

None


SqlConnectionWidget

Class implementing a widget showing the SQL connections.

Signals

cleared()
emitted after the connection tree has been cleared
schemaRequested(str)
emitted when the schema display is requested
tableActivated(str)
emitted after the entry for a table has been activated

Derived from

QWidget

Class Attributes

None

Class Methods

None

Methods

SqlConnectionWidget Constructor
__currentItemChanged Private slot handling a change of the current item.
__dbCaption Private method to assemble a string for the caption.
__itemActivated Private slot handling the activation of an item.
__setActive Private slot to set an item to active.
__setBold Private slot to set the font to bold.
currentDatabase Public method to get the current database.
refresh Public slot to refresh the connection tree.
showSchema Public slot to show schema data of a database.

Static Methods

None

SqlConnectionWidget (Constructor)

SqlConnectionWidget(parent=None)

Constructor

parent (QWidget)
reference to the parent widget

SqlConnectionWidget.__currentItemChanged

__currentItemChanged(current, _previous)

Private slot handling a change of the current item.

current (QTreeWidgetItem)
reference to the new current item
_previous (QTreeWidgetItem)
reference to the previous current item (unused)

SqlConnectionWidget.__dbCaption

__dbCaption(db)

Private method to assemble a string for the caption.

db (QSqlDatabase)
reference to the database object
Return:
caption string
Return Type:
str

SqlConnectionWidget.__itemActivated

__itemActivated(itm, _column)

Private slot handling the activation of an item.

itm (QTreeWidgetItem)
reference to the item
_column (int)
column that was activated (unused)

SqlConnectionWidget.__setActive

__setActive(itm)

Private slot to set an item to active.

itm (QTreeWidgetItem)
reference to the item to set as the active item

SqlConnectionWidget.__setBold

__setBold(itm, bold)

Private slot to set the font to bold.

itm (QTreeWidgetItem)
reference to the item to be changed
bold (bool)
flag indicating bold

SqlConnectionWidget.currentDatabase

currentDatabase()

Public method to get the current database.

Return:
reference to the current database
Return Type:
QSqlDatabase

SqlConnectionWidget.refresh

refresh()

Public slot to refresh the connection tree.

SqlConnectionWidget.showSchema

showSchema()

Public slot to show schema data of a database.

Up