QString hostName()const{return m_host;}
/**returns whether the user is part of this role*/
- //TODO: return actual role membership!
- bool hasRole(QString)const{return false;}
+ bool hasRole(QString s)const{return userroles.contains(s);}
/**returns whether the user has a particular right*/
bool hasRight(Right)const;
{
return QDateTime::fromTime_t(end()).toString(QCoreApplication::translate("MOEvent","yyyy-MM-dd hh:mm ap","date/time format"));
}
-
-void MOEvent::setdefaultprice(QString str)
-{
- /*TODO: we have multiple prices now!
- QStringList ps=str.split(QCoreApplication::translate("MOEvent",".","price decimal dot"));
- qint64 prc=0;
- if(ps.size()>=1)prc=ps[0].toInt()*100;
- if(ps.size()>=2)prc+=ps[1].toInt();
- setdefaultprice(prc);*/
-}
/**returns the local regular expression for prices*/
QRegExp priceRegExp()const;
- /**set the price as string*/
- void setdefaultprice(QString);
-
/**returns whether the event is valid. an event can be invalid if it is uninitialized (negative ID) or the server request failed*/
bool isValid()const{return !eventid().isNull() && eventid().value()>0;}
};
/**called by the TemplateList transaction*/
static public function getList($trans)
{
- //TODO: filter by flags
$trans->settemplates(WOTemplateInfo::fromTableArraytemplate(WTtemplate::selectFromDB()));
}