snu-quiqcl / qiwis

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

[FEATURE] Data calculator #29

Closed BECATRUE closed 1 year ago

BECATRUE commented 1 year ago

Feature you want to implement

'Data calculator (hereafter referred to as datacalc)' is an app for showing the sum of two values from selected databases.

Viewer frame

How the feature is implemented

Frame and App will be implemented in apps.datacalc.

Additional context

image
BECATRUE commented 1 year ago

I wonder when the sum calculation is operated? Only setting a dataset, adding a calculation button, or polling whether datas are updated?

@kangz12345

kangz12345 commented 1 year ago

I wonder when the sum calculation is operated? Only setting a dataset, adding a calculation button, or polling whether datas are updated?

For simplicity, let's add a calculation button.

kangz12345 commented 1 year ago

Suggestion:

BECATRUE commented 1 year ago

Suggestion:

  • How about using a dict-like structure for the comboboxes? For example, dbBoxes["A"].

It looks good!

BECATRUE commented 1 year ago

For simplicity, can I assume that the selected database has a table named A (or B), and the table has only one column.

If not, we should add two QLineEdits for typing a table name and a column name.

@kangz12345

kangz12345 commented 1 year ago

Adding line edits looks tiresome indeed. Then, how about taking the table names as constructor arguments? Which implies that it should be given in "setup.json". If you force the table names to "A" and "B", numgen and poller should use the table name "A" or "B", and it does not look intuitive.

BECATRUE commented 1 year ago

Using "setup.json" looks good! I'll do it like this.