Logo Search packages:      
Sourcecode: fet version File versions

bool Rules::addSimpleActivity ( int  _id,
int  _activityGroupId,
const QStringList &  _teachersNames,
const QString &  _subjectName,
const QString &  _subjectTagName,
const QStringList &  _studentsNames,
int  _duration,
int  _totalDuration,
int  _parity,
int  _preferredDay,
int  _preferredHour 

Adds a new indivisible activity (not split) to the list of activities. (It can add a subactivity of a split activity) Returns true if successful or false if the maximum number of activities was reached. There is automatically added a ConstraintActivityPreferredTime, if necessary

Definition at line 1410 of file rules.cpp.

References activitiesList, addTimeConstraint(), and internalStructureComputed.

Referenced by read().

                           : PARITY_WEEKLY or PARITY_BIWEEKLY*/
      int _preferredDay,
      int _preferredHour)
      assert(_parity==PARITY_WEEKLY || _parity==PARITY_BIWEEKLY); //weekly or bi-weekly

      Activity *act=new Activity(*this, _id, _activityGroupId, _teachersNames, _subjectName, _subjectTagName,
            _studentsNames, _duration, _totalDuration, _parity);


      if(_preferredDay>=0 || _preferredHour>=0){
            TimeConstraint *ctr=new ConstraintActivityPreferredTime(1.0, false, _id, _preferredDay, _preferredHour);
            bool tmp=this->addTimeConstraint(ctr);


      return true;

Generated by  Doxygen 1.6.0   Back to index