annoying doc strings
parent
54712827ee
commit
50713030f8
|
@ -592,7 +592,8 @@ async def maybe_open_feed(
|
||||||
**kwargs,
|
**kwargs,
|
||||||
|
|
||||||
) -> (Feed, ReceiveChannel[dict[str, Any]]):
|
) -> (Feed, ReceiveChannel[dict[str, Any]]):
|
||||||
'''Maybe open a data to a ``brokerd`` daemon only if there is no
|
'''
|
||||||
|
Maybe open a data to a ``brokerd`` daemon only if there is no
|
||||||
local one for the broker-symbol pair, if one is cached use it wrapped
|
local one for the broker-symbol pair, if one is cached use it wrapped
|
||||||
in a tractor broadcast receiver.
|
in a tractor broadcast receiver.
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,9 @@ import trio
|
||||||
from PyQt5 import QtCore
|
from PyQt5 import QtCore
|
||||||
from PyQt5.QtCore import QEvent, pyqtBoundSignal
|
from PyQt5.QtCore import QEvent, pyqtBoundSignal
|
||||||
from PyQt5.QtWidgets import QWidget
|
from PyQt5.QtWidgets import QWidget
|
||||||
from PyQt5.QtWidgets import QGraphicsSceneMouseEvent as gs_mouse
|
from PyQt5.QtWidgets import (
|
||||||
|
QGraphicsSceneMouseEvent as gs_mouse,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
MOUSE_EVENTS = {
|
MOUSE_EVENTS = {
|
||||||
|
@ -129,6 +131,8 @@ class EventRelay(QtCore.QObject):
|
||||||
# TODO: is there a global setting for this?
|
# TODO: is there a global setting for this?
|
||||||
if ev.isAutoRepeat() and self._filter_auto_repeats:
|
if ev.isAutoRepeat() and self._filter_auto_repeats:
|
||||||
ev.ignore()
|
ev.ignore()
|
||||||
|
# filter out this event and stop it's processing
|
||||||
|
# https://doc.qt.io/qt-5/qobject.html#installEventFilter
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# NOTE: the event object instance coming out
|
# NOTE: the event object instance coming out
|
||||||
|
@ -152,9 +156,6 @@ class EventRelay(QtCore.QObject):
|
||||||
|
|
||||||
# **do not** filter out this event
|
# **do not** filter out this event
|
||||||
# and instead forward to the source widget
|
# and instead forward to the source widget
|
||||||
return False
|
|
||||||
|
|
||||||
# filter out this event
|
|
||||||
# https://doc.qt.io/qt-5/qobject.html#installEventFilter
|
# https://doc.qt.io/qt-5/qobject.html#installEventFilter
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
|
@ -174,7 +174,6 @@ class Selection(QComboBox):
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
parent=None,
|
parent=None,
|
||||||
|
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
||||||
self._items: dict[str, int] = {}
|
self._items: dict[str, int] = {}
|
||||||
|
@ -200,7 +199,6 @@ class Selection(QComboBox):
|
||||||
|
|
||||||
def set_style(
|
def set_style(
|
||||||
self,
|
self,
|
||||||
|
|
||||||
color: str,
|
color: str,
|
||||||
font_size: int,
|
font_size: int,
|
||||||
|
|
||||||
|
@ -217,6 +215,7 @@ class Selection(QComboBox):
|
||||||
def resize(
|
def resize(
|
||||||
self,
|
self,
|
||||||
char: str = 'W',
|
char: str = 'W',
|
||||||
|
|
||||||
) -> None:
|
) -> None:
|
||||||
br = _font.boundingRect(str(char))
|
br = _font.boundingRect(str(char))
|
||||||
_, h = br.width(), br.height()
|
_, h = br.width(), br.height()
|
||||||
|
@ -238,9 +237,11 @@ class Selection(QComboBox):
|
||||||
keys: list[str],
|
keys: list[str],
|
||||||
|
|
||||||
) -> None:
|
) -> None:
|
||||||
'''Write keys to the selection verbatim.
|
'''
|
||||||
|
Write keys to the selection verbatim.
|
||||||
|
|
||||||
All other items are cleared beforehand.
|
All other items are cleared beforehand.
|
||||||
|
|
||||||
'''
|
'''
|
||||||
self.clear()
|
self.clear()
|
||||||
self._items.clear()
|
self._items.clear()
|
||||||
|
@ -536,7 +537,8 @@ async def open_form_input_handling(
|
||||||
|
|
||||||
|
|
||||||
class FillStatusBar(QProgressBar):
|
class FillStatusBar(QProgressBar):
|
||||||
'''A status bar for fills up to a position limit.
|
'''
|
||||||
|
A status bar for fills up to a position limit.
|
||||||
|
|
||||||
'''
|
'''
|
||||||
border_px: int = 2
|
border_px: int = 2
|
||||||
|
@ -663,6 +665,7 @@ def mk_fill_status_bar(
|
||||||
)
|
)
|
||||||
|
|
||||||
bar_labels_lhs.addSpacing(5/8 * bar_h)
|
bar_labels_lhs.addSpacing(5/8 * bar_h)
|
||||||
|
|
||||||
bar_labels_lhs.addWidget(
|
bar_labels_lhs.addWidget(
|
||||||
left_label,
|
left_label,
|
||||||
# XXX: doesn't seem to actually push up against
|
# XXX: doesn't seem to actually push up against
|
||||||
|
|
|
@ -347,7 +347,8 @@ class CompleterView(QTreeView):
|
||||||
clear_all: bool = False,
|
clear_all: bool = False,
|
||||||
|
|
||||||
) -> None:
|
) -> None:
|
||||||
'''Set result-rows for depth = 1 tree section ``section``.
|
'''
|
||||||
|
Set result-rows for depth = 1 tree section ``section``.
|
||||||
|
|
||||||
'''
|
'''
|
||||||
model = self.model()
|
model = self.model()
|
||||||
|
@ -438,7 +439,8 @@ class SearchBar(Edit):
|
||||||
|
|
||||||
|
|
||||||
class SearchWidget(QtWidgets.QWidget):
|
class SearchWidget(QtWidgets.QWidget):
|
||||||
'''Composed widget of ``SearchBar`` + ``CompleterView``.
|
'''
|
||||||
|
Composed widget of ``SearchBar`` + ``CompleterView``.
|
||||||
|
|
||||||
Includes helper methods for item management in the sub-widgets.
|
Includes helper methods for item management in the sub-widgets.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue