Time and number of periods different

Started by Rk, May 03, 2011, 07:04:11 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Liviu Lalescu

#15
In the topic I wrote above ( http://lalescu.ro/liviu/fet/forum/index.php?topic=134.0 ), I say there that you should not open from FET the dialog of hours per day, as this may crash FET or show only 60 hours.

So, please read that portion of the topic again.

Let me know the results.

Liviu Lalescu

More details:

1) Your file seems incorrect. The hour 19:00 for instance appears at least twice. All hours' names should be different.

2) You can of course make the hours dialog of FET work with 96 hours. But this is complicated for you, if you don't know Qt and C++. And it is not needed, as it is much easier to work with a text/XML editor on the .fet file. I can give advice also here, if you really need it.

Rk

#17
Thanks again for all your helps.

1. I will fix the duplicate entries and will try it out.

2. I am not a c++ programmer but I am very much interested to try it out, if you can provide step by step instructions. Please do that only if time permits.

Again, thanks :-)

Rk

Liviu Lalescu

#18
Quote
2. I am not a c++ programmer but I am very much interested to try it out, if you can provide step by step instructions. Please do that only if time permits.

OK, sure:

1) src/interface/hoursform.cpp, replace 60 by 96 in all 4 places, then add more lines after line 119, in a similar manner.

2) src/interface/hoursform_template.ui. This is an XML text file. You can modify it with a text/XML editor (maybe difficult), or open it with Qt Designer. There are 60 slots, add 36 more, similar to ones existing. You may want to use copy/paste of objects in Qt Designer.

3) recompile, of course, then run the new modified FET.

I think that's all. Let me know!

Rk

Thanks again.

Regarding the interface change, I am having some issues with copy/paste in Qt designer. Will check further on it and will let you know the result.

Regarding my exact requirement (creating that custom timetable), I succeeded creating it with your help and the only issue I found was that in the generated timetable, a single period shows all those time slots. i.e. the first period 8.00 to 8.45 shows 8.00, 8.05, 8.10 up to  8.45 on the page. Not sure it can be removed.

Anyways, thanks for all your helps.

Rk

Liviu Lalescu

#20
QuoteThanks again.

Regarding the interface change, I am having some issues with copy/paste in Qt designer. Will check further on it and will let you know the result.

Additional advice: the form is locked in a layout. Right click and select "Break layout". Then, after you finish work, select everything and put into a grid layout. It may also work without breaking the layout, but I am not sure.

If you work in Qt Designer, you can take care of tab order for newly added items (in the .ui file, they are listed near the end).

Quote
Regarding my exact requirement (creating that custom timetable), I succeeded creating it with your help and the only issue I found was that in the generated timetable, a single period shows all those time slots. i.e. the first period 8.00 to 8.45 shows 8.00, 8.05, 8.10 up to  8.45 on the page. Not sure it can be removed.

That is great! (that you solved it). This was the main problem. About the display problem, maybe you can import the HTML into a spreadsheet (using office software) and remove the hours column. I am not sure. Maybe Volker can advise better.

Could you send me your file and resulted timetables? Only if the data is not private. Also, what is your opinion about our program? (you can write in feed-back forum section or on the guestbook or here, as you wish). Are there other programs able to solve your requirement?

Rk

Yes, I got the interface working. Thanks for your help. Here is what I have done (just collecting what you instructed in one place)

1) In src/interface/hoursform.cpp, replace 60 by 96 in all 4 places, then add more lines after line 119, in a similar manner.

2) Edit src/interface/hoursform_template.ui. You can modify it with a text/XML editor (maybe difficult), or open it with Qt Designer. There are 60 slots, add 36 more, similar to ones existing. Additional advice: the form is locked in a layout. Right click and select "Break layout". Then, after you finish work, select everything and put into a grid layout. It may also work without breaking the layout, but I am not sure.

3. In src/engine/timetable_defs.h, line 129, instead of 60 put how much you need (in my case 96)
eg: const int MAX_HOURS_PER_DAY=96;

4. recompile, of course, then run the new modified FET.

Here I am attaching a screenshot of the hours per day Window and the modified ui file (in case it helps any other).

Thanks a bunch :-)

Rk

Liviu Lalescu

Thank you, also!

Only one thing: to be perfect, you need to care also of tab order. If you press the Tab key, you go from hour 1 to hour 2, 3 and so on. If you added hours in another order than increasing, then the user presses Tab and goes say from hour 67 to hour 80.

In your file, I see that you removed tab order. You can add it from Qt Designer, there is a button there, and click on each hour, in order.

This is not very important, but others might want to care about this, too.