Little suggestions for GUI in "Student set's not available" dialog

Started by Bob Hairgrove, February 05, 2015, 11:11:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bob Hairgrove

Suggestion 1:
If one is editing a large timetable grid, e.g. 5 or more days with 20 time slots or more, it becomes difficult to see exactly what the time is when editing slots on Friday because the mouse is so far away ... especially with a maximized window.

I would suggest dynamically setting a "tooltip" for each slot which would show the text of the current row's time label when the mouse moves across the table. It should be easy to implement -- just call setToolTip() with the text from the row when the QTableWidgetItem is created in the constructor of "AddConstraintStudentsSetNotAvailableTimesForm". The text of the current day could also be included, although that is easier to see while editing.

Also, I would then offer a configuration setting, or maybe just a check box, so that the user can enable or disable this behavior as they wish.

Suggestion 2:
Colors can be enabled for highlighting the cells. However, looking at this function in the FET source code, it is clear that these are hard-coded values:

void AddConstraintStudentsSetNotAvailableTimesForm::colorItem(QTableWidgetItem* item)
{
if(USE_GUI_COLORS){
if(item->text()==NO)
item->setBackground(QBrush(Qt::darkGreen));
else
item->setBackground(QBrush(Qt::darkRed));
item->setForeground(QBrush(Qt::lightGray));
}
}


I think the colors should be configurable. For example, I would like to use a light green background for available times and white for not available times in the "student set not available" dialog, whereas for the corresponding teacher dialog, perhaps different colors could be used (white = available; dark grey = not available). In case the colors are used, you could hide the "X" by setting the foreground color to the same as the background color since it would be superfluous. That way, you could keep the rest of the functionality the way it is.

Just my 2 cents' worth...

Volker Dirr

Suggestion 1 sounds nice. Let's see what Liviu think about.

I am not sure about suggestion 2. I understand your suggestion, but there are also good reasons to keep the current version. If you have time, maybe read Steve Jobs biograph (written by  Walter Isaacson). There some good points in that book why Steve was right and successful with keeping "hard-coded values".
So we need to think about the best way.
Of course FET should give the user as much freedom as possible. (Especially if it is about the scheduling algorithm)
But on the other side FET should be as easy as possible.  (Especially if it is about the GUI)
One of the problem is, that it will complicate the code, might introduce bugs and problem to the user, it will increase the execute file and complicate the GUI, ....
So the question is: Does your suggestion give us more advantages then we will get disadvantages by that?
There isn't a "correct" answer for this. There are some pros and some cons. Both sides can be "proved" with successful examples.
Let's think a bit about. Liviu is in charge to decide.

Liviu Lalescu

I will add your words in the TODO. Thank you for the suggestions! But I don't know about implementing them in the near future. There are very many possible improvements of the interface, but there is not so much time to make them.

Bob Hairgrove

I agree that making the colors configurable would probably not be worth the effort ... new dialog to program and test, and it is not important, anyway.

But tooltips would be nice to have, and easy to do (I think?).

Volker Dirr

Maybe you read a bit to quick: Liviu accepted both of your suggestions.

Liviu Lalescu

Actually, I only added them in the TODO. But, thinking of it, I will make the tool tips now.

Please let me know, maybe a different solution than tool tips: to highlight the row and the column?

Also, please let me know if you have an idea of the check box for the "Show tool tips", like: "Show tool tips for constraints with tables"?

Volker Dirr

An other idea might be using a mouse over signal. as soon as mouse over cell we colour the whole row and column OR at least just the head of the row and column.

Liviu Lalescu

Quote from: Volker Dirr on February 07, 2015, 10:34:47 AM
An other idea might be using a mouse over signal. as soon as mouse over cell we colour the whole row and column OR at least just the head of the row and column.


It is difficult, as exposed here: http://www.wenda.io/questions/4855176/how-to-highlight-the-entire-row-on-mouse-hover-in-qtablewidget-qt5.html

Liviu Lalescu

OK, Bob Hairgrove, I have put a snapshot with your suggestions, thank you for the suggestion! Please test and let me know.

Bob Hairgrove

Quote from: Liviu Lalescu on February 07, 2015, 04:01:35 PM
OK, Bob Hairgrove, I have put a snapshot with your suggestions, thank you for the suggestion! Please test and let me know.

Tooltips work OK ... thank you!

Tomorrow I will look at the rest. Have a nice weekend!