Пример #1
0
void TimetableGenerateForm::seeInitialOrder()
{
	QString s=initialOrderOfActivities;

	//show the message in a dialog
	QDialog dialog(this);
	
	dialog.setWindowTitle(tr("FET - information about initial order of evaluation of activities"));

	QVBoxLayout* vl=new QVBoxLayout(&dialog);
	QPlainTextEdit* te=new QPlainTextEdit();
	te->setPlainText(s);
	te->setReadOnly(true);
	QPushButton* pb=new QPushButton(tr("OK"));

	QHBoxLayout* hl=new QHBoxLayout(0);
	hl->addStretch(1);
	hl->addWidget(pb);

	vl->addWidget(te);
	vl->addLayout(hl);
	connect(pb, SIGNAL(clicked()), &dialog, SLOT(close()));

	dialog.resize(700,500);
	centerWidgetOnScreen(&dialog);
	restoreFETDialogGeometry(&dialog, settingsName);

	setParentAndOtherThings(&dialog, this);
	dialog.exec();
	saveFETDialogGeometry(&dialog, settingsName);
}
Пример #2
0
SubjectsForm::~SubjectsForm()
{
	saveFETDialogGeometry(this);
	//save splitter state
	QSettings settings(COMPANY, PROGRAM);
	settings.setValue(this->metaObject()->className()+QString("/splitter-state"), splitter->saveState());
}
Пример #3
0
void TimetableGenerateForm::seeImpossible()
{
	QString s;

	myMutex.lock();

	s+=TimetableGenerateForm::tr("Information relating difficult to schedule activities:");
	s+="\n\n";
	s+=TimetableGenerateForm::tr("Please check the constraints related to the last "
	 "activities in the list below, which might be difficult to schedule:");
	s+="\n\n";
	s+=TimetableGenerateForm::tr("Here are the placed activities which lead to a difficulty, "
	 "in order from the first one to the last (the last one FET failed to schedule "
	 "and the last ones are difficult):");
	s+="\n\n";
	for(int i=0; i<gen.nDifficultActivities; i++){
		int ai=gen.difficultActivities[i];

		s+=TimetableGenerateForm::tr("No: %1").arg(i+1);

		s+=", ";

		s+=TimetableGenerateForm::tr("Id: %1 (%2)", "%1 is id of activity, %2 is detailed description of activity")
			.arg(gt.rules.internalActivitiesList[ai].id)
			.arg(getActivityDetailedDescription(gt.rules, gt.rules.internalActivitiesList[ai].id));

		s+="\n";
	}

	myMutex.unlock();
	
	//show the message in a dialog
	QDialog dialog(this);
	
	dialog.setWindowTitle(tr("FET - information about difficult activities"));

	QVBoxLayout* vl=new QVBoxLayout(&dialog);
	QPlainTextEdit* te=new QPlainTextEdit();
	te->setPlainText(s);
	te->setReadOnly(true);
	QPushButton* pb=new QPushButton(tr("OK"));

	QHBoxLayout* hl=new QHBoxLayout(0);
	hl->addStretch(1);
	hl->addWidget(pb);

	vl->addWidget(te);
	vl->addLayout(hl);
	connect(pb, SIGNAL(clicked()), &dialog, SLOT(close()));

	dialog.resize(700,500);
	centerWidgetOnScreen(&dialog);
	restoreFETDialogGeometry(&dialog, settingsName);

	setParentAndOtherThings(&dialog, this);
	dialog.exec();
	saveFETDialogGeometry(&dialog, settingsName);
}
Пример #4
0
void SubjectsForm::comments()
{
	int ind=subjectsListWidget->currentRow();
	if(ind<0){
		QMessageBox::information(this, tr("FET information"), tr("Invalid selected subject"));
		return;
	}
	
	Subject* sbj=gt.rules.subjectsList[ind];
	assert(sbj!=NULL);

	QDialog getCommentsDialog(this);
	
	getCommentsDialog.setWindowTitle(tr("Subject comments"));
	
	QPushButton* okPB=new QPushButton(tr("OK"));
	okPB->setDefault(true);
	QPushButton* cancelPB=new QPushButton(tr("Cancel"));
	
	connect(okPB, SIGNAL(clicked()), &getCommentsDialog, SLOT(accept()));
	connect(cancelPB, SIGNAL(clicked()), &getCommentsDialog, SLOT(reject()));

	QHBoxLayout* hl=new QHBoxLayout();
	hl->addStretch();
	hl->addWidget(okPB);
	hl->addWidget(cancelPB);
	
	QVBoxLayout* vl=new QVBoxLayout();
	
	QPlainTextEdit* commentsPT=new QPlainTextEdit();
	commentsPT->setPlainText(sbj->comments);
	commentsPT->selectAll();
	commentsPT->setFocus();
	
	vl->addWidget(commentsPT);
	vl->addLayout(hl);
	
	getCommentsDialog.setLayout(vl);
	
	const QString settingsName=QString("SubjectCommentsDialog");
	
	getCommentsDialog.resize(500, 320);
	centerWidgetOnScreen(&getCommentsDialog);
	restoreFETDialogGeometry(&getCommentsDialog, settingsName);
	
	int t=getCommentsDialog.exec();
	saveFETDialogGeometry(&getCommentsDialog, settingsName);
	
	if(t==QDialog::Accepted){
		sbj->comments=commentsPT->toPlainText();
	
		gt.rules.internalStructureComputed=false;
		setRulesModifiedAndOtherThings(&gt.rules);

		subjectChanged(ind);
	}
}
ConstraintSubactivitiesPreferredStartingTimesForm::~ConstraintSubactivitiesPreferredStartingTimesForm()
{
    saveFETDialogGeometry(this);
}
Пример #6
0
ConstraintTeachersMaxDaysPerWeekForm::~ConstraintTeachersMaxDaysPerWeekForm()
{
	saveFETDialogGeometry(this);
}
ConstraintStudentsMaxHoursContinuouslyForm::~ConstraintStudentsMaxHoursContinuouslyForm()
{
	saveFETDialogGeometry(this);
}
ConstraintStudentsSetIntervalMaxDaysPerWeekForm::~ConstraintStudentsSetIntervalMaxDaysPerWeekForm()
{
	saveFETDialogGeometry(this);
}
Пример #9
0
ConstraintStudentsMaxBuildingChangesPerWeekForm::~ConstraintStudentsMaxBuildingChangesPerWeekForm()
{
	saveFETDialogGeometry(this);
}
Пример #10
0
ModifyStudentsGroupForm::~ModifyStudentsGroupForm()
{
	saveFETDialogGeometry(this);
}
ConstraintStudentsActivityTagMaxHoursDailyForm::~ConstraintStudentsActivityTagMaxHoursDailyForm()
{
	saveFETDialogGeometry(this);
}
AddConstraintStudentsSetMaxGapsPerWeekForm::~AddConstraintStudentsSetMaxGapsPerWeekForm()
{
	saveFETDialogGeometry(this);
}
ConstraintTeacherMaxHoursDailyForm::~ConstraintTeacherMaxHoursDailyForm()
{
	saveFETDialogGeometry(this);
}
AddConstraintStudentsSetHomeRoomsForm::~AddConstraintStudentsSetHomeRoomsForm()
{
	saveFETDialogGeometry(this);
}
Пример #15
0
AddConstraintTeacherMaxGapsPerWeekForm::~AddConstraintTeacherMaxGapsPerWeekForm()
{
	saveFETDialogGeometry(this);
}
ModifyConstraintTeachersMaxSpanPerDayForm::~ModifyConstraintTeachersMaxSpanPerDayForm()
{
	saveFETDialogGeometry(this);
}
AddConstraintStudentsSetEarlyMaxBeginningsAtSecondHourForm::~AddConstraintStudentsSetEarlyMaxBeginningsAtSecondHourForm()
{
	saveFETDialogGeometry(this);
}
AddConstraintStudentsSetMaxSpanPerDayForm::~AddConstraintStudentsSetMaxSpanPerDayForm()
{
	saveFETDialogGeometry(this);
}
ChangeMinDaysSelectivelyForm::~ChangeMinDaysSelectivelyForm()
{
	saveFETDialogGeometry(this);

}
Пример #20
0
AdvancedFilterForm::~AdvancedFilterForm()
{
	saveFETDialogGeometry(this, atts);
}
AddConstraintTeacherIntervalMaxDaysPerWeekForm::~AddConstraintTeacherIntervalMaxDaysPerWeekForm()
{
	saveFETDialogGeometry(this);
}
Пример #22
0
ConstraintThreeActivitiesGroupedForm::~ConstraintThreeActivitiesGroupedForm()
{
	saveFETDialogGeometry(this);
}
ModifyConstraintActivityPreferredRoomsForm::~ModifyConstraintActivityPreferredRoomsForm()
{
	saveFETDialogGeometry(this);
}
AddConstraintSubjectActivityTagPreferredRoomsForm::~AddConstraintSubjectActivityTagPreferredRoomsForm()
{
	saveFETDialogGeometry(this);
}
Пример #25
0
ConstraintActivitiesSameStartingDayForm::~ConstraintActivitiesSameStartingDayForm()
{
	saveFETDialogGeometry(this);
}
ModifyConstraintStudentsSetHomeRoomForm::~ModifyConstraintStudentsSetHomeRoomForm()
{
	saveFETDialogGeometry(this);
}
Пример #27
0
ModifyConstraintStudentsSetMaxDaysPerWeekForm::~ModifyConstraintStudentsSetMaxDaysPerWeekForm()
{
	saveFETDialogGeometry(this);
}
Пример #28
0
ConstraintTeacherNotAvailableTimesForm::~ConstraintTeacherNotAvailableTimesForm()
{
	saveFETDialogGeometry(this);
}
AddConstraintTeachersActivityTagMaxHoursDailyForm::~AddConstraintTeachersActivityTagMaxHoursDailyForm()
{
	saveFETDialogGeometry(this);
}
Пример #30
0
InstitutionNameForm::~InstitutionNameForm()
{
	saveFETDialogGeometry(this);
}