-
Notifications
You must be signed in to change notification settings - Fork 2
0. What is swift?
SNU widget integration framework for PyQt
A framework for integration of PyQt widgets where they can communicate with each other.
This project is mainly developed for trapped ion experiment controller GUI in SNU QuIQCL.
swift
provides a dashboard-like main window, in which variety of Frame
s reside.
A Frame
is in fact a special QWidget
which obeys the interface of swift
, and it will be wrapped by a QDockWidget
.
- Independent development of each
Frame
, which is a sub-window application resides in the framework - Communication channel between
Frame
s - Thread-safety
![image](https://user-images.githubusercontent.com/76851886/219574551-2f798863-ea48-4857-8db6-15840a0505e5.png)
![image](https://user-images.githubusercontent.com/76851886/230578666-c1c3ed05-58ed-4c0b-80ff-a23e0745cfa1.png)
A Frame
simply means a window of PyQt that we see.
In fact, an engine which makes a Frame
works is an App
.
An App
can
- show/hide
Frame
s, which theApp
manages - set a slot for each signal of
Frame
- receive a signal which the
Frame
emits - emit a signal to
Frame
or channel toswift
- communicate
backend
APIs
A swift
recognizes only App
, not Frame
or backend
. Thus, every order for Frame
is implemented in App
.
A backend
is a set of APIs for handling UI-independent operations, such as controlling hardwards, polling something, and connecting DB.
The swift
is an overall manager for this system.
It can
- manage for all apps
- broadcast a message among apps
- handle a swift-call request
- Departure app: Emit the
broadcastRequested
signal with a message. Its slot is the_broadcast()
inswift
. - swift: Routes the message to subscriber apps in
_broadcast()
. It emitsreceived
signals of the subscriber apps. - Destination app: Receive the message to
receivedSlot
method. Thereceived
signal calls it.
- Departure app: Emit the
swiftcallRequested
signal with a message. Its slot is the_swiftcall()
slot inswift
. - swift: Receive the message to
_swiftcall()
and handle the request.