Back to index

fet  5.18.0
spreadconfirmationform.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 "spreadconfirmationform.h"
00019 
00020 #include "timetable_defs.h"
00021 
00022 SpreadConfirmationForm::SpreadConfirmationForm(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        s+=tr("This function is intended to be used after you introduced all activities and obtained a timetable, if you want "
00044        "now to spread the divided activities more evenly over the week. This function is useful if you have 5 days per week, "
00045        "maybe also if you have 6 days per week.");
00046        s+="\n\n";
00047        s+=tr("This improvement - optimization of spreading activities in a week - is a process of replacing current constraints of "
00048        "type min days between activities with others, which should provide you with a better timetable. Note: only min days "
00049        "constraints referring to components from the same split activity will be replaced. If you have constraints min days "
00050        "referring to activities in different components, these will be left untouched - this is a useful feature.");
00051        s+="\n\n";
00052        s+=tr("Please SAVE/BACKUP your current file and keep it safe, in case anything goes wrong, and only continue if you did that "
00053        "already. Current function might modify much your data");
00054        s+="\n\n";
00055        s+=tr("If you use constraints activities same starting time or same starting day then "
00056        "you must take care of this aspect: after applying this function and before generating a timetable, it is IMPORTANT to "
00057        "remove constraints min days between activities which are redundant, like described in Help/Important tips, advice 2) ."
00058        " If you don't do that, you might get too difficult timetables or even impossible ones.");
00059        s+="\n\n";
00060        s+=tr("It is important for you to choose good weights percentages, suitable for your institution. A good weighting might "
00061        "be values from 95.0% to 100.0% (ex.: 95.0%, 99.0%, 99.75%, 100.0%). You may want to select the check boxes for activities "
00062        "split into 2 or 3 components, so that they are not in consecutive days. If you obtain a timetable too difficult for FET, "
00063        "you might need to revert to your former data or lower weights of constraints. Note: you can use a progressive approach "
00064        "in choosing good weights");
00065        
00066        plainTextEdit->setPlainText(s);
00067 }
00068 
00069 SpreadConfirmationForm::~SpreadConfirmationForm()
00070 {
00071        saveFETDialogGeometry(this);
00072 }
00073 
00074 void SpreadConfirmationForm::dontShowAgainCheckBoxToggled()
00075 {
00076        dontShowAgain=dontShowAgainCheckBox->isChecked();
00077 }