本文整理汇总了C++中setParentAndOtherThings函数的典型用法代码示例。如果您正苦于以下问题:C++ setParentAndOtherThings函数的具体用法?C++ setParentAndOtherThings怎么用?C++ setParentAndOtherThings使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setParentAndOtherThings函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: tr
void BuildingsForm::modifyBuilding()
{
int valv=buildingsListWidget->verticalScrollBar()->value();
int valh=buildingsListWidget->horizontalScrollBar()->value();
int ci=buildingsListWidget->currentRow();
if(ci<0){
QMessageBox::information(this, tr("FET information"), tr("Invalid selected building"));
return;
}
Building* bu=visibleBuildingsList.at(ci);
ModifyBuildingForm form(this, bu->name);
setParentAndOtherThings(&form, this);
form.exec();
filterChanged();
buildingsListWidget->verticalScrollBar()->setValue(valv);
buildingsListWidget->horizontalScrollBar()->setValue(valh);
if(ci>=buildingsListWidget->count())
ci=buildingsListWidget->count()-1;
if(ci>=0)
buildingsListWidget->setCurrentRow(ci);
}
示例2: tr
void ConstraintStudentsSetIntervalMaxDaysPerWeekForm::modifyConstraint()
{
int valv=constraintsListWidget->verticalScrollBar()->value();
int valh=constraintsListWidget->horizontalScrollBar()->value();
int i=constraintsListWidget->currentRow();
if(i<0){
QMessageBox::information(this, tr("FET information"), tr("Invalid selected constraint"));
return;
}
TimeConstraint* ctr=this->visibleConstraintsList.at(i);
ModifyConstraintStudentsSetIntervalMaxDaysPerWeekForm form(this, (ConstraintStudentsSetIntervalMaxDaysPerWeek*)ctr);
setParentAndOtherThings(&form, this);
form.exec();
filterChanged();
constraintsListWidget->verticalScrollBar()->setValue(valv);
constraintsListWidget->horizontalScrollBar()->setValue(valh);
if(i>=constraintsListWidget->count())
i=constraintsListWidget->count()-1;
if(i>=0)
constraintsListWidget->setCurrentRow(i);
else
this->constraintChanged(-1);
}
示例3: dialog
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);
}
示例4: students
void ModifySubactivityForm::help()
{
QString s;
s+=tr("Abbreviations in this dialog:");
s+="\n\n";
s+=tr("'Students' (the text near the spin box), means 'Number of students (-1 for automatic)'");
s+="\n";
//show the message in a dialog
QDialog dialog(this);
dialog.setWindowTitle(tr("FET - help on modifying subactivity(ies)"));
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(600,470);
centerWidgetOnScreen(&dialog);
setParentAndOtherThings(&dialog, this);
dialog.exec();
}
示例5: tr
void ConstraintSubactivitiesPreferredStartingTimesForm::modifyConstraint()
{
int valv=constraintsListWidget->verticalScrollBar()->value();
int valh=constraintsListWidget->horizontalScrollBar()->value();
int i=constraintsListWidget->currentRow();
if(i<0) {
QMessageBox::information(this, tr("FET information"), tr("Invalid selected constraint"));
return;
}
TimeConstraint* ctr=this->visibleConstraintsList.at(i);
ModifyConstraintSubactivitiesPreferredStartingTimesForm form(this, (ConstraintSubactivitiesPreferredStartingTimes*)ctr);
setParentAndOtherThings(&form, this);
form.exec();
this->refreshConstraintsListWidget();
constraintsListWidget->verticalScrollBar()->setValue(valv);
constraintsListWidget->horizontalScrollBar()->setValue(valh);
if(i>=constraintsListWidget->count())
i=constraintsListWidget->count()-1;
if(i>=0)
constraintsListWidget->setCurrentRow(i);
else
this->constraintChanged(-1);
}
示例6: last
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);
}
示例7: form
void ConstraintActivitiesOccupyMaxTimeSlotsFromSelectionForm::addConstraint()
{
AddConstraintActivitiesOccupyMaxTimeSlotsFromSelectionForm form(this);
setParentAndOtherThings(&form, this);
form.exec();
filterChanged();
constraintsListWidget->setCurrentRow(constraintsListWidget->count()-1);
}
开发者ID:RaminNietzsche,项目名称:POSFET,代码行数:10,代码来源:constraintactivitiesoccupymaxtimeslotsfromselectionform.cpp
示例8: form
void ConstraintActivityEndsStudentsDayForm::addConstraint()
{
AddConstraintActivityEndsStudentsDayForm form(this);
setParentAndOtherThings(&form, this);
form.exec();
filterChanged();
constraintsListWidget->setCurrentRow(constraintsListWidget->count()-1);
}
示例9: form
void ConstraintActivitiesMaxSimultaneousInSelectedTimeSlotsForm::addConstraint()
{
AddConstraintActivitiesMaxSimultaneousInSelectedTimeSlotsForm form(this);
setParentAndOtherThings(&form, this);
form.exec();
filterChanged();
constraintsListWidget->setCurrentRow(constraintsListWidget->count()-1);
}
示例10: form
void ConstraintSubactivitiesPreferredStartingTimesForm::addConstraint()
{
AddConstraintSubactivitiesPreferredStartingTimesForm form(this);
setParentAndOtherThings(&form, this);
form.exec();
this->refreshConstraintsListWidget();
constraintsListWidget->setCurrentRow(constraintsListWidget->count()-1);
}
示例11: addBuildingForm
void BuildingsForm::addBuilding()
{
AddBuildingForm addBuildingForm(this);
setParentAndOtherThings(&addBuildingForm, this);
addBuildingForm.exec();
filterChanged();
buildingsListWidget->setCurrentRow(buildingsListWidget->count()-1);
}
示例12: form
void ConstraintTeacherActivityTagMaxHoursDailyForm::addConstraint()
{
AddConstraintTeacherActivityTagMaxHoursDailyForm form(this);
setParentAndOtherThings(&form, this);
form.exec();
filterChanged();
constraintsListWidget->setCurrentRow(constraintsListWidget->count()-1);
}
示例13: form
void ConstraintTeacherHomeRoomsForm::addConstraint()
{
AddConstraintTeacherHomeRoomsForm form(this);
setParentAndOtherThings(&form, this);
form.exec();
this->refreshConstraintsListWidget();
constraintsListWidget->setCurrentRow(constraintsListWidget->count()-1);
}
示例14: form
void ConstraintSubjectActivityTagPreferredRoomForm::addConstraint()
{
AddConstraintSubjectActivityTagPreferredRoomForm form(this);
setParentAndOtherThings(&form, this);
form.exec();
filterChanged();
constraintsListWidget->setCurrentRow(constraintsListWidget->count()-1);
}
示例15: form
void ConstraintStudentsMaxHoursContinuouslyForm::addConstraint()
{
AddConstraintStudentsMaxHoursContinuouslyForm form(this);
setParentAndOtherThings(&form, this);
form.exec();
filterChanged();
constraintsListWidget->setCurrentRow(constraintsListWidget->count()-1);
}