Back to index

fet  5.18.0
savetimetableconfirmationform.cpp
Go to the documentation of this file.
00001 //
00002 //
00003 // Description: This file is part of FET
00004 //
00005 //
00006 // Author: Lalescu Liviu <Please see http://lalescu.ro/liviu/ for details about contacting Liviu Lalescu (in particular, you can find here the e-mail address)>
00007 // Copyright (C) 2003 Liviu Lalescu <http://lalescu.ro/liviu/>
00008 //
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #include "savetimetableconfirmationform.h"
00019 
00020 #include "timetable_defs.h"
00021 
00022 SaveTimetableConfirmationForm::SaveTimetableConfirmationForm(QWidget* parent): QDialog(parent)
00023 {
00024        setupUi(this);
00025        
00026        continuePushButton->setDefault(true);
00027        
00028        connect(continuePushButton, SIGNAL(clicked()), this, SLOT(accept()));
00029        connect(cancelPushButton, SIGNAL(clicked()), this, SLOT(reject()));
00030        connect(dontShowAgainCheckBox, SIGNAL(stateChanged(int)), this, SLOT(dontShowAgainCheckBoxToggled()));
00031 
00032        dontShowAgain=dontShowAgainCheckBox->isChecked();
00033        
00034        plainTextEdit->setReadOnly(true);
00035 
00036        centerWidgetOnScreen(this);
00037        restoreFETDialogGeometry(this);
00038        
00039        QString s;
00040        
00041        s+=tr("Please read carefully the description below:");
00042        s+="\n\n";
00043 
00044        s+=tr("This option is only useful if you need to lock current timetable into a file."
00045         " Locking means that there will be added constraints activity preferred starting time and"
00046         " activity preferred room with 100% importance for each activity to fix it at current place in current timetable."
00047         " You can save this timetable as an ordinary .fet file; when you'll open it, you'll see all old inputted data (activities, teachers, etc.)" 
00048         " and the locking constraints as the last time/space constraints."
00049         " You can unlock some of these activities (by removing constraints) if small changes appear in the configuration, and generate again"
00050         " and the remaining locking constraints will be respected.");
00051        s+="\n\n";
00052        s+=tr("The added constraints will have the 'permanently locked' tag set to false, so you can also unlock the activities from the "
00053         "'Timetable' menu, without interfering with the initial constraints which are made by you 'permanently locked'");
00054        s+="\n\n";
00055        s+=tr("This option is useful for institutions where you obtain a timetable, then some small changes appear,"
00056         " and you need to regenerate timetable, but respecting in a large proportion the old timetable");
00057        s+="\n\n";
00058        s+=tr("Current data file will not be affected by anything, locking constraints will only be added to the file you select to save"
00059         " (you can save current datafile and open saved timetable file after that to check it)");
00060        
00061        plainTextEdit->setPlainText(s);
00062 }
00063 
00064 SaveTimetableConfirmationForm::~SaveTimetableConfirmationForm()
00065 {
00066        saveFETDialogGeometry(this);
00067 }
00068 
00069 void SaveTimetableConfirmationForm::dontShowAgainCheckBoxToggled()
00070 {
00071        dontShowAgain=dontShowAgainCheckBox->isChecked();
00072 }