当前位置: 首页>>代码示例>>C++>>正文


C++ CalendarEvent::comment方法代码示例

本文整理汇总了C++中CalendarEvent::comment方法的典型用法代码示例。如果您正苦于以下问题:C++ CalendarEvent::comment方法的具体用法?C++ CalendarEvent::comment怎么用?C++ CalendarEvent::comment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CalendarEvent的用法示例。


在下文中一共展示了CalendarEvent::comment方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

bool CalendarEvent::operator==(const CalendarEvent &other) const
{
    // Storing a QDateTime to QSettings seems to lose time zone information. Lets ignore the time zone when
    // comparing or we'll never find ourselves again.
    QDateTime thisStartTime = m_startTime;
    if (other.startTime().timeSpec() == Qt::TimeZone)
        thisStartTime.setTimeZone(other.startTime().timeZone());
    QDateTime thisEndTime = m_endTime;
    if (other.endTime().timeSpec() == Qt::TimeZone)
        thisEndTime.setTimeZone(other.endTime().timeZone());
    QDateTime thisReminder = m_reminder;
        if (other.reminder().timeSpec() == Qt::TimeZone)
    thisReminder.setTimeZone(other.reminder().timeZone());
    return m_id == other.id()
            && m_title == other.title()
            && m_description == other.description()
            && thisStartTime == other.startTime()
            && thisEndTime == other.endTime()
            && thisReminder == other.reminder()
            && m_location == other.location()
            && m_calendar == other.calendar()
            && m_comment == other.comment()
            && m_guests == other.guests()
            && m_recurring == other.recurring()
            && m_isAllDay == other.isAllDay();
}
开发者ID:gitter-badger,项目名称:rockpool,代码行数:26,代码来源:calendarevent.cpp

示例2: diff

void CalendarEvent::diff(const CalendarEvent &other) const {
    QDateTime thisStartTime = m_startTime;
    if (other.startTime().timeSpec() == Qt::TimeZone)
        thisStartTime.setTimeZone(other.startTime().timeZone());
    QDateTime thisEndTime = m_endTime;
    if (other.endTime().timeSpec() == Qt::TimeZone)
        thisEndTime.setTimeZone(other.endTime().timeZone());
    QDateTime thisReminder = m_reminder;
        if (other.reminder().timeSpec() == Qt::TimeZone)
    thisReminder.setTimeZone(other.reminder().timeZone());

    if (m_id != other.id()) qDebug() << "id: " << m_id << " <> " << other.id();
    if (m_title != other.title()) qDebug() << "title: " << m_title << " <> " << other.title();
    if (m_description != other.description()) qDebug() << "description: " << m_description << " <> " << other.description();
    if (thisStartTime != other.startTime()) qDebug() << "startTime: " << thisStartTime << " <> " << other.startTime();
    if (thisEndTime != other.endTime()) qDebug() << "endTime: " << thisEndTime << " <> " << other.endTime();
    if (thisReminder != other.reminder()) qDebug() << "reminder: " << thisReminder << " <> " << other.reminder();
    if (m_location != other.location()) qDebug() << "location: " << m_location << " <> " << other.location();
    if (m_calendar != other.calendar()) qDebug() << "calendar: " << m_calendar << " <> " << other.calendar();
    if (m_comment != other.comment()) qDebug() << "comment: " << m_comment << " <> " << other.comment();
    if (m_guests != other.guests()) qDebug() << "guests: " << m_guests << " <> " << other.guests();
    if (m_recurring != other.recurring()) qDebug() << "recurring: " << m_recurring << " <> " << other.recurring();
    if (m_isAllDay != other.isAllDay()) qDebug() << "isAllDay: " << m_isAllDay << " <> " << other.isAllDay();
}
开发者ID:gitter-badger,项目名称:rockpool,代码行数:24,代码来源:calendarevent.cpp


注:本文中的CalendarEvent::comment方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。