snu-quiqcl / qiwis

QuIqcl Widget Integration Software
MIT License
6 stars 2 forks source link

Becatrue/26/db mgr #27

Closed BECATRUE closed 1 year ago

BECATRUE commented 1 year ago

I implemented the 'Database manager` app.

When you click 'add' button, you can connect a new database. When you click 'remove' button, you can disconnect the selected database.

For example, I tested with the following process.

  1. Add test.db.
  2. Add test2.db.
  3. Remove test.db.
  4. Remove test2.db.

After step 2, the GUI is like below:

image

For test, I added a logging code in bus.py. The below is the printed logs about transferred messages.

{"db": [{"name": "test.db", "path": "C:/"}]}
{"db": [{"name": "test.db", "path": "C:/"}, {"name": "test2.db", "path": "C:/"}]}
{"db": [{"name": "test2.db", "path": "C:/"}]}
{"db": []}
BECATRUE commented 1 year ago

Please leave your opinion freely!

@kangz12345

BECATRUE commented 1 year ago

I applied all reviews except for namedtuple.

BECATRUE commented 1 year ago

I updated it again.

BECATRUE commented 1 year ago

I defined the namedtuple DB as a static variable not a field because I think it is not necessary that DB is an attribute of DBMgrApp.

BECATRUE commented 1 year ago

I updated! @kangz12345