Back to index

fet  5.18.0
modifyactivityform.cpp
Go to the documentation of this file.
00001 /***************************************************************************
00002                           modifyactivityform.cpp  -  description
00003                              -------------------
00004     begin                : Feb 9, 2005
00005     copyright            : (C) 2005 by Lalescu Liviu
00006     email                : Please see http://lalescu.ro/liviu/ for details about contacting Liviu Lalescu (in particular, you can find here the e-mail address)
00007  ***************************************************************************/
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 "modifyactivityform.h"
00019 #include "teacher.h"
00020 #include "subject.h"
00021 #include "studentsset.h"
00022 
00023 #include "activityplanningform.h"
00024 
00025 #include <QMessageBox>
00026 
00027 #include <QPlainTextEdit>
00028 
00029 #include <QList>
00030 
00031 #include <QListWidget>
00032 #include <QAbstractItemView>
00033 #include <QScrollBar>
00034 
00035 QSpinBox* ModifyActivityForm::dur(int i)
00036 {
00037        assert(i>=0 && i<durList.count());
00038        assert(i<MAX_SPLIT_OF_AN_ACTIVITY);
00039        return durList.at(i);
00040 }
00041 
00042 QCheckBox* ModifyActivityForm::activ(int i)
00043 {
00044        assert(i>=0 && i<activList.count());
00045        assert(i<MAX_SPLIT_OF_AN_ACTIVITY);
00046        return activList.at(i);
00047 }
00048 
00049 ModifyActivityForm::ModifyActivityForm(QWidget* parent, int id, int activityGroupId): QDialog(parent)
00050 {
00051        setupUi(this);
00052 
00053        durList.clear();
00054        durList.append(duration1SpinBox);
00055        durList.append(duration2SpinBox);
00056        durList.append(duration3SpinBox);
00057        durList.append(duration4SpinBox);
00058        durList.append(duration5SpinBox);
00059        durList.append(duration6SpinBox);
00060        durList.append(duration7SpinBox);
00061        durList.append(duration8SpinBox);
00062        durList.append(duration9SpinBox);
00063        durList.append(duration10SpinBox);
00064        durList.append(duration11SpinBox);
00065        durList.append(duration12SpinBox);
00066        durList.append(duration13SpinBox);
00067        durList.append(duration14SpinBox);
00068        durList.append(duration15SpinBox);
00069        durList.append(duration16SpinBox);
00070        durList.append(duration17SpinBox);
00071        durList.append(duration18SpinBox);
00072        durList.append(duration19SpinBox);
00073        durList.append(duration20SpinBox);
00074        durList.append(duration21SpinBox);
00075        durList.append(duration22SpinBox);
00076        durList.append(duration23SpinBox);
00077        durList.append(duration24SpinBox);
00078        durList.append(duration25SpinBox);
00079        durList.append(duration26SpinBox);
00080        durList.append(duration27SpinBox);
00081        durList.append(duration28SpinBox);
00082        durList.append(duration29SpinBox);
00083        durList.append(duration30SpinBox);
00084        durList.append(duration31SpinBox);
00085        durList.append(duration32SpinBox);
00086        durList.append(duration33SpinBox);
00087        durList.append(duration34SpinBox);
00088        durList.append(duration35SpinBox);
00089        
00090        for(int i=0; i<MAX_SPLIT_OF_AN_ACTIVITY; i++)
00091               dur(i)->setMaximum(gt.rules.nHoursPerDay);
00092        
00093        activList.clear();
00094        activList.append(active1CheckBox);
00095        activList.append(active2CheckBox);
00096        activList.append(active3CheckBox);
00097        activList.append(active4CheckBox);
00098        activList.append(active5CheckBox);
00099        activList.append(active6CheckBox);
00100        activList.append(active7CheckBox);
00101        activList.append(active8CheckBox);
00102        activList.append(active9CheckBox);
00103        activList.append(active10CheckBox);
00104        activList.append(active11CheckBox);
00105        activList.append(active12CheckBox);
00106        activList.append(active13CheckBox);
00107        activList.append(active14CheckBox);
00108        activList.append(active15CheckBox);
00109        activList.append(active16CheckBox);
00110        activList.append(active17CheckBox);
00111        activList.append(active18CheckBox);
00112        activList.append(active19CheckBox);
00113        activList.append(active20CheckBox);
00114        activList.append(active21CheckBox);
00115        activList.append(active22CheckBox);
00116        activList.append(active23CheckBox);
00117        activList.append(active24CheckBox);
00118        activList.append(active25CheckBox);
00119        activList.append(active26CheckBox);
00120        activList.append(active27CheckBox);
00121        activList.append(active28CheckBox);
00122        activList.append(active29CheckBox);
00123        activList.append(active30CheckBox);
00124        activList.append(active31CheckBox);
00125        activList.append(active32CheckBox);
00126        activList.append(active33CheckBox);
00127        activList.append(active34CheckBox);
00128        activList.append(active35CheckBox);
00129        
00130        allTeachersListWidget->setSelectionMode(QAbstractItemView::SingleSelection);
00131        selectedTeachersListWidget->setSelectionMode(QAbstractItemView::SingleSelection);
00132        allStudentsListWidget->setSelectionMode(QAbstractItemView::SingleSelection);
00133        selectedStudentsListWidget->setSelectionMode(QAbstractItemView::SingleSelection);
00134        allActivityTagsListWidget->setSelectionMode(QAbstractItemView::SingleSelection);
00135        selectedActivityTagsListWidget->setSelectionMode(QAbstractItemView::SingleSelection);
00136 
00137        connect(cancelPushButton, SIGNAL(clicked()), this, SLOT(cancel()));
00138        connect(okPushButton, SIGNAL(clicked()), this, SLOT(ok()));
00139        connect(clearTeacherPushButton, SIGNAL(clicked()), this, SLOT(clearTeachers()));
00140        connect(clearStudentsPushButton, SIGNAL(clicked()), this, SLOT(clearStudents()));
00141        connect(allTeachersListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(addTeacher()));
00142        connect(selectedTeachersListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(removeTeacher()));
00143        connect(allStudentsListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(addStudents()));
00144        connect(selectedStudentsListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(removeStudents()));
00145        connect(clearActivityTagPushButton, SIGNAL(clicked()), this, SLOT(clearActivityTags()));
00146        connect(allActivityTagsListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(addActivityTag()));
00147        connect(selectedActivityTagsListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(removeActivityTag()));
00148        connect(showYearsCheckBox, SIGNAL(toggled(bool)), this, SLOT(showYearsChanged()));
00149        connect(showGroupsCheckBox, SIGNAL(toggled(bool)), this, SLOT(showGroupsChanged()));
00150        connect(showSubgroupsCheckBox, SIGNAL(toggled(bool)), this, SLOT(showSubgroupsChanged()));
00151        connect(helpPushButton, SIGNAL(clicked()), this, SLOT(help()));
00152 
00153        centerWidgetOnScreen(this);
00154        restoreFETDialogGeometry(this);
00155 
00156        QSize tmp3=subjectsComboBox->minimumSizeHint();
00157        Q_UNUSED(tmp3);
00158        
00159        this->_id=id;
00160        this->_activityGroupId=activityGroupId;
00161        for(int i=0; i<gt.rules.activitiesList.size(); i++){
00162               Activity* act=gt.rules.activitiesList[i];
00163               if(act->activityGroupId==this->_activityGroupId && act->id==this->_id)
00164                      this->_activity=act;
00165        }
00166                      
00167        this->_teachers=this->_activity->teachersNames;
00168        this->_subject = this->_activity->subjectName;
00169        this->_activityTags = this->_activity->activityTagsNames;
00170        this->_students=this->_activity->studentsNames;
00171        
00172        int nSplit;
00173        
00174        if(this->_activityGroupId!=0){
00175               nSplit=0;
00176               for(int i=0; i<gt.rules.activitiesList.size(); i++){
00177                      Activity* act=gt.rules.activitiesList[i];
00178                      if(act->activityGroupId==this->_activityGroupId){
00179                             if(nSplit>=MAX_SPLIT_OF_AN_ACTIVITY){
00180                                    assert(0);
00181                             }
00182                             else{
00183                                    if(this->_id==act->id)
00184                                           subactivitiesTabWidget->setCurrentIndex(nSplit);
00185                                    dur(nSplit)->setValue(act->duration);
00186                                    activ(nSplit)->setChecked(act->active);
00187                                    nSplit++;
00188                             }
00189                      }
00190               }
00191        }
00192        else{
00193               nSplit=1;
00194               dur(0)->setValue(this->_activity->duration);
00195               activ(0)->setChecked(this->_activity->active);
00196               subactivitiesTabWidget->setCurrentIndex(0);
00197        }
00198 
00199        splitSpinBox->setMinimum(nSplit);
00200        splitSpinBox->setMaximum(nSplit);
00201        splitSpinBox->setValue(nSplit);
00202        
00203        nStudentsSpinBox->setMinimum(-1);
00204        nStudentsSpinBox->setMaximum(MAX_ROOM_CAPACITY);
00205        nStudentsSpinBox->setValue(-1);
00206        
00207        if(this->_activity->computeNTotalStudents==false)
00208               nStudentsSpinBox->setValue(this->_activity->nTotalStudents);
00209        
00210        updateStudentsListWidget();
00211        updateTeachersListWidget();
00212        updateSubjectsComboBox();
00213        updateActivityTagsListWidget();
00214        
00215        selectedStudentsListWidget->clear();
00216        for(QStringList::Iterator it=this->_students.begin(); it!=this->_students.end(); it++)
00217               selectedStudentsListWidget->addItem(*it);
00218 
00219        for(int i=0; i<MAX_SPLIT_OF_AN_ACTIVITY; i++)
00220               if(i<nSplit)
00221                      subactivitiesTabWidget->setTabEnabled(i, true);
00222               else
00223                      subactivitiesTabWidget->setTabEnabled(i, false);
00224                      
00225        okPushButton->setDefault(true);
00226        okPushButton->setFocus();
00227 }
00228 
00229 ModifyActivityForm::~ModifyActivityForm()
00230 {
00231        saveFETDialogGeometry(this);
00232 }
00233 
00234 void ModifyActivityForm::updateTeachersListWidget()
00235 {
00236        allTeachersListWidget->clear();
00237        for(int i=0; i<gt.rules.teachersList.size(); i++){
00238               Teacher* tch=gt.rules.teachersList[i];
00239               allTeachersListWidget->addItem(tch->name);
00240        }
00241        
00242        selectedTeachersListWidget->clear();
00243        for(QStringList::Iterator it=this->_teachers.begin(); it!=this->_teachers.end(); it++)
00244               selectedTeachersListWidget->addItem(*it);
00245 }
00246 
00247 void ModifyActivityForm::addTeacher()
00248 {
00249        if(allTeachersListWidget->currentRow()<0 || allTeachersListWidget->currentRow()>=allTeachersListWidget->count())
00250               return;
00251        
00252        for(int i=0; i<selectedTeachersListWidget->count(); i++)
00253               if(selectedTeachersListWidget->item(i)->text()==allTeachersListWidget->currentItem()->text())
00254                      return;
00255        
00256        selectedTeachersListWidget->addItem(allTeachersListWidget->currentItem()->text());
00257        selectedTeachersListWidget->setCurrentRow(selectedTeachersListWidget->count()-1);
00258 }
00259 
00260 void ModifyActivityForm::removeTeacher()
00261 {
00262        if(selectedTeachersListWidget->count()<=0 || selectedTeachersListWidget->currentRow()<0 ||
00263         selectedTeachersListWidget->currentRow()>=selectedTeachersListWidget->count())
00264               return;
00265 
00266        int i=selectedTeachersListWidget->currentRow();
00267        selectedTeachersListWidget->setCurrentRow(-1);
00268        QListWidgetItem* item=selectedTeachersListWidget->takeItem(i);
00269        delete item;
00270        if(i<selectedTeachersListWidget->count())
00271               selectedTeachersListWidget->setCurrentRow(i);
00272        else
00273               selectedTeachersListWidget->setCurrentRow(selectedTeachersListWidget->count()-1);
00274 }
00275 
00276 void ModifyActivityForm::addStudents()
00277 {
00278        if(allStudentsListWidget->currentRow()<0 || allStudentsListWidget->currentRow()>=allStudentsListWidget->count())
00279               return;
00280 
00281        assert(canonicalStudentsSetsNames.count()==allStudentsListWidget->count());
00282        QString sn=canonicalStudentsSetsNames.at(allStudentsListWidget->currentRow());
00283 
00284        for(int i=0; i<selectedStudentsListWidget->count(); i++)
00285               if(selectedStudentsListWidget->item(i)->text()==sn)
00286                      return;
00287 
00288        selectedStudentsListWidget->addItem(sn);
00289        selectedStudentsListWidget->setCurrentRow(selectedStudentsListWidget->count()-1);
00290 }
00291 
00292 void ModifyActivityForm::removeStudents()
00293 {
00294        if(selectedStudentsListWidget->count()<=0 || selectedStudentsListWidget->currentRow()<0 ||
00295         selectedStudentsListWidget->currentRow()>=selectedStudentsListWidget->count())
00296               return;
00297 
00298        int i=selectedStudentsListWidget->currentRow();
00299        selectedStudentsListWidget->setCurrentRow(-1);
00300        QListWidgetItem* item=selectedStudentsListWidget->takeItem(i);
00301        delete item;
00302        if(i<selectedStudentsListWidget->count())
00303               selectedStudentsListWidget->setCurrentRow(i);
00304        else
00305               selectedStudentsListWidget->setCurrentRow(selectedStudentsListWidget->count()-1);
00306 }
00307 
00308 void ModifyActivityForm::addActivityTag()
00309 {
00310        if(allActivityTagsListWidget->currentRow()<0 || allActivityTagsListWidget->currentRow()>=allActivityTagsListWidget->count())
00311               return;
00312 
00313        for(int i=0; i<selectedActivityTagsListWidget->count(); i++)
00314               if(selectedActivityTagsListWidget->item(i)->text()==allActivityTagsListWidget->currentItem()->text())
00315                      return;
00316 
00317        selectedActivityTagsListWidget->addItem(allActivityTagsListWidget->currentItem()->text());
00318        selectedActivityTagsListWidget->setCurrentRow(selectedActivityTagsListWidget->count()-1);
00319 }
00320 
00321 void ModifyActivityForm::removeActivityTag()
00322 {
00323        if(selectedActivityTagsListWidget->count()<=0 || selectedActivityTagsListWidget->currentRow()<0 ||
00324         selectedActivityTagsListWidget->currentRow()>=selectedActivityTagsListWidget->count())
00325               return;
00326 
00327        int i=selectedActivityTagsListWidget->currentRow();
00328        selectedActivityTagsListWidget->setCurrentRow(-1);
00329        QListWidgetItem* item=selectedActivityTagsListWidget->takeItem(i);
00330        delete item;
00331        if(i<selectedActivityTagsListWidget->count())
00332               selectedActivityTagsListWidget->setCurrentRow(i);
00333        else
00334               selectedActivityTagsListWidget->setCurrentRow(selectedActivityTagsListWidget->count()-1);
00335 }
00336 
00337 void ModifyActivityForm::updateSubjectsComboBox()
00338 {
00339        int i=0, j=-1;
00340        subjectsComboBox->clear();
00341        for(int k=0; k<gt.rules.subjectsList.size(); k++, i++){
00342               Subject* sbj=gt.rules.subjectsList[k];
00343               subjectsComboBox->addItem(sbj->name);
00344               if(sbj->name==this->_subject)
00345                      j=i;
00346        }
00347        assert(j!=-1);
00348        subjectsComboBox->setCurrentIndex(j);
00349 }
00350 
00351 void ModifyActivityForm::updateActivityTagsListWidget()
00352 {
00353        allActivityTagsListWidget->clear();
00354        for(int i=0; i<gt.rules.activityTagsList.size(); i++){
00355               ActivityTag* at=gt.rules.activityTagsList[i];
00356               allActivityTagsListWidget->addItem(at->name);
00357        }
00358               
00359        selectedActivityTagsListWidget->clear();
00360        for(QStringList::Iterator it=this->_activityTags.begin(); it!=this->_activityTags.end(); it++)
00361               selectedActivityTagsListWidget->addItem(*it);
00362 }
00363 
00364 void ModifyActivityForm::showYearsChanged()
00365 {
00366        updateStudentsListWidget();
00367 }
00368 
00369 void ModifyActivityForm::showGroupsChanged()
00370 {
00371        updateStudentsListWidget();
00372 }
00373 
00374 void ModifyActivityForm::showSubgroupsChanged()
00375 {
00376        updateStudentsListWidget();
00377 }
00378 
00379 void ModifyActivityForm::updateStudentsListWidget()
00380 {
00381        const int INDENT=2;
00382 
00383        bool showYears=showYearsCheckBox->isChecked();
00384        bool showGroups=showGroupsCheckBox->isChecked();
00385        bool showSubgroups=showSubgroupsCheckBox->isChecked();
00386 
00387        allStudentsListWidget->clear();
00388        canonicalStudentsSetsNames.clear();
00389        for(int i=0; i<gt.rules.yearsList.size(); i++){
00390               StudentsYear* sty=gt.rules.yearsList[i];
00391               if(showYears){
00392                      allStudentsListWidget->addItem(sty->name);
00393                      canonicalStudentsSetsNames.append(sty->name);
00394               }
00395               for(int j=0; j<sty->groupsList.size(); j++){
00396                      StudentsGroup* stg=sty->groupsList[j];
00397                      if(showGroups){
00398                             QString begin=QString("");
00399                             QString end=QString("");
00400                             begin=QString(INDENT, ' ');
00401                             allStudentsListWidget->addItem(begin+stg->name+end);
00402                             canonicalStudentsSetsNames.append(stg->name);
00403                      }
00404                      for(int k=0; k<stg->subgroupsList.size(); k++){
00405                             StudentsSubgroup* sts=stg->subgroupsList[k];
00406                             if(showSubgroups){
00407                                    QString begin=QString("");
00408                                    QString end=QString("");
00409                                    begin=QString(2*INDENT, ' ');
00410                                    allStudentsListWidget->addItem(begin+sts->name+end);
00411                                    canonicalStudentsSetsNames.append(sts->name);
00412                             }
00413                      }
00414               }
00415        }
00416        
00417        int q=allStudentsListWidget->verticalScrollBar()->minimum();
00418        allStudentsListWidget->verticalScrollBar()->setValue(q);
00419 }
00420 
00421 void ModifyActivityForm::cancel()
00422 {
00423        this->reject();
00424 }
00425 
00426 void ModifyActivityForm::ok()
00427 {
00428        //teachers
00429        QStringList teachers_names;
00430        if(selectedTeachersListWidget->count()<=0){
00431               int t=QMessageBox::question(this, tr("FET question"),
00432                tr("Do you really want to have the activity without teacher(s)?"),
00433                QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes);
00434 
00435               if(t==QMessageBox::No)
00436                      return;
00437        }
00438        else{
00439               for(int i=0; i<selectedTeachersListWidget->count(); i++){
00440                      assert(gt.rules.searchTeacher(selectedTeachersListWidget->item(i)->text())>=0);
00441                      teachers_names.append(selectedTeachersListWidget->item(i)->text());
00442               }
00443        }
00444 
00445        //subject
00446        QString subject_name=subjectsComboBox->currentText();
00447        int subject_index=gt.rules.searchSubject(subject_name);
00448        if(subject_index<0){
00449               QMessageBox::warning(this, tr("FET information"),
00450                      tr("Invalid subject"));
00451               return;
00452        }
00453 
00454        //activity tag
00455        QStringList activity_tags_names;
00456        for(int i=0; i<selectedActivityTagsListWidget->count(); i++){
00457               assert(gt.rules.searchActivityTag(selectedActivityTagsListWidget->item(i)->text())>=0);
00458               activity_tags_names.append(selectedActivityTagsListWidget->item(i)->text());
00459        }
00460 
00461        //students
00462        QStringList students_names;
00463        if(selectedStudentsListWidget->count()<=0){
00464               int t=QMessageBox::question(this, tr("FET question"),
00465                tr("Do you really want to have the activity without student set(s)?"),
00466                QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes);
00467 
00468               if(t==QMessageBox::No)
00469                      return;
00470        }
00471        else{
00472               for(int i=0; i<selectedStudentsListWidget->count(); i++){
00473                      assert(gt.rules.searchStudentsSet(selectedStudentsListWidget->item(i)->text())!=NULL);
00474                      students_names.append(selectedStudentsListWidget->item(i)->text());
00475               }
00476        }
00477 
00478        int total_number_of_students=0;
00479        for(QStringList::Iterator it=students_names.begin(); it!=students_names.end(); it++){
00480               StudentsSet* ss=gt.rules.searchStudentsSet(*it);
00481               total_number_of_students+=ss->numberOfStudents;
00482        }
00483 
00484        int totalduration;
00485        int durations[MAX_SPLIT_OF_AN_ACTIVITY];
00486        bool active[MAX_SPLIT_OF_AN_ACTIVITY];
00487        int nsplit=splitSpinBox->value();
00488 
00489        totalduration=0;
00490        for(int i=0; i<nsplit; i++){
00491               durations[i]=dur(i)->value();
00492               active[i]=activ(i)->isChecked();
00493 
00494               totalduration+=durations[i];
00495        }
00496 
00497        if(nStudentsSpinBox->value()==-1){
00498               gt.rules.modifyActivity(this->_id, this->_activityGroupId, teachers_names, subject_name,
00499                activity_tags_names,students_names, nsplit, totalduration, durations, active,
00500                (nStudentsSpinBox->value()==-1), total_number_of_students);
00501        }
00502        else{
00503               gt.rules.modifyActivity(this->_id, this->_activityGroupId, teachers_names, subject_name,
00504                activity_tags_names,students_names, nsplit, totalduration, durations, active,
00505                (nStudentsSpinBox->value()==-1), nStudentsSpinBox->value());
00506        }
00507        
00508        PlanningChanged::increasePlanningCommunicationSpinBox();
00509        
00510        this->accept();
00511 }
00512 
00513 void ModifyActivityForm::clearTeachers()
00514 {
00515        selectedTeachersListWidget->clear();
00516 }
00517 
00518 void ModifyActivityForm::clearStudents()
00519 {
00520        selectedStudentsListWidget->clear();
00521 }
00522 
00523 void ModifyActivityForm::clearActivityTags()
00524 {
00525        selectedActivityTagsListWidget->clear();
00526 }
00527 
00528 void ModifyActivityForm::help()
00529 {
00530        QString s;
00531        
00532        s+=tr("Abbreviations in this dialog:");
00533        s+="\n\n";
00534        s+=tr("'Students' (the text near the spin box), means 'Number of students (-1 for automatic)'");
00535        s+="\n";
00536        s+=tr("'Split' means 'Is split into ... activities per week. This value cannot be changed."
00537         " If you need to modify it, please remove the corresponding activities and add a new split activity.'");
00538        s+="\n";
00539        s+=tr("The 'Duration' spin box and the 'Active' check box refer to each component of current activity, you can change "
00540         "them for each component, separately, by selecting the corresponding tab in the tab widget.");
00541        
00542        //show the message in a dialog
00543        QDialog dialog(this);
00544        
00545        dialog.setWindowTitle(tr("FET - help on modifying activity(ies)"));
00546 
00547        QVBoxLayout* vl=new QVBoxLayout(&dialog);
00548        QPlainTextEdit* te=new QPlainTextEdit();
00549        te->setPlainText(s);
00550        te->setReadOnly(true);
00551        QPushButton* pb=new QPushButton(tr("OK"));
00552 
00553        QHBoxLayout* hl=new QHBoxLayout(0);
00554        hl->addStretch(1);
00555        hl->addWidget(pb);
00556 
00557        vl->addWidget(te);
00558        vl->addLayout(hl);
00559        connect(pb, SIGNAL(clicked()), &dialog, SLOT(close()));
00560 
00561        dialog.resize(600,470);
00562        centerWidgetOnScreen(&dialog);
00563 
00564        setParentAndOtherThings(&dialog, this);
00565        dialog.exec();
00566 }