I remember earlier versions of FET made an acoustic sound after successful or aborted timetable generation.
The current version 5.28.2 does not report any signal.
Sometimes timetable generation may take a longer time and it happens quite often, that I forget my last running computation if I don't check FET's current status (e.g. still running, timetable generation completed).
So I'm asking if it is possible to re-enable the old acoustic signaling?
Regards!
We never included a sound so far.
If you want to have sound, then you need to modify the src.pro file. Add this line:
QT += multimedia
Then you need to modify the timetablegenerateform.cpp.
Add for example this line:
QSound::play("finish.wav");
(of course you need to add a finish.wav sound in your main directory then)
a good place to add it is in "TimetableGenerateForm::simulationFinished()" before "QMessageBox::information(this, TimetableGenerateForm::tr("FET information"), s);"
(This solution is for single generation only. Multi generation should keep also something like this. Also a checkboox "loop" should be fine, since you maybe left the room. )
It is already in the TODO (item 230). I added also your words along with Volker's solution.
I don't know which version you used with sounds. I guess on Windows, so maybe newer Qt don't add a default sound after finishing the timetable (for the pop-up dialog there.
We can add the new code, I just can't decide on the sound and how to play it (cycling or once).
Technical part: Also, Volker's solution above might not be the best. We might need to integrate the sound file in the resources of the FET executable, and we might need to run it on a separate thread.
Yes, implementing it fine into FET is much more work then i wrote. It's only a quick and dirty modification.
I think a checkbox will be fine. So the user can choose if he want it cycled or not.
About the thread: yes and no. As soon as the user read the conflicts txt, there is no need to hear any more sound. but it also mean there should be a button/checkbox to stop the sound.
About resource: I am not sure. Isn't it better without recourse file, because a user can change the file much easier then hisself? Also the executable will be smaller then.
Quote from: Volker Dirr on November 14, 2015, 04:21:01 PM
About resource: I am not sure. Isn't it better without recourse file, because a user can change the file much easier then hisself? Also the executable will be smaller then.
Yes, it is a bit tricky.
Quote from: Liviu Lalescu on November 14, 2015, 02:55:55 PM
...
I don't know which version you used with sounds. I guess on Windows, so maybe newer Qt don't add a default sound after finishing the timetable (for the pop-up dialog there.
...
I was asking for a simple "ping sound" - Is it possible to add / enable such a default system sound ?
At least on Windows it should be possible. I am not interested in some kind of multimedia bells and whistles, but a kind of short acoustic notification would help me a lot. Sometimes timetable computations can take some time so it can happen that I don't catch the moment while I am busy with other work.
Regards
I think I got it. See attached file for the very little changes needed. I also have put a Windows exe for you, on http://lalescu.ro/liviu/fet/download/custom/beep/ , you need to write it over fet.exe from official 5.28.2.
That's exactly what I wanted! :-) :-) :-)
Thank you very much for your help. I really appreciate it !!!! :-) :-) :-)
I hope that feature won't get lost again in future versions of FET.
Regards!
OK, since you want it, I will add it to future FET versions, and maybe release soon FET-5.28.3.
I will add also after generate multiple (only once, after all timetables).
I added it and released the new FET-5.28.3. Thank you for your suggestion!
Dear Liviu,
I was testing your recent Linux FET 6.3.0 version (from AppImage & qt5.tar.bz2).
I am not sure but is it intended that the Linux version does not produce any acoustic signaling when FET completes timetable generation? :-\
I think an additional setting would be useful so that optional acoustic signaling can be enabled if needed.
Btw. could Volker lift up the 32-Bit Windows release to version 6.3.0 ? (It is still missing on his homepage)
Best regards :)
UI
Dear UI,
I just checked. There is the beep, active by default settings (but you can deactivate if you want). Also, you can input a "Notification command" (see the "Settings" menu). Please let me know.
About the 32-bit Windows exe, indeed
@Volker Dirr is responsible for this, but I don't know if he can do it. I could do it, but it is a bit risky, I am afraid I might mix the official 64-bit and the 32-bit version and obtain a mess - this is the reason I am not doing it.
Dear Liviu,
you are right, there is a notification option. 'Beep' is already marked.
Nevertheless when FET completes no sound can be on Linux heard. :( (Using L-Mint 20.3)
Fortunately I can trigger a command. :)
notify-send 'FET done'
did it. :) :)
The new Win-32-Bit build is not such important. Volker can do that later on.
Best regards :)
UI
Dear UI,
Glad to hear it works! :)
I actually plan to drop the precompiled FET for Qt-5 on GNU/Linux and encourage the users to use Qt 6. It is faster because of the QList change from Qt 5 to Qt 6, and there is this security bug which will be fixed on the future Qt 6.2.4: https://www.qt.io/blog/security-advisory-qprocess . I do not plan to fix my Qt 5 as they say in that report. (You could read this bug's description, it is exactly related to the notification command you are using.)
I tried to fix this bug by tricks in the FET sources, but it is too tricky and risky.
I am just waiting for the release of Qt 6.2.4 to release FET-6.3.1. This is scheduled on the 3rd of March 2022.
I am also trying to avoid the users who could use FET with Qt 6 64-bit to use the Qt 5 32-bit version (I mean people with modern systems using the old 32-bit version).