1 //
2 //
3 // Description: This file is part of FET
4 //
5 //
6 // Author: Lalescu Liviu <Please see https://lalescu.ro/liviu/ for details about contacting Liviu Lalescu (in particular, you can find here the e-mail address)>
7 // Copyright (C) 2003 Liviu Lalescu <https://lalescu.ro/liviu/>
8 //
9 /***************************************************************************
10  *                                                                         *
11  *   This program is free software: you can redistribute it and/or modify  *
12  *   it under the terms of the GNU Affero General Public License as        *
13  *   published by the Free Software Foundation, either version 3 of the    *
14  *   License, or (at your option) any later version.                       *
15  *                                                                         *
16  ***************************************************************************/
17 
18 #include "timetable_defs.h"
19 #include "timetable.h"
20 #include "solution.h"
21 
22 #include <iostream>
23 //using namespace std;
24 
25 #ifndef FET_COMMAND_LINE
26 
27 #include <Qt>
28 
29 #include "fetmainform.h"
30 
31 #include "getmodefornewfileform.h"
32 
33 #include "timetablegenerateform.h"
34 #include "timetablegeneratemultipleform.h"
35 
36 #include "timetableviewstudentsdayshorizontalform.h"
37 #include "timetableviewstudentstimehorizontalform.h"
38 #include "timetableviewteachersdayshorizontalform.h"
39 #include "timetableviewteacherstimehorizontalform.h"
40 #include "timetableviewroomsdayshorizontalform.h"
41 #include "timetableviewroomstimehorizontalform.h"
42 #include "timetableshowconflictsform.h"
43 #include "timetableprintform.h"
44 #include "statisticsprintform.h"
45 
46 #include "export.h"
47 #include "import.h"
48 
49 #include "institutionnameform.h"
50 #include "commentsform.h"
51 #include "daysform.h"
52 #include "hoursform.h"
53 #include "subjectsform.h"
54 #include "subjectsstatisticsform.h"
55 #include "activitytagsform.h"
56 #include "teachersform.h"
57 #include "teachersstatisticsform.h"
58 #include "yearsform.h"
59 #include "splityearform.h"
60 #include "groupsform.h"
61 #include "subgroupsform.h"
62 #include "studentsstatisticsform.h"
63 #include "activitiesroomsstatisticsform.h"
64 #include "activitiesform.h"
65 #include "subactivitiesform.h"
66 #include "roomsform.h"
67 #include "buildingsform.h"
68 #include "alltimeconstraintsform.h"
69 #include "allspaceconstraintsform.h"
70 #include "helpaboutform.h"
71 #include "helpaboutlibrariesform.h"
72 #include "helpblockplanningform.h"
73 #include "helptermsform.h"
74 #include "helpfaqform.h"
75 #include "helptipsform.h"
76 #include "helpinstructionsform.h"
77 #include "helpmoroccoform.h"
78 #include "helpalgeriaform.h"
79 
80 #include "randomseedform.h"
81 
82 #include "fet.h"
83 
84 #include "groupactivitiesininitialorderitemsform.h"
85 #include "constraintactivityendsstudentsdayform.h"
86 #include "constraintactivitiesendstudentsdayform.h"
87 
88 #include "constraintactivityendsteachersdayform.h"
89 #include "constraintactivitiesendteachersdayform.h"
90 
91 #include "constrainttwoactivitiesconsecutiveform.h"
92 #include "constrainttwoactivitiesgroupedform.h"
93 #include "constraintthreeactivitiesgroupedform.h"
94 #include "constrainttwoactivitiesorderedform.h"
95 #include "constrainttwosetsofactivitiesorderedform.h"
96 #include "constrainttwoactivitiesorderedifsamedayform.h"
97 #include "constraintactivitiespreferredtimeslotsform.h"
98 #include "constraintactivitiespreferredstartingtimesform.h"
99 
100 #include "constraintsubactivitiespreferredtimeslotsform.h"
101 #include "constraintsubactivitiespreferredstartingtimesform.h"
102 
103 #include "constraintactivitiessamestartingtimeform.h"
104 #include "constraintactivitiessamestartinghourform.h"
105 #include "constraintactivitiessamestartingdayform.h"
106 
107 #include "constraintactivitiesoccupymaxtimeslotsfromselectionform.h"
108 #include "constraintactivitiesoccupymintimeslotsfromselectionform.h"
109 #include "constraintactivitiesmaxsimultaneousinselectedtimeslotsform.h"
110 #include "constraintactivitiesminsimultaneousinselectedtimeslotsform.h"
111 
112 #include "constraintteachernotavailabletimesform.h"
113 #include "constraintbasiccompulsorytimeform.h"
114 #include "constraintbasiccompulsoryspaceform.h"
115 #include "constraintroomnotavailabletimesform.h"
116 #include "constraintteacherroomnotavailabletimesform.h"
117 #include "constraintactivitypreferredroomform.h"
118 #include "constraintstudentssetnotavailabletimesform.h"
119 #include "constraintbreaktimesform.h"
120 #include "constraintteachermaxdaysperweekform.h"
121 #include "constraintteachersmaxdaysperweekform.h"
122 
123 #include "constraintteachermindaysperweekform.h"
124 #include "constraintteachersmindaysperweekform.h"
125 
126 #include "constraintteacherintervalmaxdaysperweekform.h"
127 #include "constraintteachersintervalmaxdaysperweekform.h"
128 #include "constraintstudentssetintervalmaxdaysperweekform.h"
129 #include "constraintstudentsintervalmaxdaysperweekform.h"
130 
131 #include "constraintstudentssetmaxdaysperweekform.h"
132 #include "constraintstudentsmaxdaysperweekform.h"
133 
134 #include "constraintteachermaxhoursdailyform.h"
135 #include "constraintteachersmaxhoursdailyform.h"
136 #include "constraintteachermaxhourscontinuouslyform.h"
137 #include "constraintteachersmaxhourscontinuouslyform.h"
138 
139 #include "constraintteacheractivitytagmaxhourscontinuouslyform.h"
140 #include "constraintteachersactivitytagmaxhourscontinuouslyform.h"
141 
142 #include "constraintteacheractivitytagmaxhoursdailyform.h"
143 #include "constraintteachersactivitytagmaxhoursdailyform.h"
144 
145 #include "constraintteacheractivitytagminhoursdailyform.h"
146 #include "constraintteachersactivitytagminhoursdailyform.h"
147 
148 #include "constraintteacherminhoursdailyform.h"
149 #include "constraintteachersminhoursdailyform.h"
150 #include "constraintactivitypreferredstartingtimeform.h"
151 #include "constraintstudentssetmaxgapsperweekform.h"
152 #include "constraintstudentsmaxgapsperweekform.h"
153 
154 #include "constraintstudentssetmaxgapsperdayform.h"
155 #include "constraintstudentsmaxgapsperdayform.h"
156 
157 #include "constraintteachersmaxgapsperweekform.h"
158 #include "constraintteachermaxgapsperweekform.h"
159 #include "constraintteachersmaxgapsperdayform.h"
160 #include "constraintteachermaxgapsperdayform.h"
161 
162 #include "constraintteachersmaxgapspermorningandafternoonform.h"
163 #include "constraintteachermaxgapspermorningandafternoonform.h"
164 
165 #include "constraintstudentsearlymaxbeginningsatsecondhourform.h"
166 #include "constraintstudentssetearlymaxbeginningsatsecondhourform.h"
167 #include "constraintstudentssetmaxhoursdailyform.h"
168 #include "constraintstudentsmaxhoursdailyform.h"
169 #include "constraintstudentssetmaxhourscontinuouslyform.h"
170 #include "constraintstudentsmaxhourscontinuouslyform.h"
171 
172 #include "constraintstudentssetactivitytagmaxhourscontinuouslyform.h"
173 #include "constraintstudentsactivitytagmaxhourscontinuouslyform.h"
174 
175 #include "constraintstudentssetactivitytagmaxhoursdailyform.h"
176 #include "constraintstudentsactivitytagmaxhoursdailyform.h"
177 
178 #include "constraintstudentssetactivitytagminhoursdailyform.h"
179 #include "constraintstudentsactivitytagminhoursdailyform.h"
180 
181 #include "constraintstudentssetminhoursdailyform.h"
182 #include "constraintstudentsminhoursdailyform.h"
183 #include "constraintactivitiesnotoverlappingform.h"
184 #include "constraintactivitytagsnotoverlappingform.h"
185 #include "constraintmindaysbetweenactivitiesform.h"
186 #include "constraintmaxdaysbetweenactivitiesform.h"
187 #include "constraintmingapsbetweenactivitiesform.h"
188 #include "constraintactivitypreferredtimeslotsform.h"
189 #include "constraintactivitypreferredstartingtimesform.h"
190 
191 #include "constraintteachermaxspanperdayform.h"
192 #include "constraintteachersmaxspanperdayform.h"
193 #include "constraintstudentssetmaxspanperdayform.h"
194 #include "constraintstudentsmaxspanperdayform.h"
195 
196 #include "constraintteacherminrestinghoursform.h"
197 #include "constraintteachersminrestinghoursform.h"
198 #include "constraintstudentssetminrestinghoursform.h"
199 #include "constraintstudentsminrestinghoursform.h"
200 
201 #include "constraintactivitypreferredroomsform.h"
202 
203 #include "constraintstudentssethomeroomform.h"
204 #include "constraintstudentssethomeroomsform.h"
205 #include "constraintteacherhomeroomform.h"
206 #include "constraintteacherhomeroomsform.h"
207 
208 #include "constraintstudentssetmaxbuildingchangesperdayform.h"
209 #include "constraintstudentsmaxbuildingchangesperdayform.h"
210 #include "constraintstudentssetmaxbuildingchangesperweekform.h"
211 #include "constraintstudentsmaxbuildingchangesperweekform.h"
212 #include "constraintstudentssetmingapsbetweenbuildingchangesform.h"
213 #include "constraintstudentsmingapsbetweenbuildingchangesform.h"
214 
215 #include "constraintteachermaxbuildingchangesperdayform.h"
216 #include "constraintteachersmaxbuildingchangesperdayform.h"
217 #include "constraintteachermaxbuildingchangesperweekform.h"
218 #include "constraintteachersmaxbuildingchangesperweekform.h"
219 #include "constraintteachermingapsbetweenbuildingchangesform.h"
220 #include "constraintteachersmingapsbetweenbuildingchangesform.h"
221 
222 #include "constraintstudentssetmaxroomchangesperrealdayform.h"
223 #include "constraintstudentsmaxroomchangesperrealdayform.h"
224 
225 #include "constraintstudentssetmaxroomchangesperdayform.h"
226 #include "constraintstudentsmaxroomchangesperdayform.h"
227 #include "constraintstudentssetmaxroomchangesperweekform.h"
228 #include "constraintstudentsmaxroomchangesperweekform.h"
229 #include "constraintstudentssetmingapsbetweenroomchangesform.h"
230 #include "constraintstudentsmingapsbetweenroomchangesform.h"
231 
232 #include "constraintteachermaxroomchangesperrealdayform.h"
233 #include "constraintteachersmaxroomchangesperrealdayform.h"
234 
235 #include "constraintteachermaxroomchangesperdayform.h"
236 #include "constraintteachersmaxroomchangesperdayform.h"
237 #include "constraintteachermaxroomchangesperweekform.h"
238 #include "constraintteachersmaxroomchangesperweekform.h"
239 #include "constraintteachermingapsbetweenroomchangesform.h"
240 #include "constraintteachersmingapsbetweenroomchangesform.h"
241 
242 #include "constraintsubjectpreferredroomform.h"
243 #include "constraintsubjectpreferredroomsform.h"
244 #include "constraintsubjectactivitytagpreferredroomform.h"
245 #include "constraintsubjectactivitytagpreferredroomsform.h"
246 
247 #include "constraintactivitytagpreferredroomform.h"
248 #include "constraintactivitytagpreferredroomsform.h"
249 
250 #include "constraintactivitiesoccupymaxdifferentroomsform.h"
251 #include "constraintactivitiessameroomifconsecutiveform.h"
252 
253 #include "constraintstudentssetmingapsbetweenorderedpairofactivitytagsform.h"
254 #include "constraintstudentsmingapsbetweenorderedpairofactivitytagsform.h"
255 #include "constraintteachermingapsbetweenorderedpairofactivitytagsform.h"
256 #include "constraintteachersmingapsbetweenorderedpairofactivitytagsform.h"
257 
258 //mornings-afternoons
259 #include "constraintteachersmaxzerogapsperafternoonform.h"
260 #include "constraintteachermaxzerogapsperafternoonform.h"
261 
262 #include "constraintteachersmaxgapsperrealdayform.h"
263 #include "constraintteachermaxgapsperrealdayform.h"
264 
265 #include "constraintteachermaxrealdaysperweekform.h"
266 #include "constraintteachersmaxrealdaysperweekform.h"
267 #include "constraintteachermaxafternoonsperweekform.h"
268 #include "constraintteachersmaxafternoonsperweekform.h"
269 #include "constraintteachermaxmorningsperweekform.h"
270 #include "constraintteachersmaxmorningsperweekform.h"
271 
272 #include "constraintteachermaxtwoconsecutivemorningsform.h"
273 #include "constraintteachersmaxtwoconsecutivemorningsform.h"
274 #include "constraintteachermaxtwoconsecutiveafternoonsform.h"
275 #include "constraintteachersmaxtwoconsecutiveafternoonsform.h"
276 
277 #include "constraintteachersmaxhoursdailyrealdaysform.h"
278 #include "constraintteachermaxhoursdailyrealdaysform.h"
279 
280 #include "constraintteachersminhoursdailyrealdaysform.h"
281 #include "constraintteacherminhoursdailyrealdaysform.h"
282 
283 #include "constraintteachermaxhoursperallafternoonsform.h"
284 #include "constraintteachersmaxhoursperallafternoonsform.h"
285 
286 #include "constraintstudentssetmaxhoursperallafternoonsform.h"
287 #include "constraintstudentsmaxhoursperallafternoonsform.h"
288 
289 #include "constraintteachersminhourspermorningform.h"
290 #include "constraintteacherminhourspermorningform.h"
291 
292 #include "constraintteachersminhoursdailyrealdaysform.h"
293 #include "constraintteacherminhoursdailyrealdaysform.h"
294 
295 #include "constraintteacherminrealdaysperweekform.h"
296 #include "constraintteachersminrealdaysperweekform.h"
297 
298 #include "constraintteacherminmorningsperweekform.h"
299 #include "constraintteachersminmorningsperweekform.h"
300 #include "constraintteacherminafternoonsperweekform.h"
301 #include "constraintteachersminafternoonsperweekform.h"
302 
303 #include "constraintteachermaxtwoactivitytagsperdayfromn1n2n3form.h"
304 #include "constraintteachersmaxtwoactivitytagsperdayfromn1n2n3form.h"
305 
306 #include "constraintteachersactivitytagmaxhoursdailyrealdaysform.h"
307 #include "constraintteacheractivitytagmaxhoursdailyrealdaysform.h"
308 
309 #include "constraintstudentssetmaxgapsperrealdayform.h"
310 #include "constraintstudentsmaxgapsperrealdayform.h"
311 
312 #include "constraintteachersmaxgapsperweekforrealdaysform.h"
313 #include "constraintteachermaxgapsperweekforrealdaysform.h"
314 #include "constraintstudentssetmaxgapsperweekforrealdaysform.h"
315 #include "constraintstudentsmaxgapsperweekforrealdaysform.h"
316 
317 #include "constraintstudentsafternoonsearlymaxbeginningsatsecondhourform.h"
318 #include "constraintstudentssetafternoonsearlymaxbeginningsatsecondhourform.h"
319 
320 #include "constraintteachersafternoonsearlymaxbeginningsatsecondhourform.h"
321 #include "constraintteacherafternoonsearlymaxbeginningsatsecondhourform.h"
322 
323 #include "constraintstudentsmorningsearlymaxbeginningsatsecondhourform.h"
324 #include "constraintstudentssetmorningsearlymaxbeginningsatsecondhourform.h"
325 
326 #include "constraintteachersmorningsearlymaxbeginningsatsecondhourform.h"
327 #include "constraintteachermorningsearlymaxbeginningsatsecondhourform.h"
328 
329 #include "constraintstudentssetmaxhoursdailyrealdaysform.h"
330 #include "constraintstudentsmaxhoursdailyrealdaysform.h"
331 
332 #include "constraintstudentsminhourspermorningform.h"
333 #include "constraintstudentssetminhourspermorningform.h"
334 
335 #include "constraintstudentssetactivitytagmaxhoursdailyrealdaysform.h"
336 #include "constraintstudentsactivitytagmaxhoursdailyrealdaysform.h"
337 
338 #include "constraintteachermorningintervalmaxdaysperweekform.h"
339 #include "constraintteachersmorningintervalmaxdaysperweekform.h"
340 
341 #include "constraintteacherafternoonintervalmaxdaysperweekform.h"
342 #include "constraintteachersafternoonintervalmaxdaysperweekform.h"
343 
344 #include "constraintstudentssetmorningintervalmaxdaysperweekform.h"
345 #include "constraintstudentsmorningintervalmaxdaysperweekform.h"
346 #include "constraintstudentssetafternoonintervalmaxdaysperweekform.h"
347 #include "constraintstudentsafternoonintervalmaxdaysperweekform.h"
348 
349 #include "constraintstudentssetmaxrealdaysperweekform.h"
350 #include "constraintstudentsmaxrealdaysperweekform.h"
351 
352 #include "constraintstudentssetmaxafternoonsperweekform.h"
353 #include "constraintstudentsmaxafternoonsperweekform.h"
354 #include "constraintstudentssetmaxmorningsperweekform.h"
355 #include "constraintstudentsmaxmorningsperweekform.h"
356 
357 #include "constraintstudentssetminafternoonsperweekform.h"
358 #include "constraintstudentsminafternoonsperweekform.h"
359 #include "constraintstudentssetminmorningsperweekform.h"
360 #include "constraintstudentsminmorningsperweekform.h"
361 
362 #include "constraintteachermaxspanperrealdayform.h"
363 #include "constraintteachersmaxspanperrealdayform.h"
364 #include "constraintstudentssetmaxspanperrealdayform.h"
365 #include "constraintstudentsmaxspanperrealdayform.h"
366 
367 #include "constraintteacherminrestinghoursbetweenmorningandafternoonform.h"
368 #include "constraintteachersminrestinghoursbetweenmorningandafternoonform.h"
369 #include "constraintstudentssetminrestinghoursbetweenmorningandafternoonform.h"
370 #include "constraintstudentsminrestinghoursbetweenmorningandafternoonform.h"
371 
372 #include "constraintteachermaxthreeconsecutivedaysform.h"
373 #include "constraintteachersmaxthreeconsecutivedaysform.h"
374 
375 //block-planning
376 #include "constraintmaxtotalactivitiesfromsetinselectedtimeslotsform.h"
377 
378 #include "constraintmaxgapsbetweenactivitiesform.h"
379 
380 //terms
381 #include "constraintactivitiesmaxinatermform.h"
382 #include "constraintactivitiesoccupymaxtermsform.h"
383 
384 #include "termsform.h"
385 
386 #include "settingstimetablehtmllevelform.h"
387 
388 #include "notificationcommandform.h"
389 
390 #include "activityplanningconfirmationform.h"
391 #include "activityplanningform.h"
392 
393 #include "spreadconfirmationform.h"
394 
395 #include "removeredundantconfirmationform.h"
396 #include "removeredundantform.h"
397 
398 #include "savetimetableconfirmationform.h"
399 
400 #include "timetablestowriteondiskform.h"
401 
402 #include "studentscomboboxesstyleform.h"
403 
404 #include "lockunlock.h"
405 #include "advancedlockunlockform.h"
406 
407 #include "longtextmessagebox.h"
408 
409 #include <QMessageBox>
410 
411 #include <QFileDialog>
412 #include <QString>
413 #include <QDir>
414 #include <QTranslator>
415 #include <QCloseEvent>
416 #include <QStatusBar>
417 #include <QMap>
418 #include <QWidget>
419 #include <QList>
420 #include <QHash>
421 
422 #include <QDesktopServices>
423 #include <QUrl>
424 #include <QApplication>
425 #include <QCoreApplication>
426 
427 #include <QSysInfo>
428 
429 #if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
430 #include <QGuiApplication>
431 #include <QScreen>
432 #else
433 #include <QDesktopWidget>
434 #endif
435 
436 #include <QCursor>
437 #include <QSettings>
438 
439 #include <QFileInfo>
440 #include <QFile>
441 
442 #include <QNetworkAccessManager>
443 #include <QNetworkReply>
444 #include <QSslSocket>
445 
446 #if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
447 #include <QRegularExpression>
448 #include <QRegularExpressionMatch>
449 #else
450 #include <QRegExp>
451 #endif
452 
453 //for the icons of not perfect constraints and for the application window icon
454 #include <QIcon>
455 
456 #include <QRect>
457 
458 QRect mainFormSettingsRect;
459 int MAIN_FORM_SHORTCUTS_TAB_POSITION;
460 
461 #include "spreadmindaysconstraintsfivedaysform.h"
462 
463 #include "statisticsexport.h"
464 
465 #endif
466 
467 bool simulation_running; //true if the user started an allocation of the timetable
468 
469 bool simulation_running_multi;
470 
471 bool students_schedule_ready;
472 bool teachers_schedule_ready;
473 bool rooms_schedule_ready;
474 
475 Solution best_solution;
476 
477 QString conflictsString; //the string that contains a log of the broken constraints
478 QString conflictsStringTitle;
479 
480 bool TIMETABLES_SUBGROUPS_SORTED=false;
481 
482 bool WRITE_TIMETABLE_CONFLICTS=true;
483 
484 bool WRITE_TIMETABLES_STATISTICS=true;
485 bool WRITE_TIMETABLES_XML=true;
486 bool WRITE_TIMETABLES_DAYS_HORIZONTAL=true;
487 bool WRITE_TIMETABLES_DAYS_VERTICAL=true;
488 bool WRITE_TIMETABLES_TIME_HORIZONTAL=true;
489 bool WRITE_TIMETABLES_TIME_VERTICAL=true;
490 
491 bool WRITE_TIMETABLES_SUBGROUPS=true;
492 bool WRITE_TIMETABLES_GROUPS=true;
493 bool WRITE_TIMETABLES_YEARS=true;
494 bool WRITE_TIMETABLES_TEACHERS=true;
495 bool WRITE_TIMETABLES_TEACHERS_FREE_PERIODS=true;
496 bool WRITE_TIMETABLES_ROOMS=true;
497 bool WRITE_TIMETABLES_SUBJECTS=true;
498 bool WRITE_TIMETABLES_ACTIVITY_TAGS=true;
499 bool WRITE_TIMETABLES_ACTIVITIES=true;
500 
501 bool SHOW_VIRTUAL_ROOMS_IN_TIMETABLES=false;
502 
503 #ifndef FET_COMMAND_LINE
504 extern QApplication* pqapplication;
505 #endif
506 
507 Rules rules2;
508 
509 #ifndef FET_COMMAND_LINE
510 static int ORIGINAL_WIDTH;
511 static int ORIGINAL_HEIGHT;
512 //static int ORIGINAL_X;
513 //static int ORIGINAL_Y;
514 
515 const QString COMPANY=QString("fet");
516 const QString PROGRAM=QString("fettimetabling");
517 
518 bool USE_GUI_COLORS=false;
519 
520 bool SHOW_SUBGROUPS_IN_COMBO_BOXES=true;
521 bool SHOW_SUBGROUPS_IN_ACTIVITY_PLANNING=true;
522 
523 bool SHOW_SHORTCUTS_ON_MAIN_WINDOW=true;
524 
525 bool SHOW_TOOLTIPS_FOR_CONSTRAINTS_WITH_TABLES=false;
526 
527 bool ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY=false;
528 bool ENABLE_ACTIVITY_TAG_MIN_HOURS_DAILY=false;
529 bool ENABLE_STUDENTS_MAX_GAPS_PER_DAY=false;
530 
531 bool ENABLE_MAX_GAPS_PER_REAL_DAY=false;
532 
533 bool SHOW_WARNING_FOR_NOT_PERFECT_CONSTRAINTS=true;
534 
535 bool SHOW_WARNING_FOR_SUBGROUPS_WITH_THE_SAME_ACTIVITIES=true;
536 
537 bool SHOW_WARNING_FOR_ACTIVITIES_FIXED_SPACE_VIRTUAL_REAL_ROOMS_BUT_NOT_FIXED_TIME=true;
538 
539 bool SHOW_WARNING_FOR_MAX_HOURS_DAILY_WITH_UNDER_100_WEIGHT=true;
540 
541 bool ENABLE_STUDENTS_MIN_HOURS_DAILY_WITH_ALLOW_EMPTY_DAYS=false;
542 bool SHOW_WARNING_FOR_STUDENTS_MIN_HOURS_DAILY_WITH_ALLOW_EMPTY_DAYS=true;
543 
544 bool ENABLE_STUDENTS_MIN_HOURS_PER_MORNING_WITH_ALLOW_EMPTY_MORNINGS=false;
545 bool SHOW_WARNING_FOR_STUDENTS_MIN_HOURS_PER_MORNING_WITH_ALLOW_EMPTY_MORNINGS=true;
546 
547 bool ENABLE_GROUP_ACTIVITIES_IN_INITIAL_ORDER=false;
548 bool SHOW_WARNING_FOR_GROUP_ACTIVITIES_IN_INITIAL_ORDER=true;
549 
550 bool CONFIRM_ACTIVITY_PLANNING=true;
551 bool CONFIRM_SPREAD_ACTIVITIES=true;
552 bool CONFIRM_REMOVE_REDUNDANT=true;
553 bool CONFIRM_SAVE_TIMETABLE=true;
554 
555 //extern MRG32k3a rng;
556 
557 const int STATUS_BAR_MILLISECONDS=2500;
558 
FetMainForm()559 FetMainForm::FetMainForm()
560 {
561 	setupUi(this);
562 
563 	simulation_running=false;
564 	simulation_running_multi=false;
565 
566 	menuA_teacher_time_constraints=nullptr;
567 	menuAll_teachers_time_constraints=nullptr;
568 	menuA_students_set_time_constraints=nullptr;
569 	menuAll_students_time_constraints=nullptr;
570 
571 	menuA_teacher_1_time_constraints=nullptr;
572 	menuA_teacher_2_time_constraints=nullptr;
573 	menuAll_teachers_time_constraints=nullptr;
574 	menuAll_teachers_1_time_constraints=nullptr;
575 	menuAll_teachers_2_time_constraints=nullptr;
576 	menuA_students_set_1_time_constraints=nullptr;
577 	menuA_students_set_2_time_constraints=nullptr;
578 	menuAll_students_1_time_constraints=nullptr;
579 	menuAll_students_2_time_constraints=nullptr;
580 
581 	createActionsForConstraints();
582 
583 	QIcon appIcon(":/images/appicon.png");
584 	pqapplication->setWindowIcon(appIcon);
585 
586 	this->statusBar()->addPermanentWidget(&modeLabel);
587 	dataAvailable=false;
588 	updateMode(true); //true means force
589 
590 	QSettings settings(COMPANY, PROGRAM);
591 	int nRec=settings.value(QString("FetMainForm/number-of-recent-files"), 0).toInt();
592 	if(nRec>MAX_RECENT_FILES)
593 		nRec=MAX_RECENT_FILES;
594 	recentFiles.clear();
595 	for(int i=0; i<nRec; i++)
596 		if(settings.contains(QString("FetMainForm/recent-file/")+CustomFETString::number(i+1)))
597 			recentFiles.append(settings.value(QString("FetMainForm/recent-file/")+CustomFETString::number(i+1)).toString());
598 
599 	recentSeparatorAction=fileOpenRecentMenu->insertSeparator(fileClearRecentFilesListAction);
600 	for(int i=0; i<MAX_RECENT_FILES; i++){
601 		recentFileActions[i]=new QAction(this);
602 		recentFileActions[i]->setVisible(false);
603 		connect(recentFileActions[i], SIGNAL(triggered()), this, SLOT(openRecentFile()));
604 
605 		fileOpenRecentMenu->insertAction(recentSeparatorAction, recentFileActions[i]);
606 	}
607 
608 	updateRecentFileActions();
609 
610 	//statusBar()->showMessage(tr("FET started", "This is a message written in the status bar, saying that FET was started"), STATUS_BAR_MILLISECONDS);
611 	statusBar()->showMessage("", STATUS_BAR_MILLISECONDS); //to get the correct centralWidget for the logo, so we need status bar existing.
612 
613 	INPUT_FILENAME_XML=QString("");
614 	setCurrentFile(INPUT_FILENAME_XML);
615 
616 	//toolBox->setCurrentIndex(0);
617 	tabWidget->setVisible(SHOW_SHORTCUTS_ON_MAIN_WINDOW);
618 	tabWidget->setCurrentIndex(MAIN_FORM_SHORTCUTS_TAB_POSITION);
619 
620 	shortcutBasicMenu=new QMenu();
621 	shortcutBasicMenu->addMenu(menuInstitution_information);
622 	shortcutBasicMenu->addSeparator(); //added on 19 Dec. 2009
623 	shortcutBasicMenu->addAction(dataTermsAction);
624 	shortcutBasicMenu->addMenu(menuDays_and_hours);
625 
626 	shortcutAdvancedTimeMenu=new QMenu();
627 	shortcutAdvancedTimeMenu->addAction(spreadActivitiesAction);
628 	shortcutAdvancedTimeMenu->addSeparator();
629 	shortcutAdvancedTimeMenu->addAction(removeRedundantConstraintsAction);
630 	//shortcutAdvancedTimeMenu->addSeparator();
631 	//shortcutAdvancedTimeMenu->addAction(groupActivitiesInInitialOrderAction);
632 
633 	shortcutDataSpaceMenu=new QMenu();
634 	shortcutDataSpaceMenu->addAction(dataBuildingsAction);
635 	shortcutDataSpaceMenu->addSeparator();
636 	shortcutDataSpaceMenu->addAction(dataRoomsAction);
637 
638 	shortcutDataAdvancedMenu=new QMenu();
639 	shortcutDataAdvancedMenu->addAction(activityPlanningAction);
640 	shortcutDataAdvancedMenu->addSeparator();
641 	shortcutDataAdvancedMenu->addAction(dataTeachersStatisticsAction);
642 	shortcutDataAdvancedMenu->addAction(dataSubjectsStatisticsAction);
643 	shortcutDataAdvancedMenu->addAction(dataStudentsStatisticsAction);
644 	shortcutDataAdvancedMenu->addSeparator();
645 	shortcutDataAdvancedMenu->addAction(dataActivitiesRoomsStatisticsAction);
646 	shortcutDataAdvancedMenu->addSeparator();
647 	shortcutDataAdvancedMenu->addAction(dataTeachersSubjectsQualificationsStatisticsAction);
648 
649 	//2014-07-01
650 	shortcutTimetableLockingMenu=new QMenu();
651 	shortcutTimetableLockingMenu->addAction(timetableLockAllActivitiesAction);
652 	shortcutTimetableLockingMenu->addAction(timetableUnlockAllActivitiesAction);
653 	shortcutTimetableLockingMenu->addSeparator();
654 	shortcutTimetableLockingMenu->addAction(timetableLockActivitiesDayAction);
655 	shortcutTimetableLockingMenu->addAction(timetableUnlockActivitiesDayAction);
656 	shortcutTimetableLockingMenu->addSeparator();
657 	shortcutTimetableLockingMenu->addAction(timetableLockActivitiesEndStudentsDayAction);
658 	shortcutTimetableLockingMenu->addAction(timetableUnlockActivitiesEndStudentsDayAction);
659 	//2018-06-26
660 	shortcutTimetableLockingMenu->addSeparator();
661 	shortcutTimetableLockingMenu->addAction(timetableLockActivitiesWithASpecifiedActivityTagAction);
662 	shortcutTimetableLockingMenu->addAction(timetableUnlockActivitiesWithASpecifiedActivityTagAction);
663 
664 	shortcutTimetableAdvancedMenu=new QMenu();
665 	shortcutTimetableAdvancedMenu->addAction(groupActivitiesInInitialOrderAction);
666 
667 	ORIGINAL_WIDTH=width();
668 	ORIGINAL_HEIGHT=height();
669 	//ORIGINAL_X=x();
670 	//ORIGINAL_Y=y();
671 
672 	QRect rect=mainFormSettingsRect;
673 	if(rect.isValid()){
674 		bool ok=false;
675 #if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
676 		for(QScreen* screen : QGuiApplication::screens()){
677 			if(screen->availableGeometry().intersects(rect)){
678 #else
679 		for(int i=0; i<QApplication::desktop()->screenCount(); i++){
680 			if(QApplication::desktop()->availableGeometry(i).intersects(rect)){
681 #endif
682 				ok=true;
683 				break;
684 			}
685 		}
686 
687 		if(ok){
688 			this->setGeometry(rect);
689 		}
690 		else{
691 			forceCenterWidgetOnScreen(this);
692 		}
693 	}
694 	else{
695 		forceCenterWidgetOnScreen(this);
696 	}
697 
698 	//new void data
699 	if(gt.rules.initialized)
700 		gt.rules.kill();
701 	/*gt.rules.init();
702 
703 	gt.rules.modified=true; //to avoid the flickering of the main form modified flag
704 
705 	bool tmp=gt.rules.addTimeConstraint(new ConstraintBasicCompulsoryTime(100));
706 	assert(tmp);
707 	tmp=gt.rules.addSpaceConstraint(new ConstraintBasicCompulsorySpace(100));
708 	assert(tmp);*/
709 
710 	gt.rules.modified=true; //force update of the modified flag of the main window
711 	setRulesUnmodifiedAndOtherThings(&gt.rules);
712 
713 	teachers_schedule_ready=false;
714 	students_schedule_ready=false;
715 	rooms_schedule_ready=false;
716 
717 	assert(!gt.rules.initialized);
718 
719 	settingsShowShortcutsOnMainWindowAction->setCheckable(true);
720 	settingsShowShortcutsOnMainWindowAction->setChecked(SHOW_SHORTCUTS_ON_MAIN_WINDOW);
721 
722 	settingsShowToolTipsForConstraintsWithTablesAction->setCheckable(true);
723 	settingsShowToolTipsForConstraintsWithTablesAction->setChecked(SHOW_TOOLTIPS_FOR_CONSTRAINTS_WITH_TABLES);
724 
725 	checkForUpdatesAction->setCheckable(true);
726 	checkForUpdatesAction->setChecked(checkForUpdates);
727 
728 	settingsUseColorsAction->setCheckable(true);
729 	settingsUseColorsAction->setChecked(USE_GUI_COLORS);
730 
731 	settingsShowSubgroupsInComboBoxesAction->setCheckable(true);
732 	settingsShowSubgroupsInComboBoxesAction->setChecked(SHOW_SUBGROUPS_IN_COMBO_BOXES);
733 	settingsShowSubgroupsInActivityPlanningAction->setCheckable(true);
734 	settingsShowSubgroupsInActivityPlanningAction->setChecked(SHOW_SUBGROUPS_IN_ACTIVITY_PLANNING);
735 
736 	////////confirmations
737 	settingsConfirmActivityPlanningAction->setCheckable(true);
738 	settingsConfirmActivityPlanningAction->setChecked(CONFIRM_ACTIVITY_PLANNING);
739 
740 	settingsConfirmSpreadActivitiesAction->setCheckable(true);
741 	settingsConfirmSpreadActivitiesAction->setChecked(CONFIRM_SPREAD_ACTIVITIES);
742 
743 	settingsConfirmRemoveRedundantAction->setCheckable(true);
744 	settingsConfirmRemoveRedundantAction->setChecked(CONFIRM_REMOVE_REDUNDANT);
745 
746 	settingsConfirmSaveTimetableAction->setCheckable(true);
747 	settingsConfirmSaveTimetableAction->setChecked(CONFIRM_SAVE_TIMETABLE);
748 	///////
749 
750 	settingsDivideTimetablesByDaysAction->setCheckable(true);
751 	settingsDivideTimetablesByDaysAction->setChecked(DIVIDE_HTML_TIMETABLES_WITH_TIME_AXIS_BY_DAYS);
752 
753 	settingsDuplicateVerticalNamesAction->setCheckable(true);
754 	settingsDuplicateVerticalNamesAction->setChecked(TIMETABLE_HTML_REPEAT_NAMES);
755 
756 	if(checkForUpdates){
757 		//After setGeometry(rect), so that we know the position of the main form, used for the parent 'this' of the QMessageBox below.
758 		if(!QSslSocket::supportsSsl()){
759 			QMessageBox::warning(this, tr("FET warning"), tr("SSL is not available (this might be caused by missing SSL libraries)."
760 			 " Because of this, FET cannot check for updates on startup (it cannot get the file %1).")
761 			 .arg("https://lalescu.ro/liviu/fet/crtversion/crtversion.txt"));
762 		}
763 		else{
764 			networkManager=new QNetworkAccessManager(this);
765 			connect(networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(replyFinished(QNetworkReply*)));
766 			QUrl url("https://lalescu.ro/liviu/fet/crtversion/crtversion.txt");
767 			if(VERBOSE){
768 				std::cout<<"New version checking host: "<<qPrintable(url.host())<<std::endl;
769 				std::cout<<"New version checking path: "<<qPrintable(url.path())<<std::endl;
770 			}
771 			QNetworkRequest req=QNetworkRequest(url);
772 			//As on https://stackoverflow.com/questions/14416786/webpage-returning-http-406-error-only-when-connecting-from-qt
773 			//and http://amin-ahmadi.com/2016/06/13/fix-modsecurity-issues-in-qt-network-module-download-functionality/ ,
774 			//to avoid code 406 from the server.
775 #if QT_VERSION >= QT_VERSION_CHECK(5,4,0)
776 			req.setHeader(QNetworkRequest::UserAgentHeader, QString("FET")+QString(" ")+FET_VERSION+
777 			 QString(" (")+QSysInfo::prettyProductName()+QString("; ")+QSysInfo::currentCpuArchitecture()+QString(")"));
778 #elif QT_VERSION >= QT_VERSION_CHECK(5,0,0)
779 			req.setHeader(QNetworkRequest::UserAgentHeader, QString("FET")+QString(" ")+FET_VERSION);
780 #else
781 			req.setRawHeader("User-Agent", (QString("FET")+QString(" ")+FET_VERSION).toUtf8());
782 #endif
783 			networkManager->get(req);
784 		}
785 	}
786 
787 	settingsPrintActivityTagsAction->setCheckable(true);
788 	settingsPrintActivityTagsAction->setChecked(TIMETABLE_HTML_PRINT_ACTIVITY_TAGS);
789 
790 	settingsShowVirtualRoomsInTimetablesAction->setCheckable(true);
791 	settingsShowVirtualRoomsInTimetablesAction->setChecked(SHOW_VIRTUAL_ROOMS_IN_TIMETABLES);
792 
793 	settingsOrderSubgroupsInTimetablesAction->setCheckable(true);
794 	settingsOrderSubgroupsInTimetablesAction->setChecked(TIMETABLES_SUBGROUPS_SORTED);
795 
796 	settingsPrintDetailedTimetablesAction->setCheckable(true);
797 	settingsPrintDetailedTimetablesAction->setChecked(PRINT_DETAILED_HTML_TIMETABLES);
798 	settingsPrintDetailedTeachersFreePeriodsTimetablesAction->setCheckable(true);
799 	settingsPrintDetailedTeachersFreePeriodsTimetablesAction->setChecked(PRINT_DETAILED_HTML_TEACHERS_FREE_PERIODS);
800 
801 	settingsPrintNotAvailableSlotsAction->setCheckable(true);
802 	settingsPrintNotAvailableSlotsAction->setChecked(PRINT_NOT_AVAILABLE_TIME_SLOTS);
803 
804 	settingsPrintBreakSlotsAction->setCheckable(true);
805 	settingsPrintBreakSlotsAction->setChecked(PRINT_BREAK_TIME_SLOTS);
806 
807 	settingsPrintActivitiesWithSameStartingTimeAction->setCheckable(true);
808 	settingsPrintActivitiesWithSameStartingTimeAction->setChecked(PRINT_ACTIVITIES_WITH_SAME_STARTING_TIME);
809 
810 	//needed to sync the view table forms
811 	LockUnlock::computeLockedUnlockedActivitiesTimeSpace();
812 	LockUnlock::increaseCommunicationSpinBox();
813 
814 	showWarningForSubgroupsWithTheSameActivitiesAction->setCheckable(true);
815 	showWarningForActivitiesNotLockedTimeLockedSpaceVirtualRealRoomsAction->setCheckable(true);
816 	showWarningForMaxHoursDailyWithUnder100WeightAction->setCheckable(true);
817 
818 	enableActivityTagMaxHoursDailyAction->setCheckable(true);
819 	enableActivityTagMinHoursDailyAction->setCheckable(true);
820 	enableStudentsMaxGapsPerDayAction->setCheckable(true);
821 	enableMaxGapsPerRealDayAction->setCheckable(true);
822 	showWarningForNotPerfectConstraintsAction->setCheckable(true);
823 
824 	enableStudentsMinHoursDailyWithAllowEmptyDaysAction->setCheckable(true);
825 	showWarningForStudentsMinHoursDailyWithAllowEmptyDaysAction->setCheckable(true);
826 
827 	enableStudentsMinHoursPerMorningWithAllowEmptyMorningsAction->setCheckable(true);
828 	showWarningForStudentsMinHoursPerMorningWithAllowEmptyMorningsAction->setCheckable(true);
829 
830 	enableGroupActivitiesInInitialOrderAction->setCheckable(true);
831 	showWarningForGroupActivitiesInInitialOrderAction->setCheckable(true);
832 
833 	showWarningForSubgroupsWithTheSameActivitiesAction->setChecked(SHOW_WARNING_FOR_SUBGROUPS_WITH_THE_SAME_ACTIVITIES);
834 
835 	showWarningForActivitiesNotLockedTimeLockedSpaceVirtualRealRoomsAction->setChecked(SHOW_WARNING_FOR_ACTIVITIES_FIXED_SPACE_VIRTUAL_REAL_ROOMS_BUT_NOT_FIXED_TIME);
836 
837 	showWarningForMaxHoursDailyWithUnder100WeightAction->setChecked(SHOW_WARNING_FOR_MAX_HOURS_DAILY_WITH_UNDER_100_WEIGHT);
838 
839 	enableActivityTagMaxHoursDailyAction->setChecked(ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY);
840 	enableActivityTagMinHoursDailyAction->setChecked(ENABLE_ACTIVITY_TAG_MIN_HOURS_DAILY);
841 	enableStudentsMaxGapsPerDayAction->setChecked(ENABLE_STUDENTS_MAX_GAPS_PER_DAY);
842 	enableMaxGapsPerRealDayAction->setChecked(ENABLE_MAX_GAPS_PER_REAL_DAY);
843 	showWarningForNotPerfectConstraintsAction->setChecked(SHOW_WARNING_FOR_NOT_PERFECT_CONSTRAINTS);
844 
845 	enableStudentsMinHoursDailyWithAllowEmptyDaysAction->setChecked(ENABLE_STUDENTS_MIN_HOURS_DAILY_WITH_ALLOW_EMPTY_DAYS);
846 	showWarningForStudentsMinHoursDailyWithAllowEmptyDaysAction->setChecked(SHOW_WARNING_FOR_STUDENTS_MIN_HOURS_DAILY_WITH_ALLOW_EMPTY_DAYS);
847 
848 	enableStudentsMinHoursPerMorningWithAllowEmptyMorningsAction->setChecked(ENABLE_STUDENTS_MIN_HOURS_PER_MORNING_WITH_ALLOW_EMPTY_MORNINGS);
849 	showWarningForStudentsMinHoursPerMorningWithAllowEmptyMorningsAction->setChecked(SHOW_WARNING_FOR_STUDENTS_MIN_HOURS_PER_MORNING_WITH_ALLOW_EMPTY_MORNINGS);
850 
851 	enableGroupActivitiesInInitialOrderAction->setChecked(ENABLE_GROUP_ACTIVITIES_IN_INITIAL_ORDER);
852 	showWarningForGroupActivitiesInInitialOrderAction->setChecked(SHOW_WARNING_FOR_GROUP_ACTIVITIES_IN_INITIAL_ORDER);
853 
854 	connect(showWarningForSubgroupsWithTheSameActivitiesAction, SIGNAL(toggled(bool)), this, SLOT(showWarningForSubgroupsWithTheSameActivitiesToggled(bool)));
855 	connect(showWarningForActivitiesNotLockedTimeLockedSpaceVirtualRealRoomsAction, SIGNAL(toggled(bool)),
856 	 this, SLOT(showWarningForActivitiesNotLockedTimeLockedSpaceVirtualRealRoomsToggled(bool)));
857 	connect(showWarningForMaxHoursDailyWithUnder100WeightAction, SIGNAL(toggled(bool)),
858 	 this, SLOT(showWarningForMaxHoursDailyWithUnder100WeightToggled(bool)));
859 
860 	connect(checkForUpdatesAction, SIGNAL(toggled(bool)), this, SLOT(checkForUpdatesToggled(bool)));
861 	connect(settingsUseColorsAction, SIGNAL(toggled(bool)), this, SLOT(useColorsToggled(bool)));
862 	connect(settingsShowSubgroupsInComboBoxesAction, SIGNAL(toggled(bool)), this, SLOT(showSubgroupsInComboBoxesToggled(bool)));
863 	connect(settingsShowSubgroupsInActivityPlanningAction, SIGNAL(toggled(bool)), this, SLOT(showSubgroupsInActivityPlanningToggled(bool)));
864 
865 	connect(enableActivityTagMaxHoursDailyAction, SIGNAL(toggled(bool)), this, SLOT(enableActivityTagMaxHoursDailyToggled(bool)));
866 	connect(enableActivityTagMinHoursDailyAction, SIGNAL(toggled(bool)), this, SLOT(enableActivityTagMinHoursDailyToggled(bool)));
867 	connect(enableStudentsMaxGapsPerDayAction, SIGNAL(toggled(bool)), this, SLOT(enableStudentsMaxGapsPerDayToggled(bool)));
868 	connect(enableMaxGapsPerRealDayAction, SIGNAL(toggled(bool)), this, SLOT(enableMaxGapsPerRealDayToggled(bool)));
869 	connect(showWarningForNotPerfectConstraintsAction, SIGNAL(toggled(bool)), this, SLOT(showWarningForNotPerfectConstraintsToggled(bool)));
870 
871 	connect(enableStudentsMinHoursDailyWithAllowEmptyDaysAction, SIGNAL(toggled(bool)), this, SLOT(enableStudentsMinHoursDailyWithAllowEmptyDaysToggled(bool)));
872 	connect(showWarningForStudentsMinHoursDailyWithAllowEmptyDaysAction, SIGNAL(toggled(bool)), this, SLOT(showWarningForStudentsMinHoursDailyWithAllowEmptyDaysToggled(bool)));
873 
874 	connect(enableStudentsMinHoursPerMorningWithAllowEmptyMorningsAction, SIGNAL(toggled(bool)), this, SLOT(enableStudentsMinHoursPerMorningWithAllowEmptyMorningsToggled(bool)));
875 	connect(showWarningForStudentsMinHoursPerMorningWithAllowEmptyMorningsAction, SIGNAL(toggled(bool)), this, SLOT(showWarningForStudentsMinHoursPerMorningWithAllowEmptyMorningsToggled(bool)));
876 
877 	connect(enableGroupActivitiesInInitialOrderAction, SIGNAL(toggled(bool)), this, SLOT(enableGroupActivitiesInInitialOrderToggled(bool)));
878 	connect(showWarningForGroupActivitiesInInitialOrderAction, SIGNAL(toggled(bool)), this, SLOT(showWarningForGroupActivitiesInInitialOrderToggled(bool)));
879 
880 	dataTimeConstraintsTeacherActivityTagMaxHoursDailyAction->setIconVisibleInMenu(true);
881 	dataTimeConstraintsTeachersActivityTagMaxHoursDailyAction->setIconVisibleInMenu(true);
882 	dataTimeConstraintsStudentsActivityTagMaxHoursDailyAction->setIconVisibleInMenu(true);
883 	dataTimeConstraintsStudentsSetActivityTagMaxHoursDailyAction->setIconVisibleInMenu(true);
884 
885 	dataTimeConstraintsTeacherActivityTagMaxHoursDailyRealDaysAction->setIconVisibleInMenu(true);
886 	dataTimeConstraintsTeachersActivityTagMaxHoursDailyRealDaysAction->setIconVisibleInMenu(true);
887 	dataTimeConstraintsStudentsActivityTagMaxHoursDailyRealDaysAction->setIconVisibleInMenu(true);
888 	dataTimeConstraintsStudentsSetActivityTagMaxHoursDailyRealDaysAction->setIconVisibleInMenu(true);
889 
890 	dataTimeConstraintsTeacherActivityTagMinHoursDailyAction->setIconVisibleInMenu(true);
891 	dataTimeConstraintsTeachersActivityTagMinHoursDailyAction->setIconVisibleInMenu(true);
892 	dataTimeConstraintsStudentsActivityTagMinHoursDailyAction->setIconVisibleInMenu(true);
893 	dataTimeConstraintsStudentsSetActivityTagMinHoursDailyAction->setIconVisibleInMenu(true);
894 
895 	dataTimeConstraintsStudentsSetMaxGapsPerDayAction->setIconVisibleInMenu(true);
896 	dataTimeConstraintsStudentsMaxGapsPerDayAction->setIconVisibleInMenu(true);
897 
898 	dataTimeConstraintsStudentsSetMaxGapsPerRealDayAction->setIconVisibleInMenu(true);
899 	dataTimeConstraintsStudentsMaxGapsPerRealDayAction->setIconVisibleInMenu(true);
900 	dataTimeConstraintsTeachersMaxGapsPerRealDayAction->setIconVisibleInMenu(true);
901 	dataTimeConstraintsTeacherMaxGapsPerRealDayAction->setIconVisibleInMenu(true);
902 
903 	dataTimeConstraintsStudentsSetMaxGapsPerWeekForRealDaysAction->setIconVisibleInMenu(true);
904 	dataTimeConstraintsStudentsMaxGapsPerWeekForRealDaysAction->setIconVisibleInMenu(true);
905 	dataTimeConstraintsTeachersMaxGapsPerWeekForRealDaysAction->setIconVisibleInMenu(true);
906 	dataTimeConstraintsTeacherMaxGapsPerWeekForRealDaysAction->setIconVisibleInMenu(true);
907 
908 	groupActivitiesInInitialOrderAction->setIconVisibleInMenu(true);
909 
910 	setEnabledIcon(dataTimeConstraintsTeacherActivityTagMaxHoursDailyAction, ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY);
911 	setEnabledIcon(dataTimeConstraintsTeachersActivityTagMaxHoursDailyAction, ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY);
912 	setEnabledIcon(dataTimeConstraintsStudentsActivityTagMaxHoursDailyAction, ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY);
913 	setEnabledIcon(dataTimeConstraintsStudentsSetActivityTagMaxHoursDailyAction, ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY);
914 
915 	setEnabledIcon(dataTimeConstraintsTeacherActivityTagMaxHoursDailyRealDaysAction, ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY);
916 	setEnabledIcon(dataTimeConstraintsTeachersActivityTagMaxHoursDailyRealDaysAction, ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY);
917 	setEnabledIcon(dataTimeConstraintsStudentsActivityTagMaxHoursDailyRealDaysAction, ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY);
918 	setEnabledIcon(dataTimeConstraintsStudentsSetActivityTagMaxHoursDailyRealDaysAction, ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY);
919 
920 	setEnabledIcon(dataTimeConstraintsTeacherActivityTagMinHoursDailyAction, ENABLE_ACTIVITY_TAG_MIN_HOURS_DAILY);
921 	setEnabledIcon(dataTimeConstraintsTeachersActivityTagMinHoursDailyAction, ENABLE_ACTIVITY_TAG_MIN_HOURS_DAILY);
922 	setEnabledIcon(dataTimeConstraintsStudentsActivityTagMinHoursDailyAction, ENABLE_ACTIVITY_TAG_MIN_HOURS_DAILY);
923 	setEnabledIcon(dataTimeConstraintsStudentsSetActivityTagMinHoursDailyAction, ENABLE_ACTIVITY_TAG_MIN_HOURS_DAILY);
924 
925 	setEnabledIcon(dataTimeConstraintsStudentsSetMaxGapsPerDayAction, ENABLE_STUDENTS_MAX_GAPS_PER_DAY);
926 	setEnabledIcon(dataTimeConstraintsStudentsMaxGapsPerDayAction, ENABLE_STUDENTS_MAX_GAPS_PER_DAY);
927 
928 	setEnabledIcon(dataTimeConstraintsStudentsSetMaxGapsPerRealDayAction, ENABLE_MAX_GAPS_PER_REAL_DAY);
929 	setEnabledIcon(dataTimeConstraintsStudentsMaxGapsPerRealDayAction, ENABLE_MAX_GAPS_PER_REAL_DAY);
930 	setEnabledIcon(dataTimeConstraintsTeachersMaxGapsPerRealDayAction, ENABLE_MAX_GAPS_PER_REAL_DAY);
931 	setEnabledIcon(dataTimeConstraintsTeacherMaxGapsPerRealDayAction, ENABLE_MAX_GAPS_PER_REAL_DAY);
932 
933 	setEnabledIcon(dataTimeConstraintsStudentsSetMaxGapsPerWeekForRealDaysAction, ENABLE_MAX_GAPS_PER_REAL_DAY);
934 	setEnabledIcon(dataTimeConstraintsStudentsMaxGapsPerWeekForRealDaysAction, ENABLE_MAX_GAPS_PER_REAL_DAY);
935 	setEnabledIcon(dataTimeConstraintsTeachersMaxGapsPerWeekForRealDaysAction, ENABLE_MAX_GAPS_PER_REAL_DAY);
936 	setEnabledIcon(dataTimeConstraintsTeacherMaxGapsPerWeekForRealDaysAction, ENABLE_MAX_GAPS_PER_REAL_DAY);
937 
938 	setEnabledIcon(groupActivitiesInInitialOrderAction, ENABLE_GROUP_ACTIVITIES_IN_INITIAL_ORDER);
939 }
940 
941 void FetMainForm::retranslateMode()
942 {
943 	if(dataAvailable){
944 		assert(gt.rules.initialized);
945 		assert(currentMode==gt.rules.mode);
946 		if(gt.rules.mode==OFFICIAL)
947 			modeLabel.setText(tr("MODE: Official"));
948 		else if(gt.rules.mode==MORNINGS_AFTERNOONS)
949 			modeLabel.setText(tr("MODE: Mornings-Afternoons"));
950 		else if(gt.rules.mode==BLOCK_PLANNING)
951 			modeLabel.setText(tr("MODE: Block planning"));
952 		else if(gt.rules.mode==TERMS)
953 			modeLabel.setText(tr("MODE: Terms"));
954 		else
955 			assert(0);
956 	}
957 	else{
958 		if(currentMode==OFFICIAL)
959 			modeLabel.setText(tr("MODE: Official (no data)"));
960 		else if(currentMode==MORNINGS_AFTERNOONS)
961 			modeLabel.setText(tr("MODE: Mornings-Afternoons (no data)"));
962 		else if(currentMode==BLOCK_PLANNING)
963 			modeLabel.setText(tr("MODE: Block planning (no data)"));
964 		else if(currentMode==TERMS)
965 			modeLabel.setText(tr("MODE: Terms (no data)"));
966 		else
967 			assert(0);
968 	}
969 }
970 
971 void FetMainForm::updateMode(bool forceUpdate)
972 {
973 	if(!forceUpdate){
974 		assert(gt.rules.initialized);
975 		if(gt.rules.mode==currentMode){
976 			if(!oldDataAvailable && dataAvailable){
977 				if(gt.rules.mode==OFFICIAL){
978 					if(dataAvailable)
979 						modeLabel.setText(tr("MODE: Official"));
980 					else
981 						modeLabel.setText(tr("MODE: Official (no data)"));
982 				}
983 				else if(gt.rules.mode==MORNINGS_AFTERNOONS){
984 					if(dataAvailable)
985 						modeLabel.setText(tr("MODE: Mornings-Afternoons"));
986 					else
987 						modeLabel.setText(tr("MODE: Mornings-Afternoons (no data)"));
988 				}
989 				else if(gt.rules.mode==BLOCK_PLANNING){
990 					if(dataAvailable)
991 						modeLabel.setText(tr("MODE: Block planning"));
992 					else
993 						modeLabel.setText(tr("MODE: Block planning (no data)"));
994 				}
995 				else if(gt.rules.mode==TERMS){
996 					if(dataAvailable)
997 						modeLabel.setText(tr("MODE: Terms"));
998 					else
999 						modeLabel.setText(tr("MODE: Terms (no data)"));
1000 				}
1001 				else
1002 					assert(0);
1003 			}
1004 
1005 			return;
1006 		}
1007 	}
1008 	else{
1009 		//gt.rules have the correct mode, read in fet.cpp, so we continue
1010 	}
1011 
1012 	currentMode=gt.rules.mode;
1013 
1014 	if(gt.rules.mode==OFFICIAL){
1015 		if(dataAvailable)
1016 			modeLabel.setText(tr("MODE: Official"));
1017 		else
1018 			modeLabel.setText(tr("MODE: Official (no data)"));
1019 
1020 		modeOfficialAction->setChecked(true);
1021 		modeMorningsAfternoonsAction->setChecked(false);
1022 		modeBlockPlanningAction->setChecked(false);
1023 		modeTermsAction->setChecked(false);
1024 	}
1025 	else if(gt.rules.mode==MORNINGS_AFTERNOONS){
1026 		if(dataAvailable)
1027 			modeLabel.setText(tr("MODE: Mornings-Afternoons"));
1028 		else
1029 			modeLabel.setText(tr("MODE: Mornings-Afternoons (no data)"));
1030 
1031 		modeOfficialAction->setChecked(false);
1032 		modeMorningsAfternoonsAction->setChecked(true);
1033 		modeBlockPlanningAction->setChecked(false);
1034 		modeTermsAction->setChecked(false);
1035 	}
1036 	else if(gt.rules.mode==BLOCK_PLANNING){
1037 		if(dataAvailable)
1038 			modeLabel.setText(tr("MODE: Block planning"));
1039 		else
1040 			modeLabel.setText(tr("MODE: Block planning (no data)"));
1041 
1042 		modeOfficialAction->setChecked(false);
1043 		modeMorningsAfternoonsAction->setChecked(false);
1044 		modeBlockPlanningAction->setChecked(true);
1045 		modeTermsAction->setChecked(false);
1046 	}
1047 	else if(gt.rules.mode==TERMS){
1048 		if(dataAvailable)
1049 			modeLabel.setText(tr("MODE: Terms"));
1050 		else
1051 			modeLabel.setText(tr("MODE: Terms (no data)"));
1052 
1053 		modeOfficialAction->setChecked(false);
1054 		modeMorningsAfternoonsAction->setChecked(false);
1055 		modeBlockPlanningAction->setChecked(false);
1056 		modeTermsAction->setChecked(true);
1057 	}
1058 	else
1059 		assert(0);
1060 
1061 	if(gt.rules.mode==TERMS)
1062 		dataTermsAction->setEnabled(true);
1063 	else
1064 		dataTermsAction->setEnabled(false);
1065 
1066 	//(Yes, the enable and warning for min hours per morning with allow empty mornings are always disabled.)
1067 	if(gt.rules.mode!=MORNINGS_AFTERNOONS){
1068 		enableActivityTagMaxHoursDailyAction->setText(QCoreApplication::translate("FetMainForm_template", "Enable activity tag max hours daily", nullptr));
1069 
1070 		enableActivityTagMinHoursDailyAction->setEnabled(true);
1071 
1072 		enableMaxGapsPerRealDayAction->setEnabled(false);
1073 
1074 		enableStudentsMinHoursDailyWithAllowEmptyDaysAction->setEnabled(true);
1075 		showWarningForStudentsMinHoursDailyWithAllowEmptyDaysAction->setEnabled(true);
1076 
1077 		enableStudentsMinHoursPerMorningWithAllowEmptyMorningsAction->setEnabled(false);
1078 		showWarningForStudentsMinHoursPerMorningWithAllowEmptyMorningsAction->setEnabled(false);
1079 	}
1080 	else{
1081 		enableActivityTagMaxHoursDailyAction->setText(QCoreApplication::translate("FetMainForm_template", "Enable activity tag max hours daily / per real day", nullptr));
1082 
1083 		enableActivityTagMinHoursDailyAction->setEnabled(true);
1084 
1085 		enableMaxGapsPerRealDayAction->setEnabled(true);
1086 
1087 		enableStudentsMinHoursDailyWithAllowEmptyDaysAction->setEnabled(false);
1088 		showWarningForStudentsMinHoursDailyWithAllowEmptyDaysAction->setEnabled(false);
1089 
1090 		enableStudentsMinHoursPerMorningWithAllowEmptyMorningsAction->setEnabled(false);
1091 		showWarningForStudentsMinHoursPerMorningWithAllowEmptyMorningsAction->setEnabled(false);
1092 	}
1093 
1094 	createMenusOfActionsForConstraints();
1095 }
1096 
1097 void FetMainForm::createActionsForConstraints()
1098 {
1099 	dataTimeConstraintsActivitiesPreferredTimeSlotsAction = new QAction(this);
1100 	dataTimeConstraintsActivitiesSameStartingTimeAction = new QAction(this);
1101 	dataTimeConstraintsActivitiesOccupyMaxTimeSlotsFromSelectionAction = new QAction(this);
1102 	dataTimeConstraintsActivitiesOccupyMinTimeSlotsFromSelectionAction = new QAction(this);
1103 	dataTimeConstraintsActivitiesMaxSimultaneousInSelectedTimeSlotsAction = new QAction(this);
1104 	dataTimeConstraintsActivitiesMinSimultaneousInSelectedTimeSlotsAction = new QAction(this);
1105 	dataTimeConstraintsTeacherNotAvailableTimesAction = new QAction(this);
1106 	dataTimeConstraintsBasicCompulsoryTimeAction = new QAction(this);
1107 	dataTimeConstraintsStudentsSetNotAvailableTimesAction = new QAction(this);
1108 	dataTimeConstraintsBreakTimesAction = new QAction(this);
1109 	dataTimeConstraintsTeacherMaxDaysPerWeekAction = new QAction(this);
1110 	dataTimeConstraintsTeachersMaxHoursDailyAction = new QAction(this);
1111 	dataTimeConstraintsActivityPreferredStartingTimeAction = new QAction(this);
1112 	dataTimeConstraintsStudentsSetMaxGapsPerWeekAction = new QAction(this);
1113 	dataTimeConstraintsStudentsMaxGapsPerWeekAction = new QAction(this);
1114 	dataTimeConstraintsStudentsEarlyMaxBeginningsAtSecondHourAction = new QAction(this);
1115 	dataTimeConstraintsActivitiesNotOverlappingAction = new QAction(this);
1116 	dataTimeConstraintsActivityTagsNotOverlappingAction = new QAction(this);
1117 	dataTimeConstraintsMinDaysBetweenActivitiesAction = new QAction(this);
1118 	dataSpaceConstraintsBasicCompulsorySpaceAction = new QAction(this);
1119 	dataSpaceConstraintsRoomNotAvailableTimesAction = new QAction(this);
1120 	dataSpaceConstraintsTeacherRoomNotAvailableTimesAction = new QAction(this);
1121 	dataSpaceConstraintsActivityPreferredRoomAction = new QAction(this);
1122 	dataTimeConstraintsActivitiesSameStartingHourAction = new QAction(this);
1123 	dataSpaceConstraintsActivityPreferredRoomsAction = new QAction(this);
1124 	dataSpaceConstraintsStudentsSetHomeRoomAction = new QAction(this);
1125 	dataSpaceConstraintsStudentsSetHomeRoomsAction = new QAction(this);
1126 	dataTimeConstraintsTeachersMaxGapsPerWeekAction = new QAction(this);
1127 	dataTimeConstraintsTeacherMaxGapsPerWeekAction = new QAction(this);
1128 	dataTimeConstraintsStudentsSetEarlyMaxBeginningsAtSecondHourAction = new QAction(this);
1129 	dataTimeConstraintsTeacherMaxHoursDailyAction = new QAction(this);
1130 	dataTimeConstraintsStudentsSetMaxHoursDailyAction = new QAction(this);
1131 	dataTimeConstraintsStudentsMaxHoursDailyAction = new QAction(this);
1132 	dataTimeConstraintsStudentsMinHoursDailyAction = new QAction(this);
1133 	dataTimeConstraintsStudentsSetMinHoursDailyAction = new QAction(this);
1134 	dataTimeConstraintsStudentsSetMinGapsBetweenOrderedPairOfActivityTagsAction = new QAction(this);
1135 	dataTimeConstraintsStudentsMinGapsBetweenOrderedPairOfActivityTagsAction = new QAction(this);
1136 	dataTimeConstraintsTeacherMinGapsBetweenOrderedPairOfActivityTagsAction = new QAction(this);
1137 	dataTimeConstraintsTeachersMinGapsBetweenOrderedPairOfActivityTagsAction = new QAction(this);
1138 	dataTimeConstraintsTwoActivitiesConsecutiveAction = new QAction(this);
1139 	dataTimeConstraintsActivityEndsStudentsDayAction = new QAction(this);
1140 	dataTimeConstraintsActivityEndsTeachersDayAction = new QAction(this);
1141 	dataTimeConstraintsTeachersMinHoursDailyAction = new QAction(this);
1142 	dataTimeConstraintsTeacherMinHoursDailyAction = new QAction(this);
1143 	dataTimeConstraintsTeachersMaxGapsPerDayAction = new QAction(this);
1144 	dataTimeConstraintsTeacherMaxGapsPerDayAction = new QAction(this);
1145 	dataTimeConstraintsTeachersMaxGapsPerMorningAndAfternoonAction = new QAction(this);
1146 	dataTimeConstraintsTeacherMaxGapsPerMorningAndAfternoonAction = new QAction(this);
1147 	dataTimeConstraintsTeacherMaxSpanPerDayAction = new QAction(this);
1148 	dataTimeConstraintsTeachersMaxSpanPerDayAction = new QAction(this);
1149 	dataTimeConstraintsStudentsSetMaxSpanPerDayAction = new QAction(this);
1150 	dataTimeConstraintsStudentsMaxSpanPerDayAction = new QAction(this);
1151 	dataTimeConstraintsTeacherMinRestingHoursAction = new QAction(this);
1152 	dataTimeConstraintsTeachersMinRestingHoursAction = new QAction(this);
1153 	dataTimeConstraintsStudentsSetMinRestingHoursAction = new QAction(this);
1154 	dataTimeConstraintsStudentsMinRestingHoursAction = new QAction(this);
1155 	dataSpaceConstraintsSubjectPreferredRoomAction = new QAction(this);
1156 	dataSpaceConstraintsSubjectPreferredRoomsAction = new QAction(this);
1157 	dataSpaceConstraintsSubjectActivityTagPreferredRoomAction = new QAction(this);
1158 	dataSpaceConstraintsSubjectActivityTagPreferredRoomsAction = new QAction(this);
1159 	dataSpaceConstraintsTeacherHomeRoomAction = new QAction(this);
1160 	dataSpaceConstraintsTeacherHomeRoomsAction = new QAction(this);
1161 	dataSpaceConstraintsStudentsSetMaxBuildingChangesPerDayAction = new QAction(this);
1162 	dataSpaceConstraintsStudentsMaxBuildingChangesPerDayAction = new QAction(this);
1163 	dataSpaceConstraintsStudentsSetMaxBuildingChangesPerWeekAction = new QAction(this);
1164 	dataSpaceConstraintsStudentsMaxBuildingChangesPerWeekAction = new QAction(this);
1165 	dataSpaceConstraintsStudentsSetMinGapsBetweenBuildingChangesAction = new QAction(this);
1166 	dataSpaceConstraintsStudentsMinGapsBetweenBuildingChangesAction = new QAction(this);
1167 	dataSpaceConstraintsTeacherMaxBuildingChangesPerDayAction = new QAction(this);
1168 	dataSpaceConstraintsTeachersMaxBuildingChangesPerDayAction = new QAction(this);
1169 	dataSpaceConstraintsTeacherMaxBuildingChangesPerWeekAction = new QAction(this);
1170 	dataSpaceConstraintsTeachersMaxBuildingChangesPerWeekAction = new QAction(this);
1171 	dataSpaceConstraintsTeacherMinGapsBetweenBuildingChangesAction = new QAction(this);
1172 	dataSpaceConstraintsTeachersMinGapsBetweenBuildingChangesAction = new QAction(this);
1173 	dataSpaceConstraintsStudentsSetMaxRoomChangesPerDayAction = new QAction(this);
1174 	dataSpaceConstraintsStudentsMaxRoomChangesPerDayAction = new QAction(this);
1175 	dataSpaceConstraintsStudentsSetMaxRoomChangesPerWeekAction = new QAction(this);
1176 	dataSpaceConstraintsStudentsMaxRoomChangesPerWeekAction = new QAction(this);
1177 	dataSpaceConstraintsStudentsSetMinGapsBetweenRoomChangesAction = new QAction(this);
1178 	dataSpaceConstraintsStudentsMinGapsBetweenRoomChangesAction = new QAction(this);
1179 	dataSpaceConstraintsTeacherMaxRoomChangesPerDayAction = new QAction(this);
1180 	dataSpaceConstraintsTeachersMaxRoomChangesPerDayAction = new QAction(this);
1181 	dataSpaceConstraintsTeacherMaxRoomChangesPerWeekAction = new QAction(this);
1182 	dataSpaceConstraintsTeachersMaxRoomChangesPerWeekAction = new QAction(this);
1183 	dataSpaceConstraintsTeacherMinGapsBetweenRoomChangesAction = new QAction(this);
1184 	dataSpaceConstraintsTeachersMinGapsBetweenRoomChangesAction = new QAction(this);
1185 	dataTimeConstraintsActivitiesSameStartingDayAction = new QAction(this);
1186 	dataTimeConstraintsTwoActivitiesOrderedAction = new QAction(this);
1187 	dataTimeConstraintsTwoSetsOfActivitiesOrderedAction = new QAction(this);
1188 	dataTimeConstraintsTwoActivitiesOrderedIfSameDayAction = new QAction(this);
1189 	dataTimeConstraintsTeachersMaxHoursContinuouslyAction = new QAction(this);
1190 	dataTimeConstraintsTeacherMaxHoursContinuouslyAction = new QAction(this);
1191 	dataTimeConstraintsStudentsSetMaxHoursContinuouslyAction = new QAction(this);
1192 	dataTimeConstraintsStudentsMaxHoursContinuouslyAction = new QAction(this);
1193 	dataTimeConstraintsActivitiesPreferredStartingTimesAction = new QAction(this);
1194 	dataTimeConstraintsActivityPreferredTimeSlotsAction = new QAction(this);
1195 	dataTimeConstraintsActivityPreferredStartingTimesAction = new QAction(this);
1196 	dataTimeConstraintsMinGapsBetweenActivitiesAction = new QAction(this);
1197 	dataTimeConstraintsSubactivitiesPreferredTimeSlotsAction = new QAction(this);
1198 	dataTimeConstraintsSubactivitiesPreferredStartingTimesAction = new QAction(this);
1199 	dataTimeConstraintsTeacherIntervalMaxDaysPerWeekAction = new QAction(this);
1200 	dataTimeConstraintsTeachersIntervalMaxDaysPerWeekAction = new QAction(this);
1201 	dataTimeConstraintsStudentsSetIntervalMaxDaysPerWeekAction = new QAction(this);
1202 	dataTimeConstraintsStudentsIntervalMaxDaysPerWeekAction = new QAction(this);
1203 	dataTimeConstraintsActivitiesEndStudentsDayAction = new QAction(this);
1204 	dataTimeConstraintsActivitiesEndTeachersDayAction = new QAction(this);
1205 	dataTimeConstraintsTwoActivitiesGroupedAction = new QAction(this);
1206 	dataTimeConstraintsStudentsSetActivityTagMaxHoursContinuouslyAction = new QAction(this);
1207 	dataTimeConstraintsStudentsActivityTagMaxHoursContinuouslyAction = new QAction(this);
1208 	dataTimeConstraintsTeacherActivityTagMaxHoursContinuouslyAction = new QAction(this);
1209 	dataTimeConstraintsTeachersActivityTagMaxHoursContinuouslyAction = new QAction(this);
1210 	dataSpaceConstraintsActivityTagPreferredRoomAction = new QAction(this);
1211 	dataSpaceConstraintsActivityTagPreferredRoomsAction = new QAction(this);
1212 	dataTimeConstraintsTeachersMaxDaysPerWeekAction = new QAction(this);
1213 	dataTimeConstraintsThreeActivitiesGroupedAction = new QAction(this);
1214 	dataTimeConstraintsMaxDaysBetweenActivitiesAction = new QAction(this);
1215 	dataTimeConstraintsTeacherMinDaysPerWeekAction = new QAction(this);
1216 	dataTimeConstraintsTeachersMinDaysPerWeekAction = new QAction(this);
1217 	dataTimeConstraintsTeacherActivityTagMaxHoursDailyAction = new QAction(this);
1218 	dataTimeConstraintsTeachersActivityTagMaxHoursDailyAction = new QAction(this);
1219 	dataTimeConstraintsStudentsSetActivityTagMaxHoursDailyAction = new QAction(this);
1220 	dataTimeConstraintsStudentsActivityTagMaxHoursDailyAction = new QAction(this);
1221 	dataTimeConstraintsTeacherActivityTagMinHoursDailyAction = new QAction(this);
1222 	dataTimeConstraintsTeachersActivityTagMinHoursDailyAction = new QAction(this);
1223 	dataTimeConstraintsStudentsSetActivityTagMinHoursDailyAction = new QAction(this);
1224 	dataTimeConstraintsStudentsActivityTagMinHoursDailyAction = new QAction(this);
1225 	dataTimeConstraintsStudentsSetMaxGapsPerDayAction = new QAction(this);
1226 	dataTimeConstraintsStudentsMaxGapsPerDayAction = new QAction(this);
1227 	dataSpaceConstraintsActivitiesOccupyMaxDifferentRoomsAction = new QAction(this);
1228 	dataSpaceConstraintsActivitiesSameRoomIfConsecutiveAction = new QAction(this);
1229 	dataTimeConstraintsStudentsSetMaxDaysPerWeekAction = new QAction(this);
1230 	dataTimeConstraintsStudentsMaxDaysPerWeekAction = new QAction(this);
1231 
1232 	//mornings-afternoons
1233 	dataTimeConstraintsTeacherMaxRealDaysPerWeekAction = new QAction(this);
1234 	dataTimeConstraintsTeacherMaxMorningsPerWeekAction = new QAction(this);
1235 	dataTimeConstraintsTeacherMaxTwoConsecutiveMorningsAction = new QAction(this);
1236 	dataTimeConstraintsTeachersMaxTwoConsecutiveMorningsAction = new QAction(this);
1237 	dataTimeConstraintsTeacherMaxTwoConsecutiveAfternoonsAction = new QAction(this);
1238 	dataTimeConstraintsTeachersMaxTwoConsecutiveAfternoonsAction = new QAction(this);
1239 	dataTimeConstraintsTeacherMaxAfternoonsPerWeekAction = new QAction(this);
1240 	dataTimeConstraintsTeachersMaxHoursDailyRealDaysAction = new QAction(this);
1241 	dataTimeConstraintsTeachersAfternoonsEarlyMaxBeginningsAtSecondHourAction = new QAction(this);
1242 	dataTimeConstraintsTeacherAfternoonsEarlyMaxBeginningsAtSecondHourAction = new QAction(this);
1243 	dataTimeConstraintsStudentsAfternoonsEarlyMaxBeginningsAtSecondHourAction = new QAction(this);
1244 	dataTimeConstraintsStudentsSetAfternoonsEarlyMaxBeginningsAtSecondHourAction = new QAction(this);
1245 
1246 	dataTimeConstraintsTeachersMorningsEarlyMaxBeginningsAtSecondHourAction = new QAction(this);
1247 	dataTimeConstraintsTeacherMorningsEarlyMaxBeginningsAtSecondHourAction = new QAction(this);
1248 	dataTimeConstraintsStudentsMorningsEarlyMaxBeginningsAtSecondHourAction = new QAction(this);
1249 	dataTimeConstraintsStudentsSetMorningsEarlyMaxBeginningsAtSecondHourAction = new QAction(this);
1250 
1251 	dataTimeConstraintsTeacherMaxHoursDailyRealDaysAction = new QAction(this);
1252 	dataTimeConstraintsStudentsSetMaxHoursDailyRealDaysAction = new QAction(this);
1253 	dataTimeConstraintsStudentsMaxHoursDailyRealDaysAction = new QAction(this);
1254 	dataTimeConstraintsStudentsMinHoursPerMorningAction = new QAction(this);
1255 	dataTimeConstraintsStudentsSetMinHoursPerMorningAction = new QAction(this);
1256 	dataTimeConstraintsTeachersMinHoursPerMorningAction = new QAction(this);
1257 	dataTimeConstraintsTeachersMinHoursDailyRealDaysAction = new QAction(this);
1258 	dataTimeConstraintsTeacherMaxHoursPerAllAfternoonsAction = new QAction(this);
1259 	dataTimeConstraintsTeachersMaxHoursPerAllAfternoonsAction = new QAction(this);
1260 	dataTimeConstraintsStudentsSetMaxHoursPerAllAfternoonsAction = new QAction(this);
1261 	dataTimeConstraintsStudentsMaxHoursPerAllAfternoonsAction = new QAction(this);
1262 	dataTimeConstraintsTeacherMinHoursPerMorningAction = new QAction(this);
1263 	dataTimeConstraintsTeacherMinHoursDailyRealDaysAction = new QAction(this);
1264 	dataTimeConstraintsTeachersMaxZeroGapsPerAfternoonAction = new QAction(this);
1265 	dataTimeConstraintsTeacherMaxZeroGapsPerAfternoonAction = new QAction(this);
1266 	dataTimeConstraintsTeacherMaxSpanPerRealDayAction = new QAction(this);
1267 	dataTimeConstraintsTeachersMaxSpanPerRealDayAction = new QAction(this);
1268 	dataTimeConstraintsStudentsSetMaxSpanPerRealDayAction = new QAction(this);
1269 	dataTimeConstraintsStudentsMaxSpanPerRealDayAction = new QAction(this);
1270 	dataTimeConstraintsTeacherMinRestingHoursBetweenMorningAndAfternoonAction = new QAction(this);
1271 	dataTimeConstraintsTeachersMinRestingHoursBetweenMorningAndAfternoonAction = new QAction(this);
1272 	dataTimeConstraintsStudentsSetMinRestingHoursBetweenMorningAndAfternoonAction = new QAction(this);
1273 	dataTimeConstraintsStudentsMinRestingHoursBetweenMorningAndAfternoonAction = new QAction(this);
1274 	dataTimeConstraintsTeacherMorningIntervalMaxDaysPerWeekAction = new QAction(this);
1275 	dataTimeConstraintsTeachersMorningIntervalMaxDaysPerWeekAction = new QAction(this);
1276 	dataTimeConstraintsTeacherAfternoonIntervalMaxDaysPerWeekAction = new QAction(this);
1277 	dataTimeConstraintsTeachersAfternoonIntervalMaxDaysPerWeekAction = new QAction(this);
1278 	dataTimeConstraintsStudentsSetMorningIntervalMaxDaysPerWeekAction = new QAction(this);
1279 	dataTimeConstraintsStudentsMorningIntervalMaxDaysPerWeekAction = new QAction(this);
1280 	dataTimeConstraintsStudentsSetAfternoonIntervalMaxDaysPerWeekAction = new QAction(this);
1281 	dataTimeConstraintsStudentsAfternoonIntervalMaxDaysPerWeekAction = new QAction(this);
1282 	dataTimeConstraintsTeachersMaxRealDaysPerWeekAction = new QAction(this);
1283 	dataTimeConstraintsTeachersMaxMorningsPerWeekAction = new QAction(this);
1284 	dataTimeConstraintsTeachersMaxAfternoonsPerWeekAction = new QAction(this);
1285 	dataTimeConstraintsTeacherMinRealDaysPerWeekAction = new QAction(this);
1286 	dataTimeConstraintsTeachersMinRealDaysPerWeekAction = new QAction(this);
1287 	dataTimeConstraintsTeacherMinMorningsPerWeekAction = new QAction(this);
1288 	dataTimeConstraintsTeachersMinMorningsPerWeekAction = new QAction(this);
1289 	dataTimeConstraintsTeacherMinAfternoonsPerWeekAction = new QAction(this);
1290 	dataTimeConstraintsTeachersMinAfternoonsPerWeekAction = new QAction(this);
1291 	dataTimeConstraintsTeacherActivityTagMaxHoursDailyRealDaysAction = new QAction(this);
1292 	dataTimeConstraintsTeacherMaxTwoActivityTagsPerDayFromN1N2N3Action = new QAction(this);
1293 	dataTimeConstraintsTeachersMaxTwoActivityTagsPerDayFromN1N2N3Action = new QAction(this);
1294 	dataTimeConstraintsTeachersActivityTagMaxHoursDailyRealDaysAction = new QAction(this);
1295 	dataTimeConstraintsStudentsSetActivityTagMaxHoursDailyRealDaysAction = new QAction(this);
1296 	dataTimeConstraintsStudentsActivityTagMaxHoursDailyRealDaysAction = new QAction(this);
1297 	dataTimeConstraintsStudentsSetMaxGapsPerRealDayAction = new QAction(this);
1298 	dataTimeConstraintsStudentsMaxGapsPerRealDayAction = new QAction(this);
1299 	dataTimeConstraintsStudentsSetMaxRealDaysPerWeekAction = new QAction(this);
1300 	dataTimeConstraintsStudentsMaxRealDaysPerWeekAction = new QAction(this);
1301 	dataTimeConstraintsStudentsSetMaxMorningsPerWeekAction = new QAction(this);
1302 	dataTimeConstraintsStudentsMaxMorningsPerWeekAction = new QAction(this);
1303 	dataTimeConstraintsStudentsSetMaxAfternoonsPerWeekAction = new QAction(this);
1304 	dataTimeConstraintsStudentsMaxAfternoonsPerWeekAction = new QAction(this);
1305 	dataTimeConstraintsStudentsSetMinMorningsPerWeekAction = new QAction(this);
1306 	dataTimeConstraintsStudentsMinMorningsPerWeekAction = new QAction(this);
1307 	dataTimeConstraintsStudentsSetMinAfternoonsPerWeekAction = new QAction(this);
1308 	dataTimeConstraintsStudentsMinAfternoonsPerWeekAction = new QAction(this);
1309 	dataTimeConstraintsTeacherMaxGapsPerRealDayAction = new QAction(this);
1310 	dataTimeConstraintsTeachersMaxGapsPerRealDayAction = new QAction(this);
1311 	dataTimeConstraintsStudentsSetMaxGapsPerWeekForRealDaysAction = new QAction(this);
1312 	dataTimeConstraintsStudentsMaxGapsPerWeekForRealDaysAction = new QAction(this);
1313 	dataTimeConstraintsTeacherMaxGapsPerWeekForRealDaysAction = new QAction(this);
1314 	dataTimeConstraintsTeachersMaxGapsPerWeekForRealDaysAction = new QAction(this);
1315 	dataSpaceConstraintsStudentsSetMaxRoomChangesPerRealDayAction = new QAction(this);
1316 	dataSpaceConstraintsStudentsMaxRoomChangesPerRealDayAction = new QAction(this);
1317 	dataSpaceConstraintsTeacherMaxRoomChangesPerRealDayAction = new QAction(this);
1318 	dataSpaceConstraintsTeachersMaxRoomChangesPerRealDayAction = new QAction(this);
1319 
1320 	dataTimeConstraintsTeacherMaxThreeConsecutiveDaysAction = new QAction(this);
1321 	dataTimeConstraintsTeachersMaxThreeConsecutiveDaysAction = new QAction(this);
1322 
1323 	//block-planning
1324 	dataTimeConstraintsMaxGapsBetweenActivitiesAction = new QAction(this);
1325 	dataTimeConstraintsMaxTotalActivitiesFromSetInSelectedTimeSlotsAction = new QAction(this);
1326 
1327 	//terms
1328 	dataTimeConstraintsActivitiesMaxInATermAction = new QAction(this);
1329 	dataTimeConstraintsActivitiesOccupyMaxTermsAction = new QAction(this);
1330 
1331 	connect(dataTimeConstraintsActivitiesPreferredTimeSlotsAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsActivitiesPreferredTimeSlotsAction_triggered()));
1332 	connect(dataTimeConstraintsActivitiesSameStartingTimeAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsActivitiesSameStartingTimeAction_triggered()));
1333 	connect(dataTimeConstraintsActivitiesOccupyMaxTimeSlotsFromSelectionAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsActivitiesOccupyMaxTimeSlotsFromSelectionAction_triggered()));
1334 	connect(dataTimeConstraintsActivitiesOccupyMinTimeSlotsFromSelectionAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsActivitiesOccupyMinTimeSlotsFromSelectionAction_triggered()));
1335 	connect(dataTimeConstraintsActivitiesMaxSimultaneousInSelectedTimeSlotsAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsActivitiesMaxSimultaneousInSelectedTimeSlotsAction_triggered()));
1336 	connect(dataTimeConstraintsActivitiesMinSimultaneousInSelectedTimeSlotsAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsActivitiesMinSimultaneousInSelectedTimeSlotsAction_triggered()));
1337 	connect(dataTimeConstraintsTeacherNotAvailableTimesAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherNotAvailableTimesAction_triggered()));
1338 	connect(dataTimeConstraintsBasicCompulsoryTimeAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsBasicCompulsoryTimeAction_triggered()));
1339 	connect(dataTimeConstraintsStudentsSetNotAvailableTimesAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetNotAvailableTimesAction_triggered()));
1340 	connect(dataTimeConstraintsBreakTimesAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsBreakTimesAction_triggered()));
1341 	connect(dataTimeConstraintsTeacherMaxDaysPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMaxDaysPerWeekAction_triggered()));
1342 	connect(dataTimeConstraintsTeachersMaxHoursDailyAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMaxHoursDailyAction_triggered()));
1343 	connect(dataTimeConstraintsActivityPreferredStartingTimeAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsActivityPreferredStartingTimeAction_triggered()));
1344 	connect(dataTimeConstraintsStudentsSetMaxGapsPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetMaxGapsPerWeekAction_triggered()));
1345 	connect(dataTimeConstraintsStudentsMaxGapsPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsMaxGapsPerWeekAction_triggered()));
1346 	connect(dataTimeConstraintsStudentsEarlyMaxBeginningsAtSecondHourAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsEarlyMaxBeginningsAtSecondHourAction_triggered()));
1347 	connect(dataTimeConstraintsActivitiesNotOverlappingAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsActivitiesNotOverlappingAction_triggered()));
1348 	connect(dataTimeConstraintsActivityTagsNotOverlappingAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsActivityTagsNotOverlappingAction_triggered()));
1349 	connect(dataTimeConstraintsMinDaysBetweenActivitiesAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsMinDaysBetweenActivitiesAction_triggered()));
1350 	connect(dataSpaceConstraintsBasicCompulsorySpaceAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsBasicCompulsorySpaceAction_triggered()));
1351 	connect(dataSpaceConstraintsRoomNotAvailableTimesAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsRoomNotAvailableTimesAction_triggered()));
1352 	connect(dataSpaceConstraintsTeacherRoomNotAvailableTimesAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsTeacherRoomNotAvailableTimesAction_triggered()));
1353 	connect(dataSpaceConstraintsActivityPreferredRoomAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsActivityPreferredRoomAction_triggered()));
1354 	connect(dataTimeConstraintsActivitiesSameStartingHourAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsActivitiesSameStartingHourAction_triggered()));
1355 	connect(dataSpaceConstraintsActivityPreferredRoomsAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsActivityPreferredRoomsAction_triggered()));
1356 	connect(dataSpaceConstraintsStudentsSetHomeRoomAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsStudentsSetHomeRoomAction_triggered()));
1357 	connect(dataSpaceConstraintsStudentsSetHomeRoomsAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsStudentsSetHomeRoomsAction_triggered()));
1358 	connect(dataTimeConstraintsTeachersMaxGapsPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMaxGapsPerWeekAction_triggered()));
1359 	connect(dataTimeConstraintsTeacherMaxGapsPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMaxGapsPerWeekAction_triggered()));
1360 	connect(dataTimeConstraintsStudentsSetEarlyMaxBeginningsAtSecondHourAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetEarlyMaxBeginningsAtSecondHourAction_triggered()));
1361 	connect(dataTimeConstraintsTeacherMaxHoursDailyAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMaxHoursDailyAction_triggered()));
1362 	connect(dataTimeConstraintsStudentsSetMaxHoursDailyAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetMaxHoursDailyAction_triggered()));
1363 	connect(dataTimeConstraintsStudentsMaxHoursDailyAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsMaxHoursDailyAction_triggered()));
1364 	connect(dataTimeConstraintsStudentsMinHoursDailyAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsMinHoursDailyAction_triggered()));
1365 	connect(dataTimeConstraintsStudentsSetMinHoursDailyAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetMinHoursDailyAction_triggered()));
1366 	connect(dataTimeConstraintsStudentsSetMinGapsBetweenOrderedPairOfActivityTagsAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetMinGapsBetweenOrderedPairOfActivityTagsAction_triggered()));
1367 	connect(dataTimeConstraintsStudentsMinGapsBetweenOrderedPairOfActivityTagsAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsMinGapsBetweenOrderedPairOfActivityTagsAction_triggered()));
1368 	connect(dataTimeConstraintsTeacherMinGapsBetweenOrderedPairOfActivityTagsAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMinGapsBetweenOrderedPairOfActivityTagsAction_triggered()));
1369 	connect(dataTimeConstraintsTeachersMinGapsBetweenOrderedPairOfActivityTagsAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMinGapsBetweenOrderedPairOfActivityTagsAction_triggered()));
1370 	connect(dataTimeConstraintsTwoActivitiesConsecutiveAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTwoActivitiesConsecutiveAction_triggered()));
1371 	connect(dataTimeConstraintsActivityEndsStudentsDayAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsActivityEndsStudentsDayAction_triggered()));
1372 	connect(dataTimeConstraintsActivityEndsTeachersDayAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsActivityEndsTeachersDayAction_triggered()));
1373 	connect(dataTimeConstraintsTeachersMinHoursDailyAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMinHoursDailyAction_triggered()));
1374 	connect(dataTimeConstraintsTeacherMinHoursDailyAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMinHoursDailyAction_triggered()));
1375 	connect(dataTimeConstraintsTeachersMaxGapsPerDayAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMaxGapsPerDayAction_triggered()));
1376 	connect(dataTimeConstraintsTeacherMaxGapsPerDayAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMaxGapsPerDayAction_triggered()));
1377 	connect(dataTimeConstraintsTeachersMaxGapsPerMorningAndAfternoonAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMaxGapsPerMorningAndAfternoonAction_triggered()));
1378 	connect(dataTimeConstraintsTeacherMaxGapsPerMorningAndAfternoonAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMaxGapsPerMorningAndAfternoonAction_triggered()));
1379 	connect(dataTimeConstraintsTeacherMaxSpanPerDayAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMaxSpanPerDayAction_triggered()));
1380 	connect(dataTimeConstraintsTeachersMaxSpanPerDayAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMaxSpanPerDayAction_triggered()));
1381 	connect(dataTimeConstraintsStudentsSetMaxSpanPerDayAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetMaxSpanPerDayAction_triggered()));
1382 	connect(dataTimeConstraintsStudentsMaxSpanPerDayAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsMaxSpanPerDayAction_triggered()));
1383 	connect(dataTimeConstraintsTeacherMinRestingHoursAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMinRestingHoursAction_triggered()));
1384 	connect(dataTimeConstraintsTeachersMinRestingHoursAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMinRestingHoursAction_triggered()));
1385 	connect(dataTimeConstraintsStudentsSetMinRestingHoursAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetMinRestingHoursAction_triggered()));
1386 	connect(dataTimeConstraintsStudentsMinRestingHoursAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsMinRestingHoursAction_triggered()));
1387 	connect(dataSpaceConstraintsSubjectPreferredRoomAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsSubjectPreferredRoomAction_triggered()));
1388 	connect(dataSpaceConstraintsSubjectPreferredRoomsAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsSubjectPreferredRoomsAction_triggered()));
1389 	connect(dataSpaceConstraintsSubjectActivityTagPreferredRoomAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsSubjectActivityTagPreferredRoomAction_triggered()));
1390 	connect(dataSpaceConstraintsSubjectActivityTagPreferredRoomsAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsSubjectActivityTagPreferredRoomsAction_triggered()));
1391 	connect(dataSpaceConstraintsTeacherHomeRoomAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsTeacherHomeRoomAction_triggered()));
1392 	connect(dataSpaceConstraintsTeacherHomeRoomsAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsTeacherHomeRoomsAction_triggered()));
1393 	connect(dataSpaceConstraintsStudentsSetMaxBuildingChangesPerDayAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsStudentsSetMaxBuildingChangesPerDayAction_triggered()));
1394 	connect(dataSpaceConstraintsStudentsMaxBuildingChangesPerDayAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsStudentsMaxBuildingChangesPerDayAction_triggered()));
1395 	connect(dataSpaceConstraintsStudentsSetMaxBuildingChangesPerWeekAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsStudentsSetMaxBuildingChangesPerWeekAction_triggered()));
1396 	connect(dataSpaceConstraintsStudentsMaxBuildingChangesPerWeekAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsStudentsMaxBuildingChangesPerWeekAction_triggered()));
1397 	connect(dataSpaceConstraintsStudentsSetMinGapsBetweenBuildingChangesAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsStudentsSetMinGapsBetweenBuildingChangesAction_triggered()));
1398 	connect(dataSpaceConstraintsStudentsMinGapsBetweenBuildingChangesAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsStudentsMinGapsBetweenBuildingChangesAction_triggered()));
1399 	connect(dataSpaceConstraintsTeacherMaxBuildingChangesPerDayAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsTeacherMaxBuildingChangesPerDayAction_triggered()));
1400 	connect(dataSpaceConstraintsTeachersMaxBuildingChangesPerDayAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsTeachersMaxBuildingChangesPerDayAction_triggered()));
1401 	connect(dataSpaceConstraintsTeacherMaxBuildingChangesPerWeekAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsTeacherMaxBuildingChangesPerWeekAction_triggered()));
1402 	connect(dataSpaceConstraintsTeachersMaxBuildingChangesPerWeekAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsTeachersMaxBuildingChangesPerWeekAction_triggered()));
1403 	connect(dataSpaceConstraintsTeacherMinGapsBetweenBuildingChangesAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsTeacherMinGapsBetweenBuildingChangesAction_triggered()));
1404 	connect(dataSpaceConstraintsTeachersMinGapsBetweenBuildingChangesAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsTeachersMinGapsBetweenBuildingChangesAction_triggered()));
1405 	connect(dataSpaceConstraintsStudentsSetMaxRoomChangesPerDayAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsStudentsSetMaxRoomChangesPerDayAction_triggered()));
1406 	connect(dataSpaceConstraintsStudentsMaxRoomChangesPerDayAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsStudentsMaxRoomChangesPerDayAction_triggered()));
1407 	connect(dataSpaceConstraintsStudentsSetMaxRoomChangesPerWeekAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsStudentsSetMaxRoomChangesPerWeekAction_triggered()));
1408 	connect(dataSpaceConstraintsStudentsMaxRoomChangesPerWeekAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsStudentsMaxRoomChangesPerWeekAction_triggered()));
1409 	connect(dataSpaceConstraintsStudentsSetMinGapsBetweenRoomChangesAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsStudentsSetMinGapsBetweenRoomChangesAction_triggered()));
1410 	connect(dataSpaceConstraintsStudentsMinGapsBetweenRoomChangesAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsStudentsMinGapsBetweenRoomChangesAction_triggered()));
1411 	connect(dataSpaceConstraintsTeacherMaxRoomChangesPerDayAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsTeacherMaxRoomChangesPerDayAction_triggered()));
1412 	connect(dataSpaceConstraintsTeachersMaxRoomChangesPerDayAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsTeachersMaxRoomChangesPerDayAction_triggered()));
1413 	connect(dataSpaceConstraintsTeacherMaxRoomChangesPerWeekAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsTeacherMaxRoomChangesPerWeekAction_triggered()));
1414 	connect(dataSpaceConstraintsTeachersMaxRoomChangesPerWeekAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsTeachersMaxRoomChangesPerWeekAction_triggered()));
1415 	connect(dataSpaceConstraintsTeacherMinGapsBetweenRoomChangesAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsTeacherMinGapsBetweenRoomChangesAction_triggered()));
1416 	connect(dataSpaceConstraintsTeachersMinGapsBetweenRoomChangesAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsTeachersMinGapsBetweenRoomChangesAction_triggered()));
1417 	connect(dataTimeConstraintsActivitiesSameStartingDayAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsActivitiesSameStartingDayAction_triggered()));
1418 	connect(dataTimeConstraintsTwoActivitiesOrderedAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTwoActivitiesOrderedAction_triggered()));
1419 	connect(dataTimeConstraintsTwoSetsOfActivitiesOrderedAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTwoSetsOfActivitiesOrderedAction_triggered()));
1420 	connect(dataTimeConstraintsTwoActivitiesOrderedIfSameDayAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTwoActivitiesOrderedIfSameDayAction_triggered()));
1421 	connect(dataTimeConstraintsTeachersMaxHoursContinuouslyAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMaxHoursContinuouslyAction_triggered()));
1422 	connect(dataTimeConstraintsTeacherMaxHoursContinuouslyAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMaxHoursContinuouslyAction_triggered()));
1423 	connect(dataTimeConstraintsStudentsSetMaxHoursContinuouslyAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetMaxHoursContinuouslyAction_triggered()));
1424 	connect(dataTimeConstraintsStudentsMaxHoursContinuouslyAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsMaxHoursContinuouslyAction_triggered()));
1425 	connect(dataTimeConstraintsActivitiesPreferredStartingTimesAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsActivitiesPreferredStartingTimesAction_triggered()));
1426 	connect(dataTimeConstraintsActivityPreferredTimeSlotsAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsActivityPreferredTimeSlotsAction_triggered()));
1427 	connect(dataTimeConstraintsActivityPreferredStartingTimesAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsActivityPreferredStartingTimesAction_triggered()));
1428 	connect(dataTimeConstraintsMinGapsBetweenActivitiesAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsMinGapsBetweenActivitiesAction_triggered()));
1429 	connect(dataTimeConstraintsSubactivitiesPreferredTimeSlotsAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsSubactivitiesPreferredTimeSlotsAction_triggered()));
1430 	connect(dataTimeConstraintsSubactivitiesPreferredStartingTimesAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsSubactivitiesPreferredStartingTimesAction_triggered()));
1431 	connect(dataTimeConstraintsTeacherIntervalMaxDaysPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherIntervalMaxDaysPerWeekAction_triggered()));
1432 	connect(dataTimeConstraintsTeachersIntervalMaxDaysPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersIntervalMaxDaysPerWeekAction_triggered()));
1433 	connect(dataTimeConstraintsStudentsSetIntervalMaxDaysPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetIntervalMaxDaysPerWeekAction_triggered()));
1434 	connect(dataTimeConstraintsStudentsIntervalMaxDaysPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsIntervalMaxDaysPerWeekAction_triggered()));
1435 	connect(dataTimeConstraintsActivitiesEndStudentsDayAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsActivitiesEndStudentsDayAction_triggered()));
1436 	connect(dataTimeConstraintsActivitiesEndTeachersDayAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsActivitiesEndTeachersDayAction_triggered()));
1437 	connect(dataTimeConstraintsTwoActivitiesGroupedAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTwoActivitiesGroupedAction_triggered()));
1438 	connect(dataTimeConstraintsStudentsSetActivityTagMaxHoursContinuouslyAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetActivityTagMaxHoursContinuouslyAction_triggered()));
1439 	connect(dataTimeConstraintsStudentsActivityTagMaxHoursContinuouslyAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsActivityTagMaxHoursContinuouslyAction_triggered()));
1440 	connect(dataTimeConstraintsTeacherActivityTagMaxHoursContinuouslyAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherActivityTagMaxHoursContinuouslyAction_triggered()));
1441 	connect(dataTimeConstraintsTeachersActivityTagMaxHoursContinuouslyAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersActivityTagMaxHoursContinuouslyAction_triggered()));
1442 	connect(dataSpaceConstraintsActivityTagPreferredRoomAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsActivityTagPreferredRoomAction_triggered()));
1443 	connect(dataSpaceConstraintsActivityTagPreferredRoomsAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsActivityTagPreferredRoomsAction_triggered()));
1444 	connect(dataTimeConstraintsTeachersMaxDaysPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMaxDaysPerWeekAction_triggered()));
1445 	connect(dataTimeConstraintsThreeActivitiesGroupedAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsThreeActivitiesGroupedAction_triggered()));
1446 	connect(dataTimeConstraintsMaxDaysBetweenActivitiesAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsMaxDaysBetweenActivitiesAction_triggered()));
1447 	connect(dataTimeConstraintsTeacherMinDaysPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMinDaysPerWeekAction_triggered()));
1448 	connect(dataTimeConstraintsTeachersMinDaysPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMinDaysPerWeekAction_triggered()));
1449 	connect(dataTimeConstraintsTeacherActivityTagMaxHoursDailyAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherActivityTagMaxHoursDailyAction_triggered()));
1450 	connect(dataTimeConstraintsTeachersActivityTagMaxHoursDailyAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersActivityTagMaxHoursDailyAction_triggered()));
1451 	connect(dataTimeConstraintsStudentsSetActivityTagMaxHoursDailyAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetActivityTagMaxHoursDailyAction_triggered()));
1452 	connect(dataTimeConstraintsStudentsActivityTagMaxHoursDailyAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsActivityTagMaxHoursDailyAction_triggered()));
1453 	connect(dataTimeConstraintsTeacherActivityTagMinHoursDailyAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherActivityTagMinHoursDailyAction_triggered()));
1454 	connect(dataTimeConstraintsTeachersActivityTagMinHoursDailyAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersActivityTagMinHoursDailyAction_triggered()));
1455 	connect(dataTimeConstraintsStudentsSetActivityTagMinHoursDailyAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetActivityTagMinHoursDailyAction_triggered()));
1456 	connect(dataTimeConstraintsStudentsActivityTagMinHoursDailyAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsActivityTagMinHoursDailyAction_triggered()));
1457 	connect(dataTimeConstraintsStudentsSetMaxGapsPerDayAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetMaxGapsPerDayAction_triggered()));
1458 	connect(dataTimeConstraintsStudentsMaxGapsPerDayAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsMaxGapsPerDayAction_triggered()));
1459 	connect(dataSpaceConstraintsActivitiesOccupyMaxDifferentRoomsAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsActivitiesOccupyMaxDifferentRoomsAction_triggered()));
1460 	connect(dataSpaceConstraintsActivitiesSameRoomIfConsecutiveAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsActivitiesSameRoomIfConsecutiveAction_triggered()));
1461 	connect(dataTimeConstraintsStudentsSetMaxDaysPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetMaxDaysPerWeekAction_triggered()));
1462 	connect(dataTimeConstraintsStudentsMaxDaysPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsMaxDaysPerWeekAction_triggered()));
1463 
1464 	//mornings-afternoons
1465 	connect(dataTimeConstraintsTeacherMaxRealDaysPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMaxRealDaysPerWeekAction_triggered()));
1466 	connect(dataTimeConstraintsTeacherMaxMorningsPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMaxMorningsPerWeekAction_triggered()));
1467 	connect(dataTimeConstraintsTeacherMaxTwoConsecutiveMorningsAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMaxTwoConsecutiveMorningsAction_triggered()));
1468 	connect(dataTimeConstraintsTeachersMaxTwoConsecutiveMorningsAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMaxTwoConsecutiveMorningsAction_triggered()));
1469 	connect(dataTimeConstraintsTeacherMaxTwoConsecutiveAfternoonsAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMaxTwoConsecutiveAfternoonsAction_triggered()));
1470 	connect(dataTimeConstraintsTeachersMaxTwoConsecutiveAfternoonsAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMaxTwoConsecutiveAfternoonsAction_triggered()));
1471 	connect(dataTimeConstraintsTeacherMaxAfternoonsPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMaxAfternoonsPerWeekAction_triggered()));
1472 	connect(dataTimeConstraintsTeachersMaxHoursDailyRealDaysAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMaxHoursDailyRealDaysAction_triggered()));
1473 	connect(dataTimeConstraintsTeachersAfternoonsEarlyMaxBeginningsAtSecondHourAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersAfternoonsEarlyMaxBeginningsAtSecondHourAction_triggered()));
1474 	connect(dataTimeConstraintsTeacherAfternoonsEarlyMaxBeginningsAtSecondHourAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherAfternoonsEarlyMaxBeginningsAtSecondHourAction_triggered()));
1475 	connect(dataTimeConstraintsStudentsAfternoonsEarlyMaxBeginningsAtSecondHourAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsAfternoonsEarlyMaxBeginningsAtSecondHourAction_triggered()));
1476 	connect(dataTimeConstraintsStudentsSetAfternoonsEarlyMaxBeginningsAtSecondHourAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetAfternoonsEarlyMaxBeginningsAtSecondHourAction_triggered()));
1477 
1478 	connect(dataTimeConstraintsTeachersMorningsEarlyMaxBeginningsAtSecondHourAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMorningsEarlyMaxBeginningsAtSecondHourAction_triggered()));
1479 	connect(dataTimeConstraintsTeacherMorningsEarlyMaxBeginningsAtSecondHourAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMorningsEarlyMaxBeginningsAtSecondHourAction_triggered()));
1480 	connect(dataTimeConstraintsStudentsMorningsEarlyMaxBeginningsAtSecondHourAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsMorningsEarlyMaxBeginningsAtSecondHourAction_triggered()));
1481 	connect(dataTimeConstraintsStudentsSetMorningsEarlyMaxBeginningsAtSecondHourAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetMorningsEarlyMaxBeginningsAtSecondHourAction_triggered()));
1482 
1483 	connect(dataTimeConstraintsTeacherMaxHoursDailyRealDaysAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMaxHoursDailyRealDaysAction_triggered()));
1484 	connect(dataTimeConstraintsStudentsSetMaxHoursDailyRealDaysAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetMaxHoursDailyRealDaysAction_triggered()));
1485 	connect(dataTimeConstraintsStudentsMaxHoursDailyRealDaysAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsMaxHoursDailyRealDaysAction_triggered()));
1486 	connect(dataTimeConstraintsStudentsMinHoursPerMorningAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsMinHoursPerMorningAction_triggered()));
1487 	connect(dataTimeConstraintsStudentsSetMinHoursPerMorningAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetMinHoursPerMorningAction_triggered()));
1488 	connect(dataTimeConstraintsTeachersMinHoursPerMorningAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMinHoursPerMorningAction_triggered()));
1489 	connect(dataTimeConstraintsTeachersMinHoursDailyRealDaysAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMinHoursDailyRealDaysAction_triggered()));
1490 	connect(dataTimeConstraintsTeacherMaxHoursPerAllAfternoonsAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMaxHoursPerAllAfternoonsAction_triggered()));
1491 	connect(dataTimeConstraintsTeachersMaxHoursPerAllAfternoonsAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMaxHoursPerAllAfternoonsAction_triggered()));
1492 	connect(dataTimeConstraintsStudentsSetMaxHoursPerAllAfternoonsAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetMaxHoursPerAllAfternoonsAction_triggered()));
1493 	connect(dataTimeConstraintsStudentsMaxHoursPerAllAfternoonsAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsMaxHoursPerAllAfternoonsAction_triggered()));
1494 	connect(dataTimeConstraintsTeacherMinHoursPerMorningAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMinHoursPerMorningAction_triggered()));
1495 	connect(dataTimeConstraintsTeacherMinHoursDailyRealDaysAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMinHoursDailyRealDaysAction_triggered()));
1496 	connect(dataTimeConstraintsTeachersMaxZeroGapsPerAfternoonAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMaxZeroGapsPerAfternoonAction_triggered()));
1497 	connect(dataTimeConstraintsTeacherMaxZeroGapsPerAfternoonAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMaxZeroGapsPerAfternoonAction_triggered()));
1498 	connect(dataTimeConstraintsTeacherMaxSpanPerRealDayAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMaxSpanPerRealDayAction_triggered()));
1499 	connect(dataTimeConstraintsTeachersMaxSpanPerRealDayAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMaxSpanPerRealDayAction_triggered()));
1500 	connect(dataTimeConstraintsStudentsSetMaxSpanPerRealDayAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetMaxSpanPerRealDayAction_triggered()));
1501 	connect(dataTimeConstraintsStudentsMaxSpanPerRealDayAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsMaxSpanPerRealDayAction_triggered()));
1502 	connect(dataTimeConstraintsTeacherMinRestingHoursBetweenMorningAndAfternoonAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMinRestingHoursBetweenMorningAndAfternoonAction_triggered()));
1503 	connect(dataTimeConstraintsTeachersMinRestingHoursBetweenMorningAndAfternoonAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMinRestingHoursBetweenMorningAndAfternoonAction_triggered()));
1504 	connect(dataTimeConstraintsStudentsSetMinRestingHoursBetweenMorningAndAfternoonAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetMinRestingHoursBetweenMorningAndAfternoonAction_triggered()));
1505 	connect(dataTimeConstraintsStudentsMinRestingHoursBetweenMorningAndAfternoonAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsMinRestingHoursBetweenMorningAndAfternoonAction_triggered()));
1506 	connect(dataTimeConstraintsTeacherMorningIntervalMaxDaysPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMorningIntervalMaxDaysPerWeekAction_triggered()));
1507 	connect(dataTimeConstraintsTeachersMorningIntervalMaxDaysPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMorningIntervalMaxDaysPerWeekAction_triggered()));
1508 	connect(dataTimeConstraintsTeacherAfternoonIntervalMaxDaysPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherAfternoonIntervalMaxDaysPerWeekAction_triggered()));
1509 	connect(dataTimeConstraintsTeachersAfternoonIntervalMaxDaysPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersAfternoonIntervalMaxDaysPerWeekAction_triggered()));
1510 	connect(dataTimeConstraintsStudentsSetMorningIntervalMaxDaysPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetMorningIntervalMaxDaysPerWeekAction_triggered()));
1511 	connect(dataTimeConstraintsStudentsMorningIntervalMaxDaysPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsMorningIntervalMaxDaysPerWeekAction_triggered()));
1512 	connect(dataTimeConstraintsStudentsSetAfternoonIntervalMaxDaysPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetAfternoonIntervalMaxDaysPerWeekAction_triggered()));
1513 	connect(dataTimeConstraintsStudentsAfternoonIntervalMaxDaysPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsAfternoonIntervalMaxDaysPerWeekAction_triggered()));
1514 	connect(dataTimeConstraintsTeachersMaxRealDaysPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMaxRealDaysPerWeekAction_triggered()));
1515 	connect(dataTimeConstraintsTeachersMaxMorningsPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMaxMorningsPerWeekAction_triggered()));
1516 	connect(dataTimeConstraintsTeachersMaxAfternoonsPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMaxAfternoonsPerWeekAction_triggered()));
1517 	connect(dataTimeConstraintsTeacherMinRealDaysPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMinRealDaysPerWeekAction_triggered()));
1518 	connect(dataTimeConstraintsTeachersMinRealDaysPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMinRealDaysPerWeekAction_triggered()));
1519 	connect(dataTimeConstraintsTeacherMinMorningsPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMinMorningsPerWeekAction_triggered()));
1520 	connect(dataTimeConstraintsTeachersMinMorningsPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMinMorningsPerWeekAction_triggered()));
1521 	connect(dataTimeConstraintsTeacherMinAfternoonsPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMinAfternoonsPerWeekAction_triggered()));
1522 	connect(dataTimeConstraintsTeachersMinAfternoonsPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMinAfternoonsPerWeekAction_triggered()));
1523 	connect(dataTimeConstraintsTeacherActivityTagMaxHoursDailyRealDaysAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherActivityTagMaxHoursDailyRealDaysAction_triggered()));
1524 	connect(dataTimeConstraintsTeacherMaxTwoActivityTagsPerDayFromN1N2N3Action, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMaxTwoActivityTagsPerDayFromN1N2N3Action_triggered()));
1525 	connect(dataTimeConstraintsTeachersMaxTwoActivityTagsPerDayFromN1N2N3Action, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMaxTwoActivityTagsPerDayFromN1N2N3Action_triggered()));
1526 	connect(dataTimeConstraintsTeachersActivityTagMaxHoursDailyRealDaysAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersActivityTagMaxHoursDailyRealDaysAction_triggered()));
1527 	connect(dataTimeConstraintsStudentsSetActivityTagMaxHoursDailyRealDaysAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetActivityTagMaxHoursDailyRealDaysAction_triggered()));
1528 	connect(dataTimeConstraintsStudentsActivityTagMaxHoursDailyRealDaysAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsActivityTagMaxHoursDailyRealDaysAction_triggered()));
1529 	connect(dataTimeConstraintsStudentsSetMaxGapsPerRealDayAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetMaxGapsPerRealDayAction_triggered()));
1530 	connect(dataTimeConstraintsStudentsMaxGapsPerRealDayAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsMaxGapsPerRealDayAction_triggered()));
1531 	connect(dataTimeConstraintsStudentsSetMaxRealDaysPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetMaxRealDaysPerWeekAction_triggered()));
1532 	connect(dataTimeConstraintsStudentsMaxRealDaysPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsMaxRealDaysPerWeekAction_triggered()));
1533 	connect(dataTimeConstraintsStudentsSetMaxMorningsPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetMaxMorningsPerWeekAction_triggered()));
1534 	connect(dataTimeConstraintsStudentsMaxMorningsPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsMaxMorningsPerWeekAction_triggered()));
1535 	connect(dataTimeConstraintsStudentsSetMaxAfternoonsPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetMaxAfternoonsPerWeekAction_triggered()));
1536 	connect(dataTimeConstraintsStudentsMaxAfternoonsPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsMaxAfternoonsPerWeekAction_triggered()));
1537 	connect(dataTimeConstraintsStudentsSetMinMorningsPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetMinMorningsPerWeekAction_triggered()));
1538 	connect(dataTimeConstraintsStudentsMinMorningsPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsMinMorningsPerWeekAction_triggered()));
1539 	connect(dataTimeConstraintsStudentsSetMinAfternoonsPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetMinAfternoonsPerWeekAction_triggered()));
1540 	connect(dataTimeConstraintsStudentsMinAfternoonsPerWeekAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsMinAfternoonsPerWeekAction_triggered()));
1541 	connect(dataTimeConstraintsTeacherMaxGapsPerRealDayAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMaxGapsPerRealDayAction_triggered()));
1542 	connect(dataTimeConstraintsTeachersMaxGapsPerRealDayAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMaxGapsPerRealDayAction_triggered()));
1543 	connect(dataTimeConstraintsStudentsSetMaxGapsPerWeekForRealDaysAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsSetMaxGapsPerWeekForRealDaysAction_triggered()));
1544 	connect(dataTimeConstraintsStudentsMaxGapsPerWeekForRealDaysAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsStudentsMaxGapsPerWeekForRealDaysAction_triggered()));
1545 	connect(dataTimeConstraintsTeacherMaxGapsPerWeekForRealDaysAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMaxGapsPerWeekForRealDaysAction_triggered()));
1546 	connect(dataTimeConstraintsTeachersMaxGapsPerWeekForRealDaysAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMaxGapsPerWeekForRealDaysAction_triggered()));
1547 	connect(dataSpaceConstraintsStudentsSetMaxRoomChangesPerRealDayAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsStudentsSetMaxRoomChangesPerRealDayAction_triggered()));
1548 	connect(dataSpaceConstraintsStudentsMaxRoomChangesPerRealDayAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsStudentsMaxRoomChangesPerRealDayAction_triggered()));
1549 	connect(dataSpaceConstraintsTeacherMaxRoomChangesPerRealDayAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsTeacherMaxRoomChangesPerRealDayAction_triggered()));
1550 	connect(dataSpaceConstraintsTeachersMaxRoomChangesPerRealDayAction, SIGNAL(triggered()), this, SLOT(dataSpaceConstraintsTeachersMaxRoomChangesPerRealDayAction_triggered()));
1551 
1552 	connect(dataTimeConstraintsTeacherMaxThreeConsecutiveDaysAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeacherMaxThreeConsecutiveDaysAction_triggered()));
1553 	connect(dataTimeConstraintsTeachersMaxThreeConsecutiveDaysAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsTeachersMaxThreeConsecutiveDaysAction_triggered()));
1554 
1555 	//block-planning
1556 	connect(dataTimeConstraintsMaxGapsBetweenActivitiesAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsMaxGapsBetweenActivitiesAction_triggered()));
1557 	connect(dataTimeConstraintsMaxTotalActivitiesFromSetInSelectedTimeSlotsAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsMaxTotalActivitiesFromSetInSelectedTimeSlotsAction_triggered()));
1558 
1559 	//terms
1560 	connect(dataTimeConstraintsActivitiesMaxInATermAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsActivitiesMaxInATermAction_triggered()));
1561 	connect(dataTimeConstraintsActivitiesOccupyMaxTermsAction, SIGNAL(triggered()), this, SLOT(dataTimeConstraintsActivitiesOccupyMaxTermsAction_triggered()));
1562 
1563 	retranslateConstraints();
1564 }
1565 
1566 void FetMainForm::retranslateConstraints()
1567 {
1568 	if(menuA_teacher_1_time_constraints!=nullptr)
1569 		menuA_teacher_1_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "A teacher (1)", nullptr));
1570 	if(menuA_teacher_2_time_constraints!=nullptr)
1571 		menuA_teacher_2_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "A teacher (2)", nullptr));
1572 	if(menuAll_teachers_1_time_constraints!=nullptr)
1573 		menuAll_teachers_1_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "All teachers (1)", nullptr));
1574 	if(menuAll_teachers_2_time_constraints!=nullptr)
1575 		menuAll_teachers_2_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "All teachers (2)", nullptr));
1576 	//
1577 	if(menuA_students_set_1_time_constraints!=nullptr)
1578 		menuA_students_set_1_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "A students set (1)", nullptr));
1579 	if(menuA_students_set_2_time_constraints!=nullptr)
1580 		menuA_students_set_2_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "A students set (2)", nullptr));
1581 	if(menuAll_students_1_time_constraints!=nullptr)
1582 		menuAll_students_1_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "All students (1)", nullptr));
1583 	if(menuAll_students_2_time_constraints!=nullptr)
1584 		menuAll_students_2_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "All students (2)", nullptr));
1585 
1586 	if(menuA_teacher_time_constraints!=nullptr)
1587 		menuA_teacher_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "A teacher", nullptr));
1588 	if(menuAll_teachers_time_constraints!=nullptr)
1589 		menuAll_teachers_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "All teachers", nullptr));
1590 	//
1591 	if(menuA_students_set_time_constraints!=nullptr)
1592 		menuA_students_set_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "A students set", nullptr));
1593 	if(menuAll_students_time_constraints!=nullptr)
1594 		menuAll_students_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "All students", nullptr));
1595 
1596 	dataTimeConstraintsActivitiesPreferredTimeSlotsAction->setText(QCoreApplication::translate("FetMainForm_template", "A set of activities has a set of preferred time slots", nullptr));
1597 	dataTimeConstraintsActivitiesSameStartingTimeAction->setText(QCoreApplication::translate("FetMainForm_template", "A set of activities has same starting time (day+hour)", nullptr));
1598 	dataTimeConstraintsActivitiesOccupyMaxTimeSlotsFromSelectionAction->setText(QCoreApplication::translate("FetMainForm_template", "A set of activities occupies max time slots from selection", nullptr));
1599 	dataTimeConstraintsActivitiesOccupyMinTimeSlotsFromSelectionAction->setText(QCoreApplication::translate("FetMainForm_template", "A set of activities occupies min time slots from selection", nullptr));
1600 	dataTimeConstraintsActivitiesMaxSimultaneousInSelectedTimeSlotsAction->setText(QCoreApplication::translate("FetMainForm_template", "Max simultaneous activities from a set in selected time slots", nullptr));
1601 	dataTimeConstraintsActivitiesMinSimultaneousInSelectedTimeSlotsAction->setText(QCoreApplication::translate("FetMainForm_template", "Min simultaneous activities from a set in selected time slots", nullptr));
1602 	dataTimeConstraintsTeacherNotAvailableTimesAction->setText(QCoreApplication::translate("FetMainForm_template", "A teacher's not available times", nullptr));
1603 	dataTimeConstraintsBasicCompulsoryTimeAction->setText(QCoreApplication::translate("FetMainForm_template", "Basic compulsory time constraints", nullptr));
1604 	dataTimeConstraintsStudentsSetNotAvailableTimesAction->setText(QCoreApplication::translate("FetMainForm_template", "A students set's not available times", nullptr));
1605 	dataTimeConstraintsBreakTimesAction->setText(QCoreApplication::translate("FetMainForm_template", "Break times", nullptr));
1606 	dataTimeConstraintsTeacherMaxDaysPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max days per week for a teacher", nullptr));
1607 	dataTimeConstraintsTeachersMaxHoursDailyAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours daily for all teachers", nullptr));
1608 	dataTimeConstraintsActivityPreferredStartingTimeAction->setText(QCoreApplication::translate("FetMainForm_template", "An activity has a preferred starting time", nullptr));
1609 	dataTimeConstraintsStudentsSetMaxGapsPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max gaps per week for a students set", nullptr));
1610 	dataTimeConstraintsStudentsMaxGapsPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max gaps per week for all students", nullptr));
1611 	dataTimeConstraintsStudentsEarlyMaxBeginningsAtSecondHourAction->setText(QCoreApplication::translate("FetMainForm_template", "All students begin early (max beginnings at second hour)", nullptr));
1612 	dataTimeConstraintsActivitiesNotOverlappingAction->setText(QCoreApplication::translate("FetMainForm_template", "A set of activities are not overlapping", nullptr));
1613 	dataTimeConstraintsActivityTagsNotOverlappingAction->setText(QCoreApplication::translate("FetMainForm_template", "A set of activity tags are not overlapping", nullptr));
1614 	dataTimeConstraintsMinDaysBetweenActivitiesAction->setText(QCoreApplication::translate("FetMainForm_template", "Min days between a set of activities", nullptr));
1615 	dataSpaceConstraintsBasicCompulsorySpaceAction->setText(QCoreApplication::translate("FetMainForm_template", "Basic compulsory space constraints", nullptr));
1616 	dataSpaceConstraintsRoomNotAvailableTimesAction->setText(QCoreApplication::translate("FetMainForm_template", "A room's not available times", nullptr));
1617 	dataSpaceConstraintsTeacherRoomNotAvailableTimesAction->setText(QCoreApplication::translate("FetMainForm_template", "A teacher+a room's not available times", nullptr));
1618 	dataSpaceConstraintsActivityPreferredRoomAction->setText(QCoreApplication::translate("FetMainForm_template", "An activity has a preferred room", nullptr));
1619 	dataTimeConstraintsActivitiesSameStartingHourAction->setText(QCoreApplication::translate("FetMainForm_template", "A set of activities has same starting hour (any days)", nullptr));
1620 	dataSpaceConstraintsActivityPreferredRoomsAction->setText(QCoreApplication::translate("FetMainForm_template", "An activity has a set of preferred rooms", nullptr));
1621 	dataSpaceConstraintsStudentsSetHomeRoomAction->setText(QCoreApplication::translate("FetMainForm_template", "A set of students has a home room", nullptr));
1622 	dataSpaceConstraintsStudentsSetHomeRoomsAction->setText(QCoreApplication::translate("FetMainForm_template", "A set of students has a set of home rooms", nullptr));
1623 	dataTimeConstraintsTeachersMaxGapsPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max gaps per week for all teachers", nullptr));
1624 	dataTimeConstraintsTeacherMaxGapsPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max gaps per week for a teacher", nullptr));
1625 	dataTimeConstraintsStudentsSetEarlyMaxBeginningsAtSecondHourAction->setText(QCoreApplication::translate("FetMainForm_template", "A students set begins early (max beginnings at second hour)", nullptr));
1626 	dataTimeConstraintsTeacherMaxHoursDailyAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours daily for a teacher", nullptr));
1627 	dataTimeConstraintsStudentsSetMaxHoursDailyAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours daily for a students set", nullptr));
1628 	dataTimeConstraintsStudentsMaxHoursDailyAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours daily for all students", nullptr));
1629 	dataTimeConstraintsStudentsMinHoursDailyAction->setText(QCoreApplication::translate("FetMainForm_template", "Min hours daily for all students", nullptr));
1630 	dataTimeConstraintsStudentsSetMinHoursDailyAction->setText(QCoreApplication::translate("FetMainForm_template", "Min hours daily for a students set", nullptr));
1631 	dataTimeConstraintsStudentsSetMinGapsBetweenOrderedPairOfActivityTagsAction->setText(QCoreApplication::translate("FetMainForm_template", "Min gaps between an ordered pair of activity tags for a students set", nullptr));
1632 	dataTimeConstraintsStudentsMinGapsBetweenOrderedPairOfActivityTagsAction->setText(QCoreApplication::translate("FetMainForm_template", "Min gaps between an ordered pair of activity tags for all students", nullptr));
1633 	dataTimeConstraintsTeacherMinGapsBetweenOrderedPairOfActivityTagsAction->setText(QCoreApplication::translate("FetMainForm_template", "Min gaps between an ordered pair of activity tags for a teacher", nullptr));
1634 	dataTimeConstraintsTeachersMinGapsBetweenOrderedPairOfActivityTagsAction->setText(QCoreApplication::translate("FetMainForm_template", "Min gaps between an ordered pair of activity tags for all teachers", nullptr));
1635 	dataTimeConstraintsTwoActivitiesConsecutiveAction->setText(QCoreApplication::translate("FetMainForm_template", "Two activities are consecutive", nullptr));
1636 	dataTimeConstraintsActivityEndsStudentsDayAction->setText(QCoreApplication::translate("FetMainForm_template", "An activity ends students day", nullptr));
1637 	dataTimeConstraintsActivityEndsTeachersDayAction->setText(QCoreApplication::translate("FetMainForm_template", "An activity ends teachers day", nullptr));
1638 	dataTimeConstraintsTeachersMinHoursDailyAction->setText(QCoreApplication::translate("FetMainForm_template", "Min hours daily for all teachers", nullptr));
1639 	dataTimeConstraintsTeacherMinHoursDailyAction->setText(QCoreApplication::translate("FetMainForm_template", "Min hours daily for a teacher", nullptr));
1640 	dataTimeConstraintsTeachersMaxGapsPerDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max gaps per day for all teachers", nullptr));
1641 	dataTimeConstraintsTeacherMaxGapsPerDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max gaps per day for a teacher", nullptr));
1642 	dataTimeConstraintsTeachersMaxGapsPerMorningAndAfternoonAction->setText(QCoreApplication::translate("FetMainForm_template", "Max gaps per morning+afternoon for all teachers", nullptr));
1643 	dataTimeConstraintsTeacherMaxGapsPerMorningAndAfternoonAction->setText(QCoreApplication::translate("FetMainForm_template", "Max gaps per morning+afternoon for a teacher", nullptr));
1644 	dataTimeConstraintsTeacherMaxSpanPerDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max span per day for a teacher", nullptr));
1645 	dataTimeConstraintsTeachersMaxSpanPerDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max span per day for all teachers", nullptr));
1646 	dataTimeConstraintsStudentsSetMaxSpanPerDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max span per day for a students set", nullptr));
1647 	dataTimeConstraintsStudentsMaxSpanPerDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max span per day for all students", nullptr));
1648 	dataTimeConstraintsTeacherMinRestingHoursAction->setText(QCoreApplication::translate("FetMainForm_template", "Min resting hours for a teacher", nullptr));
1649 	dataTimeConstraintsTeachersMinRestingHoursAction->setText(QCoreApplication::translate("FetMainForm_template", "Min resting hours for all teachers", nullptr));
1650 	dataTimeConstraintsStudentsSetMinRestingHoursAction->setText(QCoreApplication::translate("FetMainForm_template", "Min resting hours for a students set", nullptr));
1651 	dataTimeConstraintsStudentsMinRestingHoursAction->setText(QCoreApplication::translate("FetMainForm_template", "Min resting hours for all students", nullptr));
1652 	dataSpaceConstraintsSubjectPreferredRoomAction->setText(QCoreApplication::translate("FetMainForm_template", "A subject has a preferred room", nullptr));
1653 	dataSpaceConstraintsSubjectPreferredRoomsAction->setText(QCoreApplication::translate("FetMainForm_template", "A subject has a set of preferred rooms", nullptr));
1654 	dataSpaceConstraintsSubjectActivityTagPreferredRoomAction->setText(QCoreApplication::translate("FetMainForm_template", "A subject+an activity tag have a preferred room", nullptr));
1655 	dataSpaceConstraintsSubjectActivityTagPreferredRoomsAction->setText(QCoreApplication::translate("FetMainForm_template", "A subject+an activity tag have a set of preferred rooms", nullptr));
1656 	dataSpaceConstraintsTeacherHomeRoomAction->setText(QCoreApplication::translate("FetMainForm_template", "A teacher has a home room", nullptr));
1657 	dataSpaceConstraintsTeacherHomeRoomsAction->setText(QCoreApplication::translate("FetMainForm_template", "A teacher has a set of home rooms", nullptr));
1658 	dataSpaceConstraintsStudentsSetMaxBuildingChangesPerDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max building changes per day for a students set", nullptr));
1659 	dataSpaceConstraintsStudentsMaxBuildingChangesPerDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max building changes per day for all students", nullptr));
1660 	dataSpaceConstraintsStudentsSetMaxBuildingChangesPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max building changes per week for a students set", nullptr));
1661 	dataSpaceConstraintsStudentsMaxBuildingChangesPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max building changes per week for all students", nullptr));
1662 	dataSpaceConstraintsStudentsSetMinGapsBetweenBuildingChangesAction->setText(QCoreApplication::translate("FetMainForm_template", "Min gaps between building changes for a students set", nullptr));
1663 	dataSpaceConstraintsStudentsMinGapsBetweenBuildingChangesAction->setText(QCoreApplication::translate("FetMainForm_template", "Min gaps between building changes for all students", nullptr));
1664 	dataSpaceConstraintsTeacherMaxBuildingChangesPerDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max building changes per day for a teacher", nullptr));
1665 	dataSpaceConstraintsTeachersMaxBuildingChangesPerDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max building changes per day for all teachers", nullptr));
1666 	dataSpaceConstraintsTeacherMaxBuildingChangesPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max building changes per week for a teacher", nullptr));
1667 	dataSpaceConstraintsTeachersMaxBuildingChangesPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max building changes per week for all teachers", nullptr));
1668 	dataSpaceConstraintsTeacherMinGapsBetweenBuildingChangesAction->setText(QCoreApplication::translate("FetMainForm_template", "Min gaps between building changes for a teacher", nullptr));
1669 	dataSpaceConstraintsTeachersMinGapsBetweenBuildingChangesAction->setText(QCoreApplication::translate("FetMainForm_template", "Min gaps between building changes for all teachers", nullptr));
1670 	dataSpaceConstraintsStudentsSetMaxRoomChangesPerDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max room changes per day for a students set", nullptr));
1671 	dataSpaceConstraintsStudentsMaxRoomChangesPerDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max room changes per day for all students", nullptr));
1672 	dataSpaceConstraintsStudentsSetMaxRoomChangesPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max room changes per week for a students set", nullptr));
1673 	dataSpaceConstraintsStudentsMaxRoomChangesPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max room changes per week for all students", nullptr));
1674 	dataSpaceConstraintsStudentsSetMinGapsBetweenRoomChangesAction->setText(QCoreApplication::translate("FetMainForm_template", "Min gaps between room changes for a students set", nullptr));
1675 	dataSpaceConstraintsStudentsMinGapsBetweenRoomChangesAction->setText(QCoreApplication::translate("FetMainForm_template", "Min gaps between room changes for all students", nullptr));
1676 	dataSpaceConstraintsTeacherMaxRoomChangesPerDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max room changes per day for a teacher", nullptr));
1677 	dataSpaceConstraintsTeachersMaxRoomChangesPerDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max room changes per day for all teachers", nullptr));
1678 	dataSpaceConstraintsTeacherMaxRoomChangesPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max room changes per week for a teacher", nullptr));
1679 	dataSpaceConstraintsTeachersMaxRoomChangesPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max room changes per week for all teachers", nullptr));
1680 	dataSpaceConstraintsTeacherMinGapsBetweenRoomChangesAction->setText(QCoreApplication::translate("FetMainForm_template", "Min gaps between room changes for a teacher", nullptr));
1681 	dataSpaceConstraintsTeachersMinGapsBetweenRoomChangesAction->setText(QCoreApplication::translate("FetMainForm_template", "Min gaps between room changes for all teachers", nullptr));
1682 	dataTimeConstraintsActivitiesSameStartingDayAction->setText(QCoreApplication::translate("FetMainForm_template", "A set of activities has same starting day (any hours)", nullptr));
1683 	dataTimeConstraintsTwoActivitiesOrderedAction->setText(QCoreApplication::translate("FetMainForm_template", "Two activities are ordered", nullptr));
1684 	dataTimeConstraintsTwoSetsOfActivitiesOrderedAction->setText(QCoreApplication::translate("FetMainForm_template", "Two sets of activities are ordered", nullptr));
1685 	dataTimeConstraintsTwoActivitiesOrderedIfSameDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Two activities are ordered if they are on the same day", nullptr));
1686 	dataTimeConstraintsTeachersMaxHoursContinuouslyAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours continuously for all teachers", nullptr));
1687 	dataTimeConstraintsTeacherMaxHoursContinuouslyAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours continuously for a teacher", nullptr));
1688 	dataTimeConstraintsStudentsSetMaxHoursContinuouslyAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours continuously for a students set", nullptr));
1689 	dataTimeConstraintsStudentsMaxHoursContinuouslyAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours continuously for all students", nullptr));
1690 	dataTimeConstraintsActivitiesPreferredStartingTimesAction->setText(QCoreApplication::translate("FetMainForm_template", "A set of activities has a set of preferred starting times", nullptr));
1691 	dataTimeConstraintsActivityPreferredTimeSlotsAction->setText(QCoreApplication::translate("FetMainForm_template", "An activity has a set of preferred time slots", nullptr));
1692 	dataTimeConstraintsActivityPreferredStartingTimesAction->setText(QCoreApplication::translate("FetMainForm_template", "An activity has a set of preferred starting times", nullptr));
1693 	dataTimeConstraintsMinGapsBetweenActivitiesAction->setText(QCoreApplication::translate("FetMainForm_template", "Min gaps (hours) between a set of activities", nullptr));
1694 	dataTimeConstraintsSubactivitiesPreferredTimeSlotsAction->setText(QCoreApplication::translate("FetMainForm_template", "A set of subactivities has a set of preferred time slots", nullptr));
1695 	dataTimeConstraintsSubactivitiesPreferredStartingTimesAction->setText(QCoreApplication::translate("FetMainForm_template", "A set of subactivities has a set of preferred starting times", nullptr));
1696 	dataTimeConstraintsTeacherIntervalMaxDaysPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "A teacher works in an hourly interval max days per week", nullptr));
1697 	dataTimeConstraintsTeachersIntervalMaxDaysPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "All teachers work in an hourly interval max days per week", nullptr));
1698 	dataTimeConstraintsStudentsSetIntervalMaxDaysPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "A students set works in an hourly interval max days per week", nullptr));
1699 	dataTimeConstraintsStudentsIntervalMaxDaysPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "All students work in an hourly interval max days per week", nullptr));
1700 	dataTimeConstraintsActivitiesEndStudentsDayAction->setText(QCoreApplication::translate("FetMainForm_template", "A set of activities end students day", nullptr));
1701 	dataTimeConstraintsActivitiesEndTeachersDayAction->setText(QCoreApplication::translate("FetMainForm_template", "A set of activities end teachers day", nullptr));
1702 	dataTimeConstraintsTwoActivitiesGroupedAction->setText(QCoreApplication::translate("FetMainForm_template", "Two activities are grouped", nullptr));
1703 	dataTimeConstraintsStudentsSetActivityTagMaxHoursContinuouslyAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours continuously with an activity tag for a students set", nullptr));
1704 	dataTimeConstraintsStudentsActivityTagMaxHoursContinuouslyAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours continuously with an activity tag for all students", nullptr));
1705 	dataTimeConstraintsTeacherActivityTagMaxHoursContinuouslyAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours continuously with an activity tag for a teacher", nullptr));
1706 	dataTimeConstraintsTeachersActivityTagMaxHoursContinuouslyAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours continuously with an activity tag for all teachers", nullptr));
1707 	dataSpaceConstraintsActivityTagPreferredRoomAction->setText(QCoreApplication::translate("FetMainForm_template", "An activity tag has a preferred room", nullptr));
1708 	dataSpaceConstraintsActivityTagPreferredRoomsAction->setText(QCoreApplication::translate("FetMainForm_template", "An activity tag has a set of preferred rooms", nullptr));
1709 	dataTimeConstraintsTeachersMaxDaysPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max days per week for all teachers", nullptr));
1710 	dataTimeConstraintsThreeActivitiesGroupedAction->setText(QCoreApplication::translate("FetMainForm_template", "Three activities are grouped", nullptr));
1711 	dataTimeConstraintsMaxDaysBetweenActivitiesAction->setText(QCoreApplication::translate("FetMainForm_template", "Max days between a set of activities", nullptr));
1712 	dataTimeConstraintsTeacherMinDaysPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Min days per week for a teacher", nullptr));
1713 	dataTimeConstraintsTeachersMinDaysPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Min days per week for all teachers", nullptr));
1714 	dataTimeConstraintsTeacherActivityTagMaxHoursDailyAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours daily with an activity tag for a teacher", nullptr));
1715 	dataTimeConstraintsTeachersActivityTagMaxHoursDailyAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours daily with an activity tag for all teachers", nullptr));
1716 	dataTimeConstraintsStudentsSetActivityTagMaxHoursDailyAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours daily with an activity tag for a students set", nullptr));
1717 	dataTimeConstraintsStudentsActivityTagMaxHoursDailyAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours daily with an activity tag for all students", nullptr));
1718 	dataTimeConstraintsTeacherActivityTagMinHoursDailyAction->setText(QCoreApplication::translate("FetMainForm_template", "Min hours daily with an activity tag for a teacher", nullptr));
1719 	dataTimeConstraintsTeachersActivityTagMinHoursDailyAction->setText(QCoreApplication::translate("FetMainForm_template", "Min hours daily with an activity tag for all teachers", nullptr));
1720 	dataTimeConstraintsStudentsSetActivityTagMinHoursDailyAction->setText(QCoreApplication::translate("FetMainForm_template", "Min hours daily with an activity tag for a students set", nullptr));
1721 	dataTimeConstraintsStudentsActivityTagMinHoursDailyAction->setText(QCoreApplication::translate("FetMainForm_template", "Min hours daily with an activity tag for all students", nullptr));
1722 	dataTimeConstraintsStudentsSetMaxGapsPerDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max gaps per day for a students set", nullptr));
1723 	dataTimeConstraintsStudentsMaxGapsPerDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max gaps per day for all students", nullptr));
1724 	dataSpaceConstraintsActivitiesOccupyMaxDifferentRoomsAction->setText(QCoreApplication::translate("FetMainForm_template", "A set of activities occupies max different rooms", nullptr));
1725 	dataSpaceConstraintsActivitiesSameRoomIfConsecutiveAction->setText(QCoreApplication::translate("FetMainForm_template", "A set of activities are in the same room if they are consecutive", nullptr));
1726 	dataTimeConstraintsStudentsSetMaxDaysPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max days per week for a students set", nullptr));
1727 	dataTimeConstraintsStudentsMaxDaysPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max days per week for all students", nullptr));
1728 
1729 	//mornings-afternoons
1730 	dataTimeConstraintsTeacherMaxRealDaysPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max real days per week for a teacher", nullptr));
1731 	dataTimeConstraintsTeacherMaxMorningsPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max mornings per week for a teacher", nullptr));
1732 	dataTimeConstraintsTeacherMaxTwoConsecutiveMorningsAction->setText(QCoreApplication::translate("FetMainForm_template", "A teacher works max two consecutive mornings", nullptr));
1733 	dataTimeConstraintsTeachersMaxTwoConsecutiveMorningsAction->setText(QCoreApplication::translate("FetMainForm_template", "All teachers work max two consecutive mornings", nullptr));
1734 	dataTimeConstraintsTeacherMaxTwoConsecutiveAfternoonsAction->setText(QCoreApplication::translate("FetMainForm_template", "A teacher works max two consecutive afternoons", nullptr));
1735 	dataTimeConstraintsTeachersMaxTwoConsecutiveAfternoonsAction->setText(QCoreApplication::translate("FetMainForm_template", "All teachers work max two consecutive afternoons", nullptr));
1736 	dataTimeConstraintsTeacherMaxAfternoonsPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max afternoons per week for a teacher", nullptr));
1737 	dataTimeConstraintsTeachersMaxHoursDailyRealDaysAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours daily per real day for all teachers", nullptr));
1738 	dataTimeConstraintsTeachersAfternoonsEarlyMaxBeginningsAtSecondHourAction->setText(QCoreApplication::translate("FetMainForm_template", "All teachers begin afternoons early (max beginnings at second hour)", nullptr));
1739 	dataTimeConstraintsTeacherAfternoonsEarlyMaxBeginningsAtSecondHourAction->setText(QCoreApplication::translate("FetMainForm_template", "A teacher begins afternoons early (max beginnings at second hour)", nullptr));
1740 	dataTimeConstraintsStudentsAfternoonsEarlyMaxBeginningsAtSecondHourAction->setText(QCoreApplication::translate("FetMainForm_template", "All students begin afternoons early (max beginnings at second hour)", nullptr));
1741 	dataTimeConstraintsStudentsSetAfternoonsEarlyMaxBeginningsAtSecondHourAction->setText(QCoreApplication::translate("FetMainForm_template", "A students set begins afternoons early (max beginnings at second hour)", nullptr));
1742 
1743 	dataTimeConstraintsTeachersMorningsEarlyMaxBeginningsAtSecondHourAction->setText(QCoreApplication::translate("FetMainForm_template", "All teachers begin mornings early (max beginnings at second hour)", nullptr));
1744 	dataTimeConstraintsTeacherMorningsEarlyMaxBeginningsAtSecondHourAction->setText(QCoreApplication::translate("FetMainForm_template", "A teacher begins mornings early (max beginnings at second hour)", nullptr));
1745 	dataTimeConstraintsStudentsMorningsEarlyMaxBeginningsAtSecondHourAction->setText(QCoreApplication::translate("FetMainForm_template", "All students begin mornings early (max beginnings at second hour)", nullptr));
1746 	dataTimeConstraintsStudentsSetMorningsEarlyMaxBeginningsAtSecondHourAction->setText(QCoreApplication::translate("FetMainForm_template", "A students set begins mornings early (max beginnings at second hour)", nullptr));
1747 
1748 	dataTimeConstraintsTeacherMaxHoursDailyRealDaysAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours daily per real day for a teacher", nullptr));
1749 	dataTimeConstraintsStudentsSetMaxHoursDailyRealDaysAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours daily per real day for a students set", nullptr));
1750 	dataTimeConstraintsStudentsMaxHoursDailyRealDaysAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours daily per real day for all students", nullptr));
1751 	dataTimeConstraintsStudentsMinHoursPerMorningAction->setText(QCoreApplication::translate("FetMainForm_template", "Min hours per morning for all students", nullptr));
1752 	dataTimeConstraintsStudentsSetMinHoursPerMorningAction->setText(QCoreApplication::translate("FetMainForm_template", "Min hours per morning for a students set", nullptr));
1753 	dataTimeConstraintsTeachersMinHoursPerMorningAction->setText(QCoreApplication::translate("FetMainForm_template", "Min hours per morning for all teachers", nullptr));
1754 	dataTimeConstraintsTeachersMinHoursDailyRealDaysAction->setText(QCoreApplication::translate("FetMainForm_template", "Min hours daily per real day for all teachers", nullptr));
1755 	dataTimeConstraintsTeacherMaxHoursPerAllAfternoonsAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours per all afternoons for a teacher", nullptr));
1756 	dataTimeConstraintsTeachersMaxHoursPerAllAfternoonsAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours per all afternoons for all teachers", nullptr));
1757 	dataTimeConstraintsStudentsSetMaxHoursPerAllAfternoonsAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours per all afternoons for a students set", nullptr));
1758 	dataTimeConstraintsStudentsMaxHoursPerAllAfternoonsAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours per all afternoons for all students", nullptr));
1759 	dataTimeConstraintsTeacherMinHoursPerMorningAction->setText(QCoreApplication::translate("FetMainForm_template", "Min hours per morning for a teacher", nullptr));
1760 	dataTimeConstraintsTeacherMinHoursDailyRealDaysAction->setText(QCoreApplication::translate("FetMainForm_template", "Min hours daily per real day for a teacher", nullptr));
1761 	dataTimeConstraintsTeachersMaxZeroGapsPerAfternoonAction->setText(QCoreApplication::translate("FetMainForm_template", "Max zero gaps per afternoon for all teachers", nullptr));
1762 	dataTimeConstraintsTeacherMaxZeroGapsPerAfternoonAction->setText(QCoreApplication::translate("FetMainForm_template", "Max zero gaps per afternoon for a teacher", nullptr));
1763 	dataTimeConstraintsTeacherMaxSpanPerRealDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max span per real day for a teacher", nullptr));
1764 	dataTimeConstraintsTeachersMaxSpanPerRealDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max span per real day for all teachers", nullptr));
1765 	dataTimeConstraintsStudentsSetMaxSpanPerRealDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max span per real day for a students set", nullptr));
1766 	dataTimeConstraintsStudentsMaxSpanPerRealDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max span per real day for all students", nullptr));
1767 	dataTimeConstraintsTeacherMinRestingHoursBetweenMorningAndAfternoonAction->setText(QCoreApplication::translate("FetMainForm_template", "Min resting hours between morning and afternoon for a teacher", nullptr));
1768 	dataTimeConstraintsTeachersMinRestingHoursBetweenMorningAndAfternoonAction->setText(QCoreApplication::translate("FetMainForm_template", "Min resting hours between morning and afternoon for all teachers", nullptr));
1769 	dataTimeConstraintsStudentsSetMinRestingHoursBetweenMorningAndAfternoonAction->setText(QCoreApplication::translate("FetMainForm_template", "Min resting hours between morning and afternoon for a students set", nullptr));
1770 	dataTimeConstraintsStudentsMinRestingHoursBetweenMorningAndAfternoonAction->setText(QCoreApplication::translate("FetMainForm_template", "Min resting hours between morning and afternoon for all students", nullptr));
1771 	dataTimeConstraintsTeacherMorningIntervalMaxDaysPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "A teacher works in an hourly morning interval max days per week", nullptr));
1772 	dataTimeConstraintsTeachersMorningIntervalMaxDaysPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "All teachers work in an hourly morning interval max days per week", nullptr));
1773 	dataTimeConstraintsTeacherAfternoonIntervalMaxDaysPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "A teacher works in an hourly afternoon interval max days per week", nullptr));
1774 	dataTimeConstraintsTeachersAfternoonIntervalMaxDaysPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "All teachers work in an hourly afternoon interval max days per week", nullptr));
1775 	dataTimeConstraintsStudentsSetMorningIntervalMaxDaysPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "A students set works in an hourly morning interval max days per week", nullptr));
1776 	dataTimeConstraintsStudentsMorningIntervalMaxDaysPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "All students work in an hourly morning interval max days per week", nullptr));
1777 	dataTimeConstraintsStudentsSetAfternoonIntervalMaxDaysPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "A students set works in an hourly afternoon interval max days per week", nullptr));
1778 	dataTimeConstraintsStudentsAfternoonIntervalMaxDaysPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "All students work in an hourly afternoon interval max days per week", nullptr));
1779 	dataTimeConstraintsTeachersMaxRealDaysPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max real days per week for all teachers", nullptr));
1780 	dataTimeConstraintsTeachersMaxMorningsPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max mornings per week for all teachers", nullptr));
1781 	dataTimeConstraintsTeachersMaxAfternoonsPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max afternoons per week for all teachers", nullptr));
1782 	dataTimeConstraintsTeacherMinRealDaysPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Min real days per week for a teacher", nullptr));
1783 	dataTimeConstraintsTeachersMinRealDaysPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Min real days per week for all teachers", nullptr));
1784 	dataTimeConstraintsTeacherMinMorningsPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Min mornings per week for a teacher", nullptr));
1785 	dataTimeConstraintsTeachersMinMorningsPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Min mornings per week for all teachers", nullptr));
1786 	dataTimeConstraintsTeacherMinAfternoonsPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Min afternoons per week for a teacher", nullptr));
1787 	dataTimeConstraintsTeachersMinAfternoonsPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Min afternoons per week for all teachers", nullptr));
1788 	dataTimeConstraintsTeacherActivityTagMaxHoursDailyRealDaysAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours daily per real day with an activity tag for a teacher", nullptr));
1789 	dataTimeConstraintsTeacherMaxTwoActivityTagsPerDayFromN1N2N3Action->setText(QCoreApplication::translate("FetMainForm_template", "Max two activity tags from N1, N2, N3 per day for a teacher", nullptr));
1790 	dataTimeConstraintsTeachersMaxTwoActivityTagsPerDayFromN1N2N3Action->setText(QCoreApplication::translate("FetMainForm_template", "Max two activity tags from N1, N2, N3 per day for all teachers", nullptr));
1791 	dataTimeConstraintsTeachersActivityTagMaxHoursDailyRealDaysAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours daily per real day with an activity tag for all teachers", nullptr));
1792 	dataTimeConstraintsStudentsSetActivityTagMaxHoursDailyRealDaysAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours daily per real day with an activity tag for a students set", nullptr));
1793 	dataTimeConstraintsStudentsActivityTagMaxHoursDailyRealDaysAction->setText(QCoreApplication::translate("FetMainForm_template", "Max hours daily per real day with an activity tag for all students", nullptr));
1794 	dataTimeConstraintsStudentsSetMaxGapsPerRealDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max gaps per real day for a students set", nullptr));
1795 	dataTimeConstraintsStudentsMaxGapsPerRealDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max gaps per real day for all students", nullptr));
1796 	dataTimeConstraintsStudentsSetMaxRealDaysPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max real days per week for a students set", nullptr));
1797 	dataTimeConstraintsStudentsMaxRealDaysPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max real days per week for all students", nullptr));
1798 	dataTimeConstraintsStudentsSetMaxMorningsPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max mornings per week for a students set", nullptr));
1799 	dataTimeConstraintsStudentsMaxMorningsPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max mornings per week for all students", nullptr));
1800 	dataTimeConstraintsStudentsSetMaxAfternoonsPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max afternoons per week for a students set", nullptr));
1801 	dataTimeConstraintsStudentsMaxAfternoonsPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Max afternoons per week for all students", nullptr));
1802 	dataTimeConstraintsStudentsSetMinMorningsPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Min mornings per week for a students set", nullptr));
1803 	dataTimeConstraintsStudentsMinMorningsPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Min mornings per week for all students", nullptr));
1804 	dataTimeConstraintsStudentsSetMinAfternoonsPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Min afternoons per week for a students set", nullptr));
1805 	dataTimeConstraintsStudentsMinAfternoonsPerWeekAction->setText(QCoreApplication::translate("FetMainForm_template", "Min afternoons per week for all students", nullptr));
1806 	dataTimeConstraintsTeacherMaxGapsPerRealDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max gaps per real day for a teacher", nullptr));
1807 	dataTimeConstraintsTeachersMaxGapsPerRealDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max gaps per real day for all teachers", nullptr));
1808 	dataTimeConstraintsStudentsSetMaxGapsPerWeekForRealDaysAction->setText(QCoreApplication::translate("FetMainForm_template", "Max gaps per week for real days for a students set", nullptr));
1809 	dataTimeConstraintsStudentsMaxGapsPerWeekForRealDaysAction->setText(QCoreApplication::translate("FetMainForm_template", "Max gaps per week for real days for all students", nullptr));
1810 	dataTimeConstraintsTeacherMaxGapsPerWeekForRealDaysAction->setText(QCoreApplication::translate("FetMainForm_template", "Max gaps per week for real days for a teacher", nullptr));
1811 	dataTimeConstraintsTeachersMaxGapsPerWeekForRealDaysAction->setText(QCoreApplication::translate("FetMainForm_template", "Max gaps per week for real days for all teachers", nullptr));
1812 	dataSpaceConstraintsStudentsSetMaxRoomChangesPerRealDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max room changes per real day for a students set", nullptr));
1813 	dataSpaceConstraintsStudentsMaxRoomChangesPerRealDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max room changes per real day for all students", nullptr));
1814 	dataSpaceConstraintsTeacherMaxRoomChangesPerRealDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max room changes per real day for a teacher", nullptr));
1815 	dataSpaceConstraintsTeachersMaxRoomChangesPerRealDayAction->setText(QCoreApplication::translate("FetMainForm_template", "Max room changes per real day for all teachers", nullptr));
1816 
1817 	dataTimeConstraintsTeacherMaxThreeConsecutiveDaysAction->setText(QCoreApplication::translate("FetMainForm_template", "A teacher works max three consecutive days", nullptr));
1818 	dataTimeConstraintsTeachersMaxThreeConsecutiveDaysAction->setText(QCoreApplication::translate("FetMainForm_template", "All teachers work max three consecutive days", nullptr));
1819 
1820 	//block-planning
1821 	dataTimeConstraintsMaxGapsBetweenActivitiesAction->setText(QCoreApplication::translate("FetMainForm_template", "Max gaps (hours) between a set of activities", nullptr));
1822 	dataTimeConstraintsMaxTotalActivitiesFromSetInSelectedTimeSlotsAction->setText(QCoreApplication::translate("FetMainForm_template", "Max total activities from a set in selected time slots", nullptr));
1823 
1824 	//terms
1825 	dataTimeConstraintsActivitiesMaxInATermAction->setText(QCoreApplication::translate("FetMainForm_template", "Max activities from a set in a term", nullptr));
1826 	dataTimeConstraintsActivitiesOccupyMaxTermsAction->setText(QCoreApplication::translate("FetMainForm_template", "A set of activities occupies max terms", nullptr));
1827 }
1828 
1829 void FetMainForm::createMenusOfActionsForConstraints()
1830 {
1831 	menuMisc_time_constraints->clear();
1832 	menuTeachers_time_constraints->clear();
1833 	menuStudents_time_constraints->clear();
1834 
1835 	menuA_teacher_time_constraints=nullptr;
1836 	menuAll_teachers_time_constraints=nullptr;
1837 	menuA_students_set_time_constraints=nullptr;
1838 	menuAll_students_time_constraints=nullptr;
1839 
1840 	menuA_teacher_1_time_constraints=nullptr;
1841 	menuA_teacher_2_time_constraints=nullptr;
1842 	menuAll_teachers_time_constraints=nullptr;
1843 	menuAll_teachers_1_time_constraints=nullptr;
1844 	menuAll_teachers_2_time_constraints=nullptr;
1845 	menuA_students_set_1_time_constraints=nullptr;
1846 	menuA_students_set_2_time_constraints=nullptr;
1847 	menuAll_students_1_time_constraints=nullptr;
1848 	menuAll_students_2_time_constraints=nullptr;
1849 
1850 	menuActivities_preferred_times_time_constraints->clear();
1851 	menuActivities_others_1_time_constraints->clear();
1852 	menuActivities_others_2_time_constraints->clear();
1853 	menuMisc_space_constraints->clear();
1854 	menuRooms_space_constraints->clear();
1855 	menuActivities_space_constraints->clear();
1856 	menuSubjects_space_constraints->clear();
1857 	menuSubjects_and_activity_tags_space_constraints->clear();
1858 	menuStudents_space_constraints->clear();
1859 	menuTeachers_space_constraints->clear();
1860 	menuActivity_tags_space_constraints->clear();
1861 
1862 	if(gt.rules.mode==OFFICIAL){
1863 		menuMisc_time_constraints->addAction(dataTimeConstraintsBasicCompulsoryTimeAction);
1864 		menuMisc_time_constraints->addAction(dataTimeConstraintsBreakTimesAction);
1865 
1866 		menuA_teacher_time_constraints=new QMenu(menuTeachers_time_constraints);
1867 		menuAll_teachers_time_constraints=new QMenu(menuTeachers_time_constraints);
1868 		//
1869 		menuA_students_set_time_constraints=new QMenu(menuStudents_time_constraints);
1870 		menuAll_students_time_constraints=new QMenu(menuStudents_time_constraints);
1871 		//
1872 		menuTeachers_time_constraints->addMenu(menuA_teacher_time_constraints);
1873 		menuTeachers_time_constraints->addMenu(menuAll_teachers_time_constraints);
1874 		//
1875 		menuStudents_time_constraints->addMenu(menuA_students_set_time_constraints);
1876 		menuStudents_time_constraints->addMenu(menuAll_students_time_constraints);
1877 		//
1878 		menuA_teacher_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "A teacher", nullptr));
1879 		menuAll_teachers_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "All teachers", nullptr));
1880 		//
1881 		menuA_students_set_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "A students set", nullptr));
1882 		menuAll_students_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "All students", nullptr));
1883 
1884 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherNotAvailableTimesAction);
1885 		menuA_teacher_time_constraints->addSeparator();
1886 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMaxDaysPerWeekAction);
1887 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMinDaysPerWeekAction);
1888 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMaxGapsPerDayAction);
1889 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMaxGapsPerWeekAction);
1890 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMaxHoursDailyAction);
1891 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMaxSpanPerDayAction);
1892 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherActivityTagMaxHoursDailyAction);
1893 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMinHoursDailyAction);
1894 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherActivityTagMinHoursDailyAction);
1895 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMaxHoursContinuouslyAction);
1896 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherActivityTagMaxHoursContinuouslyAction);
1897 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMinGapsBetweenOrderedPairOfActivityTagsAction);
1898 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherIntervalMaxDaysPerWeekAction);
1899 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMinRestingHoursAction);
1900 
1901 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMaxDaysPerWeekAction);
1902 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMinDaysPerWeekAction);
1903 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMaxGapsPerDayAction);
1904 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMaxGapsPerWeekAction);
1905 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMaxHoursDailyAction);
1906 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMaxSpanPerDayAction);
1907 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersActivityTagMaxHoursDailyAction);
1908 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMinHoursDailyAction);
1909 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersActivityTagMinHoursDailyAction);
1910 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMaxHoursContinuouslyAction);
1911 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersActivityTagMaxHoursContinuouslyAction);
1912 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMinGapsBetweenOrderedPairOfActivityTagsAction);
1913 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersIntervalMaxDaysPerWeekAction);
1914 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMinRestingHoursAction);
1915 
1916 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetNotAvailableTimesAction);
1917 		menuA_students_set_time_constraints->addSeparator();
1918 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxDaysPerWeekAction);
1919 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxGapsPerDayAction);
1920 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxGapsPerWeekAction);
1921 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetEarlyMaxBeginningsAtSecondHourAction);
1922 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxHoursDailyAction);
1923 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxSpanPerDayAction);
1924 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetActivityTagMaxHoursDailyAction);
1925 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetMinHoursDailyAction);
1926 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetActivityTagMinHoursDailyAction);
1927 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxHoursContinuouslyAction);
1928 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetActivityTagMaxHoursContinuouslyAction);
1929 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetMinGapsBetweenOrderedPairOfActivityTagsAction);
1930 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetIntervalMaxDaysPerWeekAction);
1931 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetMinRestingHoursAction);
1932 
1933 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsMaxDaysPerWeekAction);
1934 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsMaxGapsPerDayAction);
1935 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsMaxGapsPerWeekAction);
1936 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsEarlyMaxBeginningsAtSecondHourAction);
1937 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsMaxHoursDailyAction);
1938 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsMaxSpanPerDayAction);
1939 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsActivityTagMaxHoursDailyAction);
1940 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsMinHoursDailyAction);
1941 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsActivityTagMinHoursDailyAction);
1942 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsMaxHoursContinuouslyAction);
1943 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsActivityTagMaxHoursContinuouslyAction);
1944 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsMinGapsBetweenOrderedPairOfActivityTagsAction);
1945 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsIntervalMaxDaysPerWeekAction);
1946 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsMinRestingHoursAction);
1947 
1948 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsActivityPreferredStartingTimeAction);
1949 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsActivityPreferredStartingTimesAction);
1950 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsActivityPreferredTimeSlotsAction);
1951 		menuActivities_preferred_times_time_constraints->addSeparator();
1952 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsActivitiesPreferredStartingTimesAction);
1953 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsActivitiesPreferredTimeSlotsAction);
1954 		menuActivities_preferred_times_time_constraints->addSeparator();
1955 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsSubactivitiesPreferredStartingTimesAction);
1956 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsSubactivitiesPreferredTimeSlotsAction);
1957 
1958 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsMinDaysBetweenActivitiesAction);
1959 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsMaxDaysBetweenActivitiesAction);
1960 		menuActivities_others_1_time_constraints->addSeparator();
1961 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivityEndsStudentsDayAction);
1962 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivitiesEndStudentsDayAction);
1963 		menuActivities_others_1_time_constraints->addSeparator();
1964 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivityEndsTeachersDayAction);
1965 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivitiesEndTeachersDayAction);
1966 		menuActivities_others_1_time_constraints->addSeparator();
1967 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivitiesSameStartingTimeAction);
1968 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivitiesSameStartingDayAction);
1969 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivitiesSameStartingHourAction);
1970 
1971 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsActivitiesOccupyMaxTimeSlotsFromSelectionAction);
1972 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsActivitiesOccupyMinTimeSlotsFromSelectionAction);
1973 		menuActivities_others_2_time_constraints->addSeparator();
1974 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsTwoActivitiesOrderedAction);
1975 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsTwoSetsOfActivitiesOrderedAction);
1976 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsTwoActivitiesOrderedIfSameDayAction);
1977 		menuActivities_others_2_time_constraints->addSeparator();
1978 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsTwoActivitiesConsecutiveAction);
1979 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsTwoActivitiesGroupedAction);
1980 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsThreeActivitiesGroupedAction);
1981 		menuActivities_others_2_time_constraints->addSeparator();
1982 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsActivitiesNotOverlappingAction);
1983 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsActivityTagsNotOverlappingAction);
1984 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsActivitiesMaxSimultaneousInSelectedTimeSlotsAction);
1985 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsActivitiesMinSimultaneousInSelectedTimeSlotsAction);
1986 		menuActivities_others_2_time_constraints->addSeparator();
1987 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsMinGapsBetweenActivitiesAction);
1988 
1989 		menuMisc_space_constraints->addAction(dataSpaceConstraintsBasicCompulsorySpaceAction);
1990 
1991 		menuRooms_space_constraints->addAction(dataSpaceConstraintsRoomNotAvailableTimesAction);
1992 		menuRooms_space_constraints->addAction(dataSpaceConstraintsTeacherRoomNotAvailableTimesAction);
1993 
1994 		menuActivities_space_constraints->addAction(dataSpaceConstraintsActivityPreferredRoomAction);
1995 		menuActivities_space_constraints->addAction(dataSpaceConstraintsActivityPreferredRoomsAction);
1996 		menuActivities_space_constraints->addSeparator();
1997 		menuActivities_space_constraints->addAction(dataSpaceConstraintsActivitiesSameRoomIfConsecutiveAction);
1998 		menuActivities_space_constraints->addAction(dataSpaceConstraintsActivitiesOccupyMaxDifferentRoomsAction);
1999 
2000 		menuSubjects_space_constraints->addAction(dataSpaceConstraintsSubjectPreferredRoomAction);
2001 		menuSubjects_space_constraints->addAction(dataSpaceConstraintsSubjectPreferredRoomsAction);
2002 
2003 		menuSubjects_and_activity_tags_space_constraints->addAction(dataSpaceConstraintsSubjectActivityTagPreferredRoomAction);
2004 		menuSubjects_and_activity_tags_space_constraints->addAction(dataSpaceConstraintsSubjectActivityTagPreferredRoomsAction);
2005 
2006 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetHomeRoomAction);
2007 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetHomeRoomsAction);
2008 		menuStudents_space_constraints->addSeparator();
2009 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetMaxRoomChangesPerDayAction);
2010 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetMaxRoomChangesPerWeekAction);
2011 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetMinGapsBetweenRoomChangesAction);
2012 		menuStudents_space_constraints->addSeparator();
2013 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetMaxBuildingChangesPerDayAction);
2014 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetMaxBuildingChangesPerWeekAction);
2015 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetMinGapsBetweenBuildingChangesAction);
2016 		menuStudents_space_constraints->addSeparator();
2017 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsMaxRoomChangesPerDayAction);
2018 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsMaxRoomChangesPerWeekAction);
2019 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsMinGapsBetweenRoomChangesAction);
2020 		menuStudents_space_constraints->addSeparator();
2021 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsMaxBuildingChangesPerDayAction);
2022 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsMaxBuildingChangesPerWeekAction);
2023 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsMinGapsBetweenBuildingChangesAction);
2024 
2025 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherHomeRoomAction);
2026 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherHomeRoomsAction);
2027 		menuTeachers_space_constraints->addSeparator();
2028 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherMaxRoomChangesPerDayAction);
2029 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherMaxRoomChangesPerWeekAction);
2030 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherMinGapsBetweenRoomChangesAction);
2031 		menuTeachers_space_constraints->addSeparator();
2032 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherMaxBuildingChangesPerDayAction);
2033 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherMaxBuildingChangesPerWeekAction);
2034 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherMinGapsBetweenBuildingChangesAction);
2035 		menuTeachers_space_constraints->addSeparator();
2036 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeachersMaxRoomChangesPerDayAction);
2037 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeachersMaxRoomChangesPerWeekAction);
2038 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeachersMinGapsBetweenRoomChangesAction);
2039 		menuTeachers_space_constraints->addSeparator();
2040 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeachersMaxBuildingChangesPerDayAction);
2041 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeachersMaxBuildingChangesPerWeekAction);
2042 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeachersMinGapsBetweenBuildingChangesAction);
2043 
2044 		menuActivity_tags_space_constraints->addAction(dataSpaceConstraintsActivityTagPreferredRoomAction);
2045 		menuActivity_tags_space_constraints->addAction(dataSpaceConstraintsActivityTagPreferredRoomsAction);
2046 	}
2047 	else if(gt.rules.mode==MORNINGS_AFTERNOONS){
2048 		menuMisc_time_constraints->addAction(dataTimeConstraintsBasicCompulsoryTimeAction);
2049 		menuMisc_time_constraints->addAction(dataTimeConstraintsBreakTimesAction);
2050 
2051 		menuA_teacher_1_time_constraints=new QMenu(menuTeachers_time_constraints);
2052 		menuA_teacher_2_time_constraints=new QMenu(menuTeachers_time_constraints);
2053 		menuAll_teachers_1_time_constraints=new QMenu(menuTeachers_time_constraints);
2054 		menuAll_teachers_2_time_constraints=new QMenu(menuTeachers_time_constraints);
2055 		//
2056 		menuA_students_set_1_time_constraints=new QMenu(menuStudents_time_constraints);
2057 		menuA_students_set_2_time_constraints=new QMenu(menuStudents_time_constraints);
2058 		menuAll_students_1_time_constraints=new QMenu(menuStudents_time_constraints);
2059 		menuAll_students_2_time_constraints=new QMenu(menuStudents_time_constraints);
2060 		//
2061 		menuTeachers_time_constraints->addMenu(menuA_teacher_1_time_constraints);
2062 		menuTeachers_time_constraints->addMenu(menuA_teacher_2_time_constraints);
2063 		menuTeachers_time_constraints->addMenu(menuAll_teachers_1_time_constraints);
2064 		menuTeachers_time_constraints->addMenu(menuAll_teachers_2_time_constraints);
2065 		//
2066 		menuStudents_time_constraints->addMenu(menuA_students_set_1_time_constraints);
2067 		menuStudents_time_constraints->addMenu(menuA_students_set_2_time_constraints);
2068 		menuStudents_time_constraints->addMenu(menuAll_students_1_time_constraints);
2069 		menuStudents_time_constraints->addMenu(menuAll_students_2_time_constraints);
2070 		//
2071 		menuA_teacher_1_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "A teacher (1)", nullptr));
2072 		menuA_teacher_2_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "A teacher (2)", nullptr));
2073 		menuAll_teachers_1_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "All teachers (1)", nullptr));
2074 		menuAll_teachers_2_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "All teachers (2)", nullptr));
2075 		//
2076 		menuA_students_set_1_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "A students set (1)", nullptr));
2077 		menuA_students_set_2_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "A students set (2)", nullptr));
2078 		menuAll_students_1_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "All students (1)", nullptr));
2079 		menuAll_students_2_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "All students (2)", nullptr));
2080 
2081 		menuA_teacher_1_time_constraints->addAction(dataTimeConstraintsTeacherNotAvailableTimesAction);
2082 		menuA_teacher_1_time_constraints->addSeparator();
2083 
2084 		menuA_teacher_1_time_constraints->addAction(dataTimeConstraintsTeacherMaxDaysPerWeekAction);
2085 		menuA_teacher_1_time_constraints->addAction(dataTimeConstraintsTeacherMaxRealDaysPerWeekAction);
2086 		menuA_teacher_1_time_constraints->addAction(dataTimeConstraintsTeacherMaxMorningsPerWeekAction);
2087 		menuA_teacher_1_time_constraints->addAction(dataTimeConstraintsTeacherMaxAfternoonsPerWeekAction);
2088 
2089 		menuA_teacher_1_time_constraints->addAction(dataTimeConstraintsTeacherMaxThreeConsecutiveDaysAction);
2090 
2091 		menuA_teacher_1_time_constraints->addAction(dataTimeConstraintsTeacherMaxTwoConsecutiveMorningsAction);
2092 		menuA_teacher_1_time_constraints->addAction(dataTimeConstraintsTeacherMaxTwoConsecutiveAfternoonsAction);
2093 
2094 		menuA_teacher_1_time_constraints->addAction(dataTimeConstraintsTeacherMinRealDaysPerWeekAction);
2095 		menuA_teacher_1_time_constraints->addAction(dataTimeConstraintsTeacherMinMorningsPerWeekAction);
2096 		menuA_teacher_1_time_constraints->addAction(dataTimeConstraintsTeacherMinAfternoonsPerWeekAction);
2097 
2098 		menuA_teacher_1_time_constraints->addAction(dataTimeConstraintsTeacherMaxGapsPerDayAction);
2099 		menuA_teacher_1_time_constraints->addAction(dataTimeConstraintsTeacherMaxGapsPerMorningAndAfternoonAction);
2100 		menuA_teacher_1_time_constraints->addAction(dataTimeConstraintsTeacherMaxGapsPerWeekAction);
2101 
2102 		menuA_teacher_1_time_constraints->addAction(dataTimeConstraintsTeacherMaxGapsPerRealDayAction);
2103 		menuA_teacher_1_time_constraints->addAction(dataTimeConstraintsTeacherMaxGapsPerWeekForRealDaysAction);
2104 
2105 		menuA_teacher_1_time_constraints->addAction(dataTimeConstraintsTeacherMaxZeroGapsPerAfternoonAction);
2106 
2107 		menuA_teacher_1_time_constraints->addAction(dataTimeConstraintsTeacherMorningsEarlyMaxBeginningsAtSecondHourAction);
2108 		menuA_teacher_1_time_constraints->addAction(dataTimeConstraintsTeacherAfternoonsEarlyMaxBeginningsAtSecondHourAction);
2109 
2110 		menuA_teacher_2_time_constraints->addAction(dataTimeConstraintsTeacherMaxHoursDailyAction);
2111 		menuA_teacher_2_time_constraints->addAction(dataTimeConstraintsTeacherMaxHoursDailyRealDaysAction);
2112 		menuA_teacher_2_time_constraints->addAction(dataTimeConstraintsTeacherMaxSpanPerRealDayAction);
2113 
2114 		menuA_teacher_2_time_constraints->addAction(dataTimeConstraintsTeacherActivityTagMaxHoursDailyRealDaysAction);
2115 
2116 		menuA_teacher_2_time_constraints->addAction(dataTimeConstraintsTeacherMaxTwoActivityTagsPerDayFromN1N2N3Action);
2117 
2118 		menuA_teacher_2_time_constraints->addAction(dataTimeConstraintsTeacherMinHoursDailyAction);
2119 		menuA_teacher_2_time_constraints->addAction(dataTimeConstraintsTeacherMinHoursDailyRealDaysAction);
2120 		menuA_teacher_2_time_constraints->addAction(dataTimeConstraintsTeacherMinHoursPerMorningAction);
2121 
2122 		menuA_teacher_2_time_constraints->addAction(dataTimeConstraintsTeacherActivityTagMinHoursDailyAction);
2123 
2124 		menuA_teacher_2_time_constraints->addAction(dataTimeConstraintsTeacherMaxHoursContinuouslyAction);
2125 		menuA_teacher_2_time_constraints->addAction(dataTimeConstraintsTeacherActivityTagMaxHoursContinuouslyAction);
2126 
2127 		menuA_teacher_2_time_constraints->addAction(dataTimeConstraintsTeacherMinGapsBetweenOrderedPairOfActivityTagsAction);
2128 
2129 		menuA_teacher_2_time_constraints->addAction(dataTimeConstraintsTeacherIntervalMaxDaysPerWeekAction);
2130 		menuA_teacher_2_time_constraints->addAction(dataTimeConstraintsTeacherMorningIntervalMaxDaysPerWeekAction);
2131 		menuA_teacher_2_time_constraints->addAction(dataTimeConstraintsTeacherAfternoonIntervalMaxDaysPerWeekAction);
2132 
2133 		menuA_teacher_2_time_constraints->addAction(dataTimeConstraintsTeacherMaxHoursPerAllAfternoonsAction);
2134 
2135 		menuA_teacher_2_time_constraints->addAction(dataTimeConstraintsTeacherMinRestingHoursBetweenMorningAndAfternoonAction);
2136 
2137 		//all teachers
2138 		menuAll_teachers_1_time_constraints->addAction(dataTimeConstraintsTeachersMaxDaysPerWeekAction);
2139 		menuAll_teachers_1_time_constraints->addAction(dataTimeConstraintsTeachersMaxRealDaysPerWeekAction);
2140 		menuAll_teachers_1_time_constraints->addAction(dataTimeConstraintsTeachersMaxMorningsPerWeekAction);
2141 		menuAll_teachers_1_time_constraints->addAction(dataTimeConstraintsTeachersMaxAfternoonsPerWeekAction);
2142 
2143 		menuAll_teachers_1_time_constraints->addAction(dataTimeConstraintsTeachersMaxThreeConsecutiveDaysAction);
2144 
2145 		menuAll_teachers_1_time_constraints->addAction(dataTimeConstraintsTeachersMaxTwoConsecutiveMorningsAction);
2146 		menuAll_teachers_1_time_constraints->addAction(dataTimeConstraintsTeachersMaxTwoConsecutiveAfternoonsAction);
2147 
2148 		menuAll_teachers_1_time_constraints->addAction(dataTimeConstraintsTeachersMinRealDaysPerWeekAction);
2149 		menuAll_teachers_1_time_constraints->addAction(dataTimeConstraintsTeachersMinMorningsPerWeekAction);
2150 		menuAll_teachers_1_time_constraints->addAction(dataTimeConstraintsTeachersMinAfternoonsPerWeekAction);
2151 
2152 		menuAll_teachers_1_time_constraints->addAction(dataTimeConstraintsTeachersMaxGapsPerDayAction);
2153 		menuAll_teachers_1_time_constraints->addAction(dataTimeConstraintsTeachersMaxGapsPerMorningAndAfternoonAction);
2154 		menuAll_teachers_1_time_constraints->addAction(dataTimeConstraintsTeachersMaxGapsPerWeekAction);
2155 
2156 		menuAll_teachers_1_time_constraints->addAction(dataTimeConstraintsTeachersMaxGapsPerRealDayAction);
2157 		menuAll_teachers_1_time_constraints->addAction(dataTimeConstraintsTeachersMaxGapsPerWeekForRealDaysAction);
2158 
2159 		menuAll_teachers_1_time_constraints->addAction(dataTimeConstraintsTeachersMaxZeroGapsPerAfternoonAction);
2160 
2161 		menuAll_teachers_1_time_constraints->addAction(dataTimeConstraintsTeachersMorningsEarlyMaxBeginningsAtSecondHourAction);
2162 		menuAll_teachers_1_time_constraints->addAction(dataTimeConstraintsTeachersAfternoonsEarlyMaxBeginningsAtSecondHourAction);
2163 
2164 		menuAll_teachers_2_time_constraints->addAction(dataTimeConstraintsTeachersMaxHoursDailyAction);
2165 		menuAll_teachers_2_time_constraints->addAction(dataTimeConstraintsTeachersMaxHoursDailyRealDaysAction);
2166 		menuAll_teachers_2_time_constraints->addAction(dataTimeConstraintsTeachersMaxSpanPerRealDayAction);
2167 
2168 		menuAll_teachers_2_time_constraints->addAction(dataTimeConstraintsTeachersActivityTagMaxHoursDailyRealDaysAction);
2169 
2170 		menuAll_teachers_2_time_constraints->addAction(dataTimeConstraintsTeachersMaxTwoActivityTagsPerDayFromN1N2N3Action);
2171 
2172 		menuAll_teachers_2_time_constraints->addAction(dataTimeConstraintsTeachersMinHoursDailyAction);
2173 		menuAll_teachers_2_time_constraints->addAction(dataTimeConstraintsTeachersMinHoursDailyRealDaysAction);
2174 		menuAll_teachers_2_time_constraints->addAction(dataTimeConstraintsTeachersMinHoursPerMorningAction);
2175 
2176 		menuAll_teachers_2_time_constraints->addAction(dataTimeConstraintsTeachersActivityTagMinHoursDailyAction);
2177 
2178 		menuAll_teachers_2_time_constraints->addAction(dataTimeConstraintsTeachersMaxHoursContinuouslyAction);
2179 		menuAll_teachers_2_time_constraints->addAction(dataTimeConstraintsTeachersActivityTagMaxHoursContinuouslyAction);
2180 
2181 		menuAll_teachers_2_time_constraints->addAction(dataTimeConstraintsTeachersMinGapsBetweenOrderedPairOfActivityTagsAction);
2182 
2183 		menuAll_teachers_2_time_constraints->addAction(dataTimeConstraintsTeachersIntervalMaxDaysPerWeekAction);
2184 		menuAll_teachers_2_time_constraints->addAction(dataTimeConstraintsTeachersMorningIntervalMaxDaysPerWeekAction);
2185 		menuAll_teachers_2_time_constraints->addAction(dataTimeConstraintsTeachersAfternoonIntervalMaxDaysPerWeekAction);
2186 
2187 		menuAll_teachers_2_time_constraints->addAction(dataTimeConstraintsTeachersMaxHoursPerAllAfternoonsAction);
2188 
2189 		menuAll_teachers_2_time_constraints->addAction(dataTimeConstraintsTeachersMinRestingHoursBetweenMorningAndAfternoonAction);
2190 		/////////
2191 
2192 		menuA_students_set_1_time_constraints->addAction(dataTimeConstraintsStudentsSetNotAvailableTimesAction);
2193 		menuA_students_set_1_time_constraints->addSeparator();
2194 
2195 		menuA_students_set_1_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxDaysPerWeekAction);
2196 		menuA_students_set_1_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxRealDaysPerWeekAction);
2197 		menuA_students_set_1_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxMorningsPerWeekAction);
2198 		menuA_students_set_1_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxAfternoonsPerWeekAction);
2199 
2200 		menuA_students_set_1_time_constraints->addAction(dataTimeConstraintsStudentsSetMinMorningsPerWeekAction);
2201 		menuA_students_set_1_time_constraints->addAction(dataTimeConstraintsStudentsSetMinAfternoonsPerWeekAction);
2202 
2203 		menuA_students_set_1_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxGapsPerDayAction);
2204 		menuA_students_set_1_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxGapsPerWeekAction);
2205 
2206 		menuA_students_set_1_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxGapsPerRealDayAction);
2207 		menuA_students_set_1_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxGapsPerWeekForRealDaysAction);
2208 
2209 		menuA_students_set_1_time_constraints->addAction(dataTimeConstraintsStudentsSetEarlyMaxBeginningsAtSecondHourAction);
2210 		menuA_students_set_1_time_constraints->addAction(dataTimeConstraintsStudentsSetMorningsEarlyMaxBeginningsAtSecondHourAction);
2211 		menuA_students_set_1_time_constraints->addAction(dataTimeConstraintsStudentsSetAfternoonsEarlyMaxBeginningsAtSecondHourAction);
2212 
2213 		menuA_students_set_2_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxHoursDailyRealDaysAction);
2214 		menuA_students_set_2_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxSpanPerRealDayAction);
2215 		menuA_students_set_2_time_constraints->addAction(dataTimeConstraintsStudentsSetActivityTagMaxHoursDailyRealDaysAction);
2216 
2217 		menuA_students_set_2_time_constraints->addAction(dataTimeConstraintsStudentsSetMinHoursDailyAction);
2218 		menuA_students_set_2_time_constraints->addAction(dataTimeConstraintsStudentsSetMinHoursPerMorningAction);
2219 
2220 		menuA_students_set_2_time_constraints->addAction(dataTimeConstraintsStudentsSetActivityTagMinHoursDailyAction);
2221 
2222 		menuA_students_set_2_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxHoursContinuouslyAction);
2223 		menuA_students_set_2_time_constraints->addAction(dataTimeConstraintsStudentsSetActivityTagMaxHoursContinuouslyAction);
2224 
2225 		menuA_students_set_2_time_constraints->addAction(dataTimeConstraintsStudentsSetMinGapsBetweenOrderedPairOfActivityTagsAction);
2226 
2227 		menuA_students_set_2_time_constraints->addAction(dataTimeConstraintsStudentsSetIntervalMaxDaysPerWeekAction);
2228 		menuA_students_set_2_time_constraints->addAction(dataTimeConstraintsStudentsSetMorningIntervalMaxDaysPerWeekAction);
2229 		menuA_students_set_2_time_constraints->addAction(dataTimeConstraintsStudentsSetAfternoonIntervalMaxDaysPerWeekAction);
2230 
2231 		menuA_students_set_2_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxHoursPerAllAfternoonsAction);
2232 
2233 		menuA_students_set_2_time_constraints->addAction(dataTimeConstraintsStudentsSetMinRestingHoursBetweenMorningAndAfternoonAction);
2234 
2235 		///////
2236 		menuAll_students_1_time_constraints->addAction(dataTimeConstraintsStudentsMaxDaysPerWeekAction);
2237 		menuAll_students_1_time_constraints->addAction(dataTimeConstraintsStudentsMaxRealDaysPerWeekAction);
2238 		menuAll_students_1_time_constraints->addAction(dataTimeConstraintsStudentsMaxMorningsPerWeekAction);
2239 		menuAll_students_1_time_constraints->addAction(dataTimeConstraintsStudentsMaxAfternoonsPerWeekAction);
2240 
2241 		menuAll_students_1_time_constraints->addAction(dataTimeConstraintsStudentsMinMorningsPerWeekAction);
2242 		menuAll_students_1_time_constraints->addAction(dataTimeConstraintsStudentsMinAfternoonsPerWeekAction);
2243 
2244 		menuAll_students_1_time_constraints->addAction(dataTimeConstraintsStudentsMaxGapsPerDayAction);
2245 		menuAll_students_1_time_constraints->addAction(dataTimeConstraintsStudentsMaxGapsPerWeekAction);
2246 
2247 		menuAll_students_1_time_constraints->addAction(dataTimeConstraintsStudentsMaxGapsPerRealDayAction);
2248 		menuAll_students_1_time_constraints->addAction(dataTimeConstraintsStudentsMaxGapsPerWeekForRealDaysAction);
2249 
2250 		menuAll_students_1_time_constraints->addAction(dataTimeConstraintsStudentsEarlyMaxBeginningsAtSecondHourAction);
2251 		menuAll_students_1_time_constraints->addAction(dataTimeConstraintsStudentsMorningsEarlyMaxBeginningsAtSecondHourAction);
2252 		menuAll_students_1_time_constraints->addAction(dataTimeConstraintsStudentsAfternoonsEarlyMaxBeginningsAtSecondHourAction);
2253 
2254 		menuAll_students_2_time_constraints->addAction(dataTimeConstraintsStudentsMaxHoursDailyRealDaysAction);
2255 		menuAll_students_2_time_constraints->addAction(dataTimeConstraintsStudentsMaxSpanPerRealDayAction);
2256 		menuAll_students_2_time_constraints->addAction(dataTimeConstraintsStudentsActivityTagMaxHoursDailyRealDaysAction);
2257 
2258 		menuAll_students_2_time_constraints->addAction(dataTimeConstraintsStudentsMinHoursDailyAction);
2259 		menuAll_students_2_time_constraints->addAction(dataTimeConstraintsStudentsMinHoursPerMorningAction);
2260 
2261 		menuAll_students_2_time_constraints->addAction(dataTimeConstraintsStudentsActivityTagMinHoursDailyAction);
2262 
2263 		menuAll_students_2_time_constraints->addAction(dataTimeConstraintsStudentsMaxHoursContinuouslyAction);
2264 		menuAll_students_2_time_constraints->addAction(dataTimeConstraintsStudentsActivityTagMaxHoursContinuouslyAction);
2265 
2266 		menuAll_students_2_time_constraints->addAction(dataTimeConstraintsStudentsMinGapsBetweenOrderedPairOfActivityTagsAction);
2267 
2268 		menuAll_students_2_time_constraints->addAction(dataTimeConstraintsStudentsIntervalMaxDaysPerWeekAction);
2269 		menuAll_students_2_time_constraints->addAction(dataTimeConstraintsStudentsMorningIntervalMaxDaysPerWeekAction);
2270 		menuAll_students_2_time_constraints->addAction(dataTimeConstraintsStudentsAfternoonIntervalMaxDaysPerWeekAction);
2271 
2272 		menuAll_students_2_time_constraints->addAction(dataTimeConstraintsStudentsMaxHoursPerAllAfternoonsAction);
2273 
2274 		menuAll_students_2_time_constraints->addAction(dataTimeConstraintsStudentsMinRestingHoursBetweenMorningAndAfternoonAction);
2275 		///////
2276 
2277 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsActivityPreferredStartingTimeAction);
2278 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsActivityPreferredStartingTimesAction);
2279 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsActivityPreferredTimeSlotsAction);
2280 		menuActivities_preferred_times_time_constraints->addSeparator();
2281 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsActivitiesPreferredStartingTimesAction);
2282 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsActivitiesPreferredTimeSlotsAction);
2283 		menuActivities_preferred_times_time_constraints->addSeparator();
2284 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsSubactivitiesPreferredStartingTimesAction);
2285 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsSubactivitiesPreferredTimeSlotsAction);
2286 
2287 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsMinDaysBetweenActivitiesAction);
2288 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsMaxDaysBetweenActivitiesAction);
2289 		menuActivities_others_1_time_constraints->addSeparator();
2290 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivityEndsStudentsDayAction);
2291 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivitiesEndStudentsDayAction);
2292 		menuActivities_others_1_time_constraints->addSeparator();
2293 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivityEndsTeachersDayAction);
2294 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivitiesEndTeachersDayAction);
2295 		menuActivities_others_1_time_constraints->addSeparator();
2296 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivitiesSameStartingTimeAction);
2297 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivitiesSameStartingDayAction);
2298 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivitiesSameStartingHourAction);
2299 
2300 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsActivitiesOccupyMaxTimeSlotsFromSelectionAction);
2301 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsActivitiesOccupyMinTimeSlotsFromSelectionAction);
2302 		menuActivities_others_2_time_constraints->addSeparator();
2303 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsTwoActivitiesOrderedAction);
2304 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsTwoSetsOfActivitiesOrderedAction);
2305 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsTwoActivitiesOrderedIfSameDayAction);
2306 		menuActivities_others_2_time_constraints->addSeparator();
2307 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsTwoActivitiesConsecutiveAction);
2308 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsTwoActivitiesGroupedAction);
2309 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsThreeActivitiesGroupedAction);
2310 		menuActivities_others_2_time_constraints->addSeparator();
2311 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsActivitiesNotOverlappingAction);
2312 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsActivityTagsNotOverlappingAction);
2313 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsActivitiesMaxSimultaneousInSelectedTimeSlotsAction);
2314 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsActivitiesMinSimultaneousInSelectedTimeSlotsAction);
2315 		menuActivities_others_2_time_constraints->addSeparator();
2316 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsMinGapsBetweenActivitiesAction);
2317 
2318 		menuMisc_space_constraints->addAction(dataSpaceConstraintsBasicCompulsorySpaceAction);
2319 
2320 		menuRooms_space_constraints->addAction(dataSpaceConstraintsRoomNotAvailableTimesAction);
2321 		menuRooms_space_constraints->addAction(dataSpaceConstraintsTeacherRoomNotAvailableTimesAction);
2322 
2323 		menuActivities_space_constraints->addAction(dataSpaceConstraintsActivityPreferredRoomAction);
2324 		menuActivities_space_constraints->addAction(dataSpaceConstraintsActivityPreferredRoomsAction);
2325 		menuActivities_space_constraints->addSeparator();
2326 		menuActivities_space_constraints->addAction(dataSpaceConstraintsActivitiesSameRoomIfConsecutiveAction);
2327 		menuActivities_space_constraints->addAction(dataSpaceConstraintsActivitiesOccupyMaxDifferentRoomsAction);
2328 
2329 		menuSubjects_space_constraints->addAction(dataSpaceConstraintsSubjectPreferredRoomAction);
2330 		menuSubjects_space_constraints->addAction(dataSpaceConstraintsSubjectPreferredRoomsAction);
2331 
2332 		menuSubjects_and_activity_tags_space_constraints->addAction(dataSpaceConstraintsSubjectActivityTagPreferredRoomAction);
2333 		menuSubjects_and_activity_tags_space_constraints->addAction(dataSpaceConstraintsSubjectActivityTagPreferredRoomsAction);
2334 
2335 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetHomeRoomAction);
2336 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetHomeRoomsAction);
2337 		menuStudents_space_constraints->addSeparator();
2338 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetMaxRoomChangesPerDayAction);
2339 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetMaxRoomChangesPerWeekAction);
2340 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetMinGapsBetweenRoomChangesAction);
2341 		menuStudents_space_constraints->addSeparator();
2342 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetMaxRoomChangesPerRealDayAction);
2343 		menuStudents_space_constraints->addSeparator();
2344 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetMaxBuildingChangesPerDayAction);
2345 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetMaxBuildingChangesPerWeekAction);
2346 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetMinGapsBetweenBuildingChangesAction);
2347 		menuStudents_space_constraints->addSeparator();
2348 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsMaxRoomChangesPerDayAction);
2349 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsMaxRoomChangesPerWeekAction);
2350 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsMinGapsBetweenRoomChangesAction);
2351 		menuStudents_space_constraints->addSeparator();
2352 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsMaxRoomChangesPerRealDayAction);
2353 		menuStudents_space_constraints->addSeparator();
2354 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsMaxBuildingChangesPerDayAction);
2355 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsMaxBuildingChangesPerWeekAction);
2356 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsMinGapsBetweenBuildingChangesAction);
2357 
2358 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherHomeRoomAction);
2359 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherHomeRoomsAction);
2360 		menuTeachers_space_constraints->addSeparator();
2361 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherMaxRoomChangesPerDayAction);
2362 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherMaxRoomChangesPerWeekAction);
2363 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherMinGapsBetweenRoomChangesAction);
2364 		menuTeachers_space_constraints->addSeparator();
2365 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherMaxRoomChangesPerRealDayAction);
2366 		menuTeachers_space_constraints->addSeparator();
2367 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherMaxBuildingChangesPerDayAction);
2368 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherMaxBuildingChangesPerWeekAction);
2369 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherMinGapsBetweenBuildingChangesAction);
2370 		menuTeachers_space_constraints->addSeparator();
2371 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeachersMaxRoomChangesPerDayAction);
2372 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeachersMaxRoomChangesPerWeekAction);
2373 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeachersMinGapsBetweenRoomChangesAction);
2374 		menuTeachers_space_constraints->addSeparator();
2375 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeachersMaxRoomChangesPerRealDayAction);
2376 		menuTeachers_space_constraints->addSeparator();
2377 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeachersMaxBuildingChangesPerDayAction);
2378 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeachersMaxBuildingChangesPerWeekAction);
2379 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeachersMinGapsBetweenBuildingChangesAction);
2380 
2381 		menuActivity_tags_space_constraints->addAction(dataSpaceConstraintsActivityTagPreferredRoomAction);
2382 		menuActivity_tags_space_constraints->addAction(dataSpaceConstraintsActivityTagPreferredRoomsAction);
2383 	}
2384 	else if(gt.rules.mode==BLOCK_PLANNING){
2385 		menuMisc_time_constraints->addAction(dataTimeConstraintsBasicCompulsoryTimeAction);
2386 		menuMisc_time_constraints->addAction(dataTimeConstraintsBreakTimesAction);
2387 
2388 		menuA_teacher_time_constraints=new QMenu(menuTeachers_time_constraints);
2389 		menuAll_teachers_time_constraints=new QMenu(menuTeachers_time_constraints);
2390 		//
2391 		menuA_students_set_time_constraints=new QMenu(menuStudents_time_constraints);
2392 		menuAll_students_time_constraints=new QMenu(menuStudents_time_constraints);
2393 		//
2394 		menuTeachers_time_constraints->addMenu(menuA_teacher_time_constraints);
2395 		menuTeachers_time_constraints->addMenu(menuAll_teachers_time_constraints);
2396 		//
2397 		menuStudents_time_constraints->addMenu(menuA_students_set_time_constraints);
2398 		menuStudents_time_constraints->addMenu(menuAll_students_time_constraints);
2399 		//
2400 		menuA_teacher_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "A teacher", nullptr));
2401 		menuAll_teachers_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "All teachers", nullptr));
2402 		//
2403 		menuA_students_set_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "A students set", nullptr));
2404 		menuAll_students_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "All students", nullptr));
2405 
2406 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherNotAvailableTimesAction);
2407 		menuA_teacher_time_constraints->addSeparator();
2408 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMaxDaysPerWeekAction);
2409 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMinDaysPerWeekAction);
2410 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMaxGapsPerDayAction);
2411 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMaxGapsPerWeekAction);
2412 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMaxHoursDailyAction);
2413 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMaxSpanPerDayAction);
2414 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherActivityTagMaxHoursDailyAction);
2415 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMinHoursDailyAction);
2416 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherActivityTagMinHoursDailyAction);
2417 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMaxHoursContinuouslyAction);
2418 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherActivityTagMaxHoursContinuouslyAction);
2419 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMinGapsBetweenOrderedPairOfActivityTagsAction);
2420 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherIntervalMaxDaysPerWeekAction);
2421 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMinRestingHoursAction);
2422 
2423 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMaxDaysPerWeekAction);
2424 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMinDaysPerWeekAction);
2425 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMaxGapsPerDayAction);
2426 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMaxGapsPerWeekAction);
2427 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMaxHoursDailyAction);
2428 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMaxSpanPerDayAction);
2429 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersActivityTagMaxHoursDailyAction);
2430 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMinHoursDailyAction);
2431 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersActivityTagMinHoursDailyAction);
2432 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMaxHoursContinuouslyAction);
2433 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersActivityTagMaxHoursContinuouslyAction);
2434 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMinGapsBetweenOrderedPairOfActivityTagsAction);
2435 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersIntervalMaxDaysPerWeekAction);
2436 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMinRestingHoursAction);
2437 
2438 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetNotAvailableTimesAction);
2439 		menuA_students_set_time_constraints->addSeparator();
2440 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxDaysPerWeekAction);
2441 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxGapsPerDayAction);
2442 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxGapsPerWeekAction);
2443 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetEarlyMaxBeginningsAtSecondHourAction);
2444 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxHoursDailyAction);
2445 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxSpanPerDayAction);
2446 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetActivityTagMaxHoursDailyAction);
2447 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetMinHoursDailyAction);
2448 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetActivityTagMinHoursDailyAction);
2449 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxHoursContinuouslyAction);
2450 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetActivityTagMaxHoursContinuouslyAction);
2451 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetMinGapsBetweenOrderedPairOfActivityTagsAction);
2452 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetIntervalMaxDaysPerWeekAction);
2453 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetMinRestingHoursAction);
2454 
2455 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsMaxDaysPerWeekAction);
2456 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsMaxGapsPerDayAction);
2457 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsMaxGapsPerWeekAction);
2458 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsEarlyMaxBeginningsAtSecondHourAction);
2459 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsMaxHoursDailyAction);
2460 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsMaxSpanPerDayAction);
2461 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsActivityTagMaxHoursDailyAction);
2462 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsMinHoursDailyAction);
2463 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsActivityTagMinHoursDailyAction);
2464 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsMaxHoursContinuouslyAction);
2465 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsActivityTagMaxHoursContinuouslyAction);
2466 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsMinGapsBetweenOrderedPairOfActivityTagsAction);
2467 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsIntervalMaxDaysPerWeekAction);
2468 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsMinRestingHoursAction);
2469 
2470 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsActivityPreferredStartingTimeAction);
2471 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsActivityPreferredStartingTimesAction);
2472 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsActivityPreferredTimeSlotsAction);
2473 		menuActivities_preferred_times_time_constraints->addSeparator();
2474 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsActivitiesPreferredStartingTimesAction);
2475 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsActivitiesPreferredTimeSlotsAction);
2476 		menuActivities_preferred_times_time_constraints->addSeparator();
2477 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsSubactivitiesPreferredStartingTimesAction);
2478 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsSubactivitiesPreferredTimeSlotsAction);
2479 
2480 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsMinDaysBetweenActivitiesAction);
2481 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsMaxDaysBetweenActivitiesAction);
2482 		menuActivities_others_1_time_constraints->addSeparator();
2483 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivityEndsStudentsDayAction);
2484 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivitiesEndStudentsDayAction);
2485 		menuActivities_others_1_time_constraints->addSeparator();
2486 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivityEndsTeachersDayAction);
2487 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivitiesEndTeachersDayAction);
2488 		menuActivities_others_1_time_constraints->addSeparator();
2489 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivitiesSameStartingTimeAction);
2490 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivitiesSameStartingDayAction);
2491 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivitiesSameStartingHourAction);
2492 
2493 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsActivitiesOccupyMaxTimeSlotsFromSelectionAction);
2494 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsActivitiesOccupyMinTimeSlotsFromSelectionAction);
2495 		menuActivities_others_2_time_constraints->addSeparator();
2496 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsMaxTotalActivitiesFromSetInSelectedTimeSlotsAction);
2497 		menuActivities_others_2_time_constraints->addSeparator();
2498 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsTwoActivitiesOrderedAction);
2499 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsTwoSetsOfActivitiesOrderedAction);
2500 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsTwoActivitiesOrderedIfSameDayAction);
2501 		menuActivities_others_2_time_constraints->addSeparator();
2502 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsTwoActivitiesConsecutiveAction);
2503 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsTwoActivitiesGroupedAction);
2504 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsThreeActivitiesGroupedAction);
2505 		menuActivities_others_2_time_constraints->addSeparator();
2506 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsActivitiesNotOverlappingAction);
2507 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsActivityTagsNotOverlappingAction);
2508 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsActivitiesMaxSimultaneousInSelectedTimeSlotsAction);
2509 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsActivitiesMinSimultaneousInSelectedTimeSlotsAction);
2510 		menuActivities_others_2_time_constraints->addSeparator();
2511 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsMinGapsBetweenActivitiesAction);
2512 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsMaxGapsBetweenActivitiesAction);
2513 
2514 		menuMisc_space_constraints->addAction(dataSpaceConstraintsBasicCompulsorySpaceAction);
2515 
2516 		menuRooms_space_constraints->addAction(dataSpaceConstraintsRoomNotAvailableTimesAction);
2517 		menuRooms_space_constraints->addAction(dataSpaceConstraintsTeacherRoomNotAvailableTimesAction);
2518 
2519 		menuActivities_space_constraints->addAction(dataSpaceConstraintsActivityPreferredRoomAction);
2520 		menuActivities_space_constraints->addAction(dataSpaceConstraintsActivityPreferredRoomsAction);
2521 		menuActivities_space_constraints->addSeparator();
2522 		menuActivities_space_constraints->addAction(dataSpaceConstraintsActivitiesSameRoomIfConsecutiveAction);
2523 		menuActivities_space_constraints->addAction(dataSpaceConstraintsActivitiesOccupyMaxDifferentRoomsAction);
2524 
2525 		menuSubjects_space_constraints->addAction(dataSpaceConstraintsSubjectPreferredRoomAction);
2526 		menuSubjects_space_constraints->addAction(dataSpaceConstraintsSubjectPreferredRoomsAction);
2527 
2528 		menuSubjects_and_activity_tags_space_constraints->addAction(dataSpaceConstraintsSubjectActivityTagPreferredRoomAction);
2529 		menuSubjects_and_activity_tags_space_constraints->addAction(dataSpaceConstraintsSubjectActivityTagPreferredRoomsAction);
2530 
2531 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetHomeRoomAction);
2532 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetHomeRoomsAction);
2533 		menuStudents_space_constraints->addSeparator();
2534 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetMaxRoomChangesPerDayAction);
2535 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetMaxRoomChangesPerWeekAction);
2536 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetMinGapsBetweenRoomChangesAction);
2537 		menuStudents_space_constraints->addSeparator();
2538 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetMaxBuildingChangesPerDayAction);
2539 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetMaxBuildingChangesPerWeekAction);
2540 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetMinGapsBetweenBuildingChangesAction);
2541 		menuStudents_space_constraints->addSeparator();
2542 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsMaxRoomChangesPerDayAction);
2543 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsMaxRoomChangesPerWeekAction);
2544 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsMinGapsBetweenRoomChangesAction);
2545 		menuStudents_space_constraints->addSeparator();
2546 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsMaxBuildingChangesPerDayAction);
2547 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsMaxBuildingChangesPerWeekAction);
2548 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsMinGapsBetweenBuildingChangesAction);
2549 
2550 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherHomeRoomAction);
2551 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherHomeRoomsAction);
2552 		menuTeachers_space_constraints->addSeparator();
2553 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherMaxRoomChangesPerDayAction);
2554 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherMaxRoomChangesPerWeekAction);
2555 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherMinGapsBetweenRoomChangesAction);
2556 		menuTeachers_space_constraints->addSeparator();
2557 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherMaxBuildingChangesPerDayAction);
2558 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherMaxBuildingChangesPerWeekAction);
2559 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherMinGapsBetweenBuildingChangesAction);
2560 		menuTeachers_space_constraints->addSeparator();
2561 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeachersMaxRoomChangesPerDayAction);
2562 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeachersMaxRoomChangesPerWeekAction);
2563 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeachersMinGapsBetweenRoomChangesAction);
2564 		menuTeachers_space_constraints->addSeparator();
2565 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeachersMaxBuildingChangesPerDayAction);
2566 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeachersMaxBuildingChangesPerWeekAction);
2567 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeachersMinGapsBetweenBuildingChangesAction);
2568 
2569 		menuActivity_tags_space_constraints->addAction(dataSpaceConstraintsActivityTagPreferredRoomAction);
2570 		menuActivity_tags_space_constraints->addAction(dataSpaceConstraintsActivityTagPreferredRoomsAction);
2571 	}
2572 	else if(gt.rules.mode==TERMS){
2573 		menuMisc_time_constraints->addAction(dataTimeConstraintsBasicCompulsoryTimeAction);
2574 		menuMisc_time_constraints->addAction(dataTimeConstraintsBreakTimesAction);
2575 
2576 		menuA_teacher_time_constraints=new QMenu(menuTeachers_time_constraints);
2577 		menuAll_teachers_time_constraints=new QMenu(menuTeachers_time_constraints);
2578 		//
2579 		menuA_students_set_time_constraints=new QMenu(menuStudents_time_constraints);
2580 		menuAll_students_time_constraints=new QMenu(menuStudents_time_constraints);
2581 		//
2582 		menuTeachers_time_constraints->addMenu(menuA_teacher_time_constraints);
2583 		menuTeachers_time_constraints->addMenu(menuAll_teachers_time_constraints);
2584 		//
2585 		menuStudents_time_constraints->addMenu(menuA_students_set_time_constraints);
2586 		menuStudents_time_constraints->addMenu(menuAll_students_time_constraints);
2587 		//
2588 		menuA_teacher_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "A teacher", nullptr));
2589 		menuAll_teachers_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "All teachers", nullptr));
2590 		//
2591 		menuA_students_set_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "A students set", nullptr));
2592 		menuAll_students_time_constraints->setTitle(QCoreApplication::translate("FetMainForm_template", "All students", nullptr));
2593 
2594 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherNotAvailableTimesAction);
2595 		menuA_teacher_time_constraints->addSeparator();
2596 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMaxDaysPerWeekAction);
2597 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMinDaysPerWeekAction);
2598 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMaxGapsPerDayAction);
2599 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMaxGapsPerWeekAction);
2600 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMaxHoursDailyAction);
2601 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMaxSpanPerDayAction);
2602 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherActivityTagMaxHoursDailyAction);
2603 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMinHoursDailyAction);
2604 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherActivityTagMinHoursDailyAction);
2605 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMaxHoursContinuouslyAction);
2606 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherActivityTagMaxHoursContinuouslyAction);
2607 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMinGapsBetweenOrderedPairOfActivityTagsAction);
2608 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherIntervalMaxDaysPerWeekAction);
2609 		menuA_teacher_time_constraints->addAction(dataTimeConstraintsTeacherMinRestingHoursAction);
2610 
2611 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMaxDaysPerWeekAction);
2612 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMinDaysPerWeekAction);
2613 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMaxGapsPerDayAction);
2614 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMaxGapsPerWeekAction);
2615 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMaxHoursDailyAction);
2616 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMaxSpanPerDayAction);
2617 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersActivityTagMaxHoursDailyAction);
2618 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMinHoursDailyAction);
2619 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersActivityTagMinHoursDailyAction);
2620 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMaxHoursContinuouslyAction);
2621 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersActivityTagMaxHoursContinuouslyAction);
2622 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMinGapsBetweenOrderedPairOfActivityTagsAction);
2623 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersIntervalMaxDaysPerWeekAction);
2624 		menuAll_teachers_time_constraints->addAction(dataTimeConstraintsTeachersMinRestingHoursAction);
2625 
2626 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetNotAvailableTimesAction);
2627 		menuA_students_set_time_constraints->addSeparator();
2628 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxDaysPerWeekAction);
2629 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxGapsPerDayAction);
2630 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxGapsPerWeekAction);
2631 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetEarlyMaxBeginningsAtSecondHourAction);
2632 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxHoursDailyAction);
2633 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxSpanPerDayAction);
2634 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetActivityTagMaxHoursDailyAction);
2635 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetMinHoursDailyAction);
2636 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetActivityTagMinHoursDailyAction);
2637 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetMaxHoursContinuouslyAction);
2638 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetActivityTagMaxHoursContinuouslyAction);
2639 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetMinGapsBetweenOrderedPairOfActivityTagsAction);
2640 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetIntervalMaxDaysPerWeekAction);
2641 		menuA_students_set_time_constraints->addAction(dataTimeConstraintsStudentsSetMinRestingHoursAction);
2642 
2643 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsMaxDaysPerWeekAction);
2644 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsMaxGapsPerDayAction);
2645 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsMaxGapsPerWeekAction);
2646 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsEarlyMaxBeginningsAtSecondHourAction);
2647 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsMaxHoursDailyAction);
2648 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsMaxSpanPerDayAction);
2649 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsActivityTagMaxHoursDailyAction);
2650 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsMinHoursDailyAction);
2651 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsActivityTagMinHoursDailyAction);
2652 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsMaxHoursContinuouslyAction);
2653 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsActivityTagMaxHoursContinuouslyAction);
2654 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsMinGapsBetweenOrderedPairOfActivityTagsAction);
2655 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsIntervalMaxDaysPerWeekAction);
2656 		menuAll_students_time_constraints->addAction(dataTimeConstraintsStudentsMinRestingHoursAction);
2657 
2658 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsActivityPreferredStartingTimeAction);
2659 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsActivityPreferredStartingTimesAction);
2660 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsActivityPreferredTimeSlotsAction);
2661 		menuActivities_preferred_times_time_constraints->addSeparator();
2662 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsActivitiesPreferredStartingTimesAction);
2663 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsActivitiesPreferredTimeSlotsAction);
2664 		menuActivities_preferred_times_time_constraints->addSeparator();
2665 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsSubactivitiesPreferredStartingTimesAction);
2666 		menuActivities_preferred_times_time_constraints->addAction(dataTimeConstraintsSubactivitiesPreferredTimeSlotsAction);
2667 
2668 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsMinDaysBetweenActivitiesAction);
2669 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsMaxDaysBetweenActivitiesAction);
2670 		menuActivities_others_1_time_constraints->addSeparator();
2671 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivityEndsStudentsDayAction);
2672 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivitiesEndStudentsDayAction);
2673 		menuActivities_others_1_time_constraints->addSeparator();
2674 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivityEndsTeachersDayAction);
2675 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivitiesEndTeachersDayAction);
2676 		menuActivities_others_1_time_constraints->addSeparator();
2677 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivitiesSameStartingTimeAction);
2678 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivitiesSameStartingDayAction);
2679 		menuActivities_others_1_time_constraints->addAction(dataTimeConstraintsActivitiesSameStartingHourAction);
2680 
2681 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsActivitiesOccupyMaxTimeSlotsFromSelectionAction);
2682 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsActivitiesOccupyMinTimeSlotsFromSelectionAction);
2683 		menuActivities_others_2_time_constraints->addSeparator();
2684 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsTwoActivitiesOrderedAction);
2685 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsTwoSetsOfActivitiesOrderedAction);
2686 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsTwoActivitiesOrderedIfSameDayAction);
2687 		menuActivities_others_2_time_constraints->addSeparator();
2688 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsTwoActivitiesConsecutiveAction);
2689 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsTwoActivitiesGroupedAction);
2690 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsThreeActivitiesGroupedAction);
2691 		menuActivities_others_2_time_constraints->addSeparator();
2692 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsActivitiesNotOverlappingAction);
2693 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsActivityTagsNotOverlappingAction);
2694 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsActivitiesMaxSimultaneousInSelectedTimeSlotsAction);
2695 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsActivitiesMinSimultaneousInSelectedTimeSlotsAction);
2696 		menuActivities_others_2_time_constraints->addSeparator();
2697 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsMinGapsBetweenActivitiesAction);
2698 		menuActivities_others_2_time_constraints->addSeparator();
2699 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsActivitiesMaxInATermAction);
2700 		menuActivities_others_2_time_constraints->addAction(dataTimeConstraintsActivitiesOccupyMaxTermsAction);
2701 
2702 		menuMisc_space_constraints->addAction(dataSpaceConstraintsBasicCompulsorySpaceAction);
2703 
2704 		menuRooms_space_constraints->addAction(dataSpaceConstraintsRoomNotAvailableTimesAction);
2705 		menuRooms_space_constraints->addAction(dataSpaceConstraintsTeacherRoomNotAvailableTimesAction);
2706 
2707 		menuActivities_space_constraints->addAction(dataSpaceConstraintsActivityPreferredRoomAction);
2708 		menuActivities_space_constraints->addAction(dataSpaceConstraintsActivityPreferredRoomsAction);
2709 		menuActivities_space_constraints->addSeparator();
2710 		menuActivities_space_constraints->addAction(dataSpaceConstraintsActivitiesSameRoomIfConsecutiveAction);
2711 		menuActivities_space_constraints->addAction(dataSpaceConstraintsActivitiesOccupyMaxDifferentRoomsAction);
2712 
2713 		menuSubjects_space_constraints->addAction(dataSpaceConstraintsSubjectPreferredRoomAction);
2714 		menuSubjects_space_constraints->addAction(dataSpaceConstraintsSubjectPreferredRoomsAction);
2715 
2716 		menuSubjects_and_activity_tags_space_constraints->addAction(dataSpaceConstraintsSubjectActivityTagPreferredRoomAction);
2717 		menuSubjects_and_activity_tags_space_constraints->addAction(dataSpaceConstraintsSubjectActivityTagPreferredRoomsAction);
2718 
2719 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetHomeRoomAction);
2720 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetHomeRoomsAction);
2721 		menuStudents_space_constraints->addSeparator();
2722 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetMaxRoomChangesPerDayAction);
2723 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetMaxRoomChangesPerWeekAction);
2724 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetMinGapsBetweenRoomChangesAction);
2725 		menuStudents_space_constraints->addSeparator();
2726 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetMaxBuildingChangesPerDayAction);
2727 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetMaxBuildingChangesPerWeekAction);
2728 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsSetMinGapsBetweenBuildingChangesAction);
2729 		menuStudents_space_constraints->addSeparator();
2730 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsMaxRoomChangesPerDayAction);
2731 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsMaxRoomChangesPerWeekAction);
2732 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsMinGapsBetweenRoomChangesAction);
2733 		menuStudents_space_constraints->addSeparator();
2734 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsMaxBuildingChangesPerDayAction);
2735 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsMaxBuildingChangesPerWeekAction);
2736 		menuStudents_space_constraints->addAction(dataSpaceConstraintsStudentsMinGapsBetweenBuildingChangesAction);
2737 
2738 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherHomeRoomAction);
2739 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherHomeRoomsAction);
2740 		menuTeachers_space_constraints->addSeparator();
2741 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherMaxRoomChangesPerDayAction);
2742 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherMaxRoomChangesPerWeekAction);
2743 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherMinGapsBetweenRoomChangesAction);
2744 		menuTeachers_space_constraints->addSeparator();
2745 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherMaxBuildingChangesPerDayAction);
2746 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherMaxBuildingChangesPerWeekAction);
2747 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeacherMinGapsBetweenBuildingChangesAction);
2748 		menuTeachers_space_constraints->addSeparator();
2749 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeachersMaxRoomChangesPerDayAction);
2750 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeachersMaxRoomChangesPerWeekAction);
2751 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeachersMinGapsBetweenRoomChangesAction);
2752 		menuTeachers_space_constraints->addSeparator();
2753 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeachersMaxBuildingChangesPerDayAction);
2754 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeachersMaxBuildingChangesPerWeekAction);
2755 		menuTeachers_space_constraints->addAction(dataSpaceConstraintsTeachersMinGapsBetweenBuildingChangesAction);
2756 
2757 		menuActivity_tags_space_constraints->addAction(dataSpaceConstraintsActivityTagPreferredRoomAction);
2758 		menuActivity_tags_space_constraints->addAction(dataSpaceConstraintsActivityTagPreferredRoomsAction);
2759 	}
2760 	else{
2761 		assert(0);
2762 	}
2763 }
2764 
2765 void FetMainForm::setEnabledIcon(QAction* action, bool enabled)
2766 {
2767 	assert(action!=nullptr);
2768 
2769 	static QIcon locked(":/images/locked.png");
2770 	static QIcon unlocked(":/images/unlocked.png");
2771 
2772 	if(enabled)
2773 		action->setIcon(unlocked);
2774 	else
2775 		action->setIcon(locked);
2776 }
2777 
2778 //this is another place (out of two) in which you need to add a new language. The other one is in the file fet.cpp
2779 void FetMainForm::populateLanguagesMap(QMap<QString, QString>& languagesMap)
2780 {
2781 	languagesMap.clear();
2782 
2783 	languagesMap.insert("en_US", QString("US English"));
2784 	languagesMap.insert("en_GB", QString("British English"));
2785 
2786 	languagesMap.insert("ar", QString::fromUtf8("عربي"));
2787 	languagesMap.insert("ca", QString::fromUtf8("Català"));
2788 	languagesMap.insert("de", QString::fromUtf8("Deutsch"));
2789 	languagesMap.insert("el", QString::fromUtf8("Ελληνικά"));
2790 	languagesMap.insert("es", QString::fromUtf8("Español"));
2791 	languagesMap.insert("fr", QString::fromUtf8("Français"));
2792 	languagesMap.insert("id", QString::fromUtf8("Indonesia"));
2793 	languagesMap.insert("it", QString::fromUtf8("Italiano"));
2794 	languagesMap.insert("ro", QString::fromUtf8("Română"));
2795 	languagesMap.insert("uk", QString::fromUtf8("Українська"));
2796 	languagesMap.insert("pt_BR", QString::fromUtf8("Português Brasil"));
2797 	languagesMap.insert("da", QString::fromUtf8("Dansk"));
2798 	languagesMap.insert("sr", QString::fromUtf8("Српски"));
2799 	languagesMap.insert("gl", QString::fromUtf8("Galego"));
2800 	languagesMap.insert("vi", QString::fromUtf8("Tiếng Việt"));
2801 	languagesMap.insert("sq", QString::fromUtf8("Shqip"));
2802 	languagesMap.insert("zh_TW", QString::fromUtf8("正體字型"));
2803 	languagesMap.insert("cs", QString::fromUtf8("Český"));
2804 	languagesMap.insert("ja", QString::fromUtf8("日本語"));
2805 	languagesMap.insert("ru", QString::fromUtf8("Русский"));
2806 
2807 	//We need to write the following language names in their native language, as above:
2808 	languagesMap.insert("hu", QString("Hungarian"));
2809 	languagesMap.insert("lt", QString("Lithuanian"));
2810 	languagesMap.insert("mk", QString("Macedonian"));
2811 	languagesMap.insert("ms", QString("Malay"));
2812 	languagesMap.insert("nl", QString("Dutch"));
2813 	languagesMap.insert("pl", QString("Polish"));
2814 	languagesMap.insert("tr", QString("Turkish"));
2815 	languagesMap.insert("fa", QString("Persian"));
2816 	languagesMap.insert("si", QString("Sinhala"));
2817 	languagesMap.insert("sk", QString("Slovak"));
2818 	languagesMap.insert("he", QString("Hebrew"));
2819 	languagesMap.insert("uz", QString("Uzbek"));
2820 	languagesMap.insert("zh_CN", QString("Chinese Simplified"));
2821 	languagesMap.insert("eu", QString("Basque"));
2822 }
2823 
2824 void FetMainForm::enableNotPerfectMessage()
2825 {
2826 	QString s=tr("Constraint is not enabled. To use this type of constraint you must enable it from the Settings->Advanced menu.");
2827 	s+="\n\n";
2828 	s+=tr("Explanation:");
2829 	s+=" ";
2830 	s+=tr("Constraints of this type are good, working, but they are not perfectly optimized.");
2831 	s+=" ";
2832 	s+=tr("For some situations, the generation of the timetable may take too long or be impossible.");
2833 	s+="\n\n";
2834 	s+=tr("Use with caution.");
2835 
2836 	QMessageBox::information(this, tr("FET information"), s);
2837 }
2838 
2839 void FetMainForm::checkForUpdatesToggled(bool checked)
2840 {
2841 	if(checked==true){
2842 		QString s;
2843 		s+=tr("Please note that, by enabling this option, each time you start FET it will get the file %1 from the FET homepage, so the "
2844 			"request for this file will be visible on the server, along with your IP address and access time.")
2845 			.arg("https://lalescu.ro/liviu/fet/crtversion/crtversion.txt");
2846 		s+=" ";
2847 		s+=tr("Also, there will be visible on the server your current FET version, your operating system name and version, and your processor architecture type.");
2848 		s+=" ";
2849 		s+=tr("Thus, it could be deduced if and when you use FET.");
2850 		s+="\n\n";
2851 		s+=tr("Do you agree?");
2852 
2853 		QMessageBox::StandardButton b=QMessageBox::question(this, tr("FET question"), s, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
2854 
2855 		if(b!=QMessageBox::Yes){
2856 			disconnect(checkForUpdatesAction, SIGNAL(toggled(bool)), this, SLOT(checkForUpdatesToggled(bool)));
2857 			checkForUpdatesAction->setChecked(false);
2858 			connect(checkForUpdatesAction, SIGNAL(toggled(bool)), this, SLOT(checkForUpdatesToggled(bool)));
2859 			return;
2860 		}
2861 	}
2862 
2863 	checkForUpdates=checked;
2864 }
2865 
2866 void FetMainForm::useColorsToggled(bool checked)
2867 {
2868 	Q_UNUSED(checked);
2869 
2870 	USE_GUI_COLORS=settingsUseColorsAction->isChecked();
2871 
2872 	LockUnlock::increaseCommunicationSpinBox();
2873 }
2874 
2875 void FetMainForm::showSubgroupsInComboBoxesToggled(bool checked)
2876 {
2877 	if(checked==false){
2878 		QString s=tr("Note: if you disable this option, you will not be able to add/modify constraints for subgroups,"
2879 		 " and you will not be able to make filters using a particular subgroup, when selecting activities.");
2880 		//s+="\n\n";
2881 		//s+=tr("Continue only if you know what you are doing.");
2882 
2883 		QMessageBox::StandardButton b=QMessageBox::warning(this, tr("FET warning"), s, QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok);
2884 
2885 		if(b!=QMessageBox::Ok){
2886 			disconnect(settingsShowSubgroupsInComboBoxesAction, SIGNAL(toggled(bool)), this, SLOT(showSubgroupsInComboBoxesToggled(bool)));
2887 			settingsShowSubgroupsInComboBoxesAction->setChecked(true);
2888 			connect(settingsShowSubgroupsInComboBoxesAction, SIGNAL(toggled(bool)), this, SLOT(showSubgroupsInComboBoxesToggled(bool)));
2889 			return;
2890 		}
2891 	}
2892 
2893 	SHOW_SUBGROUPS_IN_COMBO_BOXES=checked;
2894 }
2895 
2896 void FetMainForm::showSubgroupsInActivityPlanningToggled(bool checked)
2897 {
2898 	if(checked==false){
2899 		QString s=tr("Note: if you disable this option, you will not be able to view activities for subgroups"
2900 		 " in the activity planning dialog.");
2901 		//s+="\n\n";
2902 		//s+=tr("Continue only if you know what you are doing.");
2903 
2904 		QMessageBox::StandardButton b=QMessageBox::warning(this, tr("FET warning"), s, QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok);
2905 
2906 		if(b!=QMessageBox::Ok){
2907 			disconnect(settingsShowSubgroupsInActivityPlanningAction, SIGNAL(toggled(bool)), this, SLOT(showSubgroupsInActivityPlanningToggled(bool)));
2908 			settingsShowSubgroupsInActivityPlanningAction->setChecked(true);
2909 			connect(settingsShowSubgroupsInActivityPlanningAction, SIGNAL(toggled(bool)), this, SLOT(showSubgroupsInActivityPlanningToggled(bool)));
2910 			return;
2911 		}
2912 	}
2913 
2914 	SHOW_SUBGROUPS_IN_ACTIVITY_PLANNING=checked;
2915 }
2916 
2917 void FetMainForm::on_modeOfficialAction_triggered()
2918 {
2919 	if(!gt.rules.initialized){
2920 		modeOfficialAction->setChecked(currentMode==OFFICIAL);
2921 		modeMorningsAfternoonsAction->setChecked(currentMode==MORNINGS_AFTERNOONS);
2922 		modeBlockPlanningAction->setChecked(currentMode==BLOCK_PLANNING);
2923 		modeTermsAction->setChecked(currentMode==TERMS);
2924 		QMessageBox::information(this, tr("FET information"),
2925 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
2926 		return;
2927 	}
2928 
2929 	if(gt.rules.mode==OFFICIAL){
2930 		modeOfficialAction->setChecked(true);
2931 
2932 		return;
2933 	}
2934 
2935 	QString s;
2936 	if(gt.rules.mode==MORNINGS_AFTERNOONS){
2937 		s=tr("Are you sure you want to convert your file to the official mode? This might involve data loss."
2938 		 " All the teachers will have uninitialized mornings-afternoons behavior. Also, the incompatible constraints will be removed.");
2939 	}
2940 	else if(gt.rules.mode==BLOCK_PLANNING){
2941 		s=tr("Are you sure you want to convert your file to the official mode? This might involve data loss."
2942 		 " The incompatible constraints will be removed.");
2943 	}
2944 	else if(gt.rules.mode==TERMS){
2945 		s=tr("Are you sure you want to convert your file to the official mode? This might involve data loss."
2946 		 " The incompatible constraints will be removed.");
2947 	}
2948 	else
2949 		assert(0);
2950 	int ok=QMessageBox::question(this, tr("FET confirmation"), s, QMessageBox::Cancel | QMessageBox::Ok);
2951 	if(ok==QMessageBox::Cancel){
2952 		modeOfficialAction->setChecked(false);
2953 		return;
2954 	}
2955 
2956 	bool ok2=getLastConfirmation(OFFICIAL);
2957 	if(!ok2){
2958 		modeOfficialAction->setChecked(false);
2959 		return;
2960 	}
2961 
2962 	gt.rules.setMode(OFFICIAL);
2963 	updateMode();
2964 }
2965 
2966 void FetMainForm::on_modeMorningsAfternoonsAction_triggered()
2967 {
2968 	if(!gt.rules.initialized){
2969 		modeOfficialAction->setChecked(currentMode==OFFICIAL);
2970 		modeMorningsAfternoonsAction->setChecked(currentMode==MORNINGS_AFTERNOONS);
2971 		modeBlockPlanningAction->setChecked(currentMode==BLOCK_PLANNING);
2972 		modeTermsAction->setChecked(currentMode==TERMS);
2973 		QMessageBox::information(this, tr("FET information"),
2974 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
2975 		return;
2976 	}
2977 
2978 	if(gt.rules.mode==MORNINGS_AFTERNOONS){
2979 		modeMorningsAfternoonsAction->setChecked(true);
2980 
2981 		return;
2982 	}
2983 
2984 	QString s;
2985 	if(gt.rules.mode==OFFICIAL){
2986 		s=tr("Are you sure you want to convert your file to the mornings-afternoons mode? This might involve data loss."
2987 		 " All the teachers with uninitialized mornings-afternoons behavior will have unrestricted mornings-afternoons behavior."
2988 		 " Also, the incompatible constraints will be removed.");
2989 	}
2990 	else if(gt.rules.mode==BLOCK_PLANNING){
2991 		s=tr("Are you sure you want to convert your file to the mornings-afternoons mode? This might involve data loss."
2992 		 " All the teachers with uninitialized mornings-afternoons behavior will have unrestricted mornings-afternoons behavior."
2993 		 " Also, the incompatible constraints will be removed.");
2994 	}
2995 	else if(gt.rules.mode==TERMS){
2996 		s=tr("Are you sure you want to convert your file to the mornings-afternoons mode? This might involve data loss."
2997 		 " All the teachers with uninitialized mornings-afternoons behavior will have unrestricted mornings-afternoons behavior."
2998 		 " Also, the incompatible constraints will be removed.");
2999 	}
3000 	else
3001 		assert(0);
3002 	int ok=QMessageBox::question(this, tr("FET confirmation"), s, QMessageBox::Cancel | QMessageBox::Ok);
3003 	if(ok==QMessageBox::Cancel){
3004 		modeMorningsAfternoonsAction->setChecked(false);
3005 		return;
3006 	}
3007 
3008 	bool ok2=getLastConfirmation(MORNINGS_AFTERNOONS);
3009 	if(!ok2){
3010 		modeMorningsAfternoonsAction->setChecked(false);
3011 		return;
3012 	}
3013 
3014 	gt.rules.setMode(MORNINGS_AFTERNOONS);
3015 	updateMode();
3016 }
3017 
3018 void FetMainForm::on_modeBlockPlanningAction_triggered()
3019 {
3020 	if(!gt.rules.initialized){
3021 		modeOfficialAction->setChecked(currentMode==OFFICIAL);
3022 		modeMorningsAfternoonsAction->setChecked(currentMode==MORNINGS_AFTERNOONS);
3023 		modeBlockPlanningAction->setChecked(currentMode==BLOCK_PLANNING);
3024 		modeTermsAction->setChecked(currentMode==TERMS);
3025 		QMessageBox::information(this, tr("FET information"),
3026 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
3027 		return;
3028 	}
3029 
3030 	if(gt.rules.mode==BLOCK_PLANNING){
3031 		modeBlockPlanningAction->setChecked(true);
3032 
3033 		return;
3034 	}
3035 
3036 	QString s;
3037 	if(gt.rules.mode==MORNINGS_AFTERNOONS){
3038 		s=tr("Are you sure you want to convert your file to the block-planning mode? This might involve data loss."
3039 		 " All the teachers will have uninitialized mornings-afternoons behavior. Also, the incompatible constraints will be removed.");
3040 	}
3041 	else if(gt.rules.mode==OFFICIAL){
3042 		s=tr("Are you sure you want to convert your file to the block-planning mode? This might involve data loss."
3043 		 " The incompatible constraints will be removed.");
3044 	}
3045 	else if(gt.rules.mode==TERMS){
3046 		s=tr("Are you sure you want to convert your file to the block-planning mode? This might involve data loss."
3047 		 " The incompatible constraints will be removed.");
3048 	}
3049 	else
3050 		assert(0);
3051 	s+="\n\n";
3052 
3053 	s+=tr("WARNING: In the block-planning mode, the basic time and space constraints are modified to consider that the FET hours are real-life time slots."
3054 	  " Consequently, they are much stronger and each row (FET hour, real-life time slot) for a students subgroup / room may have a single occupied slot out of all"
3055 	  " the FET days (real-life teachers). This might result in an impossible timetable if you intend to do usual timetabling.");
3056 
3057 	int ok=QMessageBox::question(this, tr("FET confirmation"), s, QMessageBox::Cancel | QMessageBox::Ok);
3058 	if(ok==QMessageBox::Cancel){
3059 		modeBlockPlanningAction->setChecked(false);
3060 		return;
3061 	}
3062 
3063 	bool ok2=getLastConfirmation(BLOCK_PLANNING);
3064 	if(!ok2){
3065 		modeBlockPlanningAction->setChecked(false);
3066 		return;
3067 	}
3068 
3069 	gt.rules.setMode(BLOCK_PLANNING);
3070 	updateMode();
3071 }
3072 
3073 void FetMainForm::on_modeTermsAction_triggered()
3074 {
3075 	if(!gt.rules.initialized){
3076 		modeOfficialAction->setChecked(currentMode==OFFICIAL);
3077 		modeMorningsAfternoonsAction->setChecked(currentMode==MORNINGS_AFTERNOONS);
3078 		modeBlockPlanningAction->setChecked(currentMode==BLOCK_PLANNING);
3079 		modeTermsAction->setChecked(currentMode==TERMS);
3080 		QMessageBox::information(this, tr("FET information"),
3081 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
3082 		return;
3083 	}
3084 
3085 	if(gt.rules.mode==TERMS){
3086 		modeTermsAction->setChecked(true);
3087 
3088 		return;
3089 	}
3090 
3091 	QString s;
3092 	if(gt.rules.mode==OFFICIAL){
3093 		s=tr("Are you sure you want to convert your file to the terms mode? This might involve data loss."
3094 		 " The incompatible constraints will be removed.");
3095 	}
3096 	else if(gt.rules.mode==MORNINGS_AFTERNOONS){
3097 		s=tr("Are you sure you want to convert your file to the terms mode? This might involve data loss."
3098 		 " All the teachers will have uninitialized mornings-afternoons behavior. Also, the incompatible constraints will be removed.");
3099 	}
3100 	else if(gt.rules.mode==BLOCK_PLANNING){
3101 		s=tr("Are you sure you want to convert your file to the terms mode? This might involve data loss."
3102 		 " The incompatible constraints will be removed.");
3103 	}
3104 	else
3105 		assert(0);
3106 	int ok=QMessageBox::question(this, tr("FET confirmation"), s, QMessageBox::Cancel | QMessageBox::Ok);
3107 	if(ok==QMessageBox::Cancel){
3108 		modeTermsAction->setChecked(false);
3109 		return;
3110 	}
3111 
3112 	bool ok2=getLastConfirmation(TERMS);
3113 	if(!ok2){
3114 		modeTermsAction->setChecked(false);
3115 		return;
3116 	}
3117 
3118 	gt.rules.setMode(TERMS);
3119 	updateMode();
3120 }
3121 
3122 void FetMainForm::on_dataTermsAction_triggered()
3123 {
3124 	assert(gt.rules.mode==TERMS);
3125 
3126 	if(!gt.rules.initialized){
3127 		QMessageBox::information(this, tr("FET information"),
3128 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
3129 		return;
3130 	}
3131 
3132 	if(simulation_running || simulation_running_multi){
3133 		QMessageBox::information(this, tr("FET information"),
3134 			tr("Allocation in course.\nPlease stop simulation before this."));
3135 		return;
3136 	}
3137 
3138 	TermsForm form(this);
3139 	setParentAndOtherThings(&form, this);
3140 	form.exec();
3141 }
3142 
3143 bool FetMainForm::getLastConfirmation(int newMode)
3144 {
3145 	QString removedTimeConstraintsString;
3146 	QString removedSpaceConstraintsString;
3147 
3148 	QList<TimeConstraint*> removedTimeConstraintsList;
3149 	for(TimeConstraint* tc : qAsConst(gt.rules.timeConstraintsList))
3150 		if((newMode==OFFICIAL && !tc->canBeUsedInOfficialMode())
3151 		 || (newMode==MORNINGS_AFTERNOONS && !tc->canBeUsedInMorningsAfternoonsMode())
3152 		 || (newMode==BLOCK_PLANNING && !tc->canBeUsedInBlockPlanningMode())
3153 		 || (newMode==TERMS && !tc->canBeUsedInTermsMode())){
3154 			removedTimeConstraintsList.append(tc);
3155 			removedTimeConstraintsString+=tc->getDetailedDescription(gt.rules)+"\n";
3156 		}
3157 
3158 	QList<SpaceConstraint*> removedSpaceConstraintsList;
3159 	for(SpaceConstraint* sc : qAsConst(gt.rules.spaceConstraintsList))
3160 		if((newMode==OFFICIAL && !sc->canBeUsedInOfficialMode())
3161 		 || (newMode==MORNINGS_AFTERNOONS && !sc->canBeUsedInMorningsAfternoonsMode())
3162 		 || (newMode==BLOCK_PLANNING && !sc->canBeUsedInBlockPlanningMode())
3163 		 || (newMode==TERMS && !sc->canBeUsedInTermsMode())){
3164 			removedSpaceConstraintsList.append(sc);
3165 			removedSpaceConstraintsString+=sc->getDetailedDescription(gt.rules)+"\n";
3166 		}
3167 
3168 	////////////
3169 	//last confirmation dialog
3170 	QDialog lastConfirmationDialog(this);
3171 	lastConfirmationDialog.setWindowTitle(tr("Last confirmation needed"));
3172 
3173 	QVBoxLayout* lastMainLayout=new QVBoxLayout(&lastConfirmationDialog);
3174 
3175 	QPushButton* lastpb1=new QPushButton(tr("Cancel"));
3176 	QPushButton* lastpb2=new QPushButton(tr("OK"));
3177 	QHBoxLayout* lastButtons=new QHBoxLayout();
3178 	lastButtons->addStretch();
3179 	lastButtons->addWidget(lastpb1);
3180 	lastButtons->addWidget(lastpb2);
3181 
3182 	////texts
3183 	QVBoxLayout* left=new QVBoxLayout();
3184 	QVBoxLayout* right=new QVBoxLayout();
3185 	QHBoxLayout* all=new QHBoxLayout();
3186 	all->addLayout(left);
3187 	all->addLayout(right);
3188 
3189 	QPlainTextEdit* remTim=new QPlainTextEdit();
3190 	remTim->setReadOnly(true);
3191 	remTim->setPlainText(removedTimeConstraintsString);
3192 	QLabel* labRemTim=new QLabel(tr("These %1 time constraints will be removed:").arg(removedTimeConstraintsList.count()));
3193 	labRemTim->setWordWrap(true);
3194 	labRemTim->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
3195 	left->addWidget(labRemTim);
3196 	left->addWidget(remTim);
3197 
3198 	QPlainTextEdit* remSpa=new QPlainTextEdit();
3199 	remSpa->setReadOnly(true);
3200 	remSpa->setPlainText(removedSpaceConstraintsString);
3201 	QLabel* labRemSpa=new QLabel(tr("These %1 space constraints will be removed:").arg(removedSpaceConstraintsList.count()));
3202 	labRemSpa->setWordWrap(true);
3203 	labRemSpa->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
3204 	right->addWidget(labRemSpa);
3205 	right->addWidget(remSpa);
3206 	////end texts
3207 
3208 	////////
3209 	lastMainLayout->addLayout(all);
3210 	//lastMainLayout->addStretch();
3211 	lastMainLayout->addLayout(lastButtons);
3212 
3213 	QObject::connect(lastpb2, SIGNAL(clicked()), &lastConfirmationDialog, SLOT(accept()));
3214 	QObject::connect(lastpb1, SIGNAL(clicked()), &lastConfirmationDialog, SLOT(reject()));
3215 
3216 	lastpb2->setDefault(true);
3217 	lastpb2->setFocus();
3218 
3219 	int lw=lastConfirmationDialog.sizeHint().width();
3220 	int lh=lastConfirmationDialog.sizeHint().height();
3221 	lastConfirmationDialog.resize(lw,lh);
3222 	centerWidgetOnScreen(&lastConfirmationDialog);
3223 	restoreFETDialogGeometry(&lastConfirmationDialog, QString("LastConfirmationChangeMode"));
3224 	int ok=lastConfirmationDialog.exec();
3225 	saveFETDialogGeometry(&lastConfirmationDialog, QString("LastConfirmationChangeMode"));
3226 	if(ok==QDialog::Rejected)
3227 		return false;
3228 	assert(ok==QDialog::Accepted);
3229 	////////////
3230 
3231 	int removedTime=removedTimeConstraintsList.count();
3232 	int removedSpace=removedSpaceConstraintsList.count();
3233 
3234 	bool t=gt.rules.removeTimeConstraints(removedTimeConstraintsList);
3235 	assert(t);
3236 
3237 	removedTimeConstraintsList.clear();
3238 
3239 	t=gt.rules.removeSpaceConstraints(removedSpaceConstraintsList);
3240 	assert(t);
3241 
3242 	removedSpaceConstraintsList.clear();
3243 
3244 	QMessageBox::information(&lastConfirmationDialog, tr("FET information"), tr("There were removed %1 time constraints and"
3245 	 " %2 space constraints.").arg(removedTime).arg(removedSpace));
3246 
3247 	LockUnlock::computeLockedUnlockedActivitiesTimeSpace();
3248 	LockUnlock::increaseCommunicationSpinBox();
3249 
3250 	return true;
3251 }
3252 
3253 /////////confirmations
3254 void FetMainForm::on_settingsConfirmActivityPlanningAction_toggled()
3255 {
3256 	CONFIRM_ACTIVITY_PLANNING=settingsConfirmActivityPlanningAction->isChecked();
3257 }
3258 
3259 void FetMainForm::on_settingsConfirmSpreadActivitiesAction_toggled()
3260 {
3261 	CONFIRM_SPREAD_ACTIVITIES=settingsConfirmSpreadActivitiesAction->isChecked();
3262 }
3263 
3264 void FetMainForm::on_settingsConfirmRemoveRedundantAction_toggled()
3265 {
3266 	CONFIRM_REMOVE_REDUNDANT=settingsConfirmRemoveRedundantAction->isChecked();
3267 }
3268 
3269 void FetMainForm::on_settingsConfirmSaveTimetableAction_toggled()
3270 {
3271 	CONFIRM_SAVE_TIMETABLE=settingsConfirmSaveTimetableAction->isChecked();
3272 }
3273 /////////
3274 
3275 void FetMainForm::on_settingsShowShortcutsOnMainWindowAction_toggled()
3276 {
3277 	SHOW_SHORTCUTS_ON_MAIN_WINDOW=settingsShowShortcutsOnMainWindowAction->isChecked();
3278 	tabWidget->setVisible(SHOW_SHORTCUTS_ON_MAIN_WINDOW);
3279 }
3280 
3281 void FetMainForm::on_settingsShowToolTipsForConstraintsWithTablesAction_toggled()
3282 {
3283 	SHOW_TOOLTIPS_FOR_CONSTRAINTS_WITH_TABLES=settingsShowToolTipsForConstraintsWithTablesAction->isChecked();
3284 }
3285 
3286 void FetMainForm::on_settingsDivideTimetablesByDaysAction_toggled()
3287 {
3288 	DIVIDE_HTML_TIMETABLES_WITH_TIME_AXIS_BY_DAYS=settingsDivideTimetablesByDaysAction->isChecked();
3289 }
3290 
3291 void FetMainForm::on_settingsDuplicateVerticalNamesAction_toggled()
3292 {
3293 	TIMETABLE_HTML_REPEAT_NAMES=settingsDuplicateVerticalNamesAction->isChecked();
3294 }
3295 
3296 void FetMainForm::on_timetablesToWriteOnDiskAction_triggered()
3297 {
3298 	if(simulation_running || simulation_running_multi){
3299 		QMessageBox::information(this, tr("FET information"),
3300 			tr("Allocation in course.\nPlease stop simulation before this."));
3301 		return;
3302 	}
3303 
3304 	TimetablesToWriteOnDiskForm form(this);
3305 	setParentAndOtherThings(&form, this);
3306 	form.exec();
3307 }
3308 
3309 void FetMainForm::on_studentsComboBoxesStyleAction_triggered()
3310 {
3311 	if(simulation_running || simulation_running_multi){
3312 		QMessageBox::information(this, tr("FET information"),
3313 			tr("Allocation in course.\nPlease stop simulation before this."));
3314 		return;
3315 	}
3316 
3317 	StudentsComboBoxesStyleForm form(this);
3318 	setParentAndOtherThings(&form, this);
3319 	form.exec();
3320 }
3321 
3322 void FetMainForm::replyFinished(QNetworkReply* networkReply)
3323 {
3324 	if(networkReply->error()!=QNetworkReply::NoError){
3325 		QString s=QString("");
3326 		s+=tr("Could not search for possible updates on the internet - error message is: %1.").arg(networkReply->errorString());
3327 		s+=QString("\n\n");
3328 		s+=tr("Searching for file %1.").arg("https://lalescu.ro/liviu/fet/crtversion/crtversion.txt");
3329 		s+=QString("\n\n");
3330 		s+=tr("Possible actions: check your network connection, try again later, try to visit FET homepage: %1, or"
3331 		 " try to search for the new FET page on the internet (maybe it has changed).").arg("https://lalescu.ro/liviu/fet/");
3332 
3333 		QMessageBox::warning(this, tr("FET warning"), s);
3334 	}
3335 	else{
3336 		QString internetVersion;
3337 		QString additionalComments;
3338 
3339 #if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
3340 		QRegularExpression regExp("^\\s*(\\S+)(.*)$");
3341 		QRegularExpressionMatch match=regExp.match(QString(networkReply->readAll()));
3342 		if(!match.hasMatch()){
3343 			QString s=QString("");
3344 			s+=tr("The file %1 from the FET homepage, indicating the current FET version, is incorrect.").arg("https://lalescu.ro/liviu/fet/crtversion/crtversion.txt");
3345 			s+=QString("\n\n");
3346 			s+=tr("Maybe the FET homepage has some temporary problems, so try again later."
3347 			 " Or maybe the current structure on FET homepage was changed. You may visit FET homepage: %1, and get latest version or,"
3348 			 " if it does not work, try to search for the new FET page on the internet (maybe it has changed).")
3349 			  .arg("https://lalescu.ro/liviu/fet/");
3350 
3351 			QMessageBox::warning(this, tr("FET warning"), s);
3352 		}
3353 		else{
3354 			internetVersion=match.captured(1);
3355 			additionalComments=match.captured(2).trimmed();
3356 #else
3357 		QRegExp regExp("^\\s*(\\S+)(.*)$");
3358 		int t=regExp.indexIn(QString(networkReply->readAll()));
3359 		if(t!=0){
3360 			QString s=QString("");
3361 			s+=tr("The file %1 from the FET homepage, indicating the current FET version, is incorrect.").arg("https://lalescu.ro/liviu/fet/crtversion/crtversion.txt");
3362 			s+=QString("\n\n");
3363 			s+=tr("Maybe the FET homepage has some temporary problems, so try again later."
3364 			 " Or maybe the current structure on FET homepage was changed. You may visit FET homepage: %1, and get latest version or,"
3365 			 " if it does not work, try to search for the new FET page on the internet (maybe it has changed).")
3366 			  .arg("https://lalescu.ro/liviu/fet/");
3367 
3368 			QMessageBox::warning(this, tr("FET warning"), s);
3369 		}
3370 		else{
3371 			internetVersion=regExp.cap(1);
3372 			additionalComments=regExp.cap(2).trimmed();
3373 #endif
3374 
3375 			if(VERBOSE){
3376 				std::cout<<"Your current version: '";
3377 				std::cout<<qPrintable(FET_VERSION)<<"'"<<std::endl;
3378 				std::cout<<"Latest version: '";
3379 				std::cout<<qPrintable(internetVersion)<<"'"<<std::endl;
3380 			}
3381 			if(internetVersion!=FET_VERSION){
3382 				QString s=tr("Another version: %1, is available on the FET homepage: %2", "%1 is new version, %2 is FET homepage").arg(internetVersion).arg("https://lalescu.ro/liviu/fet/");
3383 				s+=QString("\n\n");
3384 				s+=tr("You have to manually download and install.")+QString(" ")+tr("You may need to hit Refresh in your web browser.")+QString("\n\n")+tr("Would you like to open the FET homepage now?");
3385 				if(!additionalComments.isEmpty()){
3386 					s+=QString("\n\n");
3387 					s+=tr("Additional comments: %1").arg(additionalComments);
3388 				}
3389 
3390 				QMessageBox::StandardButton button=QMessageBox::information(this, tr("FET information"), s, QMessageBox::Yes|QMessageBox::No);
3391 
3392 				if(button==QMessageBox::Yes){
3393 					bool tds=QDesktopServices::openUrl(QUrl("https://lalescu.ro/liviu/fet/"));
3394 					if(!tds){
3395 						QMessageBox::warning(this, tr("FET warning"), tr("Could not start the default internet browser (trying to open the link %1)."
3396 							" Maybe you can try to manually start your browser and open this link.").arg("https://lalescu.ro/liviu/fet/"));
3397 					}
3398 				}
3399 			}
3400 		}
3401 	}
3402 
3403 	networkReply->deleteLater();
3404 }
3405 
3406 void FetMainForm::closeOtherWindows()
3407 {
3408 	QList<QWidget*> tlwl=qApp->topLevelWidgets();
3409 
3410 	for(QWidget* wi : qAsConst(tlwl))
3411 		if(wi->isVisible() && wi!=this)
3412 			wi->close();
3413 }
3414 
3415 void FetMainForm::closeEvent(QCloseEvent* event)
3416 {
3417 	//QRect rect(x(), y(), width(), height());
3418 	QRect rect=this->geometry();
3419 	mainFormSettingsRect=rect;
3420 
3421 	MAIN_FORM_SHORTCUTS_TAB_POSITION=tabWidget->currentIndex();
3422 
3423 	if(gt.rules.initialized && gt.rules.modified){
3424 		QMessageBox::StandardButton res=QMessageBox::question( this, tr("FET question"),
3425 		 tr("Your data file has been modified - do you want to save it?"), QMessageBox::Yes|QMessageBox::No|QMessageBox::Cancel);
3426 
3427 		if(res==QMessageBox::Yes){
3428 			bool t=this->fileSave();
3429 			if(!t){
3430 				event->ignore();
3431 			}
3432 			else{
3433 				closeOtherWindows();
3434 				event->accept();
3435 			}
3436 		}
3437 		else if(res==QMessageBox::No){
3438 			closeOtherWindows();
3439 			event->accept();
3440 		}
3441 		else{
3442 			assert(res==QMessageBox::Cancel);
3443 			event->ignore();
3444 		}
3445 	}
3446 	else{
3447 		closeOtherWindows();
3448 		event->accept();
3449 	}
3450 }
3451 
3452 FetMainForm::~FetMainForm()
3453 {
3454 	QSettings settings(COMPANY, PROGRAM);
3455 	settings.setValue(QString("FetMainForm/number-of-recent-files"), recentFiles.count());
3456 	settings.remove(QString("FetMainForm/recent-file"));
3457 	for(int i=0; i<recentFiles.count(); i++)
3458 		settings.setValue(QString("FetMainForm/recent-file/")+CustomFETString::number(i+1), recentFiles.at(i));
3459 
3460 	shortcutBasicMenu->clear();
3461 	delete shortcutBasicMenu;
3462 
3463 	shortcutAdvancedTimeMenu->clear();
3464 	delete shortcutAdvancedTimeMenu;
3465 
3466 	shortcutDataSpaceMenu->clear();
3467 	delete shortcutDataSpaceMenu;
3468 
3469 	shortcutDataAdvancedMenu->clear();
3470 	delete shortcutDataAdvancedMenu;
3471 
3472 	//2014-07-01
3473 	shortcutTimetableLockingMenu->clear();
3474 	delete shortcutTimetableLockingMenu;
3475 
3476 	shortcutTimetableAdvancedMenu->clear();
3477 	delete shortcutTimetableAdvancedMenu;
3478 }
3479 
3480 void FetMainForm::on_fileQuitAction_triggered()
3481 {
3482 	if(simulation_running || simulation_running_multi){
3483 		QMessageBox::information(this, tr("FET information"),
3484 			tr("Allocation in course.\nPlease stop simulation before this."));
3485 		return;
3486 	}
3487 
3488 	close();
3489 }
3490 
3491 QString FetMainForm::strippedName(const QString& fullFileName)
3492 {
3493 	return QFileInfo(fullFileName).fileName();
3494 }
3495 
3496 void FetMainForm::setCurrentFile(const QString& fileName)
3497 {
3498 	QString currentFile=fileName;
3499 	QString shownName=QString("Untitled");
3500 
3501 	if(!currentFile.isEmpty()){
3502 		shownName=strippedName(currentFile);
3503 		recentFiles.removeAll(currentFile);
3504 		recentFiles.prepend(currentFile);
3505 		if(recentFiles.count()>MAX_RECENT_FILES){
3506 			assert(recentFiles.count()==MAX_RECENT_FILES+1);
3507 			assert(!recentFiles.isEmpty());
3508 			recentFiles.removeLast();
3509 		}
3510 		updateRecentFileActions();
3511 	}
3512 
3513 	setWindowTitle(tr("%1[*] - FET", "The title of the main window, %1 is the name of the current file. "
3514 	 "Please keep the string [*] unmodified (three characters) - it is used to make the difference between modified files and unmodified files.")
3515 	 .arg(shownName));
3516 }
3517 
3518 void FetMainForm::updateRecentFileActions()
3519 {
3520 	QStringList existingNames;
3521 	for(const QString& tn : qAsConst(recentFiles))
3522 		if(QFile::exists(tn))
3523 			existingNames.append(tn);
3524 	recentFiles=existingNames;
3525 
3526 	for(int j=0; j<MAX_RECENT_FILES; j++){
3527 		if(j<recentFiles.count()){
3528 			QString text=strippedName(recentFiles[j]);
3529 			recentFileActions[j]->setText(text);
3530 			recentFileActions[j]->setData(recentFiles[j]);
3531 			recentFileActions[j]->setVisible(true);
3532 		}
3533 		else{
3534 			recentFileActions[j]->setVisible(false);
3535 		}
3536 	}
3537 
3538 	recentSeparatorAction->setVisible(!recentFiles.isEmpty());
3539 }
3540 
3541 void FetMainForm::on_fileClearRecentFilesListAction_triggered()
3542 {
3543 	if(simulation_running || simulation_running_multi){
3544 		QMessageBox::information(this, tr("FET information"),
3545 			tr("Allocation in course.\nPlease stop simulation before this."));
3546 		return;
3547 	}
3548 
3549 	recentFiles.clear();
3550 	updateRecentFileActions();
3551 }
3552 
3553 void FetMainForm::on_fileNewAction_triggered()
3554 {
3555 	if(simulation_running || simulation_running_multi){
3556 		QMessageBox::information(this, tr("FET information"),
3557 			tr("Allocation in course.\nPlease stop simulation before this."));
3558 		return;
3559 	}
3560 
3561 	int confirm=0;
3562 
3563 	if(gt.rules.initialized && gt.rules.modified){
3564 		switch( QMessageBox::question(
3565 		 this,
3566 		 tr("FET application"),
3567 		 tr("Your current data file has been modified. Are you sure you want to reset to new empty data?"),
3568 		 QMessageBox::Yes|QMessageBox::No
3569 		 ) ){
3570 		case QMessageBox::Yes: // Yes
3571 			confirm=1;
3572 			break;
3573 		case QMessageBox::No: // No
3574 			confirm=0;
3575 			break;
3576 		default:
3577 			assert(0);
3578 			break;
3579 		}
3580 	}
3581 	else
3582 		confirm=1;
3583 
3584 	int tm=-1;
3585 	if(confirm){
3586 		GetModeForNewFileForm form(this);
3587 		int result=form.exec();
3588 		if(result==QDialog::Accepted){
3589 			assert(form.mode==OFFICIAL || form.mode==MORNINGS_AFTERNOONS || form.mode==BLOCK_PLANNING || form.mode==TERMS);
3590 			tm=form.mode;
3591 		}
3592 		else{
3593 			confirm=0;
3594 		}
3595 	}
3596 
3597 	if(confirm){
3598 		INPUT_FILENAME_XML=QString("");
3599 		setCurrentFile(INPUT_FILENAME_XML);
3600 
3601 		if(gt.rules.initialized)
3602 			gt.rules.kill();
3603 		gt.rules.init();
3604 
3605 		gt.rules.mode=tm;
3606 
3607 		gt.rules.modified=true; //to avoid flicker of the main form modified flag
3608 
3609 		bool tmp=gt.rules.addTimeConstraint(new ConstraintBasicCompulsoryTime(100));
3610 		assert(tmp);
3611 		tmp=gt.rules.addSpaceConstraint(new ConstraintBasicCompulsorySpace(100));
3612 		assert(tmp);
3613 
3614 		gt.rules.modified=true; //force update of the modified flag of the main window
3615 		setRulesUnmodifiedAndOtherThings(&gt.rules);
3616 
3617 		teachers_schedule_ready=false;
3618 		students_schedule_ready=false;
3619 		rooms_schedule_ready=false;
3620 
3621 		LockUnlock::computeLockedUnlockedActivitiesTimeSpace();
3622 		LockUnlock::increaseCommunicationSpinBox();
3623 
3624 		statusBar()->showMessage(tr("New file generated"), STATUS_BAR_MILLISECONDS);
3625 		oldDataAvailable=dataAvailable;
3626 		dataAvailable=true;
3627 		updateMode();
3628 	}
3629 }
3630 
3631 void FetMainForm::openRecentFile()
3632 {
3633 	QAction* action=qobject_cast<QAction*>(sender());
3634 	if(action)
3635 		openFile(action->data().toString());
3636 }
3637 
3638 void FetMainForm::on_fileOpenAction_triggered()
3639 {
3640 	openFile(QString());
3641 }
3642 
3643 void FetMainForm::openFile(const QString& fileName)
3644 {
3645 	if(simulation_running || simulation_running_multi){
3646 		QMessageBox::information(this, tr("FET information"),
3647 			tr("Allocation in course.\nPlease stop simulation before this."));
3648 		return;
3649 	}
3650 
3651 	int confirm=0;
3652 
3653 	if(gt.rules.initialized && gt.rules.modified){
3654 		switch( QMessageBox::question(
3655 		 this,
3656 		 tr("FET application"),
3657 		 tr("Your current data file has been modified. Are you sure you want to open another data file?"),
3658 		 QMessageBox::Yes|QMessageBox::No
3659 		 ) ){
3660 		case QMessageBox::Yes: // Yes
3661 			confirm=1;
3662 			break;
3663 		case QMessageBox::No: // No
3664 			confirm=0;
3665 			break;
3666 		default:
3667 			assert(0);
3668 			break;
3669 		}
3670 	}
3671 	else
3672 		confirm=1;
3673 
3674 	if(confirm){
3675 		QString s=fileName;
3676 
3677 		if(s.isNull()){
3678 			s = QFileDialog::getOpenFileName(this, tr("Choose a file to open"),
3679 			 WORKING_DIRECTORY,
3680 			 tr("FET XML files", "Instructions for translators: FET XML is a type of file format (using text mode). "
3681 			 "So this field means files in the FET XML format")+" (*.fet)"+";;"+tr("All files")+" (*)");
3682 
3683 			if(s.isNull())
3684 				return;
3685 		}
3686 
3687 		int tmp2=s.lastIndexOf(FILE_SEP);
3688 		QString s2=s.right(s.length()-tmp2-1);
3689 
3690 		if(s2.length()>=1){
3691 			if(s2.at(0).isSpace()){
3692 				QMessageBox::warning(this, tr("FET information"),
3693 				 tr("Please do not use a filename starting with white space(s), the html css code does not work."
3694 				  " File was not loaded. Please rename it, removing the white space(s) from the beginning and open it after that with FET."));
3695 				return;
3696 			}
3697 		}
3698 		QString s3;
3699 		if(s2.endsWith(".fet"))
3700 			s3=s2.left(s2.length()-4);
3701 		else
3702 			s3=s2;
3703 		if(s3.length()>=1){
3704 			if(s3.at(s3.length()-1).isSpace()){
3705 				QMessageBox::warning(this, tr("FET information"),
3706 				 tr("Please do not use a filename ending with white space(s) before the '.fet' termination or at the end of the filename,"
3707 				 " problems might arise. File was not loaded. Please rename it, removing the white space(s) at the end and open it after"
3708 				 " that with FET."));
3709 				return;
3710 			}
3711 		}
3712 		if(s2.indexOf("\"") >= 0){
3713 			QMessageBox::warning(this, tr("FET information"),
3714 			 tr("Please do not use quotation marks \" in filename, the html css code does not work."
3715 			  " File was not loaded. Please rename it, removing not allowed characters and open it after that with FET."));
3716 			return;
3717 		}
3718 		if(s2.indexOf(";") >= 0){
3719 			QMessageBox::warning(this, tr("FET information"),
3720 			 tr("Please do not use semicolon ; in filename, the html css code does not work."
3721 			  " File was not loaded. Please rename it, removing not allowed characters and open it after that with FET."));
3722 			return;
3723 		}
3724 		if(s2.indexOf("#") >= 0){
3725 			QMessageBox::warning(this, tr("FET information"),
3726 			 tr("Please do not use # in filename, the html css code does not work."
3727 			  " File was not loaded. Please rename it, removing not allowed characters and open it after that with FET."));
3728 			return;
3729 		}
3730 		/*if(s2.indexOf("(") >= 0 || s2.indexOf(")")>=0){
3731 			QMessageBox::information(this, tr("FET information"), tr("Please do not use parentheses () in filename, the html css code does not work"));
3732 			return;
3733 		}*/
3734 		else{
3735 			//QCursor orig=this->cursor();
3736 			//this->setCursor(Qt::WaitCursor);
3737 			statusBar()->showMessage(tr("Loading...", "This is a message in the status bar, that we are loading the file"), 0);
3738 			pqapplication->processEvents();
3739 
3740 			//bool before=gt.rules.modified;
3741 			gt.rules.modified=true; //to avoid flicker of the main form modified flag
3742 
3743 			if(gt.rules.read(this, s)){
3744 				teachers_schedule_ready=false;
3745 				students_schedule_ready=false;
3746 				rooms_schedule_ready=false;
3747 
3748 				INPUT_FILENAME_XML = s;
3749 
3750 				LockUnlock::computeLockedUnlockedActivitiesTimeSpace();
3751 				LockUnlock::increaseCommunicationSpinBox();
3752 
3753 				statusBar()->showMessage(tr("File opened"), STATUS_BAR_MILLISECONDS);
3754 				oldDataAvailable=dataAvailable;
3755 				dataAvailable=true;
3756 				updateMode();
3757 
3758 				gt.rules.modified=true; //force update of the modified flag of the main window
3759 				setRulesUnmodifiedAndOtherThings(&gt.rules);
3760 
3761 				setCurrentFile(INPUT_FILENAME_XML);
3762 			}
3763 			else{
3764 				//incorrect code - the old file may be broken - so we generate a new file.
3765 				/*gt.rules.modified=before;
3766 
3767 				statusBar()->showMessage("", STATUS_BAR_MILLISECONDS);
3768 
3769 				setCurrentFile(INPUT_FILENAME_XML);*/
3770 
3771 				//not needed, because if the file cannot be read we keep the old mode
3772 				//updateMode();
3773 
3774 				assert(!simulation_running);
3775 				gt.rules.modified=false;
3776 				statusBar()->showMessage(tr("Loading file failed...", "This is a message in the status bar, that opening the chosen file failed"), STATUS_BAR_MILLISECONDS);
3777 				on_fileNewAction_triggered();
3778 			}
3779 
3780 			//this->setCursor(orig);
3781 		}
3782 		//get the directory
3783 		int tmp=s.lastIndexOf(FILE_SEP);
3784 		WORKING_DIRECTORY=s.left(tmp);
3785 	}
3786 }
3787 
3788 bool FetMainForm::fileSaveAs()
3789 {
3790 	if(!gt.rules.initialized){
3791 		QMessageBox::information(this, tr("FET information"),
3792 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
3793 		return false;
3794 	}
3795 
3796 	QString predefFileName=INPUT_FILENAME_XML;
3797 	if(predefFileName.isEmpty())
3798 		predefFileName=WORKING_DIRECTORY+FILE_SEP+QString("untitled.fet");
3799 
3800 	QString s = QFileDialog::getSaveFileName(this, tr("Choose a filename to save under"),
3801 		predefFileName, tr("FET XML files", "Instructions for translators: FET XML is a type of file format (using text mode). "
3802 		"So this field means files in the FET XML format")+" (*.fet)"+";;"+tr("All files")+" (*)",
3803 		0, QFileDialog::DontConfirmOverwrite);
3804 	if(s==QString())
3805 		return false;
3806 
3807 	int tmp2=s.lastIndexOf(FILE_SEP);
3808 	QString s2=s.right(s.length()-tmp2-1);
3809 
3810 	if(s2.length()>=1){
3811 		if(s2.at(0).isSpace()){
3812 			QMessageBox::warning(this, tr("FET information"),
3813 			 tr("Please do not use a filename starting with white space(s), the html css code does not work.")
3814 			 +"\n\n"+tr("File was not saved."));
3815 			return false;
3816 		}
3817 	}
3818 	QString s3;
3819 	bool ewf;
3820 	if(s2.endsWith(".fet")){
3821 		s3=s2.left(s2.length()-4);
3822 		ewf=true;
3823 	}
3824 	else{
3825 		s3=s2;
3826 		ewf=false;
3827 	}
3828 	if(s3.length()>=1){
3829 		if(s3.at(s3.length()-1).isSpace()){
3830 			if(ewf)
3831 				QMessageBox::warning(this, tr("FET information"),
3832 				 tr("Please do not use a filename ending with white space(s) before the '.fet' termination, problems might arise.")
3833 				 +"\n\n"+tr("File was not saved."));
3834 			else
3835 				QMessageBox::warning(this, tr("FET information"),
3836 				 tr("Please do not use a filename ending with white space(s), problems might arise.")
3837 				 +"\n\n"+tr("File was not saved."));
3838 			return false;
3839 		}
3840 	}
3841 	if(s2.indexOf("\"") >= 0){
3842 		QMessageBox::warning(this, tr("FET information"), tr("Please do not use quotation marks \" in filename, the html css code does not work")
3843 		 +"\n\n"+tr("File was not saved."));
3844 		return false;
3845 	}
3846 	if(s2.indexOf(";") >= 0){
3847 		QMessageBox::warning(this, tr("FET information"), tr("Please do not use semicolon ; in filename, the html css code does not work")
3848 		 +"\n\n"+tr("File was not saved."));
3849 		return false;
3850 	}
3851 	if(s2.indexOf("#") >= 0){
3852 		QMessageBox::warning(this, tr("FET information"), tr("Please do not use # in filename, the html css code does not work")
3853 		 +"\n\n"+tr("File was not saved."));
3854 		return false;
3855 	}
3856 
3857 	if(s.right(4)!=".fet")
3858 		s+=".fet";
3859 
3860 	int tmp=s.lastIndexOf(FILE_SEP);
3861 	WORKING_DIRECTORY=s.left(tmp);
3862 
3863 	if(QFile::exists(s))
3864 		if(QMessageBox::warning( this, tr("FET"),
3865 		 tr("File %1 exists - are you sure you want to overwrite it?").arg(s),
3866 		 QMessageBox::Yes|QMessageBox::No) == QMessageBox::No)
3867 		 	return false;
3868 
3869 	bool t=gt.rules.write(this, s);
3870 	if(t){
3871 		INPUT_FILENAME_XML = s;
3872 
3873 		gt.rules.modified=true; //force update of the modified flag of the main window
3874 		setRulesUnmodifiedAndOtherThings(&gt.rules);
3875 
3876 		setCurrentFile(INPUT_FILENAME_XML);
3877 
3878 		statusBar()->showMessage(tr("File saved"), STATUS_BAR_MILLISECONDS);
3879 
3880 		return true;
3881 	}
3882 	else{
3883 		return false;
3884 	}
3885 }
3886 
3887 void FetMainForm::on_fileSaveAsAction_triggered()
3888 {
3889 	fileSaveAs();
3890 }
3891 
3892 // Start of code contributed by Volker Dirr
3893 void FetMainForm::on_fileImportCSVRoomsBuildingsAction_triggered()
3894 {
3895 	if(!gt.rules.initialized){
3896 		QMessageBox::information(this, tr("FET information"),
3897 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
3898 		return;
3899 	}
3900 
3901 	if(simulation_running || simulation_running_multi){
3902 		QMessageBox::information(this, tr("FET information"),
3903 			tr("Allocation in course.\nPlease stop simulation before this."));
3904 		return;
3905 	}
3906 	Import::importCSVRoomsAndBuildings(this);
3907 }
3908 
3909 void FetMainForm::on_fileImportCSVSubjectsAction_triggered()
3910 {
3911 	if(!gt.rules.initialized){
3912 		QMessageBox::information(this, tr("FET information"),
3913 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
3914 		return;
3915 	}
3916 
3917 	if(simulation_running || simulation_running_multi){
3918 		QMessageBox::information(this, tr("FET information"),
3919 			tr("Allocation in course.\nPlease stop simulation before this."));
3920 		return;
3921 	}
3922 	Import::importCSVSubjects(this);
3923 }
3924 
3925 void FetMainForm::on_fileImportCSVTeachersAction_triggered()
3926 {
3927 	if(!gt.rules.initialized){
3928 		QMessageBox::information(this, tr("FET information"),
3929 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
3930 		return;
3931 	}
3932 
3933 	if(simulation_running || simulation_running_multi){
3934 		QMessageBox::information(this, tr("FET information"),
3935 			tr("Allocation in course.\nPlease stop simulation before this."));
3936 		return;
3937 	}
3938 	Import::importCSVTeachers(this);
3939 }
3940 
3941 void FetMainForm::on_fileImportCSVActivitiesAction_triggered()
3942 {
3943 	if(!gt.rules.initialized){
3944 		QMessageBox::information(this, tr("FET information"),
3945 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
3946 		return;
3947 	}
3948 
3949 	if(simulation_running || simulation_running_multi){
3950 		QMessageBox::information(this, tr("FET information"),
3951 			tr("Allocation in course.\nPlease stop simulation before this."));
3952 		return;
3953 	}
3954 	Import::importCSVActivities(this);
3955 
3956 	//TODO: if the import takes care of locked activities, then we need
3957 	//to do:
3958 	//LockUnlock::computeLockedUnlockedActivitiesTimeSpace();
3959 	//LockUnlock::increaseCommunicationSpinBox();
3960 	//after the importing
3961 }
3962 
3963 void FetMainForm::on_fileImportCSVActivityTagsAction_triggered()
3964 {
3965 	if(!gt.rules.initialized){
3966 		QMessageBox::information(this, tr("FET information"),
3967 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
3968 		return;
3969 	}
3970 
3971 	if(simulation_running || simulation_running_multi){
3972 		QMessageBox::information(this, tr("FET information"),
3973 			tr("Allocation in course.\nPlease stop simulation before this."));
3974 		return;
3975 	}
3976 	Import::importCSVActivityTags(this);
3977 }
3978 
3979 void FetMainForm::on_fileImportCSVYearsGroupsSubgroupsAction_triggered()
3980 {
3981 	if(!gt.rules.initialized){
3982 		QMessageBox::information(this, tr("FET information"),
3983 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
3984 		return;
3985 	}
3986 
3987 	if(simulation_running || simulation_running_multi){
3988 		QMessageBox::information(this, tr("FET information"),
3989 			tr("Allocation in course.\nPlease stop simulation before this."));
3990 		return;
3991 	}
3992 	Import::importCSVStudents(this);
3993 }
3994 
3995 void FetMainForm::on_fileExportCSVAction_triggered()
3996 {
3997 	if(!gt.rules.initialized){
3998 		QMessageBox::information(this, tr("FET information"),
3999 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4000 		return;
4001 	}
4002 
4003 	if(simulation_running || simulation_running_multi){
4004 		QMessageBox::information(this, tr("FET information"),
4005 			tr("Allocation in course.\nPlease stop simulation before this."));
4006 		return;
4007 	}
4008 	Export::exportCSV(this);
4009 }
4010 // End of code contributed by Volker Dirr
4011 
4012 void FetMainForm::on_timetableSaveTimetableAsAction_triggered()
4013 {
4014 	if(!gt.rules.initialized){
4015 		QMessageBox::information(this, tr("FET information"),
4016 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4017 		return;
4018 	}
4019 
4020 	if(!students_schedule_ready || !teachers_schedule_ready || !rooms_schedule_ready){
4021 		QMessageBox::warning(this, tr("FET - Warning"), tr("You have not yet generated a timetable - please generate firstly"));
4022 		return;
4023 	}
4024 
4025 	Solution* tc=&best_solution;
4026 
4027 	for(int ai=0; ai<gt.rules.nInternalActivities; ai++){
4028 		//Activity* act=&gt.rules.internalActivitiesList[ai];
4029 		int time=tc->times[ai];
4030 		if(time==UNALLOCATED_TIME){
4031 			QMessageBox::warning(this, tr("FET - Warning"), tr("It seems that you have an incomplete timetable."
4032 			 " Saving of timetable does not work for incomplete timetables. Please generate a complete timetable"));
4033 			 //.arg(act->id));
4034 			return;
4035 		}
4036 
4037 		int ri=tc->rooms[ai];
4038 		if(ri==UNALLOCATED_SPACE){
4039 			QMessageBox::warning(this, tr("FET - Warning"), tr("It seems that you have an incomplete timetable."
4040 			 " Saving of timetable does not work for incomplete timetables. Please generate a complete timetable"));
4041 			 //.arg(act->id));
4042 			return;
4043 		}
4044 	}
4045 
4046 	bool ok_to_continue;
4047 	SaveTimetableConfirmationForm* pc_form=nullptr;
4048 	if(CONFIRM_SAVE_TIMETABLE){
4049 		int confirm;
4050 
4051 		pc_form=new SaveTimetableConfirmationForm(this);
4052 		setParentAndOtherThings(pc_form, this);
4053 		confirm=pc_form->exec();
4054 
4055 		if(confirm==QDialog::Accepted){
4056 			if(pc_form->dontShowAgain)
4057 				settingsConfirmSaveTimetableAction->setChecked(false);
4058 
4059 			ok_to_continue=true;
4060 		}
4061 		else
4062 			ok_to_continue=false;
4063 	}
4064 	else
4065 		ok_to_continue=true;
4066 
4067 	if(ok_to_continue){
4068 		QWidget* parent=pc_form;
4069 		if(parent==nullptr)
4070 			parent=this;
4071 
4072 		QString s;
4073 
4074 		for(;;){
4075 			s = QFileDialog::getSaveFileName(parent, tr("Choose a filename for data and timetable"),
4076 				INPUT_FILENAME_XML, tr("FET XML files", "Instructions for translators: FET XML is a type of file format (using text mode). "
4077 				"So this field means files in the FET XML format")+" (*.fet)"+";;"+tr("All files")+" (*)",
4078 				0, QFileDialog::DontConfirmOverwrite);
4079 			if(s==QString())
4080 				return;
4081 
4082 			int tmp2=s.lastIndexOf(FILE_SEP);
4083 			QString s2=s.right(s.length()-tmp2-1);
4084 
4085 			if(s2.length()>=1){
4086 				if(s2.at(0).isSpace()){
4087 					QMessageBox::warning(this, tr("FET information"),
4088 					 tr("Please do not use a filename starting with white space(s), the html css code does not work.")
4089 					 +"\n\n"+tr("File was not saved."));
4090 					return;
4091 				}
4092 			}
4093 			QString s3;
4094 			bool ewf;
4095 			if(s2.endsWith(".fet")){
4096 				s3=s2.left(s2.length()-4);
4097 				ewf=true;
4098 			}
4099 			else{
4100 				s3=s2;
4101 				ewf=false;
4102 			}
4103 			if(s3.length()>=1){
4104 				if(s3.at(s3.length()-1).isSpace()){
4105 					if(ewf)
4106 						QMessageBox::warning(this, tr("FET information"),
4107 						 tr("Please do not use a filename ending with white space(s) before the '.fet' termination, problems might arise.")
4108 						 +"\n\n"+tr("File was not saved."));
4109 					else
4110 						QMessageBox::warning(this, tr("FET information"),
4111 						 tr("Please do not use a filename ending with white space(s), problems might arise.")
4112 						 +"\n\n"+tr("File was not saved."));
4113 					return;
4114 				}
4115 			}
4116 			if(s2.indexOf("\"") >= 0){
4117 				QMessageBox::warning(parent, tr("FET information"), tr("Please do not use quotation marks \" in filename, the html css code does not work")
4118 				 +"\n\n"+tr("File was not saved."));
4119 				return;
4120 			}
4121 			if(s2.indexOf(";") >= 0){
4122 				QMessageBox::warning(parent, tr("FET information"), tr("Please do not use semicolon ; in filename, the html css code does not work")
4123 				 +"\n\n"+tr("File was not saved."));
4124 				return;
4125 			}
4126 			if(s2.indexOf("#") >= 0){
4127 				QMessageBox::warning(parent, tr("FET information"), tr("Please do not use # in filename, the html css code does not work")
4128 				 +"\n\n"+tr("File was not saved."));
4129 				return;
4130 			}
4131 
4132 			if(s.right(4)!=".fet")
4133 				s+=".fet";
4134 
4135 			int tmp=s.lastIndexOf(FILE_SEP);
4136 			WORKING_DIRECTORY=s.left(tmp);
4137 
4138 			if(QFile::exists(s)){
4139 				QString t=tr("File exists");
4140 				t+="\n\n";
4141 				t+=tr("For safety (so you don't lose work), it is not allowed to overwrite an existing file with"
4142 					" locking and saving a current data+timetable");
4143 				t+="\n\n";
4144 				t+=tr("Please choose a non-existing name");
4145 
4146 				QMessageBox::warning( parent, tr("FET warning"), t);
4147 			}
4148 			else
4149 				break;
4150 		}
4151 
4152 		rules2.initialized=true;
4153 
4154 		rules2.mode=gt.rules.mode;
4155 
4156 		rules2.institutionName=gt.rules.institutionName;
4157 		rules2.comments=gt.rules.comments;
4158 
4159 		rules2.nTerms=gt.rules.nTerms;
4160 		rules2.nDaysPerTerm=gt.rules.nDaysPerTerm;
4161 
4162 		rules2.nHoursPerDay=gt.rules.nHoursPerDay;
4163 		rules2.hoursOfTheDay=gt.rules.hoursOfTheDay;
4164 		//for(int i=0; i<gt.rules.nHoursPerDay; i++)
4165 		//	rules2.hoursOfTheDay[i]=gt.rules.hoursOfTheDay[i];
4166 
4167 		rules2.nDaysPerWeek=gt.rules.nDaysPerWeek;
4168 		rules2.daysOfTheWeek=gt.rules.daysOfTheWeek;
4169 		//for(int i=0; i<gt.rules.nDaysPerWeek; i++)
4170 		//	rules2.daysOfTheWeek[i]=gt.rules.daysOfTheWeek[i];
4171 
4172 		rules2.yearsList=gt.rules.yearsList;
4173 
4174 		rules2.teachersList=gt.rules.teachersList;
4175 
4176 		rules2.subjectsList=gt.rules.subjectsList;
4177 
4178 		rules2.activityTagsList=gt.rules.activityTagsList;
4179 
4180 		rules2.activitiesList=gt.rules.activitiesList;
4181 
4182 		rules2.buildingsList=gt.rules.buildingsList;
4183 
4184 		rules2.roomsList=gt.rules.roomsList;
4185 
4186 		rules2.timeConstraintsList=gt.rules.timeConstraintsList;
4187 
4188 		rules2.spaceConstraintsList=gt.rules.spaceConstraintsList;
4189 
4190 		rules2.apstHash=gt.rules.apstHash;
4191 		rules2.aprHash=gt.rules.aprHash;
4192 
4193 		rules2.groupActivitiesInInitialOrderList=gt.rules.groupActivitiesInInitialOrderList;
4194 
4195 		//add locking constraints
4196 		TimeConstraintsList lockTimeConstraintsList;
4197 		SpaceConstraintsList lockSpaceConstraintsList;
4198 
4199 		//bool report=true;
4200 
4201 		int addedTime=0, duplicatesTime=0;
4202 		int addedSpace=0, duplicatesSpace=0;
4203 
4204 		QString constraintsString=QString("");
4205 
4206 		//lock selected activities
4207 		for(int ai=0; ai<gt.rules.nInternalActivities; ai++){
4208 			Activity* act=&gt.rules.internalActivitiesList[ai];
4209 			int time=tc->times[ai];
4210 			if(time>=0 && time<gt.rules.nDaysPerWeek*gt.rules.nHoursPerDay){
4211 				int hour=time/gt.rules.nDaysPerWeek;
4212 				int day=time%gt.rules.nDaysPerWeek;
4213 
4214 				ConstraintActivityPreferredStartingTime* ctr=new ConstraintActivityPreferredStartingTime(100.0, act->id, day, hour, false); //permanently locked is false
4215 				bool t=rules2.addTimeConstraint(ctr);
4216 
4217 				if(t){
4218 					addedTime++;
4219 					lockTimeConstraintsList.append(ctr);
4220 				}
4221 				else
4222 					duplicatesTime++;
4223 
4224 				QString s;
4225 
4226 				if(t)
4227 					s=tr("Added to the saved file:", "It refers to a constraint")+QString("\n")+ctr->getDetailedDescription(gt.rules);
4228 				else{
4229 					s=tr("NOT added to the saved file (already existing):", "It refers to a constraint")+QString("\n")+ctr->getDetailedDescription(gt.rules);
4230 					delete ctr;
4231 				}
4232 
4233 				constraintsString+=QString("\n");
4234 				constraintsString+=s;
4235 			}
4236 
4237 			int ri=tc->rooms[ai];
4238 			if(ri!=UNALLOCATED_SPACE && ri!=UNSPECIFIED_ROOM && ri>=0 && ri<gt.rules.nInternalRooms){
4239 				QStringList tl;
4240 				if(gt.rules.internalRoomsList[ri]->isVirtual==false)
4241 					assert(tc->realRoomsList[ai].isEmpty());
4242 				else
4243 					for(int rr : qAsConst(tc->realRoomsList[ai]))
4244 						tl.append(gt.rules.internalRoomsList[rr]->name);
4245 
4246 				ConstraintActivityPreferredRoom* ctr=new ConstraintActivityPreferredRoom(100, act->id, (gt.rules.internalRoomsList[ri])->name, tl, false); //false means not permanently locked
4247 				bool t=rules2.addSpaceConstraint(ctr);
4248 
4249 				QString s;
4250 
4251 				if(t){
4252 					addedSpace++;
4253 					lockSpaceConstraintsList.append(ctr);
4254 				}
4255 				else
4256 					duplicatesSpace++;
4257 
4258 				if(t)
4259 					s=tr("Added to the saved file:", "It refers to a constraint")+QString("\n")+ctr->getDetailedDescription(gt.rules);
4260 				else{
4261 					s=tr("NOT added to the saved file (already existing):", "It refers to a constraint")+QString("\n")+ctr->getDetailedDescription(gt.rules);
4262 					delete ctr;
4263 				}
4264 
4265 				constraintsString+=QString("\n");
4266 				constraintsString+=s;
4267 			}
4268 		}
4269 
4270 		LongTextMessageBox::largeInformation(parent, tr("FET information"), tr("Added %1 locking time constraints and %2 locking space constraints to saved file,"
4271 		" ignored %3 activities which were already fixed in time and %4 activities which were already fixed in space.").arg(addedTime).arg(addedSpace).arg(duplicatesTime).arg(duplicatesSpace)
4272 		+QString("\n\n")+tr("Detailed information about each locking constraint which was added or not (if already existing) to the saved file:")+QString("\n")+constraintsString
4273 		+QString("\n")+tr("Your current data file remained untouched (no locking constraints were added), so you can save it also, or generate different timetables."));
4274 
4275 		bool result=rules2.write(parent, s);
4276 
4277 		Q_UNUSED(result);
4278 
4279 		for(TimeConstraint* tc : qAsConst(lockTimeConstraintsList))
4280 			delete tc;
4281 		lockTimeConstraintsList.clear();
4282 		for(SpaceConstraint* sc : qAsConst(lockSpaceConstraintsList))
4283 			delete sc;
4284 		lockSpaceConstraintsList.clear();
4285 
4286 		rules2.nHoursPerDay=0;
4287 		rules2.hoursOfTheDay.clear();
4288 		rules2.nDaysPerWeek=0;
4289 		rules2.daysOfTheWeek.clear();
4290 
4291 		rules2.yearsList.clear();
4292 
4293 		rules2.teachersList.clear();
4294 
4295 		rules2.subjectsList.clear();
4296 
4297 		rules2.activityTagsList.clear();
4298 
4299 		rules2.activitiesList.clear();
4300 
4301 		rules2.buildingsList.clear();
4302 
4303 		rules2.roomsList.clear();
4304 
4305 		rules2.timeConstraintsList.clear();
4306 
4307 		rules2.spaceConstraintsList.clear();
4308 
4309 		rules2.apstHash.clear();
4310 		rules2.aprHash.clear();
4311 
4312 		rules2.groupActivitiesInInitialOrderList.clear();
4313 	}
4314 
4315 	if(pc_form!=nullptr)
4316 		delete pc_form;
4317 }
4318 
4319 bool FetMainForm::fileSave()
4320 {
4321 	if(!gt.rules.initialized){
4322 		QMessageBox::information(this, tr("FET information"),
4323 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4324 		return false;
4325 	}
4326 
4327 	if(INPUT_FILENAME_XML.isEmpty())
4328 		return fileSaveAs();
4329 	else{
4330 		bool t=gt.rules.write(this, INPUT_FILENAME_XML);
4331 
4332 		if(t){
4333 			gt.rules.modified=true; //force update of the modified flag of the main window
4334 			setRulesUnmodifiedAndOtherThings(&gt.rules);
4335 
4336 			setCurrentFile(INPUT_FILENAME_XML);
4337 
4338 			statusBar()->showMessage(tr("File saved"), STATUS_BAR_MILLISECONDS);
4339 			return true;
4340 		}
4341 		else{
4342 			return false;
4343 		}
4344 	}
4345 }
4346 
4347 void FetMainForm::on_fileSaveAction_triggered()
4348 {
4349 	fileSave();
4350 }
4351 
4352 void FetMainForm::on_dataInstitutionNameAction_triggered()
4353 {
4354 	if(!gt.rules.initialized){
4355 		QMessageBox::information(this, tr("FET information"),
4356 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4357 		return;
4358 	}
4359 
4360 	if(simulation_running || simulation_running_multi){
4361 		QMessageBox::information(this, tr("FET information"),
4362 			tr("Allocation in course.\nPlease stop simulation before this."));
4363 		return;
4364 	}
4365 
4366 	InstitutionNameForm form(this);
4367 	setParentAndOtherThings(&form, this);
4368 	form.exec();
4369 }
4370 
4371 void FetMainForm::on_dataCommentsAction_triggered()
4372 {
4373 	if(!gt.rules.initialized){
4374 		QMessageBox::information(this, tr("FET information"),
4375 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4376 		return;
4377 	}
4378 
4379 	if(simulation_running || simulation_running_multi){
4380 		QMessageBox::information(this, tr("FET information"),
4381 			tr("Allocation in course.\nPlease stop simulation before this."));
4382 		return;
4383 	}
4384 
4385 	CommentsForm form(this);
4386 	setParentAndOtherThings(&form, this);
4387 	form.exec();
4388 }
4389 
4390 void FetMainForm::on_dataDaysAction_triggered()
4391 {
4392 	if(!gt.rules.initialized){
4393 		QMessageBox::information(this, tr("FET information"),
4394 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4395 		return;
4396 	}
4397 
4398 	if(simulation_running || simulation_running_multi){
4399 		QMessageBox::information(this, tr("FET information"),
4400 			tr("Allocation in course.\nPlease stop simulation before this."));
4401 		return;
4402 	}
4403 
4404 	DaysForm form(this);
4405 	setParentAndOtherThings(&form, this);
4406 	form.exec();
4407 }
4408 
4409 void FetMainForm::on_dataHoursAction_triggered()
4410 {
4411 	if(!gt.rules.initialized){
4412 		QMessageBox::information(this, tr("FET information"),
4413 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4414 		return;
4415 	}
4416 
4417 	if(simulation_running || simulation_running_multi){
4418 		QMessageBox::information(this, tr("FET information"),
4419 			tr("Allocation in course.\nPlease stop simulation before this."));
4420 		return;
4421 	}
4422 
4423 	HoursForm form(this);
4424 	setParentAndOtherThings(&form, this);
4425 	form.exec();
4426 }
4427 
4428 void FetMainForm::on_dataTeachersAction_triggered()
4429 {
4430 	if(!gt.rules.initialized){
4431 		QMessageBox::information(this, tr("FET information"),
4432 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4433 		return;
4434 	}
4435 
4436 	if(simulation_running || simulation_running_multi){
4437 		QMessageBox::information(this, tr("FET information"),
4438 			tr("Allocation in course.\nPlease stop simulation before this."));
4439 		return;
4440 	}
4441 
4442 	TeachersForm form(this);
4443 	setParentAndOtherThings(&form, this);
4444 	form.exec();
4445 }
4446 
4447 void FetMainForm::on_dataTeachersStatisticsAction_triggered()
4448 {
4449 	if(!gt.rules.initialized){
4450 		QMessageBox::information(this, tr("FET information"),
4451 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4452 		return;
4453 	}
4454 
4455 	TeachersStatisticsForm form(this);
4456 	setParentAndOtherThings(&form, this);
4457 	form.exec();
4458 }
4459 
4460 void FetMainForm::on_dataSubjectsAction_triggered()
4461 {
4462 	if(!gt.rules.initialized){
4463 		QMessageBox::information(this, tr("FET information"),
4464 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4465 		return;
4466 	}
4467 
4468 	if(simulation_running || simulation_running_multi){
4469 		QMessageBox::information(this, tr("FET information"),
4470 			tr("Allocation in course.\nPlease stop simulation before this."));
4471 		return;
4472 	}
4473 
4474 	SubjectsForm form(this);
4475 	setParentAndOtherThings(&form, this);
4476 	form.exec();
4477 }
4478 
4479 void FetMainForm::on_dataSubjectsStatisticsAction_triggered()
4480 {
4481 	if(!gt.rules.initialized){
4482 		QMessageBox::information(this, tr("FET information"),
4483 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4484 		return;
4485 	}
4486 
4487 	SubjectsStatisticsForm form(this);
4488 	setParentAndOtherThings(&form, this);
4489 	form.exec();
4490 }
4491 
4492 void FetMainForm::on_dataActivityTagsAction_triggered()
4493 {
4494 	if(!gt.rules.initialized){
4495 		QMessageBox::information(this, tr("FET information"),
4496 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4497 		return;
4498 	}
4499 
4500 	if(simulation_running || simulation_running_multi){
4501 		QMessageBox::information(this, tr("FET information"),
4502 			tr("Allocation in course.\nPlease stop simulation before this."));
4503 		return;
4504 	}
4505 
4506 	ActivityTagsForm form(this);
4507 	setParentAndOtherThings(&form, this);
4508 	form.exec();
4509 }
4510 
4511 void FetMainForm::on_dataYearsAction_triggered()
4512 {
4513 	if(!gt.rules.initialized){
4514 		QMessageBox::information(this, tr("FET information"),
4515 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4516 		return;
4517 	}
4518 
4519 	if(simulation_running || simulation_running_multi){
4520 		QMessageBox::information(this, tr("FET information"),
4521 			tr("Allocation in course.\nPlease stop simulation before this."));
4522 		return;
4523 	}
4524 
4525 	YearsForm form(this);
4526 	setParentAndOtherThings(&form, this);
4527 	form.exec();
4528 }
4529 
4530 void FetMainForm::on_dataGroupsAction_triggered()
4531 {
4532 	if(!gt.rules.initialized){
4533 		QMessageBox::information(this, tr("FET information"),
4534 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4535 		return;
4536 	}
4537 
4538 	if(simulation_running || simulation_running_multi){
4539 		QMessageBox::information(this, tr("FET information"),
4540 			tr("Allocation in course.\nPlease stop simulation before this."));
4541 		return;
4542 	}
4543 
4544 	GroupsForm form(this);
4545 	setParentAndOtherThings(&form, this);
4546 	form.exec();
4547 }
4548 
4549 void FetMainForm::on_dataSubgroupsAction_triggered()
4550 {
4551 	if(!gt.rules.initialized){
4552 		QMessageBox::information(this, tr("FET information"),
4553 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4554 		return;
4555 	}
4556 
4557 	if(simulation_running || simulation_running_multi){
4558 		QMessageBox::information(this, tr("FET information"),
4559 			tr("Allocation in course.\nPlease stop simulation before this."));
4560 		return;
4561 	}
4562 
4563 	SubgroupsForm form(this);
4564 	setParentAndOtherThings(&form, this);
4565 	form.exec();
4566 }
4567 
4568 void FetMainForm::on_dataStudentsStatisticsAction_triggered()
4569 {
4570 	if(!gt.rules.initialized){
4571 		QMessageBox::information(this, tr("FET information"),
4572 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4573 		return;
4574 	}
4575 
4576 	StudentsStatisticsForm form(this);
4577 	setParentAndOtherThings(&form, this);
4578 	form.exec();
4579 }
4580 
4581 void FetMainForm::on_dataActivitiesRoomsStatisticsAction_triggered()
4582 {
4583 	if(!gt.rules.initialized){
4584 		QMessageBox::information(this, tr("FET information"),
4585 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4586 		return;
4587 	}
4588 
4589 	ActivitiesRoomsStatisticsForm form(this);
4590 	setParentAndOtherThings(&form, this);
4591 	form.exec();
4592 }
4593 
4594 void FetMainForm::on_dataTeachersSubjectsQualificationsStatisticsAction_triggered()
4595 {
4596 	if(!gt.rules.initialized){
4597 		QMessageBox::information(this, tr("FET information"),
4598 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4599 		return;
4600 	}
4601 
4602 	QHash<QString, Teacher*> teachersHash;
4603 
4604 	for(Teacher* tch : qAsConst(gt.rules.teachersList))
4605 		teachersHash.insert(tch->name, tch);
4606 
4607 	bool unqualifiedExist=false;
4608 
4609 	QString s=tr("The teachers who are not qualified to teach a certain activity (in activities order):");
4610 	s+="\n\n";
4611 
4612 	bool begin=true;
4613 
4614 	for(Activity* act : qAsConst(gt.rules.activitiesList)){
4615 		bool alreadyAdded=false;
4616 		QString subject=act->subjectName;
4617 		for(const QString& teacher : qAsConst(act->teachersNames)){
4618 			Teacher* tch=teachersHash.value(teacher, nullptr);
4619 			assert(tch!=nullptr);
4620 			if(!tch->qualifiedSubjectsHash.contains(subject)){
4621 				unqualifiedExist=true;
4622 				if(!alreadyAdded){
4623 					if(!begin)
4624 						s+="\n";
4625 					else
4626 						begin=false;
4627 					s+=tr("For activity: %1").arg(act->getDescription(gt.rules));
4628 					s+="\n";
4629 					alreadyAdded=true;
4630 				}
4631 				s+=QString(4, ' ');
4632 				s+=tr("Teacher %1 is not qualified to teach subject %2.").arg(teacher).arg(subject);
4633 				s+="\n";
4634 			}
4635 		}
4636 	}
4637 
4638 	if(!unqualifiedExist)
4639 		s=tr("All the teachers are qualified to teach their activities.");
4640 	s+="\n";
4641 
4642 	LongTextMessageBox::largeInformation(this, tr("FET information"), s);
4643 }
4644 
4645 void FetMainForm::on_helpSettingsAction_triggered()
4646 {
4647 	QString s;
4648 
4649 	s+=tr("Probably some settings which are more difficult to understand are these ones:");
4650 	s+="\n\n";
4651 	s+=tr("Option 'Divide html timetables with time-axis by days':"
4652 	" This means simply that the html timetables of type 'time horizontal' or 'time vertical' (see the generated html timetables)"
4653 	" should be or not divided according to the days.");
4654 	s+=" ";
4655 	s+=tr("If the 'time horizontal' or 'time vertical' html timetables are too large for you, then you might need to select this option");
4656 
4657 	s+="\n\n";
4658 	s+=tr("Option 'Print activities with same starting time in timetables': selecting it means that the html timetables will contain for"
4659 	 " each slot all the activities which have the same starting time (fact specified by your constraints) as the activity(ies) which are normally shown in this slot."
4660 	 " If you don't use constraints activities same starting time, this option has no effect for you.");
4661 
4662 	s+="\n\n";
4663 	s+=tr("Seed of random number generator: please read the help in the dialog of this option");
4664 
4665 	s+="\n\n";
4666 	s+=tr("Interface - use colors: the places with colors in FET interface are in:");
4667 	s+="\n";
4668 	s+=" -";
4669 	s+=tr("add/modify constraints break, not available, preferred starting times or time slots, occupy max time slots from selection or"
4670 		" max simultaneous in selected time slots (the table cells will have green or red colors).");
4671 	s+="\n";
4672 	s+=" -";
4673 	s+=tr("activities and subactivities dialogs, the inactive activities will have a distinctive background color");
4674 	s+="\n";
4675 	s+=" -";
4676 	s+=tr("all time constraints and all space constraints dialogs, the inactive constraints will have a distinctive background color");
4677 	s+="\n";
4678 	s+=" -";
4679 	s+=tr("group activities in initial order items, the inactive items will have a distinctive background color");
4680 	s+="\n";
4681 	s+=" -";
4682 	s+=tr("the timetable view dialogs");
4683 
4684 	s+="\n\n";
4685 	s+=tr("Enable activity tag max hours daily:");
4686 	s+="\n";
4687 	s+=tr("This will enable the menu for the constraints: teacher(s) or students (set) activity tag max hours daily / per real day (where applicable)."
4688 		" These constraints are good, but not perfect and may bring slow down of generation or impossible timetables if used unproperly. Select only"
4689 		" if you know what you're doing.");
4690 	s+="\n\n";
4691 	s+=tr("Enable students max gaps per day:");
4692 	s+="\n";
4693 	s+=tr("This will enable the menu for 2 constraints: students (set) max gaps per day. These 2 constraints are good, but not perfect and"
4694 		" may bring slow down of generation or impossible timetables if used unproperly. Select only if you know what you're doing.");
4695 
4696 	s+="\n\n";
4697 	s+=tr("Warn if using not perfect constraints:", "this is a warning if user uses not perfect constraints");
4698 	s+="\n";
4699 	s+=tr("If you use a not perfect constraint (activity tag max hours daily / per real day or students max gaps per day / per real day / per week for real days - where applicable),"
4700 		" you'll get a warning before generating. Uncheck this option to get rid of that warning (it is recommended to keep the warning).");
4701 
4702 	s+="\n\n";
4703 	s+=tr("Enable students min hours daily with empty days:");
4704 	s+="\n";
4705 	s+=tr("This will enable you to modify the students min hours daily constraints, to allow empty days. It is IMPERATIVE (for performance reasons) to allow empty days for students min hours daily only"
4706 		" if your institution allows empty days for students and if a solution with empty days is possible. Select only if you know what you're doing.");
4707 
4708 	s+="\n\n";
4709 	s+=tr("Warn if using students min hours daily with empty days:", "this is a warning if user has constraints min hours daily for students with allowed empty days");
4710 	s+="\n";
4711 	s+=tr("If you use constraints students min hours daily with allowed empty days, you'll get a warning before generating"
4712 		". Uncheck this option to get rid of that warning (it is recommended to keep the warning).");
4713 
4714 	s+="\n\n";
4715 
4716 	s+=tr("Confirmations: unselect the corresponding check boxes if you want to skip introduction and confirmation to various advanced dialogs.");
4717 
4718 	s+="\n\n";
4719 
4720 	s+=tr("Duplicate vertical headers to the right (in timetable settings) - select this if you want the timetables to duplicate the table left vertical headers to the right"
4721 		" part of the tables");
4722 
4723 	s+="\n\n";
4724 
4725 	s+=tr("If you have many subgroups and you don't explicitly use them, it is recommended to use the three global settings: hide subgroups"
4726 		" in combo boxes, hide subgroups in activity planning, and do not write subgroups timetables on hard disk.");
4727 	s+="\n";
4728 	s+=tr("Note that using the global menu setting to hide subgroups in activity planning is a different thing from the check box in the activity"
4729 		" planning dialog, and the global setting works better and faster.");
4730 	s+="\n";
4731 	s+=tr("If you hide subgroups in combo boxes, the affected dialogs (like the activities dialog or the add constraint students set not available times dialog)"
4732 		" will load much faster if you have many subgroups.");
4733 
4734 	s+="\n\n";
4735 
4736 	s+=tr("If you are only working on a timetable, and you do not need to publish it, you may want to disable writing some categories of timetables"
4737 		" on the hard disk, for operativity (the generation speed is not affected, only the overhead to write the partial/complete timetables"
4738 		" when stopping/finishing the simulation). The timetables taking the longest time are the subgroups, groups AND years ones.");
4739 	s+=" ";
4740 	s+=tr("(Also the conflicts timetable might take long to write, if the file is large.)");
4741 	s+=" ";
4742 	s+=tr("After that, you can re-enable writing of the timetables and re-generate.");
4743 
4744 	s+="\n\n";
4745 	s+=tr("Show tool tips for constraints with tables: in the add/modify constraint dialogs which use tables, like the 'not available times' ones,"
4746 		" each table cell will have a tool tip to show the current day/hour (column/row name).");
4747 
4748 	LongTextMessageBox::largeInformation(this, tr("FET information"), s);
4749 }
4750 
4751 void FetMainForm::on_dataHelpOnStatisticsAction_triggered()
4752 {
4753 	QString s;
4754 
4755 	s+=tr("You will find in the statistics only active activities count. The inactive ones are not counted.");
4756 
4757 	s+="\n\n";
4758 
4759 	s+=tr("Statistics for students might be the most difficult to understand."
4760 	 " If you are using divisions of years: probably the most relevant statistics"
4761 	 " are the ones for each subgroup (so you may check only subgroups check box)."
4762 	 " You may see more hours for the years or groups, but these are not significant, please ignore them,"
4763 	 " because each year or group will count also activities of all contained subgroups."
4764 	 "\n\n"
4765 	 "Each subgroup should have a number of hours per week close to the average of"
4766 	 " all subgroups and close to the normal number of working hours of each students set."
4767 	 " If a subgroup has a much lower value, maybe you used incorrectly"
4768 	 " the years/groups/subgroups for activities."
4769 	 "\n\n"
4770 	 "Please read FAQ for detailed description"
4771 	 " on how divisions work. The key is that the subgroups are independent and represent the smallest unit of students."
4772 	 " Each subgroup receives the activities of the parent year and parent group and of itself."
4773 	 "\n\n"
4774 	 "Having a subgroup with too little working hours per week means that you inputted activities in a wrong manner,"
4775 	 " and also that some constraints like no gaps, early or min hours daily for this subgroup"
4776 	 " are interpreted in a wrong manner (if subgroup has only 2 activities, then these must"
4777 	 " be placed in the first hours, which is too hard and wrong)."
4778 	 );
4779 
4780 	s+="\n\n";
4781 	s+=tr("Students' statistics form contains a check box named '%1'"
4782 	 ". This has effect only if you have overlapping groups/years, and means that FET will show the complete tree structure"
4783 	 ", even if that means that some subgroups/groups will appear twice or more in the table, with the same information."
4784 	 " For instance, if you have year Y1, groups G1 and G2, subgroups S1, S2, S3, with structure: Y1 (G1 (S1, S2), G2 (S1, S3)),"
4785 	 " S1 will appear twice in the table").arg(tr("Show duplicates"));
4786 
4787 	s+="\n\n";
4788 	s+=tr("Activities rooms statistics: this menu will show the activities which may be scheduled in an unspecified room,"
4789 	 " if they are referred to by space constraints with weight under 100.0%, and the activities which will certainly be scheduled in an"
4790 	 " unspecified room, if they are not referred to by any space constraints. Remember that home rooms constraints are effective only"
4791 	 " on activities which have only the exact specified teacher or students set (activities with more teachers or students"
4792 	 " sets are not affected by home rooms constraints, you need to have preferred rooms constraints for such activities to ensure"
4793 	 " they will not end up in an unspecified room).");
4794 
4795 	LongTextMessageBox::largeInformation(this, tr("FET - information about statistics"), s);
4796 }
4797 
4798 void FetMainForm::on_dataActivitiesAction_triggered()
4799 {
4800 	if(!gt.rules.initialized){
4801 		QMessageBox::information(this, tr("FET information"),
4802 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4803 		return;
4804 	}
4805 
4806 	if(simulation_running || simulation_running_multi){
4807 		QMessageBox::information(this, tr("FET information"),
4808 			tr("Allocation in course.\nPlease stop simulation before this."));
4809 		return;
4810 	}
4811 
4812 	ActivitiesForm form(this, "", "", "", "");
4813 	setParentAndOtherThings(&form, this);
4814 	form.exec();
4815 }
4816 
4817 void FetMainForm::on_dataSubactivitiesAction_triggered()
4818 {
4819 	if(!gt.rules.initialized){
4820 		QMessageBox::information(this, tr("FET information"),
4821 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4822 		return;
4823 	}
4824 
4825 	if(simulation_running || simulation_running_multi){
4826 		QMessageBox::information(this, tr("FET information"),
4827 			tr("Allocation in course.\nPlease stop simulation before this."));
4828 		return;
4829 	}
4830 
4831 	SubactivitiesForm form(this, "", "", "", "");
4832 	setParentAndOtherThings(&form, this);
4833 	form.exec();
4834 }
4835 
4836 void FetMainForm::on_dataRoomsAction_triggered()
4837 {
4838 	if(!gt.rules.initialized){
4839 		QMessageBox::information(this, tr("FET information"),
4840 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4841 		return;
4842 	}
4843 
4844 	if(simulation_running || simulation_running_multi){
4845 		QMessageBox::information(this, tr("FET information"),
4846 			tr("Allocation in course.\nPlease stop simulation before this."));
4847 		return;
4848 	}
4849 
4850 	RoomsForm form(this);
4851 	setParentAndOtherThings(&form, this);
4852 	form.exec();
4853 }
4854 
4855 void FetMainForm::on_dataBuildingsAction_triggered()
4856 {
4857 	if(!gt.rules.initialized){
4858 		QMessageBox::information(this, tr("FET information"),
4859 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4860 		return;
4861 	}
4862 
4863 	if(simulation_running || simulation_running_multi){
4864 		QMessageBox::information(this, tr("FET information"),
4865 			tr("Allocation in course.\nPlease stop simulation before this."));
4866 		return;
4867 	}
4868 
4869 	BuildingsForm form(this);
4870 	setParentAndOtherThings(&form, this);
4871 	form.exec();
4872 }
4873 
4874 void FetMainForm::on_dataAllTimeConstraintsAction_triggered()
4875 {
4876 	if(!gt.rules.initialized){
4877 		QMessageBox::information(this, tr("FET information"),
4878 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4879 		return;
4880 	}
4881 
4882 	if(simulation_running || simulation_running_multi){
4883 		QMessageBox::information(this, tr("FET information"),
4884 			tr("Allocation in course.\nPlease stop simulation before this."));
4885 		return;
4886 	}
4887 
4888 	AllTimeConstraintsForm form(this);
4889 	setParentAndOtherThings(&form, this);
4890 	form.exec();
4891 }
4892 
4893 void FetMainForm::on_dataAllSpaceConstraintsAction_triggered()
4894 {
4895 	if(!gt.rules.initialized){
4896 		QMessageBox::information(this, tr("FET information"),
4897 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4898 		return;
4899 	}
4900 
4901 	if(simulation_running || simulation_running_multi){
4902 		QMessageBox::information(this, tr("FET information"),
4903 			tr("Allocation in course.\nPlease stop simulation before this."));
4904 		return;
4905 	}
4906 
4907 	AllSpaceConstraintsForm form(this);
4908 	setParentAndOtherThings(&form, this);
4909 	form.exec();
4910 }
4911 
4912 void FetMainForm::dataTimeConstraintsTwoActivitiesConsecutiveAction_triggered()
4913 {
4914 	if(!gt.rules.initialized){
4915 		QMessageBox::information(this, tr("FET information"),
4916 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4917 		return;
4918 	}
4919 
4920 	if(simulation_running || simulation_running_multi){
4921 		QMessageBox::information(this, tr("FET information"),
4922 			tr("Allocation in course.\nPlease stop simulation before this."));
4923 		return;
4924 	}
4925 
4926 	ConstraintTwoActivitiesConsecutiveForm form(this);
4927 	setParentAndOtherThings(&form, this);
4928 	form.exec();
4929 }
4930 
4931 void FetMainForm::dataTimeConstraintsTwoActivitiesGroupedAction_triggered()
4932 {
4933 	if(!gt.rules.initialized){
4934 		QMessageBox::information(this, tr("FET information"),
4935 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4936 		return;
4937 	}
4938 
4939 	if(simulation_running || simulation_running_multi){
4940 		QMessageBox::information(this, tr("FET information"),
4941 			tr("Allocation in course.\nPlease stop simulation before this."));
4942 		return;
4943 	}
4944 
4945 	ConstraintTwoActivitiesGroupedForm form(this);
4946 	setParentAndOtherThings(&form, this);
4947 	form.exec();
4948 }
4949 
4950 void FetMainForm::dataTimeConstraintsThreeActivitiesGroupedAction_triggered()
4951 {
4952 	if(!gt.rules.initialized){
4953 		QMessageBox::information(this, tr("FET information"),
4954 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4955 		return;
4956 	}
4957 
4958 	if(simulation_running || simulation_running_multi){
4959 		QMessageBox::information(this, tr("FET information"),
4960 			tr("Allocation in course.\nPlease stop simulation before this."));
4961 		return;
4962 	}
4963 
4964 	ConstraintThreeActivitiesGroupedForm form(this);
4965 	setParentAndOtherThings(&form, this);
4966 	form.exec();
4967 }
4968 
4969 void FetMainForm::dataTimeConstraintsTwoActivitiesOrderedAction_triggered()
4970 {
4971 	if(!gt.rules.initialized){
4972 		QMessageBox::information(this, tr("FET information"),
4973 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4974 		return;
4975 	}
4976 
4977 	if(simulation_running || simulation_running_multi){
4978 		QMessageBox::information(this, tr("FET information"),
4979 			tr("Allocation in course.\nPlease stop simulation before this."));
4980 		return;
4981 	}
4982 
4983 	ConstraintTwoActivitiesOrderedForm form(this);
4984 	setParentAndOtherThings(&form, this);
4985 	form.exec();
4986 }
4987 
4988 void FetMainForm::dataTimeConstraintsTwoSetsOfActivitiesOrderedAction_triggered()
4989 {
4990 	if(!gt.rules.initialized){
4991 		QMessageBox::information(this, tr("FET information"),
4992 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
4993 		return;
4994 	}
4995 
4996 	if(simulation_running || simulation_running_multi){
4997 		QMessageBox::information(this, tr("FET information"),
4998 			tr("Allocation in course.\nPlease stop simulation before this."));
4999 		return;
5000 	}
5001 
5002 	ConstraintTwoSetsOfActivitiesOrderedForm form(this);
5003 	setParentAndOtherThings(&form, this);
5004 	form.exec();
5005 }
5006 
5007 void FetMainForm::dataTimeConstraintsTwoActivitiesOrderedIfSameDayAction_triggered()
5008 {
5009 	if(!gt.rules.initialized){
5010 		QMessageBox::information(this, tr("FET information"),
5011 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5012 		return;
5013 	}
5014 
5015 	if(simulation_running || simulation_running_multi){
5016 		QMessageBox::information(this, tr("FET information"),
5017 			tr("Allocation in course.\nPlease stop simulation before this."));
5018 		return;
5019 	}
5020 
5021 	ConstraintTwoActivitiesOrderedIfSameDayForm form(this);
5022 	setParentAndOtherThings(&form, this);
5023 	form.exec();
5024 }
5025 
5026 void FetMainForm::dataTimeConstraintsActivitiesPreferredTimeSlotsAction_triggered()
5027 {
5028 	if(!gt.rules.initialized){
5029 		QMessageBox::information(this, tr("FET information"),
5030 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5031 		return;
5032 	}
5033 
5034 	if(simulation_running || simulation_running_multi){
5035 		QMessageBox::information(this, tr("FET information"),
5036 			tr("Allocation in course.\nPlease stop simulation before this."));
5037 		return;
5038 	}
5039 
5040 	ConstraintActivitiesPreferredTimeSlotsForm form(this);
5041 	setParentAndOtherThings(&form, this);
5042 	form.exec();
5043 }
5044 
5045 void FetMainForm::dataTimeConstraintsActivitiesPreferredStartingTimesAction_triggered()
5046 {
5047 	if(!gt.rules.initialized){
5048 		QMessageBox::information(this, tr("FET information"),
5049 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5050 		return;
5051 	}
5052 
5053 	if(simulation_running || simulation_running_multi){
5054 		QMessageBox::information(this, tr("FET information"),
5055 			tr("Allocation in course.\nPlease stop simulation before this."));
5056 		return;
5057 	}
5058 
5059 	ConstraintActivitiesPreferredStartingTimesForm form(this);
5060 	setParentAndOtherThings(&form, this);
5061 	form.exec();
5062 }
5063 
5064 void FetMainForm::dataTimeConstraintsSubactivitiesPreferredTimeSlotsAction_triggered()
5065 {
5066 	if(!gt.rules.initialized){
5067 		QMessageBox::information(this, tr("FET information"),
5068 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5069 		return;
5070 	}
5071 
5072 	if(simulation_running || simulation_running_multi){
5073 		QMessageBox::information(this, tr("FET information"),
5074 			tr("Allocation in course.\nPlease stop simulation before this."));
5075 		return;
5076 	}
5077 
5078 	ConstraintSubactivitiesPreferredTimeSlotsForm form(this);
5079 	setParentAndOtherThings(&form, this);
5080 	form.exec();
5081 }
5082 
5083 void FetMainForm::dataTimeConstraintsSubactivitiesPreferredStartingTimesAction_triggered()
5084 {
5085 	if(!gt.rules.initialized){
5086 		QMessageBox::information(this, tr("FET information"),
5087 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5088 		return;
5089 	}
5090 
5091 	if(simulation_running || simulation_running_multi){
5092 		QMessageBox::information(this, tr("FET information"),
5093 			tr("Allocation in course.\nPlease stop simulation before this."));
5094 		return;
5095 	}
5096 
5097 	ConstraintSubactivitiesPreferredStartingTimesForm form(this);
5098 	setParentAndOtherThings(&form, this);
5099 	form.exec();
5100 }
5101 
5102 void FetMainForm::dataTimeConstraintsActivityEndsStudentsDayAction_triggered()
5103 {
5104 	if(!gt.rules.initialized){
5105 		QMessageBox::information(this, tr("FET information"),
5106 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5107 		return;
5108 	}
5109 
5110 	if(simulation_running || simulation_running_multi){
5111 		QMessageBox::information(this, tr("FET information"),
5112 			tr("Allocation in course.\nPlease stop simulation before this."));
5113 		return;
5114 	}
5115 
5116 	ConstraintActivityEndsStudentsDayForm form(this);
5117 	setParentAndOtherThings(&form, this);
5118 	form.exec();
5119 }
5120 
5121 void FetMainForm::dataTimeConstraintsActivitiesEndStudentsDayAction_triggered()
5122 {
5123 	if(!gt.rules.initialized){
5124 		QMessageBox::information(this, tr("FET information"),
5125 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5126 		return;
5127 	}
5128 
5129 	if(simulation_running || simulation_running_multi){
5130 		QMessageBox::information(this, tr("FET information"),
5131 			tr("Allocation in course.\nPlease stop simulation before this."));
5132 		return;
5133 	}
5134 
5135 	ConstraintActivitiesEndStudentsDayForm form(this);
5136 	setParentAndOtherThings(&form, this);
5137 	form.exec();
5138 }
5139 
5140 void FetMainForm::dataTimeConstraintsActivityEndsTeachersDayAction_triggered()
5141 {
5142 	if(!gt.rules.initialized){
5143 		QMessageBox::information(this, tr("FET information"),
5144 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5145 		return;
5146 	}
5147 
5148 	if(simulation_running || simulation_running_multi){
5149 		QMessageBox::information(this, tr("FET information"),
5150 			tr("Allocation in course.\nPlease stop simulation before this."));
5151 		return;
5152 	}
5153 
5154 	ConstraintActivityEndsTeachersDayForm form(this);
5155 	setParentAndOtherThings(&form, this);
5156 	form.exec();
5157 }
5158 
5159 void FetMainForm::dataTimeConstraintsActivitiesEndTeachersDayAction_triggered()
5160 {
5161 	if(!gt.rules.initialized){
5162 		QMessageBox::information(this, tr("FET information"),
5163 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5164 		return;
5165 	}
5166 
5167 	if(simulation_running || simulation_running_multi){
5168 		QMessageBox::information(this, tr("FET information"),
5169 			tr("Allocation in course.\nPlease stop simulation before this."));
5170 		return;
5171 	}
5172 
5173 	ConstraintActivitiesEndTeachersDayForm form(this);
5174 	setParentAndOtherThings(&form, this);
5175 	form.exec();
5176 }
5177 
5178 void FetMainForm::dataTimeConstraintsActivitiesSameStartingTimeAction_triggered()
5179 {
5180 	if(!gt.rules.initialized){
5181 		QMessageBox::information(this, tr("FET information"),
5182 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5183 		return;
5184 	}
5185 
5186 	if(simulation_running || simulation_running_multi){
5187 		QMessageBox::information(this, tr("FET information"),
5188 			tr("Allocation in course.\nPlease stop simulation before this."));
5189 		return;
5190 	}
5191 
5192 	ConstraintActivitiesSameStartingTimeForm form(this);
5193 	setParentAndOtherThings(&form, this);
5194 	form.exec();
5195 }
5196 
5197 void FetMainForm::dataTimeConstraintsActivitiesSameStartingHourAction_triggered()
5198 {
5199 	if(!gt.rules.initialized){
5200 		QMessageBox::information(this, tr("FET information"),
5201 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5202 		return;
5203 	}
5204 
5205 	if(simulation_running || simulation_running_multi){
5206 		QMessageBox::information(this, tr("FET information"),
5207 			tr("Allocation in course.\nPlease stop simulation before this."));
5208 		return;
5209 	}
5210 
5211 	ConstraintActivitiesSameStartingHourForm form(this);
5212 	setParentAndOtherThings(&form, this);
5213 	form.exec();
5214 }
5215 
5216 void FetMainForm::dataTimeConstraintsActivitiesSameStartingDayAction_triggered()
5217 {
5218 	if(!gt.rules.initialized){
5219 		QMessageBox::information(this, tr("FET information"),
5220 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5221 		return;
5222 	}
5223 
5224 	if(simulation_running || simulation_running_multi){
5225 		QMessageBox::information(this, tr("FET information"),
5226 			tr("Allocation in course.\nPlease stop simulation before this."));
5227 		return;
5228 	}
5229 
5230 	ConstraintActivitiesSameStartingDayForm form(this);
5231 	setParentAndOtherThings(&form, this);
5232 	form.exec();
5233 }
5234 
5235 void FetMainForm::dataTimeConstraintsActivitiesOccupyMaxTimeSlotsFromSelectionAction_triggered()
5236 {
5237 	if(!gt.rules.initialized){
5238 		QMessageBox::information(this, tr("FET information"),
5239 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5240 		return;
5241 	}
5242 
5243 	if(simulation_running || simulation_running_multi){
5244 		QMessageBox::information(this, tr("FET information"),
5245 			tr("Allocation in course.\nPlease stop simulation before this."));
5246 		return;
5247 	}
5248 
5249 	ConstraintActivitiesOccupyMaxTimeSlotsFromSelectionForm form(this);
5250 	setParentAndOtherThings(&form, this);
5251 	form.exec();
5252 }
5253 
5254 void FetMainForm::dataTimeConstraintsActivitiesOccupyMinTimeSlotsFromSelectionAction_triggered()
5255 {
5256 	if(!gt.rules.initialized){
5257 		QMessageBox::information(this, tr("FET information"),
5258 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5259 		return;
5260 	}
5261 
5262 	if(simulation_running || simulation_running_multi){
5263 		QMessageBox::information(this, tr("FET information"),
5264 			tr("Allocation in course.\nPlease stop simulation before this."));
5265 		return;
5266 	}
5267 
5268 	ConstraintActivitiesOccupyMinTimeSlotsFromSelectionForm form(this);
5269 	setParentAndOtherThings(&form, this);
5270 	form.exec();
5271 }
5272 
5273 void FetMainForm::dataTimeConstraintsActivitiesMaxSimultaneousInSelectedTimeSlotsAction_triggered()
5274 {
5275 	if(!gt.rules.initialized){
5276 		QMessageBox::information(this, tr("FET information"),
5277 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5278 		return;
5279 	}
5280 
5281 	if(simulation_running || simulation_running_multi){
5282 		QMessageBox::information(this, tr("FET information"),
5283 			tr("Allocation in course.\nPlease stop simulation before this."));
5284 		return;
5285 	}
5286 
5287 	ConstraintActivitiesMaxSimultaneousInSelectedTimeSlotsForm form(this);
5288 	setParentAndOtherThings(&form, this);
5289 	form.exec();
5290 }
5291 
5292 void FetMainForm::dataTimeConstraintsActivitiesMinSimultaneousInSelectedTimeSlotsAction_triggered()
5293 {
5294 	if(!gt.rules.initialized){
5295 		QMessageBox::information(this, tr("FET information"),
5296 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5297 		return;
5298 	}
5299 
5300 	if(simulation_running || simulation_running_multi){
5301 		QMessageBox::information(this, tr("FET information"),
5302 			tr("Allocation in course.\nPlease stop simulation before this."));
5303 		return;
5304 	}
5305 
5306 	ConstraintActivitiesMinSimultaneousInSelectedTimeSlotsForm form(this);
5307 	setParentAndOtherThings(&form, this);
5308 	form.exec();
5309 }
5310 
5311 void FetMainForm::dataTimeConstraintsMaxTotalActivitiesFromSetInSelectedTimeSlotsAction_triggered()
5312 {
5313 	if(!gt.rules.initialized){
5314 		QMessageBox::information(this, tr("FET information"),
5315 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5316 		return;
5317 	}
5318 
5319 	if(simulation_running || simulation_running_multi){
5320 		QMessageBox::information(this, tr("FET information"),
5321 			tr("Allocation in course.\nPlease stop simulation before this."));
5322 		return;
5323 	}
5324 
5325 	ConstraintMaxTotalActivitiesFromSetInSelectedTimeSlotsForm form(this);
5326 	setParentAndOtherThings(&form, this);
5327 	form.exec();
5328 }
5329 
5330 void FetMainForm::dataTimeConstraintsTeacherNotAvailableTimesAction_triggered()
5331 {
5332 	if(!gt.rules.initialized){
5333 		QMessageBox::information(this, tr("FET information"),
5334 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5335 		return;
5336 	}
5337 
5338 	if(simulation_running || simulation_running_multi){
5339 		QMessageBox::information(this, tr("FET information"),
5340 			tr("Allocation in course.\nPlease stop simulation before this."));
5341 		return;
5342 	}
5343 
5344 	ConstraintTeacherNotAvailableTimesForm form(this);
5345 	setParentAndOtherThings(&form, this);
5346 	form.exec();
5347 }
5348 
5349 void FetMainForm::dataTimeConstraintsBasicCompulsoryTimeAction_triggered()
5350 {
5351 	if(!gt.rules.initialized){
5352 		QMessageBox::information(this, tr("FET information"),
5353 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5354 		return;
5355 	}
5356 
5357 	if(simulation_running || simulation_running_multi){
5358 		QMessageBox::information(this, tr("FET information"),
5359 			tr("Allocation in course.\nPlease stop simulation before this."));
5360 		return;
5361 	}
5362 
5363 	ConstraintBasicCompulsoryTimeForm form(this);
5364 	setParentAndOtherThings(&form, this);
5365 	form.exec();
5366 }
5367 
5368 void FetMainForm::dataSpaceConstraintsBasicCompulsorySpaceAction_triggered()
5369 {
5370 	if(!gt.rules.initialized){
5371 		QMessageBox::information(this, tr("FET information"),
5372 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5373 		return;
5374 	}
5375 
5376 	if(simulation_running || simulation_running_multi){
5377 		QMessageBox::information(this, tr("FET information"),
5378 			tr("Allocation in course.\nPlease stop simulation before this."));
5379 		return;
5380 	}
5381 
5382 	ConstraintBasicCompulsorySpaceForm form(this);
5383 	setParentAndOtherThings(&form, this);
5384 	form.exec();
5385 }
5386 
5387 void FetMainForm::dataSpaceConstraintsRoomNotAvailableTimesAction_triggered()
5388 {
5389 	if(!gt.rules.initialized){
5390 		QMessageBox::information(this, tr("FET information"),
5391 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5392 		return;
5393 	}
5394 
5395 	if(simulation_running || simulation_running_multi){
5396 		QMessageBox::information(this, tr("FET information"),
5397 			tr("Allocation in course.\nPlease stop simulation before this."));
5398 		return;
5399 	}
5400 
5401 	ConstraintRoomNotAvailableTimesForm form(this);
5402 	setParentAndOtherThings(&form, this);
5403 	form.exec();
5404 }
5405 
5406 void FetMainForm::dataSpaceConstraintsTeacherRoomNotAvailableTimesAction_triggered()
5407 {
5408 	if(!gt.rules.initialized){
5409 		QMessageBox::information(this, tr("FET information"),
5410 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5411 		return;
5412 	}
5413 
5414 	if(simulation_running || simulation_running_multi){
5415 		QMessageBox::information(this, tr("FET information"),
5416 			tr("Allocation in course.\nPlease stop simulation before this."));
5417 		return;
5418 	}
5419 
5420 	ConstraintTeacherRoomNotAvailableTimesForm form(this);
5421 	setParentAndOtherThings(&form, this);
5422 	form.exec();
5423 }
5424 
5425 void FetMainForm::dataSpaceConstraintsActivityPreferredRoomAction_triggered()
5426 {
5427 	if(!gt.rules.initialized){
5428 		QMessageBox::information(this, tr("FET information"),
5429 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5430 		return;
5431 	}
5432 
5433 	if(simulation_running || simulation_running_multi){
5434 		QMessageBox::information(this, tr("FET information"),
5435 			tr("Allocation in course.\nPlease stop simulation before this."));
5436 		return;
5437 	}
5438 
5439 	ConstraintActivityPreferredRoomForm form(this);
5440 	setParentAndOtherThings(&form, this);
5441 	form.exec();
5442 }
5443 
5444 void FetMainForm::dataSpaceConstraintsActivityPreferredRoomsAction_triggered()
5445 {
5446 	if(!gt.rules.initialized){
5447 		QMessageBox::information(this, tr("FET information"),
5448 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5449 		return;
5450 	}
5451 
5452 	if(simulation_running || simulation_running_multi){
5453 		QMessageBox::information(this, tr("FET information"),
5454 			tr("Allocation in course.\nPlease stop simulation before this."));
5455 		return;
5456 	}
5457 
5458 	ConstraintActivityPreferredRoomsForm form(this);
5459 	setParentAndOtherThings(&form, this);
5460 	form.exec();
5461 }
5462 
5463 void FetMainForm::dataSpaceConstraintsSubjectPreferredRoomAction_triggered()
5464 {
5465 	if(!gt.rules.initialized){
5466 		QMessageBox::information(this, tr("FET information"),
5467 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5468 		return;
5469 	}
5470 
5471 	if(simulation_running || simulation_running_multi){
5472 		QMessageBox::information(this, tr("FET information"),
5473 			tr("Allocation in course.\nPlease stop simulation before this."));
5474 		return;
5475 	}
5476 
5477 	ConstraintSubjectPreferredRoomForm form(this);
5478 	setParentAndOtherThings(&form, this);
5479 	form.exec();
5480 }
5481 
5482 void FetMainForm::dataSpaceConstraintsSubjectPreferredRoomsAction_triggered()
5483 {
5484 	if(!gt.rules.initialized){
5485 		QMessageBox::information(this, tr("FET information"),
5486 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5487 		return;
5488 	}
5489 
5490 	if(simulation_running || simulation_running_multi){
5491 		QMessageBox::information(this, tr("FET information"),
5492 			tr("Allocation in course.\nPlease stop simulation before this."));
5493 		return;
5494 	}
5495 
5496 	ConstraintSubjectPreferredRoomsForm form(this);
5497 	setParentAndOtherThings(&form, this);
5498 	form.exec();
5499 }
5500 
5501 void FetMainForm::dataSpaceConstraintsSubjectActivityTagPreferredRoomAction_triggered()
5502 {
5503 	if(!gt.rules.initialized){
5504 		QMessageBox::information(this, tr("FET information"),
5505 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5506 		return;
5507 	}
5508 
5509 	if(simulation_running || simulation_running_multi){
5510 		QMessageBox::information(this, tr("FET information"),
5511 			tr("Allocation in course.\nPlease stop simulation before this."));
5512 		return;
5513 	}
5514 
5515 	ConstraintSubjectActivityTagPreferredRoomForm form(this);
5516 	setParentAndOtherThings(&form, this);
5517 	form.exec();
5518 }
5519 
5520 void FetMainForm::dataSpaceConstraintsSubjectActivityTagPreferredRoomsAction_triggered()
5521 {
5522 	if(!gt.rules.initialized){
5523 		QMessageBox::information(this, tr("FET information"),
5524 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5525 		return;
5526 	}
5527 
5528 	if(simulation_running || simulation_running_multi){
5529 		QMessageBox::information(this, tr("FET information"),
5530 			tr("Allocation in course.\nPlease stop simulation before this."));
5531 		return;
5532 	}
5533 
5534 	ConstraintSubjectActivityTagPreferredRoomsForm form(this);
5535 	setParentAndOtherThings(&form, this);
5536 	form.exec();
5537 }
5538 
5539 ///added 6 apr 2009
5540 void FetMainForm::dataSpaceConstraintsActivityTagPreferredRoomAction_triggered()
5541 {
5542 	if(!gt.rules.initialized){
5543 		QMessageBox::information(this, tr("FET information"),
5544 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5545 		return;
5546 	}
5547 
5548 	if(simulation_running || simulation_running_multi){
5549 		QMessageBox::information(this, tr("FET information"),
5550 			tr("Allocation in course.\nPlease stop simulation before this."));
5551 		return;
5552 	}
5553 
5554 	ConstraintActivityTagPreferredRoomForm form(this);
5555 	setParentAndOtherThings(&form, this);
5556 	form.exec();
5557 }
5558 
5559 void FetMainForm::dataSpaceConstraintsActivityTagPreferredRoomsAction_triggered()
5560 {
5561 	if(!gt.rules.initialized){
5562 		QMessageBox::information(this, tr("FET information"),
5563 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5564 		return;
5565 	}
5566 
5567 	if(simulation_running || simulation_running_multi){
5568 		QMessageBox::information(this, tr("FET information"),
5569 			tr("Allocation in course.\nPlease stop simulation before this."));
5570 		return;
5571 	}
5572 
5573 	ConstraintActivityTagPreferredRoomsForm form(this);
5574 	setParentAndOtherThings(&form, this);
5575 	form.exec();
5576 }
5577 ///
5578 
5579 void FetMainForm::dataSpaceConstraintsStudentsSetHomeRoomAction_triggered()
5580 {
5581 	if(!gt.rules.initialized){
5582 		QMessageBox::information(this, tr("FET information"),
5583 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5584 		return;
5585 	}
5586 
5587 	if(simulation_running || simulation_running_multi){
5588 		QMessageBox::information(this, tr("FET information"),
5589 			tr("Allocation in course.\nPlease stop simulation before this."));
5590 		return;
5591 	}
5592 
5593 	ConstraintStudentsSetHomeRoomForm form(this);
5594 	setParentAndOtherThings(&form, this);
5595 	form.exec();
5596 }
5597 
5598 void FetMainForm::dataSpaceConstraintsStudentsSetHomeRoomsAction_triggered()
5599 {
5600 	if(!gt.rules.initialized){
5601 		QMessageBox::information(this, tr("FET information"),
5602 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5603 		return;
5604 	}
5605 
5606 	if(simulation_running || simulation_running_multi){
5607 		QMessageBox::information(this, tr("FET information"),
5608 			tr("Allocation in course.\nPlease stop simulation before this."));
5609 		return;
5610 	}
5611 
5612 	ConstraintStudentsSetHomeRoomsForm form(this);
5613 	setParentAndOtherThings(&form, this);
5614 	form.exec();
5615 }
5616 
5617 
5618 void FetMainForm::dataSpaceConstraintsStudentsSetMaxBuildingChangesPerDayAction_triggered()
5619 {
5620 	if(!gt.rules.initialized){
5621 		QMessageBox::information(this, tr("FET information"),
5622 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5623 		return;
5624 	}
5625 
5626 	if(simulation_running || simulation_running_multi){
5627 		QMessageBox::information(this, tr("FET information"),
5628 			tr("Allocation in course.\nPlease stop simulation before this."));
5629 		return;
5630 	}
5631 
5632 	ConstraintStudentsSetMaxBuildingChangesPerDayForm form(this);
5633 	setParentAndOtherThings(&form, this);
5634 	form.exec();
5635 }
5636 
5637 void FetMainForm::dataSpaceConstraintsStudentsMaxBuildingChangesPerDayAction_triggered()
5638 {
5639 	if(!gt.rules.initialized){
5640 		QMessageBox::information(this, tr("FET information"),
5641 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5642 		return;
5643 	}
5644 
5645 	if(simulation_running || simulation_running_multi){
5646 		QMessageBox::information(this, tr("FET information"),
5647 			tr("Allocation in course.\nPlease stop simulation before this."));
5648 		return;
5649 	}
5650 
5651 	ConstraintStudentsMaxBuildingChangesPerDayForm form(this);
5652 	setParentAndOtherThings(&form, this);
5653 	form.exec();
5654 }
5655 
5656 void FetMainForm::dataSpaceConstraintsStudentsSetMaxBuildingChangesPerWeekAction_triggered()
5657 {
5658 	if(simulation_running || simulation_running_multi){
5659 	if(!gt.rules.initialized){
5660 		QMessageBox::information(this, tr("FET information"),
5661 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5662 		return;
5663 	}
5664 
5665 		QMessageBox::information(this, tr("FET information"),
5666 			tr("Allocation in course.\nPlease stop simulation before this."));
5667 		return;
5668 	}
5669 
5670 	ConstraintStudentsSetMaxBuildingChangesPerWeekForm form(this);
5671 	setParentAndOtherThings(&form, this);
5672 	form.exec();
5673 }
5674 
5675 void FetMainForm::dataSpaceConstraintsStudentsMaxBuildingChangesPerWeekAction_triggered()
5676 {
5677 	if(!gt.rules.initialized){
5678 		QMessageBox::information(this, tr("FET information"),
5679 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5680 		return;
5681 	}
5682 
5683 	if(simulation_running || simulation_running_multi){
5684 		QMessageBox::information(this, tr("FET information"),
5685 			tr("Allocation in course.\nPlease stop simulation before this."));
5686 		return;
5687 	}
5688 
5689 	ConstraintStudentsMaxBuildingChangesPerWeekForm form(this);
5690 	setParentAndOtherThings(&form, this);
5691 	form.exec();
5692 }
5693 
5694 void FetMainForm::dataSpaceConstraintsStudentsSetMinGapsBetweenBuildingChangesAction_triggered()
5695 {
5696 	if(!gt.rules.initialized){
5697 		QMessageBox::information(this, tr("FET information"),
5698 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5699 		return;
5700 	}
5701 
5702 	if(simulation_running || simulation_running_multi){
5703 		QMessageBox::information(this, tr("FET information"),
5704 			tr("Allocation in course.\nPlease stop simulation before this."));
5705 		return;
5706 	}
5707 
5708 	ConstraintStudentsSetMinGapsBetweenBuildingChangesForm form(this);
5709 	setParentAndOtherThings(&form, this);
5710 	form.exec();
5711 }
5712 
5713 void FetMainForm::dataSpaceConstraintsStudentsMinGapsBetweenBuildingChangesAction_triggered()
5714 {
5715 	if(!gt.rules.initialized){
5716 		QMessageBox::information(this, tr("FET information"),
5717 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5718 		return;
5719 	}
5720 
5721 	if(simulation_running || simulation_running_multi){
5722 		QMessageBox::information(this, tr("FET information"),
5723 			tr("Allocation in course.\nPlease stop simulation before this."));
5724 		return;
5725 	}
5726 
5727 	ConstraintStudentsMinGapsBetweenBuildingChangesForm form(this);
5728 	setParentAndOtherThings(&form, this);
5729 	form.exec();
5730 }
5731 
5732 void FetMainForm::dataSpaceConstraintsTeacherMaxBuildingChangesPerDayAction_triggered()
5733 {
5734 	if(!gt.rules.initialized){
5735 		QMessageBox::information(this, tr("FET information"),
5736 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5737 		return;
5738 	}
5739 
5740 	if(simulation_running || simulation_running_multi){
5741 		QMessageBox::information(this, tr("FET information"),
5742 			tr("Allocation in course.\nPlease stop simulation before this."));
5743 		return;
5744 	}
5745 
5746 	ConstraintTeacherMaxBuildingChangesPerDayForm form(this);
5747 	setParentAndOtherThings(&form, this);
5748 	form.exec();
5749 }
5750 void FetMainForm::dataSpaceConstraintsTeachersMaxBuildingChangesPerDayAction_triggered()
5751 {
5752 	if(!gt.rules.initialized){
5753 		QMessageBox::information(this, tr("FET information"),
5754 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5755 		return;
5756 	}
5757 
5758 	if(simulation_running || simulation_running_multi){
5759 		QMessageBox::information(this, tr("FET information"),
5760 			tr("Allocation in course.\nPlease stop simulation before this."));
5761 		return;
5762 	}
5763 
5764 	ConstraintTeachersMaxBuildingChangesPerDayForm form(this);
5765 	setParentAndOtherThings(&form, this);
5766 	form.exec();
5767 }
5768 
5769 void FetMainForm::dataSpaceConstraintsTeacherMaxBuildingChangesPerWeekAction_triggered()
5770 {
5771 	if(!gt.rules.initialized){
5772 		QMessageBox::information(this, tr("FET information"),
5773 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5774 		return;
5775 	}
5776 
5777 	if(simulation_running || simulation_running_multi){
5778 		QMessageBox::information(this, tr("FET information"),
5779 			tr("Allocation in course.\nPlease stop simulation before this."));
5780 		return;
5781 	}
5782 
5783 	ConstraintTeacherMaxBuildingChangesPerWeekForm form(this);
5784 	setParentAndOtherThings(&form, this);
5785 	form.exec();
5786 }
5787 
5788 void FetMainForm::dataSpaceConstraintsTeachersMaxBuildingChangesPerWeekAction_triggered()
5789 {
5790 	if(!gt.rules.initialized){
5791 		QMessageBox::information(this, tr("FET information"),
5792 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5793 		return;
5794 	}
5795 
5796 	if(simulation_running || simulation_running_multi){
5797 		QMessageBox::information(this, tr("FET information"),
5798 			tr("Allocation in course.\nPlease stop simulation before this."));
5799 		return;
5800 	}
5801 
5802 	ConstraintTeachersMaxBuildingChangesPerWeekForm form(this);
5803 	setParentAndOtherThings(&form, this);
5804 	form.exec();
5805 }
5806 
5807 void FetMainForm::dataSpaceConstraintsTeacherMinGapsBetweenBuildingChangesAction_triggered()
5808 {
5809 	if(!gt.rules.initialized){
5810 		QMessageBox::information(this, tr("FET information"),
5811 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5812 		return;
5813 	}
5814 
5815 	if(simulation_running || simulation_running_multi){
5816 		QMessageBox::information(this, tr("FET information"),
5817 			tr("Allocation in course.\nPlease stop simulation before this."));
5818 		return;
5819 	}
5820 
5821 	ConstraintTeacherMinGapsBetweenBuildingChangesForm form(this);
5822 	setParentAndOtherThings(&form, this);
5823 	form.exec();
5824 }
5825 
5826 void FetMainForm::dataSpaceConstraintsTeachersMinGapsBetweenBuildingChangesAction_triggered()
5827 {
5828 	if(!gt.rules.initialized){
5829 		QMessageBox::information(this, tr("FET information"),
5830 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5831 		return;
5832 	}
5833 
5834 	if(simulation_running || simulation_running_multi){
5835 		QMessageBox::information(this, tr("FET information"),
5836 			tr("Allocation in course.\nPlease stop simulation before this."));
5837 		return;
5838 	}
5839 
5840 	ConstraintTeachersMinGapsBetweenBuildingChangesForm form(this);
5841 	setParentAndOtherThings(&form, this);
5842 	form.exec();
5843 }
5844 
5845 void FetMainForm::dataSpaceConstraintsStudentsSetMaxRoomChangesPerDayAction_triggered()
5846 {
5847 	if(!gt.rules.initialized){
5848 		QMessageBox::information(this, tr("FET information"),
5849 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5850 		return;
5851 	}
5852 
5853 	if(simulation_running || simulation_running_multi){
5854 		QMessageBox::information(this, tr("FET information"),
5855 			tr("Allocation in course.\nPlease stop simulation before this."));
5856 		return;
5857 	}
5858 
5859 	ConstraintStudentsSetMaxRoomChangesPerDayForm form(this);
5860 	setParentAndOtherThings(&form, this);
5861 	form.exec();
5862 }
5863 
5864 void FetMainForm::dataSpaceConstraintsStudentsMaxRoomChangesPerDayAction_triggered()
5865 {
5866 	if(!gt.rules.initialized){
5867 		QMessageBox::information(this, tr("FET information"),
5868 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5869 		return;
5870 	}
5871 
5872 	if(simulation_running || simulation_running_multi){
5873 		QMessageBox::information(this, tr("FET information"),
5874 			tr("Allocation in course.\nPlease stop simulation before this."));
5875 		return;
5876 	}
5877 
5878 	ConstraintStudentsMaxRoomChangesPerDayForm form(this);
5879 	setParentAndOtherThings(&form, this);
5880 	form.exec();
5881 }
5882 
5883 void FetMainForm::dataSpaceConstraintsStudentsSetMaxRoomChangesPerWeekAction_triggered()
5884 {
5885 	if(!gt.rules.initialized){
5886 		QMessageBox::information(this, tr("FET information"),
5887 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5888 		return;
5889 	}
5890 
5891 	if(simulation_running || simulation_running_multi){
5892 		QMessageBox::information(this, tr("FET information"),
5893 			tr("Allocation in course.\nPlease stop simulation before this."));
5894 		return;
5895 	}
5896 
5897 	ConstraintStudentsSetMaxRoomChangesPerWeekForm form(this);
5898 	setParentAndOtherThings(&form, this);
5899 	form.exec();
5900 }
5901 
5902 void FetMainForm::dataSpaceConstraintsStudentsMaxRoomChangesPerWeekAction_triggered()
5903 {
5904 	if(!gt.rules.initialized){
5905 		QMessageBox::information(this, tr("FET information"),
5906 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5907 		return;
5908 	}
5909 
5910 	if(simulation_running || simulation_running_multi){
5911 		QMessageBox::information(this, tr("FET information"),
5912 			tr("Allocation in course.\nPlease stop simulation before this."));
5913 		return;
5914 	}
5915 
5916 	ConstraintStudentsMaxRoomChangesPerWeekForm form(this);
5917 	setParentAndOtherThings(&form, this);
5918 	form.exec();
5919 }
5920 
5921 void FetMainForm::dataSpaceConstraintsStudentsSetMinGapsBetweenRoomChangesAction_triggered()
5922 {
5923 	if(!gt.rules.initialized){
5924 		QMessageBox::information(this, tr("FET information"),
5925 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5926 		return;
5927 	}
5928 
5929 	if(simulation_running || simulation_running_multi){
5930 		QMessageBox::information(this, tr("FET information"),
5931 			tr("Allocation in course.\nPlease stop simulation before this."));
5932 		return;
5933 	}
5934 
5935 	ConstraintStudentsSetMinGapsBetweenRoomChangesForm form(this);
5936 	setParentAndOtherThings(&form, this);
5937 	form.exec();
5938 }
5939 
5940 void FetMainForm::dataSpaceConstraintsStudentsMinGapsBetweenRoomChangesAction_triggered()
5941 {
5942 	if(!gt.rules.initialized){
5943 		QMessageBox::information(this, tr("FET information"),
5944 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5945 		return;
5946 	}
5947 
5948 	if(simulation_running || simulation_running_multi){
5949 		QMessageBox::information(this, tr("FET information"),
5950 			tr("Allocation in course.\nPlease stop simulation before this."));
5951 		return;
5952 	}
5953 
5954 	ConstraintStudentsMinGapsBetweenRoomChangesForm form(this);
5955 	setParentAndOtherThings(&form, this);
5956 	form.exec();
5957 }
5958 
5959 void FetMainForm::dataSpaceConstraintsTeacherMaxRoomChangesPerDayAction_triggered()
5960 {
5961 	if(!gt.rules.initialized){
5962 		QMessageBox::information(this, tr("FET information"),
5963 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5964 		return;
5965 	}
5966 
5967 	if(simulation_running || simulation_running_multi){
5968 		QMessageBox::information(this, tr("FET information"),
5969 			tr("Allocation in course.\nPlease stop simulation before this."));
5970 		return;
5971 	}
5972 
5973 	ConstraintTeacherMaxRoomChangesPerDayForm form(this);
5974 	setParentAndOtherThings(&form, this);
5975 	form.exec();
5976 }
5977 void FetMainForm::dataSpaceConstraintsTeachersMaxRoomChangesPerDayAction_triggered()
5978 {
5979 	if(!gt.rules.initialized){
5980 		QMessageBox::information(this, tr("FET information"),
5981 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
5982 		return;
5983 	}
5984 
5985 	if(simulation_running || simulation_running_multi){
5986 		QMessageBox::information(this, tr("FET information"),
5987 			tr("Allocation in course.\nPlease stop simulation before this."));
5988 		return;
5989 	}
5990 
5991 	ConstraintTeachersMaxRoomChangesPerDayForm form(this);
5992 	setParentAndOtherThings(&form, this);
5993 	form.exec();
5994 }
5995 
5996 void FetMainForm::dataSpaceConstraintsTeacherMaxRoomChangesPerWeekAction_triggered()
5997 {
5998 	if(!gt.rules.initialized){
5999 		QMessageBox::information(this, tr("FET information"),
6000 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6001 		return;
6002 	}
6003 
6004 	if(simulation_running || simulation_running_multi){
6005 		QMessageBox::information(this, tr("FET information"),
6006 			tr("Allocation in course.\nPlease stop simulation before this."));
6007 		return;
6008 	}
6009 
6010 	ConstraintTeacherMaxRoomChangesPerWeekForm form(this);
6011 	setParentAndOtherThings(&form, this);
6012 	form.exec();
6013 }
6014 
6015 void FetMainForm::dataSpaceConstraintsTeachersMaxRoomChangesPerWeekAction_triggered()
6016 {
6017 	if(!gt.rules.initialized){
6018 		QMessageBox::information(this, tr("FET information"),
6019 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6020 		return;
6021 	}
6022 
6023 	if(simulation_running || simulation_running_multi){
6024 		QMessageBox::information(this, tr("FET information"),
6025 			tr("Allocation in course.\nPlease stop simulation before this."));
6026 		return;
6027 	}
6028 
6029 	ConstraintTeachersMaxRoomChangesPerWeekForm form(this);
6030 	setParentAndOtherThings(&form, this);
6031 	form.exec();
6032 }
6033 
6034 void FetMainForm::dataSpaceConstraintsTeacherMinGapsBetweenRoomChangesAction_triggered()
6035 {
6036 	if(!gt.rules.initialized){
6037 		QMessageBox::information(this, tr("FET information"),
6038 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6039 		return;
6040 	}
6041 
6042 	if(simulation_running || simulation_running_multi){
6043 		QMessageBox::information(this, tr("FET information"),
6044 			tr("Allocation in course.\nPlease stop simulation before this."));
6045 		return;
6046 	}
6047 
6048 	ConstraintTeacherMinGapsBetweenRoomChangesForm form(this);
6049 	setParentAndOtherThings(&form, this);
6050 	form.exec();
6051 }
6052 
6053 void FetMainForm::dataSpaceConstraintsTeachersMinGapsBetweenRoomChangesAction_triggered()
6054 {
6055 	if(!gt.rules.initialized){
6056 		QMessageBox::information(this, tr("FET information"),
6057 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6058 		return;
6059 	}
6060 
6061 	if(simulation_running || simulation_running_multi){
6062 		QMessageBox::information(this, tr("FET information"),
6063 			tr("Allocation in course.\nPlease stop simulation before this."));
6064 		return;
6065 	}
6066 
6067 	ConstraintTeachersMinGapsBetweenRoomChangesForm form(this);
6068 	setParentAndOtherThings(&form, this);
6069 	form.exec();
6070 }
6071 
6072 void FetMainForm::dataSpaceConstraintsTeacherHomeRoomAction_triggered()
6073 {
6074 	if(!gt.rules.initialized){
6075 		QMessageBox::information(this, tr("FET information"),
6076 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6077 		return;
6078 	}
6079 
6080 	if(simulation_running || simulation_running_multi){
6081 		QMessageBox::information(this, tr("FET information"),
6082 			tr("Allocation in course.\nPlease stop simulation before this."));
6083 		return;
6084 	}
6085 
6086 	ConstraintTeacherHomeRoomForm form(this);
6087 	setParentAndOtherThings(&form, this);
6088 	form.exec();
6089 }
6090 
6091 void FetMainForm::dataSpaceConstraintsTeacherHomeRoomsAction_triggered()
6092 {
6093 	if(!gt.rules.initialized){
6094 		QMessageBox::information(this, tr("FET information"),
6095 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6096 		return;
6097 	}
6098 
6099 	if(simulation_running || simulation_running_multi){
6100 		QMessageBox::information(this, tr("FET information"),
6101 			tr("Allocation in course.\nPlease stop simulation before this."));
6102 		return;
6103 	}
6104 
6105 	ConstraintTeacherHomeRoomsForm form(this);
6106 	setParentAndOtherThings(&form, this);
6107 	form.exec();
6108 }
6109 
6110 void FetMainForm::dataTimeConstraintsStudentsSetNotAvailableTimesAction_triggered()
6111 {
6112 	if(!gt.rules.initialized){
6113 		QMessageBox::information(this, tr("FET information"),
6114 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6115 		return;
6116 	}
6117 
6118 	if(simulation_running || simulation_running_multi){
6119 		QMessageBox::information(this, tr("FET information"),
6120 			tr("Allocation in course.\nPlease stop simulation before this."));
6121 		return;
6122 	}
6123 
6124 	ConstraintStudentsSetNotAvailableTimesForm form(this);
6125 	setParentAndOtherThings(&form, this);
6126 	form.exec();
6127 }
6128 
6129 void FetMainForm::dataTimeConstraintsBreakTimesAction_triggered()
6130 {
6131 	if(!gt.rules.initialized){
6132 		QMessageBox::information(this, tr("FET information"),
6133 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6134 		return;
6135 	}
6136 
6137 	if(simulation_running || simulation_running_multi){
6138 		QMessageBox::information(this, tr("FET information"),
6139 			tr("Allocation in course.\nPlease stop simulation before this."));
6140 		return;
6141 	}
6142 
6143 	ConstraintBreakTimesForm form(this);
6144 	setParentAndOtherThings(&form, this);
6145 	form.exec();
6146 }
6147 
6148 void FetMainForm::dataTimeConstraintsTeacherMaxDaysPerWeekAction_triggered()
6149 {
6150 	if(!gt.rules.initialized){
6151 		QMessageBox::information(this, tr("FET information"),
6152 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6153 		return;
6154 	}
6155 
6156 	if(simulation_running || simulation_running_multi){
6157 		QMessageBox::information(this, tr("FET information"),
6158 			tr("Allocation in course.\nPlease stop simulation before this."));
6159 		return;
6160 	}
6161 
6162 	ConstraintTeacherMaxDaysPerWeekForm form(this);
6163 	setParentAndOtherThings(&form, this);
6164 	form.exec();
6165 }
6166 
6167 void FetMainForm::dataTimeConstraintsTeachersMaxDaysPerWeekAction_triggered()
6168 {
6169 	if(!gt.rules.initialized){
6170 		QMessageBox::information(this, tr("FET information"),
6171 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6172 		return;
6173 	}
6174 
6175 	if(simulation_running || simulation_running_multi){
6176 		QMessageBox::information(this, tr("FET information"),
6177 			tr("Allocation in course.\nPlease stop simulation before this."));
6178 		return;
6179 	}
6180 
6181 	ConstraintTeachersMaxDaysPerWeekForm form(this);
6182 	setParentAndOtherThings(&form, this);
6183 	form.exec();
6184 }
6185 
6186 void FetMainForm::dataTimeConstraintsTeacherMinDaysPerWeekAction_triggered()
6187 {
6188 	if(!gt.rules.initialized){
6189 		QMessageBox::information(this, tr("FET information"),
6190 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6191 		return;
6192 	}
6193 
6194 	if(simulation_running || simulation_running_multi){
6195 		QMessageBox::information(this, tr("FET information"),
6196 			tr("Allocation in course.\nPlease stop simulation before this."));
6197 		return;
6198 	}
6199 
6200 	ConstraintTeacherMinDaysPerWeekForm form(this);
6201 	setParentAndOtherThings(&form, this);
6202 	form.exec();
6203 }
6204 
6205 void FetMainForm::dataTimeConstraintsTeachersMinDaysPerWeekAction_triggered()
6206 {
6207 	if(!gt.rules.initialized){
6208 		QMessageBox::information(this, tr("FET information"),
6209 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6210 		return;
6211 	}
6212 
6213 	if(simulation_running || simulation_running_multi){
6214 		QMessageBox::information(this, tr("FET information"),
6215 			tr("Allocation in course.\nPlease stop simulation before this."));
6216 		return;
6217 	}
6218 
6219 	ConstraintTeachersMinDaysPerWeekForm form(this);
6220 	setParentAndOtherThings(&form, this);
6221 	form.exec();
6222 }
6223 
6224 void FetMainForm::dataTimeConstraintsTeacherIntervalMaxDaysPerWeekAction_triggered()
6225 {
6226 	if(!gt.rules.initialized){
6227 		QMessageBox::information(this, tr("FET information"),
6228 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6229 		return;
6230 	}
6231 
6232 	if(simulation_running || simulation_running_multi){
6233 		QMessageBox::information(this, tr("FET information"),
6234 			tr("Allocation in course.\nPlease stop simulation before this."));
6235 		return;
6236 	}
6237 
6238 	ConstraintTeacherIntervalMaxDaysPerWeekForm form(this);
6239 	setParentAndOtherThings(&form, this);
6240 	form.exec();
6241 }
6242 
6243 void FetMainForm::dataTimeConstraintsTeachersIntervalMaxDaysPerWeekAction_triggered()
6244 {
6245 	if(!gt.rules.initialized){
6246 		QMessageBox::information(this, tr("FET information"),
6247 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6248 		return;
6249 	}
6250 
6251 	if(simulation_running || simulation_running_multi){
6252 		QMessageBox::information(this, tr("FET information"),
6253 			tr("Allocation in course.\nPlease stop simulation before this."));
6254 		return;
6255 	}
6256 
6257 	ConstraintTeachersIntervalMaxDaysPerWeekForm form(this);
6258 	setParentAndOtherThings(&form, this);
6259 	form.exec();
6260 }
6261 
6262 void FetMainForm::dataTimeConstraintsStudentsSetMaxDaysPerWeekAction_triggered()
6263 {
6264 	if(!gt.rules.initialized){
6265 		QMessageBox::information(this, tr("FET information"),
6266 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6267 		return;
6268 	}
6269 
6270 	if(simulation_running || simulation_running_multi){
6271 		QMessageBox::information(this, tr("FET information"),
6272 			tr("Allocation in course.\nPlease stop simulation before this."));
6273 		return;
6274 	}
6275 
6276 	ConstraintStudentsSetMaxDaysPerWeekForm form(this);
6277 	setParentAndOtherThings(&form, this);
6278 	form.exec();
6279 }
6280 
6281 void FetMainForm::dataTimeConstraintsStudentsMaxDaysPerWeekAction_triggered()
6282 {
6283 	if(!gt.rules.initialized){
6284 		QMessageBox::information(this, tr("FET information"),
6285 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6286 		return;
6287 	}
6288 
6289 	if(simulation_running || simulation_running_multi){
6290 		QMessageBox::information(this, tr("FET information"),
6291 			tr("Allocation in course.\nPlease stop simulation before this."));
6292 		return;
6293 	}
6294 
6295 	ConstraintStudentsMaxDaysPerWeekForm form(this);
6296 	setParentAndOtherThings(&form, this);
6297 	form.exec();
6298 }
6299 
6300 void FetMainForm::dataTimeConstraintsStudentsSetIntervalMaxDaysPerWeekAction_triggered()
6301 {
6302 	if(!gt.rules.initialized){
6303 		QMessageBox::information(this, tr("FET information"),
6304 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6305 		return;
6306 	}
6307 
6308 	if(simulation_running || simulation_running_multi){
6309 		QMessageBox::information(this, tr("FET information"),
6310 			tr("Allocation in course.\nPlease stop simulation before this."));
6311 		return;
6312 	}
6313 
6314 	ConstraintStudentsSetIntervalMaxDaysPerWeekForm form(this);
6315 	setParentAndOtherThings(&form, this);
6316 	form.exec();
6317 }
6318 
6319 void FetMainForm::dataTimeConstraintsStudentsIntervalMaxDaysPerWeekAction_triggered()
6320 {
6321 	if(!gt.rules.initialized){
6322 		QMessageBox::information(this, tr("FET information"),
6323 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6324 		return;
6325 	}
6326 
6327 	if(simulation_running || simulation_running_multi){
6328 		QMessageBox::information(this, tr("FET information"),
6329 			tr("Allocation in course.\nPlease stop simulation before this."));
6330 		return;
6331 	}
6332 
6333 	ConstraintStudentsIntervalMaxDaysPerWeekForm form(this);
6334 	setParentAndOtherThings(&form, this);
6335 	form.exec();
6336 }
6337 
6338 void FetMainForm::dataTimeConstraintsTeachersMaxHoursDailyAction_triggered()
6339 {
6340 	if(!gt.rules.initialized){
6341 		QMessageBox::information(this, tr("FET information"),
6342 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6343 		return;
6344 	}
6345 
6346 	if(simulation_running || simulation_running_multi){
6347 		QMessageBox::information(this, tr("FET information"),
6348 			tr("Allocation in course.\nPlease stop simulation before this."));
6349 		return;
6350 	}
6351 
6352 	ConstraintTeachersMaxHoursDailyForm form(this);
6353 	setParentAndOtherThings(&form, this);
6354 	form.exec();
6355 }
6356 
6357 void FetMainForm::dataTimeConstraintsTeacherMaxHoursDailyAction_triggered()
6358 {
6359 	if(!gt.rules.initialized){
6360 		QMessageBox::information(this, tr("FET information"),
6361 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6362 		return;
6363 	}
6364 
6365 	if(simulation_running || simulation_running_multi){
6366 		QMessageBox::information(this, tr("FET information"),
6367 			tr("Allocation in course.\nPlease stop simulation before this."));
6368 		return;
6369 	}
6370 
6371 	ConstraintTeacherMaxHoursDailyForm form(this);
6372 	setParentAndOtherThings(&form, this);
6373 	form.exec();
6374 }
6375 
6376 void FetMainForm::dataTimeConstraintsTeachersMaxHoursContinuouslyAction_triggered()
6377 {
6378 	if(!gt.rules.initialized){
6379 		QMessageBox::information(this, tr("FET information"),
6380 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6381 		return;
6382 	}
6383 
6384 	if(simulation_running || simulation_running_multi){
6385 		QMessageBox::information(this, tr("FET information"),
6386 			tr("Allocation in course.\nPlease stop simulation before this."));
6387 		return;
6388 	}
6389 
6390 	ConstraintTeachersMaxHoursContinuouslyForm form(this);
6391 	setParentAndOtherThings(&form, this);
6392 	form.exec();
6393 }
6394 
6395 void FetMainForm::dataTimeConstraintsTeacherMaxHoursContinuouslyAction_triggered()
6396 {
6397 	if(!gt.rules.initialized){
6398 		QMessageBox::information(this, tr("FET information"),
6399 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6400 		return;
6401 	}
6402 
6403 	if(simulation_running || simulation_running_multi){
6404 		QMessageBox::information(this, tr("FET information"),
6405 			tr("Allocation in course.\nPlease stop simulation before this."));
6406 		return;
6407 	}
6408 
6409 	ConstraintTeacherMaxHoursContinuouslyForm form(this);
6410 	setParentAndOtherThings(&form, this);
6411 	form.exec();
6412 }
6413 
6414 void FetMainForm::dataTimeConstraintsTeachersActivityTagMaxHoursContinuouslyAction_triggered()
6415 {
6416 	if(!gt.rules.initialized){
6417 		QMessageBox::information(this, tr("FET information"),
6418 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6419 		return;
6420 	}
6421 
6422 	if(simulation_running || simulation_running_multi){
6423 		QMessageBox::information(this, tr("FET information"),
6424 			tr("Allocation in course.\nPlease stop simulation before this."));
6425 		return;
6426 	}
6427 
6428 	ConstraintTeachersActivityTagMaxHoursContinuouslyForm form(this);
6429 	setParentAndOtherThings(&form, this);
6430 	form.exec();
6431 }
6432 
6433 void FetMainForm::dataTimeConstraintsTeacherActivityTagMaxHoursContinuouslyAction_triggered()
6434 {
6435 	if(!gt.rules.initialized){
6436 		QMessageBox::information(this, tr("FET information"),
6437 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6438 		return;
6439 	}
6440 
6441 	if(simulation_running || simulation_running_multi){
6442 		QMessageBox::information(this, tr("FET information"),
6443 			tr("Allocation in course.\nPlease stop simulation before this."));
6444 		return;
6445 	}
6446 
6447 	ConstraintTeacherActivityTagMaxHoursContinuouslyForm form(this);
6448 	setParentAndOtherThings(&form, this);
6449 	form.exec();
6450 }
6451 
6452 void FetMainForm::dataTimeConstraintsTeachersActivityTagMaxHoursDailyAction_triggered()
6453 {
6454 	if(!gt.rules.initialized){
6455 		QMessageBox::information(this, tr("FET information"),
6456 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6457 		return;
6458 	}
6459 
6460 	if(simulation_running || simulation_running_multi){
6461 		QMessageBox::information(this, tr("FET information"),
6462 			tr("Allocation in course.\nPlease stop simulation before this."));
6463 		return;
6464 	}
6465 
6466 	if(!ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY){
6467 		enableNotPerfectMessage();
6468 		return;
6469 	}
6470 
6471 	ConstraintTeachersActivityTagMaxHoursDailyForm form(this);
6472 	setParentAndOtherThings(&form, this);
6473 	form.exec();
6474 }
6475 
6476 void FetMainForm::dataTimeConstraintsTeacherActivityTagMaxHoursDailyAction_triggered()
6477 {
6478 	if(!gt.rules.initialized){
6479 		QMessageBox::information(this, tr("FET information"),
6480 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6481 		return;
6482 	}
6483 
6484 	if(simulation_running || simulation_running_multi){
6485 		QMessageBox::information(this, tr("FET information"),
6486 			tr("Allocation in course.\nPlease stop simulation before this."));
6487 		return;
6488 	}
6489 
6490 	if(!ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY){
6491 		enableNotPerfectMessage();
6492 		return;
6493 	}
6494 
6495 	ConstraintTeacherActivityTagMaxHoursDailyForm form(this);
6496 	setParentAndOtherThings(&form, this);
6497 	form.exec();
6498 }
6499 
6500 void FetMainForm::dataTimeConstraintsTeachersActivityTagMinHoursDailyAction_triggered()
6501 {
6502 	if(!gt.rules.initialized){
6503 		QMessageBox::information(this, tr("FET information"),
6504 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6505 		return;
6506 	}
6507 
6508 	if(simulation_running || simulation_running_multi){
6509 		QMessageBox::information(this, tr("FET information"),
6510 			tr("Allocation in course.\nPlease stop simulation before this."));
6511 		return;
6512 	}
6513 
6514 	if(!ENABLE_ACTIVITY_TAG_MIN_HOURS_DAILY){
6515 		enableNotPerfectMessage();
6516 		return;
6517 	}
6518 
6519 	ConstraintTeachersActivityTagMinHoursDailyForm form(this);
6520 	setParentAndOtherThings(&form, this);
6521 	form.exec();
6522 }
6523 
6524 void FetMainForm::dataTimeConstraintsTeacherActivityTagMinHoursDailyAction_triggered()
6525 {
6526 	if(!gt.rules.initialized){
6527 		QMessageBox::information(this, tr("FET information"),
6528 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6529 		return;
6530 	}
6531 
6532 	if(simulation_running || simulation_running_multi){
6533 		QMessageBox::information(this, tr("FET information"),
6534 			tr("Allocation in course.\nPlease stop simulation before this."));
6535 		return;
6536 	}
6537 
6538 	if(!ENABLE_ACTIVITY_TAG_MIN_HOURS_DAILY){
6539 		enableNotPerfectMessage();
6540 		return;
6541 	}
6542 
6543 	ConstraintTeacherActivityTagMinHoursDailyForm form(this);
6544 	setParentAndOtherThings(&form, this);
6545 	form.exec();
6546 }
6547 
6548 void FetMainForm::dataTimeConstraintsTeachersMinHoursDailyAction_triggered()
6549 {
6550 	if(!gt.rules.initialized){
6551 		QMessageBox::information(this, tr("FET information"),
6552 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6553 		return;
6554 	}
6555 
6556 	if(simulation_running || simulation_running_multi){
6557 		QMessageBox::information(this, tr("FET information"),
6558 			tr("Allocation in course.\nPlease stop simulation before this."));
6559 		return;
6560 	}
6561 
6562 	ConstraintTeachersMinHoursDailyForm form(this);
6563 	setParentAndOtherThings(&form, this);
6564 	form.exec();
6565 }
6566 
6567 void FetMainForm::dataTimeConstraintsTeacherMinHoursDailyAction_triggered()
6568 {
6569 	if(!gt.rules.initialized){
6570 		QMessageBox::information(this, tr("FET information"),
6571 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6572 		return;
6573 	}
6574 
6575 	if(simulation_running || simulation_running_multi){
6576 		QMessageBox::information(this, tr("FET information"),
6577 			tr("Allocation in course.\nPlease stop simulation before this."));
6578 		return;
6579 	}
6580 
6581 	ConstraintTeacherMinHoursDailyForm form(this);
6582 	setParentAndOtherThings(&form, this);
6583 	form.exec();
6584 }
6585 
6586 void FetMainForm::dataTimeConstraintsActivityPreferredStartingTimeAction_triggered()
6587 {
6588 	if(!gt.rules.initialized){
6589 		QMessageBox::information(this, tr("FET information"),
6590 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6591 		return;
6592 	}
6593 
6594 	if(simulation_running || simulation_running_multi){
6595 		QMessageBox::information(this, tr("FET information"),
6596 			tr("Allocation in course.\nPlease stop simulation before this."));
6597 		return;
6598 	}
6599 
6600 	ConstraintActivityPreferredStartingTimeForm form(this);
6601 	setParentAndOtherThings(&form, this);
6602 	form.exec();
6603 }
6604 
6605 void FetMainForm::dataTimeConstraintsStudentsSetMaxGapsPerWeekAction_triggered()
6606 {
6607 	if(!gt.rules.initialized){
6608 		QMessageBox::information(this, tr("FET information"),
6609 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6610 		return;
6611 	}
6612 
6613 	if(simulation_running || simulation_running_multi){
6614 		QMessageBox::information(this, tr("FET information"),
6615 			tr("Allocation in course.\nPlease stop simulation before this."));
6616 		return;
6617 	}
6618 
6619 	ConstraintStudentsSetMaxGapsPerWeekForm form(this);
6620 	setParentAndOtherThings(&form, this);
6621 	form.exec();
6622 }
6623 
6624 void FetMainForm::dataTimeConstraintsStudentsMaxGapsPerWeekAction_triggered()
6625 {
6626 	if(!gt.rules.initialized){
6627 		QMessageBox::information(this, tr("FET information"),
6628 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6629 		return;
6630 	}
6631 
6632 	if(simulation_running || simulation_running_multi){
6633 		QMessageBox::information(this, tr("FET information"),
6634 			tr("Allocation in course.\nPlease stop simulation before this."));
6635 		return;
6636 	}
6637 
6638 	ConstraintStudentsMaxGapsPerWeekForm form(this);
6639 	setParentAndOtherThings(&form, this);
6640 	form.exec();
6641 }
6642 
6643 //terms
6644 void FetMainForm::dataTimeConstraintsActivitiesMaxInATermAction_triggered()
6645 {
6646 	if(!gt.rules.initialized){
6647 		QMessageBox::information(this, tr("FET information"),
6648 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6649 		return;
6650 	}
6651 
6652 	if(simulation_running || simulation_running_multi){
6653 		QMessageBox::information(this, tr("FET information"),
6654 			tr("Allocation in course.\nPlease stop simulation before this."));
6655 		return;
6656 	}
6657 
6658 	ConstraintActivitiesMaxInATermForm form(this);
6659 	setParentAndOtherThings(&form, this);
6660 	form.exec();
6661 }
6662 
6663 void FetMainForm::dataTimeConstraintsActivitiesOccupyMaxTermsAction_triggered()
6664 {
6665 	if(!gt.rules.initialized){
6666 		QMessageBox::information(this, tr("FET information"),
6667 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6668 		return;
6669 	}
6670 
6671 	if(simulation_running || simulation_running_multi){
6672 		QMessageBox::information(this, tr("FET information"),
6673 			tr("Allocation in course.\nPlease stop simulation before this."));
6674 		return;
6675 	}
6676 
6677 	ConstraintActivitiesOccupyMaxTermsForm form(this);
6678 	setParentAndOtherThings(&form, this);
6679 	form.exec();
6680 }
6681 
6682 void FetMainForm::on_groupActivitiesInInitialOrderAction_triggered()
6683 {
6684 	if(!gt.rules.initialized){
6685 		QMessageBox::information(this, tr("FET information"),
6686 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6687 		return;
6688 	}
6689 
6690 	if(simulation_running || simulation_running_multi){
6691 		QMessageBox::information(this, tr("FET information"),
6692 			tr("Allocation in course.\nPlease stop simulation before this."));
6693 		return;
6694 	}
6695 
6696 	if(!ENABLE_GROUP_ACTIVITIES_IN_INITIAL_ORDER){
6697 		QString s=tr("Feature is not enabled. To use this type of feature you must enable it from the Settings->Advanced menu.");
6698 		s+="\n\n";
6699 		s+=tr("Explanation:");
6700 		s+=" ";
6701 		s+=tr("The feature must be used with caution, by experienced users.");
6702 
6703 		QMessageBox::information(this, tr("FET information"), s);
6704 
6705 		return;
6706 	}
6707 
6708 	GroupActivitiesInInitialOrderItemsForm form(this);
6709 	setParentAndOtherThings(&form, this);
6710 	form.exec();
6711 }
6712 
6713 void FetMainForm::dataTimeConstraintsStudentsSetMaxGapsPerDayAction_triggered()
6714 {
6715 	if(!gt.rules.initialized){
6716 		QMessageBox::information(this, tr("FET information"),
6717 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6718 		return;
6719 	}
6720 
6721 	if(simulation_running || simulation_running_multi){
6722 		QMessageBox::information(this, tr("FET information"),
6723 			tr("Allocation in course.\nPlease stop simulation before this."));
6724 		return;
6725 	}
6726 
6727 	if(!ENABLE_STUDENTS_MAX_GAPS_PER_DAY){
6728 		enableNotPerfectMessage();
6729 		return;
6730 	}
6731 
6732 	ConstraintStudentsSetMaxGapsPerDayForm form(this);
6733 	setParentAndOtherThings(&form, this);
6734 	form.exec();
6735 }
6736 
6737 void FetMainForm::dataTimeConstraintsStudentsMaxGapsPerDayAction_triggered()
6738 {
6739 	if(!gt.rules.initialized){
6740 		QMessageBox::information(this, tr("FET information"),
6741 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6742 		return;
6743 	}
6744 
6745 	if(simulation_running || simulation_running_multi){
6746 		QMessageBox::information(this, tr("FET information"),
6747 			tr("Allocation in course.\nPlease stop simulation before this."));
6748 		return;
6749 	}
6750 
6751 	if(!ENABLE_STUDENTS_MAX_GAPS_PER_DAY){
6752 		enableNotPerfectMessage();
6753 		return;
6754 	}
6755 
6756 	ConstraintStudentsMaxGapsPerDayForm form(this);
6757 	setParentAndOtherThings(&form, this);
6758 	form.exec();
6759 }
6760 
6761 void FetMainForm::dataTimeConstraintsTeachersMaxGapsPerWeekAction_triggered()
6762 {
6763 	if(!gt.rules.initialized){
6764 		QMessageBox::information(this, tr("FET information"),
6765 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6766 		return;
6767 	}
6768 
6769 	if(simulation_running || simulation_running_multi){
6770 		QMessageBox::information(this, tr("FET information"),
6771 			tr("Allocation in course.\nPlease stop simulation before this."));
6772 		return;
6773 	}
6774 
6775 	ConstraintTeachersMaxGapsPerWeekForm form(this);
6776 	setParentAndOtherThings(&form, this);
6777 	form.exec();
6778 }
6779 
6780 void FetMainForm::dataTimeConstraintsTeacherMaxGapsPerWeekAction_triggered()
6781 {
6782 	if(!gt.rules.initialized){
6783 		QMessageBox::information(this, tr("FET information"),
6784 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6785 		return;
6786 	}
6787 
6788 	if(simulation_running || simulation_running_multi){
6789 		QMessageBox::information(this, tr("FET information"),
6790 			tr("Allocation in course.\nPlease stop simulation before this."));
6791 		return;
6792 	}
6793 
6794 	ConstraintTeacherMaxGapsPerWeekForm form(this);
6795 	setParentAndOtherThings(&form, this);
6796 	form.exec();
6797 }
6798 
6799 void FetMainForm::dataTimeConstraintsTeachersMaxGapsPerDayAction_triggered()
6800 {
6801 	if(!gt.rules.initialized){
6802 		QMessageBox::information(this, tr("FET information"),
6803 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6804 		return;
6805 	}
6806 
6807 	if(simulation_running || simulation_running_multi){
6808 		QMessageBox::information(this, tr("FET information"),
6809 			tr("Allocation in course.\nPlease stop simulation before this."));
6810 		return;
6811 	}
6812 
6813 	ConstraintTeachersMaxGapsPerDayForm form(this);
6814 	setParentAndOtherThings(&form, this);
6815 	form.exec();
6816 }
6817 
6818 void FetMainForm::dataTimeConstraintsTeacherMaxGapsPerDayAction_triggered()
6819 {
6820 	if(!gt.rules.initialized){
6821 		QMessageBox::information(this, tr("FET information"),
6822 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6823 		return;
6824 	}
6825 
6826 	if(simulation_running || simulation_running_multi){
6827 		QMessageBox::information(this, tr("FET information"),
6828 			tr("Allocation in course.\nPlease stop simulation before this."));
6829 		return;
6830 	}
6831 
6832 	ConstraintTeacherMaxGapsPerDayForm form(this);
6833 	setParentAndOtherThings(&form, this);
6834 	form.exec();
6835 }
6836 
6837 void FetMainForm::dataTimeConstraintsTeachersMaxGapsPerMorningAndAfternoonAction_triggered()
6838 {
6839 	if(!gt.rules.initialized){
6840 		QMessageBox::information(this, tr("FET information"),
6841 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6842 		return;
6843 	}
6844 
6845 	if(simulation_running || simulation_running_multi){
6846 		QMessageBox::information(this, tr("FET information"),
6847 			tr("Allocation in course.\nPlease stop simulation before this."));
6848 		return;
6849 	}
6850 
6851 	ConstraintTeachersMaxGapsPerMorningAndAfternoonForm form(this);
6852 	setParentAndOtherThings(&form, this);
6853 	form.exec();
6854 }
6855 
6856 void FetMainForm::dataTimeConstraintsTeacherMaxGapsPerMorningAndAfternoonAction_triggered()
6857 {
6858 	if(!gt.rules.initialized){
6859 		QMessageBox::information(this, tr("FET information"),
6860 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6861 		return;
6862 	}
6863 
6864 	if(simulation_running || simulation_running_multi){
6865 		QMessageBox::information(this, tr("FET information"),
6866 			tr("Allocation in course.\nPlease stop simulation before this."));
6867 		return;
6868 	}
6869 
6870 	ConstraintTeacherMaxGapsPerMorningAndAfternoonForm form(this);
6871 	setParentAndOtherThings(&form, this);
6872 	form.exec();
6873 }
6874 
6875 void FetMainForm::dataTimeConstraintsStudentsEarlyMaxBeginningsAtSecondHourAction_triggered()
6876 {
6877 	if(!gt.rules.initialized){
6878 		QMessageBox::information(this, tr("FET information"),
6879 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6880 		return;
6881 	}
6882 
6883 	if(simulation_running || simulation_running_multi){
6884 		QMessageBox::information(this, tr("FET information"),
6885 			tr("Allocation in course.\nPlease stop simulation before this."));
6886 		return;
6887 	}
6888 
6889 	ConstraintStudentsEarlyMaxBeginningsAtSecondHourForm form(this);
6890 	setParentAndOtherThings(&form, this);
6891 	form.exec();
6892 }
6893 
6894 void FetMainForm::dataTimeConstraintsStudentsSetEarlyMaxBeginningsAtSecondHourAction_triggered()
6895 {
6896 	if(!gt.rules.initialized){
6897 		QMessageBox::information(this, tr("FET information"),
6898 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6899 		return;
6900 	}
6901 
6902 	if(simulation_running || simulation_running_multi){
6903 		QMessageBox::information(this, tr("FET information"),
6904 			tr("Allocation in course.\nPlease stop simulation before this."));
6905 		return;
6906 	}
6907 
6908 	ConstraintStudentsSetEarlyMaxBeginningsAtSecondHourForm form(this);
6909 	setParentAndOtherThings(&form, this);
6910 	form.exec();
6911 }
6912 
6913 void FetMainForm::dataTimeConstraintsStudentsSetMaxHoursDailyAction_triggered()
6914 {
6915 	if(!gt.rules.initialized){
6916 		QMessageBox::information(this, tr("FET information"),
6917 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6918 		return;
6919 	}
6920 
6921 	if(simulation_running || simulation_running_multi){
6922 		QMessageBox::information(this, tr("FET information"),
6923 			tr("Allocation in course.\nPlease stop simulation before this."));
6924 		return;
6925 	}
6926 
6927 	ConstraintStudentsSetMaxHoursDailyForm form(this);
6928 	setParentAndOtherThings(&form, this);
6929 	form.exec();
6930 }
6931 
6932 void FetMainForm::dataTimeConstraintsStudentsMaxHoursDailyAction_triggered()
6933 {
6934 	if(!gt.rules.initialized){
6935 		QMessageBox::information(this, tr("FET information"),
6936 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6937 		return;
6938 	}
6939 
6940 	if(simulation_running || simulation_running_multi){
6941 		QMessageBox::information(this, tr("FET information"),
6942 			tr("Allocation in course.\nPlease stop simulation before this."));
6943 		return;
6944 	}
6945 
6946 	ConstraintStudentsMaxHoursDailyForm form(this);
6947 	setParentAndOtherThings(&form, this);
6948 	form.exec();
6949 }
6950 
6951 void FetMainForm::dataTimeConstraintsStudentsSetMaxHoursContinuouslyAction_triggered()
6952 {
6953 	if(!gt.rules.initialized){
6954 		QMessageBox::information(this, tr("FET information"),
6955 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6956 		return;
6957 	}
6958 
6959 	if(simulation_running || simulation_running_multi){
6960 		QMessageBox::information(this, tr("FET information"),
6961 			tr("Allocation in course.\nPlease stop simulation before this."));
6962 		return;
6963 	}
6964 
6965 	ConstraintStudentsSetMaxHoursContinuouslyForm form(this);
6966 	setParentAndOtherThings(&form, this);
6967 	form.exec();
6968 }
6969 
6970 void FetMainForm::dataTimeConstraintsStudentsMaxHoursContinuouslyAction_triggered()
6971 {
6972 	if(!gt.rules.initialized){
6973 		QMessageBox::information(this, tr("FET information"),
6974 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6975 		return;
6976 	}
6977 
6978 	if(simulation_running || simulation_running_multi){
6979 		QMessageBox::information(this, tr("FET information"),
6980 			tr("Allocation in course.\nPlease stop simulation before this."));
6981 		return;
6982 	}
6983 
6984 	ConstraintStudentsMaxHoursContinuouslyForm form(this);
6985 	setParentAndOtherThings(&form, this);
6986 	form.exec();
6987 }
6988 
6989 void FetMainForm::dataTimeConstraintsStudentsSetActivityTagMaxHoursContinuouslyAction_triggered()
6990 {
6991 	if(!gt.rules.initialized){
6992 		QMessageBox::information(this, tr("FET information"),
6993 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
6994 		return;
6995 	}
6996 
6997 	if(simulation_running || simulation_running_multi){
6998 		QMessageBox::information(this, tr("FET information"),
6999 			tr("Allocation in course.\nPlease stop simulation before this."));
7000 		return;
7001 	}
7002 
7003 	ConstraintStudentsSetActivityTagMaxHoursContinuouslyForm form(this);
7004 	setParentAndOtherThings(&form, this);
7005 	form.exec();
7006 }
7007 
7008 void FetMainForm::dataTimeConstraintsStudentsActivityTagMaxHoursContinuouslyAction_triggered()
7009 {
7010 	if(!gt.rules.initialized){
7011 		QMessageBox::information(this, tr("FET information"),
7012 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7013 		return;
7014 	}
7015 
7016 	if(simulation_running || simulation_running_multi){
7017 		QMessageBox::information(this, tr("FET information"),
7018 			tr("Allocation in course.\nPlease stop simulation before this."));
7019 		return;
7020 	}
7021 
7022 	ConstraintStudentsActivityTagMaxHoursContinuouslyForm form(this);
7023 	setParentAndOtherThings(&form, this);
7024 	form.exec();
7025 }
7026 
7027 void FetMainForm::dataTimeConstraintsStudentsSetActivityTagMaxHoursDailyAction_triggered()
7028 {
7029 	if(!gt.rules.initialized){
7030 		QMessageBox::information(this, tr("FET information"),
7031 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7032 		return;
7033 	}
7034 
7035 	if(simulation_running || simulation_running_multi){
7036 		QMessageBox::information(this, tr("FET information"),
7037 			tr("Allocation in course.\nPlease stop simulation before this."));
7038 		return;
7039 	}
7040 
7041 	if(!ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY){
7042 		enableNotPerfectMessage();
7043 		return;
7044 	}
7045 
7046 	ConstraintStudentsSetActivityTagMaxHoursDailyForm form(this);
7047 	setParentAndOtherThings(&form, this);
7048 	form.exec();
7049 }
7050 
7051 void FetMainForm::dataTimeConstraintsStudentsActivityTagMaxHoursDailyAction_triggered()
7052 {
7053 	if(!gt.rules.initialized){
7054 		QMessageBox::information(this, tr("FET information"),
7055 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7056 		return;
7057 	}
7058 
7059 	if(simulation_running || simulation_running_multi){
7060 		QMessageBox::information(this, tr("FET information"),
7061 			tr("Allocation in course.\nPlease stop simulation before this."));
7062 		return;
7063 	}
7064 
7065 	if(!ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY){
7066 		enableNotPerfectMessage();
7067 		return;
7068 	}
7069 
7070 	ConstraintStudentsActivityTagMaxHoursDailyForm form(this);
7071 	setParentAndOtherThings(&form, this);
7072 	form.exec();
7073 }
7074 
7075 void FetMainForm::dataTimeConstraintsStudentsSetActivityTagMinHoursDailyAction_triggered()
7076 {
7077 	if(!gt.rules.initialized){
7078 		QMessageBox::information(this, tr("FET information"),
7079 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7080 		return;
7081 	}
7082 
7083 	if(simulation_running || simulation_running_multi){
7084 		QMessageBox::information(this, tr("FET information"),
7085 			tr("Allocation in course.\nPlease stop simulation before this."));
7086 		return;
7087 	}
7088 
7089 	if(!ENABLE_ACTIVITY_TAG_MIN_HOURS_DAILY){
7090 		enableNotPerfectMessage();
7091 		return;
7092 	}
7093 
7094 	ConstraintStudentsSetActivityTagMinHoursDailyForm form(this);
7095 	setParentAndOtherThings(&form, this);
7096 	form.exec();
7097 }
7098 
7099 void FetMainForm::dataTimeConstraintsStudentsActivityTagMinHoursDailyAction_triggered()
7100 {
7101 	if(!gt.rules.initialized){
7102 		QMessageBox::information(this, tr("FET information"),
7103 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7104 		return;
7105 	}
7106 
7107 	if(simulation_running || simulation_running_multi){
7108 		QMessageBox::information(this, tr("FET information"),
7109 			tr("Allocation in course.\nPlease stop simulation before this."));
7110 		return;
7111 	}
7112 
7113 	if(!ENABLE_ACTIVITY_TAG_MIN_HOURS_DAILY){
7114 		enableNotPerfectMessage();
7115 		return;
7116 	}
7117 
7118 	ConstraintStudentsActivityTagMinHoursDailyForm form(this);
7119 	setParentAndOtherThings(&form, this);
7120 	form.exec();
7121 }
7122 
7123 void FetMainForm::dataTimeConstraintsStudentsSetMinHoursDailyAction_triggered()
7124 {
7125 	if(!gt.rules.initialized){
7126 		QMessageBox::information(this, tr("FET information"),
7127 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7128 		return;
7129 	}
7130 
7131 	if(simulation_running || simulation_running_multi){
7132 		QMessageBox::information(this, tr("FET information"),
7133 			tr("Allocation in course.\nPlease stop simulation before this."));
7134 		return;
7135 	}
7136 
7137 	ConstraintStudentsSetMinHoursDailyForm form(this);
7138 	setParentAndOtherThings(&form, this);
7139 	form.exec();
7140 }
7141 
7142 void FetMainForm::dataTimeConstraintsStudentsMinHoursDailyAction_triggered()
7143 {
7144 	if(!gt.rules.initialized){
7145 		QMessageBox::information(this, tr("FET information"),
7146 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7147 		return;
7148 	}
7149 
7150 	if(simulation_running || simulation_running_multi){
7151 		QMessageBox::information(this, tr("FET information"),
7152 			tr("Allocation in course.\nPlease stop simulation before this."));
7153 		return;
7154 	}
7155 
7156 	ConstraintStudentsMinHoursDailyForm form(this);
7157 	setParentAndOtherThings(&form, this);
7158 	form.exec();
7159 }
7160 
7161 void FetMainForm::dataTimeConstraintsStudentsSetMinGapsBetweenOrderedPairOfActivityTagsAction_triggered()
7162 {
7163 	if(!gt.rules.initialized){
7164 		QMessageBox::information(this, tr("FET information"),
7165 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7166 		return;
7167 	}
7168 
7169 	if(simulation_running || simulation_running_multi){
7170 		QMessageBox::information(this, tr("FET information"),
7171 			tr("Allocation in course.\nPlease stop simulation before this."));
7172 		return;
7173 	}
7174 
7175 	ConstraintStudentsSetMinGapsBetweenOrderedPairOfActivityTagsForm form(this);
7176 	setParentAndOtherThings(&form, this);
7177 	form.exec();
7178 }
7179 
7180 void FetMainForm::dataTimeConstraintsStudentsMinGapsBetweenOrderedPairOfActivityTagsAction_triggered()
7181 {
7182 	if(!gt.rules.initialized){
7183 		QMessageBox::information(this, tr("FET information"),
7184 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7185 		return;
7186 	}
7187 
7188 	if(simulation_running || simulation_running_multi){
7189 		QMessageBox::information(this, tr("FET information"),
7190 			tr("Allocation in course.\nPlease stop simulation before this."));
7191 		return;
7192 	}
7193 
7194 	ConstraintStudentsMinGapsBetweenOrderedPairOfActivityTagsForm form(this);
7195 	setParentAndOtherThings(&form, this);
7196 	form.exec();
7197 }
7198 
7199 void FetMainForm::dataTimeConstraintsTeacherMinGapsBetweenOrderedPairOfActivityTagsAction_triggered()
7200 {
7201 	if(!gt.rules.initialized){
7202 		QMessageBox::information(this, tr("FET information"),
7203 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7204 		return;
7205 	}
7206 
7207 	if(simulation_running || simulation_running_multi){
7208 		QMessageBox::information(this, tr("FET information"),
7209 			tr("Allocation in course.\nPlease stop simulation before this."));
7210 		return;
7211 	}
7212 
7213 	ConstraintTeacherMinGapsBetweenOrderedPairOfActivityTagsForm form(this);
7214 	setParentAndOtherThings(&form, this);
7215 	form.exec();
7216 }
7217 
7218 void FetMainForm::dataTimeConstraintsTeachersMinGapsBetweenOrderedPairOfActivityTagsAction_triggered()
7219 {
7220 	if(!gt.rules.initialized){
7221 		QMessageBox::information(this, tr("FET information"),
7222 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7223 		return;
7224 	}
7225 
7226 	if(simulation_running || simulation_running_multi){
7227 		QMessageBox::information(this, tr("FET information"),
7228 			tr("Allocation in course.\nPlease stop simulation before this."));
7229 		return;
7230 	}
7231 
7232 	ConstraintTeachersMinGapsBetweenOrderedPairOfActivityTagsForm form(this);
7233 	setParentAndOtherThings(&form, this);
7234 	form.exec();
7235 }
7236 
7237 void FetMainForm::dataTimeConstraintsActivitiesNotOverlappingAction_triggered()
7238 {
7239 	if(!gt.rules.initialized){
7240 		QMessageBox::information(this, tr("FET information"),
7241 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7242 		return;
7243 	}
7244 
7245 	if(simulation_running || simulation_running_multi){
7246 		QMessageBox::information(this, tr("FET information"),
7247 			tr("Allocation in course.\nPlease stop simulation before this."));
7248 		return;
7249 	}
7250 
7251 	ConstraintActivitiesNotOverlappingForm form(this);
7252 	setParentAndOtherThings(&form, this);
7253 	form.exec();
7254 }
7255 
7256 void FetMainForm::dataTimeConstraintsActivityTagsNotOverlappingAction_triggered()
7257 {
7258 	if(!gt.rules.initialized){
7259 		QMessageBox::information(this, tr("FET information"),
7260 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7261 		return;
7262 	}
7263 
7264 	if(simulation_running || simulation_running_multi){
7265 		QMessageBox::information(this, tr("FET information"),
7266 			tr("Allocation in course.\nPlease stop simulation before this."));
7267 		return;
7268 	}
7269 
7270 	ConstraintActivityTagsNotOverlappingForm form(this);
7271 	setParentAndOtherThings(&form, this);
7272 	form.exec();
7273 }
7274 
7275 void FetMainForm::dataTimeConstraintsMinDaysBetweenActivitiesAction_triggered()
7276 {
7277 	if(!gt.rules.initialized){
7278 		QMessageBox::information(this, tr("FET information"),
7279 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7280 		return;
7281 	}
7282 
7283 	if(simulation_running || simulation_running_multi){
7284 		QMessageBox::information(this, tr("FET information"),
7285 			tr("Allocation in course.\nPlease stop simulation before this."));
7286 		return;
7287 	}
7288 
7289 	ConstraintMinDaysBetweenActivitiesForm form(this);
7290 	setParentAndOtherThings(&form, this);
7291 	form.exec();
7292 }
7293 
7294 void FetMainForm::dataTimeConstraintsMaxDaysBetweenActivitiesAction_triggered()
7295 {
7296 	if(!gt.rules.initialized){
7297 		QMessageBox::information(this, tr("FET information"),
7298 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7299 		return;
7300 	}
7301 
7302 	if(simulation_running || simulation_running_multi){
7303 		QMessageBox::information(this, tr("FET information"),
7304 			tr("Allocation in course.\nPlease stop simulation before this."));
7305 		return;
7306 	}
7307 
7308 	ConstraintMaxDaysBetweenActivitiesForm form(this);
7309 	setParentAndOtherThings(&form, this);
7310 	form.exec();
7311 }
7312 
7313 void FetMainForm::dataTimeConstraintsMinGapsBetweenActivitiesAction_triggered()
7314 {
7315 	if(!gt.rules.initialized){
7316 		QMessageBox::information(this, tr("FET information"),
7317 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7318 		return;
7319 	}
7320 
7321 	if(simulation_running || simulation_running_multi){
7322 		QMessageBox::information(this, tr("FET information"),
7323 			tr("Allocation in course.\nPlease stop simulation before this."));
7324 		return;
7325 	}
7326 
7327 	ConstraintMinGapsBetweenActivitiesForm form(this);
7328 	setParentAndOtherThings(&form, this);
7329 	form.exec();
7330 }
7331 
7332 void FetMainForm::dataTimeConstraintsMaxGapsBetweenActivitiesAction_triggered()
7333 {
7334 	if(!gt.rules.initialized){
7335 		QMessageBox::information(this, tr("FET information"),
7336 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7337 		return;
7338 	}
7339 
7340 	if(simulation_running || simulation_running_multi){
7341 		QMessageBox::information(this, tr("FET information"),
7342 			tr("Allocation in course.\nPlease stop simulation before this."));
7343 		return;
7344 	}
7345 
7346 	ConstraintMaxGapsBetweenActivitiesForm form(this);
7347 	setParentAndOtherThings(&form, this);
7348 	form.exec();
7349 }
7350 
7351 void FetMainForm::dataTimeConstraintsActivityPreferredTimeSlotsAction_triggered()
7352 {
7353 	if(!gt.rules.initialized){
7354 		QMessageBox::information(this, tr("FET information"),
7355 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7356 		return;
7357 	}
7358 
7359 	if(simulation_running || simulation_running_multi){
7360 		QMessageBox::information(this, tr("FET information"),
7361 			tr("Allocation in course.\nPlease stop simulation before this."));
7362 		return;
7363 	}
7364 
7365 	ConstraintActivityPreferredTimeSlotsForm form(this);
7366 	setParentAndOtherThings(&form, this);
7367 	form.exec();
7368 }
7369 
7370 void FetMainForm::dataTimeConstraintsActivityPreferredStartingTimesAction_triggered()
7371 {
7372 	if(!gt.rules.initialized){
7373 		QMessageBox::information(this, tr("FET information"),
7374 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7375 		return;
7376 	}
7377 
7378 	if(simulation_running || simulation_running_multi){
7379 		QMessageBox::information(this, tr("FET information"),
7380 			tr("Allocation in course.\nPlease stop simulation before this."));
7381 		return;
7382 	}
7383 
7384 	ConstraintActivityPreferredStartingTimesForm form(this);
7385 	setParentAndOtherThings(&form, this);
7386 	form.exec();
7387 }
7388 
7389 void FetMainForm::dataTimeConstraintsTeacherMaxSpanPerDayAction_triggered()
7390 {
7391 	if(!gt.rules.initialized){
7392 		QMessageBox::information(this, tr("FET information"),
7393 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7394 		return;
7395 	}
7396 
7397 	if(simulation_running || simulation_running_multi){
7398 		QMessageBox::information(this, tr("FET information"),
7399 			tr("Allocation in course.\nPlease stop simulation before this."));
7400 		return;
7401 	}
7402 
7403 	ConstraintTeacherMaxSpanPerDayForm form(this);
7404 	setParentAndOtherThings(&form, this);
7405 	form.exec();
7406 }
7407 
7408 void FetMainForm::dataTimeConstraintsTeachersMaxSpanPerDayAction_triggered()
7409 {
7410 	if(!gt.rules.initialized){
7411 		QMessageBox::information(this, tr("FET information"),
7412 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7413 		return;
7414 	}
7415 
7416 	if(simulation_running || simulation_running_multi){
7417 		QMessageBox::information(this, tr("FET information"),
7418 			tr("Allocation in course.\nPlease stop simulation before this."));
7419 		return;
7420 	}
7421 
7422 	ConstraintTeachersMaxSpanPerDayForm form(this);
7423 	setParentAndOtherThings(&form, this);
7424 	form.exec();
7425 }
7426 
7427 void FetMainForm::dataTimeConstraintsStudentsSetMaxSpanPerDayAction_triggered()
7428 {
7429 	if(!gt.rules.initialized){
7430 		QMessageBox::information(this, tr("FET information"),
7431 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7432 		return;
7433 	}
7434 
7435 	if(simulation_running || simulation_running_multi){
7436 		QMessageBox::information(this, tr("FET information"),
7437 			tr("Allocation in course.\nPlease stop simulation before this."));
7438 		return;
7439 	}
7440 
7441 	ConstraintStudentsSetMaxSpanPerDayForm form(this);
7442 	setParentAndOtherThings(&form, this);
7443 	form.exec();
7444 }
7445 
7446 void FetMainForm::dataTimeConstraintsStudentsMaxSpanPerDayAction_triggered()
7447 {
7448 	if(!gt.rules.initialized){
7449 		QMessageBox::information(this, tr("FET information"),
7450 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7451 		return;
7452 	}
7453 
7454 	if(simulation_running || simulation_running_multi){
7455 		QMessageBox::information(this, tr("FET information"),
7456 			tr("Allocation in course.\nPlease stop simulation before this."));
7457 		return;
7458 	}
7459 
7460 	ConstraintStudentsMaxSpanPerDayForm form(this);
7461 	setParentAndOtherThings(&form, this);
7462 	form.exec();
7463 }
7464 
7465 void FetMainForm::dataTimeConstraintsTeacherMinRestingHoursAction_triggered()
7466 {
7467 	if(!gt.rules.initialized){
7468 		QMessageBox::information(this, tr("FET information"),
7469 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7470 		return;
7471 	}
7472 
7473 	if(simulation_running || simulation_running_multi){
7474 		QMessageBox::information(this, tr("FET information"),
7475 			tr("Allocation in course.\nPlease stop simulation before this."));
7476 		return;
7477 	}
7478 
7479 	ConstraintTeacherMinRestingHoursForm form(this);
7480 	setParentAndOtherThings(&form, this);
7481 	form.exec();
7482 }
7483 
7484 void FetMainForm::dataTimeConstraintsTeachersMinRestingHoursAction_triggered()
7485 {
7486 	if(!gt.rules.initialized){
7487 		QMessageBox::information(this, tr("FET information"),
7488 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7489 		return;
7490 	}
7491 
7492 	if(simulation_running || simulation_running_multi){
7493 		QMessageBox::information(this, tr("FET information"),
7494 			tr("Allocation in course.\nPlease stop simulation before this."));
7495 		return;
7496 	}
7497 
7498 	ConstraintTeachersMinRestingHoursForm form(this);
7499 	setParentAndOtherThings(&form, this);
7500 	form.exec();
7501 }
7502 
7503 void FetMainForm::dataTimeConstraintsStudentsSetMinRestingHoursAction_triggered()
7504 {
7505 	if(!gt.rules.initialized){
7506 		QMessageBox::information(this, tr("FET information"),
7507 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7508 		return;
7509 	}
7510 
7511 	if(simulation_running || simulation_running_multi){
7512 		QMessageBox::information(this, tr("FET information"),
7513 			tr("Allocation in course.\nPlease stop simulation before this."));
7514 		return;
7515 	}
7516 
7517 	ConstraintStudentsSetMinRestingHoursForm form(this);
7518 	setParentAndOtherThings(&form, this);
7519 	form.exec();
7520 }
7521 
7522 void FetMainForm::dataTimeConstraintsStudentsMinRestingHoursAction_triggered()
7523 {
7524 	if(!gt.rules.initialized){
7525 		QMessageBox::information(this, tr("FET information"),
7526 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7527 		return;
7528 	}
7529 
7530 	if(simulation_running || simulation_running_multi){
7531 		QMessageBox::information(this, tr("FET information"),
7532 			tr("Allocation in course.\nPlease stop simulation before this."));
7533 		return;
7534 	}
7535 
7536 	ConstraintStudentsMinRestingHoursForm form(this);
7537 	setParentAndOtherThings(&form, this);
7538 	form.exec();
7539 }
7540 
7541 //2012-04-29
7542 void FetMainForm::dataSpaceConstraintsActivitiesOccupyMaxDifferentRoomsAction_triggered()
7543 {
7544 	if(!gt.rules.initialized){
7545 		QMessageBox::information(this, tr("FET information"),
7546 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7547 		return;
7548 	}
7549 
7550 	if(simulation_running || simulation_running_multi){
7551 		QMessageBox::information(this, tr("FET information"),
7552 			tr("Allocation in course.\nPlease stop simulation before this."));
7553 		return;
7554 	}
7555 
7556 	ConstraintActivitiesOccupyMaxDifferentRoomsForm form(this);
7557 	setParentAndOtherThings(&form, this);
7558 	form.exec();
7559 }
7560 
7561 //2013-09-14
7562 void FetMainForm::dataSpaceConstraintsActivitiesSameRoomIfConsecutiveAction_triggered()
7563 {
7564 	if(!gt.rules.initialized){
7565 		QMessageBox::information(this, tr("FET information"),
7566 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7567 		return;
7568 	}
7569 
7570 	if(simulation_running || simulation_running_multi){
7571 		QMessageBox::information(this, tr("FET information"),
7572 			tr("Allocation in course.\nPlease stop simulation before this."));
7573 		return;
7574 	}
7575 
7576 	ConstraintActivitiesSameRoomIfConsecutiveForm form(this);
7577 	setParentAndOtherThings(&form, this);
7578 	form.exec();
7579 }
7580 
7581 //mornings-afternoons space
7582 void FetMainForm::dataSpaceConstraintsStudentsSetMaxRoomChangesPerRealDayAction_triggered()
7583 {
7584 	if(!gt.rules.initialized){
7585 		QMessageBox::information(this, tr("FET information"),
7586 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7587 		return;
7588 	}
7589 
7590 	if(simulation_running || simulation_running_multi){
7591 		QMessageBox::information(this, tr("FET information"),
7592 			tr("Allocation in course.\nPlease stop simulation before this."));
7593 		return;
7594 	}
7595 
7596 	ConstraintStudentsSetMaxRoomChangesPerRealDayForm form(this);
7597 	setParentAndOtherThings(&form, this);
7598 	form.exec();
7599 }
7600 
7601 void FetMainForm::dataSpaceConstraintsStudentsMaxRoomChangesPerRealDayAction_triggered()
7602 {
7603 	if(!gt.rules.initialized){
7604 		QMessageBox::information(this, tr("FET information"),
7605 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7606 		return;
7607 	}
7608 
7609 	if(simulation_running || simulation_running_multi){
7610 		QMessageBox::information(this, tr("FET information"),
7611 			tr("Allocation in course.\nPlease stop simulation before this."));
7612 		return;
7613 	}
7614 
7615 	ConstraintStudentsMaxRoomChangesPerRealDayForm form(this);
7616 	setParentAndOtherThings(&form, this);
7617 	form.exec();
7618 }
7619 
7620 void FetMainForm::dataSpaceConstraintsTeacherMaxRoomChangesPerRealDayAction_triggered()
7621 {
7622 	if(!gt.rules.initialized){
7623 		QMessageBox::information(this, tr("FET information"),
7624 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7625 		return;
7626 	}
7627 
7628 	if(simulation_running || simulation_running_multi){
7629 		QMessageBox::information(this, tr("FET information"),
7630 			tr("Allocation in course.\nPlease stop simulation before this."));
7631 		return;
7632 	}
7633 
7634 	ConstraintTeacherMaxRoomChangesPerRealDayForm form(this);
7635 	setParentAndOtherThings(&form, this);
7636 	form.exec();
7637 }
7638 
7639 void FetMainForm::dataSpaceConstraintsTeachersMaxRoomChangesPerRealDayAction_triggered()
7640 {
7641 	if(!gt.rules.initialized){
7642 		QMessageBox::information(this, tr("FET information"),
7643 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7644 		return;
7645 	}
7646 
7647 	if(simulation_running || simulation_running_multi){
7648 		QMessageBox::information(this, tr("FET information"),
7649 			tr("Allocation in course.\nPlease stop simulation before this."));
7650 		return;
7651 	}
7652 
7653 	ConstraintTeachersMaxRoomChangesPerRealDayForm form(this);
7654 	setParentAndOtherThings(&form, this);
7655 	form.exec();
7656 }
7657 
7658 //mornings-afternoons time
7659 void FetMainForm::dataTimeConstraintsTeacherMaxRealDaysPerWeekAction_triggered()
7660 {
7661 	if(!gt.rules.initialized){
7662 		QMessageBox::information(this, tr("FET information"),
7663 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7664 		return;
7665 	}
7666 
7667 	if(simulation_running || simulation_running_multi){
7668 		QMessageBox::information(this, tr("FET information"),
7669 			tr("Allocation in course.\nPlease stop simulation before this."));
7670 		return;
7671 	}
7672 
7673 	ConstraintTeacherMaxRealDaysPerWeekForm form(this);
7674 	setParentAndOtherThings(&form, this);
7675 	form.exec();
7676 }
7677 
7678 void FetMainForm::dataTimeConstraintsTeachersMaxRealDaysPerWeekAction_triggered()
7679 {
7680 	if(!gt.rules.initialized){
7681 		QMessageBox::information(this, tr("FET information"),
7682 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7683 		return;
7684 	}
7685 
7686 	if(simulation_running || simulation_running_multi){
7687 		QMessageBox::information(this, tr("FET information"),
7688 			tr("Allocation in course.\nPlease stop simulation before this."));
7689 		return;
7690 	}
7691 
7692 	ConstraintTeachersMaxRealDaysPerWeekForm form(this);
7693 	setParentAndOtherThings(&form, this);
7694 	form.exec();
7695 }
7696 
7697 void FetMainForm::dataTimeConstraintsTeacherMaxAfternoonsPerWeekAction_triggered()
7698 {
7699 	if(!gt.rules.initialized){
7700 		QMessageBox::information(this, tr("FET information"),
7701 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7702 		return;
7703 	}
7704 
7705 	if(simulation_running || simulation_running_multi){
7706 		QMessageBox::information(this, tr("FET information"),
7707 			tr("Allocation in course.\nPlease stop simulation before this."));
7708 		return;
7709 	}
7710 
7711 	ConstraintTeacherMaxAfternoonsPerWeekForm form(this);
7712 	setParentAndOtherThings(&form, this);
7713 	form.exec();
7714 }
7715 
7716 void FetMainForm::dataTimeConstraintsTeachersMaxAfternoonsPerWeekAction_triggered()
7717 {
7718 	if(!gt.rules.initialized){
7719 		QMessageBox::information(this, tr("FET information"),
7720 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7721 		return;
7722 	}
7723 
7724 	if(simulation_running || simulation_running_multi){
7725 		QMessageBox::information(this, tr("FET information"),
7726 			tr("Allocation in course.\nPlease stop simulation before this."));
7727 		return;
7728 	}
7729 
7730 	ConstraintTeachersMaxAfternoonsPerWeekForm form(this);
7731 	setParentAndOtherThings(&form, this);
7732 	form.exec();
7733 }
7734 
7735 void FetMainForm::dataTimeConstraintsTeacherMaxMorningsPerWeekAction_triggered()
7736 {
7737 	if(!gt.rules.initialized){
7738 		QMessageBox::information(this, tr("FET information"),
7739 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7740 		return;
7741 	}
7742 
7743 	if(simulation_running || simulation_running_multi){
7744 		QMessageBox::information(this, tr("FET information"),
7745 			tr("Allocation in course.\nPlease stop simulation before this."));
7746 		return;
7747 	}
7748 
7749 	ConstraintTeacherMaxMorningsPerWeekForm form(this);
7750 	setParentAndOtherThings(&form, this);
7751 	form.exec();
7752 }
7753 
7754 void FetMainForm::dataTimeConstraintsTeachersMaxMorningsPerWeekAction_triggered()
7755 {
7756 	if(!gt.rules.initialized){
7757 		QMessageBox::information(this, tr("FET information"),
7758 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7759 		return;
7760 	}
7761 
7762 	if(simulation_running || simulation_running_multi){
7763 		QMessageBox::information(this, tr("FET information"),
7764 			tr("Allocation in course.\nPlease stop simulation before this."));
7765 		return;
7766 	}
7767 
7768 	ConstraintTeachersMaxMorningsPerWeekForm form(this);
7769 	setParentAndOtherThings(&form, this);
7770 	form.exec();
7771 }
7772 
7773 ////////2021-09-26
7774 void FetMainForm::dataTimeConstraintsTeacherMaxThreeConsecutiveDaysAction_triggered()
7775 {
7776 	if(!gt.rules.initialized){
7777 		QMessageBox::information(this, tr("FET information"),
7778 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7779 		return;
7780 	}
7781 
7782 	if(simulation_running || simulation_running_multi){
7783 		QMessageBox::information(this, tr("FET information"),
7784 			tr("Allocation in course.\nPlease stop simulation before this."));
7785 		return;
7786 	}
7787 
7788 	ConstraintTeacherMaxThreeConsecutiveDaysForm form(this);
7789 	setParentAndOtherThings(&form, this);
7790 	form.exec();
7791 }
7792 
7793 void FetMainForm::dataTimeConstraintsTeachersMaxThreeConsecutiveDaysAction_triggered()
7794 {
7795 	if(!gt.rules.initialized){
7796 		QMessageBox::information(this, tr("FET information"),
7797 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7798 		return;
7799 	}
7800 
7801 	if(simulation_running || simulation_running_multi){
7802 		QMessageBox::information(this, tr("FET information"),
7803 			tr("Allocation in course.\nPlease stop simulation before this."));
7804 		return;
7805 	}
7806 
7807 	ConstraintTeachersMaxThreeConsecutiveDaysForm form(this);
7808 	setParentAndOtherThings(&form, this);
7809 	form.exec();
7810 }
7811 //////////
7812 
7813 void FetMainForm::dataTimeConstraintsTeacherMaxTwoConsecutiveMorningsAction_triggered()
7814 {
7815 	if(!gt.rules.initialized){
7816 		QMessageBox::information(this, tr("FET information"),
7817 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7818 		return;
7819 	}
7820 
7821 	if(simulation_running || simulation_running_multi){
7822 		QMessageBox::information(this, tr("FET information"),
7823 			tr("Allocation in course.\nPlease stop simulation before this."));
7824 		return;
7825 	}
7826 
7827 	ConstraintTeacherMaxTwoConsecutiveMorningsForm form(this);
7828 	setParentAndOtherThings(&form, this);
7829 	form.exec();
7830 }
7831 
7832 void FetMainForm::dataTimeConstraintsTeachersMaxTwoConsecutiveMorningsAction_triggered()
7833 {
7834 	if(!gt.rules.initialized){
7835 		QMessageBox::information(this, tr("FET information"),
7836 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7837 		return;
7838 	}
7839 
7840 	if(simulation_running || simulation_running_multi){
7841 		QMessageBox::information(this, tr("FET information"),
7842 			tr("Allocation in course.\nPlease stop simulation before this."));
7843 		return;
7844 	}
7845 
7846 	ConstraintTeachersMaxTwoConsecutiveMorningsForm form(this);
7847 	setParentAndOtherThings(&form, this);
7848 	form.exec();
7849 }
7850 
7851 void FetMainForm::dataTimeConstraintsTeacherMaxTwoConsecutiveAfternoonsAction_triggered()
7852 {
7853 	if(!gt.rules.initialized){
7854 		QMessageBox::information(this, tr("FET information"),
7855 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7856 		return;
7857 	}
7858 
7859 	if(simulation_running || simulation_running_multi){
7860 		QMessageBox::information(this, tr("FET information"),
7861 			tr("Allocation in course.\nPlease stop simulation before this."));
7862 		return;
7863 	}
7864 
7865 	ConstraintTeacherMaxTwoConsecutiveAfternoonsForm form(this);
7866 	setParentAndOtherThings(&form, this);
7867 	form.exec();
7868 }
7869 
7870 void FetMainForm::dataTimeConstraintsTeachersMaxTwoConsecutiveAfternoonsAction_triggered()
7871 {
7872 	if(!gt.rules.initialized){
7873 		QMessageBox::information(this, tr("FET information"),
7874 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7875 		return;
7876 	}
7877 
7878 	if(simulation_running || simulation_running_multi){
7879 		QMessageBox::information(this, tr("FET information"),
7880 			tr("Allocation in course.\nPlease stop simulation before this."));
7881 		return;
7882 	}
7883 
7884 	ConstraintTeachersMaxTwoConsecutiveAfternoonsForm form(this);
7885 	setParentAndOtherThings(&form, this);
7886 	form.exec();
7887 }
7888 
7889 void FetMainForm::dataTimeConstraintsTeacherMinRealDaysPerWeekAction_triggered()
7890 {
7891 	if(!gt.rules.initialized){
7892 		QMessageBox::information(this, tr("FET information"),
7893 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7894 		return;
7895 	}
7896 
7897 	if(simulation_running || simulation_running_multi){
7898 		QMessageBox::information(this, tr("FET information"),
7899 			tr("Allocation in course.\nPlease stop simulation before this."));
7900 		return;
7901 	}
7902 
7903 	ConstraintTeacherMinRealDaysPerWeekForm form(this);
7904 	setParentAndOtherThings(&form, this);
7905 	form.exec();
7906 }
7907 
7908 void FetMainForm::dataTimeConstraintsTeacherMinMorningsPerWeekAction_triggered()
7909 {
7910 	if(!gt.rules.initialized){
7911 		QMessageBox::information(this, tr("FET information"),
7912 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7913 		return;
7914 	}
7915 
7916 	if(simulation_running || simulation_running_multi){
7917 		QMessageBox::information(this, tr("FET information"),
7918 			tr("Allocation in course.\nPlease stop simulation before this."));
7919 		return;
7920 	}
7921 
7922 	ConstraintTeacherMinMorningsPerWeekForm form(this);
7923 	setParentAndOtherThings(&form, this);
7924 	form.exec();
7925 }
7926 
7927 void FetMainForm::dataTimeConstraintsTeachersMinMorningsPerWeekAction_triggered()
7928 {
7929 	if(!gt.rules.initialized){
7930 		QMessageBox::information(this, tr("FET information"),
7931 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7932 		return;
7933 	}
7934 
7935 	if(simulation_running || simulation_running_multi){
7936 		QMessageBox::information(this, tr("FET information"),
7937 			tr("Allocation in course.\nPlease stop simulation before this."));
7938 		return;
7939 	}
7940 
7941 	ConstraintTeachersMinMorningsPerWeekForm form(this);
7942 	setParentAndOtherThings(&form, this);
7943 	form.exec();
7944 }
7945 
7946 void FetMainForm::dataTimeConstraintsTeacherMinAfternoonsPerWeekAction_triggered()
7947 {
7948 	if(!gt.rules.initialized){
7949 		QMessageBox::information(this, tr("FET information"),
7950 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7951 		return;
7952 	}
7953 
7954 	if(simulation_running || simulation_running_multi){
7955 		QMessageBox::information(this, tr("FET information"),
7956 			tr("Allocation in course.\nPlease stop simulation before this."));
7957 		return;
7958 	}
7959 
7960 	ConstraintTeacherMinAfternoonsPerWeekForm form(this);
7961 	setParentAndOtherThings(&form, this);
7962 	form.exec();
7963 }
7964 
7965 void FetMainForm::dataTimeConstraintsTeachersMinAfternoonsPerWeekAction_triggered()
7966 {
7967 	if(!gt.rules.initialized){
7968 		QMessageBox::information(this, tr("FET information"),
7969 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7970 		return;
7971 	}
7972 
7973 	if(simulation_running || simulation_running_multi){
7974 		QMessageBox::information(this, tr("FET information"),
7975 			tr("Allocation in course.\nPlease stop simulation before this."));
7976 		return;
7977 	}
7978 
7979 	ConstraintTeachersMinAfternoonsPerWeekForm form(this);
7980 	setParentAndOtherThings(&form, this);
7981 	form.exec();
7982 }
7983 
7984 void FetMainForm::dataTimeConstraintsTeachersMinRealDaysPerWeekAction_triggered()
7985 {
7986 	if(!gt.rules.initialized){
7987 		QMessageBox::information(this, tr("FET information"),
7988 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
7989 		return;
7990 	}
7991 
7992 	if(simulation_running || simulation_running_multi){
7993 		QMessageBox::information(this, tr("FET information"),
7994 			tr("Allocation in course.\nPlease stop simulation before this."));
7995 		return;
7996 	}
7997 
7998 	ConstraintTeachersMinRealDaysPerWeekForm form(this);
7999 	setParentAndOtherThings(&form, this);
8000 	form.exec();
8001 }
8002 
8003 void FetMainForm::dataTimeConstraintsTeacherMorningIntervalMaxDaysPerWeekAction_triggered()
8004 {
8005 	if(!gt.rules.initialized){
8006 		QMessageBox::information(this, tr("FET information"),
8007 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8008 		return;
8009 	}
8010 
8011 	if(simulation_running || simulation_running_multi){
8012 		QMessageBox::information(this, tr("FET information"),
8013 			tr("Allocation in course.\nPlease stop simulation before this."));
8014 		return;
8015 	}
8016 
8017 	ConstraintTeacherMorningIntervalMaxDaysPerWeekForm form(this);
8018 	setParentAndOtherThings(&form, this);
8019 	form.exec();
8020 }
8021 
8022 void FetMainForm::dataTimeConstraintsTeachersMorningIntervalMaxDaysPerWeekAction_triggered()
8023 {
8024 	if(!gt.rules.initialized){
8025 		QMessageBox::information(this, tr("FET information"),
8026 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8027 		return;
8028 	}
8029 
8030 	if(simulation_running || simulation_running_multi){
8031 		QMessageBox::information(this, tr("FET information"),
8032 			tr("Allocation in course.\nPlease stop simulation before this."));
8033 		return;
8034 	}
8035 
8036 	ConstraintTeachersMorningIntervalMaxDaysPerWeekForm form(this);
8037 	setParentAndOtherThings(&form, this);
8038 	form.exec();
8039 }
8040 
8041 void FetMainForm::dataTimeConstraintsTeacherAfternoonIntervalMaxDaysPerWeekAction_triggered()
8042 {
8043 	if(!gt.rules.initialized){
8044 		QMessageBox::information(this, tr("FET information"),
8045 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8046 		return;
8047 	}
8048 
8049 	if(simulation_running || simulation_running_multi){
8050 		QMessageBox::information(this, tr("FET information"),
8051 			tr("Allocation in course.\nPlease stop simulation before this."));
8052 		return;
8053 	}
8054 
8055 	ConstraintTeacherAfternoonIntervalMaxDaysPerWeekForm form(this);
8056 	setParentAndOtherThings(&form, this);
8057 	form.exec();
8058 }
8059 
8060 void FetMainForm::dataTimeConstraintsTeachersAfternoonIntervalMaxDaysPerWeekAction_triggered()
8061 {
8062 	if(!gt.rules.initialized){
8063 		QMessageBox::information(this, tr("FET information"),
8064 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8065 		return;
8066 	}
8067 
8068 	if(simulation_running || simulation_running_multi){
8069 		QMessageBox::information(this, tr("FET information"),
8070 			tr("Allocation in course.\nPlease stop simulation before this."));
8071 		return;
8072 	}
8073 
8074 	ConstraintTeachersAfternoonIntervalMaxDaysPerWeekForm form(this);
8075 	setParentAndOtherThings(&form, this);
8076 	form.exec();
8077 }
8078 
8079 void FetMainForm::dataTimeConstraintsStudentsSetMaxRealDaysPerWeekAction_triggered()
8080 {
8081 	if(!gt.rules.initialized){
8082 		QMessageBox::information(this, tr("FET information"),
8083 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8084 		return;
8085 	}
8086 
8087 	if(simulation_running || simulation_running_multi){
8088 		QMessageBox::information(this, tr("FET information"),
8089 			tr("Allocation in course.\nPlease stop simulation before this."));
8090 		return;
8091 	}
8092 
8093 	ConstraintStudentsSetMaxRealDaysPerWeekForm form(this);
8094 	setParentAndOtherThings(&form, this);
8095 	form.exec();
8096 }
8097 
8098 void FetMainForm::dataTimeConstraintsStudentsMaxRealDaysPerWeekAction_triggered()
8099 {
8100 	if(!gt.rules.initialized){
8101 		QMessageBox::information(this, tr("FET information"),
8102 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8103 		return;
8104 	}
8105 
8106 	if(simulation_running || simulation_running_multi){
8107 		QMessageBox::information(this, tr("FET information"),
8108 			tr("Allocation in course.\nPlease stop simulation before this."));
8109 		return;
8110 	}
8111 
8112 	ConstraintStudentsMaxRealDaysPerWeekForm form(this);
8113 	setParentAndOtherThings(&form, this);
8114 	form.exec();
8115 }
8116 
8117 void FetMainForm::dataTimeConstraintsStudentsSetMaxMorningsPerWeekAction_triggered()
8118 {
8119 	if(!gt.rules.initialized){
8120 		QMessageBox::information(this, tr("FET information"),
8121 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8122 		return;
8123 	}
8124 
8125 	if(simulation_running || simulation_running_multi){
8126 		QMessageBox::information(this, tr("FET information"),
8127 			tr("Allocation in course.\nPlease stop simulation before this."));
8128 		return;
8129 	}
8130 
8131 	ConstraintStudentsSetMaxMorningsPerWeekForm form(this);
8132 	setParentAndOtherThings(&form, this);
8133 	form.exec();
8134 }
8135 
8136 void FetMainForm::dataTimeConstraintsStudentsMaxMorningsPerWeekAction_triggered()
8137 {
8138 	if(!gt.rules.initialized){
8139 		QMessageBox::information(this, tr("FET information"),
8140 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8141 		return;
8142 	}
8143 
8144 	if(simulation_running || simulation_running_multi){
8145 		QMessageBox::information(this, tr("FET information"),
8146 			tr("Allocation in course.\nPlease stop simulation before this."));
8147 		return;
8148 	}
8149 
8150 	ConstraintStudentsMaxMorningsPerWeekForm form(this);
8151 	setParentAndOtherThings(&form, this);
8152 	form.exec();
8153 }
8154 
8155 void FetMainForm::dataTimeConstraintsStudentsSetMaxAfternoonsPerWeekAction_triggered()
8156 {
8157 	if(!gt.rules.initialized){
8158 		QMessageBox::information(this, tr("FET information"),
8159 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8160 		return;
8161 	}
8162 
8163 	if(simulation_running || simulation_running_multi){
8164 		QMessageBox::information(this, tr("FET information"),
8165 			tr("Allocation in course.\nPlease stop simulation before this."));
8166 		return;
8167 	}
8168 
8169 	ConstraintStudentsSetMaxAfternoonsPerWeekForm form(this);
8170 	setParentAndOtherThings(&form, this);
8171 	form.exec();
8172 }
8173 
8174 void FetMainForm::dataTimeConstraintsStudentsMaxAfternoonsPerWeekAction_triggered()
8175 {
8176 	if(!gt.rules.initialized){
8177 		QMessageBox::information(this, tr("FET information"),
8178 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8179 		return;
8180 	}
8181 
8182 	if(simulation_running || simulation_running_multi){
8183 		QMessageBox::information(this, tr("FET information"),
8184 			tr("Allocation in course.\nPlease stop simulation before this."));
8185 		return;
8186 	}
8187 
8188 	ConstraintStudentsMaxAfternoonsPerWeekForm form(this);
8189 	setParentAndOtherThings(&form, this);
8190 	form.exec();
8191 }
8192 
8193 void FetMainForm::dataTimeConstraintsStudentsSetMinMorningsPerWeekAction_triggered()
8194 {
8195 	if(!gt.rules.initialized){
8196 		QMessageBox::information(this, tr("FET information"),
8197 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8198 		return;
8199 	}
8200 
8201 	if(simulation_running || simulation_running_multi){
8202 		QMessageBox::information(this, tr("FET information"),
8203 			tr("Allocation in course.\nPlease stop simulation before this."));
8204 		return;
8205 	}
8206 
8207 	ConstraintStudentsSetMinMorningsPerWeekForm form(this);
8208 	setParentAndOtherThings(&form, this);
8209 	form.exec();
8210 }
8211 
8212 void FetMainForm::dataTimeConstraintsStudentsMinMorningsPerWeekAction_triggered()
8213 {
8214 	if(!gt.rules.initialized){
8215 		QMessageBox::information(this, tr("FET information"),
8216 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8217 		return;
8218 	}
8219 
8220 	if(simulation_running || simulation_running_multi){
8221 		QMessageBox::information(this, tr("FET information"),
8222 			tr("Allocation in course.\nPlease stop simulation before this."));
8223 		return;
8224 	}
8225 
8226 	ConstraintStudentsMinMorningsPerWeekForm form(this);
8227 	setParentAndOtherThings(&form, this);
8228 	form.exec();
8229 }
8230 
8231 void FetMainForm::dataTimeConstraintsStudentsSetMinAfternoonsPerWeekAction_triggered()
8232 {
8233 	if(!gt.rules.initialized){
8234 		QMessageBox::information(this, tr("FET information"),
8235 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8236 		return;
8237 	}
8238 
8239 	if(simulation_running || simulation_running_multi){
8240 		QMessageBox::information(this, tr("FET information"),
8241 			tr("Allocation in course.\nPlease stop simulation before this."));
8242 		return;
8243 	}
8244 
8245 	ConstraintStudentsSetMinAfternoonsPerWeekForm form(this);
8246 	setParentAndOtherThings(&form, this);
8247 	form.exec();
8248 }
8249 
8250 void FetMainForm::dataTimeConstraintsStudentsMinAfternoonsPerWeekAction_triggered()
8251 {
8252 	if(!gt.rules.initialized){
8253 		QMessageBox::information(this, tr("FET information"),
8254 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8255 		return;
8256 	}
8257 
8258 	if(simulation_running || simulation_running_multi){
8259 		QMessageBox::information(this, tr("FET information"),
8260 			tr("Allocation in course.\nPlease stop simulation before this."));
8261 		return;
8262 	}
8263 
8264 	ConstraintStudentsMinAfternoonsPerWeekForm form(this);
8265 	setParentAndOtherThings(&form, this);
8266 	form.exec();
8267 }
8268 
8269 void FetMainForm::dataTimeConstraintsStudentsSetMorningIntervalMaxDaysPerWeekAction_triggered()
8270 {
8271 	if(!gt.rules.initialized){
8272 		QMessageBox::information(this, tr("FET information"),
8273 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8274 		return;
8275 	}
8276 
8277 	if(simulation_running || simulation_running_multi){
8278 		QMessageBox::information(this, tr("FET information"),
8279 			tr("Allocation in course.\nPlease stop simulation before this."));
8280 		return;
8281 	}
8282 
8283 	ConstraintStudentsSetMorningIntervalMaxDaysPerWeekForm form(this);
8284 	setParentAndOtherThings(&form, this);
8285 	form.exec();
8286 }
8287 
8288 void FetMainForm::dataTimeConstraintsStudentsMorningIntervalMaxDaysPerWeekAction_triggered()
8289 {
8290 	if(!gt.rules.initialized){
8291 		QMessageBox::information(this, tr("FET information"),
8292 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8293 		return;
8294 	}
8295 
8296 	if(simulation_running || simulation_running_multi){
8297 		QMessageBox::information(this, tr("FET information"),
8298 			tr("Allocation in course.\nPlease stop simulation before this."));
8299 		return;
8300 	}
8301 
8302 	ConstraintStudentsMorningIntervalMaxDaysPerWeekForm form(this);
8303 	setParentAndOtherThings(&form, this);
8304 	form.exec();
8305 }
8306 
8307 void FetMainForm::dataTimeConstraintsStudentsSetAfternoonIntervalMaxDaysPerWeekAction_triggered()
8308 {
8309 	if(!gt.rules.initialized){
8310 		QMessageBox::information(this, tr("FET information"),
8311 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8312 		return;
8313 	}
8314 
8315 	if(simulation_running || simulation_running_multi){
8316 		QMessageBox::information(this, tr("FET information"),
8317 			tr("Allocation in course.\nPlease stop simulation before this."));
8318 		return;
8319 	}
8320 
8321 	ConstraintStudentsSetAfternoonIntervalMaxDaysPerWeekForm form(this);
8322 	setParentAndOtherThings(&form, this);
8323 	form.exec();
8324 }
8325 
8326 void FetMainForm::dataTimeConstraintsStudentsAfternoonIntervalMaxDaysPerWeekAction_triggered()
8327 {
8328 	if(!gt.rules.initialized){
8329 		QMessageBox::information(this, tr("FET information"),
8330 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8331 		return;
8332 	}
8333 
8334 	if(simulation_running || simulation_running_multi){
8335 		QMessageBox::information(this, tr("FET information"),
8336 			tr("Allocation in course.\nPlease stop simulation before this."));
8337 		return;
8338 	}
8339 
8340 	ConstraintStudentsAfternoonIntervalMaxDaysPerWeekForm form(this);
8341 	setParentAndOtherThings(&form, this);
8342 	form.exec();
8343 }
8344 
8345 void FetMainForm::dataTimeConstraintsTeachersMaxHoursDailyRealDaysAction_triggered()
8346 {
8347 	if(!gt.rules.initialized){
8348 		QMessageBox::information(this, tr("FET information"),
8349 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8350 		return;
8351 	}
8352 
8353 	if(simulation_running || simulation_running_multi){
8354 		QMessageBox::information(this, tr("FET information"),
8355 			tr("Allocation in course.\nPlease stop simulation before this."));
8356 		return;
8357 	}
8358 
8359 	ConstraintTeachersMaxHoursDailyRealDaysForm form(this);
8360 	setParentAndOtherThings(&form, this);
8361 	form.exec();
8362 }
8363 
8364 void FetMainForm::dataTimeConstraintsTeacherMaxHoursDailyRealDaysAction_triggered()
8365 {
8366 	if(!gt.rules.initialized){
8367 		QMessageBox::information(this, tr("FET information"),
8368 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8369 		return;
8370 	}
8371 
8372 	if(simulation_running || simulation_running_multi){
8373 		QMessageBox::information(this, tr("FET information"),
8374 			tr("Allocation in course.\nPlease stop simulation before this."));
8375 		return;
8376 	}
8377 
8378 	ConstraintTeacherMaxHoursDailyRealDaysForm form(this);
8379 	setParentAndOtherThings(&form, this);
8380 	form.exec();
8381 }
8382 
8383 void FetMainForm::dataTimeConstraintsTeacherMaxTwoActivityTagsPerDayFromN1N2N3Action_triggered()
8384 {
8385 	if(!gt.rules.initialized){
8386 		QMessageBox::information(this, tr("FET information"),
8387 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8388 		return;
8389 	}
8390 
8391 	if(simulation_running || simulation_running_multi){
8392 		QMessageBox::information(this, tr("FET information"),
8393 			tr("Allocation in course.\nPlease stop simulation before this."));
8394 		return;
8395 	}
8396 
8397 	ConstraintTeacherMaxTwoActivityTagsPerDayFromN1N2N3Form form(this);
8398 	setParentAndOtherThings(&form, this);
8399 	form.exec();
8400 }
8401 
8402 void FetMainForm::dataTimeConstraintsTeachersMaxTwoActivityTagsPerDayFromN1N2N3Action_triggered()
8403 {
8404 	if(!gt.rules.initialized){
8405 		QMessageBox::information(this, tr("FET information"),
8406 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8407 		return;
8408 	}
8409 
8410 	if(simulation_running || simulation_running_multi){
8411 		QMessageBox::information(this, tr("FET information"),
8412 			tr("Allocation in course.\nPlease stop simulation before this."));
8413 		return;
8414 	}
8415 
8416 	ConstraintTeachersMaxTwoActivityTagsPerDayFromN1N2N3Form form(this);
8417 	setParentAndOtherThings(&form, this);
8418 	form.exec();
8419 }
8420 
8421 void FetMainForm::dataTimeConstraintsTeachersActivityTagMaxHoursDailyRealDaysAction_triggered()
8422 {
8423 	if(!gt.rules.initialized){
8424 		QMessageBox::information(this, tr("FET information"),
8425 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8426 		return;
8427 	}
8428 
8429 	if(simulation_running || simulation_running_multi){
8430 		QMessageBox::information(this, tr("FET information"),
8431 			tr("Allocation in course.\nPlease stop simulation before this."));
8432 		return;
8433 	}
8434 
8435 	if(!ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY){
8436 		enableNotPerfectMessage();
8437 		return;
8438 	}
8439 
8440 	ConstraintTeachersActivityTagMaxHoursDailyRealDaysForm form(this);
8441 	setParentAndOtherThings(&form, this);
8442 	form.exec();
8443 }
8444 
8445 void FetMainForm::dataTimeConstraintsTeacherActivityTagMaxHoursDailyRealDaysAction_triggered()
8446 {
8447 	if(!gt.rules.initialized){
8448 		QMessageBox::information(this, tr("FET information"),
8449 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8450 		return;
8451 	}
8452 
8453 	if(simulation_running || simulation_running_multi){
8454 		QMessageBox::information(this, tr("FET information"),
8455 			tr("Allocation in course.\nPlease stop simulation before this."));
8456 		return;
8457 	}
8458 
8459 	if(!ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY){
8460 		enableNotPerfectMessage();
8461 		return;
8462 	}
8463 
8464 	ConstraintTeacherActivityTagMaxHoursDailyRealDaysForm form(this);
8465 	setParentAndOtherThings(&form, this);
8466 	form.exec();
8467 }
8468 
8469 void FetMainForm::dataTimeConstraintsTeacherMaxHoursPerAllAfternoonsAction_triggered()
8470 {
8471 	if(!gt.rules.initialized){
8472 		QMessageBox::information(this, tr("FET information"),
8473 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8474 		return;
8475 	}
8476 
8477 	if(simulation_running || simulation_running_multi){
8478 		QMessageBox::information(this, tr("FET information"),
8479 			tr("Allocation in course.\nPlease stop simulation before this."));
8480 		return;
8481 	}
8482 
8483 	ConstraintTeacherMaxHoursPerAllAfternoonsForm form(this);
8484 	setParentAndOtherThings(&form, this);
8485 	form.exec();
8486 }
8487 
8488 void FetMainForm::dataTimeConstraintsTeachersMaxHoursPerAllAfternoonsAction_triggered()
8489 {
8490 	if(!gt.rules.initialized){
8491 		QMessageBox::information(this, tr("FET information"),
8492 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8493 		return;
8494 	}
8495 
8496 	if(simulation_running || simulation_running_multi){
8497 		QMessageBox::information(this, tr("FET information"),
8498 			tr("Allocation in course.\nPlease stop simulation before this."));
8499 		return;
8500 	}
8501 
8502 	ConstraintTeachersMaxHoursPerAllAfternoonsForm form(this);
8503 	setParentAndOtherThings(&form, this);
8504 	form.exec();
8505 }
8506 
8507 void FetMainForm::dataTimeConstraintsStudentsSetMaxHoursPerAllAfternoonsAction_triggered()
8508 {
8509 	if(!gt.rules.initialized){
8510 		QMessageBox::information(this, tr("FET information"),
8511 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8512 		return;
8513 	}
8514 
8515 	if(simulation_running || simulation_running_multi){
8516 		QMessageBox::information(this, tr("FET information"),
8517 			tr("Allocation in course.\nPlease stop simulation before this."));
8518 		return;
8519 	}
8520 
8521 	ConstraintStudentsSetMaxHoursPerAllAfternoonsForm form(this);
8522 	setParentAndOtherThings(&form, this);
8523 	form.exec();
8524 }
8525 
8526 void FetMainForm::dataTimeConstraintsStudentsMaxHoursPerAllAfternoonsAction_triggered()
8527 {
8528 	if(!gt.rules.initialized){
8529 		QMessageBox::information(this, tr("FET information"),
8530 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8531 		return;
8532 	}
8533 
8534 	if(simulation_running || simulation_running_multi){
8535 		QMessageBox::information(this, tr("FET information"),
8536 			tr("Allocation in course.\nPlease stop simulation before this."));
8537 		return;
8538 	}
8539 
8540 	ConstraintStudentsMaxHoursPerAllAfternoonsForm form(this);
8541 	setParentAndOtherThings(&form, this);
8542 	form.exec();
8543 }
8544 
8545 void FetMainForm::dataTimeConstraintsTeachersMinHoursPerMorningAction_triggered()
8546 {
8547 	if(!gt.rules.initialized){
8548 		QMessageBox::information(this, tr("FET information"),
8549 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8550 		return;
8551 	}
8552 
8553 	if(simulation_running || simulation_running_multi){
8554 		QMessageBox::information(this, tr("FET information"),
8555 			tr("Allocation in course.\nPlease stop simulation before this."));
8556 		return;
8557 	}
8558 
8559 	ConstraintTeachersMinHoursPerMorningForm form(this);
8560 	setParentAndOtherThings(&form, this);
8561 	form.exec();
8562 }
8563 
8564 void FetMainForm::dataTimeConstraintsTeacherMinHoursPerMorningAction_triggered()
8565 {
8566 	if(!gt.rules.initialized){
8567 		QMessageBox::information(this, tr("FET information"),
8568 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8569 		return;
8570 	}
8571 
8572 	if(simulation_running || simulation_running_multi){
8573 		QMessageBox::information(this, tr("FET information"),
8574 			tr("Allocation in course.\nPlease stop simulation before this."));
8575 		return;
8576 	}
8577 
8578 	ConstraintTeacherMinHoursPerMorningForm form(this);
8579 	setParentAndOtherThings(&form, this);
8580 	form.exec();
8581 }
8582 
8583 void FetMainForm::dataTimeConstraintsTeachersMinHoursDailyRealDaysAction_triggered()
8584 {
8585 	if(!gt.rules.initialized){
8586 		QMessageBox::information(this, tr("FET information"),
8587 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8588 		return;
8589 	}
8590 
8591 	if(simulation_running || simulation_running_multi){
8592 		QMessageBox::information(this, tr("FET information"),
8593 			tr("Allocation in course.\nPlease stop simulation before this."));
8594 		return;
8595 	}
8596 
8597 	ConstraintTeachersMinHoursDailyRealDaysForm form(this);
8598 	setParentAndOtherThings(&form, this);
8599 	form.exec();
8600 }
8601 
8602 void FetMainForm::dataTimeConstraintsTeacherMinHoursDailyRealDaysAction_triggered()
8603 {
8604 	if(!gt.rules.initialized){
8605 		QMessageBox::information(this, tr("FET information"),
8606 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8607 		return;
8608 	}
8609 
8610 	if(simulation_running || simulation_running_multi){
8611 		QMessageBox::information(this, tr("FET information"),
8612 			tr("Allocation in course.\nPlease stop simulation before this."));
8613 		return;
8614 	}
8615 
8616 	ConstraintTeacherMinHoursDailyRealDaysForm form(this);
8617 	setParentAndOtherThings(&form, this);
8618 	form.exec();
8619 }
8620 
8621 void FetMainForm::dataTimeConstraintsTeacherMaxSpanPerRealDayAction_triggered()
8622 {
8623 	if(!gt.rules.initialized){
8624 		QMessageBox::information(this, tr("FET information"),
8625 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8626 		return;
8627 	}
8628 
8629 	if(simulation_running || simulation_running_multi){
8630 		QMessageBox::information(this, tr("FET information"),
8631 			tr("Allocation in course.\nPlease stop simulation before this."));
8632 		return;
8633 	}
8634 
8635 	ConstraintTeacherMaxSpanPerRealDayForm form(this);
8636 	setParentAndOtherThings(&form, this);
8637 	form.exec();
8638 }
8639 
8640 void FetMainForm::dataTimeConstraintsTeachersMaxSpanPerRealDayAction_triggered()
8641 {
8642 	if(!gt.rules.initialized){
8643 		QMessageBox::information(this, tr("FET information"),
8644 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8645 		return;
8646 	}
8647 
8648 	if(simulation_running || simulation_running_multi){
8649 		QMessageBox::information(this, tr("FET information"),
8650 			tr("Allocation in course.\nPlease stop simulation before this."));
8651 		return;
8652 	}
8653 
8654 	ConstraintTeachersMaxSpanPerRealDayForm form(this);
8655 	setParentAndOtherThings(&form, this);
8656 	form.exec();
8657 }
8658 
8659 void FetMainForm::dataTimeConstraintsStudentsSetMaxSpanPerRealDayAction_triggered()
8660 {
8661 	if(!gt.rules.initialized){
8662 		QMessageBox::information(this, tr("FET information"),
8663 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8664 		return;
8665 	}
8666 
8667 	if(simulation_running || simulation_running_multi){
8668 		QMessageBox::information(this, tr("FET information"),
8669 			tr("Allocation in course.\nPlease stop simulation before this."));
8670 		return;
8671 	}
8672 
8673 	ConstraintStudentsSetMaxSpanPerRealDayForm form(this);
8674 	setParentAndOtherThings(&form, this);
8675 	form.exec();
8676 }
8677 
8678 void FetMainForm::dataTimeConstraintsStudentsMaxSpanPerRealDayAction_triggered()
8679 {
8680 	if(!gt.rules.initialized){
8681 		QMessageBox::information(this, tr("FET information"),
8682 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8683 		return;
8684 	}
8685 
8686 	if(simulation_running || simulation_running_multi){
8687 		QMessageBox::information(this, tr("FET information"),
8688 			tr("Allocation in course.\nPlease stop simulation before this."));
8689 		return;
8690 	}
8691 
8692 	ConstraintStudentsMaxSpanPerRealDayForm form(this);
8693 	setParentAndOtherThings(&form, this);
8694 	form.exec();
8695 }
8696 
8697 void FetMainForm::dataTimeConstraintsTeacherMinRestingHoursBetweenMorningAndAfternoonAction_triggered()
8698 {
8699 	if(!gt.rules.initialized){
8700 		QMessageBox::information(this, tr("FET information"),
8701 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8702 		return;
8703 	}
8704 
8705 	if(simulation_running || simulation_running_multi){
8706 		QMessageBox::information(this, tr("FET information"),
8707 			tr("Allocation in course.\nPlease stop simulation before this."));
8708 		return;
8709 	}
8710 
8711 	ConstraintTeacherMinRestingHoursBetweenMorningAndAfternoonForm form(this);
8712 	setParentAndOtherThings(&form, this);
8713 	form.exec();
8714 }
8715 
8716 void FetMainForm::dataTimeConstraintsTeachersMinRestingHoursBetweenMorningAndAfternoonAction_triggered()
8717 {
8718 	if(!gt.rules.initialized){
8719 		QMessageBox::information(this, tr("FET information"),
8720 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8721 		return;
8722 	}
8723 
8724 	if(simulation_running || simulation_running_multi){
8725 		QMessageBox::information(this, tr("FET information"),
8726 			tr("Allocation in course.\nPlease stop simulation before this."));
8727 		return;
8728 	}
8729 
8730 	ConstraintTeachersMinRestingHoursBetweenMorningAndAfternoonForm form(this);
8731 	setParentAndOtherThings(&form, this);
8732 	form.exec();
8733 }
8734 
8735 void FetMainForm::dataTimeConstraintsStudentsSetMinRestingHoursBetweenMorningAndAfternoonAction_triggered()
8736 {
8737 	if(!gt.rules.initialized){
8738 		QMessageBox::information(this, tr("FET information"),
8739 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8740 		return;
8741 	}
8742 
8743 	if(simulation_running || simulation_running_multi){
8744 		QMessageBox::information(this, tr("FET information"),
8745 			tr("Allocation in course.\nPlease stop simulation before this."));
8746 		return;
8747 	}
8748 
8749 	ConstraintStudentsSetMinRestingHoursBetweenMorningAndAfternoonForm form(this);
8750 	setParentAndOtherThings(&form, this);
8751 	form.exec();
8752 }
8753 
8754 void FetMainForm::dataTimeConstraintsStudentsMinRestingHoursBetweenMorningAndAfternoonAction_triggered()
8755 {
8756 	if(!gt.rules.initialized){
8757 		QMessageBox::information(this, tr("FET information"),
8758 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8759 		return;
8760 	}
8761 
8762 	if(simulation_running || simulation_running_multi){
8763 		QMessageBox::information(this, tr("FET information"),
8764 			tr("Allocation in course.\nPlease stop simulation before this."));
8765 		return;
8766 	}
8767 
8768 	ConstraintStudentsMinRestingHoursBetweenMorningAndAfternoonForm form(this);
8769 	setParentAndOtherThings(&form, this);
8770 	form.exec();
8771 }
8772 
8773 void FetMainForm::dataTimeConstraintsStudentsSetMaxGapsPerRealDayAction_triggered()
8774 {
8775 	if(!gt.rules.initialized){
8776 		QMessageBox::information(this, tr("FET information"),
8777 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8778 		return;
8779 	}
8780 
8781 	if(simulation_running || simulation_running_multi){
8782 		QMessageBox::information(this, tr("FET information"),
8783 			tr("Allocation in course.\nPlease stop simulation before this."));
8784 		return;
8785 	}
8786 
8787 	if(!ENABLE_MAX_GAPS_PER_REAL_DAY){
8788 		enableNotPerfectMessage();
8789 		return;
8790 	}
8791 
8792 	ConstraintStudentsSetMaxGapsPerRealDayForm form(this);
8793 	setParentAndOtherThings(&form, this);
8794 	form.exec();
8795 }
8796 
8797 void FetMainForm::dataTimeConstraintsStudentsMaxGapsPerRealDayAction_triggered()
8798 {
8799 	if(!gt.rules.initialized){
8800 		QMessageBox::information(this, tr("FET information"),
8801 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8802 		return;
8803 	}
8804 
8805 	if(simulation_running || simulation_running_multi){
8806 		QMessageBox::information(this, tr("FET information"),
8807 			tr("Allocation in course.\nPlease stop simulation before this."));
8808 		return;
8809 	}
8810 
8811 	if(!ENABLE_MAX_GAPS_PER_REAL_DAY){
8812 		enableNotPerfectMessage();
8813 		return;
8814 	}
8815 
8816 	ConstraintStudentsMaxGapsPerRealDayForm form(this);
8817 	setParentAndOtherThings(&form, this);
8818 	form.exec();
8819 }
8820 
8821 void FetMainForm::dataTimeConstraintsTeachersMaxGapsPerRealDayAction_triggered()
8822 {
8823 	if(!gt.rules.initialized){
8824 		QMessageBox::information(this, tr("FET information"),
8825 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8826 		return;
8827 	}
8828 
8829 	if(simulation_running || simulation_running_multi){
8830 		QMessageBox::information(this, tr("FET information"),
8831 			tr("Allocation in course.\nPlease stop simulation before this."));
8832 		return;
8833 	}
8834 
8835 	if(!ENABLE_MAX_GAPS_PER_REAL_DAY){
8836 		enableNotPerfectMessage();
8837 		return;
8838 	}
8839 
8840 	ConstraintTeachersMaxGapsPerRealDayForm form(this);
8841 	setParentAndOtherThings(&form, this);
8842 	form.exec();
8843 }
8844 
8845 void FetMainForm::dataTimeConstraintsTeacherMaxGapsPerRealDayAction_triggered()
8846 {
8847 	if(!gt.rules.initialized){
8848 		QMessageBox::information(this, tr("FET information"),
8849 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8850 		return;
8851 	}
8852 
8853 	if(simulation_running || simulation_running_multi){
8854 		QMessageBox::information(this, tr("FET information"),
8855 			tr("Allocation in course.\nPlease stop simulation before this."));
8856 		return;
8857 	}
8858 
8859 	if(!ENABLE_MAX_GAPS_PER_REAL_DAY){
8860 		enableNotPerfectMessage();
8861 		return;
8862 	}
8863 
8864 	ConstraintTeacherMaxGapsPerRealDayForm form(this);
8865 	setParentAndOtherThings(&form, this);
8866 	form.exec();
8867 }
8868 
8869 void FetMainForm::dataTimeConstraintsStudentsSetMaxGapsPerWeekForRealDaysAction_triggered()
8870 {
8871 	if(!gt.rules.initialized){
8872 		QMessageBox::information(this, tr("FET information"),
8873 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8874 		return;
8875 	}
8876 
8877 	if(simulation_running || simulation_running_multi){
8878 		QMessageBox::information(this, tr("FET information"),
8879 			tr("Allocation in course.\nPlease stop simulation before this."));
8880 		return;
8881 	}
8882 
8883 	if(!ENABLE_MAX_GAPS_PER_REAL_DAY){
8884 		enableNotPerfectMessage();
8885 		return;
8886 	}
8887 
8888 	ConstraintStudentsSetMaxGapsPerWeekForRealDaysForm form(this);
8889 	setParentAndOtherThings(&form, this);
8890 	form.exec();
8891 }
8892 
8893 void FetMainForm::dataTimeConstraintsStudentsMaxGapsPerWeekForRealDaysAction_triggered()
8894 {
8895 	if(!gt.rules.initialized){
8896 		QMessageBox::information(this, tr("FET information"),
8897 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8898 		return;
8899 	}
8900 
8901 	if(simulation_running || simulation_running_multi){
8902 		QMessageBox::information(this, tr("FET information"),
8903 			tr("Allocation in course.\nPlease stop simulation before this."));
8904 		return;
8905 	}
8906 
8907 	if(!ENABLE_MAX_GAPS_PER_REAL_DAY){
8908 		enableNotPerfectMessage();
8909 		return;
8910 	}
8911 
8912 	ConstraintStudentsMaxGapsPerWeekForRealDaysForm form(this);
8913 	setParentAndOtherThings(&form, this);
8914 	form.exec();
8915 }
8916 
8917 void FetMainForm::dataTimeConstraintsTeachersMaxGapsPerWeekForRealDaysAction_triggered()
8918 {
8919 	if(!gt.rules.initialized){
8920 		QMessageBox::information(this, tr("FET information"),
8921 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8922 		return;
8923 	}
8924 
8925 	if(simulation_running || simulation_running_multi){
8926 		QMessageBox::information(this, tr("FET information"),
8927 			tr("Allocation in course.\nPlease stop simulation before this."));
8928 		return;
8929 	}
8930 
8931 	if(!ENABLE_MAX_GAPS_PER_REAL_DAY){
8932 		enableNotPerfectMessage();
8933 		return;
8934 	}
8935 
8936 	ConstraintTeachersMaxGapsPerWeekForRealDaysForm form(this);
8937 	setParentAndOtherThings(&form, this);
8938 	form.exec();
8939 }
8940 
8941 void FetMainForm::dataTimeConstraintsTeacherMaxGapsPerWeekForRealDaysAction_triggered()
8942 {
8943 	if(!gt.rules.initialized){
8944 		QMessageBox::information(this, tr("FET information"),
8945 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8946 		return;
8947 	}
8948 
8949 	if(simulation_running || simulation_running_multi){
8950 		QMessageBox::information(this, tr("FET information"),
8951 			tr("Allocation in course.\nPlease stop simulation before this."));
8952 		return;
8953 	}
8954 
8955 	if(!ENABLE_MAX_GAPS_PER_REAL_DAY){
8956 		enableNotPerfectMessage();
8957 		return;
8958 	}
8959 
8960 	ConstraintTeacherMaxGapsPerWeekForRealDaysForm form(this);
8961 	setParentAndOtherThings(&form, this);
8962 	form.exec();
8963 }
8964 
8965 void FetMainForm::dataTimeConstraintsTeachersMaxZeroGapsPerAfternoonAction_triggered()
8966 {
8967 	if(!gt.rules.initialized){
8968 		QMessageBox::information(this, tr("FET information"),
8969 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8970 		return;
8971 	}
8972 
8973 	if(simulation_running || simulation_running_multi){
8974 		QMessageBox::information(this, tr("FET information"),
8975 			tr("Allocation in course.\nPlease stop simulation before this."));
8976 		return;
8977 	}
8978 
8979 	ConstraintTeachersMaxZeroGapsPerAfternoonForm form(this);
8980 	setParentAndOtherThings(&form, this);
8981 	form.exec();
8982 }
8983 
8984 void FetMainForm::dataTimeConstraintsTeacherMaxZeroGapsPerAfternoonAction_triggered()
8985 {
8986 	if(!gt.rules.initialized){
8987 		QMessageBox::information(this, tr("FET information"),
8988 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
8989 		return;
8990 	}
8991 
8992 	if(simulation_running || simulation_running_multi){
8993 		QMessageBox::information(this, tr("FET information"),
8994 			tr("Allocation in course.\nPlease stop simulation before this."));
8995 		return;
8996 	}
8997 
8998 	ConstraintTeacherMaxZeroGapsPerAfternoonForm form(this);
8999 	setParentAndOtherThings(&form, this);
9000 	form.exec();
9001 }
9002 
9003 void FetMainForm::dataTimeConstraintsTeachersAfternoonsEarlyMaxBeginningsAtSecondHourAction_triggered()
9004 {
9005 	if(!gt.rules.initialized){
9006 		QMessageBox::information(this, tr("FET information"),
9007 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9008 		return;
9009 	}
9010 
9011 	if(simulation_running || simulation_running_multi){
9012 		QMessageBox::information(this, tr("FET information"),
9013 			tr("Allocation in course.\nPlease stop simulation before this."));
9014 		return;
9015 	}
9016 
9017 	ConstraintTeachersAfternoonsEarlyMaxBeginningsAtSecondHourForm form(this);
9018 	setParentAndOtherThings(&form, this);
9019 	form.exec();
9020 }
9021 
9022 void FetMainForm::dataTimeConstraintsTeacherAfternoonsEarlyMaxBeginningsAtSecondHourAction_triggered()
9023 {
9024 	if(!gt.rules.initialized){
9025 		QMessageBox::information(this, tr("FET information"),
9026 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9027 		return;
9028 	}
9029 
9030 	if(simulation_running || simulation_running_multi){
9031 		QMessageBox::information(this, tr("FET information"),
9032 			tr("Allocation in course.\nPlease stop simulation before this."));
9033 		return;
9034 	}
9035 
9036 	ConstraintTeacherAfternoonsEarlyMaxBeginningsAtSecondHourForm form(this);
9037 	setParentAndOtherThings(&form, this);
9038 	form.exec();
9039 }
9040 
9041 void FetMainForm::dataTimeConstraintsStudentsAfternoonsEarlyMaxBeginningsAtSecondHourAction_triggered()
9042 {
9043 	if(!gt.rules.initialized){
9044 		QMessageBox::information(this, tr("FET information"),
9045 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9046 		return;
9047 	}
9048 
9049 	if(simulation_running || simulation_running_multi){
9050 		QMessageBox::information(this, tr("FET information"),
9051 			tr("Allocation in course.\nPlease stop simulation before this."));
9052 		return;
9053 	}
9054 
9055 	ConstraintStudentsAfternoonsEarlyMaxBeginningsAtSecondHourForm form(this);
9056 	setParentAndOtherThings(&form, this);
9057 	form.exec();
9058 }
9059 
9060 void FetMainForm::dataTimeConstraintsStudentsSetAfternoonsEarlyMaxBeginningsAtSecondHourAction_triggered()
9061 {
9062 	if(!gt.rules.initialized){
9063 		QMessageBox::information(this, tr("FET information"),
9064 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9065 		return;
9066 	}
9067 
9068 	if(simulation_running || simulation_running_multi){
9069 		QMessageBox::information(this, tr("FET information"),
9070 			tr("Allocation in course.\nPlease stop simulation before this."));
9071 		return;
9072 	}
9073 
9074 	ConstraintStudentsSetAfternoonsEarlyMaxBeginningsAtSecondHourForm form(this);
9075 	setParentAndOtherThings(&form, this);
9076 	form.exec();
9077 }
9078 
9079 void FetMainForm::dataTimeConstraintsTeachersMorningsEarlyMaxBeginningsAtSecondHourAction_triggered()
9080 {
9081 	if(!gt.rules.initialized){
9082 		QMessageBox::information(this, tr("FET information"),
9083 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9084 		return;
9085 	}
9086 
9087 	if(simulation_running || simulation_running_multi){
9088 		QMessageBox::information(this, tr("FET information"),
9089 			tr("Allocation in course.\nPlease stop simulation before this."));
9090 		return;
9091 	}
9092 
9093 	ConstraintTeachersMorningsEarlyMaxBeginningsAtSecondHourForm form(this);
9094 	setParentAndOtherThings(&form, this);
9095 	form.exec();
9096 }
9097 
9098 void FetMainForm::dataTimeConstraintsTeacherMorningsEarlyMaxBeginningsAtSecondHourAction_triggered()
9099 {
9100 	if(!gt.rules.initialized){
9101 		QMessageBox::information(this, tr("FET information"),
9102 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9103 		return;
9104 	}
9105 
9106 	if(simulation_running || simulation_running_multi){
9107 		QMessageBox::information(this, tr("FET information"),
9108 			tr("Allocation in course.\nPlease stop simulation before this."));
9109 		return;
9110 	}
9111 
9112 	ConstraintTeacherMorningsEarlyMaxBeginningsAtSecondHourForm form(this);
9113 	setParentAndOtherThings(&form, this);
9114 	form.exec();
9115 }
9116 
9117 void FetMainForm::dataTimeConstraintsStudentsMorningsEarlyMaxBeginningsAtSecondHourAction_triggered()
9118 {
9119 	if(!gt.rules.initialized){
9120 		QMessageBox::information(this, tr("FET information"),
9121 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9122 		return;
9123 	}
9124 
9125 	if(simulation_running || simulation_running_multi){
9126 		QMessageBox::information(this, tr("FET information"),
9127 			tr("Allocation in course.\nPlease stop simulation before this."));
9128 		return;
9129 	}
9130 
9131 	ConstraintStudentsMorningsEarlyMaxBeginningsAtSecondHourForm form(this);
9132 	setParentAndOtherThings(&form, this);
9133 	form.exec();
9134 }
9135 
9136 void FetMainForm::dataTimeConstraintsStudentsSetMorningsEarlyMaxBeginningsAtSecondHourAction_triggered()
9137 {
9138 	if(!gt.rules.initialized){
9139 		QMessageBox::information(this, tr("FET information"),
9140 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9141 		return;
9142 	}
9143 
9144 	if(simulation_running || simulation_running_multi){
9145 		QMessageBox::information(this, tr("FET information"),
9146 			tr("Allocation in course.\nPlease stop simulation before this."));
9147 		return;
9148 	}
9149 
9150 	ConstraintStudentsSetMorningsEarlyMaxBeginningsAtSecondHourForm form(this);
9151 	setParentAndOtherThings(&form, this);
9152 	form.exec();
9153 }
9154 
9155 void FetMainForm::dataTimeConstraintsStudentsSetMaxHoursDailyRealDaysAction_triggered()
9156 {
9157 	if(!gt.rules.initialized){
9158 		QMessageBox::information(this, tr("FET information"),
9159 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9160 		return;
9161 	}
9162 
9163 	if(simulation_running || simulation_running_multi){
9164 		QMessageBox::information(this, tr("FET information"),
9165 			tr("Allocation in course.\nPlease stop simulation before this."));
9166 		return;
9167 	}
9168 
9169 	ConstraintStudentsSetMaxHoursDailyRealDaysForm form(this);
9170 	setParentAndOtherThings(&form, this);
9171 	form.exec();
9172 }
9173 
9174 void FetMainForm::dataTimeConstraintsStudentsMaxHoursDailyRealDaysAction_triggered()
9175 {
9176 	if(!gt.rules.initialized){
9177 		QMessageBox::information(this, tr("FET information"),
9178 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9179 		return;
9180 	}
9181 
9182 	if(simulation_running || simulation_running_multi){
9183 		QMessageBox::information(this, tr("FET information"),
9184 			tr("Allocation in course.\nPlease stop simulation before this."));
9185 		return;
9186 	}
9187 
9188 	ConstraintStudentsMaxHoursDailyRealDaysForm form(this);
9189 	setParentAndOtherThings(&form, this);
9190 	form.exec();
9191 }
9192 
9193 void FetMainForm::dataTimeConstraintsStudentsSetActivityTagMaxHoursDailyRealDaysAction_triggered()
9194 {
9195 	if(!gt.rules.initialized){
9196 		QMessageBox::information(this, tr("FET information"),
9197 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9198 		return;
9199 	}
9200 
9201 	if(simulation_running || simulation_running_multi){
9202 		QMessageBox::information(this, tr("FET information"),
9203 			tr("Allocation in course.\nPlease stop simulation before this."));
9204 		return;
9205 	}
9206 
9207 	if(!ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY){
9208 		enableNotPerfectMessage();
9209 		return;
9210 	}
9211 
9212 	ConstraintStudentsSetActivityTagMaxHoursDailyRealDaysForm form(this);
9213 	setParentAndOtherThings(&form, this);
9214 	form.exec();
9215 }
9216 
9217 void FetMainForm::dataTimeConstraintsStudentsActivityTagMaxHoursDailyRealDaysAction_triggered()
9218 {
9219 	if(!gt.rules.initialized){
9220 		QMessageBox::information(this, tr("FET information"),
9221 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9222 		return;
9223 	}
9224 
9225 	if(simulation_running || simulation_running_multi){
9226 		QMessageBox::information(this, tr("FET information"),
9227 			tr("Allocation in course.\nPlease stop simulation before this."));
9228 		return;
9229 	}
9230 
9231 	if(!ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY){
9232 		enableNotPerfectMessage();
9233 		return;
9234 	}
9235 
9236 	ConstraintStudentsActivityTagMaxHoursDailyRealDaysForm form(this);
9237 	setParentAndOtherThings(&form, this);
9238 	form.exec();
9239 }
9240 
9241 void FetMainForm::dataTimeConstraintsStudentsSetMinHoursPerMorningAction_triggered()
9242 {
9243 	if(!gt.rules.initialized){
9244 		QMessageBox::information(this, tr("FET information"),
9245 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9246 		return;
9247 	}
9248 
9249 	if(simulation_running || simulation_running_multi){
9250 		QMessageBox::information(this, tr("FET information"),
9251 			tr("Allocation in course.\nPlease stop simulation before this."));
9252 		return;
9253 	}
9254 
9255 	ConstraintStudentsSetMinHoursPerMorningForm form(this);
9256 	setParentAndOtherThings(&form, this);
9257 	form.exec();
9258 }
9259 
9260 void FetMainForm::dataTimeConstraintsStudentsMinHoursPerMorningAction_triggered()
9261 {
9262 	if(!gt.rules.initialized){
9263 		QMessageBox::information(this, tr("FET information"),
9264 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9265 		return;
9266 	}
9267 
9268 	if(simulation_running || simulation_running_multi){
9269 		QMessageBox::information(this, tr("FET information"),
9270 			tr("Allocation in course.\nPlease stop simulation before this."));
9271 		return;
9272 	}
9273 
9274 	ConstraintStudentsMinHoursPerMorningForm form(this);
9275 	setParentAndOtherThings(&form, this);
9276 	form.exec();
9277 }
9278 
9279 void FetMainForm::on_helpMoroccoAction_triggered()
9280 {
9281 	HelpMoroccoForm* form=new HelpMoroccoForm(this);
9282 	form->setWindowFlags(Qt::Window);
9283 	form->setAttribute(Qt::WA_DeleteOnClose);
9284 	forceCenterWidgetOnScreen(form);
9285 	restoreFETDialogGeometry(form);
9286 	form->show();
9287 }
9288 
9289 void FetMainForm::on_helpAlgeriaAction_triggered()
9290 {
9291 	HelpAlgeriaForm* form=new HelpAlgeriaForm(this);
9292 	form->setWindowFlags(Qt::Window);
9293 	form->setAttribute(Qt::WA_DeleteOnClose);
9294 	forceCenterWidgetOnScreen(form);
9295 	restoreFETDialogGeometry(form);
9296 	form->show();
9297 }
9298 
9299 void FetMainForm::on_helpAboutFETAction_triggered()
9300 {
9301 	HelpAboutForm* form=new HelpAboutForm(this);
9302 	form->setWindowFlags(Qt::Window);
9303 	form->setAttribute(Qt::WA_DeleteOnClose);
9304 	forceCenterWidgetOnScreen(form);
9305 	restoreFETDialogGeometry(form);
9306 	form->show();
9307 }
9308 
9309 void FetMainForm::on_helpAboutQtAction_triggered()
9310 {
9311 	QMessageBox::aboutQt(this);
9312 }
9313 
9314 void FetMainForm::on_helpAboutLibrariesAction_triggered()
9315 {
9316 	HelpAboutLibrariesForm* form=new HelpAboutLibrariesForm(this);
9317 	form->setWindowFlags(Qt::Window);
9318 	form->setAttribute(Qt::WA_DeleteOnClose);
9319 	forceCenterWidgetOnScreen(form);
9320 	restoreFETDialogGeometry(form);
9321 	form->show();
9322 }
9323 
9324 void FetMainForm::on_helpHomepageAction_triggered()
9325 {
9326 	bool tds=QDesktopServices::openUrl(QUrl("https://lalescu.ro/liviu/fet/"));
9327 
9328 	if(!tds){
9329 		QMessageBox::warning(this, tr("FET warning"), tr("Could not start the default internet browser (trying to open the link %1)."
9330 		" Maybe you can try to manually start your browser and open this link.").arg("https://lalescu.ro/liviu/fet/"));
9331 	}
9332 }
9333 
9334 void FetMainForm::on_helpContentsAction_triggered()
9335 {
9336 	bool tds=QDesktopServices::openUrl(QUrl("https://lalescu.ro/liviu/fet/doc/"));
9337 
9338 	if(!tds){
9339 		QMessageBox::warning(this, tr("FET warning"), tr("Could not start the default internet browser (trying to open the link %1)."
9340 		" Maybe you can try to manually start your browser and open this link.").arg("https://lalescu.ro/liviu/fet/doc/"));
9341 	}
9342 }
9343 
9344 void FetMainForm::on_helpForumAction_triggered()
9345 {
9346 	bool tds=QDesktopServices::openUrl(QUrl("https://lalescu.ro/liviu/fet/forum/"));
9347 
9348 	if(!tds){
9349 		QMessageBox::warning(this, tr("FET warning"), tr("Could not start the default internet browser (trying to open the link %1)."
9350 		" Maybe you can try to manually start your browser and open this link.").arg("https://lalescu.ro/liviu/fet/forum/"));
9351 	}
9352 }
9353 
9354 void FetMainForm::on_helpAddressesAction_triggered()
9355 {
9356 	QString s="";
9357 	s+=tr("In case the Help/Online menus do not function, please write down these addresses and open them in an internet browser:");
9358 	s+="\n\n";
9359 	s+=tr("FET homepage: %1", "%1 is FET homepage, begins with https://...").arg("https://lalescu.ro/liviu/fet/");
9360 	s+="\n";
9361 	s+=tr("Documentation (online help contents): %1", "%1 is web page of FET Doc(umentation), which is the contents of the online help, it begins with https://...").arg("https://lalescu.ro/liviu/fet/doc/");
9362 	s+="\n";
9363 	s+=tr("Forum: %1", "%1 is web page of FET forum, begins with https://...").arg("https://lalescu.ro/liviu/fet/forum/");
9364 	s+="\n\n";
9365 	s+=tr("Additionally, you may find on the FET homepage other contact information.");
9366 	s+="\n\n";
9367 	s+=tr("In case these addresses do not function, maybe the FET webpage has temporary problems, so try again later. Or maybe the FET webpage has changed, so search for the new page on the internet.");
9368 
9369 	LongTextMessageBox::largeInformation(this, tr("FET web addresses"), s);
9370 }
9371 
9372 void FetMainForm::on_helpBlockPlanningAction_triggered()
9373 {
9374 	HelpBlockPlanningForm* form=new HelpBlockPlanningForm(this);
9375 	form->setWindowFlags(Qt::Window);
9376 	form->setAttribute(Qt::WA_DeleteOnClose);
9377 	forceCenterWidgetOnScreen(form);
9378 	restoreFETDialogGeometry(form);
9379 	form->show();
9380 }
9381 
9382 void FetMainForm::on_helpTermsAction_triggered()
9383 {
9384 	HelpTermsForm* form=new HelpTermsForm(this);
9385 	form->setWindowFlags(Qt::Window);
9386 	form->setAttribute(Qt::WA_DeleteOnClose);
9387 	forceCenterWidgetOnScreen(form);
9388 	restoreFETDialogGeometry(form);
9389 	form->show();
9390 }
9391 
9392 void FetMainForm::on_helpFAQAction_triggered()
9393 {
9394 	HelpFaqForm* form=new HelpFaqForm(this);
9395 	form->setWindowFlags(Qt::Window);
9396 	form->setAttribute(Qt::WA_DeleteOnClose);
9397 	forceCenterWidgetOnScreen(form);
9398 	restoreFETDialogGeometry(form);
9399 	form->show();
9400 }
9401 
9402 void FetMainForm::on_helpTipsAction_triggered()
9403 {
9404 	HelpTipsForm* form=new HelpTipsForm(this);
9405 	form->setWindowFlags(Qt::Window);
9406 	form->setAttribute(Qt::WA_DeleteOnClose);
9407 	forceCenterWidgetOnScreen(form);
9408 	restoreFETDialogGeometry(form);
9409 	form->show();
9410 }
9411 
9412 void FetMainForm::on_helpInstructionsAction_triggered()
9413 {
9414 	HelpInstructionsForm* form=new HelpInstructionsForm(this);
9415 	form->setWindowFlags(Qt::Window);
9416 	form->setAttribute(Qt::WA_DeleteOnClose);
9417 	forceCenterWidgetOnScreen(form);
9418 	restoreFETDialogGeometry(form);
9419 	form->show();
9420 }
9421 
9422 void FetMainForm::on_timetableGenerateAction_triggered()
9423 {
9424 	if(!gt.rules.initialized){
9425 		QMessageBox::information(this, tr("FET information"),
9426 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9427 		return;
9428 	}
9429 
9430 	if(simulation_running || simulation_running_multi){
9431 		QMessageBox::information(this, tr("FET information"),
9432 			tr("Allocation in course.\nPlease stop simulation before this."));
9433 		return;
9434 	}
9435 
9436 	int count=0;
9437 	for(int i=0; i<gt.rules.activitiesList.size(); i++){
9438 		Activity* act=gt.rules.activitiesList[i];
9439 		if(act->active)
9440 			count++;
9441 	}
9442 	if(count<1){
9443 		QMessageBox::information(this, tr("FET information"), tr("Please input at least one active activity before generating."));
9444 		return;
9445 	}
9446 	TimetableGenerateForm form(this);
9447 	setParentAndOtherThings(&form, this);
9448 	form.exec();
9449 
9450 //	LockUnlock::increaseCommunicationSpinBox();
9451 }
9452 
9453 void FetMainForm::on_timetableGenerateMultipleAction_triggered()
9454 {
9455 	if(!gt.rules.initialized){
9456 		QMessageBox::information(this, tr("FET information"),
9457 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9458 		return;
9459 	}
9460 
9461 	if(simulation_running || simulation_running_multi){
9462 		QMessageBox::information(this, tr("FET information"),
9463 			tr("Allocation in course.\nPlease stop simulation before this."));
9464 		return;
9465 	}
9466 
9467 	if(INPUT_FILENAME_XML.isEmpty()){
9468 		QMessageBox::information(this, tr("FET information"),
9469 			tr("Your current data file is unnamed. Please save it under a chosen name before continuing."));
9470 		return;
9471 	}
9472 
9473 	int count=0;
9474 	for(int i=0; i<gt.rules.activitiesList.size(); i++){
9475 		Activity* act=gt.rules.activitiesList[i];
9476 		if(act->active)
9477 			count++;
9478 	}
9479 	if(count<1){
9480 		QMessageBox::information(this, tr("FET information"), tr("Please input at least one active activity before generating multiple."));
9481 		return;
9482 	}
9483 	TimetableGenerateMultipleForm form(this);
9484 	setParentAndOtherThings(&form, this);
9485 	form.exec();
9486 
9487 //	LockUnlock::increaseCommunicationSpinBox();
9488 }
9489 
9490 void FetMainForm::on_timetableViewStudentsDaysHorizontalAction_triggered()
9491 {
9492 	if(!gt.rules.initialized){
9493 		QMessageBox::information(this, tr("FET information"),
9494 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9495 		return;
9496 	}
9497 
9498 	if(!(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready)){
9499 		QMessageBox::information(this, tr("FET information"), tr("Please generate, firstly"));
9500 		return;
9501 	}
9502 
9503 	if(gt.rules.nInternalRooms!=gt.rules.roomsList.count()){
9504 		QMessageBox::warning(this, tr("FET warning"), tr("Cannot display the timetable, because you added or removed some rooms. Please regenerate the timetable and then view it"));
9505 		return;
9506 	}
9507 
9508 	TimetableViewStudentsDaysHorizontalForm *form=new TimetableViewStudentsDaysHorizontalForm(this);
9509 	form->setWindowFlags(Qt::Window);
9510 	form->setAttribute(Qt::WA_DeleteOnClose);
9511 	forceCenterWidgetOnScreen(form);
9512 	restoreFETDialogGeometry(form);
9513 	form->show();
9514 	form->resizeRowsAfterShow();
9515 }
9516 
9517 void FetMainForm::on_timetableViewStudentsTimeHorizontalAction_triggered()
9518 {
9519 	if(!gt.rules.initialized){
9520 		QMessageBox::information(this, tr("FET information"),
9521 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9522 		return;
9523 	}
9524 
9525 	if(!(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready)){
9526 		QMessageBox::information(this, tr("FET information"), tr("Please generate, firstly"));
9527 		return;
9528 	}
9529 
9530 	if(gt.rules.nInternalRooms!=gt.rules.roomsList.count()){
9531 		QMessageBox::warning(this, tr("FET warning"), tr("Cannot display the timetable, because you added or removed some rooms. Please regenerate the timetable and then view it"));
9532 		return;
9533 	}
9534 
9535 	TimetableViewStudentsTimeHorizontalForm *form=new TimetableViewStudentsTimeHorizontalForm(this);
9536 	form->setWindowFlags(Qt::Window);
9537 	form->setAttribute(Qt::WA_DeleteOnClose);
9538 	forceCenterWidgetOnScreen(form);
9539 	restoreFETDialogGeometry(form);
9540 	form->show();
9541 	form->resizeRowsAfterShow();
9542 }
9543 
9544 void FetMainForm::on_timetableViewTeachersDaysHorizontalAction_triggered()
9545 {
9546 	if(!gt.rules.initialized){
9547 		QMessageBox::information(this, tr("FET information"),
9548 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9549 		return;
9550 	}
9551 
9552 	if(!(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready)){
9553 		QMessageBox::information(this, tr("FET information"), tr("Please generate, firstly"));
9554 		return;
9555 	}
9556 
9557 	if(gt.rules.nInternalRooms!=gt.rules.roomsList.count()){
9558 		QMessageBox::warning(this, tr("FET warning"), tr("Cannot display the timetable, because you added or removed some rooms. Please regenerate the timetable and then view it"));
9559 		return;
9560 	}
9561 	if(gt.rules.nInternalTeachers!=gt.rules.teachersList.count()){
9562 		QMessageBox::warning(this, tr("FET warning"), tr("Cannot display the timetable, because you added or removed some teachers. Please regenerate the timetable and then view it"));
9563 		return;
9564 	}
9565 
9566 	TimetableViewTeachersDaysHorizontalForm *form=new TimetableViewTeachersDaysHorizontalForm(this);
9567 	form->setWindowFlags(Qt::Window);
9568 	form->setAttribute(Qt::WA_DeleteOnClose);
9569 	forceCenterWidgetOnScreen(form);
9570 	restoreFETDialogGeometry(form);
9571 	form->show();
9572 	form->resizeRowsAfterShow();
9573 }
9574 
9575 void FetMainForm::on_timetableViewTeachersTimeHorizontalAction_triggered()
9576 {
9577 	if(!gt.rules.initialized){
9578 		QMessageBox::information(this, tr("FET information"),
9579 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9580 		return;
9581 	}
9582 
9583 	if(!(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready)){
9584 		QMessageBox::information(this, tr("FET information"), tr("Please generate, firstly"));
9585 		return;
9586 	}
9587 
9588 	if(gt.rules.nInternalRooms!=gt.rules.roomsList.count()){
9589 		QMessageBox::warning(this, tr("FET warning"), tr("Cannot display the timetable, because you added or removed some rooms. Please regenerate the timetable and then view it"));
9590 		return;
9591 	}
9592 	if(gt.rules.nInternalTeachers!=gt.rules.teachersList.count()){
9593 		QMessageBox::warning(this, tr("FET warning"), tr("Cannot display the timetable, because you added or removed some teachers. Please regenerate the timetable and then view it"));
9594 		return;
9595 	}
9596 
9597 	TimetableViewTeachersTimeHorizontalForm *form=new TimetableViewTeachersTimeHorizontalForm(this);
9598 	form->setWindowFlags(Qt::Window);
9599 	form->setAttribute(Qt::WA_DeleteOnClose);
9600 	forceCenterWidgetOnScreen(form);
9601 	restoreFETDialogGeometry(form);
9602 	form->show();
9603 	form->resizeRowsAfterShow();
9604 }
9605 
9606 void FetMainForm::on_timetableShowConflictsAction_triggered()
9607 {
9608 	if(!gt.rules.initialized){
9609 		QMessageBox::information(this, tr("FET information"),
9610 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9611 		return;
9612 	}
9613 
9614 	if(!(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready)){
9615 		QMessageBox::information(this, tr("FET information"), tr("Please generate, firstly"));
9616 		return;
9617 	}
9618 
9619 	TimetableShowConflictsForm *form=new TimetableShowConflictsForm(this);
9620 	form->setWindowFlags(Qt::Window);
9621 	form->setAttribute(Qt::WA_DeleteOnClose);
9622 	forceCenterWidgetOnScreen(form);
9623 	restoreFETDialogGeometry(form);
9624 	form->show();
9625 }
9626 
9627 void FetMainForm::on_timetableViewRoomsDaysHorizontalAction_triggered()
9628 {
9629 	if(!gt.rules.initialized){
9630 		QMessageBox::information(this, tr("FET information"),
9631 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9632 		return;
9633 	}
9634 
9635 	if(!(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready)){
9636 		QMessageBox::information(this, tr("FET information"), tr("Please generate, firstly"));
9637 		return;
9638 	}
9639 
9640 	if(gt.rules.nInternalRooms!=gt.rules.roomsList.count()){
9641 		QMessageBox::warning(this, tr("FET warning"), tr("Cannot display the timetable, because you added or removed some rooms. Please regenerate the timetable and then view it"));
9642 		return;
9643 	}
9644 
9645 	TimetableViewRoomsDaysHorizontalForm* form=new TimetableViewRoomsDaysHorizontalForm(this);
9646 	form->setWindowFlags(Qt::Window);
9647 	form->setAttribute(Qt::WA_DeleteOnClose);
9648 	forceCenterWidgetOnScreen(form);
9649 	restoreFETDialogGeometry(form);
9650 	form->show();
9651 	form->resizeRowsAfterShow();
9652 }
9653 
9654 void FetMainForm::on_timetableViewRoomsTimeHorizontalAction_triggered()
9655 {
9656 	if(!gt.rules.initialized){
9657 		QMessageBox::information(this, tr("FET information"),
9658 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9659 		return;
9660 	}
9661 
9662 	if(!(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready)){
9663 		QMessageBox::information(this, tr("FET information"), tr("Please generate, firstly"));
9664 		return;
9665 	}
9666 
9667 	if(gt.rules.nInternalRooms!=gt.rules.roomsList.count()){
9668 		QMessageBox::warning(this, tr("FET warning"), tr("Cannot display the timetable, because you added or removed some rooms. Please regenerate the timetable and then view it"));
9669 		return;
9670 	}
9671 
9672 	TimetableViewRoomsTimeHorizontalForm* form=new TimetableViewRoomsTimeHorizontalForm(this);
9673 	form->setWindowFlags(Qt::Window);
9674 	form->setAttribute(Qt::WA_DeleteOnClose);
9675 	forceCenterWidgetOnScreen(form);
9676 	restoreFETDialogGeometry(form);
9677 	form->show();
9678 	form->resizeRowsAfterShow();
9679 }
9680 
9681 void FetMainForm::on_timetablePrintAction_triggered()
9682 {
9683 	if(!gt.rules.initialized){
9684 		QMessageBox::information(this, tr("FET information"),
9685 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9686 		return;
9687 	}
9688 
9689 	if(!(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready)){
9690 		QMessageBox::information(this, tr("FET information"), tr("Please generate, firstly"));
9691 		return;
9692 	}
9693 
9694 	if(gt.rules.nInternalRooms!=gt.rules.roomsList.count()){
9695 		QMessageBox::warning(this, tr("FET warning"), tr("Cannot display the timetable, because you added or removed some rooms. Please regenerate the timetable and then view it"));
9696 		return;
9697 	}
9698 	if(gt.rules.nInternalTeachers!=gt.rules.teachersList.count()){
9699 		QMessageBox::warning(this, tr("FET warning"), tr("Cannot display the timetable, because you added or removed some teachers. Please regenerate the timetable and then view it"));
9700 		return;
9701 	}
9702 
9703 	StartTimetablePrint::startTimetablePrint(this);
9704 }
9705 
9706 void FetMainForm::on_statisticsPrintAction_triggered()
9707 {
9708 	if(!gt.rules.initialized){
9709 		QMessageBox::information(this, tr("FET information"),
9710 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9711 		return;
9712 	}
9713 
9714 	StartStatisticsPrint::startStatisticsPrint(this);
9715 }
9716 
9717 void FetMainForm::on_timetableLockAllActivitiesAction_triggered()
9718 {
9719 	if(!gt.rules.initialized){
9720 		QMessageBox::information(this, tr("FET information"),
9721 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9722 		return;
9723 	}
9724 
9725 	if(!(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready)){
9726 		QMessageBox::information(this, tr("FET information"), tr("Please generate, firstly"));
9727 		return;
9728 	}
9729 
9730 	AdvancedLockUnlockForm::lockAll(this);
9731 }
9732 
9733 void FetMainForm::on_timetableUnlockAllActivitiesAction_triggered()
9734 {
9735 	if(!gt.rules.initialized){
9736 		QMessageBox::information(this, tr("FET information"),
9737 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9738 		return;
9739 	}
9740 
9741 	if(!(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready)){
9742 		//QMessageBox::information(this, tr("FET information"), tr("Please generate, firstly"));
9743 		QMessageBox::information(this, tr("FET information"), tr("The timetable is not generated, but anyway FET will proceed now"));
9744 
9745 		AdvancedLockUnlockForm::unlockAllWithoutTimetable(this);
9746 
9747 		return;
9748 	}
9749 
9750 	//AdvancedLockUnlockForm::unlockAll(this);
9751 	AdvancedLockUnlockForm::unlockAllWithoutTimetable(this);
9752 }
9753 
9754 void FetMainForm::on_timetableLockActivitiesDayAction_triggered()
9755 {
9756 	if(!gt.rules.initialized){
9757 		QMessageBox::information(this, tr("FET information"),
9758 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9759 		return;
9760 	}
9761 
9762 	if(!(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready)){
9763 		QMessageBox::information(this, tr("FET information"), tr("Please generate, firstly"));
9764 		return;
9765 	}
9766 
9767 	AdvancedLockUnlockForm::lockDay(this);
9768 }
9769 
9770 void FetMainForm::on_timetableUnlockActivitiesDayAction_triggered()
9771 {
9772 	if(!gt.rules.initialized){
9773 		QMessageBox::information(this, tr("FET information"),
9774 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9775 		return;
9776 	}
9777 
9778 	if(!(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready)){
9779 		//QMessageBox::information(this, tr("FET information"), tr("Please generate, firstly"));
9780 		QMessageBox::information(this, tr("FET information"), tr("The timetable is not generated, but anyway FET will proceed now"));
9781 
9782 		AdvancedLockUnlockForm::unlockDayWithoutTimetable(this);
9783 
9784 		return;
9785 	}
9786 
9787 	//AdvancedLockUnlockForm::unlockDay(this);
9788 	AdvancedLockUnlockForm::unlockDayWithoutTimetable(this);
9789 }
9790 
9791 void FetMainForm::on_timetableLockActivitiesEndStudentsDayAction_triggered()
9792 {
9793 	if(!gt.rules.initialized){
9794 		QMessageBox::information(this, tr("FET information"),
9795 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9796 		return;
9797 	}
9798 
9799 	if(!(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready)){
9800 		QMessageBox::information(this, tr("FET information"), tr("Please generate, firstly"));
9801 		return;
9802 	}
9803 
9804 	AdvancedLockUnlockForm::lockEndStudentsDay(this);
9805 }
9806 
9807 void FetMainForm::on_timetableUnlockActivitiesEndStudentsDayAction_triggered()
9808 {
9809 	if(!gt.rules.initialized){
9810 		QMessageBox::information(this, tr("FET information"),
9811 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9812 		return;
9813 	}
9814 
9815 	if(!(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready)){
9816 		QMessageBox::information(this, tr("FET information"), tr("Please generate, firstly"));
9817 		return;
9818 	}
9819 
9820 	AdvancedLockUnlockForm::unlockEndStudentsDay(this);
9821 }
9822 
9823 void FetMainForm::on_timetableLockActivitiesWithASpecifiedActivityTagAction_triggered()
9824 {
9825 	if(!gt.rules.initialized){
9826 		QMessageBox::information(this, tr("FET information"),
9827 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9828 		return;
9829 	}
9830 
9831 	if(gt.rules.activityTagsList.count()==0){
9832 		QMessageBox::information(this, tr("FET information"), tr("You have no activity tags defined in your data."));
9833 		return;
9834 	}
9835 
9836 	if(!(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready)){
9837 		QMessageBox::information(this, tr("FET information"), tr("Please generate, firstly"));
9838 		return;
9839 	}
9840 
9841 	AdvancedLockUnlockForm::lockActivityTag(this);
9842 }
9843 
9844 void FetMainForm::on_timetableUnlockActivitiesWithASpecifiedActivityTagAction_triggered()
9845 {
9846 	if(!gt.rules.initialized){
9847 		QMessageBox::information(this, tr("FET information"),
9848 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
9849 		return;
9850 	}
9851 
9852 	if(gt.rules.activityTagsList.count()==0){
9853 		QMessageBox::information(this, tr("FET information"), tr("You have no activity tags defined in your data."));
9854 		return;
9855 	}
9856 
9857 	if(!(students_schedule_ready && teachers_schedule_ready && rooms_schedule_ready)){
9858 		//QMessageBox::information(this, tr("FET information"), tr("Please generate, firstly"));
9859 		QMessageBox::information(this, tr("FET information"), tr("The timetable is not generated, but anyway FET will proceed now"));
9860 
9861 		AdvancedLockUnlockForm::unlockActivityTagWithoutTimetable(this);
9862 
9863 		return;
9864 	}
9865 
9866 	//AdvancedLockUnlockForm::unlockActivityTag(this);
9867 	AdvancedLockUnlockForm::unlockActivityTagWithoutTimetable(this);
9868 }
9869 
9870 void FetMainForm::on_languageAction_triggered()
9871 {
9872 	QDialog dialog(this);
9873 	dialog.setWindowTitle(tr("Please select FET language"));
9874 
9875 	QVBoxLayout* taMainLayout=new QVBoxLayout(&dialog);
9876 
9877 	QPushButton* tapb1=new QPushButton(tr("Cancel"));
9878 	QPushButton* tapb2=new QPushButton(tr("OK"));
9879 
9880 	QHBoxLayout* buttons=new QHBoxLayout();
9881 	buttons->addStretch();
9882 	buttons->addWidget(tapb1);
9883 	buttons->addWidget(tapb2);
9884 
9885 	QComboBox* languagesComboBox=new QComboBox();
9886 
9887 	QSize tmp=languagesComboBox->minimumSizeHint();
9888 	Q_UNUSED(tmp);
9889 
9890 	QMap<QString, QString> languagesMap;
9891 	populateLanguagesMap(languagesMap);
9892 
9893 	//assert(languagesMap.count()==N_LANGUAGES);
9894 
9895 	QMap<QString, QString>::const_iterator it=languagesMap.constBegin();
9896 	int i=0;
9897 	int j=-1;
9898 	int eng=-1;
9899 	while(it!=languagesMap.constEnd()){
9900 		//languagesComboBox->addItem( it.key() + " (" + it.value() + ")" );
9901 		languagesComboBox->addItem( tr("%1 (%2)", "%1 is the international abbreviation of the language, %2 is the name of the language, untranslated")
9902 		 .arg(it.key())
9903 		 .arg(it.value()) );
9904 		if(it.key()==FET_LANGUAGE)
9905 			j=i;
9906 		if(it.key()=="en_US")
9907 			eng=i;
9908 		i++;
9909 		it++;
9910 	}
9911 
9912 	assert(eng>=0);
9913 	if(j==-1){
9914 		QMessageBox::warning(this, tr("FET warning"), tr("Invalid current language - making it en_US (US English)"));
9915 		FET_LANGUAGE="en_US";
9916 		j=eng;
9917 	}
9918 	languagesComboBox->setCurrentIndex(j);
9919 
9920 	QLabel* label=new QLabel(tr("Please select FET language"));
9921 
9922 	QHBoxLayout* languagesLayout=new QHBoxLayout();
9923 	languagesLayout->addWidget(languagesComboBox);
9924 	//languagesLayout->addStretch();
9925 
9926 	taMainLayout->addStretch();
9927 	taMainLayout->addWidget(label);
9928 	//taMainLayout->addWidget(languagesComboBox);
9929 	taMainLayout->addLayout(languagesLayout);
9930 	taMainLayout->addStretch();
9931 	taMainLayout->addLayout(buttons);
9932 
9933 	QObject::connect(tapb2, SIGNAL(clicked()), &dialog, SLOT(accept()));
9934 	QObject::connect(tapb1, SIGNAL(clicked()), &dialog, SLOT(reject()));
9935 
9936 	tapb2->setDefault(true);
9937 	tapb2->setFocus();
9938 
9939 	const QString settingsName=QString("LanguageSelectionForm");
9940 
9941 	int w=dialog.sizeHint().width();
9942 	if(w<350)
9943 		w=350;
9944 	int h=dialog.sizeHint().height();
9945 	if(h<180)
9946 		h=180;
9947 	dialog.resize(w,h);
9948 	centerWidgetOnScreen(&dialog);
9949 	restoreFETDialogGeometry(&dialog, settingsName);
9950 
9951 	setParentAndOtherThings(&dialog, this);
9952 	bool ok=dialog.exec();
9953 	saveFETDialogGeometry(&dialog, settingsName);
9954 	if(!ok)
9955 		return;
9956 
9957 	//QString newLang=languagesComboBox->currentText();
9958 	int k=languagesComboBox->currentIndex();
9959 	i=0;
9960 	bool found=false;
9961 
9962 	QMap<QString, QString>::const_iterator it2=languagesMap.constBegin();
9963 	while(it2!=languagesMap.constEnd()){
9964 		if(i==k){
9965 			FET_LANGUAGE=it2.key();
9966 			found=true;
9967 		}
9968 		i++;
9969 		it2++;
9970 	}
9971 
9972 	if(!found){
9973 		QMessageBox::warning(this, tr("FET warning"), tr("Invalid language selected - making it en_US (US English)"));
9974 		FET_LANGUAGE="en_US";
9975 	}
9976 
9977 	setLanguage(*pqapplication, this);
9978 	setCurrentFile(INPUT_FILENAME_XML);
9979 
9980 	//QMessageBox::information(this, tr("FET information"), tr("Language %1 selected").arg( FET_LANGUAGE+" ("+languagesMap.value(FET_LANGUAGE)+")" )+"\n\n"+
9981 	// tr("Please exit and restart FET to activate language change"));
9982 }
9983 
9984 void FetMainForm::on_settingsRestoreDefaultsAction_triggered()
9985 {
9986 	QString default_working_directory="examples";
9987 	QDir d2(default_working_directory);
9988 	if(!d2.exists())
9989 		default_working_directory=QDir::homePath();
9990 	else
9991 		default_working_directory=d2.absolutePath();
9992 
9993 	QString s=tr("Are you sure you want to reset all settings to defaults?");
9994 	s+="\n\n";
9995 
9996 	s+=tr("That means:");
9997 	s+="\n";
9998 
9999 	s+=tr("1")+QString(". ")+tr("The geometry and any other saved settings of all the windows and dialogs will be reset to default");
10000 	s+="\n";
10001 
10002 	s+=tr("2")+QString(". ")+tr("Show shortcut buttons in main window will be %1", "%1 is true or false").arg(tr("true"));
10003 	s+="\n";
10004 
10005 	s+=tr("3")+QString(". ")+tr("In the shortcuts tab from the main window, the first section will be selected/shown", "Option refers to the main window tab widget for shortcuts, which currently contains 5 tabs: File, Data, "
10006 		"Time, Space, Timetable (so it will select/show File tab).");
10007 	s+="\n";
10008 
10009 	s+=tr("4")+QString(". ")+tr("Check for updates at startup will be %1", "%1 is true or false").arg(tr("false"));
10010 	s+="\n";
10011 
10012 	s+=tr("5")+QString(". ")+tr("Use colors in FET graphical user interface will be %1", "%1 is true or false").arg(tr("false"));
10013 	s+="\n";
10014 
10015 #ifndef USE_SYSTEM_LOCALE
10016 	s+=tr("6")+QString(". ")+tr("Language will be %1", "%1 is the default language").arg(QString("en_US")+QString(" (")+tr("US English")+QString(")"));
10017 #else
10018 	QMap<QString, QString> languagesMap;
10019 	populateLanguagesMap(languagesMap);
10020 
10021 	QString NEW_FET_LANGUAGE=QLocale::system().name();
10022 
10023 	bool ok=false;
10024 	QMap<QString, QString>::const_iterator i=languagesMap.constBegin();
10025 	while(i!=languagesMap.constEnd()){
10026 		if(NEW_FET_LANGUAGE.left(i.key().length())==i.key()){
10027 			NEW_FET_LANGUAGE=i.key();
10028 			ok=true;
10029 			break;
10030 		}
10031 		i++;
10032 	}
10033 	if(!ok)
10034 		NEW_FET_LANGUAGE="en_US";
10035 
10036 	assert(languagesMap.contains(NEW_FET_LANGUAGE));
10037 	s+=tr("6")+QString(". ")+tr("Language will be %1", "%1 is the default language").arg(NEW_FET_LANGUAGE+QString(" (")+languagesMap.value(NEW_FET_LANGUAGE)+QString(")"));
10038 #endif
10039 	s+="\n";
10040 
10041 	s+=tr("7")+QString(". ")+tr("The list of recently used files will be cleared");
10042 	s+="\n";
10043 
10044 	s+=tr("8")+QString(". ")+tr("Working directory will be %1", "%1 is the directory").arg(QDir::toNativeSeparators(default_working_directory));
10045 	s+="\n";
10046 
10047 	s+=tr("9")+QString(". ")+tr("Output directory will be %1", "%1 is the directory").arg(QDir::toNativeSeparators(QDir::homePath()+FILE_SEP+"fet-results"));
10048 	s+="\n";
10049 
10050 	s+=tr("10")+QString(". ")+tr("Import directory will be %1", "%1 is the directory").arg(QDir::toNativeSeparators(QDir::homePath()+FILE_SEP+"fet-results"));
10051 	s+="\n";
10052 
10053 	s+=tr("11")+QString(". ")+tr("Html level of the timetables will be %1", "%1 is default html level").arg(2);
10054 	s+="\n";
10055 
10056 	s+=tr("12")+QString(". ")+tr("Mark not available slots with -x- in timetables will be %1", "%1 is true or false. Lowercase -x-").arg(tr("true"));
10057 	s+="\n";
10058 
10059 	s+=tr("13")+QString(". ")+tr("Mark break slots with -X- in timetables will be %1", "%1 is true or false. Uppercase -X-").arg(tr("true"));
10060 	s+="\n";
10061 
10062 	s+=tr("14")+QString(". ")+tr("Divide html timetables with time-axis by days will be %1", "%1 is true or false").arg(tr("false"));
10063 	s+="\n";
10064 
10065 	s+=tr("15")+QString(". ")+tr("Duplicate vertical headers to the right will be %1", "%1 is true or false").arg(tr("false"));
10066 	s+="\n";
10067 
10068 	s+=tr("16")+QString(". ")+tr("Print activities with same starting time will be %1", "%1 is true or false").arg(tr("false"));
10069 	s+="\n";
10070 
10071 	s+=tr("17")+QString(". ")+tr("Print activities tags will be %1", "%1 is true or false").arg(tr("true"));
10072 	s+="\n";
10073 
10074 	s+=tr("18")+QString(". ")+tr("Enable activity tag max hours daily will be %1", "%1 is true or false").arg(tr("false"));
10075 	s+="\n";
10076 
10077 	s+=tr("19")+QString(". ")+tr("Enable activity tag min hours daily will be %1", "%1 is true or false").arg(tr("false"));
10078 	s+="\n";
10079 
10080 	s+=tr("20")+QString(". ")+tr("Enable students max gaps per day will be %1", "%1 is true or false").arg(tr("false"));
10081 	s+="\n";
10082 
10083 	s+=tr("21")+QString(". ")+tr("Warn if using not perfect constraints will be %1", "%1 is true or false. This is a warning if user uses not perfect constraints").arg(tr("true"));
10084 	s+="\n";
10085 
10086 	s+=tr("22")+QString(". ")+tr("Enable constraints students min hours daily with empty days will be %1", "%1 is true or false").arg(tr("false"));
10087 	s+="\n";
10088 
10089 	s+=tr("23")+QString(". ")+tr("Warn if using constraints students min hours daily with empty days will be %1", "%1 is true or false. This is a warning if user uses a nonstandard constraint"
10090 		" students min hours daily with allowed empty days").arg(tr("true"));
10091 	s+="\n";
10092 
10093 	///////////////confirmations
10094 	s+=tr("24")+QString(". ")+tr("Confirm activity planning will be %1", "%1 is true or false").arg(tr("true"));
10095 	s+="\n";
10096 	s+=tr("25")+QString(". ")+tr("Confirm spread activities over the week will be %1", "%1 is true or false").arg(tr("true"));
10097 	s+="\n";
10098 	s+=tr("26")+QString(". ")+tr("Confirm remove redundant constraints will be %1", "%1 is true or false").arg(tr("true"));
10099 	s+="\n";
10100 	s+=tr("27")+QString(". ")+tr("Confirm save data and timetable as will be %1", "%1 is true or false").arg(tr("true"));
10101 	s+="\n";
10102 	///////////////
10103 
10104 	s+=tr("28")+QString(". ")+tr("Enable group activities in the initial order of generation will be %1", "%1 is true or false").arg(tr("false"));
10105 	s+="\n";
10106 	s+=tr("29")+QString(". ")+tr("Warn if using group activities in the initial order of generation will be %1", "%1 is true or false").arg(tr("true"));
10107 	s+="\n";
10108 	///////////////
10109 
10110 	s+=tr("30")+QString(". ")+tr("Show subgroups in combo boxes will be %1", "%1 is true or false").arg(tr("true"));
10111 	s+="\n";
10112 	s+=tr("31")+QString(". ")+tr("Show subgroups in activity planning will be %1", "%1 is true or false").arg(tr("true"));
10113 	s+="\n";
10114 	///////////////
10115 
10116 	s+=tr("32")+QString(". ")+tr("Write on disk the %1 timetable will be %2", "%1 is a category of timetables, like conflicts, %2 is true or false")
10117 	 .arg(tr("conflicts")).arg(tr("true"));
10118 	s+="\n";
10119 
10120 	s+=tr("33")+QString(". ")+tr("Write on disk the %1 timetables will be %2", "%1 is a category of timetables, like XML or subgroups timetables, %2 is true or false")
10121 	 .arg(tr("statistics")).arg(tr("true"));
10122 	s+="\n";
10123 	s+=tr("34")+QString(". ")+tr("Write on disk the %1 timetables will be %2", "%1 is a category of timetables, like XML or subgroups timetables, %2 is true or false")
10124 	 .arg(tr("XML")).arg(tr("true"));
10125 	s+="\n";
10126 	s+=tr("35")+QString(". ")+tr("Write on disk the %1 timetables will be %2", "%1 is a category of timetables, like XML or subgroups timetables, %2 is true or false")
10127 	 .arg(tr("days horizontal")).arg(tr("true"));
10128 	s+="\n";
10129 	s+=tr("36")+QString(". ")+tr("Write on disk the %1 timetables will be %2", "%1 is a category of timetables, like XML or subgroups timetables, %2 is true or false")
10130 	 .arg(tr("days vertical")).arg(tr("true"));
10131 	s+="\n";
10132 	s+=tr("37")+QString(". ")+tr("Write on disk the %1 timetables will be %2", "%1 is a category of timetables, like XML or subgroups timetables, %2 is true or false")
10133 	 .arg(tr("time horizontal")).arg(tr("true"));
10134 	s+="\n";
10135 	s+=tr("38")+QString(". ")+tr("Write on disk the %1 timetables will be %2", "%1 is a category of timetables, like XML or subgroups timetables, %2 is true or false")
10136 	 .arg(tr("time vertical")).arg(tr("true"));
10137 	s+="\n";
10138 
10139 	s+=tr("39")+QString(". ")+tr("Write on disk the %1 timetables will be %2", "%1 is a category of timetables, like XML or subgroups timetables, %2 is true or false")
10140 	 .arg(tr("subgroups")).arg(tr("true"));
10141 	s+="\n";
10142 	s+=tr("40")+QString(". ")+tr("Write on disk the %1 timetables will be %2", "%1 is a category of timetables, like XML or subgroups timetables, %2 is true or false")
10143 	 .arg(tr("groups")).arg(tr("true"));
10144 	s+="\n";
10145 	s+=tr("41")+QString(". ")+tr("Write on disk the %1 timetables will be %2", "%1 is a category of timetables, like XML or subgroups timetables, %2 is true or false")
10146 	 .arg(tr("years")).arg(tr("true"));
10147 	s+="\n";
10148 	s+=tr("42")+QString(". ")+tr("Write on disk the %1 timetables will be %2", "%1 is a category of timetables, like XML or subgroups timetables, %2 is true or false")
10149 	 .arg(tr("teachers")).arg(tr("true"));
10150 	s+="\n";
10151 	s+=tr("43")+QString(". ")+tr("Write on disk the %1 timetables will be %2", "%1 is a category of timetables, like XML or subgroups timetables, %2 is true or false")
10152 	 .arg(tr("teachers free periods")).arg(tr("true"));
10153 	s+="\n";
10154 	s+=tr("44")+QString(". ")+tr("Write on disk the %1 timetables will be %2", "%1 is a category of timetables, like XML or subgroups timetables, %2 is true or false")
10155 	 .arg(tr("rooms")).arg(tr("true"));
10156 	s+="\n";
10157 	s+=tr("45")+QString(". ")+tr("Write on disk the %1 timetables will be %2", "%1 is a category of timetables, like XML or subgroups timetables, %2 is true or false")
10158 	 .arg(tr("subjects")).arg(tr("true"));
10159 	s+="\n";
10160 	s+=tr("46")+QString(". ")+tr("Write on disk the %1 timetables will be %2", "%1 is a category of timetables, like XML or subgroups timetables, %2 is true or false")
10161 	 .arg(tr("activity tags")).arg(tr("true"));
10162 	s+="\n";
10163 	s+=tr("47")+QString(". ")+tr("Write on disk the %1 timetables will be %2", "%1 is a category of timetables, like XML or subgroups timetables, %2 is true or false")
10164 	 .arg(tr("activities")).arg(tr("true"));
10165 	s+="\n";
10166 	s+=tr("48")+QString(". ")+tr("Show tool tips for constraints with tables will be %1", "%1 is true or false").arg(tr("false"));
10167 	s+="\n";
10168 	s+=tr("49")+QString(". ")+tr("Show warning for subgroups with the same activities will be %1", "%1 is true or false").arg(tr("true"));
10169 	s+="\n";
10170 	s+=tr("50")+QString(". ")+tr("Print detailed timetables will be %1", "%1 is true or false").arg(tr("true"));
10171 	s+="\n";
10172 	s+=tr("51")+QString(". ")+tr("Print detailed teachers' free periods timetables will be %1", "%1 is true or false").arg(tr("true"));
10173 	s+="\n";
10174 
10175 	//Just to have them translated, in case I need them.
10176 	QString t1=tr("simple", "It is a style for students' combo boxes");
10177 	Q_UNUSED(t1);
10178 	QString t2=tr("icons", "It is a style for students' combo boxes");
10179 	Q_UNUSED(t2);
10180 	QString t3=tr("categorized", "It is a style for students' combo boxes");
10181 	Q_UNUSED(t3);
10182 
10183 	s+=tr("52")+QString(". ")+tr("Students' combo boxes style will be %1").arg(tr("simple", "It is a style for students' combo boxes"));
10184 	s+="\n";
10185 
10186 	s+=tr("53")+QString(". ")+tr("Print virtual rooms in the timetables will be %1", "%1 is true or false").arg(tr("false"));
10187 	s+="\n";
10188 
10189 	s+=tr("54")+QString(". ")+tr("Show warning for activities not locked in time but locked in space in virtual rooms specifying the"
10190 	 " real rooms will be %1", "%1 is true or false").arg(tr("true"));
10191 	s+="\n";
10192 
10193 	s+=tr("55")+QString(". ")+tr("Beep at the end of the generation will be %1, run external command at the end of generation will be %2,"
10194 	 " and the external command will be empty",
10195 	 "%1 and %2 are true or false").arg(tr("true")).arg(tr("false"));
10196 	s+="\n";
10197 
10198 	s+=tr("56")+QString(". ")+tr("Show warning if using constraints of type max hours daily with a weight less than 100%"
10199 	 " will be %1", "%1 is true or false").arg(tr("true"));
10200 	s+="\n";
10201 
10202 	s+=tr("57")+QString(". ")+tr("Enable max gaps per real day / per week for real days will be %1", "%1 is true or false").arg(tr("false"));
10203 	s+="\n";
10204 
10205 	s+=tr("58")+QString(". ")+tr("Enable constraints students min hours per morning with empty mornings will be %1", "%1 is true or false").arg(tr("false"));
10206 	s+="\n";
10207 
10208 	s+=tr("59")+QString(". ")+tr("Warn if using constraints students min hours per morning with empty mornings will be %1", "%1 is true or false. This is a warning if user uses a nonstandard constraint"
10209 		" students min hours per morning with allowed empty mornings").arg(tr("true"));
10210 	s+="\n";
10211 
10212 	s+=tr("60")+QString(". ")+tr("Write HTML timetables for subgroups in sorted order will be %1", "%1 is true or false").arg(tr("false"));
10213 	s+="\n";
10214 
10215 	switch( LongTextMessageBox::largeConfirmation( this, tr("FET confirmation"), s,
10216 	 tr("&Yes"), tr("&No"), QString(), 0 , 1 ) ) {
10217 	case 0: // Yes
10218 		break;
10219 	case 1: // No
10220 		return;
10221 	}
10222 
10223 	QSettings settings(COMPANY, PROGRAM);
10224 	settings.clear();
10225 
10226 	recentFiles.clear();
10227 	updateRecentFileActions();
10228 
10229 	setWindowState(windowState() & (~Qt::WindowMaximized));
10230 	resize(ORIGINAL_WIDTH, ORIGINAL_HEIGHT);
10231 	//move(ORIGINAL_X, ORIGINAL_Y);
10232 	forceCenterWidgetOnScreen(this);
10233 
10234 #ifndef USE_SYSTEM_LOCALE
10235 	FET_LANGUAGE=QString("en_US");
10236 #else
10237 	FET_LANGUAGE=NEW_FET_LANGUAGE;
10238 #endif
10239 
10240 	checkForUpdatesAction->setChecked(false);
10241 	checkForUpdates=false;
10242 
10243 	SHOW_SHORTCUTS_ON_MAIN_WINDOW=true;
10244 	settingsShowShortcutsOnMainWindowAction->setChecked(SHOW_SHORTCUTS_ON_MAIN_WINDOW);
10245 	tabWidget->setVisible(SHOW_SHORTCUTS_ON_MAIN_WINDOW);
10246 
10247 	tabWidget->setCurrentIndex(0);
10248 
10249 	SHOW_TOOLTIPS_FOR_CONSTRAINTS_WITH_TABLES=false;
10250 	settingsShowToolTipsForConstraintsWithTablesAction->setChecked(SHOW_TOOLTIPS_FOR_CONSTRAINTS_WITH_TABLES);
10251 
10252 	disconnect(settingsUseColorsAction, SIGNAL(toggled(bool)), this, SLOT(useColorsToggled(bool)));
10253 	USE_GUI_COLORS=false;
10254 	settingsUseColorsAction->setChecked(USE_GUI_COLORS);
10255 	connect(settingsUseColorsAction, SIGNAL(toggled(bool)), this, SLOT(useColorsToggled(bool)));
10256 
10257 	SHOW_SUBGROUPS_IN_COMBO_BOXES=true;
10258 	settingsShowSubgroupsInComboBoxesAction->setChecked(SHOW_SUBGROUPS_IN_COMBO_BOXES);
10259 
10260 	SHOW_SUBGROUPS_IN_ACTIVITY_PLANNING=true;
10261 	settingsShowSubgroupsInActivityPlanningAction->setChecked(SHOW_SUBGROUPS_IN_ACTIVITY_PLANNING);
10262 
10263 	///
10264 	TIMETABLES_SUBGROUPS_SORTED=false;
10265 
10266 	WRITE_TIMETABLE_CONFLICTS=true;
10267 
10268 	WRITE_TIMETABLES_STATISTICS=true;
10269 	WRITE_TIMETABLES_XML=true;
10270 	WRITE_TIMETABLES_DAYS_HORIZONTAL=true;
10271 	WRITE_TIMETABLES_DAYS_VERTICAL=true;
10272 	WRITE_TIMETABLES_TIME_HORIZONTAL=true;
10273 	WRITE_TIMETABLES_TIME_VERTICAL=true;
10274 
10275 	WRITE_TIMETABLES_SUBGROUPS=true;
10276 	WRITE_TIMETABLES_GROUPS=true;
10277 	WRITE_TIMETABLES_YEARS=true;
10278 	WRITE_TIMETABLES_TEACHERS=true;
10279 	WRITE_TIMETABLES_TEACHERS_FREE_PERIODS=true;
10280 	WRITE_TIMETABLES_ROOMS=true;
10281 	WRITE_TIMETABLES_SUBJECTS=true;
10282 	WRITE_TIMETABLES_ACTIVITY_TAGS=true;
10283 	WRITE_TIMETABLES_ACTIVITIES=true;
10284 
10285 	STUDENTS_COMBO_BOXES_STYLE=STUDENTS_COMBO_BOXES_STYLE_SIMPLE;
10286 	//
10287 
10288 	////////confirmations
10289 	CONFIRM_ACTIVITY_PLANNING=true;
10290 	settingsConfirmActivityPlanningAction->setChecked(CONFIRM_ACTIVITY_PLANNING);
10291 
10292 	CONFIRM_SPREAD_ACTIVITIES=true;
10293 	settingsConfirmSpreadActivitiesAction->setChecked(CONFIRM_SPREAD_ACTIVITIES);
10294 
10295 	CONFIRM_REMOVE_REDUNDANT=true;
10296 	settingsConfirmRemoveRedundantAction->setChecked(CONFIRM_REMOVE_REDUNDANT);
10297 
10298 	CONFIRM_SAVE_TIMETABLE=true;
10299 	settingsConfirmSaveTimetableAction->setChecked(CONFIRM_SAVE_TIMETABLE);
10300 	///////
10301 
10302 	///////////
10303 	SHOW_WARNING_FOR_SUBGROUPS_WITH_THE_SAME_ACTIVITIES=true;
10304 	showWarningForSubgroupsWithTheSameActivitiesAction->setChecked(SHOW_WARNING_FOR_SUBGROUPS_WITH_THE_SAME_ACTIVITIES);
10305 
10306 	SHOW_WARNING_FOR_ACTIVITIES_FIXED_SPACE_VIRTUAL_REAL_ROOMS_BUT_NOT_FIXED_TIME=true;
10307 	showWarningForActivitiesNotLockedTimeLockedSpaceVirtualRealRoomsAction->setChecked(SHOW_WARNING_FOR_ACTIVITIES_FIXED_SPACE_VIRTUAL_REAL_ROOMS_BUT_NOT_FIXED_TIME);
10308 
10309 	SHOW_WARNING_FOR_MAX_HOURS_DAILY_WITH_UNDER_100_WEIGHT=true;
10310 	showWarningForMaxHoursDailyWithUnder100WeightAction->setChecked(SHOW_WARNING_FOR_MAX_HOURS_DAILY_WITH_UNDER_100_WEIGHT);
10311 
10312 	ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY=false;
10313 	enableActivityTagMaxHoursDailyAction->setChecked(ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY);
10314 
10315 	ENABLE_ACTIVITY_TAG_MIN_HOURS_DAILY=false;
10316 	enableActivityTagMinHoursDailyAction->setChecked(ENABLE_ACTIVITY_TAG_MIN_HOURS_DAILY);
10317 
10318 	ENABLE_STUDENTS_MAX_GAPS_PER_DAY=false;
10319 	enableStudentsMaxGapsPerDayAction->setChecked(ENABLE_STUDENTS_MAX_GAPS_PER_DAY);
10320 
10321 	ENABLE_MAX_GAPS_PER_REAL_DAY=false;
10322 	disconnect(enableMaxGapsPerRealDayAction, SIGNAL(toggled(bool)), this, SLOT(enableMaxGapsPerRealDayToggled(bool)));
10323 	enableMaxGapsPerRealDayAction->setChecked(ENABLE_MAX_GAPS_PER_REAL_DAY);
10324 	connect(enableMaxGapsPerRealDayAction, SIGNAL(toggled(bool)), this, SLOT(enableMaxGapsPerRealDayToggled(bool)));
10325 
10326 	SHOW_WARNING_FOR_NOT_PERFECT_CONSTRAINTS=true;
10327 	showWarningForNotPerfectConstraintsAction->setChecked(SHOW_WARNING_FOR_NOT_PERFECT_CONSTRAINTS);
10328 
10329 	ENABLE_GROUP_ACTIVITIES_IN_INITIAL_ORDER=false;
10330 	SHOW_WARNING_FOR_GROUP_ACTIVITIES_IN_INITIAL_ORDER=true;
10331 	enableGroupActivitiesInInitialOrderAction->setChecked(ENABLE_GROUP_ACTIVITIES_IN_INITIAL_ORDER);
10332 	showWarningForGroupActivitiesInInitialOrderAction->setChecked(SHOW_WARNING_FOR_GROUP_ACTIVITIES_IN_INITIAL_ORDER);
10333 
10334 	setEnabledIcon(dataTimeConstraintsTeacherActivityTagMaxHoursDailyAction, ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY);
10335 	setEnabledIcon(dataTimeConstraintsTeachersActivityTagMaxHoursDailyAction, ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY);
10336 	setEnabledIcon(dataTimeConstraintsStudentsActivityTagMaxHoursDailyAction, ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY);
10337 	setEnabledIcon(dataTimeConstraintsStudentsSetActivityTagMaxHoursDailyAction, ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY);
10338 
10339 	setEnabledIcon(dataTimeConstraintsTeacherActivityTagMaxHoursDailyRealDaysAction, ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY);
10340 	setEnabledIcon(dataTimeConstraintsTeachersActivityTagMaxHoursDailyRealDaysAction, ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY);
10341 	setEnabledIcon(dataTimeConstraintsStudentsActivityTagMaxHoursDailyRealDaysAction, ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY);
10342 	setEnabledIcon(dataTimeConstraintsStudentsSetActivityTagMaxHoursDailyRealDaysAction, ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY);
10343 
10344 	setEnabledIcon(dataTimeConstraintsTeacherActivityTagMinHoursDailyAction, ENABLE_ACTIVITY_TAG_MIN_HOURS_DAILY);
10345 	setEnabledIcon(dataTimeConstraintsTeachersActivityTagMinHoursDailyAction, ENABLE_ACTIVITY_TAG_MIN_HOURS_DAILY);
10346 	setEnabledIcon(dataTimeConstraintsStudentsActivityTagMinHoursDailyAction, ENABLE_ACTIVITY_TAG_MIN_HOURS_DAILY);
10347 	setEnabledIcon(dataTimeConstraintsStudentsSetActivityTagMinHoursDailyAction, ENABLE_ACTIVITY_TAG_MIN_HOURS_DAILY);
10348 
10349 	setEnabledIcon(dataTimeConstraintsStudentsSetMaxGapsPerDayAction, ENABLE_STUDENTS_MAX_GAPS_PER_DAY);
10350 	setEnabledIcon(dataTimeConstraintsStudentsMaxGapsPerDayAction, ENABLE_STUDENTS_MAX_GAPS_PER_DAY);
10351 
10352 	setEnabledIcon(dataTimeConstraintsStudentsSetMaxGapsPerRealDayAction, ENABLE_MAX_GAPS_PER_REAL_DAY);
10353 	setEnabledIcon(dataTimeConstraintsStudentsMaxGapsPerRealDayAction, ENABLE_MAX_GAPS_PER_REAL_DAY);
10354 	setEnabledIcon(dataTimeConstraintsTeachersMaxGapsPerRealDayAction, ENABLE_MAX_GAPS_PER_REAL_DAY);
10355 	setEnabledIcon(dataTimeConstraintsTeacherMaxGapsPerRealDayAction, ENABLE_MAX_GAPS_PER_REAL_DAY);
10356 
10357 	setEnabledIcon(dataTimeConstraintsStudentsSetMaxGapsPerWeekForRealDaysAction, ENABLE_MAX_GAPS_PER_REAL_DAY);
10358 	setEnabledIcon(dataTimeConstraintsStudentsMaxGapsPerWeekForRealDaysAction, ENABLE_MAX_GAPS_PER_REAL_DAY);
10359 	setEnabledIcon(dataTimeConstraintsTeachersMaxGapsPerWeekForRealDaysAction, ENABLE_MAX_GAPS_PER_REAL_DAY);
10360 	setEnabledIcon(dataTimeConstraintsTeacherMaxGapsPerWeekForRealDaysAction, ENABLE_MAX_GAPS_PER_REAL_DAY);
10361 
10362 	setEnabledIcon(groupActivitiesInInitialOrderAction, ENABLE_GROUP_ACTIVITIES_IN_INITIAL_ORDER);
10363 
10364 	ENABLE_STUDENTS_MIN_HOURS_DAILY_WITH_ALLOW_EMPTY_DAYS=false;
10365 	disconnect(enableStudentsMinHoursDailyWithAllowEmptyDaysAction, SIGNAL(toggled(bool)), this, SLOT(enableStudentsMinHoursDailyWithAllowEmptyDaysToggled(bool)));
10366 	enableStudentsMinHoursDailyWithAllowEmptyDaysAction->setChecked(ENABLE_STUDENTS_MIN_HOURS_DAILY_WITH_ALLOW_EMPTY_DAYS);
10367 	connect(enableStudentsMinHoursDailyWithAllowEmptyDaysAction, SIGNAL(toggled(bool)), this, SLOT(enableStudentsMinHoursDailyWithAllowEmptyDaysToggled(bool)));
10368 
10369 	SHOW_WARNING_FOR_STUDENTS_MIN_HOURS_DAILY_WITH_ALLOW_EMPTY_DAYS=true;
10370 	disconnect(showWarningForStudentsMinHoursDailyWithAllowEmptyDaysAction, SIGNAL(toggled(bool)), this, SLOT(showWarningForStudentsMinHoursDailyWithAllowEmptyDaysToggled(bool)));
10371 	showWarningForStudentsMinHoursDailyWithAllowEmptyDaysAction->setChecked(SHOW_WARNING_FOR_STUDENTS_MIN_HOURS_DAILY_WITH_ALLOW_EMPTY_DAYS);
10372 	connect(showWarningForStudentsMinHoursDailyWithAllowEmptyDaysAction, SIGNAL(toggled(bool)), this, SLOT(showWarningForStudentsMinHoursDailyWithAllowEmptyDaysToggled(bool)));
10373 
10374 	ENABLE_STUDENTS_MIN_HOURS_PER_MORNING_WITH_ALLOW_EMPTY_MORNINGS=false;
10375 	disconnect(enableStudentsMinHoursPerMorningWithAllowEmptyMorningsAction, SIGNAL(toggled(bool)), this, SLOT(enableStudentsMinHoursPerMorningWithAllowEmptyMorningsToggled(bool)));
10376 	enableStudentsMinHoursPerMorningWithAllowEmptyMorningsAction->setChecked(ENABLE_STUDENTS_MIN_HOURS_PER_MORNING_WITH_ALLOW_EMPTY_MORNINGS);
10377 	connect(enableStudentsMinHoursPerMorningWithAllowEmptyMorningsAction, SIGNAL(toggled(bool)), this, SLOT(enableStudentsMinHoursPerMorningWithAllowEmptyMorningsToggled(bool)));
10378 
10379 	SHOW_WARNING_FOR_STUDENTS_MIN_HOURS_PER_MORNING_WITH_ALLOW_EMPTY_MORNINGS=true;
10380 	disconnect(showWarningForStudentsMinHoursPerMorningWithAllowEmptyMorningsAction, SIGNAL(toggled(bool)), this, SLOT(showWarningForStudentsMinHoursPerMorningWithAllowEmptyMorningsToggled(bool)));
10381 	showWarningForStudentsMinHoursPerMorningWithAllowEmptyMorningsAction->setChecked(SHOW_WARNING_FOR_STUDENTS_MIN_HOURS_PER_MORNING_WITH_ALLOW_EMPTY_MORNINGS);
10382 	connect(showWarningForStudentsMinHoursPerMorningWithAllowEmptyMorningsAction, SIGNAL(toggled(bool)), this, SLOT(showWarningForStudentsMinHoursPerMorningWithAllowEmptyMorningsToggled(bool)));
10383 
10384 	///////////
10385 
10386 	settingsDivideTimetablesByDaysAction->setChecked(false);
10387 	DIVIDE_HTML_TIMETABLES_WITH_TIME_AXIS_BY_DAYS=false;
10388 
10389 	settingsDuplicateVerticalNamesAction->setChecked(false);
10390 	TIMETABLE_HTML_REPEAT_NAMES=false;
10391 
10392 	WORKING_DIRECTORY=default_working_directory;
10393 
10394 	OUTPUT_DIR=QDir::homePath()+FILE_SEP+"fet-results";
10395 	QDir dir;
10396 	if(!dir.exists(OUTPUT_DIR))
10397 		dir.mkpath(OUTPUT_DIR);
10398 	IMPORT_DIRECTORY=OUTPUT_DIR;
10399 
10400 	TIMETABLE_HTML_LEVEL=2;
10401 
10402 	settingsPrintActivityTagsAction->setChecked(true);
10403 	TIMETABLE_HTML_PRINT_ACTIVITY_TAGS=true;
10404 
10405 	settingsPrintDetailedTimetablesAction->setChecked(true);
10406 	PRINT_DETAILED_HTML_TIMETABLES=true;
10407 	settingsPrintDetailedTeachersFreePeriodsTimetablesAction->setChecked(true);
10408 	PRINT_DETAILED_HTML_TEACHERS_FREE_PERIODS=true;
10409 
10410 	settingsPrintNotAvailableSlotsAction->setChecked(true);
10411 	PRINT_NOT_AVAILABLE_TIME_SLOTS=true;
10412 
10413 	settingsPrintBreakSlotsAction->setChecked(true);
10414 	PRINT_BREAK_TIME_SLOTS=true;
10415 
10416 	settingsPrintActivitiesWithSameStartingTimeAction->setChecked(false);
10417 	PRINT_ACTIVITIES_WITH_SAME_STARTING_TIME=false;
10418 
10419 	settingsShowVirtualRoomsInTimetablesAction->setChecked(false);
10420 	SHOW_VIRTUAL_ROOMS_IN_TIMETABLES=false;
10421 
10422 	settingsOrderSubgroupsInTimetablesAction->setChecked(false);
10423 	TIMETABLES_SUBGROUPS_SORTED=false;
10424 
10425 	BEEP_AT_END_OF_GENERATION=true;
10426 	ENABLE_COMMAND_AT_END_OF_GENERATION=false;
10427 	commandAtEndOfGeneration=QString("");
10428 //	DETACHED_NOTIFICATION=false;
10429 //	terminateCommandAfterSeconds=0;
10430 //	killCommandAfterSeconds=0;
10431 
10432 	setLanguage(*pqapplication, this);
10433 	setCurrentFile(INPUT_FILENAME_XML);
10434 
10435 	if(teachers_schedule_ready && students_schedule_ready && rooms_schedule_ready)
10436 		LockUnlock::increaseCommunicationSpinBox(); //for GUI colors in timetables
10437 }
10438 
10439 void FetMainForm::on_settingsTimetableHtmlLevelAction_triggered()
10440 {
10441 	if(simulation_running || simulation_running_multi){
10442 		QMessageBox::information(this, tr("FET information"),
10443 			tr("Allocation in course.\nPlease stop simulation before this."));
10444 		return;
10445 	}
10446 
10447 	SettingsTimetableHtmlLevelForm form(this);
10448 	setParentAndOtherThings(&form, this);
10449 	form.exec();
10450 }
10451 
10452 void FetMainForm::on_settingsPrintActivityTagsAction_toggled()
10453 {
10454 	TIMETABLE_HTML_PRINT_ACTIVITY_TAGS=settingsPrintActivityTagsAction->isChecked();
10455 }
10456 
10457 void FetMainForm::on_settingsShowVirtualRoomsInTimetablesAction_toggled()
10458 {
10459 	SHOW_VIRTUAL_ROOMS_IN_TIMETABLES=settingsShowVirtualRoomsInTimetablesAction->isChecked();
10460 }
10461 
10462 void FetMainForm::on_settingsOrderSubgroupsInTimetablesAction_toggled()
10463 {
10464 	TIMETABLES_SUBGROUPS_SORTED=settingsOrderSubgroupsInTimetablesAction->isChecked();
10465 }
10466 
10467 void FetMainForm::on_settingsPrintDetailedTimetablesAction_toggled()
10468 {
10469 	PRINT_DETAILED_HTML_TIMETABLES=settingsPrintDetailedTimetablesAction->isChecked();
10470 }
10471 
10472 void FetMainForm::on_settingsPrintDetailedTeachersFreePeriodsTimetablesAction_toggled()
10473 {
10474 	PRINT_DETAILED_HTML_TEACHERS_FREE_PERIODS=settingsPrintDetailedTeachersFreePeriodsTimetablesAction->isChecked();
10475 }
10476 
10477 void FetMainForm::on_settingsPrintNotAvailableSlotsAction_toggled()
10478 {
10479 	PRINT_NOT_AVAILABLE_TIME_SLOTS=settingsPrintNotAvailableSlotsAction->isChecked();
10480 }
10481 
10482 void FetMainForm::on_settingsPrintBreakSlotsAction_toggled()
10483 {
10484 	PRINT_BREAK_TIME_SLOTS=settingsPrintBreakSlotsAction->isChecked();
10485 }
10486 
10487 void FetMainForm::on_settingsPrintActivitiesWithSameStartingTimeAction_toggled()
10488 {
10489 	PRINT_ACTIVITIES_WITH_SAME_STARTING_TIME=settingsPrintActivitiesWithSameStartingTimeAction->isChecked();
10490 }
10491 
10492 void FetMainForm::on_settingsCommandAfterFinishingAction_triggered()
10493 {
10494 	NotificationCommandForm form(this);
10495 	setParentAndOtherThings(&form, this);
10496 	form.exec();
10497 }
10498 
10499 void FetMainForm::on_activityPlanningAction_triggered()
10500 {
10501 	if(!gt.rules.initialized){
10502 		QMessageBox::information(this, tr("FET information"),
10503 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
10504 		return;
10505 	}
10506 
10507 	if(simulation_running || simulation_running_multi){
10508 		QMessageBox::information(this, tr("FET information"),
10509 			tr("Allocation in course.\nPlease stop simulation before this."));
10510 		return;
10511 	}
10512 
10513 	if(CONFIRM_ACTIVITY_PLANNING){
10514 		int confirm;
10515 
10516 		ActivityPlanningConfirmationForm c_form(this);
10517 		setParentAndOtherThings(&c_form, this);
10518 		confirm=c_form.exec();
10519 
10520 		if(confirm==QDialog::Accepted){
10521 			if(c_form.dontShowAgain)
10522 				settingsConfirmActivityPlanningAction->setChecked(false);
10523 
10524 			StartActivityPlanning::startActivityPlanning(&c_form);
10525 		}
10526 	}
10527 	else{
10528 		StartActivityPlanning::startActivityPlanning(this);
10529 	}
10530 }
10531 
10532 void FetMainForm::on_spreadActivitiesAction_triggered()
10533 {
10534 	if(!gt.rules.initialized){
10535 		QMessageBox::information(this, tr("FET information"),
10536 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
10537 		return;
10538 	}
10539 
10540 	if(simulation_running || simulation_running_multi){
10541 		QMessageBox::information(this, tr("FET information"),
10542 			tr("Allocation in course.\nPlease stop simulation before this."));
10543 		return;
10544 	}
10545 
10546 	if(gt.rules.mode!=MORNINGS_AFTERNOONS && gt.rules.nDaysPerWeek>=7){
10547 		QString s;
10548 		s=tr("You have more than 6 days per week, so probably you won't need this feature. Do you still want to continue?");
10549 
10550 		/*int cfrm=0;
10551 		switch( QMessageBox::question( this, tr("FET question"),
10552 		 s,
10553 		 tr("&Continue"), tr("&Cancel"), 0 , 1 ) ) {
10554 		case 0: // Yes - continue
10555 			cfrm=1;
10556 			break;
10557 		case 1: // No - cancel
10558 			cfrm=0;
10559 			break;
10560 		}
10561 
10562 		if(!cfrm){
10563 			return;
10564 		}*/
10565 		QMessageBox::StandardButton cfrm=QMessageBox::question( this, tr("FET question"), s, QMessageBox::Yes | QMessageBox::Cancel);
10566 		if(cfrm==QMessageBox::Cancel)
10567 			return;
10568 	}
10569 	else if(gt.rules.mode==MORNINGS_AFTERNOONS && gt.rules.nDaysPerWeek/2>=7){
10570 		QString s;
10571 		s=tr("You have more than 6 real days per week, so probably you won't need this feature. Do you still want to continue?");
10572 
10573 		/*int cfrm=0;
10574 		switch( QMessageBox::question( this, tr("FET question"),
10575 		 s,
10576 		 tr("&Continue"), tr("&Cancel"), 0 , 1 ) ) {
10577 		case 0: // Yes - continue
10578 			cfrm=1;
10579 			break;
10580 		case 1: // No - cancel
10581 			cfrm=0;
10582 			break;
10583 		}
10584 
10585 		if(!cfrm){
10586 			return;
10587 		}*/
10588 		QMessageBox::StandardButton cfrm=QMessageBox::question( this, tr("FET question"), s, QMessageBox::Yes | QMessageBox::Cancel);
10589 		if(cfrm==QMessageBox::Cancel)
10590 			return;
10591 	}
10592 
10593 	if(gt.rules.mode!=MORNINGS_AFTERNOONS && gt.rules.nDaysPerWeek<=4){
10594 		QString s;
10595 		s=tr("You have less than 5 days per week, so probably you won't need this feature. Do you still want to continue?");
10596 
10597 		/*int cfrm=0;
10598 		switch( QMessageBox::question( this, tr("FET question"),
10599 		 s,
10600 		 tr("&Continue"), tr("&Cancel"), 0 , 1 ) ) {
10601 		case 0: // Yes - continue
10602 			cfrm=1;
10603 			break;
10604 		case 1: // No - cancel
10605 			cfrm=0;
10606 			break;
10607 		}
10608 
10609 		if(!cfrm){
10610 			return;
10611 		}*/
10612 		QMessageBox::StandardButton cfrm=QMessageBox::question( this, tr("FET question"), s, QMessageBox::Yes | QMessageBox::Cancel);
10613 		if(cfrm==QMessageBox::Cancel)
10614 			return;
10615 	}
10616 	else if(gt.rules.mode==MORNINGS_AFTERNOONS && gt.rules.nDaysPerWeek/2<=4){
10617 		QString s;
10618 		s=tr("You have less than 5 real days per week, so probably you won't need this feature. Do you still want to continue?");
10619 
10620 		/*int cfrm=0;
10621 		switch( QMessageBox::question( this, tr("FET question"),
10622 		 s,
10623 		 tr("&Continue"), tr("&Cancel"), 0 , 1 ) ) {
10624 		case 0: // Yes - continue
10625 			cfrm=1;
10626 			break;
10627 		case 1: // No - cancel
10628 			cfrm=0;
10629 			break;
10630 		}
10631 
10632 		if(!cfrm){
10633 			return;
10634 		}*/
10635 		QMessageBox::StandardButton cfrm=QMessageBox::question( this, tr("FET question"), s, QMessageBox::Yes | QMessageBox::Cancel);
10636 		if(cfrm==QMessageBox::Cancel)
10637 			return;
10638 	}
10639 
10640 	if(CONFIRM_SPREAD_ACTIVITIES){
10641 		int confirm;
10642 
10643 		SpreadConfirmationForm c_form(this);
10644 		setParentAndOtherThings(&c_form, this);
10645 		confirm=c_form.exec();
10646 
10647 		if(confirm==QDialog::Accepted){
10648 			if(c_form.dontShowAgain)
10649 				settingsConfirmSpreadActivitiesAction->setChecked(false);
10650 
10651 			SpreadMinDaysConstraintsFiveDaysForm form(&c_form);
10652 			setParentAndOtherThings(&form, &c_form);
10653 			form.exec();
10654 		}
10655 	}
10656 	else{
10657 		SpreadMinDaysConstraintsFiveDaysForm form(this);
10658 		setParentAndOtherThings(&form, this);
10659 		form.exec();
10660 	}
10661 }
10662 
10663 void FetMainForm::on_statisticsExportToDiskAction_triggered()
10664 {
10665 	if(!gt.rules.initialized){
10666 		QMessageBox::information(this, tr("FET information"),
10667 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
10668 		return;
10669 	}
10670 
10671 	if(simulation_running || simulation_running_multi){
10672 		QMessageBox::information(this, tr("FET information"),
10673 			tr("Allocation in course.\nPlease stop simulation before this."));
10674 		return;
10675 	}
10676 
10677 	StatisticsExport::exportStatistics(this);
10678 }
10679 
10680 void FetMainForm::on_removeRedundantConstraintsAction_triggered()
10681 {
10682 	if(!gt.rules.initialized){
10683 		QMessageBox::information(this, tr("FET information"),
10684 			tr("Please start a new file or open an existing one before accessing/modifying/saving/exporting the data."));
10685 		return;
10686 	}
10687 
10688 	if(simulation_running || simulation_running_multi){
10689 		QMessageBox::information(this, tr("FET information"),
10690 			tr("Allocation in course.\nPlease stop simulation before this."));
10691 		return;
10692 	}
10693 
10694 	if(CONFIRM_REMOVE_REDUNDANT){
10695 		int confirm;
10696 
10697 		RemoveRedundantConfirmationForm c_form(this);
10698 		setParentAndOtherThings(&c_form, this);
10699 		confirm=c_form.exec();
10700 
10701 		if(confirm==QDialog::Accepted){
10702 			if(c_form.dontShowAgain)
10703 				settingsConfirmRemoveRedundantAction->setChecked(false);
10704 
10705 			RemoveRedundantForm form(&c_form);
10706 			setParentAndOtherThings(&form, &c_form);
10707 			form.exec();
10708 		}
10709 	}
10710 	else{
10711 		RemoveRedundantForm form(this);
10712 		setParentAndOtherThings(&form, this);
10713 		form.exec();
10714 	}
10715 }
10716 
10717 void FetMainForm::on_selectOutputDirAction_triggered()
10718 {
10719 	QString od;
10720 
10721 	od = QFileDialog::getExistingDirectory(this, tr("Choose results (output) directory"), OUTPUT_DIR);
10722 
10723 	if(!od.isNull()){
10724 		QFile test(od+FILE_SEP+"test_write_permissions_3.tmp");
10725 		bool existedBefore=test.exists();
10726 		bool t=test.open(QIODevice::ReadWrite);
10727 		//if(!test.exists())
10728 		//	t=false;
10729 		if(!t){
10730 			QMessageBox::warning(this, tr("FET warning"), tr("You don't have write permissions in this directory"));
10731 			return;
10732 		}
10733 		test.close();
10734 		if(!existedBefore)
10735 			test.remove();
10736 
10737 		OUTPUT_DIR=od;
10738 	}
10739 }
10740 
10741 void FetMainForm::on_randomSeedAction_triggered()
10742 {
10743 	RandomSeedForm dialog(this);
10744 
10745 	setParentAndOtherThings(&dialog, this);
10746 	/*int te=*/
10747 	dialog.exec();
10748 
10749 	/*if(te==QDialog::Accepted){
10750 		int tx=dialog.lineEditX->text().toInt();
10751 		if(!(tx>=1 && tx<MM)){
10752 			assert(0);
10753 			//QMessageBox::warning(this, tr("FET warning"), tr("The random seed X component must be at least %1 and at most %2").arg(1).arg(MM-1));
10754 			//return;
10755 		}
10756 
10757 		int ty=dialog.lineEditY->text().toInt();
10758 		if(!(ty>=1 && ty<MMM)){
10759 			assert(0);
10760 			//QMessageBox::warning(this, tr("FET warning"), tr("The random seed Y component must be at least %1 and at most %2").arg(1).arg(MMM-1));
10761 			//return;
10762 		}
10763 
10764 		XX=tx;
10765 		YY=ty;
10766 	}*/
10767 }
10768 
10769 void FetMainForm::enableActivityTagMaxHoursDailyToggled(bool checked)
10770 {
10771 	if(checked==true){
10772 		QString s=tr("These kinds of constraints are good, but not perfectly optimized. Adding such constraints may make your"
10773 		 " timetable solve too slow or even impossible.");
10774 		s+=" ";
10775 		s+=tr("It is recommended to use such constraints only at the end, after you generated successfully with all the other constraints.");
10776 		s+="\n\n";
10777 		s+=tr("If your timetable is too difficult, it may be from these kinds of constraints, so you may need to remove them and retry.");
10778 		s+="\n\n";
10779 		s+=tr("Continue only if you know what you are doing.");
10780 
10781 		QMessageBox::StandardButton b=QMessageBox::warning(this, tr("FET warning"), s, QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok);
10782 
10783 		if(b!=QMessageBox::Ok){
10784 			disconnect(enableActivityTagMaxHoursDailyAction, SIGNAL(toggled(bool)), this, SLOT(enableActivityTagMaxHoursDailyToggled(bool)));
10785 			enableActivityTagMaxHoursDailyAction->setChecked(false);
10786 			connect(enableActivityTagMaxHoursDailyAction, SIGNAL(toggled(bool)), this, SLOT(enableActivityTagMaxHoursDailyToggled(bool)));
10787 			return;
10788 		}
10789 	}
10790 
10791 	ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY=checked;
10792 
10793 	setEnabledIcon(dataTimeConstraintsTeacherActivityTagMaxHoursDailyAction, ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY);
10794 	setEnabledIcon(dataTimeConstraintsTeachersActivityTagMaxHoursDailyAction, ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY);
10795 	setEnabledIcon(dataTimeConstraintsStudentsActivityTagMaxHoursDailyAction, ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY);
10796 	setEnabledIcon(dataTimeConstraintsStudentsSetActivityTagMaxHoursDailyAction, ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY);
10797 
10798 	setEnabledIcon(dataTimeConstraintsTeacherActivityTagMaxHoursDailyRealDaysAction, ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY);
10799 	setEnabledIcon(dataTimeConstraintsTeachersActivityTagMaxHoursDailyRealDaysAction, ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY);
10800 	setEnabledIcon(dataTimeConstraintsStudentsActivityTagMaxHoursDailyRealDaysAction, ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY);
10801 	setEnabledIcon(dataTimeConstraintsStudentsSetActivityTagMaxHoursDailyRealDaysAction, ENABLE_ACTIVITY_TAG_MAX_HOURS_DAILY);
10802 }
10803 
10804 void FetMainForm::enableActivityTagMinHoursDailyToggled(bool checked)
10805 {
10806 	if(checked==true){
10807 		QString s=tr("These kinds of constraints are good, but not perfectly optimized. Adding such constraints may make your"
10808 		 " timetable solve too slow or even impossible.");
10809 		s+=" ";
10810 		s+=tr("It is recommended to use such constraints only at the end, after you generated successfully with all the other constraints.");
10811 		s+="\n\n";
10812 		s+=tr("If your timetable is too difficult, it may be from these kinds of constraints, so you may need to remove them and retry.");
10813 		s+="\n\n";
10814 		s+=tr("Continue only if you know what you are doing.");
10815 
10816 		QMessageBox::StandardButton b=QMessageBox::warning(this, tr("FET warning"), s, QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok);
10817 
10818 		if(b!=QMessageBox::Ok){
10819 			disconnect(enableActivityTagMinHoursDailyAction, SIGNAL(toggled(bool)), this, SLOT(enableActivityTagMinHoursDailyToggled(bool)));
10820 			enableActivityTagMinHoursDailyAction->setChecked(false);
10821 			connect(enableActivityTagMinHoursDailyAction, SIGNAL(toggled(bool)), this, SLOT(enableActivityTagMinHoursDailyToggled(bool)));
10822 			return;
10823 		}
10824 	}
10825 
10826 	ENABLE_ACTIVITY_TAG_MIN_HOURS_DAILY=checked;
10827 
10828 	setEnabledIcon(dataTimeConstraintsTeacherActivityTagMinHoursDailyAction, ENABLE_ACTIVITY_TAG_MIN_HOURS_DAILY);
10829 	setEnabledIcon(dataTimeConstraintsTeachersActivityTagMinHoursDailyAction, ENABLE_ACTIVITY_TAG_MIN_HOURS_DAILY);
10830 	setEnabledIcon(dataTimeConstraintsStudentsActivityTagMinHoursDailyAction, ENABLE_ACTIVITY_TAG_MIN_HOURS_DAILY);
10831 	setEnabledIcon(dataTimeConstraintsStudentsSetActivityTagMinHoursDailyAction, ENABLE_ACTIVITY_TAG_MIN_HOURS_DAILY);
10832 }
10833 
10834 void FetMainForm::enableStudentsMaxGapsPerDayToggled(bool checked)
10835 {
10836 	if(checked==true){
10837 		QString s=tr("These kinds of constraints are good, but not perfectly optimized. Adding such constraints may make your"
10838 		 " timetable solve too slow or even impossible.");
10839 		s+=" ";
10840 		s+=tr("It is recommended to use such constraints only at the end, after you generated successfully with all the other constraints.");
10841 		s+="\n\n";
10842 		s+=tr("If your timetable is too difficult, it may be from these kinds of constraints, so you may need to remove them and retry.");
10843 		s+="\n\n";
10844 		s+=tr("Continue only if you know what you are doing.");
10845 
10846 		QMessageBox::StandardButton b=QMessageBox::warning(this, tr("FET warning"), s, QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok);
10847 
10848 		if(b!=QMessageBox::Ok){
10849 			disconnect(enableStudentsMaxGapsPerDayAction, SIGNAL(toggled(bool)), this, SLOT(enableStudentsMaxGapsPerDayToggled(bool)));
10850 			enableStudentsMaxGapsPerDayAction->setChecked(false);
10851 			connect(enableStudentsMaxGapsPerDayAction, SIGNAL(toggled(bool)), this, SLOT(enableStudentsMaxGapsPerDayToggled(bool)));
10852 			return;
10853 		}
10854 	}
10855 
10856 	ENABLE_STUDENTS_MAX_GAPS_PER_DAY=checked;
10857 
10858 	setEnabledIcon(dataTimeConstraintsStudentsSetMaxGapsPerDayAction, ENABLE_STUDENTS_MAX_GAPS_PER_DAY);
10859 	setEnabledIcon(dataTimeConstraintsStudentsMaxGapsPerDayAction, ENABLE_STUDENTS_MAX_GAPS_PER_DAY);
10860 }
10861 
10862 void FetMainForm::enableMaxGapsPerRealDayToggled(bool checked)
10863 {
10864 	assert(gt.rules.mode==MORNINGS_AFTERNOONS);
10865 	if(checked==true){
10866 		QString s=tr("These kinds of constraints are good, but not perfectly optimized. Adding such constraints may make your"
10867 		 " timetable solve too slow or even impossible.");
10868 		s+=" ";
10869 		s+=tr("It is recommended to use such constraints only at the end, after you generated successfully with all the other constraints.");
10870 		s+="\n\n";
10871 		s+=tr("If your timetable is too difficult, it may be from these kinds of constraints, so you may need to remove them and retry.");
10872 		s+="\n\n";
10873 		s+=tr("Continue only if you know what you are doing.");
10874 
10875 		QMessageBox::StandardButton b=QMessageBox::warning(this, tr("FET warning"), s, QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok);
10876 
10877 		if(b!=QMessageBox::Ok){
10878 			disconnect(enableMaxGapsPerRealDayAction, SIGNAL(toggled(bool)), this, SLOT(enableMaxGapsPerRealDayToggled(bool)));
10879 			enableMaxGapsPerRealDayAction->setChecked(false);
10880 			connect(enableMaxGapsPerRealDayAction, SIGNAL(toggled(bool)), this, SLOT(enableMaxGapsPerRealDayToggled(bool)));
10881 			return;
10882 		}
10883 	}
10884 
10885 	ENABLE_MAX_GAPS_PER_REAL_DAY=checked;
10886 
10887 	setEnabledIcon(dataTimeConstraintsStudentsSetMaxGapsPerRealDayAction, ENABLE_MAX_GAPS_PER_REAL_DAY);
10888 	setEnabledIcon(dataTimeConstraintsStudentsMaxGapsPerRealDayAction, ENABLE_MAX_GAPS_PER_REAL_DAY);
10889 	setEnabledIcon(dataTimeConstraintsTeachersMaxGapsPerRealDayAction, ENABLE_MAX_GAPS_PER_REAL_DAY);
10890 	setEnabledIcon(dataTimeConstraintsTeacherMaxGapsPerRealDayAction, ENABLE_MAX_GAPS_PER_REAL_DAY);
10891 
10892 	setEnabledIcon(dataTimeConstraintsStudentsSetMaxGapsPerWeekForRealDaysAction, ENABLE_MAX_GAPS_PER_REAL_DAY);
10893 	setEnabledIcon(dataTimeConstraintsStudentsMaxGapsPerWeekForRealDaysAction, ENABLE_MAX_GAPS_PER_REAL_DAY);
10894 	setEnabledIcon(dataTimeConstraintsTeachersMaxGapsPerWeekForRealDaysAction, ENABLE_MAX_GAPS_PER_REAL_DAY);
10895 	setEnabledIcon(dataTimeConstraintsTeacherMaxGapsPerWeekForRealDaysAction, ENABLE_MAX_GAPS_PER_REAL_DAY);
10896 }
10897 
10898 void FetMainForm::showWarningForSubgroupsWithTheSameActivitiesToggled(bool checked)
10899 {
10900 	if(checked==false){
10901 		QString s=tr("It is recommended to keep this warning active, but if you really want, you can disable it.");
10902 		s+="\n\n";
10903 		s+=tr("Disable it only if you know what you are doing.");
10904 		s+="\n\n";
10905 		s+=tr("Are you sure you want to disable it?");
10906 
10907 		QMessageBox::StandardButton b=QMessageBox::warning(this, tr("FET warning"), s, QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Yes);
10908 
10909 		if(b!=QMessageBox::Yes){
10910 			disconnect(showWarningForSubgroupsWithTheSameActivitiesAction, SIGNAL(toggled(bool)), this, SLOT(showWarningForSubgroupsWithTheSameActivitiesToggled(bool)));
10911 			showWarningForSubgroupsWithTheSameActivitiesAction->setChecked(true);
10912 			connect(showWarningForSubgroupsWithTheSameActivitiesAction, SIGNAL(toggled(bool)), this, SLOT(showWarningForSubgroupsWithTheSameActivitiesToggled(bool)));
10913 			return;
10914 		}
10915 	}
10916 
10917 	SHOW_WARNING_FOR_SUBGROUPS_WITH_THE_SAME_ACTIVITIES=checked;
10918 }
10919 
10920 void FetMainForm::showWarningForActivitiesNotLockedTimeLockedSpaceVirtualRealRoomsToggled(bool checked)
10921 {
10922 	if(checked==false){
10923 		QString s=tr("It is recommended to keep this warning active, but if you really want, you can disable it.");
10924 		s+="\n\n";
10925 		s+=tr("Disable it only if you know what you are doing.");
10926 		s+="\n\n";
10927 		s+=tr("Are you sure you want to disable it?");
10928 
10929 		QMessageBox::StandardButton b=QMessageBox::warning(this, tr("FET warning"), s, QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Yes);
10930 
10931 		if(b!=QMessageBox::Yes){
10932 			disconnect(showWarningForActivitiesNotLockedTimeLockedSpaceVirtualRealRoomsAction, SIGNAL(toggled(bool)), this, SLOT(showWarningForActivitiesNotLockedTimeLockedSpaceVirtualRealRoomsToggled(bool)));
10933 			showWarningForActivitiesNotLockedTimeLockedSpaceVirtualRealRoomsAction->setChecked(true);
10934 			connect(showWarningForActivitiesNotLockedTimeLockedSpaceVirtualRealRoomsAction, SIGNAL(toggled(bool)), this, SLOT(showWarningForActivitiesNotLockedTimeLockedSpaceVirtualRealRoomsToggled(bool)));
10935 			return;
10936 		}
10937 	}
10938 
10939 	SHOW_WARNING_FOR_ACTIVITIES_FIXED_SPACE_VIRTUAL_REAL_ROOMS_BUT_NOT_FIXED_TIME=checked;
10940 }
10941 
10942 void FetMainForm::showWarningForMaxHoursDailyWithUnder100WeightToggled(bool checked)
10943 {
10944 	if(checked==false){
10945 		QString s=tr("It is recommended to keep this warning active, but if you really want, you can disable it.");
10946 		s+="\n\n";
10947 		s+=tr("Disable it only if you know what you are doing.");
10948 		s+="\n\n";
10949 		s+=tr("Are you sure you want to disable it?");
10950 
10951 		QMessageBox::StandardButton b=QMessageBox::warning(this, tr("FET warning"), s, QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Yes);
10952 
10953 		if(b!=QMessageBox::Yes){
10954 			disconnect(showWarningForMaxHoursDailyWithUnder100WeightAction, SIGNAL(toggled(bool)), this, SLOT(showWarningForMaxHoursDailyWithUnder100WeightToggled(bool)));
10955 			showWarningForMaxHoursDailyWithUnder100WeightAction->setChecked(true);
10956 			connect(showWarningForMaxHoursDailyWithUnder100WeightAction, SIGNAL(toggled(bool)), this, SLOT(showWarningForMaxHoursDailyWithUnder100WeightToggled(bool)));
10957 			return;
10958 		}
10959 	}
10960 
10961 	SHOW_WARNING_FOR_MAX_HOURS_DAILY_WITH_UNDER_100_WEIGHT=checked;
10962 }
10963 
10964 void FetMainForm::showWarningForNotPerfectConstraintsToggled(bool checked)
10965 {
10966 	if(checked==false){
10967 		QString s=tr("It is recommended to keep this warning active, but if you really want, you can disable it.");
10968 		s+="\n\n";
10969 		s+=tr("Disable it only if you know what you are doing.");
10970 		s+="\n\n";
10971 		s+=tr("Are you sure you want to disable it?");
10972 
10973 		QMessageBox::StandardButton b=QMessageBox::warning(this, tr("FET warning"), s, QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Yes);
10974 
10975 		if(b!=QMessageBox::Yes){
10976 			disconnect(showWarningForNotPerfectConstraintsAction, SIGNAL(toggled(bool)), this, SLOT(showWarningForNotPerfectConstraintsToggled(bool)));
10977 			showWarningForNotPerfectConstraintsAction->setChecked(true);
10978 			connect(showWarningForNotPerfectConstraintsAction, SIGNAL(toggled(bool)), this, SLOT(showWarningForNotPerfectConstraintsToggled(bool)));
10979 			return;
10980 		}
10981 	}
10982 
10983 	SHOW_WARNING_FOR_NOT_PERFECT_CONSTRAINTS=checked;
10984 }
10985 
10986 
10987 void FetMainForm::enableStudentsMinHoursDailyWithAllowEmptyDaysToggled(bool checked)
10988 {
10989 	assert(gt.rules.mode!=MORNINGS_AFTERNOONS);
10990 	if(checked==true){
10991 		QString s=tr("This kind of constraint is good, but only in the right case. Adding such constraints in the wrong circumstance may make your"
10992 		 " timetable solve too slow or even impossible.");
10993 		s+="\n\n";
10994 		s+=tr("Please use such constraints only if you are sure that there exists a timetable with empty days for students. If your instution requires"
10995 			" each day for the students to be not empty, or if there does not exist a solution with empty days for students, "
10996 			"it is IMPERATIVE (for performance reasons) that you use the standard constraint which does not allow empty days."
10997 			" Otherwise, the timetable may be impossible to find.");
10998 		s+="\n\n";
10999 		s+=tr("Continue only if you know what you are doing.");
11000 
11001 		QMessageBox::StandardButton b=QMessageBox::warning(this, tr("FET warning"), s, QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok);
11002 
11003 		if(b!=QMessageBox::Ok){
11004 			disconnect(enableStudentsMinHoursDailyWithAllowEmptyDaysAction, SIGNAL(toggled(bool)), this, SLOT(enableStudentsMinHoursDailyWithAllowEmptyDaysToggled(bool)));
11005 			enableStudentsMinHoursDailyWithAllowEmptyDaysAction->setChecked(false);
11006 			connect(enableStudentsMinHoursDailyWithAllowEmptyDaysAction, SIGNAL(toggled(bool)), this, SLOT(enableStudentsMinHoursDailyWithAllowEmptyDaysToggled(bool)));
11007 			return;
11008 		}
11009 	}
11010 
11011 	ENABLE_STUDENTS_MIN_HOURS_DAILY_WITH_ALLOW_EMPTY_DAYS=checked;
11012 }
11013 
11014 void FetMainForm::showWarningForStudentsMinHoursDailyWithAllowEmptyDaysToggled(bool checked)
11015 {
11016 	assert(gt.rules.mode!=MORNINGS_AFTERNOONS);
11017 	if(checked==false){
11018 		QString s=tr("It is recommended to keep this warning active, but if you really want, you can disable it.");
11019 		s+="\n\n";
11020 		s+=tr("Disable it only if you know what you are doing.");
11021 		s+="\n\n";
11022 		s+=tr("Are you sure you want to disable it?");
11023 
11024 		QMessageBox::StandardButton b=QMessageBox::warning(this, tr("FET warning"), s, QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Yes);
11025 
11026 		if(b!=QMessageBox::Yes){
11027 			disconnect(showWarningForStudentsMinHoursDailyWithAllowEmptyDaysAction, SIGNAL(toggled(bool)), this, SLOT(showWarningForStudentsMinHoursDailyWithAllowEmptyDaysToggled(bool)));
11028 			showWarningForStudentsMinHoursDailyWithAllowEmptyDaysAction->setChecked(true);
11029 			connect(showWarningForStudentsMinHoursDailyWithAllowEmptyDaysAction, SIGNAL(toggled(bool)), this, SLOT(showWarningForStudentsMinHoursDailyWithAllowEmptyDaysToggled(bool)));
11030 			return;
11031 		}
11032 	}
11033 
11034 	SHOW_WARNING_FOR_STUDENTS_MIN_HOURS_DAILY_WITH_ALLOW_EMPTY_DAYS=checked;
11035 }
11036 
11037 void FetMainForm::enableStudentsMinHoursPerMorningWithAllowEmptyMorningsToggled(bool checked)
11038 {
11039 	Q_UNUSED(checked);
11040 
11041 	assert(0); //Yes, this option is always disabled
11042 
11043 	/*QMessageBox::information(this, tr("FET information"), tr("This option must remain selected in the custom FET version MA"));
11044 
11045 	disconnect(enableStudentsMinHoursPerMorningWithAllowEmptyMorningsAction, SIGNAL(toggled(bool)), this, SLOT(enableStudentsMinHoursPerMorningWithAllowEmptyMorningsToggled(bool)));
11046 	enableStudentsMinHoursPerMorningWithAllowEmptyMorningsAction->setChecked(true);
11047 	connect(enableStudentsMinHoursPerMorningWithAllowEmptyMorningsAction, SIGNAL(toggled(bool)), this, SLOT(enableStudentsMinHoursPerMorningWithAllowEmptyMorningsToggled(bool)));*/
11048 
11049 	return;
11050 }
11051 
11052 void FetMainForm::showWarningForStudentsMinHoursPerMorningWithAllowEmptyMorningsToggled(bool checked)
11053 {
11054 	Q_UNUSED(checked);
11055 
11056 	assert(0); //Yes, this option is always disabled
11057 
11058 	/*QMessageBox::information(this, tr("FET information"), tr("This option must remain unselected in the custom FET version MA"));
11059 
11060 	disconnect(showWarningForStudentsMinHoursPerMorningWithAllowEmptyMorningsAction, SIGNAL(toggled(bool)), this, SLOT(showWarningForStudentsMinHoursPerMorningWithAllowEmptyMorningsToggled(bool)));
11061 	showWarningForStudentsMinHoursPerMorningWithAllowEmptyMorningsAction->setChecked(false);
11062 	connect(showWarningForStudentsMinHoursPerMorningWithAllowEmptyMorningsAction, SIGNAL(toggled(bool)), this, SLOT(showWarningForStudentsMinHoursPerMorningWithAllowEmptyMorningsToggled(bool)));*/
11063 
11064 	return;
11065 }
11066 
11067 void FetMainForm::enableGroupActivitiesInInitialOrderToggled(bool checked)
11068 {
11069 	if(checked==true){
11070 		QString s=tr("This kind of option is good, but only in the right case. Adding such an option in the wrong circumstance may make your"
11071 		 " timetable solve too slow or even impossible.");
11072 		s+="\n\n";
11073 		s+=tr("Continue only if you know what you are doing.");
11074 
11075 		QMessageBox::StandardButton b=QMessageBox::warning(this, tr("FET warning"), s, QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok);
11076 
11077 		if(b!=QMessageBox::Ok){
11078 			disconnect(enableGroupActivitiesInInitialOrderAction, SIGNAL(toggled(bool)), this, SLOT(enableGroupActivitiesInInitialOrderToggled(bool)));
11079 			enableGroupActivitiesInInitialOrderAction->setChecked(false);
11080 			connect(enableGroupActivitiesInInitialOrderAction, SIGNAL(toggled(bool)), this, SLOT(enableGroupActivitiesInInitialOrderToggled(bool)));
11081 			return;
11082 		}
11083 	}
11084 
11085 	ENABLE_GROUP_ACTIVITIES_IN_INITIAL_ORDER=checked;
11086 
11087 	setEnabledIcon(groupActivitiesInInitialOrderAction, ENABLE_GROUP_ACTIVITIES_IN_INITIAL_ORDER);
11088 }
11089 
11090 void FetMainForm::showWarningForGroupActivitiesInInitialOrderToggled(bool checked)
11091 {
11092 	if(checked==false){
11093 		QString s=tr("It is recommended to keep this warning active, but if you really want, you can disable it.");
11094 		s+="\n\n";
11095 		s+=tr("Disable it only if you know what you are doing.");
11096 		s+="\n\n";
11097 		s+=tr("Are you sure you want to disable it?");
11098 
11099 		QMessageBox::StandardButton b=QMessageBox::warning(this, tr("FET warning"), s, QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Yes);
11100 
11101 		if(b!=QMessageBox::Yes){
11102 			disconnect(showWarningForGroupActivitiesInInitialOrderAction, SIGNAL(toggled(bool)), this, SLOT(showWarningForGroupActivitiesInInitialOrderToggled(bool)));
11103 			showWarningForGroupActivitiesInInitialOrderAction->setChecked(true);
11104 			connect(showWarningForGroupActivitiesInInitialOrderAction, SIGNAL(toggled(bool)), this, SLOT(showWarningForGroupActivitiesInInitialOrderToggled(bool)));
11105 			return;
11106 		}
11107 	}
11108 
11109 	SHOW_WARNING_FOR_GROUP_ACTIVITIES_IN_INITIAL_ORDER=checked;
11110 }
11111 
11112 
11113 //time constraints
11114 void FetMainForm::on_shortcutAllTimeConstraintsPushButton_clicked()
11115 {
11116 	on_dataAllTimeConstraintsAction_triggered();
11117 }
11118 
11119 void FetMainForm::on_shortcutBreakTimeConstraintsPushButton_clicked()
11120 {
11121 	dataTimeConstraintsBreakTimesAction_triggered();
11122 }
11123 
11124 void FetMainForm::on_shortcutTeachersTimeConstraintsPushButton_clicked()
11125 {
11126 	menuTeachers_time_constraints->popup(QCursor::pos());
11127 }
11128 
11129 void FetMainForm::on_shortcutStudentsTimeConstraintsPushButton_clicked()
11130 {
11131 	menuStudents_time_constraints->popup(QCursor::pos());
11132 }
11133 
11134 void FetMainForm::on_shortcutActivitiesTimeConstraintsPushButton_clicked()
11135 {
11136 	menuActivities_time_constraints->popup(QCursor::pos());
11137 }
11138 
11139 void FetMainForm::on_shortcutAdvancedTimeConstraintsPushButton_clicked()
11140 {
11141 	shortcutAdvancedTimeMenu->popup(QCursor::pos());
11142 }
11143 
11144 
11145 //space constraints
11146 void FetMainForm::on_shortcutAllSpaceConstraintsPushButton_clicked()
11147 {
11148 	on_dataAllSpaceConstraintsAction_triggered();
11149 }
11150 
11151 void FetMainForm::on_shortcutRoomsSpaceConstraintsPushButton_clicked()
11152 {
11153 	menuRooms_space_constraints->popup(QCursor::pos());
11154 }
11155 
11156 void FetMainForm::on_shortcutTeachersSpaceConstraintsPushButton_clicked()
11157 {
11158 	menuTeachers_space_constraints->popup(QCursor::pos());
11159 }
11160 
11161 void FetMainForm::on_shortcutStudentsSpaceConstraintsPushButton_clicked()
11162 {
11163 	menuStudents_space_constraints->popup(QCursor::pos());
11164 }
11165 
11166 void FetMainForm::on_shortcutSubjectsSpaceConstraintsPushButton_clicked()
11167 {
11168 	menuSubjects_space_constraints->popup(QCursor::pos());
11169 }
11170 
11171 void FetMainForm::on_shortcutActivityTagsSpaceConstraintsPushButton_clicked()
11172 {
11173 	menuActivity_tags_space_constraints->popup(QCursor::pos());
11174 }
11175 
11176 void FetMainForm::on_shortcutSubjectsAndActivityTagsSpaceConstraintsPushButton_clicked()
11177 {
11178 	menuSubjects_and_activity_tags_space_constraints->popup(QCursor::pos());
11179 }
11180 
11181 void FetMainForm::on_shortcutActivitiesSpaceConstraintsPushButton_clicked()
11182 {
11183 	menuActivities_space_constraints->popup(QCursor::pos());
11184 }
11185 
11186 //timetable
11187 void FetMainForm::on_shortcutGeneratePushButton_clicked()
11188 {
11189 	on_timetableGenerateAction_triggered();
11190 }
11191 
11192 void FetMainForm::on_shortcutGenerateMultiplePushButton_clicked()
11193 {
11194 	on_timetableGenerateMultipleAction_triggered();
11195 }
11196 
11197 void FetMainForm::on_shortcutViewTeachersPushButton_clicked()
11198 {
11199 	menuView_teachers->popup(QCursor::pos());
11200 	//old
11201 	//on_timetableViewTeachersAction_triggered();
11202 }
11203 
11204 void FetMainForm::on_shortcutViewStudentsPushButton_clicked()
11205 {
11206 	menuView_students->popup(QCursor::pos());
11207 	//old
11208 	//on_timetableViewStudentsAction_triggered();
11209 }
11210 
11211 void FetMainForm::on_shortcutViewRoomsPushButton_clicked()
11212 {
11213 	menuView_rooms->popup(QCursor::pos());
11214 	//old
11215 	//on_timetableViewRoomsAction_triggered();
11216 }
11217 
11218 void FetMainForm::on_shortcutShowSoftConflictsPushButton_clicked()
11219 {
11220 	on_timetableShowConflictsAction_triggered();
11221 }
11222 
11223 //2014-07-01
11224 void FetMainForm::on_shortcutsTimetableAdvancedPushButton_clicked()
11225 {
11226 	shortcutTimetableAdvancedMenu->popup(QCursor::pos());
11227 }
11228 
11229 void FetMainForm::on_shortcutsTimetablePrintPushButton_clicked()
11230 {
11231 	on_timetablePrintAction_triggered();
11232 }
11233 
11234 void FetMainForm::on_shortcutsTimetableLockingPushButton_clicked()
11235 {
11236 	shortcutTimetableLockingMenu->popup(QCursor::pos());
11237 }
11238 
11239 //data shortcut
11240 void FetMainForm::on_shortcutBasicPushButton_clicked()
11241 {
11242 	shortcutBasicMenu->popup(QCursor::pos());
11243 }
11244 
11245 void FetMainForm::on_shortcutSubjectsPushButton_clicked()
11246 {
11247 	on_dataSubjectsAction_triggered();
11248 }
11249 
11250 void FetMainForm::on_shortcutActivityTagsPushButton_clicked()
11251 {
11252 	on_dataActivityTagsAction_triggered();
11253 }
11254 
11255 void FetMainForm::on_shortcutTeachersPushButton_clicked()
11256 {
11257 	on_dataTeachersAction_triggered();
11258 }
11259 
11260 void FetMainForm::on_shortcutStudentsPushButton_clicked()
11261 {
11262 	menuStudents->popup(QCursor::pos());
11263 }
11264 
11265 void FetMainForm::on_shortcutActivitiesPushButton_clicked()
11266 {
11267 	on_dataActivitiesAction_triggered();
11268 }
11269 
11270 void FetMainForm::on_shortcutSubactivitiesPushButton_clicked()
11271 {
11272 	on_dataSubactivitiesAction_triggered();
11273 }
11274 
11275 void FetMainForm::on_shortcutDataSpacePushButton_clicked()
11276 {
11277 	shortcutDataSpaceMenu->popup(QCursor::pos());
11278 }
11279 
11280 void FetMainForm::on_shortcutDataAdvancedPushButton_clicked()
11281 {
11282 	shortcutDataAdvancedMenu->popup(QCursor::pos());
11283 }
11284 
11285 //file shortcut
11286 void FetMainForm::on_shortcutNewPushButton_clicked()
11287 {
11288 	on_fileNewAction_triggered();
11289 }
11290 
11291 void FetMainForm::on_shortcutOpenPushButton_clicked()
11292 {
11293 	on_fileOpenAction_triggered();
11294 }
11295 
11296 void FetMainForm::on_shortcutOpenRecentPushButton_clicked()
11297 {
11298 	fileOpenRecentMenu->popup(QCursor::pos());
11299 }
11300 
11301 void FetMainForm::on_shortcutSavePushButton_clicked()
11302 {
11303 	on_fileSaveAction_triggered();
11304 }
11305 
11306 void FetMainForm::on_shortcutSaveAsPushButton_clicked()
11307 {
11308 	on_fileSaveAsAction_triggered();
11309 }
11310 
11311 #else
11312 bool SHOW_WARNING_FOR_SUBGROUPS_WITH_THE_SAME_ACTIVITIES=true;
11313 
11314 bool SHOW_WARNING_FOR_ACTIVITIES_FIXED_SPACE_VIRTUAL_REAL_ROOMS_BUT_NOT_FIXED_TIME=true;
11315 
11316 bool SHOW_WARNING_FOR_MAX_HOURS_DAILY_WITH_UNDER_100_WEIGHT=true;
11317 
11318 bool SHOW_WARNING_FOR_NOT_PERFECT_CONSTRAINTS=true;
11319 bool SHOW_WARNING_FOR_STUDENTS_MIN_HOURS_DAILY_WITH_ALLOW_EMPTY_DAYS=true;
11320 
11321 bool SHOW_WARNING_FOR_STUDENTS_MIN_HOURS_PER_MORNING_WITH_ALLOW_EMPTY_MORNINGS=true;
11322 
11323 bool SHOW_WARNING_FOR_GROUP_ACTIVITIES_IN_INITIAL_ORDER=true;
11324 #endif
11325