Example #1
0
void dailyPrayer(double latud, int daylight, int user_month, int startDay_daylight, int startMonth_daylight, int endDay_daylight, int endMonth_daylight, double lst[], double param[], double Zonh, int dg0, int mg0, int yg0, double dhuhrInterval, double maghribInterval, int hour_format)
{
   int yh1,mh1,dh1,dayweek,i;

	   if (daylight == 1){ //if daylight savings is yes then check the daylight savings in the given dates.
		   param[5] = Zonh + daylightSavings(latud, dg0, user_month, startDay_daylight, startMonth_daylight, endDay_daylight, endMonth_daylight);
		   // add one hours for daylight savings in the timezone
	   } else param[5] = Zonh;

	   GDateAjust(&yg0,&mg0,&dg0);

	  G2HA(yg0,mg0,dg0,&yh1,&mh1,&dh1,&dayweek);
	  qDebug() << yh1 << mh1 << dh1;
	  qDebug() << ",";

	   qDebug() << yg0<<"-"<<mg0<<"-"<<dg0;


	   OmAlQrahr(yg0,mg0,dg0,param,lst);
      /*-------------------------------------*/
	    //dataout<<"\n"<<",";
	   qDebug() << ",";
	    for(i=1;i<=6;i++)
	    {
	     //Writime(dataout,lst[i]);
		 Writime(lst[i], i, dhuhrInterval, maghribInterval, hour_format);
	     //dataout<<",";
		 if(i<6)
		     qDebug() << ",";
	    }

	    qDebug() << "\n";
}
int ONVIF::SystemDateAndTime::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 6)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 6;
    } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 6)
            *reinterpret_cast<int*>(_a[0]) = -1;
        _id -= 6;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< DateTimeType*>(_v) = dateTimeType(); break;
        case 1: *reinterpret_cast< bool*>(_v) = daylightSavings(); break;
        case 2: *reinterpret_cast< QString*>(_v) = tz(); break;
        case 3: *reinterpret_cast< QDateTime*>(_v) = utcTime(); break;
        case 4: *reinterpret_cast< QDateTime*>(_v) = localTime(); break;
        case 5: *reinterpret_cast< bool*>(_v) = result(); break;
        default: break;
        }
        _id -= 6;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: setDateTimeType(*reinterpret_cast< DateTimeType*>(_v)); break;
        case 1: setDaylightSavings(*reinterpret_cast< bool*>(_v)); break;
        case 2: setTz(*reinterpret_cast< QString*>(_v)); break;
        case 3: setutcTime(*reinterpret_cast< QDateTime*>(_v)); break;
        case 4: setlocalTime(*reinterpret_cast< QDateTime*>(_v)); break;
        case 5: setResult(*reinterpret_cast< bool*>(_v)); break;
        default: break;
        }
        _id -= 6;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 6;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 6;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 6;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 6;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 6;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 6;
    } else if (_c == QMetaObject::RegisterPropertyMetaType) {
        if (_id < 6)
            *reinterpret_cast<int*>(_a[0]) = -1;
        _id -= 6;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}
Example #3
0
void monthlyPrayer(double latud, int daylight, int user_month, int startDay_daylight, int startMonth_daylight, int endDay_daylight, int endMonth_daylight, double lst[], double param[], double Zonh, int dg0, int mg0, int yg0, double dhuhrInterval, double maghribInterval, int hour_format)
{
   int yh1,mh1,dh1,dayweek,i,day,nd;

   	   if((mg0==1)||(mg0==3) || (mg0==5) ||(mg0==7)||(mg0==8)||(mg0==10)||(mg0==12))
           nd=31;
       else if((mg0==4)||(mg0==6)||(mg0==9)||(mg0==11))
           nd=30;
       else if(mg0==2) {
              if(yg0%4==0)
                nd=29;
              else
                  nd=28;
           }



	   dg0 = 0; //start to show the prayer times from first day of the month
	for(day=1;day<=nd;day++)
	{
		dg0++;

	   if (daylight == 1){ //if daylight savings is yes then check the daylight savings in the given dates.
		   param[5] = Zonh + daylightSavings(latud, dg0, user_month, startDay_daylight, startMonth_daylight, endDay_daylight, endMonth_daylight);
		   // add one hours for daylight savings in the timezone
	   } else param[5] = Zonh;


	   GDateAjust(&yg0,&mg0,&dg0);

	  G2HA(yg0,mg0,dg0,&yh1,&mh1,&dh1,&dayweek);
	  qDebug() << yh1 << mh1 << dh1;
	  qDebug() << ",";

	   qDebug()<<yg0<<"-"<<mg0<<"-"<<dg0;


	   OmAlQrahr(yg0,mg0,dg0,param,lst);
      /*-------------------------------------*/
	    //dataout<<"\n"<<",";
		qDebug()<<",";
	    for(i=1;i<=6;i++)
	    {
	     //Writime(dataout,lst[i]);
		 Writime(lst[i], i, dhuhrInterval, maghribInterval, hour_format);
	     //dataout<<",";
		 if(i<6)
		 qDebug() << ",";
	    }

		qDebug() << "\n";
	}

}