NeuXtalViz.views package#
Submodules#
- class EmittingStream(emit_func, *args, **kwargs)[source]#
Bases:
StringIO- Attributes:
- closed
encodingEncoding of the text stream.
errorsThe error setting of the decoder or encoder.
- line_buffering
newlinesLine endings translated so far.
Methods
close(/)Close the IO object.
detachSeparate the underlying buffer from the TextIOBase and return it.
fileno(/)Returns underlying file descriptor if one exists.
flush()Flush write buffers, if applicable.
getvalue(/)Retrieve the entire contents of the object.
isatty(/)Return whether this is an 'interactive' stream.
read([size])Read at most size characters, returned as a string.
readable(/)Returns True if the IO object can be read.
readline([size])Read until newline or EOF.
readlines([hint])Return a list of lines from the stream.
seek(pos[, whence])Change stream position.
seekable(/)Returns True if the IO object can be seeked.
tell(/)Tell the current file position.
truncate([pos])Truncate size to pos.
writable(/)Returns True if the IO object can be written.
write(s)Write string to file.
writelines(lines, /)Write a list of lines to stream.
- class SignalLogHandler(emit_func)[source]#
Bases:
Handler- Attributes:
- name
Methods
acquire()Acquire the I/O thread lock.
addFilter(filter)Add the specified filter to this handler.
close()Tidy up any resources used by the handler.
createLock()Acquire a thread lock for serializing access to the underlying I/O.
emit(record)Do whatever it takes to actually log the specified logging record.
filter(record)Determine if a record is loggable by consulting all the filters.
flush()Ensure all logging output has been flushed.
format(record)Format the specified record.
handle(record)Conditionally emit the specified logging record.
handleError(record)Handle errors which occur during an emit() call.
release()Release the I/O thread lock.
removeFilter(filter)Remove the specified filter from this handler.
setFormatter(fmt)Set the formatter for this handler.
setLevel(level)Set the logging level of this handler.
get_name
set_name
- class ThreadPool[source]#
Bases:
QThreadPoolThread pool for managing worker threads.
Tracks active workers and provides functionality to stop all running processes.
Methods
activeThreadCount(self, /)blockSignals(self, b, /)childEvent(self, event, /)children(self, /)clear(self, /)connect(...)connectNotify(self, signal, /)contains(self, thread, /)customEvent(self, event, /)deleteLater(self, /)disconnect(...)disconnectNotify(self, signal, /)dumpObjectInfo(self, /)dumpObjectTree(self, /)dynamicPropertyNames(self, /)emit(self, signal, /, *args)event(self, event, /)eventFilter(self, watched, event, /)expiryTimeout(self, /)findChild(self, type, /[, name, options])findChildren() -> List[~PlaceholderType] ))globalInstance()inherits(self, classname, /)installEventFilter(self, filterObj, /)isQuickItemType(self, /)isSignalConnected(self, signal, /)isWidgetType(self, /)isWindowType(self, /)killTimer(-> None)maxThreadCount(self, /)metaObject(self, /)moveToThread(self, thread, /)objectName(self, /)parent(self, /)property(self, name, /)receivers(self, signal, /)releaseThread(self, /)removeEventFilter(self, obj, /)remove_worker(worker)Remove worker from active list when finished.
reserveThread(self, /)sender(self, /)senderSignalIndex(self, /)serviceLevel(self, /)setExpiryTimeout(self, expiryTimeout, /)setMaxThreadCount(self, maxThreadCount, /)setObjectName(self, name, /)setParent(self, parent, /)setProperty(self, name, value, /)setServiceLevel(self, serviceLevel, /)setStackSize(self, stackSize, /)setThreadPriority(self, priority, /)signalsBlocked(self, /)stackSize(self, /)start(-> None)startOnReservedThread(self, runnable, /)startTimer(self, interval, /[, timerType])start_worker_pool(worker)Start a worker and track it in the active workers list.
Stop all active workers by setting their stop events.
thread(self, /)threadPriority(self, /)timerEvent(self, event, /)tr(self, sourceText, /[, disambiguation, n])tryStart(-> bool)tryTake(self, runnable, /)waitForDone(-> bool)destroyed
objectNameChanged
- class Worker(task, *args, **kwargs)[source]#
Bases:
QRunnableWorker thread for running tasks in the background.
The worker automatically passes ‘progress’ and ‘stop_event’ to the task function.
Example task function that can be stopped:
- def my_task(progress=None, stop_event=None, **kwargs):
- for i in range(100):
# Check if stop was requested if stop_event and stop_event.is_set():
print(“Task stopped by user”) return None
# Do work… time.sleep(0.1)
# Report progress if progress:
progress(f”Processing step {i+1}”, (i+1))
return result
Methods
autoDelete(self, /)create(functionToRun, /)Check if stop has been requested.
run(self, /)setAutoDelete(self, autoDelete, /)stop()Request the worker to stop by setting the stop event.
connect_finished
connect_progress
connect_result
emit_progress
- class WorkerSignals[source]#
Bases:
QObjectMethods
blockSignals(self, b, /)childEvent(self, event, /)children(self, /)connect(...)connectNotify(self, signal, /)customEvent(self, event, /)deleteLater(self, /)disconnect(...)disconnectNotify(self, signal, /)dumpObjectInfo(self, /)dumpObjectTree(self, /)dynamicPropertyNames(self, /)emit(self, signal, /, *args)event(self, event, /)eventFilter(self, watched, event, /)findChild(self, type, /[, name, options])findChildren() -> List[~PlaceholderType] ))inherits(self, classname, /)installEventFilter(self, filterObj, /)isQuickItemType(self, /)isSignalConnected(self, signal, /)isWidgetType(self, /)isWindowType(self, /)killTimer(-> None)metaObject(self, /)moveToThread(self, thread, /)objectName(self, /)parent(self, /)property(self, name, /)receivers(self, signal, /)removeEventFilter(self, obj, /)sender(self, /)senderSignalIndex(self, /)setObjectName(self, name, /)setParent(self, parent, /)setProperty(self, name, value, /)signalsBlocked(self, /)startTimer(self, interval, /[, timerType])thread(self, /)timerEvent(self, event, /)tr(self, sourceText, /[, disambiguation, n])destroyed
error
finished
objectNameChanged
output
progress
result