本文整理汇总了C++中CEvent::setDateStart方法的典型用法代码示例。如果您正苦于以下问题:C++ CEvent::setDateStart方法的具体用法?C++ CEvent::setDateStart怎么用?C++ CEvent::setDateStart使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CEvent
的用法示例。
在下文中一共展示了CEvent::setDateStart方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: cacheKey
std::vector<CEvent *> OrganizerCalendarDatabaseAccess::getEvents(int calId, std::string guid, int &pErrorCode)
{
std::vector<CEvent*> listEvent;
OrganizerGuidCacheKey cacheKey(calId, E_EVENT, QString::fromStdString(guid));
if (m_dbCache->containsEventVector(cacheKey))
{
// found in cache
m_dbCache->takeEventVector(cacheKey, listEvent);
return listEvent;
}
const int columnNumber = 49;
CEvent *event = 0;
CAlarm *pAlarm = 0;
CRecurrence *pRec = 0;
int iI_EventCount = 0;
int iJ_EventCount = 0;
pErrorCode = CALENDAR_OPERATION_SUCCESSFUL;
std::vector<long> vCookie;
std::vector<std::string> vERule;
std::vector<std::string> vEdate;
std::vector<std::string> vRdate;
std::vector<std::string> vRRule;
QSqlQuery pQuery;
if (!pQuery.prepare(selectInnerJoinBatchGuid)) {
pErrorCode = CALENDAR_DATABASE_ERROR;
return listEvent;
}
pQuery.bindValue(":calId", QString::number(calId));
pQuery.bindValue(":compType", QString::number(E_EVENT));
pQuery.bindValue(":compUid", QString::fromStdString(guid));
bool ok = pQuery.exec();
sqliteErrorMapper(pQuery.lastError(), pErrorCode);
if (!ok)
return listEvent;
while (pQuery.next()) {
event = new CEvent();
pAlarm = new CAlarm();
pRec = new CRecurrence();
for (iJ_EventCount = 0; iJ_EventCount < columnNumber; ++iJ_EventCount) {
switch(iJ_EventCount) {
case 0: // ID1
event->setId(pQuery.value(iJ_EventCount).toString().toStdString());
break;
case 1:
break;
case 2: // ID3
event->setType(pQuery.value(iJ_EventCount).toInt());
break;
case 3: // ID4
event->setFlags(pQuery.value(iJ_EventCount).toInt());
break;
case 4: // ID5
event->setDateStart(pQuery.value(iJ_EventCount).toInt());
break;
case 5: // ID6
event->setDateEnd(pQuery.value(iJ_EventCount).toInt());
break;
case 6: // ID7
if (!pQuery.value(iJ_EventCount).toString().isEmpty())
event->setSummary(pQuery.value(iJ_EventCount).toString().toStdString());
break;
case 7: // ID8
if (!pQuery.value(iJ_EventCount).toString().isEmpty())
event->setLocation(pQuery.value(iJ_EventCount).toString().toStdString());
break;
case 8: // ID9
if (!pQuery.value(iJ_EventCount).toString().isEmpty())
event->setDescription(pQuery.value(iJ_EventCount).toString().toStdString());
break;
case 9: // ID10
event->setStatus(pQuery.value(iJ_EventCount).toInt());
break;
case 10: // ID11
if (!pQuery.value(iJ_EventCount).toString().isEmpty())
event->setGUid(pQuery.value(iJ_EventCount).toString().toStdString());
break;
case 11: // ID12
event->setUntil(pQuery.value(iJ_EventCount).toInt());
break;
case 12: // ID13
event->setAllDay(pQuery.value(iJ_EventCount).toInt());
break;
//.........这里部分代码省略.........