--- a/agendainterface/agendautil/agendautil.pro Fri Apr 16 14:57:40 2010 +0300
+++ b/agendainterface/agendautil/agendautil.pro Mon May 03 12:30:32 2010 +0300
@@ -16,6 +16,7 @@
TARGET = agendainterface
TEMPLATE = lib
+CONFIG += hb
DEPENDPATH += . \
./src \
./inc
--- a/agendainterface/agendautil/inc/agendaentry.h Fri Apr 16 14:57:40 2010 +0300
+++ b/agendainterface/agendautil/inc/agendaentry.h Mon May 03 12:30:32 2010 +0300
@@ -32,6 +32,7 @@
class AgendaCategoryPrivate;
class AgendaEntryPrivate;
class AgendaRepeatRulePrivate;
+class AgendaGeoValuePrivate;
class XQCALENDAR_EXPORT AgendaAttendee
{
@@ -158,6 +159,30 @@
AgendaAlarmPrivate* d;
};
+class XQCALENDAR_EXPORT AgendaGeoValue
+{
+public:
+
+ AgendaGeoValue();
+ AgendaGeoValue(const AgendaGeoValue& other);
+ ~AgendaGeoValue();
+
+ void setLatLong(double latitude, double longitude);
+ void getLatLong(double& latitude, double& longitude) const;
+
+ bool isNull() const;
+
+ AgendaGeoValue& operator=(const AgendaGeoValue& other);
+ bool operator==(const AgendaGeoValue& other) const;
+ bool operator!=(const AgendaGeoValue& other) const;
+
+private:
+ void detach();
+
+private:
+ AgendaGeoValuePrivate* d;
+};
+
class XQCALENDAR_EXPORT AgendaRepeatRule
{
public:
@@ -210,11 +235,11 @@
void setInterval(int interval);
int interval() const;
- void setUntil(const QDate& date);
- QDate until() const;
+ void setUntil(const QDateTime& date);
+ QDateTime until() const;
- void setRepeatRuleStart(const QDate& date);
- QDate repeatRuleStart() const;
+ void setRepeatRuleStart(const QDateTime& dateTime);
+ QDateTime repeatRuleStart() const;
void setWeekStart(Day day);
Day weekStart() const;
@@ -349,6 +374,12 @@
void setCompletedDateTime(const QDateTime& dateTime);
QDateTime completedDateTime() const;
+
+ void setDTStamp(const QDateTime& dateTime);
+ QDateTime dtStamp() const;
+
+ void setGeoValue(const AgendaGeoValue& geoValue);
+ AgendaGeoValue geoValue() const;
int durationInSecs() const;
AgendaEntry& operator=(const AgendaEntry& other);
--- a/agendainterface/agendautil/inc/agendaentry_p.h Fri Apr 16 14:57:40 2010 +0300
+++ b/agendainterface/agendautil/inc/agendaentry_p.h Mon May 03 12:30:32 2010 +0300
@@ -71,6 +71,20 @@
int m_timeOffset;
};
+class AgendaGeoValuePrivate
+{
+public:
+ AgendaGeoValuePrivate();
+
+public:
+ QAtomicInt ref;
+
+private:
+ friend class AgendaGeoValue;
+ double mLatitude;
+ double mLongitude;
+};
+
class AgendaRepeatRulePrivate
{
public:
@@ -86,8 +100,8 @@
QList<AgendaRepeatRule::Month> m_months;
QList<int> m_monthDays;
AgendaRepeatRule::Day m_weekStartDay;
- QDate m_startDate;
- QDate m_untilDate;
+ QDateTime m_startDate;
+ QDateTime m_untilDate;
int m_interval;
};
@@ -127,12 +141,14 @@
AgendaEntry::Status m_entryStatus;
AgendaAlarm m_alarm;
+ AgendaGeoValue m_geoValue;
AgendaRepeatRule m_repeatRule;
QList<QDate> m_rDates;
QDateTime m_recurrenceId;
QDateTime m_lastModTime;
QDateTime m_completedDateTime;
+ QDateTime m_dtStamp;
};
#endif // AGENDAENTRY_P_H
--- a/agendainterface/agendautil/inc/agendautil.h Fri Apr 16 14:57:40 2010 +0300
+++ b/agendainterface/agendautil/inc/agendautil.h Mon May 03 12:30:32 2010 +0300
@@ -106,10 +106,14 @@
QDateTime& endTime);
void getNextInstanceTimes(AgendaEntry& entry, QDateTime& startTime,
QDateTime& endTime);
-
+ void markDatesWithEvents(QDateTime rangeStart, QDateTime rangeEnd,
+ AgendaUtil::FilterFlags filter, QList<QDate>& dates);
+ bool areNoEntriesInCalendar();
static QDateTime minTime();
static QDateTime maxTime();
+ static bool isWorkdaysRepeatingEntry(const AgendaRepeatRule& repeatRule);
+
Q_SIGNALS:
void entriesChanged(QList<ulong> ids);
void entryAdded(ulong id);
--- a/agendainterface/agendautil/inc/agendautil_p.h Fri Apr 16 14:57:40 2010 +0300
+++ b/agendainterface/agendautil/inc/agendautil_p.h Mon May 03 12:30:32 2010 +0300
@@ -39,6 +39,7 @@
repeatDaily = 0,
repeatWeekly,
repeatBiWeekly,
+ repeatWorkdays,
repeatMonthly,
repeatYearly,
repeatOther,
@@ -83,6 +84,8 @@
AgendaUtil::FilterFlags filter);
QList<ulong> entryIds(AgendaUtil::FilterFlags filter);
+ void markDatesWithEvents(QDateTime rangeStart, QDateTime rangeEnd,
+ AgendaUtil::FilterFlags filter, QList<QDate>& dates);
QList<AgendaEntry> createEntryIdListForDay(
QDateTime day, AgendaUtil::FilterFlags filter);
@@ -94,9 +97,11 @@
QDateTime& endTime);
void getNextInstanceTimes(AgendaEntry& entry, QDateTime& startTime,
QDateTime& endTime);
-
+ bool areNoEntriesInCalendar();
static QDateTime minTime();
static QDateTime maxTime();
+
+ static bool isWorkdaysRepeatingEntry(const AgendaRepeatRule& repeatRule);
protected:
void Progress(TInt /*aPercentageCompleted*/) {};
@@ -150,6 +155,14 @@
bool resetLocalUid);
TCalTime generateRecurrenceIdFromEntry( CCalEntry& entry,
TCalTime instanceDate );
+
+ bool endsAtStartOfDay( CCalInstance* instance,
+ const TTime& day );
+
+ AgendaRepeatRule createAgendaRRuleFromTCalRRule(TCalRRule &calRRule);
+
+ TCalRRule createTCalRRuleFromAgendaRRule(AgendaRepeatRule &agendaRRule);
+
private:
AgendaUtil *q;
--- a/agendainterface/agendautil/src/agendaentry.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/agendainterface/agendautil/src/agendaentry.cpp Mon May 03 12:30:32 2010 +0300
@@ -732,6 +732,144 @@
/****************************************************
*
+ * AgendaGeoValue
+ *
+ ****************************************************/
+
+/*!
+ \class AgendaGeoValue
+
+ \brief Class representing the geo values.
+ This can be assigned to a calendar entry.
+*/
+
+/*!
+ Creates a geo value.
+*/
+AgendaGeoValue::AgendaGeoValue() : d(NULL)
+{
+}
+
+/*!
+ Creates a copy of a given alarm.
+
+ \param other alarm to be copied.
+*/
+AgendaGeoValue::AgendaGeoValue(const AgendaGeoValue& other) : d(other.d)
+{
+ if (d) {
+ d->ref.ref();
+ }
+}
+
+/*!
+ Destroys the alarm.
+*/
+AgendaGeoValue::~AgendaGeoValue()
+{
+ if (d && !d->ref.deref())
+ {
+ delete d;
+ }
+}
+
+/*!
+ Sets the latitude abd longitude values for a location
+ */
+void AgendaGeoValue::setLatLong(double latitude, double longitude)
+{
+ detach();
+ d->mLatitude = latitude;
+ d->mLongitude = longitude;
+}
+
+/*!
+ Returns the latitude and longitude of the geo value
+ */
+void AgendaGeoValue::getLatLong(double& latitude, double& longitude) const
+{
+ if (d) {
+ latitude = d->mLatitude;
+ longitude = d->mLongitude;
+ }
+}
+
+/*!
+ Returns true if the alarlm is empty; otherwise returns false.
+
+ \return true if the alarm is empty; otherwise returns false.
+ */
+bool AgendaGeoValue::isNull() const
+ {
+ return !d;
+ }
+
+/*!
+ Assigns \a other to this geovalue and returns a reference
+ to this alarm.
+
+ \param other the other geovalue
+ \return a reference to this geovalue
+ */
+AgendaGeoValue& AgendaGeoValue::operator=(const AgendaGeoValue& other)
+{
+ if (d == other.d) {
+ return *this;
+ }
+ if (other.d) {
+ other.d->ref.ref();
+ }
+ if (d && !d->ref.deref()) {
+ delete d;
+ }
+ d = other.d;
+ return *this;
+}
+
+/*!
+ Returns true if this AgendaGeoValue is equal to the \a other
+ info, otherwise returns false.
+ */
+bool AgendaGeoValue::operator==(const AgendaGeoValue& other) const
+{
+ if (d == other.d) {
+ return true;
+ }
+
+ if (!d || !other.d) {
+ return false;
+ }
+
+ return (d->mLatitude == other.d->mLatitude
+ && d->mLongitude == other.d->mLongitude);
+}
+
+/*!
+ Returns true if this AgendaGeoValue is not equal to the \a other
+ info, otherwise returns false.
+ */
+bool AgendaGeoValue::operator!=(const AgendaGeoValue& other) const
+{
+ return !(*this == other);
+}
+
+void AgendaGeoValue::detach()
+{
+ if (!d) {
+ d = new AgendaGeoValuePrivate;
+ } else {
+ qAtomicDetach(d);
+ }
+}
+
+AgendaGeoValuePrivate::AgendaGeoValuePrivate()
+:ref(1)
+{
+ // Nothing to do.
+}
+
+/****************************************************
+ *
* AgendaRepeatRule
*
****************************************************/
@@ -923,7 +1061,7 @@
\param date The start date
\sa repeatRuleStart()
*/
-void AgendaRepeatRule::setRepeatRuleStart(const QDate& date)
+void AgendaRepeatRule::setRepeatRuleStart(const QDateTime& date)
{
detach();
d->m_startDate = date;
@@ -933,13 +1071,13 @@
Gets the repeat's start date.
\return The start date on success;
- otherwise returns a null QDate.
+ otherwise returns a null QDateTime.
\sa setRepeatRuleStart()
*/
-QDate AgendaRepeatRule::repeatRuleStart() const
+QDateTime AgendaRepeatRule::repeatRuleStart() const
{
- return d ? d->m_startDate : QDate();
+ return d ? d->m_startDate : QDateTime();
}
/*!
@@ -948,7 +1086,7 @@
\parm date The end date
\sa setUntil()
*/
-void AgendaRepeatRule::setUntil(const QDate& date)
+void AgendaRepeatRule::setUntil(const QDateTime& date)
{
detach();
d->m_untilDate = date;
@@ -961,9 +1099,9 @@
otherwise returns a null QDate.
\sa setUntil()
*/
-QDate AgendaRepeatRule::until() const
+QDateTime AgendaRepeatRule::until() const
{
- return d ? d->m_untilDate : QDate();
+ return d ? d->m_untilDate : QDateTime();
}
/*!
@@ -1813,7 +1951,42 @@
}
/*!
- Returns
+ Sets the dtStamp time for agenda entry. Currently it is used to store the
+ creation time of the agenda entry for the type ENote.
+ */
+void AgendaEntry::setDTStamp(const QDateTime& dateTime)
+{
+ d->m_dtStamp = dateTime;
+}
+
+/*!
+ Returns the DT Stamp for the agenda entry.
+
+ \param QDateTime object containing the dt stamp.
+ */
+QDateTime AgendaEntry::dtStamp() const
+{
+ return d->m_dtStamp;
+}
+
+/*!
+ Sets the geo values for an entry
+ */
+void AgendaEntry::setGeoValue(const AgendaGeoValue& geoValue)
+{
+ d->m_geoValue = geoValue;
+}
+
+/*!
+ Returns the geo value if it has any
+ */
+AgendaGeoValue AgendaEntry::geoValue() const
+{
+ return d->m_geoValue;
+}
+
+/*!
+ Returns
duration of the meeting in seconds
\return int duration in seconds
*/
@@ -1888,7 +2061,8 @@
&& d->m_lastModTime == other.d->m_lastModTime
&& d->m_entryStatus == other.d->m_entryStatus
&& d->m_favourite == other.d->m_favourite
- && d->m_completedDateTime == other.d->m_completedDateTime);
+ && d->m_completedDateTime == other.d->m_completedDateTime
+ && d->m_geoValue == other.d->m_geoValue);
}
/*!
@@ -1909,6 +2083,7 @@
m_priority = -1;
m_favourite = 0;
m_alarm = AgendaAlarm();
+ m_geoValue = AgendaGeoValue();
}
bool AgendaEntryPrivate::deleteCategory(const AgendaCategory& category)
--- a/agendainterface/agendautil/src/agendautil.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/agendainterface/agendautil/src/agendautil.cpp Mon May 03 12:30:32 2010 +0300
@@ -390,8 +390,30 @@
}
}
+void AgendaUtil::markDatesWithEvents(QDateTime rangeStart, QDateTime rangeEnd,
+ AgendaUtil::FilterFlags filter, QList<QDate>& dates)
+{
+ if(d) {
+ return d->markDatesWithEvents(rangeStart,rangeEnd,filter,dates);
+ }
+}
+
/*!
- Returns the lower range limit of the time supported by the underlying platform for calendar entries
+ Returns true if there are no entries in the database else returns false
+
+ \return bool
+ */
+bool AgendaUtil::areNoEntriesInCalendar()
+{
+ if(d) {
+ return d->areNoEntriesInCalendar();
+ }
+ return false;
+}
+
+/*!
+ Returns the lower range limit of the time supported by the
+ underlying platform for calendar entries
\return QDateTime Lower range time
*/
@@ -401,7 +423,8 @@
}
/*!
- Returns the upper range limit of the time supported by the underlying platform for calendar entries
+ Returns the upper range limit of the time supported by the
+ underlying platform for calendar entries
\return QDateTime Upper range time
*/
@@ -411,6 +434,15 @@
}
/*!
+ Returns true if entry repeats on workdays else false
+
+ \return true if entry repeats on workdays else false
+ */
+bool AgendaUtil::isWorkdaysRepeatingEntry(const AgendaRepeatRule& repeatRule)
+{
+ return AgendaUtilPrivate::isWorkdaysRepeatingEntry(repeatRule);
+}
+/*!
\fn void XQMedia::entriesChanged(QList<ulong> ids)
This signal is emitted when an entry or entries have changed.
--- a/agendainterface/agendautil/src/agendautil_p.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/agendainterface/agendautil/src/agendautil_p.cpp Mon May 03 12:30:32 2010 +0300
@@ -16,6 +16,7 @@
*/
// System includes
+#include <hbextendedlocale.h>
#include <calsession.h>
#include <calinstance.h>
#include <CalenImporter>
@@ -41,6 +42,7 @@
_LIT8(KVersionVCal, "VERSION:1.0");
const TInt KReadDataAmount = 256;
const TInt KGuidLength = 30;
+const TInt KNoOfDaysInWeek = 7;
static const int startDateArray[2] = { 1900, 1};
static const int endDateArray[2] = { 2100, 1};
@@ -297,6 +299,18 @@
calTime.SetTimeLocalL(tempTime);
newEntry->SetLastModifiedDateL(calTime);
+ // Set the dtstamp time.It is used to set the cretaion time.
+ TCalTime creationCalTime;
+ QDateTime dtStamp = entry.dtStamp();
+ TDateTime creationDateTime(
+ dtStamp.date().year(),
+ static_cast<TMonth>(dtStamp.date().month() - 1),
+ dtStamp.date().day() - 1, dtStamp.time().hour(),
+ dtStamp.time().minute(), 0, 0);
+ TTime creationTTime(creationDateTime);
+ creationCalTime.SetTimeLocalL(creationTTime);
+ //newEntry->SetDTStampL(creationCalTime);
+
// Finally set the entry to the database using the entry view.
entryArray.AppendL(newEntry);
iCalEntryView->StoreL(entryArray, success);
@@ -397,60 +411,9 @@
// Set the repeat type if applicable.
if (AgendaRepeatRule::InvalidRule
!= entry.repeatRule().type()) {
- TCalRRule repeatRule(static_cast<TCalRRule::TType>(
- entry.repeatRule().type()));
- QDate ruleStartDate = entry.repeatRule().repeatRuleStart();
- QTime ruleStartTime = entry.startTime().time();
- TDateTime ruleStartCalendarDateTime(
- ruleStartDate.year(),
- static_cast<TMonth>(ruleStartDate.month() - 1),
- ruleStartDate.day() - 1, ruleStartTime.hour(),
- ruleStartTime.minute(), 0, 0);
-
- TCalTime ruleStartCalTime;
- ruleStartCalTime.SetTimeLocalL(
- TTime(ruleStartCalendarDateTime));
- repeatRule.SetDtStart(ruleStartCalTime);
- repeatRule.SetInterval(entry.repeatRule().interval());
- QDate repeatUntilDate = entry.repeatRule().until();
- TDateTime repeatTill(
- repeatUntilDate.year(),
- static_cast<TMonth> (repeatUntilDate.month() - 1),
- repeatUntilDate.day() - 1, ruleStartTime.hour(),
- ruleStartTime.minute(), 0, 0);
-
- TCalTime ruleRepeatTillTime;
- ruleRepeatTillTime.SetTimeLocalL(TTime(repeatTill));
- repeatRule.SetUntil(ruleRepeatTillTime);
-
- QList<AgendaRepeatRule::Day> qDays =
- entry.repeatRule().byDay();
- RArray<TDay> days;
- for (int i = 0; i < qDays.count(); i++) {
- days.Append(TDay(qDays[i]));
- }
- if (days.Count() > 0) {
- repeatRule.SetByDay(days);
- }
-
- QList<int> qmonthDay = entry.repeatRule().byMonthDay();
- RArray<TInt> monthDay;
- for (int i = 0; i < qmonthDay.count(); i++) {
- monthDay.Append(qmonthDay[i] - 1);
- }
- if (monthDay.Count() > 0) {
- repeatRule.SetByMonthDay(monthDay);
- }
-
- QList<AgendaRepeatRule::Month> qMonth =
- entry.repeatRule().byMonth();
- RArray<TMonth> month;
- for (int i = 0; i < qMonth.count(); i++) {
- month.Append(TMonth(qMonth[i]));
- }
- if (month.Count() > 0) {
- repeatRule.SetByMonth(month);
- }
+ AgendaRepeatRule agendaRepeatRule = entry.repeatRule();
+ TCalRRule repeatRule =
+ createTCalRRuleFromAgendaRRule(agendaRepeatRule);
newEntry->SetRRuleL(repeatRule);
}
@@ -458,6 +421,22 @@
newEntry->SetStatusL((CCalEntry::TStatus) entry.status());
newEntry->SetLastModifiedDateL();
+ // Save the geo value if any
+ AgendaGeoValue entryGeoValue = entry.geoValue();
+ if (!entryGeoValue.isNull()) {
+ CCalGeoValue* geoValue = CCalGeoValue::NewL();
+ double latitude;
+ double longitude;
+ entryGeoValue.getLatLong(latitude, longitude);
+
+ // set the values to symbian geo value
+ geoValue->SetLatLongL(latitude, longitude);
+
+ // set it to CCalentry
+ newEntry->SetGeoValueL(*geoValue);
+ delete geoValue;
+ }
+
// Finally set the entry to the database using the entry view.
entryArray.AppendL(newEntry);
iCalEntryView->StoreL(entryArray, success);
@@ -640,66 +619,32 @@
// Set the repeat type if applicable.
if (AgendaRepeatRule::InvalidRule
!= entry.repeatRule().type()) {
- TCalRRule repeatRule(static_cast<TCalRRule::TType>(
- entry.repeatRule().type()));
- QDate ruleStartDate = entry.repeatRule().repeatRuleStart();
- QTime ruleStartTime = entry.startTime().time();
- TDateTime ruleStartCalendarDateTime(
- ruleStartDate.year(),
- static_cast<TMonth>(ruleStartDate.month() - 1),
- ruleStartDate.day() - 1, ruleStartTime.hour(),
- ruleStartTime.minute(), 0, 0);
-
- TCalTime ruleStartCalTime;
- ruleStartCalTime.SetTimeLocalL(
- TTime(ruleStartCalendarDateTime));
- repeatRule.SetDtStart(ruleStartCalTime);
- repeatRule.SetInterval(entry.repeatRule().interval());
- QDate repeatUntilDate = entry.repeatRule().until();
- TDateTime repeatTill(
- repeatUntilDate.year(),
- static_cast<TMonth> (repeatUntilDate.month() - 1),
- repeatUntilDate.day() - 1, ruleStartTime.hour(),
- ruleStartTime.minute(), 0, 0);
-
- TCalTime ruleRepeatTillTime;
- ruleRepeatTillTime.SetTimeLocalL(TTime(repeatTill));
- repeatRule.SetUntil(ruleRepeatTillTime);
-
- QList<AgendaRepeatRule::Day> qDays =
- entry.repeatRule().byDay();
- RArray<TDay> days;
- for (int i = 0; i < qDays.count(); i++) {
- days.Append(TDay(qDays[i]));
- }
- if (days.Count() > 0) {
- repeatRule.SetByDay(days);
- }
-
- QList<int> qmonthDay = entry.repeatRule().byMonthDay();
- RArray<TInt> monthDay;
- for (int i = 0; i < qmonthDay.count(); i++) {
- monthDay.Append(qmonthDay[i] - 1);
- }
- if (monthDay.Count() > 0) {
- repeatRule.SetByMonthDay(monthDay);
- }
-
- QList<AgendaRepeatRule::Month> qMonth =
- entry.repeatRule().byMonth();
- RArray<TMonth> month;
- for (int i = 0; i < qMonth.count(); i++) {
- month.Append(TMonth(qMonth[i]));
- }
- if (month.Count() > 0) {
- repeatRule.SetByMonth(month);
- }
+ AgendaRepeatRule agendaRepeatRule = entry.repeatRule();
+ TCalRRule repeatRule =
+ createTCalRRuleFromAgendaRRule(agendaRepeatRule);
newEntry->SetRRuleL(repeatRule);
}
// Save the status of the entry.
newEntry->SetStatusL((CCalEntry::TStatus) entry.status());
newEntry->SetLastModifiedDateL();
+
+ // Save the geo value if any
+ AgendaGeoValue entryGeoValue = entry.geoValue();
+ if (!entryGeoValue.isNull()) {
+ CCalGeoValue* geoValue = CCalGeoValue::NewL();
+ double latitude;
+ double longitude;
+ entryGeoValue.getLatLong(latitude, longitude);
+
+ // set the values to symbian geo value
+ geoValue->SetLatLongL(latitude, longitude);
+
+ // set it to CCalentry
+ newEntry->SetGeoValueL(*geoValue);
+ delete geoValue;
+ }
+
// Finally set the entry to the database using the entry view.
entryArray.AppendL(newEntry);
iCalEntryView->StoreL(entryArray, success);
@@ -878,6 +823,14 @@
}
}
+ // Update the DTStamp time as the entry is modified.
+ if (entry.dtStamp().isValid()) {
+ TCalTime resetCreationTime;
+ TTime nullTime = Time::NullTTime();
+ resetCreationTime.SetTimeLocalL(nullTime);
+ calEntry->SetDTStampL(resetCreationTime);
+ }
+
// Check if the favourite property is changed and update the
// same.
if (entry.favourite() != storedEntry.favourite()) {
@@ -1025,64 +978,9 @@
calEntry->ClearRepeatingPropertiesL();
if(TCalRRule::EInvalid != entry.repeatRule().type()) {
- TCalRRule
- repeatRule(static_cast<TCalRRule::TType> (
- entry.repeatRule().type()));
- QDate ruleStartDate =
- entry.repeatRule().repeatRuleStart();
- QTime ruleStartTime = entry.startTime().time();
- TDateTime
- ruleStartCalendarDateTime(
- ruleStartDate.year(),
- static_cast<TMonth> (ruleStartDate.month()
- - 1),
- ruleStartDate.day() - 1,
- ruleStartTime.hour(),
- ruleStartTime.minute(), 0, 0);
-
- TCalTime ruleStartCalTime;
- ruleStartCalTime.SetTimeLocalL(
- TTime(ruleStartCalendarDateTime));
- repeatRule.SetDtStart(ruleStartCalTime);
- repeatRule.SetInterval(entry.repeatRule().interval());
- QDate repeatUntilDate = entry.repeatRule().until();
- TDateTime repeatTill(
- repeatUntilDate.year(),
- static_cast<TMonth>(repeatUntilDate.month() - 1),
- repeatUntilDate.day() - 1, ruleStartTime.hour(),
- ruleStartTime.minute(), 0, 0);
- TCalTime ruleRepeatTillTime;
- ruleRepeatTillTime.SetTimeLocalL(TTime(repeatTill));
- repeatRule.SetUntil(ruleRepeatTillTime);
-
- QList<AgendaRepeatRule::Day> qDays =
- entry.repeatRule().byDay();
- RArray<TDay> days;
- for (int i = 0; i < qDays.count(); i++) {
- days.Append(TDay(qDays[i]));
- }
- if (days.Count()> 0) {
- repeatRule.SetByDay(days);
- }
-
- QList<int> qmonthDay = entry.repeatRule().byMonthDay();
- RArray<TInt> monthDay;
- for (int i = 0; i < qmonthDay.count(); i++) {
- monthDay.Append(qmonthDay[i] - 1);
- }
- if (monthDay.Count()> 0) {
- repeatRule.SetByMonthDay(monthDay);
- }
-
- QList<AgendaRepeatRule::Month> qMonth =
- entry.repeatRule().byMonth();
- RArray<TMonth> month;
- for (int i = 0; i < qMonth.count(); i++) {
- month.Append(TMonth(qMonth[i]));
- }
- if (month.Count()> 0) {
- repeatRule.SetByMonth(month);
- }
+ AgendaRepeatRule agendaRepeatRule = entry.repeatRule();
+ TCalRRule repeatRule =
+ createTCalRRuleFromAgendaRRule(agendaRepeatRule);
calEntry->SetRRuleL(repeatRule);
}
}
@@ -1093,6 +991,23 @@
calEntry->SetFavouriteL(entry.favourite());
}
calEntry->SetLastModifiedDateL();
+
+ // Save the geo value if any
+ AgendaGeoValue entryGeoValue = entry.geoValue();
+ if (!entryGeoValue.isNull()) {
+ CCalGeoValue* geoValue = CCalGeoValue::NewL();
+ double latitude;
+ double longitude;
+ entryGeoValue.getLatLong(latitude, longitude);
+
+ // set the values to symbian geo value
+ geoValue->SetLatLongL(latitude, longitude);
+
+ // set it to CCalentry
+ calEntry->SetGeoValueL(*geoValue);
+ delete geoValue;
+ }
+
// Update the entry using the calen entry view.
RPointerArray<CCalEntry> entryArray;
CleanupClosePushL(entryArray);
@@ -1193,6 +1108,22 @@
calEntry->SetLocationL(TPtrC(reinterpret_cast<const TUint16 *> (
entry.location().utf16())));
+ // Save the geo value if any
+ AgendaGeoValue entryGeoValue = entry.geoValue();
+ if (!entryGeoValue.isNull()) {
+ CCalGeoValue* geoValue = CCalGeoValue::NewL();
+ double latitude;
+ double longitude;
+ entryGeoValue.getLatLong(latitude, longitude);
+
+ // set the values to symbian geo value
+ geoValue->SetLatLongL(latitude, longitude);
+
+ // set it to CCalentry
+ calEntry->SetGeoValueL(*geoValue);
+ delete geoValue;
+ }
+
// set the description
calEntry->SetDescriptionL(TPtrC(reinterpret_cast<const TUint16 *> (
entry.description().utf16())));
@@ -1228,66 +1159,12 @@
// Set the repeat rules
calEntry->ClearRepeatingPropertiesL();
- if(TCalRRule::EInvalid != entry.repeatRule().type()) {
- TCalRRule
- repeatRule(static_cast<TCalRRule::TType> (
- entry.repeatRule().type()));
- QDate ruleStartDate =
- entry.repeatRule().repeatRuleStart();
- QTime ruleStartTime = entry.startTime().time();
- TDateTime
- ruleStartCalendarDateTime(
- ruleStartDate.year(),
- static_cast<TMonth> (ruleStartDate.month()
- - 1),
- ruleStartDate.day() - 1,
- ruleStartTime.hour(),
- ruleStartTime.minute(), 0, 0);
-
- TCalTime ruleStartCalTime;
- ruleStartCalTime.SetTimeLocalL(
- TTime(ruleStartCalendarDateTime));
- repeatRule.SetDtStart(ruleStartCalTime);
- repeatRule.SetInterval(entry.repeatRule().interval());
- QDate repeatUntilDate = entry.repeatRule().until();
- TDateTime repeatTill(
- repeatUntilDate.year(),
- static_cast<TMonth>(repeatUntilDate.month() - 1),
- repeatUntilDate.day() - 1, ruleStartTime.hour(),
- ruleStartTime.minute(), 0, 0);
- TCalTime ruleRepeatTillTime;
- ruleRepeatTillTime.SetTimeLocalL(TTime(repeatTill));
- repeatRule.SetUntil(ruleRepeatTillTime);
-
- QList<AgendaRepeatRule::Day> qDays =
- entry.repeatRule().byDay();
- RArray<TDay> days;
- for (int i = 0; i < qDays.count(); i++) {
- days.Append(TDay(qDays[i]));
- }
- if (days.Count()> 0) {
- repeatRule.SetByDay(days);
- }
-
- QList<int> qmonthDay = entry.repeatRule().byMonthDay();
- RArray<TInt> monthDay;
- for (int i = 0; i < qmonthDay.count(); i++) {
- monthDay.Append(qmonthDay[i] - 1);
- }
- if (monthDay.Count()> 0) {
- repeatRule.SetByMonthDay(monthDay);
- }
-
- QList<AgendaRepeatRule::Month> qMonth =
- entry.repeatRule().byMonth();
- RArray<TMonth> month;
- for (int i = 0; i < qMonth.count(); i++) {
- month.Append(TMonth(qMonth[i]));
- }
- if (month.Count()> 0) {
- repeatRule.SetByMonth(month);
- }
+ if (TCalRRule::EInvalid != entry.repeatRule().type()) {
+ AgendaRepeatRule agendaRepeatRule = entry.repeatRule();
+ TCalRRule repeatRule =
+ createTCalRRuleFromAgendaRRule(agendaRepeatRule);
calEntry->SetRRuleL(repeatRule);
+
}
bool hasTimeOrDateCanged = (oldEntries[0]->StartTimeL().TimeUtcL() !=
@@ -1529,7 +1406,23 @@
calTime2.SetTimeLocalL(endCalTime);
newEntry->SetStartAndEndTimeL(calTime, calTime2);
-
+
+ // Save the geo value if any
+ AgendaGeoValue entryGeoValue = entry.geoValue();
+ if (!entryGeoValue.isNull()) {
+ CCalGeoValue* geoValue = CCalGeoValue::NewL();
+ double latitude;
+ double longitude;
+ entryGeoValue.getLatLong(latitude, longitude);
+
+ // set the values to symbian geo value
+ geoValue->SetLatLongL(latitude, longitude);
+
+ // set it to CCalentry
+ newEntry->SetGeoValueL(*geoValue);
+ delete geoValue;
+ }
+
// No need to update the repeat rule as it is an exception
// Store the favourite
@@ -1779,6 +1672,87 @@
return entryList;
}
+void AgendaUtilPrivate::markDatesWithEvents(QDateTime rangeStart,
+ QDateTime rangeEnd,AgendaUtil::FilterFlags filter, QList<QDate>& dates)
+{
+ RPointerArray<CCalInstance> instanceList;
+ CleanupClosePushL(instanceList);
+ CalCommon::TCalViewFilter filters = filter;
+ TCalTime startDateForInstanceSearch;
+ TCalTime endDateForInstanceSearch;
+
+ TDateTime startTime(rangeStart.date().year(),
+ TMonth(rangeStart.date().month() - 1),
+ rangeStart.date().day() - 1,
+ rangeStart.time().hour(),
+ rangeStart.time().minute(),
+ rangeStart.time().second(),
+ rangeStart.time().msec());
+
+ TDateTime endTime(rangeEnd.date().year(),
+ TMonth(rangeEnd.date().month() - 1),
+ rangeEnd.date().day() - 1,
+ rangeEnd.time().hour(),
+ rangeEnd.time().minute(),
+ rangeEnd.time().second(),
+ rangeEnd.time().msec());
+
+ startDateForInstanceSearch.SetTimeLocalL(startTime);
+ endDateForInstanceSearch.SetTimeLocalL(endTime);
+ CalCommon::TCalTimeRange searchTimeRange(
+ startDateForInstanceSearch,
+ endDateForInstanceSearch);
+
+ iCalInstanceView->FindInstanceL(instanceList, filters, searchTimeRange);
+
+ // Parse thru the list and mark the dates which have events
+ for (int i = 0; i < instanceList.Count(); i++) {
+ CCalEntry::TType type = instanceList[i]->Entry().EntryTypeL();
+ // Get the start time and end time of the events
+ TCalTime startCalTime = instanceList[i]->StartTimeL();
+ TCalTime endCalTime = instanceList[i]->EndTimeL();
+ TDateTime startDateTime = startCalTime.TimeLocalL().DateTime();
+ QDate startDate(startDateTime.Year(), startDateTime.Month()+1,
+ startDateTime.Day() + 1);
+ if (type == CCalEntry::EEvent || type == CCalEntry::EAppt ||
+ type == CCalEntry::EReminder) {
+ if(endsAtStartOfDay(instanceList[i], endCalTime.TimeLocalL())) {
+ // instance ends at start of endtime day, month view doesnt
+ // want to show event on this day
+ TDateTime endDateTime = endCalTime.TimeLocalL().DateTime();
+ endDateTime.SetMinute(endDateTime.Minute() - 1);
+ TTime time(endDateTime);
+ if (time <= startDateForInstanceSearch.TimeLocalL()) {
+ continue;
+ }
+ }
+
+ // Mark the required dates frm start date to end date
+ TTimeIntervalDays days = endCalTime.TimeLocalL().DaysFrom(startCalTime.TimeLocalL());
+ for (int j = -1; j < days.Int(); j++) {
+ QDate date = startDate.addDays(j+1);
+ if (date <= rangeEnd.date()) {
+ dates.append(date);
+ } else {
+ break;
+ }
+ }
+ } else if (type == CCalEntry::EAnniv) {
+ if (startDate <= rangeEnd.date()) {
+ dates.append(startDate);
+ }
+ } else if (type == CCalEntry::ETodo) {
+ // if start time is less that today, then mark it for today
+ if (startDate < QDate::currentDate()) {
+ dates.append(QDate::currentDate());
+ } else {
+ dates.append(startDate);
+ }
+ }
+ }
+ CleanupStack::PopAndDestroy();
+}
+
QList<AgendaEntry> AgendaUtilPrivate::createEntryIdListForDay( QDateTime day,
AgendaUtil::FilterFlags filter )
{
@@ -1794,13 +1768,53 @@
RPointerArray<CCalInstance> instanceList;
CleanupClosePushL(instanceList);
CalCommon::TCalViewFilter filters = filter;
- iCalInstanceView->FindInstanceL(instanceList, filters, dayRange);
-
+ // Check if the filter has todos also to be included
+ if(filter & CalCommon::EIncludeIncompletedTodos)
+ {
+ // Show the incompleted todos till date only for the current date
+ if(QDate::currentDate() == day.date())
+ {
+ // Remove the todos from the filter and fetch it separately
+ CalCommon::TCalViewFilter changedfilter =
+ filter ^ CalCommon::EIncludeIncompletedTodos;
+ iCalInstanceView->FindInstanceL(
+ instanceList, changedfilter, dayRange);
+ // Get the range from minimum datetime till the today
+ getDayRange(minTime(), day, dayRange);
+ iCalInstanceView->FindInstanceL(
+ instanceList ,CalCommon::EIncludeIncompletedTodos |
+ // only fetch the first instance for repeating to-dos!
+ CalCommon::EIncludeRptsNextInstanceOnly,
+ dayRange);
+ }
+ else if(QDate::currentDate() < day.date())
+ {
+ // Fetch all the instances including todos
+ // only if the day range is in future dates
+ iCalInstanceView->FindInstanceL(
+ instanceList, filters, dayRange);
+ }
+ else if(QDate::currentDate() > day.date())
+ {
+ // Remove todos from the filter
+ CalCommon::TCalViewFilter changedfilter =
+ filter ^ CalCommon::EIncludeIncompletedTodos;
+ // Fetch all the instances excluding todos
+ // only if the day range is in past dates
+ iCalInstanceView->FindInstanceL(
+ instanceList, changedfilter, dayRange);
+ }
+ }
+ else
+ {
+ iCalInstanceView->FindInstanceL(instanceList, filters, dayRange);
+ }
// Sort the list
sortInstanceList(instanceList);
for(TInt i = 0; i<instanceList.Count(); i++)
{
- entryList.append(createAgendaEntryFromCalEntry(instanceList[i]->Entry(), instanceList[i]));
+ entryList.append(createAgendaEntryFromCalEntry(
+ instanceList[i]->Entry(), instanceList[i]));
}
int count = instanceList.Count();
for (int i = count - 1; i >= 0; --i) {
@@ -2133,6 +2147,7 @@
currentInstanceDate.SetTimeLocalL( currentInstanceDate.TimeLocalL()-TTimeIntervalDays(1) );
break;
case repeatWeekly:
+ case repeatWorkdays:
currentInstanceDate.SetTimeLocalL( currentInstanceDate.TimeLocalL()-TTimeIntervalDays(7) );
break;
case repeatBiWeekly:
@@ -2322,6 +2337,7 @@
currentInstanceDate.SetTimeLocalL( currentInstanceDate.TimeLocalL()+TTimeIntervalDays(1) );
break;
case repeatWeekly:
+ case repeatWorkdays:
currentInstanceDate.SetTimeLocalL( currentInstanceDate.TimeLocalL()+TTimeIntervalDays(7) );
break;
case repeatBiWeekly:
@@ -2436,6 +2452,57 @@
}
/*!
+ Returns true if there are no entries in the database else returns false
+
+ \return bool
+ */
+bool AgendaUtilPrivate::areNoEntriesInCalendar()
+{
+ bool isEmpty;
+ // Query for the entries for entire range
+ RPointerArray<CCalInstance> instanceList;
+ CleanupClosePushL(instanceList);
+
+ // Create the filter
+ CalCommon::TCalViewFilter filters = AgendaUtil::IncludeAnniversaries
+ | AgendaUtil::IncludeAppointments
+ | AgendaUtil::IncludeEvents
+ | AgendaUtil::IncludeReminders
+ | AgendaUtil::IncludeIncompletedTodos;
+
+ // Set up the range
+ TCalTime startDateForInstanceSearch;
+ TCalTime endDateForInstanceSearch;
+
+ TDateTime startTime = TDateTime(
+ startDateArray[0], static_cast<TMonth>(startDateArray[1]),
+ 0, 0, 0, 0, 0);
+
+ TDateTime endTime = TDateTime(
+ endDateArray[0], static_cast<TMonth>(endDateArray[1]),
+ 0, 0, 0, 0, 0);
+
+ startDateForInstanceSearch.SetTimeLocalL(startTime);
+ endDateForInstanceSearch.SetTimeLocalL(endTime);
+ CalCommon::TCalTimeRange searchTimeRange(
+ startDateForInstanceSearch,
+ endDateForInstanceSearch);
+
+ // Fire a query
+ iCalInstanceView->FindInstanceL(
+ instanceList, filters, searchTimeRange);
+
+ // Check the list count
+ if (instanceList.Count()) {
+ isEmpty = false;
+ } else {
+ isEmpty = true;
+ }
+ CleanupStack::PopAndDestroy();
+ return isEmpty;
+}
+
+/*!
Returns the minimum time supported.
\return QDateTime holding the minimum supported time.
@@ -2480,6 +2547,54 @@
}
/*!
+ Returns true if entry repeats on workdays else false
+
+ \return true if entry repeats on workdays else false
+ */
+bool AgendaUtilPrivate::isWorkdaysRepeatingEntry(
+ const AgendaRepeatRule& repeatRule)
+{
+ bool status = true;
+ int fixedNum = 1;
+ int ruleday = 0;
+ HbExtendedLocale locale = HbExtendedLocale::system();
+
+ QString workDaysString = locale.workDays();
+ bool ok;
+ uint workDays = workDaysString.toUInt(&ok, 2);
+ if (!ok) {
+ return false;
+ }
+ QList<AgendaRepeatRule::Day> weekDaysFromRule = repeatRule.byDay();
+
+ QList<AgendaRepeatRule::Day> weekDaysFromLocale;
+
+ // "workDays" is a bit mask of seven bits indicating (by being set) which days are workdays.
+ // The least significant bit corresponds to Monday, the next bit to Tuesday and so on.
+ // "workDays" is converted into weekDaysFromLocale for comparing with "weekDaysFromRule".
+ for (TInt i = 0; i < KNoOfDaysInWeek; i++) {
+ ruleday = fixedNum << i;
+ if (workDays & ruleday) {
+ weekDaysFromLocale.append((AgendaRepeatRule::Day) i);
+ }
+ }
+
+ // Checks whether the device "workdays" are same as the event's repeat days.
+ if (weekDaysFromRule.count() == weekDaysFromLocale.count()) {
+ for (int i = 0; i < weekDaysFromLocale.count(); i++) {
+ if ((int) weekDaysFromLocale[i] != (int) weekDaysFromRule[i]) {
+ status = false;
+ break;
+ }
+ }
+ } else {
+ status = false;
+ }
+
+ return status;
+
+}
+/*!
Creates an AgendaEntry object from a given CCalEntry and CCalInstance.
\param calEntry Reference to a CCalEntry.
@@ -2575,7 +2690,7 @@
calAttendees[i]->StatusL()));
entry.addAttendee(attendee);
}
- CleanupStack::PopAndDestroy(&calAttendees);
+ CleanupStack::Pop(&calAttendees);
// Categories.
RPointerArray<CCalCategory> calCategories = calEntry.CategoryListL();
@@ -2614,58 +2729,13 @@
}
// Repear rule.
- TCalRRule rRule;
- calEntry.GetRRuleL(rRule);
- if (rRule.Type() != TCalRRule::EInvalid) {
- AgendaRepeatRule repeatRule;
- RArray<TDay> days;
- rRule.GetByDayL(days);
- QList<AgendaRepeatRule::Day> qDays;
- for (int i = 0; i < days.Count(); i++) {
- qDays.append(AgendaRepeatRule::Day(days[i]));
- }
- repeatRule.setByDay(qDays);
-
- RArray<TMonth> months;
- rRule.GetByMonthL(months);
- QList<AgendaRepeatRule::Month> qMonths;
- for (int i = 0; i < months.Count(); i++) {
- qMonths.append(AgendaRepeatRule::Month(months[i]));
- }
- repeatRule.setByMonth(qMonths);
-
- RArray<TInt> monthDays;
- rRule.GetByMonthDayL(monthDays);
- QList<int> qMonthDays;
- for (int i = 0; i < monthDays.Count(); i++) {
- qMonthDays.append(monthDays[i]);
- }
- repeatRule.setByMonthDay(qMonthDays);
-
- repeatRule.setType((AgendaRepeatRule::RuleType)(rRule.Type()));
- repeatRule.setInterval(rRule.Interval());
- TCalTime time = rRule.Until();
- TTime untilTime = time.TimeUtcL();
- QDate qUntilTime(
- untilTime.DateTime().Year(),
- untilTime.DateTime().Month() + 1,
- untilTime.DateTime().Day() + 1);
- repeatRule.setUntil(qUntilTime);
-
- TCalTime dayStart = rRule.DtStart();
- TTime ruleStart = dayStart.TimeUtcL();
- QDate qRuleStart(
- untilTime.DateTime().Year(),
- untilTime.DateTime().Month() + 1,
- untilTime.DateTime().Day() + 1);
- repeatRule.setRepeatRuleStart(qRuleStart);
-
- TDay wkDay = rRule.WkSt();
- AgendaRepeatRule::Day qWkDay = (AgendaRepeatRule::Day)wkDay;
- repeatRule.setWeekStart(qWkDay);
-
+ TCalRRule calRRule;
+ calEntry.GetRRuleL(calRRule);
+ if (calRRule.Type() != TCalRRule::EInvalid) {
+ AgendaRepeatRule agendaRepeatRule =
+ createAgendaRRuleFromTCalRRule(calRRule);
// Set the rule now.
- entry.setRepeatRule(repeatRule);
+ entry.setRepeatRule(agendaRepeatRule);
}
// Get the RDates.
@@ -2734,6 +2804,40 @@
completionTimeInlocal.DateTime().Second(), 0));
entry.setCompletedDateTime(completionDateTime);
+ // Set the dtStamp time for agenda entry. Currently dtstamp is used as
+ // creation time for the entry type ENote.
+ TCalTime dtStampTime = calEntry.DTStampL();
+ TTime dtStampTimeInLocal = dtStampTime.TimeLocalL();
+ QDateTime dtStampDateTime;
+ if (dtStampTimeInLocal != Time::NullTTime()) {
+ dtStampDateTime.setDate(
+ QDate(
+ dtStampTimeInLocal.DateTime().Year(),
+ dtStampTimeInLocal.DateTime().Month() + 1,
+ dtStampTimeInLocal.DateTime().Day() + 1));
+
+ dtStampDateTime.setTime(
+ QTime(
+ dtStampTimeInLocal.DateTime().Hour(),
+ dtStampTimeInLocal.DateTime().Minute(),
+ dtStampTimeInLocal.DateTime().Second()));
+ }
+ entry.setDTStamp(dtStampDateTime);
+
+ // Copy the geo value if it has any
+ CCalGeoValue* geoValue = calEntry.GeoValueL();
+ if (geoValue) {
+ AgendaGeoValue entryGeoValue;
+ double latitude;
+ double longitude;
+ geoValue->GetLatLong(latitude, longitude);
+ entryGeoValue.setLatLong(latitude, longitude);
+
+ // Set it to entry
+ entry.setGeoValue(entryGeoValue);
+ delete geoValue;
+ }
+
// Return the entry.
return entry;
}
@@ -3201,94 +3305,107 @@
RepeatIndex AgendaUtilPrivate::getRepeatIndex(const CCalEntry& aEntry)
{
- RepeatIndex repeatIndex( notRepeated );
-
- TCalRRule rrule;
-
- if( aEntry.GetRRuleL( rrule) )
- {
- TCalRRule::TType type( rrule.Type() );
- TInt repeatInterval( rrule.Interval() );
-
- // If repeat type of current note is not supported in Calendar,
- // default repeat value is "Other".
- repeatIndex = repeatOther;
-
- switch( type )
- {
- case TCalRRule::EDaily:
- {
- switch (repeatInterval)
- {
- case 1: repeatIndex = repeatDaily; break;
- case 7: repeatIndex = repeatWeekly; break;
- case 14: repeatIndex = repeatBiWeekly; break;
- default: break;
- }
- break;
- }
-
- case TCalRRule::EWeekly:
- {
- RArray<TDay> weekDays(7);
- rrule.GetByDayL( weekDays );
-
- if( weekDays.Count() == 1 ) // FIXME: AL - is this necessary?
- {
- switch( repeatInterval )
- {
- case 1: repeatIndex = repeatWeekly; break;
- case 2: repeatIndex = repeatBiWeekly; break;
- default: break;
- }
- }
-
- weekDays.Close();
-
- break;
- }
-
- case TCalRRule::EMonthly:
- {
- RArray<TInt> monthDays(31);
- rrule.GetByMonthDayL ( monthDays );
-
- if( monthDays.Count() == 1) // FIXME: AL - is this necessary?
- {
- switch( repeatInterval )
- {
- case 1: repeatIndex = repeatMonthly; break;
- // If interval of repeat is 12 months,
- // every year is shown in Note Editor,
- // because it means yearly repeat.
- case 12: repeatIndex = repeatYearly; break;
- default: break;
- }
- }
-
- monthDays.Close();
-
- break;
- }
- case TCalRRule::EYearly:
- {
- if( repeatInterval == 1 )
- {
- repeatIndex = repeatYearly;
- }
- break;
- }
-
- default:
- {
- // If repeat type of current note is not supported in Calendar,
- // default repeat value is "Other".
- repeatIndex = repeatOther;
- break;
- }
- }
- }
- return repeatIndex;
+ RepeatIndex repeatIndex(notRepeated);
+
+ TCalRRule rrule;
+
+ if (aEntry.GetRRuleL(rrule)) {
+ TCalRRule::TType type(rrule.Type());
+ TInt repeatInterval(rrule.Interval());
+
+ // If repeat type of current note is not supported in Calendar,
+ // default repeat value is "Other".
+ repeatIndex = repeatOther;
+
+ switch (type) {
+ case TCalRRule::EDaily: {
+ switch (repeatInterval) {
+ case 1:
+ repeatIndex = repeatDaily;
+ break;
+ case 7:
+ repeatIndex = repeatWeekly;
+ break;
+ case 14:
+ repeatIndex = repeatBiWeekly;
+ break;
+ default:
+ break;
+ }
+ break;
+ }
+
+ case TCalRRule::EWeekly: {
+ AgendaRepeatRule agendaRepeatRule =
+ createAgendaRRuleFromTCalRRule(rrule);
+ bool isWorkdaysRepeating =
+ isWorkdaysRepeatingEntry(agendaRepeatRule);
+
+ if (isWorkdaysRepeating) {
+ repeatIndex = repeatWorkdays;
+ } else {
+ RArray<TDay> weekDays(7);
+ rrule.GetByDayL(weekDays);
+ if (weekDays.Count() == 1) // FIXME: AL - is this necessary?
+ {
+ switch (repeatInterval) {
+ case 1:
+ repeatIndex = repeatWeekly;
+ break;
+ case 2:
+ repeatIndex = repeatBiWeekly;
+ break;
+ default:
+ break;
+ }
+ }
+
+ weekDays.Close();
+ }
+ break;
+ }
+
+ case TCalRRule::EMonthly: {
+ RArray<TInt> monthDays(31);
+ rrule.GetByMonthDayL(monthDays);
+
+ if (monthDays.Count() == 1) // FIXME: AL - is this necessary?
+ {
+ switch (repeatInterval) {
+ case 1:
+ repeatIndex = repeatMonthly;
+ break;
+ // If interval of repeat is 12 months,
+ // every year is shown in Note Editor,
+ // because it means yearly repeat.
+ case 12:
+ repeatIndex = repeatYearly;
+ break;
+ default:
+ break;
+ }
+ }
+
+ monthDays.Close();
+
+ break;
+ }
+ case TCalRRule::EYearly: {
+ if (repeatInterval == 1) {
+ repeatIndex = repeatYearly;
+ }
+ break;
+ }
+
+ default: {
+ // If repeat type of current note is not supported in Calendar,
+ // default repeat value is "Other".
+ repeatIndex = repeatOther;
+ break;
+ }
+ }
+ }
+ return repeatIndex;
}
TTime AgendaUtilPrivate::getPreviousInstanceForRepeatOther(CCalEntry& entry,
@@ -3510,12 +3627,13 @@
// Keep aDst's start date, but copy the start time (h/m/s) from aSrc to aDst.
TTime zero(TInt64(0));
TTime srcStartTime = src.StartTimeL().TimeUtcL();
- TTime dtStartDay = zero + dst.StartTimeL().TimeUtcL().DaysFrom(zero);
- TTimeIntervalMinutes dtStartTimeOfDay;
- srcStartTime.MinutesFrom(dtStartDay, dtStartTimeOfDay);
+ TTime srcStartDay = zero + src.StartTimeL().TimeUtcL().DaysFrom(zero);
+ TTime dstStartDay = zero + dst.StartTimeL().TimeUtcL().DaysFrom(zero);
+ TTimeIntervalMinutes dstStartTimeOfDay;
+ srcStartTime.MinutesFrom(srcStartDay, dstStartTimeOfDay);
TCalTime startTime;
- startTime.SetTimeUtcL( dtStartDay + (TTimeIntervalMinutes)dtStartTimeOfDay );
+ startTime.SetTimeUtcL( dstStartDay + (TTimeIntervalMinutes)dstStartTimeOfDay );
TTimeIntervalMinutes duration;
@@ -3538,8 +3656,15 @@
dst.SetDescriptionL(src.DescriptionL());
break;
case EntryDifferentLocation:
+ {
dst.SetLocationL(src.LocationL());
+ CCalGeoValue* geoValue = src.GeoValueL();
+ if (geoValue) {
+ dst.SetGeoValueL(*geoValue);
+ delete geoValue;
+ }
break;
+ }
default:
break;
}
@@ -3623,4 +3748,132 @@
return toRet;
}
+bool AgendaUtilPrivate::endsAtStartOfDay( CCalInstance* instance,
+ const TTime& day )
+{
+ TTime zero(TInt64(0));
+ TTime dayStart = zero + day.DaysFrom( zero );
+ const TTime startTime( instance->StartTimeL().TimeLocalL());
+ const TTime endTime( instance->EndTimeL().TimeLocalL());
+
+ const bool result( endTime > startTime && endTime == dayStart );
+
+ return result;
+}
+
+AgendaRepeatRule AgendaUtilPrivate::createAgendaRRuleFromTCalRRule(
+ TCalRRule &calRRule)
+{
+ AgendaRepeatRule agendaRepeatRule;
+ RArray<TDay> days;
+ calRRule.GetByDayL(days);
+ QList<AgendaRepeatRule::Day> qDays;
+ for (int i = 0; i < days.Count(); i++) {
+ qDays.append(AgendaRepeatRule::Day(days[i]));
+ }
+ agendaRepeatRule.setByDay(qDays);
+
+ RArray<TMonth> months;
+ calRRule.GetByMonthL(months);
+ QList<AgendaRepeatRule::Month> qMonths;
+ for (int i = 0; i < months.Count(); i++) {
+ qMonths.append(AgendaRepeatRule::Month(months[i]));
+ }
+ agendaRepeatRule.setByMonth(qMonths);
+
+ RArray<TInt> monthDays;
+ calRRule.GetByMonthDayL(monthDays);
+ QList<int> qMonthDays;
+ for (int i = 0; i < monthDays.Count(); i++) {
+ qMonthDays.append(monthDays[i]);
+ }
+ agendaRepeatRule.setByMonthDay(qMonthDays);
+
+ agendaRepeatRule.setType((AgendaRepeatRule::RuleType) (calRRule.Type()));
+ agendaRepeatRule.setInterval(calRRule.Interval());
+ TCalTime time = calRRule.Until();
+ TTime untilTime = time.TimeUtcL();
+ QDateTime repeatUntil(QDate(untilTime.DateTime().Year(),
+ untilTime.DateTime().Month() + 1,
+ untilTime.DateTime().Day() + 1),
+ QTime(untilTime.DateTime().Hour(),
+ untilTime.DateTime().Minute()));
+ agendaRepeatRule.setUntil(repeatUntil);
+
+ TCalTime dayStart = calRRule.DtStart();
+ TDateTime ruleStart = dayStart.TimeUtcL().DateTime();
+ QDateTime qRuleStart(QDate(ruleStart.Year(), ruleStart.Month() + 1,
+ ruleStart.Day() + 1),QTime(ruleStart.Hour(), ruleStart.Minute()));
+ agendaRepeatRule.setRepeatRuleStart(qRuleStart);
+
+ TDay wkDay = calRRule.WkSt();
+ AgendaRepeatRule::Day qWkDay = (AgendaRepeatRule::Day) wkDay;
+ agendaRepeatRule.setWeekStart(qWkDay);
+
+ return agendaRepeatRule;
+
+}
+
+TCalRRule AgendaUtilPrivate::createTCalRRuleFromAgendaRRule(
+ AgendaRepeatRule &agendaRRule)
+{
+ TCalRRule
+ repeatRule(
+ static_cast<TCalRRule::TType> (agendaRRule.type()));
+ QDateTime ruleStartDateTime = agendaRRule.repeatRuleStart();
+ TDateTime ruleStartCalendarDateTime(ruleStartDateTime.date().year(),
+ static_cast<TMonth> (ruleStartDateTime.date().month() - 1),
+ ruleStartDateTime.date().day() - 1,
+ ruleStartDateTime.time().hour(),
+ ruleStartDateTime.time().minute(),
+ 0,
+ 0);
+
+ TCalTime ruleStartCalTime;
+ ruleStartCalTime.SetTimeLocalL(TTime(ruleStartCalendarDateTime));
+ repeatRule.SetDtStart(ruleStartCalTime);
+ repeatRule.SetInterval(agendaRRule.interval());
+ QDateTime repeatUntilDate = agendaRRule.until();
+ TDateTime repeatTill(repeatUntilDate.date().year(),
+ static_cast<TMonth> (repeatUntilDate.date().month() - 1),
+ repeatUntilDate.date().day() - 1,
+ repeatUntilDate.time().hour(),
+ repeatUntilDate.time().minute(),
+ 0,
+ 0);
+
+ TCalTime ruleRepeatTillTime;
+ ruleRepeatTillTime.SetTimeLocalL(TTime(repeatTill));
+ repeatRule.SetUntil(ruleRepeatTillTime);
+
+ QList<AgendaRepeatRule::Day> qDays = agendaRRule.byDay();
+ RArray<TDay> days;
+ for (int i = 0; i < qDays.count(); i++) {
+ days.Append(TDay(qDays[i]));
+ }
+ if (days.Count() > 0) {
+ repeatRule.SetByDay(days);
+ }
+
+ QList<int> qmonthDay = agendaRRule.byMonthDay();
+ RArray<TInt> monthDay;
+ for (int i = 0; i < qmonthDay.count(); i++) {
+ monthDay.Append(qmonthDay[i] - 1);
+ }
+ if (monthDay.Count() > 0) {
+ repeatRule.SetByMonthDay(monthDay);
+ }
+
+ QList<AgendaRepeatRule::Month> qMonth = agendaRRule.byMonth();
+ RArray<TMonth> month;
+ for (int i = 0; i < qMonth.count(); i++) {
+ month.Append(TMonth(qMonth[i]));
+ }
+ if (month.Count() > 0) {
+ repeatRule.SetByMonth(month);
+ }
+
+ return repeatRule;
+}
+
// End of file --Don't remove this.
--- a/agendainterface/bwins/agendainterfaceu.def Fri Apr 16 14:57:40 2010 +0300
+++ b/agendainterface/bwins/agendainterfaceu.def Mon May 03 12:30:32 2010 +0300
@@ -14,151 +14,168 @@
?alarm@AgendaEntry@@QBE?AVAgendaAlarm@@XZ @ 13 NONAME ; class AgendaAlarm AgendaEntry::alarm(void) const
?responseRequested@AgendaAttendee@@QBE_NXZ @ 14 NONAME ; bool AgendaAttendee::responseRequested(void) const
?startTime@AgendaEntry@@QBE?AVQDateTime@@XZ @ 15 NONAME ; class QDateTime AgendaEntry::startTime(void) const
- ?getNextInstanceTimes@AgendaUtil@@QAEXAAVAgendaEntry@@AAVQDateTime@@1@Z @ 16 NONAME ; void AgendaUtil::getNextInstanceTimes(class AgendaEntry &, class QDateTime &, class QDateTime &)
- ?exportAsvCalendar@AgendaUtil@@QAE_NABVQString@@J@Z @ 17 NONAME ; bool AgendaUtil::exportAsvCalendar(class QString const &, long)
- ??_EAgendaAttendee@@UAE@I@Z @ 18 NONAME ; AgendaAttendee::~AgendaAttendee(unsigned int)
- ??9AgendaAlarm@@QBE_NABV0@@Z @ 19 NONAME ; bool AgendaAlarm::operator!=(class AgendaAlarm const &) const
- ?isNull@AgendaAlarm@@QBE_NXZ @ 20 NONAME ; bool AgendaAlarm::isNull(void) const
- ?extendedCategoryName@AgendaCategory@@QBE?AVQString@@XZ @ 21 NONAME ; class QString AgendaCategory::extendedCategoryName(void) const
- ?entryIds@AgendaUtil@@QAE?AV?$QList@K@@W4FilterFlags@1@@Z @ 22 NONAME ; class QList<unsigned long> AgendaUtil::entryIds(enum AgendaUtil::FilterFlags)
- ?isRepeating@AgendaEntry@@QAE_NXZ @ 23 NONAME ; bool AgendaEntry::isRepeating(void)
- ?clearRepeatingProperties@AgendaUtil@@QAEXAAVAgendaEntry@@@Z @ 24 NONAME ; void AgendaUtil::clearRepeatingProperties(class AgendaEntry &)
- ?deleteRepeatedEntry@AgendaUtil@@QAEXAAVAgendaEntry@@W4RecurrenceRange@1@@Z @ 25 NONAME ; void AgendaUtil::deleteRepeatedEntry(class AgendaEntry &, enum AgendaUtil::RecurrenceRange)
- ?tr@AgendaUtil@@SA?AVQString@@PBD0H@Z @ 26 NONAME ; class QString AgendaUtil::tr(char const *, char const *, int)
- ?description@AgendaEntry@@QBE?AVQString@@XZ @ 27 NONAME ; class QString AgendaEntry::description(void) const
- ??0AgendaUtil@@QAE@PAVQObject@@@Z @ 28 NONAME ; AgendaUtil::AgendaUtil(class QObject *)
- ?setUntil@AgendaRepeatRule@@QAEXABVQDate@@@Z @ 29 NONAME ; void AgendaRepeatRule::setUntil(class QDate const &)
+ ?geoValue@AgendaEntry@@QBE?AVAgendaGeoValue@@XZ @ 16 NONAME ; class AgendaGeoValue AgendaEntry::geoValue(void) const
+ ?getNextInstanceTimes@AgendaUtil@@QAEXAAVAgendaEntry@@AAVQDateTime@@1@Z @ 17 NONAME ; void AgendaUtil::getNextInstanceTimes(class AgendaEntry &, class QDateTime &, class QDateTime &)
+ ?exportAsvCalendar@AgendaUtil@@QAE_NABVQString@@J@Z @ 18 NONAME ; bool AgendaUtil::exportAsvCalendar(class QString const &, long)
+ ??_EAgendaAttendee@@UAE@I@Z @ 19 NONAME ; AgendaAttendee::~AgendaAttendee(unsigned int)
+ ??9AgendaAlarm@@QBE_NABV0@@Z @ 20 NONAME ; bool AgendaAlarm::operator!=(class AgendaAlarm const &) const
+ ?isNull@AgendaAlarm@@QBE_NXZ @ 21 NONAME ; bool AgendaAlarm::isNull(void) const
+ ?extendedCategoryName@AgendaCategory@@QBE?AVQString@@XZ @ 22 NONAME ; class QString AgendaCategory::extendedCategoryName(void) const
+ ?entryIds@AgendaUtil@@QAE?AV?$QList@K@@W4FilterFlags@1@@Z @ 23 NONAME ; class QList<unsigned long> AgendaUtil::entryIds(enum AgendaUtil::FilterFlags)
+ ?isRepeating@AgendaEntry@@QAE_NXZ @ 24 NONAME ; bool AgendaEntry::isRepeating(void)
+ ?clearRepeatingProperties@AgendaUtil@@QAEXAAVAgendaEntry@@@Z @ 25 NONAME ; void AgendaUtil::clearRepeatingProperties(class AgendaEntry &)
+ ?deleteRepeatedEntry@AgendaUtil@@QAEXAAVAgendaEntry@@W4RecurrenceRange@1@@Z @ 26 NONAME ; void AgendaUtil::deleteRepeatedEntry(class AgendaEntry &, enum AgendaUtil::RecurrenceRange)
+ ?tr@AgendaUtil@@SA?AVQString@@PBD0H@Z @ 27 NONAME ; class QString AgendaUtil::tr(char const *, char const *, int)
+ ?description@AgendaEntry@@QBE?AVQString@@XZ @ 28 NONAME ; class QString AgendaEntry::description(void) const
+ ??0AgendaUtil@@QAE@PAVQObject@@@Z @ 29 NONAME ; AgendaUtil::AgendaUtil(class QObject *)
?categories@AgendaEntry@@QAEAAV?$QList@VAgendaCategory@@@@XZ @ 30 NONAME ; class QList<class AgendaCategory> & AgendaEntry::categories(void)
?createException@AgendaUtil@@QAE_NABVAgendaEntry@@@Z @ 31 NONAME ; bool AgendaUtil::createException(class AgendaEntry const &)
?entriesChanged@AgendaUtil@@IAEXV?$QList@K@@@Z @ 32 NONAME ; void AgendaUtil::entriesChanged(class QList<unsigned long>)
- ?status@AgendaAttendee@@QBE?AW4StatusType@1@XZ @ 33 NONAME ; enum AgendaAttendee::StatusType AgendaAttendee::status(void) const
- ??0AgendaAlarm@@QAE@XZ @ 34 NONAME ; AgendaAlarm::AgendaAlarm(void)
- ?byMonth@AgendaRepeatRule@@QBE?AV?$QList@W4Month@AgendaRepeatRule@@@@XZ @ 35 NONAME ; class QList<enum AgendaRepeatRule::Month> AgendaRepeatRule::byMonth(void) const
- ?isNull@AgendaAttendee@@QBE_NXZ @ 36 NONAME ; bool AgendaAttendee::isNull(void) const
- ?setAddress@AgendaAttendee@@QAEXABVQString@@@Z @ 37 NONAME ; void AgendaAttendee::setAddress(class QString const &)
- ?trUtf8@AgendaUtil@@SA?AVQString@@PBD0H@Z @ 38 NONAME ; class QString AgendaUtil::trUtf8(char const *, char const *, int)
- ?setLastModifiedDateTime@AgendaEntry@@QAEXABVQDateTime@@@Z @ 39 NONAME ; void AgendaEntry::setLastModifiedDateTime(class QDateTime const &)
- ??0AgendaAlarm@@QAE@ABV0@@Z @ 40 NONAME ; AgendaAlarm::AgendaAlarm(class AgendaAlarm const &)
- ?setSummary@AgendaEntry@@QAEXABVQString@@@Z @ 41 NONAME ; void AgendaEntry::setSummary(class QString const &)
- ?setByMonthDay@AgendaRepeatRule@@QAEXABV?$QList@H@@@Z @ 42 NONAME ; void AgendaRepeatRule::setByMonthDay(class QList<int> const &)
- ??1AgendaEntry@@UAE@XZ @ 43 NONAME ; AgendaEntry::~AgendaEntry(void)
- ?setResponseRequested@AgendaAttendee@@QAEX_N@Z @ 44 NONAME ; void AgendaAttendee::setResponseRequested(bool)
- ??1AgendaRepeatRule@@QAE@XZ @ 45 NONAME ; AgendaRepeatRule::~AgendaRepeatRule(void)
- ?byMonthDay@AgendaRepeatRule@@QBE?AV?$QList@H@@XZ @ 46 NONAME ; class QList<int> AgendaRepeatRule::byMonthDay(void) const
- ?detach@AgendaEntry@@AAEXXZ @ 47 NONAME ; void AgendaEntry::detach(void)
- ??9AgendaAttendee@@QBE_NABV0@@Z @ 48 NONAME ; bool AgendaAttendee::operator!=(class AgendaAttendee const &) const
- ??9AgendaRepeatRule@@QBE_NABV0@@Z @ 49 NONAME ; bool AgendaRepeatRule::operator!=(class AgendaRepeatRule const &) const
- ?weekStart@AgendaRepeatRule@@QBE?AW4Day@1@XZ @ 50 NONAME ; enum AgendaRepeatRule::Day AgendaRepeatRule::weekStart(void) const
- ??4AgendaAlarm@@QAEAAV0@ABV0@@Z @ 51 NONAME ; class AgendaAlarm & AgendaAlarm::operator=(class AgendaAlarm const &)
- ?lastModifiedDateTime@AgendaEntry@@QBE?AVQDateTime@@XZ @ 52 NONAME ; class QDateTime AgendaEntry::lastModifiedDateTime(void) const
- ?attendees@AgendaEntry@@QBEABV?$QList@VAgendaAttendee@@@@XZ @ 53 NONAME ; class QList<class AgendaAttendee> const & AgendaEntry::attendees(void) const
- ?setInterval@AgendaRepeatRule@@QAEXH@Z @ 54 NONAME ; void AgendaRepeatRule::setInterval(int)
- ?updateEntry@AgendaUtil@@QAE_NABVAgendaEntry@@_N@Z @ 55 NONAME ; bool AgendaUtil::updateEntry(class AgendaEntry const &, bool)
- ?id@AgendaEntry@@QBEKXZ @ 56 NONAME ; unsigned long AgendaEntry::id(void) const
- ?setByDay@AgendaRepeatRule@@QAEXABV?$QList@W4Day@AgendaRepeatRule@@@@@Z @ 57 NONAME ; void AgendaRepeatRule::setByDay(class QList<enum AgendaRepeatRule::Day> const &)
- ?setType@AgendaRepeatRule@@QAEXW4RuleType@1@@Z @ 58 NONAME ; void AgendaRepeatRule::setType(enum AgendaRepeatRule::RuleType)
- ?interval@AgendaRepeatRule@@QBEHXZ @ 59 NONAME ; int AgendaRepeatRule::interval(void) const
- ?rDates@AgendaEntry@@QBE?AV?$QList@VQDate@@@@XZ @ 60 NONAME ; class QList<class QDate> AgendaEntry::rDates(void) const
- ??8AgendaAlarm@@QBE_NABV0@@Z @ 61 NONAME ; bool AgendaAlarm::operator==(class AgendaAlarm const &) const
- ?storeRepeatingEntry@AgendaUtil@@QAE_NABVAgendaEntry@@_N@Z @ 62 NONAME ; bool AgendaUtil::storeRepeatingEntry(class AgendaEntry const &, bool)
- ??0AgendaRepeatRule@@QAE@ABV0@@Z @ 63 NONAME ; AgendaRepeatRule::AgendaRepeatRule(class AgendaRepeatRule const &)
- ?setStatus@AgendaAttendee@@QAEXW4StatusType@1@@Z @ 64 NONAME ; void AgendaAttendee::setStatus(enum AgendaAttendee::StatusType)
- ?setStatus@AgendaEntry@@QAEXW4Status@1@@Z @ 65 NONAME ; void AgendaEntry::setStatus(enum AgendaEntry::Status)
- ?setExtendedCategoryName@AgendaCategory@@QAEXABVQString@@@Z @ 66 NONAME ; void AgendaCategory::setExtendedCategoryName(class QString const &)
- ?setDescription@AgendaEntry@@QAEXABVQString@@@Z @ 67 NONAME ; void AgendaEntry::setDescription(class QString const &)
- ?recurrenceId@AgendaEntry@@QAE?AVQDateTime@@XZ @ 68 NONAME ; class QDateTime AgendaEntry::recurrenceId(void)
- ?setRepeatRuleStart@AgendaRepeatRule@@QAEXABVQDate@@@Z @ 69 NONAME ; void AgendaRepeatRule::setRepeatRuleStart(class QDate const &)
- ?setByMonth@AgendaRepeatRule@@QAEXABV?$QList@W4Month@AgendaRepeatRule@@@@@Z @ 70 NONAME ; void AgendaRepeatRule::setByMonth(class QList<enum AgendaRepeatRule::Month> const &)
- ?qt_metacall@AgendaUtil@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 71 NONAME ; int AgendaUtil::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacast@AgendaUtil@@UAEPAXPBD@Z @ 72 NONAME ; void * AgendaUtil::qt_metacast(char const *)
- ?isNull@AgendaRepeatRule@@QBE_NXZ @ 73 NONAME ; bool AgendaRepeatRule::isNull(void) const
- ?getStaticMetaObject@AgendaUtil@@SAABUQMetaObject@@XZ @ 74 NONAME ; struct QMetaObject const & AgendaUtil::getStaticMetaObject(void)
- ??8AgendaAttendee@@QBE_NABV0@@Z @ 75 NONAME ; bool AgendaAttendee::operator==(class AgendaAttendee const &) const
- ?addCategory@AgendaEntry@@QAEXABVAgendaCategory@@@Z @ 76 NONAME ; void AgendaEntry::addCategory(class AgendaCategory const &)
- ?setLocation@AgendaEntry@@QAEXABVQString@@@Z @ 77 NONAME ; void AgendaEntry::setLocation(class QString const &)
- ?isTimedEntry@AgendaEntry@@QAE_NXZ @ 78 NONAME ; bool AgendaEntry::isTimedEntry(void)
- ?favourite@AgendaEntry@@QBEIXZ @ 79 NONAME ; unsigned int AgendaEntry::favourite(void) const
- ?durationInSecs@AgendaEntry@@QBEHXZ @ 80 NONAME ; int AgendaEntry::durationInSecs(void) const
- ??1AgendaUtil@@UAE@XZ @ 81 NONAME ; AgendaUtil::~AgendaUtil(void)
- ?category@AgendaCategory@@QBE?AW4CategoryType@1@XZ @ 82 NONAME ; enum AgendaCategory::CategoryType AgendaCategory::category(void) const
- ?entryAdded@AgendaUtil@@IAEXK@Z @ 83 NONAME ; void AgendaUtil::entryAdded(unsigned long)
- ?role@AgendaAttendee@@QBE?AW4ParticipantRole@1@XZ @ 84 NONAME ; enum AgendaAttendee::ParticipantRole AgendaAttendee::role(void) const
- ?type@AgendaEntry@@QBE?AW4Type@1@XZ @ 85 NONAME ; enum AgendaEntry::Type AgendaEntry::type(void) const
- ??0AgendaEntry@@QAE@W4Type@0@@Z @ 86 NONAME ; AgendaEntry::AgendaEntry(enum AgendaEntry::Type)
- ?detach@AgendaRepeatRule@@AAEXXZ @ 87 NONAME ; void AgendaRepeatRule::detach(void)
- ?error@AgendaUtil@@QBE?AW4Error@1@XZ @ 88 NONAME ; enum AgendaUtil::Error AgendaUtil::error(void) const
- ?trUtf8@AgendaUtil@@SA?AVQString@@PBD0@Z @ 89 NONAME ; class QString AgendaUtil::trUtf8(char const *, char const *)
- ?status@AgendaEntry@@QBE?AW4Status@1@XZ @ 90 NONAME ; enum AgendaEntry::Status AgendaEntry::status(void) const
- ??0AgendaEntry@@QAE@ABV0@@Z @ 91 NONAME ; AgendaEntry::AgendaEntry(class AgendaEntry const &)
- ??4AgendaAttendee@@QAEAAV0@ABV0@@Z @ 92 NONAME ; class AgendaAttendee & AgendaAttendee::operator=(class AgendaAttendee const &)
- ?address@AgendaAttendee@@QBE?AVQString@@XZ @ 93 NONAME ; class QString AgendaAttendee::address(void) const
- ?entryDeleted@AgendaUtil@@IAEXK@Z @ 94 NONAME ; void AgendaUtil::entryDeleted(unsigned long)
- ?summary@AgendaEntry@@QBE?AVQString@@XZ @ 95 NONAME ; class QString AgendaEntry::summary(void) const
- ?priority@AgendaEntry@@QBEHXZ @ 96 NONAME ; int AgendaEntry::priority(void) const
- ?fetchById@AgendaUtil@@QAE?AVAgendaEntry@@K@Z @ 97 NONAME ; class AgendaEntry AgendaUtil::fetchById(unsigned long)
- ?setCommonName@AgendaAttendee@@QAEXABVQString@@@Z @ 98 NONAME ; void AgendaAttendee::setCommonName(class QString const &)
- ?setMethod@AgendaEntry@@QAEXW4Method@1@@Z @ 99 NONAME ; void AgendaEntry::setMethod(enum AgendaEntry::Method)
- ?setRDates@AgendaEntry@@QAEXABV?$QList@VQDate@@@@@Z @ 100 NONAME ; void AgendaEntry::setRDates(class QList<class QDate> const &)
- ?parentEntry@AgendaUtil@@QAE?AVAgendaEntry@@AAV2@@Z @ 101 NONAME ; class AgendaEntry AgendaUtil::parentEntry(class AgendaEntry &)
- ?addAttendee@AgendaEntry@@QAEXABVAgendaAttendee@@@Z @ 102 NONAME ; void AgendaEntry::addAttendee(class AgendaAttendee const &)
- ?setCompleted@AgendaUtil@@QAEXAAVAgendaEntry@@_NAAVQDateTime@@@Z @ 103 NONAME ; void AgendaUtil::setCompleted(class AgendaEntry &, bool, class QDateTime &)
- ??0AgendaCategory@@QAE@XZ @ 104 NONAME ; AgendaCategory::AgendaCategory(void)
- ?repeatRuleStart@AgendaRepeatRule@@QBE?AVQDate@@XZ @ 105 NONAME ; class QDate AgendaRepeatRule::repeatRuleStart(void) const
- ?timeOffset@AgendaAlarm@@QBEHXZ @ 106 NONAME ; int AgendaAlarm::timeOffset(void) const
- ??0AgendaAttendee@@QAE@XZ @ 107 NONAME ; AgendaAttendee::AgendaAttendee(void)
- ?fetchEntriesInRange@AgendaUtil@@QAE?AV?$QList@VAgendaEntry@@@@VQDateTime@@0W4FilterFlags@1@@Z @ 108 NONAME ; class QList<class AgendaEntry> AgendaUtil::fetchEntriesInRange(class QDateTime, class QDateTime, enum AgendaUtil::FilterFlags)
- ?setAlarmSoundName@AgendaAlarm@@QAEXABVQString@@@Z @ 109 NONAME ; void AgendaAlarm::setAlarmSoundName(class QString const &)
- ?detach@AgendaAlarm@@AAEXXZ @ 110 NONAME ; void AgendaAlarm::detach(void)
- ?setWeekStart@AgendaRepeatRule@@QAEXW4Day@1@@Z @ 111 NONAME ; void AgendaRepeatRule::setWeekStart(enum AgendaRepeatRule::Day)
- ?cloneEntry@AgendaUtil@@QAEKABVAgendaEntry@@W4Type@2@@Z @ 112 NONAME ; unsigned long AgendaUtil::cloneEntry(class AgendaEntry const &, enum AgendaEntry::Type)
- ?setFavourite@AgendaEntry@@QAEXI@Z @ 113 NONAME ; void AgendaEntry::setFavourite(unsigned int)
- ?setRepeatRule@AgendaEntry@@QAEXABVAgendaRepeatRule@@@Z @ 114 NONAME ; void AgendaEntry::setRepeatRule(class AgendaRepeatRule const &)
- ?categories@AgendaEntry@@QBEABV?$QList@VAgendaCategory@@@@XZ @ 115 NONAME ; class QList<class AgendaCategory> const & AgendaEntry::categories(void) const
- ?tr@AgendaUtil@@SA?AVQString@@PBD0@Z @ 116 NONAME ; class QString AgendaUtil::tr(char const *, char const *)
- ??4AgendaRepeatRule@@QAEAAV0@ABV0@@Z @ 117 NONAME ; class AgendaRepeatRule & AgendaRepeatRule::operator=(class AgendaRepeatRule const &)
- ?setCompletedDateTime@AgendaEntry@@QAEXABVQDateTime@@@Z @ 118 NONAME ; void AgendaEntry::setCompletedDateTime(class QDateTime const &)
- ??0AgendaRepeatRule@@QAE@XZ @ 119 NONAME ; AgendaRepeatRule::AgendaRepeatRule(void)
- ?method@AgendaEntry@@QBE?AW4Method@1@XZ @ 120 NONAME ; enum AgendaEntry::Method AgendaEntry::method(void) const
- ?type@AgendaRepeatRule@@QBE?AW4RuleType@1@XZ @ 121 NONAME ; enum AgendaRepeatRule::RuleType AgendaRepeatRule::type(void) const
- ??0AgendaCategory@@QAE@W4CategoryType@0@@Z @ 122 NONAME ; AgendaCategory::AgendaCategory(enum AgendaCategory::CategoryType)
- ?commonName@AgendaAttendee@@QBE?AVQString@@XZ @ 123 NONAME ; class QString AgendaAttendee::commonName(void) const
- ?detach@AgendaCategory@@AAEXXZ @ 124 NONAME ; void AgendaCategory::detach(void)
- ?setRole@AgendaAttendee@@QAEXW4ParticipantRole@1@@Z @ 125 NONAME ; void AgendaAttendee::setRole(enum AgendaAttendee::ParticipantRole)
- ?detach@AgendaAttendee@@AAEXXZ @ 126 NONAME ; void AgendaAttendee::detach(void)
- ?maxTime@AgendaUtil@@SA?AVQDateTime@@XZ @ 127 NONAME ; class QDateTime AgendaUtil::maxTime(void)
- ?setCategory@AgendaCategory@@QAEXW4CategoryType@1@@Z @ 128 NONAME ; void AgendaCategory::setCategory(enum AgendaCategory::CategoryType)
- ?endTime@AgendaEntry@@QBE?AVQDateTime@@XZ @ 129 NONAME ; class QDateTime AgendaEntry::endTime(void) const
- ??9AgendaEntry@@QBE_NABV0@@Z @ 130 NONAME ; bool AgendaEntry::operator!=(class AgendaEntry const &) const
- ??0AgendaRepeatRule@@QAE@W4RuleType@0@@Z @ 131 NONAME ; AgendaRepeatRule::AgendaRepeatRule(enum AgendaRepeatRule::RuleType)
- ??9AgendaCategory@@QBE_NABV0@@Z @ 132 NONAME ; bool AgendaCategory::operator!=(class AgendaCategory const &) const
- ??0AgendaAttendee@@QAE@ABV0@@Z @ 133 NONAME ; AgendaAttendee::AgendaAttendee(class AgendaAttendee const &)
- ??0AgendaAttendee@@QAE@ABVQString@@@Z @ 134 NONAME ; AgendaAttendee::AgendaAttendee(class QString const &)
- ?importvCalendar@AgendaUtil@@QAEHABVQString@@AAVAgendaEntry@@@Z @ 135 NONAME ; int AgendaUtil::importvCalendar(class QString const &, class AgendaEntry &)
- ??_EAgendaUtil@@UAE@I@Z @ 136 NONAME ; AgendaUtil::~AgendaUtil(unsigned int)
- ?getPreviousInstanceTimes@AgendaUtil@@QAEXAAVAgendaEntry@@AAVQDateTime@@1@Z @ 137 NONAME ; void AgendaUtil::getPreviousInstanceTimes(class AgendaEntry &, class QDateTime &, class QDateTime &)
- ?attendees@AgendaEntry@@QAEAAV?$QList@VAgendaAttendee@@@@XZ @ 138 NONAME ; class QList<class AgendaAttendee> & AgendaEntry::attendees(void)
- ?staticMetaObject@AgendaUtil@@2UQMetaObject@@B @ 139 NONAME ; struct QMetaObject const AgendaUtil::staticMetaObject
- ?entriesDeleted@AgendaUtil@@IAEXH@Z @ 140 NONAME ; void AgendaUtil::entriesDeleted(int)
- ?until@AgendaRepeatRule@@QBE?AVQDate@@XZ @ 141 NONAME ; class QDate AgendaRepeatRule::until(void) const
- ?fetchAllEntries@AgendaUtil@@QAE?AV?$QList@VAgendaEntry@@@@W4FilterFlags@1@@Z @ 142 NONAME ; class QList<class AgendaEntry> AgendaUtil::fetchAllEntries(enum AgendaUtil::FilterFlags)
- ?setTimeOffset@AgendaAlarm@@QAEXH@Z @ 143 NONAME ; void AgendaAlarm::setTimeOffset(int)
- ??0AgendaEntry@@QAE@XZ @ 144 NONAME ; AgendaEntry::AgendaEntry(void)
- ?setPriority@AgendaEntry@@QAEXH@Z @ 145 NONAME ; void AgendaEntry::setPriority(int)
- ?setType@AgendaEntry@@QAEXW4Type@1@@Z @ 146 NONAME ; void AgendaEntry::setType(enum AgendaEntry::Type)
- ?setStartAndEndTime@AgendaEntry@@QAE_NABVQDateTime@@0@Z @ 147 NONAME ; bool AgendaEntry::setStartAndEndTime(class QDateTime const &, class QDateTime const &)
- ?deleteEntries@AgendaUtil@@QAEXAAVQDateTime@@0W4FilterFlags@1@@Z @ 148 NONAME ; void AgendaUtil::deleteEntries(class QDateTime &, class QDateTime &, enum AgendaUtil::FilterFlags)
- ?metaObject@AgendaUtil@@UBEPBUQMetaObject@@XZ @ 149 NONAME ; struct QMetaObject const * AgendaUtil::metaObject(void) const
- ?location@AgendaEntry@@QBE?AVQString@@XZ @ 150 NONAME ; class QString AgendaEntry::location(void) const
- ??0AgendaCategory@@QAE@ABV0@@Z @ 151 NONAME ; AgendaCategory::AgendaCategory(class AgendaCategory const &)
- ??4AgendaEntry@@QAEAAV0@ABV0@@Z @ 152 NONAME ; class AgendaEntry & AgendaEntry::operator=(class AgendaEntry const &)
- ??8AgendaCategory@@QBE_NABV0@@Z @ 153 NONAME ; bool AgendaCategory::operator==(class AgendaCategory const &) const
- ?createEntryIdListForDay@AgendaUtil@@QAE?AV?$QList@VAgendaEntry@@@@VQDateTime@@W4FilterFlags@1@@Z @ 154 NONAME ; class QList<class AgendaEntry> AgendaUtil::createEntryIdListForDay(class QDateTime, enum AgendaUtil::FilterFlags)
- ??_EAgendaCategory@@UAE@I@Z @ 155 NONAME ; AgendaCategory::~AgendaCategory(unsigned int)
- ?repeatRule@AgendaEntry@@QBE?AVAgendaRepeatRule@@XZ @ 156 NONAME ; class AgendaRepeatRule AgendaEntry::repeatRule(void) const
- ??1AgendaCategory@@UAE@XZ @ 157 NONAME ; AgendaCategory::~AgendaCategory(void)
- ?deleteEntry@AgendaUtil@@QAE_NK@Z @ 158 NONAME ; bool AgendaUtil::deleteEntry(unsigned long)
- ??1AgendaAttendee@@UAE@XZ @ 159 NONAME ; AgendaAttendee::~AgendaAttendee(void)
- ?byDay@AgendaRepeatRule@@QBE?AV?$QList@W4Day@AgendaRepeatRule@@@@XZ @ 160 NONAME ; class QList<enum AgendaRepeatRule::Day> AgendaRepeatRule::byDay(void) const
- ?completedDateTime@AgendaEntry@@QBE?AVQDateTime@@XZ @ 161 NONAME ; class QDateTime AgendaEntry::completedDateTime(void) const
- ?setRecurrenceId@AgendaEntry@@QAEXAAVQDateTime@@@Z @ 162 NONAME ; void AgendaEntry::setRecurrenceId(class QDateTime &)
+ ??0AgendaGeoValue@@QAE@XZ @ 33 NONAME ; AgendaGeoValue::AgendaGeoValue(void)
+ ?status@AgendaAttendee@@QBE?AW4StatusType@1@XZ @ 34 NONAME ; enum AgendaAttendee::StatusType AgendaAttendee::status(void) const
+ ?markDatesWithEvents@AgendaUtil@@QAEXVQDateTime@@0W4FilterFlags@1@AAV?$QList@VQDate@@@@@Z @ 35 NONAME ; void AgendaUtil::markDatesWithEvents(class QDateTime, class QDateTime, enum AgendaUtil::FilterFlags, class QList<class QDate> &)
+ ??9AgendaGeoValue@@QBE_NABV0@@Z @ 36 NONAME ; bool AgendaGeoValue::operator!=(class AgendaGeoValue const &) const
+ ??0AgendaAlarm@@QAE@XZ @ 37 NONAME ; AgendaAlarm::AgendaAlarm(void)
+ ?byMonth@AgendaRepeatRule@@QBE?AV?$QList@W4Month@AgendaRepeatRule@@@@XZ @ 38 NONAME ; class QList<enum AgendaRepeatRule::Month> AgendaRepeatRule::byMonth(void) const
+ ?isNull@AgendaAttendee@@QBE_NXZ @ 39 NONAME ; bool AgendaAttendee::isNull(void) const
+ ?setAddress@AgendaAttendee@@QAEXABVQString@@@Z @ 40 NONAME ; void AgendaAttendee::setAddress(class QString const &)
+ ?setRepeatRuleStart@AgendaRepeatRule@@QAEXABVQDateTime@@@Z @ 41 NONAME ; void AgendaRepeatRule::setRepeatRuleStart(class QDateTime const &)
+ ?trUtf8@AgendaUtil@@SA?AVQString@@PBD0H@Z @ 42 NONAME ; class QString AgendaUtil::trUtf8(char const *, char const *, int)
+ ?setLastModifiedDateTime@AgendaEntry@@QAEXABVQDateTime@@@Z @ 43 NONAME ; void AgendaEntry::setLastModifiedDateTime(class QDateTime const &)
+ ??0AgendaAlarm@@QAE@ABV0@@Z @ 44 NONAME ; AgendaAlarm::AgendaAlarm(class AgendaAlarm const &)
+ ?setSummary@AgendaEntry@@QAEXABVQString@@@Z @ 45 NONAME ; void AgendaEntry::setSummary(class QString const &)
+ ?setByMonthDay@AgendaRepeatRule@@QAEXABV?$QList@H@@@Z @ 46 NONAME ; void AgendaRepeatRule::setByMonthDay(class QList<int> const &)
+ ??1AgendaEntry@@UAE@XZ @ 47 NONAME ; AgendaEntry::~AgendaEntry(void)
+ ?setResponseRequested@AgendaAttendee@@QAEX_N@Z @ 48 NONAME ; void AgendaAttendee::setResponseRequested(bool)
+ ??1AgendaRepeatRule@@QAE@XZ @ 49 NONAME ; AgendaRepeatRule::~AgendaRepeatRule(void)
+ ?byMonthDay@AgendaRepeatRule@@QBE?AV?$QList@H@@XZ @ 50 NONAME ; class QList<int> AgendaRepeatRule::byMonthDay(void) const
+ ?detach@AgendaGeoValue@@AAEXXZ @ 51 NONAME ; void AgendaGeoValue::detach(void)
+ ?detach@AgendaEntry@@AAEXXZ @ 52 NONAME ; void AgendaEntry::detach(void)
+ ??9AgendaAttendee@@QBE_NABV0@@Z @ 53 NONAME ; bool AgendaAttendee::operator!=(class AgendaAttendee const &) const
+ ??9AgendaRepeatRule@@QBE_NABV0@@Z @ 54 NONAME ; bool AgendaRepeatRule::operator!=(class AgendaRepeatRule const &) const
+ ?weekStart@AgendaRepeatRule@@QBE?AW4Day@1@XZ @ 55 NONAME ; enum AgendaRepeatRule::Day AgendaRepeatRule::weekStart(void) const
+ ??4AgendaAlarm@@QAEAAV0@ABV0@@Z @ 56 NONAME ; class AgendaAlarm & AgendaAlarm::operator=(class AgendaAlarm const &)
+ ?lastModifiedDateTime@AgendaEntry@@QBE?AVQDateTime@@XZ @ 57 NONAME ; class QDateTime AgendaEntry::lastModifiedDateTime(void) const
+ ?attendees@AgendaEntry@@QBEABV?$QList@VAgendaAttendee@@@@XZ @ 58 NONAME ; class QList<class AgendaAttendee> const & AgendaEntry::attendees(void) const
+ ?setInterval@AgendaRepeatRule@@QAEXH@Z @ 59 NONAME ; void AgendaRepeatRule::setInterval(int)
+ ?updateEntry@AgendaUtil@@QAE_NABVAgendaEntry@@_N@Z @ 60 NONAME ; bool AgendaUtil::updateEntry(class AgendaEntry const &, bool)
+ ??8AgendaGeoValue@@QBE_NABV0@@Z @ 61 NONAME ; bool AgendaGeoValue::operator==(class AgendaGeoValue const &) const
+ ?id@AgendaEntry@@QBEKXZ @ 62 NONAME ; unsigned long AgendaEntry::id(void) const
+ ?setByDay@AgendaRepeatRule@@QAEXABV?$QList@W4Day@AgendaRepeatRule@@@@@Z @ 63 NONAME ; void AgendaRepeatRule::setByDay(class QList<enum AgendaRepeatRule::Day> const &)
+ ?setUntil@AgendaRepeatRule@@QAEXABVQDateTime@@@Z @ 64 NONAME ; void AgendaRepeatRule::setUntil(class QDateTime const &)
+ ?setType@AgendaRepeatRule@@QAEXW4RuleType@1@@Z @ 65 NONAME ; void AgendaRepeatRule::setType(enum AgendaRepeatRule::RuleType)
+ ?interval@AgendaRepeatRule@@QBEHXZ @ 66 NONAME ; int AgendaRepeatRule::interval(void) const
+ ?rDates@AgendaEntry@@QBE?AV?$QList@VQDate@@@@XZ @ 67 NONAME ; class QList<class QDate> AgendaEntry::rDates(void) const
+ ?repeatRuleStart@AgendaRepeatRule@@QBE?AVQDateTime@@XZ @ 68 NONAME ; class QDateTime AgendaRepeatRule::repeatRuleStart(void) const
+ ??8AgendaAlarm@@QBE_NABV0@@Z @ 69 NONAME ; bool AgendaAlarm::operator==(class AgendaAlarm const &) const
+ ?storeRepeatingEntry@AgendaUtil@@QAE_NABVAgendaEntry@@_N@Z @ 70 NONAME ; bool AgendaUtil::storeRepeatingEntry(class AgendaEntry const &, bool)
+ ??0AgendaRepeatRule@@QAE@ABV0@@Z @ 71 NONAME ; AgendaRepeatRule::AgendaRepeatRule(class AgendaRepeatRule const &)
+ ?setStatus@AgendaAttendee@@QAEXW4StatusType@1@@Z @ 72 NONAME ; void AgendaAttendee::setStatus(enum AgendaAttendee::StatusType)
+ ?setStatus@AgendaEntry@@QAEXW4Status@1@@Z @ 73 NONAME ; void AgendaEntry::setStatus(enum AgendaEntry::Status)
+ ?setExtendedCategoryName@AgendaCategory@@QAEXABVQString@@@Z @ 74 NONAME ; void AgendaCategory::setExtendedCategoryName(class QString const &)
+ ?setDescription@AgendaEntry@@QAEXABVQString@@@Z @ 75 NONAME ; void AgendaEntry::setDescription(class QString const &)
+ ?recurrenceId@AgendaEntry@@QAE?AVQDateTime@@XZ @ 76 NONAME ; class QDateTime AgendaEntry::recurrenceId(void)
+ ?until@AgendaRepeatRule@@QBE?AVQDateTime@@XZ @ 77 NONAME ; class QDateTime AgendaRepeatRule::until(void) const
+ ?setByMonth@AgendaRepeatRule@@QAEXABV?$QList@W4Month@AgendaRepeatRule@@@@@Z @ 78 NONAME ; void AgendaRepeatRule::setByMonth(class QList<enum AgendaRepeatRule::Month> const &)
+ ?qt_metacall@AgendaUtil@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 79 NONAME ; int AgendaUtil::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacast@AgendaUtil@@UAEPAXPBD@Z @ 80 NONAME ; void * AgendaUtil::qt_metacast(char const *)
+ ?isNull@AgendaRepeatRule@@QBE_NXZ @ 81 NONAME ; bool AgendaRepeatRule::isNull(void) const
+ ?getStaticMetaObject@AgendaUtil@@SAABUQMetaObject@@XZ @ 82 NONAME ; struct QMetaObject const & AgendaUtil::getStaticMetaObject(void)
+ ??8AgendaAttendee@@QBE_NABV0@@Z @ 83 NONAME ; bool AgendaAttendee::operator==(class AgendaAttendee const &) const
+ ?addCategory@AgendaEntry@@QAEXABVAgendaCategory@@@Z @ 84 NONAME ; void AgendaEntry::addCategory(class AgendaCategory const &)
+ ?setLocation@AgendaEntry@@QAEXABVQString@@@Z @ 85 NONAME ; void AgendaEntry::setLocation(class QString const &)
+ ?isTimedEntry@AgendaEntry@@QAE_NXZ @ 86 NONAME ; bool AgendaEntry::isTimedEntry(void)
+ ?favourite@AgendaEntry@@QBEIXZ @ 87 NONAME ; unsigned int AgendaEntry::favourite(void) const
+ ?durationInSecs@AgendaEntry@@QBEHXZ @ 88 NONAME ; int AgendaEntry::durationInSecs(void) const
+ ??1AgendaUtil@@UAE@XZ @ 89 NONAME ; AgendaUtil::~AgendaUtil(void)
+ ?category@AgendaCategory@@QBE?AW4CategoryType@1@XZ @ 90 NONAME ; enum AgendaCategory::CategoryType AgendaCategory::category(void) const
+ ?entryAdded@AgendaUtil@@IAEXK@Z @ 91 NONAME ; void AgendaUtil::entryAdded(unsigned long)
+ ?role@AgendaAttendee@@QBE?AW4ParticipantRole@1@XZ @ 92 NONAME ; enum AgendaAttendee::ParticipantRole AgendaAttendee::role(void) const
+ ?type@AgendaEntry@@QBE?AW4Type@1@XZ @ 93 NONAME ; enum AgendaEntry::Type AgendaEntry::type(void) const
+ ??0AgendaEntry@@QAE@W4Type@0@@Z @ 94 NONAME ; AgendaEntry::AgendaEntry(enum AgendaEntry::Type)
+ ?detach@AgendaRepeatRule@@AAEXXZ @ 95 NONAME ; void AgendaRepeatRule::detach(void)
+ ?error@AgendaUtil@@QBE?AW4Error@1@XZ @ 96 NONAME ; enum AgendaUtil::Error AgendaUtil::error(void) const
+ ?trUtf8@AgendaUtil@@SA?AVQString@@PBD0@Z @ 97 NONAME ; class QString AgendaUtil::trUtf8(char const *, char const *)
+ ?status@AgendaEntry@@QBE?AW4Status@1@XZ @ 98 NONAME ; enum AgendaEntry::Status AgendaEntry::status(void) const
+ ??0AgendaEntry@@QAE@ABV0@@Z @ 99 NONAME ; AgendaEntry::AgendaEntry(class AgendaEntry const &)
+ ??4AgendaAttendee@@QAEAAV0@ABV0@@Z @ 100 NONAME ; class AgendaAttendee & AgendaAttendee::operator=(class AgendaAttendee const &)
+ ?address@AgendaAttendee@@QBE?AVQString@@XZ @ 101 NONAME ; class QString AgendaAttendee::address(void) const
+ ?entryDeleted@AgendaUtil@@IAEXK@Z @ 102 NONAME ; void AgendaUtil::entryDeleted(unsigned long)
+ ?summary@AgendaEntry@@QBE?AVQString@@XZ @ 103 NONAME ; class QString AgendaEntry::summary(void) const
+ ?priority@AgendaEntry@@QBEHXZ @ 104 NONAME ; int AgendaEntry::priority(void) const
+ ?fetchById@AgendaUtil@@QAE?AVAgendaEntry@@K@Z @ 105 NONAME ; class AgendaEntry AgendaUtil::fetchById(unsigned long)
+ ?setCommonName@AgendaAttendee@@QAEXABVQString@@@Z @ 106 NONAME ; void AgendaAttendee::setCommonName(class QString const &)
+ ?setMethod@AgendaEntry@@QAEXW4Method@1@@Z @ 107 NONAME ; void AgendaEntry::setMethod(enum AgendaEntry::Method)
+ ?setRDates@AgendaEntry@@QAEXABV?$QList@VQDate@@@@@Z @ 108 NONAME ; void AgendaEntry::setRDates(class QList<class QDate> const &)
+ ?parentEntry@AgendaUtil@@QAE?AVAgendaEntry@@AAV2@@Z @ 109 NONAME ; class AgendaEntry AgendaUtil::parentEntry(class AgendaEntry &)
+ ?addAttendee@AgendaEntry@@QAEXABVAgendaAttendee@@@Z @ 110 NONAME ; void AgendaEntry::addAttendee(class AgendaAttendee const &)
+ ?setCompleted@AgendaUtil@@QAEXAAVAgendaEntry@@_NAAVQDateTime@@@Z @ 111 NONAME ; void AgendaUtil::setCompleted(class AgendaEntry &, bool, class QDateTime &)
+ ??0AgendaCategory@@QAE@XZ @ 112 NONAME ; AgendaCategory::AgendaCategory(void)
+ ?timeOffset@AgendaAlarm@@QBEHXZ @ 113 NONAME ; int AgendaAlarm::timeOffset(void) const
+ ??0AgendaAttendee@@QAE@XZ @ 114 NONAME ; AgendaAttendee::AgendaAttendee(void)
+ ?setAlarmSoundName@AgendaAlarm@@QAEXABVQString@@@Z @ 115 NONAME ; void AgendaAlarm::setAlarmSoundName(class QString const &)
+ ?fetchEntriesInRange@AgendaUtil@@QAE?AV?$QList@VAgendaEntry@@@@VQDateTime@@0W4FilterFlags@1@@Z @ 116 NONAME ; class QList<class AgendaEntry> AgendaUtil::fetchEntriesInRange(class QDateTime, class QDateTime, enum AgendaUtil::FilterFlags)
+ ?detach@AgendaAlarm@@AAEXXZ @ 117 NONAME ; void AgendaAlarm::detach(void)
+ ?setWeekStart@AgendaRepeatRule@@QAEXW4Day@1@@Z @ 118 NONAME ; void AgendaRepeatRule::setWeekStart(enum AgendaRepeatRule::Day)
+ ?setFavourite@AgendaEntry@@QAEXI@Z @ 119 NONAME ; void AgendaEntry::setFavourite(unsigned int)
+ ?setDTStamp@AgendaEntry@@QAEXABVQDateTime@@@Z @ 120 NONAME ; void AgendaEntry::setDTStamp(class QDateTime const &)
+ ?cloneEntry@AgendaUtil@@QAEKABVAgendaEntry@@W4Type@2@@Z @ 121 NONAME ; unsigned long AgendaUtil::cloneEntry(class AgendaEntry const &, enum AgendaEntry::Type)
+ ?setRepeatRule@AgendaEntry@@QAEXABVAgendaRepeatRule@@@Z @ 122 NONAME ; void AgendaEntry::setRepeatRule(class AgendaRepeatRule const &)
+ ?categories@AgendaEntry@@QBEABV?$QList@VAgendaCategory@@@@XZ @ 123 NONAME ; class QList<class AgendaCategory> const & AgendaEntry::categories(void) const
+ ?tr@AgendaUtil@@SA?AVQString@@PBD0@Z @ 124 NONAME ; class QString AgendaUtil::tr(char const *, char const *)
+ ??4AgendaRepeatRule@@QAEAAV0@ABV0@@Z @ 125 NONAME ; class AgendaRepeatRule & AgendaRepeatRule::operator=(class AgendaRepeatRule const &)
+ ?setCompletedDateTime@AgendaEntry@@QAEXABVQDateTime@@@Z @ 126 NONAME ; void AgendaEntry::setCompletedDateTime(class QDateTime const &)
+ ??0AgendaRepeatRule@@QAE@XZ @ 127 NONAME ; AgendaRepeatRule::AgendaRepeatRule(void)
+ ?dtStamp@AgendaEntry@@QBE?AVQDateTime@@XZ @ 128 NONAME ; class QDateTime AgendaEntry::dtStamp(void) const
+ ?method@AgendaEntry@@QBE?AW4Method@1@XZ @ 129 NONAME ; enum AgendaEntry::Method AgendaEntry::method(void) const
+ ?type@AgendaRepeatRule@@QBE?AW4RuleType@1@XZ @ 130 NONAME ; enum AgendaRepeatRule::RuleType AgendaRepeatRule::type(void) const
+ ??4AgendaGeoValue@@QAEAAV0@ABV0@@Z @ 131 NONAME ; class AgendaGeoValue & AgendaGeoValue::operator=(class AgendaGeoValue const &)
+ ??0AgendaCategory@@QAE@W4CategoryType@0@@Z @ 132 NONAME ; AgendaCategory::AgendaCategory(enum AgendaCategory::CategoryType)
+ ?commonName@AgendaAttendee@@QBE?AVQString@@XZ @ 133 NONAME ; class QString AgendaAttendee::commonName(void) const
+ ?detach@AgendaCategory@@AAEXXZ @ 134 NONAME ; void AgendaCategory::detach(void)
+ ??0AgendaGeoValue@@QAE@ABV0@@Z @ 135 NONAME ; AgendaGeoValue::AgendaGeoValue(class AgendaGeoValue const &)
+ ?isWorkdaysRepeatingEntry@AgendaUtil@@SA_NABVAgendaRepeatRule@@@Z @ 136 NONAME ; bool AgendaUtil::isWorkdaysRepeatingEntry(class AgendaRepeatRule const &)
+ ?setRole@AgendaAttendee@@QAEXW4ParticipantRole@1@@Z @ 137 NONAME ; void AgendaAttendee::setRole(enum AgendaAttendee::ParticipantRole)
+ ?detach@AgendaAttendee@@AAEXXZ @ 138 NONAME ; void AgendaAttendee::detach(void)
+ ?getLatLong@AgendaGeoValue@@QBEXAAN0@Z @ 139 NONAME ; void AgendaGeoValue::getLatLong(double &, double &) const
+ ?maxTime@AgendaUtil@@SA?AVQDateTime@@XZ @ 140 NONAME ; class QDateTime AgendaUtil::maxTime(void)
+ ?setCategory@AgendaCategory@@QAEXW4CategoryType@1@@Z @ 141 NONAME ; void AgendaCategory::setCategory(enum AgendaCategory::CategoryType)
+ ?endTime@AgendaEntry@@QBE?AVQDateTime@@XZ @ 142 NONAME ; class QDateTime AgendaEntry::endTime(void) const
+ ??9AgendaEntry@@QBE_NABV0@@Z @ 143 NONAME ; bool AgendaEntry::operator!=(class AgendaEntry const &) const
+ ??0AgendaRepeatRule@@QAE@W4RuleType@0@@Z @ 144 NONAME ; AgendaRepeatRule::AgendaRepeatRule(enum AgendaRepeatRule::RuleType)
+ ??9AgendaCategory@@QBE_NABV0@@Z @ 145 NONAME ; bool AgendaCategory::operator!=(class AgendaCategory const &) const
+ ??0AgendaAttendee@@QAE@ABV0@@Z @ 146 NONAME ; AgendaAttendee::AgendaAttendee(class AgendaAttendee const &)
+ ??0AgendaAttendee@@QAE@ABVQString@@@Z @ 147 NONAME ; AgendaAttendee::AgendaAttendee(class QString const &)
+ ?importvCalendar@AgendaUtil@@QAEHABVQString@@AAVAgendaEntry@@@Z @ 148 NONAME ; int AgendaUtil::importvCalendar(class QString const &, class AgendaEntry &)
+ ??_EAgendaUtil@@UAE@I@Z @ 149 NONAME ; AgendaUtil::~AgendaUtil(unsigned int)
+ ?setGeoValue@AgendaEntry@@QAEXABVAgendaGeoValue@@@Z @ 150 NONAME ; void AgendaEntry::setGeoValue(class AgendaGeoValue const &)
+ ?getPreviousInstanceTimes@AgendaUtil@@QAEXAAVAgendaEntry@@AAVQDateTime@@1@Z @ 151 NONAME ; void AgendaUtil::getPreviousInstanceTimes(class AgendaEntry &, class QDateTime &, class QDateTime &)
+ ?attendees@AgendaEntry@@QAEAAV?$QList@VAgendaAttendee@@@@XZ @ 152 NONAME ; class QList<class AgendaAttendee> & AgendaEntry::attendees(void)
+ ?staticMetaObject@AgendaUtil@@2UQMetaObject@@B @ 153 NONAME ; struct QMetaObject const AgendaUtil::staticMetaObject
+ ?entriesDeleted@AgendaUtil@@IAEXH@Z @ 154 NONAME ; void AgendaUtil::entriesDeleted(int)
+ ?fetchAllEntries@AgendaUtil@@QAE?AV?$QList@VAgendaEntry@@@@W4FilterFlags@1@@Z @ 155 NONAME ; class QList<class AgendaEntry> AgendaUtil::fetchAllEntries(enum AgendaUtil::FilterFlags)
+ ?setTimeOffset@AgendaAlarm@@QAEXH@Z @ 156 NONAME ; void AgendaAlarm::setTimeOffset(int)
+ ??0AgendaEntry@@QAE@XZ @ 157 NONAME ; AgendaEntry::AgendaEntry(void)
+ ?setPriority@AgendaEntry@@QAEXH@Z @ 158 NONAME ; void AgendaEntry::setPriority(int)
+ ?setType@AgendaEntry@@QAEXW4Type@1@@Z @ 159 NONAME ; void AgendaEntry::setType(enum AgendaEntry::Type)
+ ?setStartAndEndTime@AgendaEntry@@QAE_NABVQDateTime@@0@Z @ 160 NONAME ; bool AgendaEntry::setStartAndEndTime(class QDateTime const &, class QDateTime const &)
+ ?deleteEntries@AgendaUtil@@QAEXAAVQDateTime@@0W4FilterFlags@1@@Z @ 161 NONAME ; void AgendaUtil::deleteEntries(class QDateTime &, class QDateTime &, enum AgendaUtil::FilterFlags)
+ ?metaObject@AgendaUtil@@UBEPBUQMetaObject@@XZ @ 162 NONAME ; struct QMetaObject const * AgendaUtil::metaObject(void) const
+ ?location@AgendaEntry@@QBE?AVQString@@XZ @ 163 NONAME ; class QString AgendaEntry::location(void) const
+ ??8AgendaCategory@@QBE_NABV0@@Z @ 164 NONAME ; bool AgendaCategory::operator==(class AgendaCategory const &) const
+ ??0AgendaCategory@@QAE@ABV0@@Z @ 165 NONAME ; AgendaCategory::AgendaCategory(class AgendaCategory const &)
+ ??1AgendaGeoValue@@QAE@XZ @ 166 NONAME ; AgendaGeoValue::~AgendaGeoValue(void)
+ ??4AgendaEntry@@QAEAAV0@ABV0@@Z @ 167 NONAME ; class AgendaEntry & AgendaEntry::operator=(class AgendaEntry const &)
+ ??_EAgendaCategory@@UAE@I@Z @ 168 NONAME ; AgendaCategory::~AgendaCategory(unsigned int)
+ ?createEntryIdListForDay@AgendaUtil@@QAE?AV?$QList@VAgendaEntry@@@@VQDateTime@@W4FilterFlags@1@@Z @ 169 NONAME ; class QList<class AgendaEntry> AgendaUtil::createEntryIdListForDay(class QDateTime, enum AgendaUtil::FilterFlags)
+ ?repeatRule@AgendaEntry@@QBE?AVAgendaRepeatRule@@XZ @ 170 NONAME ; class AgendaRepeatRule AgendaEntry::repeatRule(void) const
+ ??1AgendaCategory@@UAE@XZ @ 171 NONAME ; AgendaCategory::~AgendaCategory(void)
+ ?deleteEntry@AgendaUtil@@QAE_NK@Z @ 172 NONAME ; bool AgendaUtil::deleteEntry(unsigned long)
+ ??1AgendaAttendee@@UAE@XZ @ 173 NONAME ; AgendaAttendee::~AgendaAttendee(void)
+ ?byDay@AgendaRepeatRule@@QBE?AV?$QList@W4Day@AgendaRepeatRule@@@@XZ @ 174 NONAME ; class QList<enum AgendaRepeatRule::Day> AgendaRepeatRule::byDay(void) const
+ ?setLatLong@AgendaGeoValue@@QAEXNN@Z @ 175 NONAME ; void AgendaGeoValue::setLatLong(double, double)
+ ?completedDateTime@AgendaEntry@@QBE?AVQDateTime@@XZ @ 176 NONAME ; class QDateTime AgendaEntry::completedDateTime(void) const
+ ?setRecurrenceId@AgendaEntry@@QAEXAAVQDateTime@@@Z @ 177 NONAME ; void AgendaEntry::setRecurrenceId(class QDateTime &)
+ ?isNull@AgendaGeoValue@@QBE_NXZ @ 178 NONAME ; bool AgendaGeoValue::isNull(void) const
+ ?areNoEntriesInCalendar@AgendaUtil@@QAE_NXZ @ 179 NONAME ; bool AgendaUtil::areNoEntriesInCalendar(void)
--- a/agendainterface/eabi/agendainterfaceu.def Fri Apr 16 14:57:40 2010 +0300
+++ b/agendainterface/eabi/agendainterfaceu.def Mon May 03 12:30:32 2010 +0300
@@ -20,170 +20,190 @@
_ZN10AgendaUtil19deleteRepeatedEntryER11AgendaEntryNS_15RecurrenceRangeE @ 19 NONAME
_ZN10AgendaUtil19fetchEntriesInRangeE9QDateTimeS0_NS_11FilterFlagsE @ 20 NONAME
_ZN10AgendaUtil19getStaticMetaObjectEv @ 21 NONAME
- _ZN10AgendaUtil19storeRepeatingEntryERK11AgendaEntryb @ 22 NONAME
- _ZN10AgendaUtil20getNextInstanceTimesER11AgendaEntryR9QDateTimeS3_ @ 23 NONAME
- _ZN10AgendaUtil23createEntryIdListForDayE9QDateTimeNS_11FilterFlagsE @ 24 NONAME
- _ZN10AgendaUtil24clearRepeatingPropertiesER11AgendaEntry @ 25 NONAME
- _ZN10AgendaUtil24getPreviousInstanceTimesER11AgendaEntryR9QDateTimeS3_ @ 26 NONAME
- _ZN10AgendaUtil7maxTimeEv @ 27 NONAME
- _ZN10AgendaUtil7minTimeEv @ 28 NONAME
- _ZN10AgendaUtil8addEntryERK11AgendaEntry @ 29 NONAME
- _ZN10AgendaUtil8entryIdsENS_11FilterFlagsE @ 30 NONAME
- _ZN10AgendaUtil9fetchByIdEm @ 31 NONAME
- _ZN10AgendaUtilC1EP7QObject @ 32 NONAME
- _ZN10AgendaUtilC2EP7QObject @ 33 NONAME
- _ZN10AgendaUtilD0Ev @ 34 NONAME
- _ZN10AgendaUtilD1Ev @ 35 NONAME
- _ZN10AgendaUtilD2Ev @ 36 NONAME
- _ZN11AgendaAlarm13setTimeOffsetEi @ 37 NONAME
- _ZN11AgendaAlarm17setAlarmSoundNameERK7QString @ 38 NONAME
- _ZN11AgendaAlarm6detachEv @ 39 NONAME
- _ZN11AgendaAlarmC1ERKS_ @ 40 NONAME
- _ZN11AgendaAlarmC1Ev @ 41 NONAME
- _ZN11AgendaAlarmC2ERKS_ @ 42 NONAME
- _ZN11AgendaAlarmC2Ev @ 43 NONAME
- _ZN11AgendaAlarmD1Ev @ 44 NONAME
- _ZN11AgendaAlarmD2Ev @ 45 NONAME
- _ZN11AgendaAlarmaSERKS_ @ 46 NONAME
- _ZN11AgendaEntry10categoriesEv @ 47 NONAME
- _ZN11AgendaEntry10setSummaryERK7QString @ 48 NONAME
- _ZN11AgendaEntry11addAttendeeERK14AgendaAttendee @ 49 NONAME
- _ZN11AgendaEntry11addCategoryERK14AgendaCategory @ 50 NONAME
- _ZN11AgendaEntry11isRepeatingEv @ 51 NONAME
- _ZN11AgendaEntry11setLocationERK7QString @ 52 NONAME
- _ZN11AgendaEntry11setPriorityEi @ 53 NONAME
- _ZN11AgendaEntry12isTimedEntryEv @ 54 NONAME
- _ZN11AgendaEntry12recurrenceIdEv @ 55 NONAME
- _ZN11AgendaEntry12setFavouriteEj @ 56 NONAME
- _ZN11AgendaEntry13setRepeatRuleERK16AgendaRepeatRule @ 57 NONAME
- _ZN11AgendaEntry14setDescriptionERK7QString @ 58 NONAME
- _ZN11AgendaEntry15setRecurrenceIdER9QDateTime @ 59 NONAME
- _ZN11AgendaEntry18setStartAndEndTimeERK9QDateTimeS2_ @ 60 NONAME
- _ZN11AgendaEntry20setCompletedDateTimeERK9QDateTime @ 61 NONAME
- _ZN11AgendaEntry23setLastModifiedDateTimeERK9QDateTime @ 62 NONAME
- _ZN11AgendaEntry6detachEv @ 63 NONAME
- _ZN11AgendaEntry7setTypeENS_4TypeE @ 64 NONAME
- _ZN11AgendaEntry8setAlarmERK11AgendaAlarm @ 65 NONAME
- _ZN11AgendaEntry9attendeesEv @ 66 NONAME
- _ZN11AgendaEntry9setMethodENS_6MethodE @ 67 NONAME
- _ZN11AgendaEntry9setRDatesERK5QListI5QDateE @ 68 NONAME
- _ZN11AgendaEntry9setStatusENS_6StatusE @ 69 NONAME
- _ZN11AgendaEntryC1ENS_4TypeE @ 70 NONAME
- _ZN11AgendaEntryC1ERKS_ @ 71 NONAME
- _ZN11AgendaEntryC1Ev @ 72 NONAME
- _ZN11AgendaEntryC2ENS_4TypeE @ 73 NONAME
- _ZN11AgendaEntryC2ERKS_ @ 74 NONAME
- _ZN11AgendaEntryC2Ev @ 75 NONAME
- _ZN11AgendaEntryD0Ev @ 76 NONAME
- _ZN11AgendaEntryD1Ev @ 77 NONAME
- _ZN11AgendaEntryD2Ev @ 78 NONAME
- _ZN11AgendaEntryaSERKS_ @ 79 NONAME
- _ZN14AgendaAttendee10setAddressERK7QString @ 80 NONAME
- _ZN14AgendaAttendee13setCommonNameERK7QString @ 81 NONAME
- _ZN14AgendaAttendee20setResponseRequestedEb @ 82 NONAME
- _ZN14AgendaAttendee6detachEv @ 83 NONAME
- _ZN14AgendaAttendee7setRoleENS_15ParticipantRoleE @ 84 NONAME
- _ZN14AgendaAttendee9setStatusENS_10StatusTypeE @ 85 NONAME
- _ZN14AgendaAttendeeC1ERK7QString @ 86 NONAME
- _ZN14AgendaAttendeeC1ERKS_ @ 87 NONAME
- _ZN14AgendaAttendeeC1Ev @ 88 NONAME
- _ZN14AgendaAttendeeC2ERK7QString @ 89 NONAME
- _ZN14AgendaAttendeeC2ERKS_ @ 90 NONAME
- _ZN14AgendaAttendeeC2Ev @ 91 NONAME
- _ZN14AgendaAttendeeD0Ev @ 92 NONAME
- _ZN14AgendaAttendeeD1Ev @ 93 NONAME
- _ZN14AgendaAttendeeD2Ev @ 94 NONAME
- _ZN14AgendaAttendeeaSERKS_ @ 95 NONAME
- _ZN14AgendaCategory11setCategoryENS_12CategoryTypeE @ 96 NONAME
- _ZN14AgendaCategory23setExtendedCategoryNameERK7QString @ 97 NONAME
- _ZN14AgendaCategory6detachEv @ 98 NONAME
- _ZN14AgendaCategoryC1ENS_12CategoryTypeE @ 99 NONAME
- _ZN14AgendaCategoryC1ERKS_ @ 100 NONAME
- _ZN14AgendaCategoryC1Ev @ 101 NONAME
- _ZN14AgendaCategoryC2ENS_12CategoryTypeE @ 102 NONAME
- _ZN14AgendaCategoryC2ERKS_ @ 103 NONAME
- _ZN14AgendaCategoryC2Ev @ 104 NONAME
- _ZN14AgendaCategoryD0Ev @ 105 NONAME
- _ZN14AgendaCategoryD1Ev @ 106 NONAME
- _ZN14AgendaCategoryD2Ev @ 107 NONAME
- _ZN14AgendaCategoryaSERKS_ @ 108 NONAME
- _ZN16AgendaRepeatRule10setByMonthERK5QListINS_5MonthEE @ 109 NONAME
- _ZN16AgendaRepeatRule11setIntervalEi @ 110 NONAME
- _ZN16AgendaRepeatRule12setWeekStartENS_3DayE @ 111 NONAME
- _ZN16AgendaRepeatRule13setByMonthDayERK5QListIiE @ 112 NONAME
- _ZN16AgendaRepeatRule18setRepeatRuleStartERK5QDate @ 113 NONAME
- _ZN16AgendaRepeatRule6detachEv @ 114 NONAME
- _ZN16AgendaRepeatRule7setTypeENS_8RuleTypeE @ 115 NONAME
- _ZN16AgendaRepeatRule8setByDayERK5QListINS_3DayEE @ 116 NONAME
- _ZN16AgendaRepeatRule8setUntilERK5QDate @ 117 NONAME
- _ZN16AgendaRepeatRuleC1ENS_8RuleTypeE @ 118 NONAME
- _ZN16AgendaRepeatRuleC1ERKS_ @ 119 NONAME
- _ZN16AgendaRepeatRuleC1Ev @ 120 NONAME
- _ZN16AgendaRepeatRuleC2ENS_8RuleTypeE @ 121 NONAME
- _ZN16AgendaRepeatRuleC2ERKS_ @ 122 NONAME
- _ZN16AgendaRepeatRuleC2Ev @ 123 NONAME
- _ZN16AgendaRepeatRuleD1Ev @ 124 NONAME
- _ZN16AgendaRepeatRuleD2Ev @ 125 NONAME
- _ZN16AgendaRepeatRuleaSERKS_ @ 126 NONAME
- _ZNK10AgendaUtil10metaObjectEv @ 127 NONAME
- _ZNK10AgendaUtil5errorEv @ 128 NONAME
- _ZNK11AgendaAlarm10timeOffsetEv @ 129 NONAME
- _ZNK11AgendaAlarm14alarmSoundNameEv @ 130 NONAME
- _ZNK11AgendaAlarm6isNullEv @ 131 NONAME
- _ZNK11AgendaAlarmeqERKS_ @ 132 NONAME
- _ZNK11AgendaAlarmneERKS_ @ 133 NONAME
- _ZNK11AgendaEntry10categoriesEv @ 134 NONAME
- _ZNK11AgendaEntry10repeatRuleEv @ 135 NONAME
- _ZNK11AgendaEntry11descriptionEv @ 136 NONAME
- _ZNK11AgendaEntry14durationInSecsEv @ 137 NONAME
- _ZNK11AgendaEntry17completedDateTimeEv @ 138 NONAME
- _ZNK11AgendaEntry20lastModifiedDateTimeEv @ 139 NONAME
- _ZNK11AgendaEntry2idEv @ 140 NONAME
- _ZNK11AgendaEntry4typeEv @ 141 NONAME
- _ZNK11AgendaEntry5alarmEv @ 142 NONAME
- _ZNK11AgendaEntry6isNullEv @ 143 NONAME
- _ZNK11AgendaEntry6methodEv @ 144 NONAME
- _ZNK11AgendaEntry6rDatesEv @ 145 NONAME
- _ZNK11AgendaEntry6statusEv @ 146 NONAME
- _ZNK11AgendaEntry7endTimeEv @ 147 NONAME
- _ZNK11AgendaEntry7summaryEv @ 148 NONAME
- _ZNK11AgendaEntry8locationEv @ 149 NONAME
- _ZNK11AgendaEntry8priorityEv @ 150 NONAME
- _ZNK11AgendaEntry9attendeesEv @ 151 NONAME
- _ZNK11AgendaEntry9favouriteEv @ 152 NONAME
- _ZNK11AgendaEntry9startTimeEv @ 153 NONAME
- _ZNK11AgendaEntryeqERKS_ @ 154 NONAME
- _ZNK11AgendaEntryneERKS_ @ 155 NONAME
- _ZNK14AgendaAttendee10commonNameEv @ 156 NONAME
- _ZNK14AgendaAttendee17responseRequestedEv @ 157 NONAME
- _ZNK14AgendaAttendee4roleEv @ 158 NONAME
- _ZNK14AgendaAttendee6isNullEv @ 159 NONAME
- _ZNK14AgendaAttendee6statusEv @ 160 NONAME
- _ZNK14AgendaAttendee7addressEv @ 161 NONAME
- _ZNK14AgendaAttendeeeqERKS_ @ 162 NONAME
- _ZNK14AgendaAttendeeneERKS_ @ 163 NONAME
- _ZNK14AgendaCategory20extendedCategoryNameEv @ 164 NONAME
- _ZNK14AgendaCategory6isNullEv @ 165 NONAME
- _ZNK14AgendaCategory8categoryEv @ 166 NONAME
- _ZNK14AgendaCategoryeqERKS_ @ 167 NONAME
- _ZNK14AgendaCategoryneERKS_ @ 168 NONAME
- _ZNK16AgendaRepeatRule10byMonthDayEv @ 169 NONAME
- _ZNK16AgendaRepeatRule15repeatRuleStartEv @ 170 NONAME
- _ZNK16AgendaRepeatRule4typeEv @ 171 NONAME
- _ZNK16AgendaRepeatRule5byDayEv @ 172 NONAME
- _ZNK16AgendaRepeatRule5untilEv @ 173 NONAME
- _ZNK16AgendaRepeatRule6isNullEv @ 174 NONAME
- _ZNK16AgendaRepeatRule7byMonthEv @ 175 NONAME
- _ZNK16AgendaRepeatRule8intervalEv @ 176 NONAME
- _ZNK16AgendaRepeatRule9weekStartEv @ 177 NONAME
- _ZNK16AgendaRepeatRuleeqERKS_ @ 178 NONAME
- _ZNK16AgendaRepeatRuleneERKS_ @ 179 NONAME
- _ZTI10AgendaUtil @ 180 NONAME
- _ZTI11AgendaEntry @ 181 NONAME
- _ZTI14AgendaAttendee @ 182 NONAME
- _ZTI14AgendaCategory @ 183 NONAME
- _ZTV10AgendaUtil @ 184 NONAME
- _ZTV11AgendaEntry @ 185 NONAME
- _ZTV14AgendaAttendee @ 186 NONAME
- _ZTV14AgendaCategory @ 187 NONAME
+ _ZN10AgendaUtil19markDatesWithEventsE9QDateTimeS0_NS_11FilterFlagsER5QListI5QDateE @ 22 NONAME
+ _ZN10AgendaUtil19storeRepeatingEntryERK11AgendaEntryb @ 23 NONAME
+ _ZN10AgendaUtil20getNextInstanceTimesER11AgendaEntryR9QDateTimeS3_ @ 24 NONAME
+ _ZN10AgendaUtil23createEntryIdListForDayE9QDateTimeNS_11FilterFlagsE @ 25 NONAME
+ _ZN10AgendaUtil24clearRepeatingPropertiesER11AgendaEntry @ 26 NONAME
+ _ZN10AgendaUtil24getPreviousInstanceTimesER11AgendaEntryR9QDateTimeS3_ @ 27 NONAME
+ _ZN10AgendaUtil24isWorkdaysRepeatingEntryERK16AgendaRepeatRule @ 28 NONAME
+ _ZN10AgendaUtil7maxTimeEv @ 29 NONAME
+ _ZN10AgendaUtil7minTimeEv @ 30 NONAME
+ _ZN10AgendaUtil8addEntryERK11AgendaEntry @ 31 NONAME
+ _ZN10AgendaUtil8entryIdsENS_11FilterFlagsE @ 32 NONAME
+ _ZN10AgendaUtil9fetchByIdEm @ 33 NONAME
+ _ZN10AgendaUtilC1EP7QObject @ 34 NONAME
+ _ZN10AgendaUtilC2EP7QObject @ 35 NONAME
+ _ZN10AgendaUtilD0Ev @ 36 NONAME
+ _ZN10AgendaUtilD1Ev @ 37 NONAME
+ _ZN10AgendaUtilD2Ev @ 38 NONAME
+ _ZN11AgendaAlarm13setTimeOffsetEi @ 39 NONAME
+ _ZN11AgendaAlarm17setAlarmSoundNameERK7QString @ 40 NONAME
+ _ZN11AgendaAlarm6detachEv @ 41 NONAME
+ _ZN11AgendaAlarmC1ERKS_ @ 42 NONAME
+ _ZN11AgendaAlarmC1Ev @ 43 NONAME
+ _ZN11AgendaAlarmC2ERKS_ @ 44 NONAME
+ _ZN11AgendaAlarmC2Ev @ 45 NONAME
+ _ZN11AgendaAlarmD1Ev @ 46 NONAME
+ _ZN11AgendaAlarmD2Ev @ 47 NONAME
+ _ZN11AgendaAlarmaSERKS_ @ 48 NONAME
+ _ZN11AgendaEntry10categoriesEv @ 49 NONAME
+ _ZN11AgendaEntry10setDTStampERK9QDateTime @ 50 NONAME
+ _ZN11AgendaEntry10setSummaryERK7QString @ 51 NONAME
+ _ZN11AgendaEntry11addAttendeeERK14AgendaAttendee @ 52 NONAME
+ _ZN11AgendaEntry11addCategoryERK14AgendaCategory @ 53 NONAME
+ _ZN11AgendaEntry11isRepeatingEv @ 54 NONAME
+ _ZN11AgendaEntry11setGeoValueERK14AgendaGeoValue @ 55 NONAME
+ _ZN11AgendaEntry11setLocationERK7QString @ 56 NONAME
+ _ZN11AgendaEntry11setPriorityEi @ 57 NONAME
+ _ZN11AgendaEntry12isTimedEntryEv @ 58 NONAME
+ _ZN11AgendaEntry12recurrenceIdEv @ 59 NONAME
+ _ZN11AgendaEntry12setFavouriteEj @ 60 NONAME
+ _ZN11AgendaEntry13setRepeatRuleERK16AgendaRepeatRule @ 61 NONAME
+ _ZN11AgendaEntry14setDescriptionERK7QString @ 62 NONAME
+ _ZN11AgendaEntry15setRecurrenceIdER9QDateTime @ 63 NONAME
+ _ZN11AgendaEntry18setStartAndEndTimeERK9QDateTimeS2_ @ 64 NONAME
+ _ZN11AgendaEntry20setCompletedDateTimeERK9QDateTime @ 65 NONAME
+ _ZN11AgendaEntry23setLastModifiedDateTimeERK9QDateTime @ 66 NONAME
+ _ZN11AgendaEntry6detachEv @ 67 NONAME
+ _ZN11AgendaEntry7setTypeENS_4TypeE @ 68 NONAME
+ _ZN11AgendaEntry8setAlarmERK11AgendaAlarm @ 69 NONAME
+ _ZN11AgendaEntry9attendeesEv @ 70 NONAME
+ _ZN11AgendaEntry9setMethodENS_6MethodE @ 71 NONAME
+ _ZN11AgendaEntry9setRDatesERK5QListI5QDateE @ 72 NONAME
+ _ZN11AgendaEntry9setStatusENS_6StatusE @ 73 NONAME
+ _ZN11AgendaEntryC1ENS_4TypeE @ 74 NONAME
+ _ZN11AgendaEntryC1ERKS_ @ 75 NONAME
+ _ZN11AgendaEntryC1Ev @ 76 NONAME
+ _ZN11AgendaEntryC2ENS_4TypeE @ 77 NONAME
+ _ZN11AgendaEntryC2ERKS_ @ 78 NONAME
+ _ZN11AgendaEntryC2Ev @ 79 NONAME
+ _ZN11AgendaEntryD0Ev @ 80 NONAME
+ _ZN11AgendaEntryD1Ev @ 81 NONAME
+ _ZN11AgendaEntryD2Ev @ 82 NONAME
+ _ZN11AgendaEntryaSERKS_ @ 83 NONAME
+ _ZN14AgendaAttendee10setAddressERK7QString @ 84 NONAME
+ _ZN14AgendaAttendee13setCommonNameERK7QString @ 85 NONAME
+ _ZN14AgendaAttendee20setResponseRequestedEb @ 86 NONAME
+ _ZN14AgendaAttendee6detachEv @ 87 NONAME
+ _ZN14AgendaAttendee7setRoleENS_15ParticipantRoleE @ 88 NONAME
+ _ZN14AgendaAttendee9setStatusENS_10StatusTypeE @ 89 NONAME
+ _ZN14AgendaAttendeeC1ERK7QString @ 90 NONAME
+ _ZN14AgendaAttendeeC1ERKS_ @ 91 NONAME
+ _ZN14AgendaAttendeeC1Ev @ 92 NONAME
+ _ZN14AgendaAttendeeC2ERK7QString @ 93 NONAME
+ _ZN14AgendaAttendeeC2ERKS_ @ 94 NONAME
+ _ZN14AgendaAttendeeC2Ev @ 95 NONAME
+ _ZN14AgendaAttendeeD0Ev @ 96 NONAME
+ _ZN14AgendaAttendeeD1Ev @ 97 NONAME
+ _ZN14AgendaAttendeeD2Ev @ 98 NONAME
+ _ZN14AgendaAttendeeaSERKS_ @ 99 NONAME
+ _ZN14AgendaCategory11setCategoryENS_12CategoryTypeE @ 100 NONAME
+ _ZN14AgendaCategory23setExtendedCategoryNameERK7QString @ 101 NONAME
+ _ZN14AgendaCategory6detachEv @ 102 NONAME
+ _ZN14AgendaCategoryC1ENS_12CategoryTypeE @ 103 NONAME
+ _ZN14AgendaCategoryC1ERKS_ @ 104 NONAME
+ _ZN14AgendaCategoryC1Ev @ 105 NONAME
+ _ZN14AgendaCategoryC2ENS_12CategoryTypeE @ 106 NONAME
+ _ZN14AgendaCategoryC2ERKS_ @ 107 NONAME
+ _ZN14AgendaCategoryC2Ev @ 108 NONAME
+ _ZN14AgendaCategoryD0Ev @ 109 NONAME
+ _ZN14AgendaCategoryD1Ev @ 110 NONAME
+ _ZN14AgendaCategoryD2Ev @ 111 NONAME
+ _ZN14AgendaCategoryaSERKS_ @ 112 NONAME
+ _ZN14AgendaGeoValue10setLatLongEdd @ 113 NONAME
+ _ZN14AgendaGeoValue6detachEv @ 114 NONAME
+ _ZN14AgendaGeoValueC1ERKS_ @ 115 NONAME
+ _ZN14AgendaGeoValueC1Ev @ 116 NONAME
+ _ZN14AgendaGeoValueC2ERKS_ @ 117 NONAME
+ _ZN14AgendaGeoValueC2Ev @ 118 NONAME
+ _ZN14AgendaGeoValueD1Ev @ 119 NONAME
+ _ZN14AgendaGeoValueD2Ev @ 120 NONAME
+ _ZN14AgendaGeoValueaSERKS_ @ 121 NONAME
+ _ZN16AgendaRepeatRule10setByMonthERK5QListINS_5MonthEE @ 122 NONAME
+ _ZN16AgendaRepeatRule11setIntervalEi @ 123 NONAME
+ _ZN16AgendaRepeatRule12setWeekStartENS_3DayE @ 124 NONAME
+ _ZN16AgendaRepeatRule13setByMonthDayERK5QListIiE @ 125 NONAME
+ _ZN16AgendaRepeatRule18setRepeatRuleStartERK9QDateTime @ 126 NONAME
+ _ZN16AgendaRepeatRule6detachEv @ 127 NONAME
+ _ZN16AgendaRepeatRule7setTypeENS_8RuleTypeE @ 128 NONAME
+ _ZN16AgendaRepeatRule8setByDayERK5QListINS_3DayEE @ 129 NONAME
+ _ZN16AgendaRepeatRule8setUntilERK9QDateTime @ 130 NONAME
+ _ZN16AgendaRepeatRuleC1ENS_8RuleTypeE @ 131 NONAME
+ _ZN16AgendaRepeatRuleC1ERKS_ @ 132 NONAME
+ _ZN16AgendaRepeatRuleC1Ev @ 133 NONAME
+ _ZN16AgendaRepeatRuleC2ENS_8RuleTypeE @ 134 NONAME
+ _ZN16AgendaRepeatRuleC2ERKS_ @ 135 NONAME
+ _ZN16AgendaRepeatRuleC2Ev @ 136 NONAME
+ _ZN16AgendaRepeatRuleD1Ev @ 137 NONAME
+ _ZN16AgendaRepeatRuleD2Ev @ 138 NONAME
+ _ZN16AgendaRepeatRuleaSERKS_ @ 139 NONAME
+ _ZNK10AgendaUtil10metaObjectEv @ 140 NONAME
+ _ZNK10AgendaUtil5errorEv @ 141 NONAME
+ _ZNK11AgendaAlarm10timeOffsetEv @ 142 NONAME
+ _ZNK11AgendaAlarm14alarmSoundNameEv @ 143 NONAME
+ _ZNK11AgendaAlarm6isNullEv @ 144 NONAME
+ _ZNK11AgendaAlarmeqERKS_ @ 145 NONAME
+ _ZNK11AgendaAlarmneERKS_ @ 146 NONAME
+ _ZNK11AgendaEntry10categoriesEv @ 147 NONAME
+ _ZNK11AgendaEntry10repeatRuleEv @ 148 NONAME
+ _ZNK11AgendaEntry11descriptionEv @ 149 NONAME
+ _ZNK11AgendaEntry14durationInSecsEv @ 150 NONAME
+ _ZNK11AgendaEntry17completedDateTimeEv @ 151 NONAME
+ _ZNK11AgendaEntry20lastModifiedDateTimeEv @ 152 NONAME
+ _ZNK11AgendaEntry2idEv @ 153 NONAME
+ _ZNK11AgendaEntry4typeEv @ 154 NONAME
+ _ZNK11AgendaEntry5alarmEv @ 155 NONAME
+ _ZNK11AgendaEntry6isNullEv @ 156 NONAME
+ _ZNK11AgendaEntry6methodEv @ 157 NONAME
+ _ZNK11AgendaEntry6rDatesEv @ 158 NONAME
+ _ZNK11AgendaEntry6statusEv @ 159 NONAME
+ _ZNK11AgendaEntry7dtStampEv @ 160 NONAME
+ _ZNK11AgendaEntry7endTimeEv @ 161 NONAME
+ _ZNK11AgendaEntry7summaryEv @ 162 NONAME
+ _ZNK11AgendaEntry8geoValueEv @ 163 NONAME
+ _ZNK11AgendaEntry8locationEv @ 164 NONAME
+ _ZNK11AgendaEntry8priorityEv @ 165 NONAME
+ _ZNK11AgendaEntry9attendeesEv @ 166 NONAME
+ _ZNK11AgendaEntry9favouriteEv @ 167 NONAME
+ _ZNK11AgendaEntry9startTimeEv @ 168 NONAME
+ _ZNK11AgendaEntryeqERKS_ @ 169 NONAME
+ _ZNK11AgendaEntryneERKS_ @ 170 NONAME
+ _ZNK14AgendaAttendee10commonNameEv @ 171 NONAME
+ _ZNK14AgendaAttendee17responseRequestedEv @ 172 NONAME
+ _ZNK14AgendaAttendee4roleEv @ 173 NONAME
+ _ZNK14AgendaAttendee6isNullEv @ 174 NONAME
+ _ZNK14AgendaAttendee6statusEv @ 175 NONAME
+ _ZNK14AgendaAttendee7addressEv @ 176 NONAME
+ _ZNK14AgendaAttendeeeqERKS_ @ 177 NONAME
+ _ZNK14AgendaAttendeeneERKS_ @ 178 NONAME
+ _ZNK14AgendaCategory20extendedCategoryNameEv @ 179 NONAME
+ _ZNK14AgendaCategory6isNullEv @ 180 NONAME
+ _ZNK14AgendaCategory8categoryEv @ 181 NONAME
+ _ZNK14AgendaCategoryeqERKS_ @ 182 NONAME
+ _ZNK14AgendaCategoryneERKS_ @ 183 NONAME
+ _ZNK14AgendaGeoValue10getLatLongERdS0_ @ 184 NONAME
+ _ZNK14AgendaGeoValue6isNullEv @ 185 NONAME
+ _ZNK14AgendaGeoValueeqERKS_ @ 186 NONAME
+ _ZNK14AgendaGeoValueneERKS_ @ 187 NONAME
+ _ZNK16AgendaRepeatRule10byMonthDayEv @ 188 NONAME
+ _ZNK16AgendaRepeatRule15repeatRuleStartEv @ 189 NONAME
+ _ZNK16AgendaRepeatRule4typeEv @ 190 NONAME
+ _ZNK16AgendaRepeatRule5byDayEv @ 191 NONAME
+ _ZNK16AgendaRepeatRule5untilEv @ 192 NONAME
+ _ZNK16AgendaRepeatRule6isNullEv @ 193 NONAME
+ _ZNK16AgendaRepeatRule7byMonthEv @ 194 NONAME
+ _ZNK16AgendaRepeatRule8intervalEv @ 195 NONAME
+ _ZNK16AgendaRepeatRule9weekStartEv @ 196 NONAME
+ _ZNK16AgendaRepeatRuleeqERKS_ @ 197 NONAME
+ _ZNK16AgendaRepeatRuleneERKS_ @ 198 NONAME
+ _ZTI10AgendaUtil @ 199 NONAME
+ _ZTI11AgendaEntry @ 200 NONAME
+ _ZTI14AgendaAttendee @ 201 NONAME
+ _ZTI14AgendaCategory @ 202 NONAME
+ _ZTV10AgendaUtil @ 203 NONAME
+ _ZTV11AgendaEntry @ 204 NONAME
+ _ZTV14AgendaAttendee @ 205 NONAME
+ _ZTV14AgendaCategory @ 206 NONAME
+ _ZN10AgendaUtil22areNoEntriesInCalendarEv @ 207 NONAME
--- a/agendainterface/inc/agendaentry.h Fri Apr 16 14:57:40 2010 +0300
+++ b/agendainterface/inc/agendaentry.h Mon May 03 12:30:32 2010 +0300
@@ -210,11 +210,11 @@
void setInterval(int interval);
int interval() const;
- void setUntil(const QDate& date);
- QDate until() const;
+ void setUntil(const QDateTime& date);
+ QDateTime until() const;
- void setRepeatRuleStart(const QDate& date);
- QDate repeatRuleStart() const;
+ void setRepeatRuleStart(const QDateTime& date);
+ QDateTime repeatRuleStart() const;
void setWeekStart(Day day);
Day weekStart() const;
@@ -349,7 +349,10 @@
void setCompletedDateTime(const QDateTime& dateTime);
QDateTime completedDateTime() const;
-
+
+ void setDTStamp(const QDateTime& dateTime);
+ QDateTime dtStamp() const;
+
int durationInSecs() const;
AgendaEntry& operator=(const AgendaEntry& other);
bool operator==(const AgendaEntry& other) const;
--- a/agendainterface/inc/agendautil.h Fri Apr 16 14:57:40 2010 +0300
+++ b/agendainterface/inc/agendautil.h Mon May 03 12:30:32 2010 +0300
@@ -109,6 +109,8 @@
static QDateTime minTime();
static QDateTime maxTime();
+
+ static bool isWorkdaysRepeatingEntry(const AgendaRepeatRule& repeatRule);
Q_SIGNALS:
void entriesChanged(QList<ulong> ids);
--- a/alarmui/alarmalertwidget/alarmalertinterface/alarmalertinterface.pro Fri Apr 16 14:57:40 2010 +0300
+++ b/alarmui/alarmalertwidget/alarmalertinterface/alarmalertinterface.pro Mon May 03 12:30:32 2010 +0300
@@ -19,7 +19,6 @@
symbian: {
TARGET.EPOCALLOWDLLDATA = 1
TARGET.CAPABILITY = CAP_GENERAL_DLL
- TARGET.UID3 = 0x2002EA1B
}
# Input
--- a/alarmui/alarmalertwidget/alarmalertinterface/inc/alarmalertwidget.h Fri Apr 16 14:57:40 2010 +0300
+++ b/alarmui/alarmalertwidget/alarmalertinterface/inc/alarmalertwidget.h Mon May 03 12:30:32 2010 +0300
@@ -109,11 +109,11 @@
HbDeviceDialog *mDeviceDialog;
/**
- * @var mIsClockAlarm
- * @brief Tells if the current alert being displayed
- * is a clock (true) or calendar alert (false)
+ * @var mAlarmAlertType
+ * @brief Tells if the type of alert being displayed
+ * is a clock /calendar/to-do alert
*/
- bool mIsClockAlarm;
+ int mAlarmAlertType;
/**
* @var mCanSnooze
@@ -130,6 +130,12 @@
bool mIsSilent;
/**
+ * @var mIsTimedAlarm
+ * @brief Indicates if the alarm has time info or not
+ */
+ bool mIsTimedAlarm;
+
+ /**
* @var mObserver
* @brief The observer for user responses
*/
--- a/alarmui/alarmalertwidget/alarmalertinterface/inc/alarmcommon.h Fri Apr 16 14:57:40 2010 +0300
+++ b/alarmui/alarmalertwidget/alarmalertinterface/inc/alarmcommon.h Mon May 03 12:30:32 2010 +0300
@@ -33,8 +33,9 @@
TTime iTime;
HBufC* iLocation;
TBool iCanSnooze;
- TBool iIsClockAlarm;
+ TInt iAlarmAlertType;
TBool iIsSilent;
+ TBool iIsTimed;
};
/**
--- a/alarmui/alarmalertwidget/alarmalertinterface/src/alarmalertwidget.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/alarmui/alarmalertwidget/alarmalertinterface/src/alarmalertwidget.cpp Mon May 03 12:30:32 2010 +0300
@@ -81,8 +81,9 @@
mCanSnooze = alarmInfo->iCanSnooze;
mIsSilent = alarmInfo->iIsSilent;
- mIsClockAlarm = alarmInfo->iIsClockAlarm;
-
+ mAlarmAlertType = alarmInfo->iAlarmAlertType;
+ mIsTimedAlarm = alarmInfo->iIsTimed;
+
// Package the different parameters to send
QVariantMap params;
params.insert(alarmSubject, mSubject);
@@ -90,8 +91,9 @@
params.insert(alarmDateTime, mAlarmTime);
params.insert(alarmRingingType, mIsSilent);
params.insert(alarmCanSnooze, mCanSnooze);
- params.insert(alarmType, mIsClockAlarm);
-
+ params.insert(alarmType, mAlarmAlertType);
+ params.insert(alarmIsTimed, mIsTimedAlarm);
+
return mDeviceDialog->show(ALARM_ALERT_PLUGIN, params);
}
@@ -154,3 +156,4 @@
}
}
+// End of file --Don't remove this.
--- a/alarmui/alarmalertwidget/alarmalertplugin/alarmalertplugin.pro Fri Apr 16 14:57:40 2010 +0300
+++ b/alarmui/alarmalertwidget/alarmalertplugin/alarmalertplugin.pro Mon May 03 12:30:32 2010 +0300
@@ -15,7 +15,6 @@
symbian: {
TARGET.EPOCALLOWDLLDATA = 1
TARGET.CAPABILITY = CAP_GENERAL_DLL
- TARGET.UID3 = 0x2002EA1C
pluginstub.sources = alarmalertplugin.dll
pluginstub.path = /resource/plugins/devicedialogs
@@ -24,9 +23,11 @@
# Input
HEADERS += alarmalertplugin.h \
- alarmalertwidget_p.h
+ alarmalertwidget_p.h \
+ alarmalertdocloader.h
SOURCES += alarmalertplugin.cpp \
- alarmalertwidget_p.cpp
+ alarmalertwidget_p.cpp \
+ alarmalertdocloader.cpp
RESOURCES += alarmalert.qrc
--- a/alarmui/alarmalertwidget/alarmalertplugin/data/alarmalert.qrc Fri Apr 16 14:57:40 2010 +0300
+++ b/alarmui/alarmalertwidget/alarmalertplugin/data/alarmalert.qrc Mon May 03 12:30:32 2010 +0300
@@ -1,16 +1,11 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/image">
<file alias="clockAlarm.svg">icons/pri_small_bell.svg</file>
- <file alias="calendarAlarm.svg">icons/pri_small_calendar.svg</file>
- <file alias="slider.svg">icons/drawing.svg</file>
</qresource>
<qresource prefix="/xml">
- <file alias="alarmalert.docml">xml/alarmalert.docml</file>
- <file alias="alarmalert_unlocked.docml">xml/alarmalert_unlocked.docml</file>
- </qresource>
- <qresource prefix="/effect">
- <file alias="animate_portrait.fxml">effects/animate_portrait.fxml</file>
- <file alias="animate_landscape.fxml">effects/animate_landscape.fxml</file>
+ <file alias="alarmalert_calendar_unlocked.docml">xml/alarmalert_calendar_unlocked.docml</file>
+ <file alias="alarmalert_clock_unlocked.docml">xml/alarmalert_clock_unlocked.docml</file>
+ <file alias="alarmalert_todo_unlocked.docml">xml/alarmalert_todo_unlocked.docml</file>
</qresource>
<qresource prefix="/translations">
<file alias="alarmui_en_GB">alarmui_en_GB.qm</file>
Binary file alarmui/alarmalertwidget/alarmalertplugin/data/alarmui_en_GB.qm has changed
--- a/alarmui/alarmalertwidget/alarmalertplugin/data/effects/animate_landscape.fxml Fri Apr 16 14:57:40 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<layers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://www.nokia.com/FXML">
- <visual>
- <param name="translation_y" type="anim">
- <keyframe at="0">100.0</keyframe>
- <duration>1.5</duration>
- <keyframe at="1.0">250.0</keyframe>
- <style>linear</style>
- </param>
- <param name="opacity" type="anim">
- <style>linear</style>
- <keyframe at="0">1.0</keyframe>
- <duration>1.5</duration>
- <keyframe at="1.0">0.1</keyframe>
- </param>
- </visual>
-</layers>
--- a/alarmui/alarmalertwidget/alarmalertplugin/data/effects/animate_portrait.fxml Fri Apr 16 14:57:40 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<layers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://www.nokia.com/FXML">
- <visual>
- <param name="translation_y" type="anim">
- <keyframe at="0">350.0</keyframe>
- <duration>1.5</duration>
- <keyframe at="1.0">500.0</keyframe>
- <style>linear</style>
- </param>
- <param name="opacity" type="anim">
- <style>linear</style>
- <keyframe at="0">1.0</keyframe>
- <duration>1.5</duration>
- <keyframe at="1.0">0.1</keyframe>
- </param>
- </visual>
-</layers>
--- a/alarmui/alarmalertwidget/alarmalertplugin/data/icons/drawing.svg Fri Apr 16 14:57:40 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="640px"
- height="480px"
- id="svg3209"
- sodipodi:version="0.32"
- inkscape:version="0.46"
- sodipodi:docname="drawing.svg"
- inkscape:output_extension="org.inkscape.output.svg.inkscape">
- <defs
- id="defs3211">
- <inkscape:perspective
- sodipodi:type="inkscape:persp3d"
- inkscape:vp_x="0 : 240 : 1"
- inkscape:vp_y="0 : 1000 : 0"
- inkscape:vp_z="640 : 240 : 1"
- inkscape:persp3d-origin="320 : 160 : 1"
- id="perspective3217" />
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="0.77472527"
- inkscape:cx="320"
- inkscape:cy="240"
- inkscape:current-layer="layer1"
- inkscape:document-units="px"
- showgrid="false"
- inkscape:window-width="1680"
- inkscape:window-height="997"
- inkscape:window-x="-4"
- inkscape:window-y="-4" />
- <metadata
- id="metadata3214">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- id="layer1"
- inkscape:label="Layer 1"
- inkscape:groupmode="layer">
- <path
- style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.97268057;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 112.80904,189.96132 C 313.74059,310.02753 313.74059,310.02753 313.74059,310.02753 L 515.8009,187.87317 L 427.75203,187.87317 L 313.74059,252.60459 L 203.1154,187.87317 L 112.80904,189.96132 z"
- id="path2405" />
- <path
- style="fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:0.20007092;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 215.87173,249.67005 L 119.10078,191.8539 L 139.7157,191.06064 C 151.05379,190.62432 170.032,190.18868 181.88949,190.09254 L 203.44836,189.91773 L 258.56016,222.20338 L 313.67195,254.48912 L 370.59703,222.20866 L 427.52199,189.92813 L 468.07404,189.92293 C 490.37756,189.92008 508.38394,190.1503 508.08822,190.43455 C 506.52793,191.93392 316.21505,306.55628 314.57872,306.98217 C 313.51383,307.2593 269.09563,281.46887 215.87173,249.67001 L 215.87173,249.67005 z"
- id="path2390" />
- </g>
-</svg>
--- a/alarmui/alarmalertwidget/alarmalertplugin/data/icons/pri_small_calendar.svg Fri Apr 16 14:57:40 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
- <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
-]>
-<svg version="1.1"
- xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
- x="0px" y="0px" width="32px" height="32px" viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
-<defs>
-</defs>
-<path opacity="0.6" d="M23,5c0-1.104-0.896-2-2-2s-2,0.896-2,2h-6c0-1.104-0.897-2-2-2S9,3.896,9,5H4v24h24V5H23z"/>
-<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="15.9995" y1="11.3691" x2="15.9995" y2="28.0025">
- <stop offset="0" style="stop-color:#F9F9F9"/>
- <stop offset="1" style="stop-color:#B5B5B5"/>
-</linearGradient>
-<rect x="5" y="6" fill="url(#SVGID_1_)" width="22" height="22"/>
-<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="12.2095" y1="24.834" x2="12.2095" y2="14.7479">
- <stop offset="0" style="stop-color:#303030"/>
- <stop offset="1" style="stop-color:#000000"/>
-</linearGradient>
-<path fill="url(#SVGID_2_)" d="M15.228,23.906V25H9.191v-1.094h2.146v-7.629L9.191,16.77v-1.094l3.015-0.95h0.991v9.181H15.228z"/>
-<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="19.7939" y1="24.834" x2="19.7939" y2="14.7479">
- <stop offset="0" style="stop-color:#303030"/>
- <stop offset="1" style="stop-color:#000000"/>
-</linearGradient>
-<path fill="url(#SVGID_3_)" d="M22.843,23.811V25h-6.098v-0.745c0-0.711,0.123-1.343,0.369-1.894s0.55-1.021,0.909-1.412
- c0.359-0.389,0.816-0.816,1.367-1.281c0.66-0.557,1.078-0.986,1.251-1.292s0.26-0.608,0.26-0.909c0-0.529-0.14-0.926-0.421-1.193
- c-0.279-0.266-0.7-0.399-1.261-0.399c-0.593,0-1.31,0.153-2.153,0.458h-0.014v-1.217c0.885-0.277,1.746-0.417,2.584-0.417
- c1.035,0,1.82,0.227,2.358,0.681c0.538,0.453,0.807,1.121,0.807,2.006c0,0.496-0.12,0.985-0.362,1.467
- c-0.242,0.48-0.811,1.097-1.709,1.849c-0.502,0.424-0.893,0.776-1.176,1.06s-0.521,0.594-0.715,0.934
- c-0.193,0.339-0.299,0.711-0.317,1.117H22.843z"/>
-<polygon fill="#FFFFFF" points="22,23 22,28 27,23 "/>
-<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="15.9995" y1="6" x2="15.9995" y2="12">
- <stop offset="0" style="stop-color:#FF7042"/>
- <stop offset="1" style="stop-color:#991B23"/>
-</linearGradient>
-<rect x="5" y="6" fill="url(#SVGID_4_)" width="22" height="6"/>
-<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="11" y1="7" x2="11" y2="11">
- <stop offset="0" style="stop-color:#4A050A"/>
- <stop offset="1" style="stop-color:#B00F25"/>
-</linearGradient>
-<circle fill="url(#SVGID_5_)" cx="11" cy="9" r="2"/>
-<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="21" y1="7" x2="21" y2="11">
- <stop offset="0" style="stop-color:#4A050A"/>
- <stop offset="1" style="stop-color:#B00F25"/>
-</linearGradient>
-<circle fill="url(#SVGID_6_)" cx="21" cy="9" r="2"/>
-<rect x="5" y="6" opacity="0.4" fill="#FFFFFF" width="22" height="1"/>
-<linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="11" y1="4" x2="11" y2="10">
- <stop offset="0" style="stop-color:#FFFCFE"/>
- <stop offset="1" style="stop-color:#8C8C8C"/>
-</linearGradient>
-<path fill="url(#SVGID_7_)" d="M12,9c0,0.55-0.45,1-1,1l0,0c-0.55,0-1-0.45-1-1V5c0-0.55,0.45-1,1-1l0,0c0.55,0,1,0.45,1,1V9z"/>
-<linearGradient id="SVGID_8_" gradientUnits="userSpaceOnUse" x1="21" y1="4" x2="21" y2="10">
- <stop offset="0" style="stop-color:#FFFCFE"/>
- <stop offset="1" style="stop-color:#8C8C8C"/>
-</linearGradient>
-<path fill="url(#SVGID_8_)" d="M22,9c0,0.55-0.45,1-1,1l0,0c-0.55,0-1-0.45-1-1V5c0-0.55,0.45-1,1-1l0,0c0.55,0,1,0.45,1,1V9z"/>
-<rect x="5" y="12" opacity="0.2" width="22" height="1"/>
-<rect fill="none" width="32" height="32"/>
-</svg>
--- a/alarmui/alarmalertwidget/alarmalertplugin/inc/alarmalert.h Fri Apr 16 14:57:40 2010 +0300
+++ b/alarmui/alarmalertwidget/alarmalertplugin/inc/alarmalert.h Mon May 03 12:30:32 2010 +0300
@@ -43,6 +43,9 @@
// The string identifier for alarm snoozability
const QString alarmCanSnooze("canSnooze");
+// The string identifier for checking the nontimed alarms
+const QString alarmIsTimed("isTimed");
+
/**
* @enum Commands
@@ -57,4 +60,16 @@
Other
};
+/**
+ * @enum AlarmType
+ * @brief Alarm types to be sent
+ * to the alarm dialog
+ */
+enum AlarmType {
+ ClockAlarm = 0,
+ CalendarAlarm,
+ TodoAlarm,
+ OtherAlarm
+ };
+
#endif // __ALARM_ALERT_H__
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/alarmui/alarmalertwidget/alarmalertplugin/inc/alarmalertdocloader.h Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Class declaration for AlarmAlertDocLoader.
+ *
+ */
+
+#ifndef ALARMALERTDOCLOADER_H_
+#define ALARMALERTDOCLOADER_H_
+
+// system includes
+#include <hbdocumentloader.h>
+
+
+class AlarmAlertDocLoader : public HbDocumentLoader
+{
+public:
+ AlarmAlertDocLoader(const QVariantMap ¶meters);
+ ~AlarmAlertDocLoader();
+
+private:
+ virtual QObject *createObject(const QString &type, const QString &name);
+
+ QVariantMap mParameters;
+};
+
+#endif /* ALARMALERTDOCLOADER_H_ */
+// End of file --Don't remove this.
--- a/alarmui/alarmalertwidget/alarmalertplugin/inc/alarmalertwidget_p.h Fri Apr 16 14:57:40 2010 +0300
+++ b/alarmui/alarmalertwidget/alarmalertplugin/inc/alarmalertwidget_p.h Mon May 03 12:30:32 2010 +0300
@@ -22,6 +22,9 @@
#include <hbdevicedialoginterface.h>
#include <hbeffect.h>
+// User includes
+#include "alarmalert.h"
+
// Forward declarations
class QGraphicsWidget;
class QEvent;
@@ -29,10 +32,12 @@
class HbMainWindow;
class HbDocumentLoader;
class HbLabel;
-class HbPushButton;
+class HbAction;
+class AlarmAlertDocLoader;
-const QString alarmSwipeUIDocml(":/xml/alarmalert.docml");
-const QString alarmNormalUIDocml(":/xml/alarmalert_unlocked.docml");
+const QString alarmNormalUICalendarDocml(":/xml/alarmalert_calendar_unlocked.docml");
+const QString alarmNormalUIClockDocml(":/xml/alarmalert_clock_unlocked.docml");
+const QString alarmNormalUITodoDocml(":/xml/alarmalert_todo_unlocked.docml");
// Class declaration
/**
@@ -81,6 +86,12 @@
*/
HbDialog *deviceDialogWidget() const;
+ /**
+ * @brief Sets up the normal ui for alarms.
+ * This UI is shown when the screen is unlocked
+ */
+ void setupNormalUI(AlarmAlertDocLoader *alertDocLoader);
+
protected:
/**
@@ -93,26 +104,8 @@
* @brief From QGraphicsWidget
* @see QGraphicsWidget
*/
- bool sceneEvent(QEvent *event);
-
- /**
- * @brief From QGraphicsWidget
- * @see QGraphicsWidget
- */
void closeEvent(QCloseEvent *event);
- /**
- * @brief From QGraphicsWidget
- * @see QGraphicsWidget
- */
- void mousePressEvent(QGraphicsSceneMouseEvent *event);
-
- /**
- * @brief From QGraphicsWidget
- * @see QGraphicsWidget
- */
- void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
-
signals:
/**
@@ -128,13 +121,6 @@
private slots:
/**
- * @brief Callback function that gets called when the
- * slider animation ends
- * @param status The status of the animation
- */
- void animationComplete(const HbEffect::EffectStatus &status);
-
- /**
* @brief Callback function for handling orientation changes
*/
void handleOrientationChange();
@@ -162,24 +148,6 @@
void parseAndFetchParams(const QVariantMap ¶meters);
/**
- * @brief Sets up the swipe ui for alarms.
- * This UI is shown only when the screen is locked
- */
- void setupSwipeUI();
-
- /**
- * @brief Sets up the normal ui for alarms.
- * This UI is shown when the screen is unlocked
- */
- void setupNormalUI();
-
- /**
- * @brief Checks if the screen is locked
- * @return true if screen is locked, false otherwise
- */
- bool isScreenLocked();
-
- /**
* @brief handles the calendar alarms
*/
void handleCalendarAlarms();
@@ -188,6 +156,11 @@
* @brief handles the clock alarms
*/
void handleClockAlarms();
+
+ /**
+ * @brief handles to-do alarms
+ */
+ void handleToDoAlarms();
private:
Q_DISABLE_COPY(AlarmAlertDialogPrivate)
@@ -253,16 +226,16 @@
HbMainWindow *mMainWindow;
/**
- * @var mDocLoader
+ * @var mAlertDocLoader
* @brief The document loader for loading docml's
*/
- HbDocumentLoader *mDocLoader;
+ AlarmAlertDocLoader* mAlertDocLoader;
/**
- * @var mSnoozeButton
- * @brief snooze button for alarm
+ * @var mSnoozeAction
+ * @brief snooze softkey for alarm
*/
- HbPushButton *mSnoozeButton;
+ HbAction *mSnoozeAction;
/**
* @var mUserResponse
@@ -271,11 +244,11 @@
int mUserResponse;
/**
- * @var mIsClockAlarm
- * @brief Tells if the current alert being displayed
- * is a clock (true) or calendar alert (false)
+ * @var mAlarmAlertType
+ * @brief Tells if the type of alert being displayed
+ * is a clock /calendar/to-do alert
*/
- bool mIsClockAlarm;
+ AlarmType mAlarmAlertType;
/**
* @var mCanSnooze
@@ -292,14 +265,20 @@
bool mIsSilent;
/**
+ * @var mIsTimedAlarm
+ * @brief Indicates if the alarm is has time info or not
+ */
+ bool mIsTimedAlarm;
+
+ /**
* @var mClosedByClient
* @brief Indicates if the alarm dialog is closed by the client
*/
bool mClosedByClient;
/**
- * @var mIsSilenceButton
- * @brief Indicates if the silence button is shown for alarm
+ * @var mIsSilenceKey
+ * @brief Indicates if the silence softkey is shown for alarm
*/
- bool mIsSilenceButton;
+ bool mIsSilenceKey;
};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/alarmui/alarmalertwidget/alarmalertplugin/src/alarmalertdocloader.cpp Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Definition file for class AlarmAlertDocLoader.
+ *
+ */
+
+// System includes
+#include <qvariant.h>
+
+// User includes
+#include "alarmalertdocloader.h"
+#include "alarmalertwidget_p.h"
+
+AlarmAlertDocLoader::AlarmAlertDocLoader(const QVariantMap ¶meters):
+mParameters(parameters)
+{
+
+}
+
+AlarmAlertDocLoader::~AlarmAlertDocLoader()
+{
+
+}
+
+QObject* AlarmAlertDocLoader::createObject(const QString &type,
+ const QString &name)
+{
+ if (name == "dialog"){
+ QObject *alarmAlertDialogPrivate = new AlarmAlertDialogPrivate(
+ mParameters);
+ alarmAlertDialogPrivate->setObjectName(name);
+ return alarmAlertDialogPrivate;
+ }else {
+ return HbDocumentLoader::createObject(type, name);
+ }
+}
+
+// End of file --Don't remove this.
--- a/alarmui/alarmalertwidget/alarmalertplugin/src/alarmalertplugin.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/alarmui/alarmalertwidget/alarmalertplugin/src/alarmalertplugin.cpp Mon May 03 12:30:32 2010 +0300
@@ -26,6 +26,7 @@
#include "alarmalertplugin.h"
#include "alarmalertwidget_p.h"
#include "alarmalert.h"
+#include "alarmalertdocloader.h"
// Plugin export
Q_EXPORT_PLUGIN2(alarmalertplugin, AlarmAlertPlugin);
@@ -131,7 +132,31 @@
// Create and return the alarm alert dialog
HbDeviceDialogInterface *ret(0);
- AlarmAlertDialogPrivate *alarmDialog = new AlarmAlertDialogPrivate(parameters);
- ret = alarmDialog;
+ AlarmAlertDocLoader *alertDocLoader = new AlarmAlertDocLoader(parameters);
+ // Get the type of alarm to load the proper docml
+ QVariantMap::const_iterator iter = parameters.constBegin();
+ int count = parameters.size();
+ AlarmType alertType = OtherAlarm;
+ while (iter != parameters.constEnd()) {
+ QString key(iter.key());
+ if (alarmType == key) {
+ alertType = static_cast <AlarmType> (iter.value().toInt());
+ }
+ iter++;
+ }
+ bool loadSuccess = false;
+ if (alertType == ClockAlarm) {
+ alertDocLoader->load(alarmNormalUIClockDocml, &loadSuccess);
+ }else if (alertType == TodoAlarm) {
+ alertDocLoader->load(alarmNormalUITodoDocml, &loadSuccess);
+ }else if(alertType == CalendarAlarm) {
+ alertDocLoader->load(alarmNormalUICalendarDocml, &loadSuccess);
+ }
+ if(!loadSuccess) {
+ qFatal("Unable to load the docml");
+ }
+ AlarmAlertDialogPrivate *alertDialog = qobject_cast<AlarmAlertDialogPrivate*> (alertDocLoader->findWidget("dialog"));
+ alertDialog->setupNormalUI(alertDocLoader);
+ ret = alertDialog;
return ret;
}
--- a/alarmui/alarmalertwidget/alarmalertplugin/src/alarmalertwidget_p.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/alarmui/alarmalertwidget/alarmalertplugin/src/alarmalertwidget_p.cpp Mon May 03 12:30:32 2010 +0300
@@ -30,10 +30,12 @@
#include <hbextendedlocale.h>
#include <hbi18ndef.h>
#include <hbapplication.h>
+#include <hbaction.h>
// User includes
#include "alarmalertwidget_p.h"
#include "alarmalert.h"
+#include "alarmalertdocloader.h"
// ---------------------------------------------------------
// AlarmAlertDialogPrivate::AlarmAlertDialogPrivate
@@ -42,23 +44,18 @@
//
AlarmAlertDialogPrivate::AlarmAlertDialogPrivate(const QVariantMap ¶meters):
mClosedByClient(false),
- mIsSilenceButton(false)
-{
- // Extract all the parameters sent by the client
- parseAndFetchParams(parameters);
-
+ mIsSilenceKey(false)
+ {
+ // Extract all the parameters sent by the client
+ parseAndFetchParams(parameters);
+
// Set the dismiss policy and timeout property
setDismissPolicy(HbPopup::NoDismiss);
- setTimeout(HbPopup::NoTimeout);
-
- // Initialize the user response
+ setTimeout(HbPopup::NoTimeout);
+
+ // Initialize the user response
mUserResponse = Other;
-
- /*if (isScreenLocked()) {
- setupSwipeUI();
- } else {
- setupNormalUI();
- }*/
+
// Load the translation file and install the editor specific translator
mTranslator = new QTranslator;
QString lang = QLocale::system().name();
@@ -67,19 +64,9 @@
// TODO: Load the appropriate .qm file based on locale
//bool loaded = mTranslator->load("alarmui_" + lang, path);
HbApplication::instance()->installTranslator(mTranslator);
-
- setupNormalUI();
-
- // Find the content widget and set it to self
- QGraphicsWidget *contentWidget = mDocLoader->findWidget("content");
- Q_ASSERT_X(contentWidget, "alarmalertwidget_p.cpp", "Unable to find content widget");
- setContentWidget(contentWidget);
-
- // Resize the dialog to accomodate the content widget
- setPreferredSize(contentWidget->minimumSize());
-
- // TODO: Gestures not working. Integrate once support is available from Qt
- grabGesture(Qt::SwipeGesture);
+
+ // TODO: Gestures not working. Integrate once support is available from Qt
+ grabGesture(Qt::SwipeGesture);
}
// ---------------------------------------------------------
@@ -90,10 +77,9 @@
AlarmAlertDialogPrivate::~AlarmAlertDialogPrivate()
{
// Cleanup
- if (mDocLoader) {
- delete mDocLoader;
- }
-
+ if (mAlertDocLoader) {
+ delete mAlertDocLoader;
+ }
// Cancel any ongoing animations
HbEffect::cancel(mSlider, "slideDownPortrait", false, false, false);
HbEffect::cancel(mSlider, "slideDownLandscape", false, false, false);
@@ -190,47 +176,6 @@
}
// ---------------------------------------------------------
-// AlarmAlertDialogPrivate::animationComplete
-// rest of the details are commented in the header
-// ---------------------------------------------------------
-//
-void AlarmAlertDialogPrivate::animationComplete(const HbEffect::EffectStatus &status)
-{
- Q_UNUSED(status);
-
- // Restart the animation effects
- if (Qt::Vertical == hbInstance->orientation()) {
- HbEffect::start(mSlider, "slideDownPortrait", this, "animationComplete");
- } else {
- HbEffect::start(mSlider, "slideDownLandscape", this, "animationComplete");
- }
-}
-
-// ---------------------------------------------------------
-// AlarmAlertDialogPrivate::sceneEvent
-// rest of the details are commented in the header
-// ---------------------------------------------------------
-//
-bool AlarmAlertDialogPrivate::sceneEvent(QEvent *event)
-{
- // TODO: Need to handle gestures once they are available
- if (event->type() == QEvent::Gesture) {
- QGestureEvent *gestureEvent =
- static_cast<QGestureEvent*>(event);
- if (const QGesture *gesture = gestureEvent->gesture(Qt::SwipeGesture)) {
- if (Qt::GestureFinished == gesture->state()) {
- event->accept();
- close();
- return true;
- }
- event->accept();
- return true;
- }
- }
- return HbWidget::sceneEvent(event);
-}
-
-// ---------------------------------------------------------
// AlarmAlertDialogPrivate::handleOrientationChange
// rest of the details are commented in the header
// ---------------------------------------------------------
@@ -238,15 +183,6 @@
void AlarmAlertDialogPrivate::handleOrientationChange ()
{
// TODO: Need to change this as per the UI concept
- // Might need to disable orientation changes
- bool loadSuccess(false);
- if (Qt::Vertical == hbInstance->orientation()) {
- mDocLoader->load(":/xml/alarmalert.docml", "portrait", &loadSuccess);
- Q_ASSERT_X(loadSuccess, "alarmalertwidget_p.cpp", "Unable to load portrait section");
- } else {
- mDocLoader->load(":/xml/alarmalert.docml", "landscape", &loadSuccess);
- Q_ASSERT_X(loadSuccess, "alarmalertwidget_p.cpp", "Unable to load landscape section");
- }
}
// ---------------------------------------------------------
@@ -267,10 +203,10 @@
//
void AlarmAlertDialogPrivate::silenced()
{
- if (mIsSilenceButton) {
+ if (mIsSilenceKey) {
mUserResponse = Silence;
- mSnoozeButton->setText(hbTrId("txt_calendar_button_alarm_snooze"));
- mIsSilenceButton = false;
+ mSnoozeAction->setText(hbTrId("txt_calendar_button_alarm_snooze"));
+ mIsSilenceKey = false;
QVariantMap param;
param.insert(alarmCommand, mUserResponse);
emit deviceDialogData(param);
@@ -278,9 +214,6 @@
mUserResponse = Snooze;
close();
}
-
-
-
}
// ---------------------------------------------------------
@@ -313,12 +246,14 @@
} else if (alarmDateTime == key) {
mAlarmTime = iter.value().toDateTime();
} else if (alarmType == key) {
- mIsClockAlarm = iter.value().toBool();
+ mAlarmAlertType = static_cast <AlarmType> (iter.value().toInt());
} else if (alarmCanSnooze == key) {
mCanSnooze = iter.value().toBool();
} else if (alarmRingingType == key) {
mIsSilent = iter.value().toBool();
- } else {
+ } else if (alarmIsTimed == key) {
+ mIsTimedAlarm = iter.value().toBool();
+ }else {
break;
}
iter++;
@@ -326,136 +261,28 @@
}
// ---------------------------------------------------------
-// AlarmAlertDialogPrivate::setupSwipeUI
-// rest of the details are commented in the header
-// ---------------------------------------------------------
-//
-void AlarmAlertDialogPrivate::setupSwipeUI()
-{
- // Connect to orientation change signals
- QList<HbMainWindow*> windowList = hbInstance->allMainWindows();
- mMainWindow = windowList.at(0);
- Q_ASSERT_X(mMainWindow, "alarmalertwidget_p.cpp", "Unable to get the main window");
- connect(mMainWindow, SIGNAL(aboutToChangeOrientation()), this, SLOT(handleOrientationChange()));
-
- // Load the docml file to get the content widget for the dialog
- mDocLoader = new HbDocumentLoader();
- bool loadSuccess = false;
- mDocLoader->load(alarmSwipeUIDocml, &loadSuccess);
- Q_ASSERT_X(loadSuccess, "alarmalertwidget_p.cpp", "Unable to load docml");
-
- // Get the reference to the slider widget
- mSlider = mDocLoader->findWidget("sliderIcon");
- Q_ASSERT_X(mSlider, "alarmalertwidget_p.cpp", "Unable to find slider widget");
-
- mAlarmDescription = qobject_cast<HbLabel*> (mDocLoader->findWidget("alarmDescription"));
- Q_ASSERT_X(mAlarmDescription, "alarmalertwidget_p.cpp", "Unable to find alarm description label");
- mAlarmDescription->setPlainText(mSubject);
-
- mAlarmDateTime = qobject_cast<HbLabel*> (mDocLoader->findWidget("alarmTime"));
- Q_ASSERT_X(mAlarmDateTime, "alarmalertwidget_p.cpp", "Unable to find alarm time label");
-
- mAlarmIcon = qobject_cast<HbLabel*> (mDocLoader->findWidget("alarmIcon"));
- Q_ASSERT_X(mAlarmIcon, "alarmalertwidget_p.cpp", "Unable to find alarm icon");
-
- if (!mIsClockAlarm) {
- mAlarmIcon->setIcon(HbIcon(":/image/calendarAlarm"));
- }
-
- // Set the time to the time label
- HbExtendedLocale locale;
- mAlarmDateTime->setPlainText(locale.format(mAlarmTime.time(), r_qtn_time_usual));
-
- // Add the required effects.
- HbEffect::add(mSlider,
- QString(":/effect/animate_portrait.fxml"),
- "slideDownPortrait");
- HbEffect::add(mSlider,
- QString(":/effect/animate_landscape.fxml"),
- "slideDownLandscape");
-
- // Based on the orientation, load the appropriate sections and animations
- if (Qt::Vertical == hbInstance->orientation()) {
- mDocLoader->load(":/xml/alarmalert.docml", "portrait", &loadSuccess);
- Q_ASSERT_X(loadSuccess, "alarmalertwidget_p.cpp", "Unable to load portrait section");
-
- HbEffect::start(mSlider, "slideDownPortrait", this, "animationComplete");
- } else {
- mDocLoader->load(":/xml/alarmalert.docml", "landscape", &loadSuccess);
- Q_ASSERT_X(loadSuccess, "alarmalertwidget_p.cpp", "Unable to load landscape section");
-
- HbEffect::start(mSlider, "slideDownLandscape", this, "animationComplete");
- }
-
- // Get the reference to the snooze button
- HbPushButton *snoozeButton = qobject_cast<HbPushButton*> (mDocLoader->findWidget("snoozeButton"));
- Q_ASSERT_X(snoozeButton, "alarmalertwidget_p.cpp", "Unable to find snooze button");
- connect(snoozeButton, SIGNAL(clicked()), this, SLOT(snoozed()));
-
- if (!mCanSnooze) {
- snoozeButton->hide();
- }
-}
-
-// ---------------------------------------------------------
// AlarmAlertDialogPrivate::setupNormalUI
// rest of the details are commented in the header
// ---------------------------------------------------------
//
-void AlarmAlertDialogPrivate::setupNormalUI()
-{
- // Load the docml file to get the content widget for the dialog
- mDocLoader = new HbDocumentLoader();
- bool loadSuccess = false;
- mDocLoader->load(alarmNormalUIDocml, &loadSuccess);
- Q_ASSERT_X(loadSuccess, "alarmalertwidget_p.cpp", "Unable to load docml");
-
- mAlarmDescription = qobject_cast<HbLabel*> (mDocLoader->findWidget("alarmDescription"));
- Q_ASSERT_X(mAlarmDescription, "alarmalertwidget_p.cpp", "Unable to find alarm description label");
- mAlarmDescription->setPlainText(mSubject);
-
- mAlarmDateTime = qobject_cast<HbLabel*> (mDocLoader->findWidget("alarmTime"));
- Q_ASSERT_X(mAlarmDateTime, "alarmalertwidget_p.cpp", "Unable to find alarm time label");
-
- mAlarmIcon = qobject_cast<HbLabel*> (mDocLoader->findWidget("alarmIcon"));
- Q_ASSERT_X(mAlarmIcon, "alarmalertwidget_p.cpp", "Unable to find alarm icon");
-
- if (!mIsClockAlarm) {
- mAlarmIcon->setIcon(HbIcon(":/image/calendarAlarm"));
- }
-
- // Set the time to the time label
- HbExtendedLocale locale = HbExtendedLocale::system();
- mAlarmDateTime->setPlainText(
- hbTrId("txt_calendar_info_alarm_start_time").arg(
- locale.format(mAlarmTime.time(), r_qtn_time_usual)));
-
- // TODO: Based on the orientation, load the appropriate sections and animations
- if (Qt::Vertical == hbInstance->orientation()) {
- } else {
- }
-
+void AlarmAlertDialogPrivate::setupNormalUI(AlarmAlertDocLoader *alertDocLoader)
+ {
+ if(!alertDocLoader) {
+ // Nothing can be done. Simply return
+ return;
+ }
+ mAlertDocLoader = alertDocLoader;
-
- // Get the reference to the stop button
- HbPushButton *stopButton = qobject_cast<HbPushButton*> (mDocLoader->findWidget("stopButton"));
- Q_ASSERT_X(stopButton, "alarmalertwidget_p.cpp", "Unable to find stop button");
- connect(stopButton, SIGNAL(clicked()), this, SLOT(dismissed()));
-
- if (mIsClockAlarm) {
- handleClockAlarms();
- }else {
+ if (mAlarmAlertType == ClockAlarm) {
+ handleClockAlarms();
+ }else if(mAlarmAlertType == TodoAlarm) {
+ handleToDoAlarms();
+ }else if(mAlarmAlertType == CalendarAlarm) {
handleCalendarAlarms();
}
-
- QList<HbMainWindow*> windowList = hbInstance->allMainWindows();
- mMainWindow = windowList.at(0);
- QRectF screenRect = mMainWindow->rect();
- setPreferredPos(QPointF(screenRect.width()/2, screenRect.height()/2), HbPopup::Center);
}
-
// ---------------------------------------------------------
// AlarmAlertDialogPrivate::handleClockAlarms
// rest of the details are commented in the header
@@ -463,17 +290,59 @@
//
void AlarmAlertDialogPrivate::handleClockAlarms()
{
- // Get the reference to the snooze button
- HbPushButton *snoozeButton = qobject_cast<HbPushButton*> (mDocLoader->findWidget("snoozeButton"));
- Q_ASSERT_X(snoozeButton, "alarmalertwidget_p.cpp", "Unable to find snooze button");
- connect(snoozeButton, SIGNAL(clicked()), this, SLOT(snoozed()));
-
+ QGraphicsWidget *headingWidget = mAlertDocLoader->findWidget("heading");
+ if (!headingWidget) {
+ qFatal("Unable to load the heading Widget");
+ }
+
+ mAlarmDateTime = qobject_cast<HbLabel*> (
+ mAlertDocLoader->findWidget("alarmTime"));
+ if (!mAlarmDateTime) {
+ qFatal("Unable to load the alarmTime label");
+ }
+ HbExtendedLocale locale = HbExtendedLocale::system();
+ mAlarmDateTime->setPlainText(
+ hbTrId("txt_calendar_info_alarm_start_time").arg(
+ locale.format(mAlarmTime.time(), r_qtn_time_usual)));
+
+ mAlarmDescription = qobject_cast<HbLabel*> (
+ mAlertDocLoader->findWidget("alarmDescription"));
+ if (!mAlarmDescription) {
+ qFatal("Unable to load the alarmDescription label");
+ }
+ mAlarmDescription->setPlainText(mSubject);
+
+ mAlarmIcon = qobject_cast<HbLabel*> (
+ mAlertDocLoader->findWidget("alarmIcon"));
+ if (!mAlarmIcon) {
+ qFatal("Unable to load the alarm icon");
+ }
+ //TODO: Add the proper icon for clock alarms in the docml
+ mAlarmIcon->setIcon(HbIcon(":/image/clockAlarm.svg"));
+
+ HbAction *snoozeAction = qobject_cast<HbAction*> (
+ mAlertDocLoader->findObject("snoozeAction"));
+ if (!snoozeAction) {
+ qFatal("Unable to load the snoozeAction softkey");
+ }
+ snoozeAction->setText(hbTrId("txt_calendar_button_alarm_snooze"));
+ disconnect(snoozeAction, SIGNAL(triggered()), this, SLOT(close()));
+ connect(snoozeAction, SIGNAL(triggered()), this, SLOT(snoozed()));
+
+ HbAction *stopAction = qobject_cast<HbAction*> (
+ mAlertDocLoader->findObject("stopAction"));
+ if (!stopAction) {
+ qFatal("Unable to load the stopAction softkey");
+ }
+ stopAction->setText(hbTrId("txt_calendar_button_alarm_dialog_snooze"));
+ disconnect(stopAction, SIGNAL(triggered()), this, SLOT(close()));
+ connect(stopAction, SIGNAL(triggered()), this, SLOT(dismissed()));
+
if (!mCanSnooze) {
- snoozeButton->hide();
+ snoozeAction->setVisible(false);
}
}
-
// ---------------------------------------------------------
// AlarmAlertDialogPrivate::handleCalendarAlarms
// rest of the details are commented in the header
@@ -481,58 +350,179 @@
//
void AlarmAlertDialogPrivate::handleCalendarAlarms()
{
- mSnoozeButton = qobject_cast<HbPushButton*> (mDocLoader->findWidget("snoozeButton"));
- Q_ASSERT_X(mSnoozeButton, "alarmalertwidget_p.cpp", "Unable to find snooze button");
- connect(mSnoozeButton, SIGNAL(clicked()), this, SLOT(silenced()));
- if(!mIsSilent) {
- mSnoozeButton->setText(hbTrId("txt_calendar_button_alarm_silence"));
- mIsSilenceButton = true;
- }
- // Hide the snooze button if the alarm cannot be snoozed
- if (!mCanSnooze) {
- mSnoozeButton->hide();
+ bool success = false;
+ HbExtendedLocale locale = HbExtendedLocale::system();
+ // Check if the alarm has the time info or not.
+ // For all day events the time label has to be hidden
+ // So load the proper sections accordingly
+ if ( mIsTimedAlarm ) {
+ mAlertDocLoader->load(
+ alarmNormalUICalendarDocml, "calendarTimed",&success);
+ if (!success) {
+ qFatal("Unable to load the calendarTimed section");
+ }
+ mAlarmDateTime = qobject_cast<HbLabel*> (
+ mAlertDocLoader->findWidget("alarmTime"));
+ if (!mAlarmDateTime) {
+ qFatal("Unable to find the alarmTime label");
+ }
+ mAlarmDateTime->setPlainText(
+ hbTrId("txt_calendar_info_alarm_start_time").arg(
+ locale.format(mAlarmTime.time(), r_qtn_time_usual)));
+ HbLabel *alarmDate = qobject_cast<HbLabel*> (
+ mAlertDocLoader->findWidget("alarmDate"));
+ if (!alarmDate) {
+ qFatal("Unable to find the alarmDate label");
+ }
+ alarmDate->setPlainText(
+ hbTrId("txt_calendar_info_alarm_start_date").arg(
+ locale.format(mAlarmTime.date(), r_qtn_date_usual_with_zero)));
+ HbLabel *alarmDateNonTimed = qobject_cast<HbLabel*> (
+ mAlertDocLoader->findWidget("nonTimedAlarmDate"));
+ if (!alarmDateNonTimed) {
+ qFatal("Unable to find the nonTimedAlarmDate label");
+ }
+ alarmDateNonTimed->hide();
+ }else {
+ mAlertDocLoader->load(
+ alarmNormalUICalendarDocml, "nonTimedAlarm",&success);
+ if (!success) {
+ qFatal("Unable to load the nonTimedAlarm section");
+ }
+ mAlarmDateTime = qobject_cast<HbLabel*> (
+ mAlertDocLoader->findWidget("alarmTime"));
+ if (!mAlarmDateTime) {
+ qFatal("Unable to find the alarmTime label");
+ }
+ mAlarmDateTime->hide();
+ HbLabel *alarmDate = qobject_cast<HbLabel*> (
+ mAlertDocLoader->findWidget("alarmDate"));
+ if (!alarmDate) {
+ qFatal("Unable to find the alarmDate label");
+ }
+ alarmDate->hide();
+ HbLabel *alarmDateNonTimed = qobject_cast<HbLabel*> (
+ mAlertDocLoader->findWidget("nonTimedAlarmDate"));
+ if (!alarmDateNonTimed) {
+ qFatal("Unable to find the alarmDateNonTimed label");
+ }
+ alarmDateNonTimed->setPlainText(
+ hbTrId("txt_calendar_info_alarm_start_date").arg(
+ locale.format(mAlarmTime.date(), r_qtn_date_usual_with_zero)));
}
-}
+
+ QGraphicsWidget *headingWidget = mAlertDocLoader->findWidget("heading");
+ if (!headingWidget) {
+ qFatal("Unable to find the heading widget");
+ }
+ mAlarmDescription = qobject_cast<HbLabel*> (
+ mAlertDocLoader->findWidget("alarmDescription"));
+ if (!mAlarmDescription) {
+ qFatal("Unable to find the alarmDescription label");
+ }
+ mAlarmDescription->setPlainText(mSubject);
-
+ HbLabel *alarmLocation = qobject_cast<HbLabel*> (
+ mAlertDocLoader->findWidget("alarmLocation"));
+ if (!alarmLocation) {
+ qFatal("Unable to find the alarmLocation label");
+ }
+ alarmLocation->setPlainText(mLocation);
+
+ mAlarmIcon = qobject_cast<HbLabel*> (
+ mAlertDocLoader->findWidget("alarmIcon"));
+ if (!mAlarmIcon) {
+ qFatal("Unable to find the alarm Icon");
+ }
-// ---------------------------------------------------------
-// AlarmAlertDialogPrivate::isScreenLocked
-// rest of the details are commented in the header
-// ---------------------------------------------------------
-//
-bool AlarmAlertDialogPrivate::isScreenLocked()
-{
- // TODO: Replace with actual API which gets the screen lock status
- return false;
+ mSnoozeAction = qobject_cast<HbAction*> (
+ mAlertDocLoader->findObject("snoozeAction"));
+ if (!mSnoozeAction) {
+ qFatal("Unable to find the snoozeAction softkey");
+ }
+ disconnect(mSnoozeAction, SIGNAL(triggered()), this, SLOT(close()));
+ if (!mCanSnooze) {
+ mSnoozeAction->setVisible(false);
+ }else {
+ if(!mIsSilent) {
+ mSnoozeAction->setText(hbTrId("txt_calendar_button_alarm_silence"));
+ connect(mSnoozeAction, SIGNAL(triggered()), this, SLOT(silenced()));
+ mIsSilenceKey = true;
+ } else {
+ mSnoozeAction->setText(hbTrId("txt_calendar_button_alarm_snooze"));
+ connect(mSnoozeAction, SIGNAL(triggered()), this, SLOT(snoozed()));
+ }
+ }
+ HbAction *stopAction = qobject_cast<HbAction*> (
+ mAlertDocLoader->findObject("stopAction"));
+ if (!stopAction) {
+ qFatal("Unable to find the stopAction softkey");
+ }
+ stopAction->setText(hbTrId("txt_calendar_button_alarm_dialog_snooze"));
+ disconnect(stopAction, SIGNAL(triggered()), this, SLOT(close()));
+ connect(stopAction, SIGNAL(triggered()), this, SLOT(dismissed()));
}
// ---------------------------------------------------------
-// AlarmAlertDialogPrivate::mousePressEvent
+// AlarmAlertDialogPrivate::handleToDoAlarms
// rest of the details are commented in the header
// ---------------------------------------------------------
//
-void AlarmAlertDialogPrivate::mousePressEvent(QGraphicsSceneMouseEvent *event)
+void AlarmAlertDialogPrivate::handleToDoAlarms()
{
- // TODO: Must be removed once gestures are available
- mTapPoint = event->pos();
- qDebug() << "Tap event";
+ QGraphicsWidget *headingWidget = mAlertDocLoader->findWidget("heading");
+ if (!headingWidget) {
+ qFatal("Unable to load the heading widget");
+ }
+ HbExtendedLocale locale = HbExtendedLocale::system();
+
+ HbLabel *alarmDate = qobject_cast<HbLabel*> (
+ mAlertDocLoader->findWidget("alarmDate"));
+ if (!alarmDate) {
+ qFatal("Unable to load the alarmDate label");
+ }
+ alarmDate->setPlainText(
+ hbTrId("txt_calendar_info_alarm_start_date").arg(
+ locale.format(mAlarmTime.date(), r_qtn_date_usual_with_zero)));
+
+ mAlarmDescription = qobject_cast<HbLabel*> (
+ mAlertDocLoader->findWidget("alarmDescription"));
+ if (!mAlarmDescription) {
+ qFatal("Unable to load the alarmDescription label");
+ }
+ mAlarmDescription->setPlainText(mSubject);
+
+ mAlarmIcon = qobject_cast<HbLabel*> (
+ mAlertDocLoader->findWidget("alarmIcon"));
+ if (!mAlarmIcon) {
+ qFatal("Unable to load the alarm Icon");
+ }
+ mSnoozeAction = qobject_cast<HbAction*> (
+ mAlertDocLoader->findObject("snoozeAction"));
+ if (!mSnoozeAction) {
+ qFatal("Unable to load the snoozeAction softkey");
+ }
+ disconnect(mSnoozeAction, SIGNAL(triggered()), this, SLOT(close()));
+ if (!mCanSnooze) {
+ mSnoozeAction->setVisible(false);
+ }else {
+ if(!mIsSilent) {
+ mSnoozeAction->setText(hbTrId("txt_calendar_button_alarm_silence"));
+ connect(mSnoozeAction, SIGNAL(triggered()), this, SLOT(silenced()));
+ mIsSilenceKey = true;
+ } else {
+ mSnoozeAction->setText(hbTrId("txt_calendar_button_alarm_snooze"));
+ connect(mSnoozeAction, SIGNAL(triggered()), this, SLOT(snoozed()));
+ }
+ }
+ HbAction *stopAction = qobject_cast<HbAction*> (
+ mAlertDocLoader->findObject("stopAction"));
+ if (!stopAction) {
+ qFatal("Unable to load the stopAction softkey");
+ }
+ stopAction->setText(hbTrId("txt_calendar_button_alarm_dialog_snooze"));
+ disconnect(stopAction, SIGNAL(triggered()), this, SLOT(close()));
+ connect(stopAction, SIGNAL(triggered()), this, SLOT(dismissed()));
}
-// ---------------------------------------------------------
-// AlarmAlertDialogPrivate::mouseMoveEvent
-// rest of the details are commented in the header
-// ---------------------------------------------------------
-//
-void AlarmAlertDialogPrivate::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
-{
- // TODO: THIS IS A HACK!!!
- // Must be removed once gestures are available
- QPointF curPos = event->pos();
- if (curPos.y() - mTapPoint.y() > 40) {
- qDebug() << "Sufficient drag";
- if (mUserResponse == Other) {
- dismissed();
- }
- }
-}
+// End of file --Don't remove this.
--- a/alarmui/group/alarmuisnooze.rul Fri Apr 16 14:57:40 2010 +0300
+++ b/alarmui/group/alarmuisnooze.rul Mon May 03 12:30:32 2010 +0300
@@ -61,54 +61,6 @@
<Vibra Mode='Start' Delay='0' Repeats='2' RepeatInterval='200' Duration='50' Intensity='50'/>
</actions>
</elseIf>
- <!-- Check if we just have an active alarm -->
- <!-- active sensor channels when alarm expires -->
- <elseIf>
- <and>
- <!-- ...alarm is active... -->
- <contextUpdated>
- <contextRef source='AlarmUI' type='State'/>
- </contextUpdated>
- <notEqual>
- <contextRef source='AlarmUI' type='State'/>
- <string>Inactive</string>
- </notEqual>
- </and>
- <actions>
- <!-- Activate double tap events from sensor -->
- <publishContext>
- <contextRef source='Sensor' type='Event' value='DoubleTap.Activate'/>
- </publishContext>
- <!-- Activate orientation events from sensor -->
- <publishContext>
- <contextRef source='Sensor' type='Event' value='Orientation.Activate'/>
- </publishContext>
- </actions>
- </elseIf>
- <!-- deactivate sensor channels when alarm is dismissed -->
- <elseIf>
- <and>
- <!-- ...an alarm that was just deactivated -->
- <contextUpdated>
- <contextRef source='AlarmUI' type='State'/>
- </contextUpdated>
- <equals>
- <contextRef source='AlarmUI' type='State'/>
- <string>Inactive</string>
- </equals>
- </and>
- <actions>
- <!-- deactivate doubletap channel -->
- <publishContext>
- <contextRef source='Sensor' type='Event' value='DoubleTap.Deactivate'/>
- </publishContext>
-
- <!-- deactivate orientation channel -->
- <publishContext>
- <contextRef source='Sensor' type='Event' value='Orientation.Deactivate'/>
- </publishContext>
- </actions>
- </elseIf>
<!-- stop an active alarm on a 'Stop' command -->
<elseIf>
<and>
--- a/alarmui/inc/alarmutils.h Fri Apr 16 14:57:40 2010 +0300
+++ b/alarmui/inc/alarmutils.h Mon May 03 12:30:32 2010 +0300
@@ -71,6 +71,7 @@
{
EAlarmTypeClock = 0,
EAlarmTypeCalendar,
+ EAlarmTypeTodo,
EAlarmTypeOther
};
--- a/alarmui/src/AlmAlarmControl.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/alarmui/src/AlmAlarmControl.cpp Mon May 03 12:30:32 2010 +0300
@@ -133,7 +133,7 @@
&& iState != EStateWaitingInput )
{
// stop the context/sensor observer.
- // PIM_TRAPD_ASSERT( iAlarmUtils->StopCFObserverL(); )
+ PIM_TRAPD_ASSERT( iAlarmUtils->StopCFObserverL(); )
// stop waiting for "end call" command from accessories
iAlarmUtils->StopAccessoryObserver();
@@ -192,7 +192,7 @@
iAlarmUtils->StartAccessoryObserver();
// publish new alarm context value and wait for any actions
- // PIM_TRAPD_ASSERT( iAlarmUtils->StartCFObserverL(); )
+ PIM_TRAPD_ASSERT( iAlarmUtils->StartCFObserverL(); )
break;
}
@@ -258,7 +258,12 @@
void CAlmAlarmControl::DoCancelDialog()
{
TRACE_ENTRY_POINT;
-
+ /*if( iGlobalNoteId != KErrNotFound )
+ {
+ // iAlarmUtils->NotifierDialogController()->SetNoteObserver( this );
+ // iAlarmUtils->NotifierDialogController()->CancelNote( iGlobalNoteId );
+ iAlarmUtils->NotifierDialogController()->dismissAlarmAlert();
+ }*/
iAlarmUtils->NotifierDialogController()->dismissAlarmAlert();
iAlarmUtils->StopAlarmSound();
iAlarmUtils->CancelAutoSnooze();
@@ -1322,8 +1327,7 @@
void CAlmAlarmControl::alertCompleted(AlarmCommand command)
{
- // cancel timers
- iAlarmUtils->CancelAutoSnooze();
+ //iAlarmUtils->CancelShutdown();
iAlarmUtils->StopAlarmSound();
switch( iState )
@@ -1342,13 +1346,17 @@
case AlarmStop:
{
SetState( EStateAfterInput );
+ // cancel timers
+ iAlarmUtils->CancelAutoSnooze();
iAskWakeup = ETrue; // ask wakeup after all the alarms are handled
iAlarmUtils->DoStopAlarm(); // stop
break;
}
case AlarmSnooze:
{
- SetState( EStateAfterInput );
+ // cancel timers
+ iAlarmUtils->CancelAutoSnooze();
+ SetState( EStateAfterInput );
SetState( EStateShowingSnoozeInfo );
iAlarmUtils->TryToSnoozeActiveAlarm();
--- a/alarmui/src/AlmAlarmInfo.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/alarmui/src/AlmAlarmInfo.cpp Mon May 03 12:30:32 2010 +0300
@@ -222,7 +222,7 @@
{
SetupClockAlarmL( aAlarm );
// Set the alarm type
- iAlarmInfo->iIsClockAlarm = ETrue;
+ iAlarmInfo->iAlarmAlertType = CAlarmUtils::EAlarmTypeClock;
}
break;
@@ -230,7 +230,7 @@
{
// TODO: Handle this case
SetupUnknownAlarmL( aAlarm );
- iAlarmInfo->iIsClockAlarm = ETrue;
+ iAlarmInfo->iAlarmAlertType = CAlarmUtils::EAlarmTypeOther;
}
break;
@@ -242,7 +242,7 @@
User::Leave( KErrCancel );
}
// Set the alarm type
- iAlarmInfo->iIsClockAlarm = EFalse;
+ iAlarmInfo->iAlarmAlertType = CAlarmUtils::EAlarmTypeCalendar;
// Fetch the calendar entry and instance time
CCalEntry* entry = NULL;
@@ -278,17 +278,30 @@
// TODO : Format text based on type of entry
// SetupAppointmentAlarmL( aAlarm );
iAlarmInfo->iTime = instanceTime;
+ iAlarmInfo->iIsTimed = ETrue;
}
break;
case CCalEntry::ETodo:
{
// TODO : Format text based on type of entry
- // SetupToDoAlarmL( aAlarm );
+ //SetupToDoAlarmL( aAlarm );
+ iAlarmInfo->iAlarmAlertType = CAlarmUtils::EAlarmTypeTodo;
iAlarmInfo->iTime = TTime( 0 );
+ iAlarmInfo->iIsTimed = EFalse;
+ // No Location is there for todo alarms
+ iAlarmInfo->iLocation = HBufC::NewL( 0 );
}
break;
-
+
+ case CCalEntry::EEvent:
+ {
+ // No time information for an all day event
+ iAlarmInfo->iTime = TTime( 0 );
+ iAlarmInfo->iIsTimed = EFalse;
+ }
+ break;
+
default:
{
// TODO : Format text based on type of entry
--- a/alarmui/src/alarmutils.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/alarmui/src/alarmutils.cpp Mon May 03 12:30:32 2010 +0300
@@ -277,7 +277,7 @@
TRACE_ENTRY_POINT;
StopAlarmSound();
PIM_TRAPD_ASSERT( iAlarmPlayer = CAlmAlarmPlayer::NewL( this ); )
- SetBackLight( ETrue );
+ //SetBackLight( ETrue );
TRACE_EXIT_POINT;
}
@@ -293,12 +293,12 @@
// only set the context if the player was really active
if( iAlarmPlayer && iCFSupport )
{
- // PIM_TRAPD_ASSERT( iCFSupport->PublishAlarmResultL( EResultAlarmSilenced ); )
+ PIM_TRAPD_ASSERT( iCFSupport->PublishAlarmResultL( EResultAlarmSilenced ); )
}
#endif // RD_ALMALERT__SENSOR_SUPPORT
delete iAlarmPlayer;
iAlarmPlayer = NULL;
- SetBackLight( EFalse );
+ //SetBackLight( EFalse );
TRACE_EXIT_POINT;
}
@@ -540,6 +540,12 @@
iAlarmData.iVolume = ringingVolume;
iAlarmData.iVolumeRampTime = 0;
+ } else {
+ TInt volumeOn = iAlarmData.iAlarm.ClientData2();
+ if (!volumeOn) {
+ iAlarmData.iRingType = EProfileRingingTypeSilent;
+ iAlarmData.iVolume = 0;
+ }
}
TRACE_EXIT_POINT;
}
@@ -853,13 +859,13 @@
{
if(!iAlarmControl->IsStopFromContext() && IsCalendarAlarm())
{
- // PIM_TRAPD_ASSERT( iCFSupport->PublishAlarmResultL( EResultAlarmStoppedAndExit );)
- // iAlarmControl->SetStopFromContext(EFalse);
+ PIM_TRAPD_ASSERT( iCFSupport->PublishAlarmResultL( EResultAlarmStoppedAndExit );)
+ iAlarmControl->SetStopFromContext(EFalse);
}
else
{
- // PIM_TRAPD_ASSERT( iCFSupport->PublishAlarmResultL( EResultAlarmStopped );)
- // iAlarmControl->SetStopFromContext(EFalse);
+ PIM_TRAPD_ASSERT( iCFSupport->PublishAlarmResultL( EResultAlarmStopped );)
+ iAlarmControl->SetStopFromContext(EFalse);
}
}
#endif // RD_ALMALERT__SENSOR_SUPPORT
--- a/calendarui/agendaeventviewer/agendaeventviewer.pro Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/agendaeventviewer/agendaeventviewer.pro Mon May 03 12:30:32 2010 +0300
@@ -48,7 +48,8 @@
LIBS += -lagendainterface \
-lnoteseditor \
-lcaleneditor \
- -lcalencommonutils
+ -lcalencommonutils \
+ -lmaptileservice
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
}
--- a/calendarui/agendaeventviewer/inc/agendaeventview.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/agendaeventviewer/inc/agendaeventview.h Mon May 03 12:30:32 2010 +0300
@@ -32,6 +32,7 @@
class QTranslator;
class HbView;
class HbAction;
+class HbLabel;
class HbMainWindow;
class AgendaEventViewerItem;
class AgendaEventViewerPrivate;
@@ -57,6 +58,7 @@
void addSubjectAndPriorityData();
void addDateTimeData();
void addLocationData();
+ void addMapTileImage();
void addReminderData();
void addCompletedTodoData();
void addRepeatData();
@@ -89,6 +91,7 @@
QPointer<AgendaEventViewerItem> mSubjectWidget;
QPointer<AgendaEventViewerItem> mDateTimeWidget;
QPointer<AgendaEventViewerItem> mLocationWidget;
+ HbLabel *mMaptileLabel ;
QPointer<AgendaEventViewerItem> mReminderWidget;
QPointer<AgendaEventViewerItem> mRepeatWidget;
QPointer<AgendaEventViewerItem> mDescriptionWidget;
@@ -107,6 +110,8 @@
bool mReminderWidgetAdded;
HbAction *mBackAction;
HbMainWindow* mMainWindow;
+ bool mLocationFeatureEnabled;
+ QString mMaptilePath;
private:
friend class AgendaEventViewerPrivate;
--- a/calendarui/agendaeventviewer/inc/agendaeventviewer.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/agendaeventviewer/inc/agendaeventviewer.h Mon May 03 12:30:32 2010 +0300
@@ -21,7 +21,7 @@
// System includes
#include <QObject>
#include <qglobal.h>
-
+#include <QDate>
// Forward declarations
class QFile;
@@ -44,6 +44,7 @@
public:
enum Actions {
+ ActionNothing,
ActionEdit = 0x01,
ActionDelete = 0x02,
ActionEditDelete = ActionEdit | ActionDelete,
@@ -55,12 +56,15 @@
AGENDAEVENTVIEWER_EXPORT virtual ~AgendaEventViewer();
public:
- AGENDAEVENTVIEWER_EXPORT void view(const ulong id, Actions action);
- AGENDAEVENTVIEWER_EXPORT void view(const QFile &fileHandle, Actions action);
- AGENDAEVENTVIEWER_EXPORT void view(AgendaEntry entry, Actions action);
+ AGENDAEVENTVIEWER_EXPORT void view(const ulong id,
+ Actions action = ActionNothing);
+ AGENDAEVENTVIEWER_EXPORT void view(const QFile &fileHandle,
+ Actions action = ActionNothing);
+ AGENDAEVENTVIEWER_EXPORT void view(AgendaEntry entry,
+ Actions action = ActionNothing);
signals:
- void viewingCompleted(bool status = true);
+ void viewingCompleted(const QDate date = QDate());
void editingStarted();
void editingCompleted();
void deletingStarted();
--- a/calendarui/agendaeventviewer/inc/agendaeventviewer_p.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/agendaeventviewer/inc/agendaeventviewer_p.h Mon May 03 12:30:32 2010 +0300
@@ -45,7 +45,7 @@
void view(AgendaEntry entry, AgendaEventViewer::Actions action);
private slots:
- void viewingCompleted(bool status = true);
+ void viewingCompleted(const QDate date);
void editingStarted();
void editingCompleted();
void deletingStarted();
--- a/calendarui/agendaeventviewer/inc/agendaeventviewercommon.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/agendaeventviewer/inc/agendaeventviewercommon.h Mon May 03 12:30:32 2010 +0300
@@ -28,6 +28,7 @@
#define AGENDA_EVENT_VIEWER_SUBJECT_WIDGET "subjectWidget"
#define AGENDA_EVENT_VIEWER_DATE_TIME_WIDGET "dateTimeWidget"
#define AGENDA_EVENT_VIEWER_LOCATION_WIDGET "locationWidget"
+#define AGENDA_EVENT_VIEWER_MAPTILE_WIDGET "maptileWidget"
#define AGENDA_EVENT_VIEWER_REMINDER_WIDGET "reminderWidget"
#define AGENDA_EVENT_VIEWER_REPEAT_WIDGET "repeatWidget"
#define AGENDA_EVENT_VIEWER_DESCRIPTION_WIDGET "descriptionWidget"
--- a/calendarui/agendaeventviewer/src/agendaeventview.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/agendaeventviewer/src/agendaeventview.cpp Mon May 03 12:30:32 2010 +0300
@@ -37,7 +37,11 @@
#include <HbMessageBox>
#include <HbDialog>
#include <HbLabel>
-
+#include <QFile>
+#include <QString>
+#include <QIcon>
+#include <QPainter>
+#include <QPixmap>
// User includes
#include <agendautil.h>
#include <noteseditor.h>
@@ -49,10 +53,17 @@
#include "agendaeventvieweritem.h"
#include "calendateutils.h"
+//maptile service
+#include <maptileservice.h>
// Constants
#define CHARACTER_HYPHEN "-"
#define CHARACTER_SPACE " "
#define CHARACTER_NEW_LINE "\n"
+
+// This is used to set the maptile image height and width ,
+//because HbLabel by default not displaying the actual size of image
+const int height = 128;
+const int width = 330;
/*!
\class AgendaEventView.
@@ -72,7 +83,8 @@
QObject(parent),
mOwner(owner),
mReminderWidgetAdded(true),
- mMainWindow(NULL)
+ mMainWindow(NULL),
+ mMaptilePath(NULL)
{
qDebug() << "AgendaEventViewer: AgendaEventView::AgendaEventView -->";
@@ -107,6 +119,11 @@
mLocationWidget = qobject_cast<AgendaEventViewerItem *> (
mDocLoader->findWidget(AGENDA_EVENT_VIEWER_LOCATION_WIDGET));
+
+ mMaptileLabel = qobject_cast<HbLabel *> (
+ mDocLoader->findWidget(AGENDA_EVENT_VIEWER_MAPTILE_WIDGET));
+
+
mReminderWidget = qobject_cast<AgendaEventViewerItem *> (
mDocLoader->findWidget(AGENDA_EVENT_VIEWER_REMINDER_WIDGET));
@@ -121,8 +138,13 @@
mLinearLayout =
static_cast<QGraphicsLinearLayout *> (scrollAreaWidget->layout());
-
- qDebug() << "AgendaEventViewer: AgendaEventView::AgendaEventView <--";
+
+ MapTileService::AppType appType;
+ appType = MapTileService::AppTypeCalendar;
+ mLocationFeatureEnabled = MapTileService::isLocationFeatureEnabled(appType);
+
+
+ qDebug() << "AgendaEventViewer: AgendaEventView::AgendaEventView <--";
}
@@ -232,6 +254,7 @@
case AgendaEntry::TypeAppoinment:
case AgendaEntry::TypeEvent:
addLocationData();
+ addMapTileImage();
addReminderData();
addRepeatData();
break;
@@ -294,24 +317,24 @@
if ((action == AgendaEventViewer::ActionEditDelete) || (action
== AgendaEventViewer::ActionEdit)) {
- HbAction *editAction = new HbAction(HbIcon("qtg_mono_edit"),
- hbTrId("txt_calendar_button_edit"));
+ HbAction *editAction = new HbAction();
+ editAction->setIcon(HbIcon("qtg_mono_edit"));
connect(editAction, SIGNAL(triggered()), this, SLOT(edit()));
toolBar->addAction(editAction);
}
if ((action == AgendaEventViewer::ActionEditDelete) || (action
== AgendaEventViewer::ActionDelete)) {
- HbAction *deleteAction = new HbAction(HbIcon("qtg_mono_delete"),
- hbTrId("txt_calendar_button_delete"));
+ HbAction *deleteAction = new HbAction();
+ deleteAction->setIcon(HbIcon("qtg_mono_delete"));
connect(deleteAction, SIGNAL(triggered()), this,
SLOT(deleteAgendaEntry()));
toolBar->addAction(deleteAction);
}
if (action == AgendaEventViewer::ActionSave) {
- HbAction *saveAction = new HbAction(
- hbTrId("txt_calendar_button_save_to_calendar"));
+ HbAction *saveAction = new HbAction();
+ saveAction->setIcon(HbIcon("qtg_mono_add_to_calendar"));
connect(saveAction, SIGNAL(triggered()), this, SLOT(saveAgendaEntry()));
toolBar->addAction(saveAction);
}
@@ -479,6 +502,46 @@
}
/*!
+ Add maptile image to Event viewer
+ */
+void AgendaEventView::addMapTileImage()
+{
+
+ qDebug() << "AgendaEventViewer: AgendaEventView::addMapTileImage -->";
+
+ if (!mAgendaEntry.location().isEmpty() && mLocationFeatureEnabled){
+ MapTileService::AddressType addressType;
+ addressType = MapTileService::AddressPlain;
+ int eventId = mAgendaEntry.id();
+ mMaptilePath = MapTileService::getMapTileImage(eventId, addressType);
+ if (!mMaptilePath.isNull())
+ {
+ QIcon mapTileIcon(mMaptilePath);
+ QPainter painter;
+ QPixmap baloon(HbIcon("qtg_small_location.svg").pixmap());
+ QPixmap map (mapTileIcon.pixmap(width,height));
+ //Display pin image in the center of maptile image
+ painter.begin( &map );
+ painter.drawPixmap( (width/2)-(baloon.width()/2),
+ (height/2)-baloon.height(), baloon );
+ painter.end();
+ mapTileIcon.addPixmap( map );
+
+ HbIcon maptile(mapTileIcon);
+ mMaptileLabel->setIcon(maptile);
+
+ mMaptileLabel->setPreferredSize(QSizeF(width, height));
+ mMaptileLabel->setMinimumSize(QSizeF(width, height));
+ mMaptileLabel->setMaximumSize(QSizeF(width, height));
+ mMaptileLabel->setSizePolicy(QSizePolicy(QSizePolicy::Fixed,
+ QSizePolicy::Fixed));
+
+ }
+ }
+
+ qDebug() << "AgendaEventViewer: AgendaEventView::addMapTileImage <--";
+}
+/*!
Add reminder data to Event viewer
*/
void AgendaEventView::addReminderData()
@@ -578,19 +641,25 @@
qDebug() << "AgendaEventViewer: AgendaEventView::repeatRule -->";
QString repeatRule;
- if (mAgendaEntry.repeatRule().type() != AgendaRepeatRule::InvalidRule)
+ AgendaRepeatRule agendaRepeatRule = mAgendaEntry.repeatRule();
+ if (agendaRepeatRule.type() != AgendaRepeatRule::InvalidRule)
{
- switch (mAgendaEntry.repeatRule().type()) {
+ switch (agendaRepeatRule.type()) {
case AgendaRepeatRule::DailyRule:
repeatRule.append(hbTrId("txt_calendar_dblist_repeats_daily"));
break;
case AgendaRepeatRule::WeeklyRule:
- if (mAgendaEntry.repeatRule().interval() == 2) {
- repeatRule.append(
+ if (AgendaUtil::isWorkdaysRepeatingEntry(agendaRepeatRule)) {
+ //TODO: Add text id for workdays
+ repeatRule.append(hbTrId("Workdays"));
+ } else {
+ if (agendaRepeatRule.interval() == 2) {
+ repeatRule.append(
hbTrId("txt_calendar_dblist_repeats_fortnightly"));
- } else {
- repeatRule.append(
+ } else {
+ repeatRule.append(
hbTrId("txt_calendar_dblist_repeats_weekly"));
+ }
}
break;
case AgendaRepeatRule::MonthlyRule:
@@ -607,7 +676,8 @@
repeatRule.append(CHARACTER_NEW_LINE);
HbExtendedLocale systemLocale = HbExtendedLocale::system();
QString untilDateString = systemLocale.format(
- mAgendaEntry.repeatRule().until(), r_qtn_date_usual_with_zero);
+ mAgendaEntry.repeatRule().until().date(),
+ r_qtn_date_usual_with_zero);
repeatRule.append(
hbTrId("txt_calendar_dblist_repeats_daily_val_until_1").
arg(untilDateString));
@@ -665,6 +735,14 @@
mLinearLayout->removeItem(mLocationWidget);
}
+ QFile file(mMaptilePath);
+ if ( !mLocationFeatureEnabled || !file.exists()
+ || mAgendaEntry.location().isEmpty()){
+ //code added to hide and remove maptile image
+ mMaptileLabel->hide();
+ mLinearLayout->removeItem(mMaptileLabel);
+ }
+
if (mAgendaEntry.alarm().isNull()) {
if (mAgendaEntry.type() == AgendaEntry::TypeTodo ) {
if (AgendaEntry::TodoNeedsAction == mAgendaEntry.status()) {
@@ -760,6 +838,8 @@
mLinearLayout->addItem(mLocationWidget);
mLocationWidget->show();
+ mLinearLayout->addItem(mMaptileLabel);
+ mMaptileLabel->show();
mLinearLayout->addItem(mReminderWidget);
mReminderWidget->show();
mLinearLayout->addItem(mRepeatWidget);
@@ -932,9 +1012,10 @@
} else {
// Launch the calendar entry editor using calendar editor api
mCalenEditor = new CalenEditor(mOwner->mAgendaUtil, this);
+ connect(mCalenEditor, SIGNAL(dialogClosed()),
+ this, SLOT(handleCalendarEditorClosed()));
mCalenEditor->edit(mAgendaEntry, false);
- connect(mCalenEditor, SIGNAL(dialogClosed()),
- this, SLOT(handleCalendarEditorClosed()));
+
}
qDebug() << "AgendaEventViewer: AgendaEventView::edit <--";
@@ -1001,7 +1082,7 @@
this, SLOT(close()));
window->removeView(mViewer);
- mOwner->viewingCompleted();
+ mOwner->viewingCompleted(mAgendaEntry.startTime().date());
qDebug() << "AgendaEventViewer: AgendaEventView::close <--";
}
@@ -1026,8 +1107,8 @@
// entry and until date of updated entry then only update time.
if (mOriginalAgendaEntry.startTime().date()
>= updatedEntry.startTime().date()
- || mOriginalAgendaEntry.startTime().date()
- <= updatedEntry.repeatRule().until()) {
+ && mOriginalAgendaEntry.startTime().date()
+ <= updatedEntry.repeatRule().until().date()) {
QDateTime
startDateTime(mOriginalAgendaEntry.startTime().date(),
updatedEntry.startTime().time());
--- a/calendarui/agendaeventviewer/src/agendaeventviewer.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/agendaeventviewer/src/agendaeventviewer.cpp Mon May 03 12:30:32 2010 +0300
@@ -28,9 +28,10 @@
*/
/*!
- \fn void AgendaEventViewer::viewingCompleted(bool status = true)
+ \fn void AgendaEventViewer::viewingCompleted(const QDate date = QDate())
Signal is emitted when viewing of the agenda entry is complete
+ Returns QDate for calendar application to set context.
After receiving this signal use deleteLater() to detele this class object.
*/
--- a/calendarui/agendaeventviewer/src/agendaeventviewer_p.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/agendaeventviewer/src/agendaeventviewer_p.cpp Mon May 03 12:30:32 2010 +0300
@@ -154,11 +154,11 @@
\param status true if viewing completed otherwise false.
*/
-void AgendaEventViewerPrivate::viewingCompleted(bool status)
+void AgendaEventViewerPrivate::viewingCompleted(const QDate date)
{
qDebug() <<"AgendaEventViewerPrivate::viewingCompleted -->";
- emit q_ptr->viewingCompleted(status);
+ emit q_ptr->viewingCompleted(date);
// Cleanup viewer.
if (mAgendaEventView) {
--- a/calendarui/application/application.pro Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/application/application.pro Mon May 03 12:30:32 2010 +0300
@@ -29,14 +29,13 @@
symbian: {
BLD_INF_RULES.prj_exports += \
- "../rom/calendar.iby CORE_APP_LAYER_IBY_EXPORT_PATH(calendar.iby)" \
- "../rom/calendarresources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(calendarresources.iby)" \
+ "../rom/calendar.iby CORE_APP_LAYER_IBY_EXPORT_PATH(calendar.iby)" \
+ "../rom/calendarresources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(calendarresources.iby)" \
+ "../rom/calenregionalutil.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(calenregionalutil.iby)" \
+ "../rom/calenlunarchinese_variant.iby CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(calenlunarchinese_variant.iby)" \
# Generic configuration interface for component cenrep settings
- "../conf/calendarUI.confml APP_LAYER_CONFML(calendarUI.confml)" \
- "../conf/calendarUI_101F874B.crml APP_LAYER_CRML(calendarUI_101F874B.crml)" \
- "../cenrep/101f874b.txt \epoc32\release\winscw\udeb\z\private\10202be9\101f874b.txt" \
- "../cenrep/101f874b.txt \epoc32\release\armv5\urel\z\private\10202be9\101f874b.txt" \
- "qmakepluginstubs/calengriditemstyleplugin.qtplugin /epoc32/data/z/pluginstub/calengriditemstyleplugin.qtplugin"
+ "../conf/calendarUI.confml APP_LAYER_CONFML(calendarUI.confml)" \
+ "../conf/calendarUI_101F874B.crml APP_LAYER_CRML(calendarUI_101F874B.crml)"
LIBS += -lcalencontroller \
-lxqservice \
@@ -59,8 +58,6 @@
TRANSLATIONS += calendar.ts
- styleplugin.sources += calengriditemstyleplugin.dll
- DEPLOYMENT += styleplugin
}
# Input
--- a/calendarui/application/src/main.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/application/src/main.cpp Mon May 03 12:30:32 2010 +0300
@@ -52,7 +52,13 @@
// Create the Calendar service provider
CalenServiceProvider service(controller);
- return app.exec();
+
+ int retValue = app.exec();
+
+ // delete the controller
+ controller->Release();
+
+ return retValue;
}
--- a/calendarui/bwins/calencontrolleru.def Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/bwins/calencontrolleru.def Mon May 03 12:30:32 2010 +0300
@@ -1,7 +1,7 @@
EXPORTS
?checkMultipleCreation@CCalenController@@AAEXXZ @ 1 NONAME ; void CCalenController::checkMultipleCreation(void)
?SetDefaultContext@CCalenController@@AAEXXZ @ 2 NONAME ; void CCalenController::SetDefaultContext(void)
- ??_ECCalenController@@UAE@I@Z @ 3 NONAME ; CCalenController::~CCalenController(unsigned int)
+ ?getFirstView@CCalenController@@QAEHXZ @ 3 NONAME ; int CCalenController::getFirstView(void)
?handleServiceManagerSlot@CCalenController@@QAEXHABVQDateTime@@@Z @ 4 NONAME ; void CCalenController::handleServiceManagerSlot(int, class QDateTime const &)
?context@CCalenController@@QAEAAVMCalenContext@@XZ @ 5 NONAME ; class MCalenContext & CCalenController::context(void)
?ViewManager@CCalenController@@QAEAAVCalenViewManager@@XZ @ 6 NONAME ; class CalenViewManager & CCalenController::ViewManager(void)
@@ -12,17 +12,16 @@
?CancelNotifications@CCalenController@@QAEXPAVMCalenNotificationHandler@@@Z @ 11 NONAME ; void CCalenController::CancelNotifications(class MCalenNotificationHandler *)
?Notifier@CCalenController@@QAEAAVCalenNotifier@@XZ @ 12 NONAME ; class CalenNotifier & CCalenController::Notifier(void)
?InstanceL@CCalenController@@SAPAV1@XZ @ 13 NONAME ; class CCalenController * CCalenController::InstanceL(void)
- ??1CCalenController@@UAE@XZ @ 14 NONAME ; CCalenController::~CCalenController(void)
- ?CustomisationManager@CCalenController@@QAEAAVCCalenCustomisationManager@@XZ @ 15 NONAME ; class CCalenCustomisationManager & CCalenController::CustomisationManager(void)
- ?IssueCommandL@CCalenController@@QAEHH@Z @ 16 NONAME ; int CCalenController::IssueCommandL(int)
- ?Services@CCalenController@@QAEAAVMCalenServices@@XZ @ 17 NONAME ; class MCalenServices & CCalenController::Services(void)
- ?InfobarTextL@CCalenController@@QAEPAVQString@@XZ @ 18 NONAME ; class QString * CCalenController::InfobarTextL(void)
- ?Release@CCalenController@@QAEXXZ @ 19 NONAME ; void CCalenController::Release(void)
- ?RegisterForNotificationsL@CCalenController@@QAEXPAVMCalenNotificationHandler@@W4TCalenNotification@@@Z @ 20 NONAME ; void CCalenController::RegisterForNotificationsL(class MCalenNotificationHandler *, enum TCalenNotification)
- ??0CCalenController@@QAE@_N@Z @ 21 NONAME ; CCalenController::CCalenController(bool)
- ?GetCommandHandlerL@CCalenController@@QAEPAVMCalenCommandHandler@@H@Z @ 22 NONAME ; class MCalenCommandHandler * CCalenController::GetCommandHandlerL(int)
+ ?CustomisationManager@CCalenController@@QAEAAVCCalenCustomisationManager@@XZ @ 14 NONAME ; class CCalenCustomisationManager & CCalenController::CustomisationManager(void)
+ ?IssueCommandL@CCalenController@@QAEHH@Z @ 15 NONAME ; int CCalenController::IssueCommandL(int)
+ ?Services@CCalenController@@QAEAAVMCalenServices@@XZ @ 16 NONAME ; class MCalenServices & CCalenController::Services(void)
+ ?InfobarTextL@CCalenController@@QAEPAVQString@@XZ @ 17 NONAME ; class QString * CCalenController::InfobarTextL(void)
+ ?Release@CCalenController@@QAEXXZ @ 18 NONAME ; void CCalenController::Release(void)
+ ?RegisterForNotificationsL@CCalenController@@QAEXPAVMCalenNotificationHandler@@W4TCalenNotification@@@Z @ 19 NONAME ; void CCalenController::RegisterForNotificationsL(class MCalenNotificationHandler *, enum TCalenNotification)
+ ??0CCalenController@@QAE@_N@Z @ 20 NONAME ; CCalenController::CCalenController(bool)
+ ?GetCommandHandlerL@CCalenController@@QAEPAVMCalenCommandHandler@@H@Z @ 21 NONAME ; class MCalenCommandHandler * CCalenController::GetCommandHandlerL(int)
+ ??1CCalenController@@QAE@XZ @ 22 NONAME ; CCalenController::~CCalenController(void)
?OfferMenu@CCalenController@@QAEXPAVHbMenu@@@Z @ 23 NONAME ; void CCalenController::OfferMenu(class HbMenu *)
?RegisterForNotificationsL@CCalenController@@QAEXPAVMCalenNotificationHandler@@AAV?$RArray@W4TCalenNotification@@@@@Z @ 24 NONAME ; void CCalenController::RegisterForNotificationsL(class MCalenNotificationHandler *, class RArray<enum TCalenNotification> &)
?NewServicesL@CCalenController@@UAEPAVMCalenServices@@XZ @ 25 NONAME ; class MCalenServices * CCalenController::NewServicesL(void)
- ?getFirstView@CCalenController@@QAEHXZ @ 26 NONAME ; int CCalenController::getFirstView(void)
--- a/calendarui/bwins/calensettingsu.def Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/bwins/calensettingsu.def Mon May 03 12:30:32 2010 +0300
@@ -8,11 +8,12 @@
??_ECalenSettings@@UAE@I@Z @ 7 NONAME ; CalenSettings::~CalenSettings(unsigned int)
??1CalenSettings@@UAE@XZ @ 8 NONAME ; CalenSettings::~CalenSettings(void)
?qt_metacall@CalenSettings@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 9 NONAME ; int CalenSettings::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacast@CalenSettings@@UAEPAXPBD@Z @ 10 NONAME ; void * CalenSettings::qt_metacast(char const *)
- ?staticMetaObject@CalenSettings@@2UQMetaObject@@B @ 11 NONAME ; struct QMetaObject const CalenSettings::staticMetaObject
- ?handleWeekNumberChange@CalenSettings@@QAEXXZ @ 12 NONAME ; void CalenSettings::handleWeekNumberChange(void)
- ?tr@CalenSettings@@SA?AVQString@@PBD0H@Z @ 13 NONAME ; class QString CalenSettings::tr(char const *, char const *, int)
- ?populateSettingList@CalenSettings@@QAEXXZ @ 14 NONAME ; void CalenSettings::populateSettingList(void)
- ?trUtf8@CalenSettings@@SA?AVQString@@PBD0@Z @ 15 NONAME ; class QString CalenSettings::trUtf8(char const *, char const *)
- ??0CalenSettings@@QAE@PAVHbDataForm@@PAVQObject@@@Z @ 16 NONAME ; CalenSettings::CalenSettings(class HbDataForm *, class QObject *)
+ ?handleRegionalInfoChange@CalenSettings@@QAEXXZ @ 10 NONAME ; void CalenSettings::handleRegionalInfoChange(void)
+ ?qt_metacast@CalenSettings@@UAEPAXPBD@Z @ 11 NONAME ; void * CalenSettings::qt_metacast(char const *)
+ ?staticMetaObject@CalenSettings@@2UQMetaObject@@B @ 12 NONAME ; struct QMetaObject const CalenSettings::staticMetaObject
+ ?handleWeekNumberChange@CalenSettings@@QAEXXZ @ 13 NONAME ; void CalenSettings::handleWeekNumberChange(void)
+ ?tr@CalenSettings@@SA?AVQString@@PBD0H@Z @ 14 NONAME ; class QString CalenSettings::tr(char const *, char const *, int)
+ ?populateSettingList@CalenSettings@@QAEXXZ @ 15 NONAME ; void CalenSettings::populateSettingList(void)
+ ?trUtf8@CalenSettings@@SA?AVQString@@PBD0@Z @ 16 NONAME ; class QString CalenSettings::trUtf8(char const *, char const *)
+ ??0CalenSettings@@QAE@PAVHbDataForm@@PAVQObject@@@Z @ 17 NONAME ; CalenSettings::CalenSettings(class HbDataForm *, class QObject *)
--- a/calendarui/bwins/calenviewsu.def Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/bwins/calenviewsu.def Mon May 03 12:30:32 2010 +0300
@@ -11,39 +11,39 @@
?upGesture@CalenMonthGrid@@MAEXH@Z @ 10 NONAME ; void CalenMonthGrid::upGesture(int)
?getStaticMetaObject@CalenSettingsView@@SAABUQMetaObject@@XZ @ 11 NONAME ; struct QMetaObject const & CalenSettingsView::getStaticMetaObject(void)
?updateMonthDataArrayWithActiveDates@CalenMonthView@@AAEXXZ @ 12 NONAME ; void CalenMonthView::updateMonthDataArrayWithActiveDates(void)
- ?setActiveDates@CalenMonthGrid@@AAEXVQDateTime@@@Z @ 13 NONAME ; void CalenMonthGrid::setActiveDates(class QDateTime)
- ?scrollingFinished@CalenMonthGrid@@QAEXXZ @ 14 NONAME ; void CalenMonthGrid::scrollingFinished(void)
- ?setCurrentIdex@CalenMonthGrid@@QAEXH@Z @ 15 NONAME ; void CalenMonthGrid::setCurrentIdex(int)
- ??_ECalenMonthGrid@@UAE@I@Z @ 16 NONAME ; CalenMonthGrid::~CalenMonthGrid(unsigned int)
- ?trUtf8@CalenPreviewPane@@SA?AVQString@@PBD0@Z @ 17 NONAME ; class QString CalenPreviewPane::trUtf8(char const *, char const *)
- ?trUtf8@CalenMonthGrid@@SA?AVQString@@PBD0@Z @ 18 NONAME ; class QString CalenMonthGrid::trUtf8(char const *, char const *)
- ?populatePrevMonth@CalenMonthView@@QAEXXZ @ 19 NONAME ; void CalenMonthView::populatePrevMonth(void)
- ?qt_metacall@CalenSettingsView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 20 NONAME ; int CalenSettingsView::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?handleLeftEffectCompleted@CalenMonthView@@AAEXABUEffectStatus@HbEffect@@@Z @ 21 NONAME ; void CalenMonthView::handleLeftEffectCompleted(struct HbEffect::EffectStatus const &)
- ?getStaticMetaObject@CalenMonthGrid@@SAABUQMetaObject@@XZ @ 22 NONAME ; struct QMetaObject const & CalenMonthGrid::getStaticMetaObject(void)
- ?trUtf8@CalenSettingsView@@SA?AVQString@@PBD0H@Z @ 23 NONAME ; class QString CalenSettingsView::trUtf8(char const *, char const *, int)
- ?qt_metacast@CalenMonthView@@UAEPAXPBD@Z @ 24 NONAME ; void * CalenMonthView::qt_metacast(char const *)
- ?staticMetaObject@CalenMonthView@@2UQMetaObject@@B @ 25 NONAME ; struct QMetaObject const CalenMonthView::staticMetaObject
- ?setupView@CalenMonthView@@QAEXPAVCalenDocLoader@@@Z @ 26 NONAME ; void CalenMonthView::setupView(class CalenDocLoader *)
- ?metaObject@CalenMonthGrid@@UBEPBUQMetaObject@@XZ @ 27 NONAME ; struct QMetaObject const * CalenMonthGrid::metaObject(void) const
- ?startAutoScroll@CalenPreviewPane@@QAEXXZ @ 28 NONAME ; void CalenPreviewPane::startAutoScroll(void)
- ?setView@CalenMonthGrid@@QAEXPAVCalenMonthView@@@Z @ 29 NONAME ; void CalenMonthGrid::setView(class CalenMonthView *)
- ?HandleNotification@CalenDayView@@UAEXW4TCalenNotification@@@Z @ 30 NONAME ; void CalenDayView::HandleNotification(enum TCalenNotification)
- ?panGesture@CalenMonthGrid@@MAEXABVQPointF@@@Z @ 31 NONAME ; void CalenMonthGrid::panGesture(class QPointF const &)
- ?mousePressEvent@CalenPreviewPane@@UAEXPAVQGraphicsSceneMouseEvent@@@Z @ 32 NONAME ; void CalenPreviewPane::mousePressEvent(class QGraphicsSceneMouseEvent *)
- ??1CalenSettingsView@@UAE@XZ @ 33 NONAME ; CalenSettingsView::~CalenSettingsView(void)
- ?Date@CalenPreviewPane@@QAE?AVQDateTime@@XZ @ 34 NONAME ; class QDateTime CalenPreviewPane::Date(void)
- ?tr@CalenPreviewPane@@SA?AVQString@@PBD0H@Z @ 35 NONAME ; class QString CalenPreviewPane::tr(char const *, char const *, int)
- ?getInstanceList@CalenMonthView@@AAEXAAV?$QList@VAgendaEntry@@@@VQDateTime@@1@Z @ 36 NONAME ; void CalenMonthView::getInstanceList(class QList<class AgendaEntry> &, class QDateTime, class QDateTime)
- ?metaObject@CalenMonthView@@UBEPBUQMetaObject@@XZ @ 37 NONAME ; struct QMetaObject const * CalenMonthView::metaObject(void) const
- ??0CalenPreviewPane@@QAE@AAVMCalenServices@@PAVQGraphicsItem@@@Z @ 38 NONAME ; CalenPreviewPane::CalenPreviewPane(class MCalenServices &, class QGraphicsItem *)
- ?mouseReleaseEvent@CalenPreviewPane@@UAEXPAVQGraphicsSceneMouseEvent@@@Z @ 39 NONAME ; void CalenPreviewPane::mouseReleaseEvent(class QGraphicsSceneMouseEvent *)
- ?rowsInPrevMonth@CalenMonthView@@QAEHXZ @ 40 NONAME ; int CalenMonthView::rowsInPrevMonth(void)
- ?metaObject@CalenPreviewPane@@UBEPBUQMetaObject@@XZ @ 41 NONAME ; struct QMetaObject const * CalenPreviewPane::metaObject(void) const
- ??0CalenDayView@@QAE@AAVMCalenServices@@@Z @ 42 NONAME ; CalenDayView::CalenDayView(class MCalenServices &)
- ?populateNextMonth@CalenMonthView@@QAEXXZ @ 43 NONAME ; void CalenMonthView::populateNextMonth(void)
- ?handleRightEffectCompleted@CalenMonthView@@AAEXABUEffectStatus@HbEffect@@@Z @ 44 NONAME ; void CalenMonthView::handleRightEffectCompleted(struct HbEffect::EffectStatus const &)
- ?qt_metacast@CalenMonthGrid@@UAEPAXPBD@Z @ 45 NONAME ; void * CalenMonthGrid::qt_metacast(char const *)
+ ?scrollingFinished@CalenMonthGrid@@QAEXXZ @ 13 NONAME ; void CalenMonthGrid::scrollingFinished(void)
+ ?setCurrentIdex@CalenMonthGrid@@QAEXH@Z @ 14 NONAME ; void CalenMonthGrid::setCurrentIdex(int)
+ ??_ECalenMonthGrid@@UAE@I@Z @ 15 NONAME ; CalenMonthGrid::~CalenMonthGrid(unsigned int)
+ ?trUtf8@CalenPreviewPane@@SA?AVQString@@PBD0@Z @ 16 NONAME ; class QString CalenPreviewPane::trUtf8(char const *, char const *)
+ ?trUtf8@CalenMonthGrid@@SA?AVQString@@PBD0@Z @ 17 NONAME ; class QString CalenMonthGrid::trUtf8(char const *, char const *)
+ ?populatePrevMonth@CalenMonthView@@QAEXXZ @ 18 NONAME ; void CalenMonthView::populatePrevMonth(void)
+ ?qt_metacall@CalenSettingsView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 19 NONAME ; int CalenSettingsView::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?handleLeftEffectCompleted@CalenMonthView@@AAEXABUEffectStatus@HbEffect@@@Z @ 20 NONAME ; void CalenMonthView::handleLeftEffectCompleted(struct HbEffect::EffectStatus const &)
+ ?getStaticMetaObject@CalenMonthGrid@@SAABUQMetaObject@@XZ @ 21 NONAME ; struct QMetaObject const & CalenMonthGrid::getStaticMetaObject(void)
+ ?trUtf8@CalenSettingsView@@SA?AVQString@@PBD0H@Z @ 22 NONAME ; class QString CalenSettingsView::trUtf8(char const *, char const *, int)
+ ?qt_metacast@CalenMonthView@@UAEPAXPBD@Z @ 23 NONAME ; void * CalenMonthView::qt_metacast(char const *)
+ ?staticMetaObject@CalenMonthView@@2UQMetaObject@@B @ 24 NONAME ; struct QMetaObject const CalenMonthView::staticMetaObject
+ ?setupView@CalenMonthView@@QAEXPAVCalenDocLoader@@@Z @ 25 NONAME ; void CalenMonthView::setupView(class CalenDocLoader *)
+ ?metaObject@CalenMonthGrid@@UBEPBUQMetaObject@@XZ @ 26 NONAME ; struct QMetaObject const * CalenMonthGrid::metaObject(void) const
+ ?startAutoScroll@CalenPreviewPane@@QAEXXZ @ 27 NONAME ; void CalenPreviewPane::startAutoScroll(void)
+ ?setView@CalenMonthGrid@@QAEXPAVCalenMonthView@@@Z @ 28 NONAME ; void CalenMonthGrid::setView(class CalenMonthView *)
+ ?HandleNotification@CalenDayView@@UAEXW4TCalenNotification@@@Z @ 29 NONAME ; void CalenDayView::HandleNotification(enum TCalenNotification)
+ ?panGesture@CalenMonthGrid@@MAEXABVQPointF@@@Z @ 30 NONAME ; void CalenMonthGrid::panGesture(class QPointF const &)
+ ?mousePressEvent@CalenPreviewPane@@UAEXPAVQGraphicsSceneMouseEvent@@@Z @ 31 NONAME ; void CalenPreviewPane::mousePressEvent(class QGraphicsSceneMouseEvent *)
+ ??1CalenSettingsView@@UAE@XZ @ 32 NONAME ; CalenSettingsView::~CalenSettingsView(void)
+ ?Date@CalenPreviewPane@@QAE?AVQDateTime@@XZ @ 33 NONAME ; class QDateTime CalenPreviewPane::Date(void)
+ ?tr@CalenPreviewPane@@SA?AVQString@@PBD0H@Z @ 34 NONAME ; class QString CalenPreviewPane::tr(char const *, char const *, int)
+ ?getInstanceList@CalenMonthView@@AAEXAAV?$QList@VAgendaEntry@@@@VQDateTime@@1@Z @ 35 NONAME ; void CalenMonthView::getInstanceList(class QList<class AgendaEntry> &, class QDateTime, class QDateTime)
+ ?metaObject@CalenMonthView@@UBEPBUQMetaObject@@XZ @ 36 NONAME ; struct QMetaObject const * CalenMonthView::metaObject(void) const
+ ??0CalenPreviewPane@@QAE@AAVMCalenServices@@PAVQGraphicsItem@@@Z @ 37 NONAME ; CalenPreviewPane::CalenPreviewPane(class MCalenServices &, class QGraphicsItem *)
+ ?mouseReleaseEvent@CalenPreviewPane@@UAEXPAVQGraphicsSceneMouseEvent@@@Z @ 38 NONAME ; void CalenPreviewPane::mouseReleaseEvent(class QGraphicsSceneMouseEvent *)
+ ?rowsInPrevMonth@CalenMonthView@@QAEHXZ @ 39 NONAME ; int CalenMonthView::rowsInPrevMonth(void)
+ ?metaObject@CalenPreviewPane@@UBEPBUQMetaObject@@XZ @ 40 NONAME ; struct QMetaObject const * CalenPreviewPane::metaObject(void) const
+ ??0CalenDayView@@QAE@AAVMCalenServices@@@Z @ 41 NONAME ; CalenDayView::CalenDayView(class MCalenServices &)
+ ?populateNextMonth@CalenMonthView@@QAEXXZ @ 42 NONAME ; void CalenMonthView::populateNextMonth(void)
+ ?handleRightEffectCompleted@CalenMonthView@@AAEXABUEffectStatus@HbEffect@@@Z @ 43 NONAME ; void CalenMonthView::handleRightEffectCompleted(struct HbEffect::EffectStatus const &)
+ ?qt_metacast@CalenMonthGrid@@UAEPAXPBD@Z @ 44 NONAME ; void * CalenMonthGrid::qt_metacast(char const *)
+ ?firstDayOfGrid@CalenMonthView@@QAE?AVQDateTime@@XZ @ 45 NONAME ; class QDateTime CalenMonthView::firstDayOfGrid(void)
?rowsInFutMonth@CalenMonthView@@QAEHXZ @ 46 NONAME ; int CalenMonthView::rowsInFutMonth(void)
?getCurrGridIndex@CalenMonthView@@QAEHXZ @ 47 NONAME ; int CalenMonthView::getCurrGridIndex(void)
?launchDayView@CalenMonthView@@QAEXXZ @ 48 NONAME ; void CalenMonthView::launchDayView(void)
@@ -86,10 +86,10 @@
?getCurrentIndex@CalenMonthGrid@@QAEHXZ @ 85 NONAME ; int CalenMonthGrid::getCurrentIndex(void)
?removeWeekNumbers@CalenMonthView@@AAEXXZ @ 86 NONAME ; void CalenMonthView::removeWeekNumbers(void)
?tr@CalenSettingsView@@SA?AVQString@@PBD0H@Z @ 87 NONAME ; class QString CalenSettingsView::tr(char const *, char const *, int)
- ??0CalenMonthView@@QAE@AAVMCalenServices@@@Z @ 88 NONAME ; CalenMonthView::CalenMonthView(class MCalenServices &)
- ?getStaticMetaObject@CalenThickLinesDrawer@@SAABUQMetaObject@@XZ @ 89 NONAME ; struct QMetaObject const & CalenThickLinesDrawer::getStaticMetaObject(void)
- ?setNoEntriesLabel@CalenPreviewPane@@QAEXPAVHbLabel@@@Z @ 90 NONAME ; void CalenPreviewPane::setNoEntriesLabel(class HbLabel *)
- ?trUtf8@CalenMonthView@@SA?AVQString@@PBD0H@Z @ 91 NONAME ; class QString CalenMonthView::trUtf8(char const *, char const *, int)
+ ?trUtf8@CalenMonthView@@SA?AVQString@@PBD0H@Z @ 88 NONAME ; class QString CalenMonthView::trUtf8(char const *, char const *, int)
+ ??0CalenMonthView@@QAE@AAVMCalenServices@@@Z @ 89 NONAME ; CalenMonthView::CalenMonthView(class MCalenServices &)
+ ?getStaticMetaObject@CalenThickLinesDrawer@@SAABUQMetaObject@@XZ @ 90 NONAME ; struct QMetaObject const & CalenThickLinesDrawer::getStaticMetaObject(void)
+ ?setNoEntriesLabel@CalenPreviewPane@@QAEXPAVHbLabel@@@Z @ 91 NONAME ; void CalenPreviewPane::setNoEntriesLabel(class HbLabel *)
??0CalenThickLinesDrawer@@QAE@W4WidgetType@CalendarNamespace@@PAVQGraphicsItem@@@Z @ 92 NONAME ; CalenThickLinesDrawer::CalenThickLinesDrawer(enum CalendarNamespace::WidgetType, class QGraphicsItem *)
?onLocaleChanged@CalenMonthView@@UAEXH@Z @ 93 NONAME ; void CalenMonthView::onLocaleChanged(int)
?doPopulation@CalenMonthView@@UAEXXZ @ 94 NONAME ; void CalenMonthView::doPopulation(void)
@@ -97,45 +97,51 @@
?GetInstanceListL@CalenPreviewPane@@AAEXXZ @ 96 NONAME ; void CalenPreviewPane::GetInstanceListL(void)
?tr@CalenMonthView@@SA?AVQString@@PBD0@Z @ 97 NONAME ; class QString CalenMonthView::tr(char const *, char const *)
??0CalenMonthGrid@@QAE@PAVQGraphicsItem@@@Z @ 98 NONAME ; CalenMonthGrid::CalenMonthGrid(class QGraphicsItem *)
- ?appendRows@CalenMonthGrid@@QAEXXZ @ 99 NONAME ; void CalenMonthGrid::appendRows(void)
- ?tr@CalenThickLinesDrawer@@SA?AVQString@@PBD0H@Z @ 100 NONAME ; class QString CalenThickLinesDrawer::tr(char const *, char const *, int)
- ?mouseReleaseEvent@CalenMonthGrid@@EAEXPAVQGraphicsSceneMouseEvent@@@Z @ 101 NONAME ; void CalenMonthGrid::mouseReleaseEvent(class QGraphicsSceneMouseEvent *)
- ?getCurrentDay@CalenMonthView@@QAE?AVQDateTime@@XZ @ 102 NONAME ; class QDateTime CalenMonthView::getCurrentDay(void)
- ?staticMetaObject@CalenPreviewPane@@2UQMetaObject@@B @ 103 NONAME ; struct QMetaObject const CalenPreviewPane::staticMetaObject
- ?tr@CalenSettingsView@@SA?AVQString@@PBD0@Z @ 104 NONAME ; class QString CalenSettingsView::tr(char const *, char const *)
- ?onTwoSecondsTimeout@CalenPreviewPane@@QAEXXZ @ 105 NONAME ; void CalenPreviewPane::onTwoSecondsTimeout(void)
- ?timerExpired@CalenMonthGrid@@IAEXXZ @ 106 NONAME ; void CalenMonthGrid::timerExpired(void)
- ?tr@CalenThickLinesDrawer@@SA?AVQString@@PBD0@Z @ 107 NONAME ; class QString CalenThickLinesDrawer::tr(char const *, char const *)
- ?staticMetaObject@CalenThickLinesDrawer@@2UQMetaObject@@B @ 108 NONAME ; struct QMetaObject const CalenThickLinesDrawer::staticMetaObject
- ?populateWithInstanceView@CalenMonthView@@AAEXXZ @ 109 NONAME ; void CalenMonthView::populateWithInstanceView(void)
- ?trUtf8@CalenThickLinesDrawer@@SA?AVQString@@PBD0@Z @ 110 NONAME ; class QString CalenThickLinesDrawer::trUtf8(char const *, char const *)
- ?downGesture@CalenMonthGrid@@MAEXH@Z @ 111 NONAME ; void CalenMonthGrid::downGesture(int)
- ?populateLabel@CalenPreviewPane@@QAEXVQDateTime@@@Z @ 112 NONAME ; void CalenPreviewPane::populateLabel(class QDateTime)
- ?doPopulation@CalenDayView@@UAEXXZ @ 113 NONAME ; void CalenDayView::doPopulation(void)
- ??1CalenDayView@@UAE@XZ @ 114 NONAME ; CalenDayView::~CalenDayView(void)
- ?updateModelWithFutureMonth@CalenMonthView@@QAEXXZ @ 115 NONAME ; void CalenMonthView::updateModelWithFutureMonth(void)
- ?monthDataList@CalenMonthView@@QAE?AV?$QList@VCalenMonthData@@@@XZ @ 116 NONAME ; class QList<class CalenMonthData> CalenMonthView::monthDataList(void)
- ?metaObject@CalenThickLinesDrawer@@UBEPBUQMetaObject@@XZ @ 117 NONAME ; struct QMetaObject const * CalenThickLinesDrawer::metaObject(void) const
- ??1CalenMonthGrid@@UAE@XZ @ 118 NONAME ; CalenMonthGrid::~CalenMonthGrid(void)
- ?updateWeekNumGridModel@CalenMonthView@@AAEXXZ @ 119 NONAME ; void CalenMonthView::updateWeekNumGridModel(void)
- ?qt_metacast@CalenThickLinesDrawer@@UAEPAXPBD@Z @ 120 NONAME ; void * CalenThickLinesDrawer::qt_metacast(char const *)
- ?prepareForPopulation@CalenMonthView@@AAEXXZ @ 121 NONAME ; void CalenMonthView::prepareForPopulation(void)
- ?handlePreviewPaneGesture@CalenMonthView@@QAEX_N@Z @ 122 NONAME ; void CalenMonthView::handlePreviewPaneGesture(bool)
- ?updateMonthGridModel@CalenMonthGrid@@QAEXAAV?$QList@VCalenMonthData@@@@H@Z @ 123 NONAME ; void CalenMonthGrid::updateMonthGridModel(class QList<class CalenMonthData> &, int)
- ?trUtf8@CalenMonthView@@SA?AVQString@@PBD0@Z @ 124 NONAME ; class QString CalenMonthView::trUtf8(char const *, char const *)
- ?setContextForActiveDay@CalenMonthView@@QAEXH@Z @ 125 NONAME ; void CalenMonthView::setContextForActiveDay(int)
- ??_ECalenSettingsView@@UAE@I@Z @ 126 NONAME ; CalenSettingsView::~CalenSettingsView(unsigned int)
- ?trUtf8@CalenSettingsView@@SA?AVQString@@PBD0@Z @ 127 NONAME ; class QString CalenSettingsView::trUtf8(char const *, char const *)
- ??_ECalenThickLinesDrawer@@UAE@I@Z @ 128 NONAME ; CalenThickLinesDrawer::~CalenThickLinesDrawer(unsigned int)
- ?metaObject@CalenSettingsView@@UBEPBUQMetaObject@@XZ @ 129 NONAME ; struct QMetaObject const * CalenSettingsView::metaObject(void) const
- ?getStaticMetaObject@CalenMonthView@@SAABUQMetaObject@@XZ @ 130 NONAME ; struct QMetaObject const & CalenMonthView::getStaticMetaObject(void)
- ?qt_metacast@CalenSettingsView@@UAEPAXPBD@Z @ 131 NONAME ; void * CalenSettingsView::qt_metacast(char const *)
- ?tr@CalenMonthGrid@@SA?AVQString@@PBD0@Z @ 132 NONAME ; class QString CalenMonthGrid::tr(char const *, char const *)
- ?qt_metacall@CalenMonthView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 133 NONAME ; int CalenMonthView::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?setActiveDay@CalenMonthView@@AAEXVQDateTime@@@Z @ 134 NONAME ; void CalenMonthView::setActiveDay(class QDateTime)
- ?itemActivated@CalenMonthGrid@@QAEXABVQModelIndex@@@Z @ 135 NONAME ; void CalenMonthGrid::itemActivated(class QModelIndex const &)
- ?qt_metacall@CalenMonthGrid@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 136 NONAME ; int CalenMonthGrid::qt_metacall(enum QMetaObject::Call, int, void * *)
- ??_ECalenPreviewPane@@UAE@I@Z @ 137 NONAME ; CalenPreviewPane::~CalenPreviewPane(unsigned int)
- ?createEditor@CalenMonthView@@AAEXXZ @ 138 NONAME ; void CalenMonthView::createEditor(void)
- ?getActiveDay@CalenMonthView@@QAE?AVQDateTime@@XZ @ 139 NONAME ; class QDateTime CalenMonthView::getActiveDay(void)
+ ?refreshViewOnGoToDate@CalenMonthView@@EAEXXZ @ 99 NONAME ; void CalenMonthView::refreshViewOnGoToDate(void)
+ ?appendRows@CalenMonthGrid@@QAEXXZ @ 100 NONAME ; void CalenMonthGrid::appendRows(void)
+ ?tr@CalenThickLinesDrawer@@SA?AVQString@@PBD0H@Z @ 101 NONAME ; class QString CalenThickLinesDrawer::tr(char const *, char const *, int)
+ ?mouseReleaseEvent@CalenMonthGrid@@EAEXPAVQGraphicsSceneMouseEvent@@@Z @ 102 NONAME ; void CalenMonthGrid::mouseReleaseEvent(class QGraphicsSceneMouseEvent *)
+ ?getCurrentDay@CalenMonthView@@QAE?AVQDateTime@@XZ @ 103 NONAME ; class QDateTime CalenMonthView::getCurrentDay(void)
+ ?staticMetaObject@CalenPreviewPane@@2UQMetaObject@@B @ 104 NONAME ; struct QMetaObject const CalenPreviewPane::staticMetaObject
+ ?tr@CalenSettingsView@@SA?AVQString@@PBD0@Z @ 105 NONAME ; class QString CalenSettingsView::tr(char const *, char const *)
+ ?onTwoSecondsTimeout@CalenPreviewPane@@QAEXXZ @ 106 NONAME ; void CalenPreviewPane::onTwoSecondsTimeout(void)
+ ?timerExpired@CalenMonthGrid@@IAEXXZ @ 107 NONAME ; void CalenMonthGrid::timerExpired(void)
+ ?tr@CalenThickLinesDrawer@@SA?AVQString@@PBD0@Z @ 108 NONAME ; class QString CalenThickLinesDrawer::tr(char const *, char const *)
+ ?staticMetaObject@CalenThickLinesDrawer@@2UQMetaObject@@B @ 109 NONAME ; struct QMetaObject const CalenThickLinesDrawer::staticMetaObject
+ ?populateWithInstanceView@CalenMonthView@@AAEXXZ @ 110 NONAME ; void CalenMonthView::populateWithInstanceView(void)
+ ?trUtf8@CalenThickLinesDrawer@@SA?AVQString@@PBD0@Z @ 111 NONAME ; class QString CalenThickLinesDrawer::trUtf8(char const *, char const *)
+ ?downGesture@CalenMonthGrid@@MAEXH@Z @ 112 NONAME ; void CalenMonthGrid::downGesture(int)
+ ?populateLabel@CalenPreviewPane@@QAEXVQDateTime@@@Z @ 113 NONAME ; void CalenPreviewPane::populateLabel(class QDateTime)
+ ?doPopulation@CalenDayView@@UAEXXZ @ 114 NONAME ; void CalenDayView::doPopulation(void)
+ ??1CalenDayView@@UAE@XZ @ 115 NONAME ; CalenDayView::~CalenDayView(void)
+ ?updateModelWithFutureMonth@CalenMonthView@@QAEXXZ @ 116 NONAME ; void CalenMonthView::updateModelWithFutureMonth(void)
+ ?monthDataList@CalenMonthView@@QAE?AV?$QList@VCalenMonthData@@@@XZ @ 117 NONAME ; class QList<class CalenMonthData> CalenMonthView::monthDataList(void)
+ ?metaObject@CalenThickLinesDrawer@@UBEPBUQMetaObject@@XZ @ 118 NONAME ; struct QMetaObject const * CalenThickLinesDrawer::metaObject(void) const
+ ??1CalenMonthGrid@@UAE@XZ @ 119 NONAME ; CalenMonthGrid::~CalenMonthGrid(void)
+ ?updateWeekNumGridModel@CalenMonthView@@AAEXXZ @ 120 NONAME ; void CalenMonthView::updateWeekNumGridModel(void)
+ ?qt_metacast@CalenThickLinesDrawer@@UAEPAXPBD@Z @ 121 NONAME ; void * CalenThickLinesDrawer::qt_metacast(char const *)
+ ?prepareForPopulation@CalenMonthView@@AAEXXZ @ 122 NONAME ; void CalenMonthView::prepareForPopulation(void)
+ ?handlePreviewPaneGesture@CalenMonthView@@QAEX_N@Z @ 123 NONAME ; void CalenMonthView::handlePreviewPaneGesture(bool)
+ ?updateMonthGridModel@CalenMonthGrid@@QAEXAAV?$QList@VCalenMonthData@@@@H@Z @ 124 NONAME ; void CalenMonthGrid::updateMonthGridModel(class QList<class CalenMonthData> &, int)
+ ?setActiveDates@CalenMonthGrid@@AAEXVQDate@@@Z @ 125 NONAME ; void CalenMonthGrid::setActiveDates(class QDate)
+ ?trUtf8@CalenMonthView@@SA?AVQString@@PBD0@Z @ 126 NONAME ; class QString CalenMonthView::trUtf8(char const *, char const *)
+ ?setContextForActiveDay@CalenMonthView@@QAEXH@Z @ 127 NONAME ; void CalenMonthView::setContextForActiveDay(int)
+ ?trUtf8@CalenSettingsView@@SA?AVQString@@PBD0@Z @ 128 NONAME ; class QString CalenSettingsView::trUtf8(char const *, char const *)
+ ??_ECalenSettingsView@@UAE@I@Z @ 129 NONAME ; CalenSettingsView::~CalenSettingsView(unsigned int)
+ ??_ECalenThickLinesDrawer@@UAE@I@Z @ 130 NONAME ; CalenThickLinesDrawer::~CalenThickLinesDrawer(unsigned int)
+ ?metaObject@CalenSettingsView@@UBEPBUQMetaObject@@XZ @ 131 NONAME ; struct QMetaObject const * CalenSettingsView::metaObject(void) const
+ ?getStaticMetaObject@CalenMonthView@@SAABUQMetaObject@@XZ @ 132 NONAME ; struct QMetaObject const & CalenMonthView::getStaticMetaObject(void)
+ ?qt_metacast@CalenSettingsView@@UAEPAXPBD@Z @ 133 NONAME ; void * CalenSettingsView::qt_metacast(char const *)
+ ?tr@CalenMonthGrid@@SA?AVQString@@PBD0@Z @ 134 NONAME ; class QString CalenMonthGrid::tr(char const *, char const *)
+ ?qt_metacall@CalenMonthView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 135 NONAME ; int CalenMonthView::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?setActiveDay@CalenMonthView@@AAEXVQDateTime@@@Z @ 136 NONAME ; void CalenMonthView::setActiveDay(class QDateTime)
+ ?itemActivated@CalenMonthGrid@@QAEXABVQModelIndex@@@Z @ 137 NONAME ; void CalenMonthGrid::itemActivated(class QModelIndex const &)
+ ?qt_metacall@CalenMonthGrid@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 138 NONAME ; int CalenMonthGrid::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ??_ECalenPreviewPane@@UAE@I@Z @ 139 NONAME ; CalenPreviewPane::~CalenPreviewPane(unsigned int)
+ ?createEditor@CalenMonthView@@AAEXXZ @ 140 NONAME ; void CalenMonthView::createEditor(void)
+ ?getActiveDay@CalenMonthView@@QAE?AVQDateTime@@XZ @ 141 NONAME ; class QDateTime CalenMonthView::getActiveDay(void)
+ ?showHideRegionalInformation@CalenMonthView@@AAEXXZ @ 142 NONAME ; void CalenMonthView::showHideRegionalInformation(void)
+ ?paint@CalenMonthGrid@@EAEXPAVQPainter@@PBVQStyleOptionGraphicsItem@@PAVQWidget@@@Z @ 143 NONAME ; void CalenMonthGrid::paint(class QPainter *, class QStyleOptionGraphicsItem const *, class QWidget *)
+ ?mouseMoveEvent@CalenPreviewPane@@UAEXPAVQGraphicsSceneMouseEvent@@@Z @ 144 NONAME ; void CalenPreviewPane::mouseMoveEvent(class QGraphicsSceneMouseEvent *)
+ ?addRemoveActionsInMenu@CalenMonthView@@AAEXXZ @ 145 NONAME ; void CalenMonthView::addRemoveActionsInMenu(void)
--- a/calendarui/calendarui.pro Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/calendarui.pro Mon May 03 12:30:32 2010 +0300
@@ -18,7 +18,7 @@
TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS += agendaeventviewer globaldata settings calenplugins customisationmanager \
- views styleplugins\calengriditemstyleplugin controller application
+ views controller application regionalplugins
# End of file --Don't remove this.
--- a/calendarui/caleneditor/caleneditor.pro Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/caleneditor/caleneditor.pro Mon May 03 12:30:32 2010 +0300
@@ -37,6 +37,7 @@
LIBS += -lagendainterface \
-lcalencommonutils \
+ -lxqservice \
-lcalenlauncher
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
@@ -45,13 +46,19 @@
SOURCES += caleneditor.cpp \
caleneditorcustomitem.cpp \
caleneditor_p.cpp \
- caleneditordocloader.cpp
+ caleneditordocloader.cpp \
+ caleneditorreminderfield.cpp \
+ caleneditorrepeatfield.cpp \
+ caleneditordatahandler.cpp
HEADERS += caleneditor.h \
caleneditorcustomitem.h \
caleneditorcommon.h \
caleneditordocloader.h \
- caleneditor_p.h
+ caleneditor_p.h \
+ caleneditorreminderfield.h \
+ caleneditorrepeatfield.h \
+ caleneditordatahandler.h
RESOURCES += caleneditor.qrc
--- a/calendarui/caleneditor/data/caleneditor.qrc Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/caleneditor/data/caleneditor.qrc Mon May 03 12:30:32 2010 +0300
@@ -1,6 +1,7 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/xml">
- <file alias="caleneditorview.docml">caleneditorview.docml</file>
+ <file alias="caleneditorview.docml">caleneditorview.docml</file>
+ <file alias="caleneditorlocationitem.docml">caleneditorlocationitem.docml</file>
</qresource>
<qresource prefix="/translations">
<file alias="caleneditor_en_GB">caleneditor_en_GB.qm</file>
--- a/calendarui/caleneditor/inc/caleneditor_p.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/caleneditor/inc/caleneditor_p.h Mon May 03 12:30:32 2010 +0300
@@ -39,19 +39,21 @@
class HbAction;
class HbLineEdit;
class HbPushButton;
-class HbDateTimePicker;
-class HbListWidget;
-class HbListWidgetItem;
class HbCheckBox;
class HbComboBox;
class HbView;
-class HbRadioButtonList;
class MCalenServices;
class AgendaEntry;
class AgendaUtil;
class CalenEditor;
class CalenEditorDocLoader;
class CalenEditorCustomItem;
+class CalenEditorReminderField;
+class CalenEditorRepeatField;
+class CalenEditorDataHandler;
+
+// Constants
+const int KNoOfDaysInWeek = 7;
class CalenEditorPrivate : public QObject
{
@@ -97,6 +99,11 @@
CalenEditorPrivate(AgendaUtil *agendaUtil,
QObject *parent);
virtual ~CalenEditorPrivate();
+ void addDiscardAction();
+ AgendaEntry* editedEntry();
+ AgendaEntry* originalEntry();
+ bool isNewEntry();
+ HbDataFormModelItem* allDayCheckBoxItem();
private:
void edit(const QFile &handle, bool launchCalendar);
@@ -108,14 +115,13 @@
bool launchCalendar);
void showEditor(AgendaEntry entry);
void showEditOccurencePopup();
- void addDiscardAction();
void setUpView();
void initModel();
void addSubjectItem();
void addAllDayCheckBoxItem();
void addCustomItemFrom();
void addCustomItemTo();
- void addLocationItem();
+ void addCustomItemLocation();
void addReminderItem();
void addRepeatItem();
void insertRepeatUntilItem();
@@ -124,46 +130,21 @@
void populateSubjectItem();
void populateAllDayItem();
void populateCustomItemDateTime();
+ void populateCustomItemLocation();
void populateLocationItem();
- void populateReminderItem();
void populateRepeatItem();
void populateDescriptionItem();
void removeDescriptionItem();
void closeEditor();
bool isChild() const ;
- Error checkErrorsForThisAndAll();
- bool isEdited() const;
- bool isSummaryEdited() const;
- bool isAllDayEdited() const;
- bool isLocationEdited() const;
- bool isStartDateTimeEdited() const;
- bool isEndDateTimeEdited() const;
- bool isAlarmEdited() const;
- bool isRepeatRuleEdited() const;
- bool isDescriptionEdited() const;
- bool nonTextItemsEdited() const;
- bool areTextItemsEmpty() const;
- bool areTextItemsCleared() const;
- bool isSummaryEmptied() const;
- bool isLocationEmptied() const;
- bool isDescriptionEmptied() const;
- Action shouldSaveOrDeleteOrDoNothing() const;
- bool durationGreaterThanRepeatIntervalError() const;
- Error checkAlarmFieldsForErrors(bool series = false) const;
- bool isAlarmInAcceptablePeriod(Error &error, const QDateTime &alarmTime,
- const QDateTime &startTime) const;
+
Action handleDone();
- void updateEditedEntry();
bool saveEntry();
void deleteEntry(bool close = false);
- void displayErrorMsg(int error);
- void dispalyErrorMsgByRepeatType();
bool handleAllDayToSave();
void enableFromTotimeFileds(bool, QDateTime, QDateTime);
- void connectSlots(bool toConnect);
int showDeleteConfirmationQuery();
- void updateRepeatChoices();
private slots:
void handleSubjectChange(const QString subject);
@@ -171,20 +152,16 @@
void saveFromDateTime(QDateTime& fromDateTime);
void saveToDateTime(QDateTime& toDateTime);
void handleLocationChange(const QString location);
- void handleReminderIndexChanged(int index);
- void handleRepeatIndexChanged(int index);
void handleDescriptionChange(const QString description);
void saveAndCloseEditor();
void handleDeleteAction();
void launchSettingsView();
void discardChanges();
- void launchRepeatUntilDatePicker();
- void setRepeatUntilDate();
void handleDescriptionAction();
void handleEditOccurence(int index);
void handleCancel();
void handleCalendarLaunchError(int error);
-
+
private:
enum EditRange {
ThisOnly,
@@ -192,37 +169,28 @@
UserCancelled
};
- enum RepeatTypes {
- RepeatOnce,
- RepeatDaily,
- RepeatWeekly,
- RepeatBiWeekly,
- RepeatMonthly,
- RepeatYearly
- };
CalenEditor *q_ptr;
AgendaUtil *mAgendaUtil;
- EditRange mEditRange;
+
CalenEditorDocLoader *mEditorDocLoader;
+ HbView *mEditorView;
+ CalenEditorDataHandler* mDataHandler;
+ HbDataForm *mCalenEditorForm;
+ HbDataFormModel *mCalenEditorModel;
+
+ HbDataFormModelItem *mSubjectItem;
CalenEditorCustomItem *mViewFromItem;
CalenEditorCustomItem *mViewToItem;
- HbView *mEditorView;
- HbDataForm *mCalenEditorForm;
- HbDataFormModel *mCalenEditorModel;
- HbDataFormModelItem *mSubjectItem;
+ CalenEditorCustomItem *mViewLocationItem;
HbDataFormModelItem *mAllDayCheckBoxItem;
- HbDataFormModelItem *mLocationItem;
- HbDataFormModelItem *mReminderItem;
- HbDataFormModelItem *mRepeatItem;
- HbDataFormModelItem *mCustomRepeatUntilItem;
+
+ CalenEditorReminderField *mReminderField;
+ CalenEditorRepeatField *mRepeatField;
HbDataFormModelItem *mDescriptionItem;
- HbComboBox *mRepeatComboBox;
- HbDateTimePicker* mDatePicker;
- QHash<int, int> mReminderHash;
+ EditRange mEditRange;
+
QDateTime mNewEntryDateTime;
- QDate mRepeatUntilDate;
- AgendaRepeatRule::RuleType mRepeatRuleType;
AgendaEntry *mOriginalEntry;
AgendaEntry *mEditedEntry;
@@ -231,13 +199,9 @@
HbAction *mDescriptionAction;
HbMainWindow *mMainWindow;
QTranslator *mTranslator;
- int mMinutes;
- int mHour;
bool mNewEntry;
- bool mRepeatUntilItemAdded;
bool mDescriptionItemAdded;
- bool mIsBiWeekly;
bool mIsChild;
bool mIsAllDayItemAdded;
bool mOwnsAgendaUtil;
--- a/calendarui/caleneditor/inc/caleneditorcommon.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/caleneditor/inc/caleneditorcommon.h Mon May 03 12:30:32 2010 +0300
@@ -21,15 +21,20 @@
#include <hbdataformmodelitem.h>
#define CALEN_EDITOR_XML_FILE ":/xml/caleneditorview.docml"
+#define CALEN_EDITOR_LOCATION_XML_FILE ":/xml/caleneditorlocationitem.docml"
#define CALEN_EDITOR_VIEW "calenEditorview"
#define CALEN_EDITOR_HEADING "calenEditorHeadingWidget"
#define CALEN_EDITOR_DATAFORM "calenEditorDataFormWidget"
+#define CALEN_EDITOR_LOCATION "calenEditorLocationWidget"
+#define CALEN_EDITOR_LOCATION_LINEEDIT "locationLineEdit"
+#define CALEN_EDITOR_LOCATION_PUSHBUTTON "locationPushButton"
#define CALEN_EDITOR_ADD_DESCRIPTION_ACTION "addDescriptionAction"
#define CALEN_EDITOR_DELETE_EVENT_ACTION "deleteEventAction"
enum CustomItemOffset {
CustomWidgetFrom = HbDataFormModelItem::CustomItemBase + 1,
CustomWidgetTo,
+ CustomWidgetLocation,
RepeatUntilOffset
};
--- a/calendarui/caleneditor/inc/caleneditorcustomitem.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/caleneditor/inc/caleneditorcustomitem.h Mon May 03 12:30:32 2010 +0300
@@ -23,6 +23,7 @@
#include <QDateTime>
#include <hbdataformviewitem.h>
#include <hbextendedlocale.h>
+#include <hblineedit.h>
class HbDateTimePicker;
class HbPushButton;
@@ -40,6 +41,7 @@
void enableFromTimeFieldAndSetTime(bool, QDateTime);
void enableToTimeFieldAndSetTime(bool, QDateTime);
void populateDateTime(QDateTime defaultDateTime, bool isFromItem);
+ void populateLocation( QString location);
void setDateRange(QDate start, QDate end);
void setTimeRange(QTime start, QTime end);
void enableDateButton(bool value);
@@ -49,14 +51,20 @@
protected:
virtual HbWidget* createCustomWidget();
+private:
+ void setSelectedLocation( QVariant &aValue );
+
protected slots:
void handleDate();
void handleTime();
void saveTime();
void saveDate();
+ void handleLocationTextChange(QString location);
+ void launchLocationPicker();
Q_SIGNALS:
void dateTimeUpdated(QDateTime& fromDateTime);
+ void locationTextChanged(QString location);
private:
AgendaEntry *mEditedEntry;
@@ -66,7 +74,6 @@
QTime mTime;
QTime mMaxTime;
QTime mMinTime;
- QDateTime mDateTime;
HbPushButton* mPushButtonTime;
HbPushButton* mPushButtonDate;
@@ -77,6 +84,8 @@
HbExtendedLocale mLocale;
+ HbLineEdit *mLocationLineEdit;
+ HbPushButton* mLocationPushButton;
bool mIsFromItem;
};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/caleneditor/inc/caleneditordatahandler.h Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,72 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* The header file for CalenEditorDataHandler class.
+*
+*/
+
+#ifndef CALENEDITORDATAHANDLER_H
+#define CALENEDITORDATAHANDLER_H
+
+// User Includes
+#include "caleneditor_p.h"
+
+// Forward Declarations
+class AgendaEntry;
+class CalenEditorDataHandler
+{
+public:
+ CalenEditorDataHandler(CalenEditorPrivate* calenEditor,
+ AgendaEntry* editedEntry,
+ AgendaEntry* originalEntry);
+ virtual ~CalenEditorDataHandler();
+
+public:
+ CalenEditorPrivate::Action shouldSaveOrDeleteOrDoNothing(bool launchCalendar) const;
+ CalenEditorPrivate::Error checkErrorsForThisAndAll();
+ void displayErrorMsg(int error);
+
+private:
+ AgendaEntry* editedEntry();
+ AgendaEntry* originalEntry();
+ bool isEdited() const;
+ bool isSummaryEdited() const;
+ bool isAllDayEdited() const;
+ bool isLocationEdited() const;
+ bool isStartDateTimeEdited() const;
+ bool isEndDateTimeEdited() const;
+ bool isAlarmEdited() const;
+ bool isRepeatRuleEdited() const;
+ bool isDescriptionEdited() const;
+ bool nonTextItemsEdited() const;
+ bool areTextItemsEmpty() const;
+ bool areTextItemsCleared() const;
+ bool isSummaryEmptied() const;
+ bool isLocationEmptied() const;
+ bool isDescriptionEmptied() const;
+ bool durationGreaterThanRepeatIntervalError() const;
+ CalenEditorPrivate::Error checkAlarmFieldsForErrors(bool series = false) const;
+ bool isAlarmInAcceptablePeriod(CalenEditorPrivate::Error &error, const QDateTime &alarmTime,
+ const QDateTime &startTime) const;
+ void dispalyErrorMsgByRepeatType();
+
+private:
+ CalenEditorPrivate* mCalenEditor;
+ AgendaEntry* mEditedEntry;
+ AgendaEntry* mOriginalEntry;
+};
+
+#endif // CALENEDITORDATAHANDLER_H
+
+// End of file --Don't remove this.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/caleneditor/inc/caleneditorreminderfield.h Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,64 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* The header file for CalenEditorReminderField class.
+*
+*/
+
+#ifndef CALENEDITORREMINDERFIELD_H
+#define CALENEDITORREMINDERFIELD_H
+
+// System Includes
+#include <QObject>
+#include <qglobal.h>
+
+// User Includes
+#include "caleneditor_p.h"
+
+// FORWARD DECLARATIONS
+class HbDataFormModelItem;
+class HbDataForm;
+class HbDataFormModelItem;
+class CalenEditorDataHandler;
+
+class CalenEditorReminderField : public QObject
+{
+ Q_OBJECT
+
+public:
+ CalenEditorReminderField(CalenEditorPrivate* calenEditor,
+ HbDataForm* form, HbDataFormModel* model,
+ QObject *parent = NULL);
+ virtual ~CalenEditorReminderField();
+
+public:
+ void addItemToModel();
+ void removeItemFromModel();
+ void populateReminderItem(bool newEntry);
+ QModelIndex modelIndex();
+
+private slots:
+ void handleReminderIndexChanged(int index);
+
+private:
+ CalenEditorPrivate* mCalenEditor;
+ HbDataForm* mEditorForm;
+ HbDataFormModel* mCalenEditorModel;
+ HbDataFormModelItem* mReminderItem;
+ QHash<int, int> mReminderHash;
+};
+
+#endif // CALENEDITORREMINDERFIELD_H
+
+// End of file --Don't remove this.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/caleneditor/inc/caleneditorrepeatfield.h Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,92 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* The header file for CalenEditorRepeatField class.
+*
+*/
+
+#ifndef CALENEDITORREPEATFIELD_H
+#define CALENEDITORREPEATFIELD_H
+
+// System includes
+#include <QObject>
+#include <qglobal.h>
+
+// User Includes
+#include "caleneditor_p.h"
+
+
+// FORWARD DECLARATIONS
+class QDate;
+class HbDataFormModelItem;
+class HbComboBox;
+class HbDateTimePicker;
+class CalenEditorPrivate;
+
+class CalenEditorRepeatField : public QObject
+{
+ Q_OBJECT
+
+public:
+ CalenEditorRepeatField(CalenEditorPrivate* calenEditor,
+ HbDataForm* form,
+ HbDataFormModel* model,
+ QObject *parent = NULL);
+ virtual ~CalenEditorRepeatField();
+
+public:
+ void addItemToModel();
+ void removeItemFromModel();
+ void populateRepeatItem(int index);
+ QModelIndex modelIndex();
+ void updateRepeatChoices();
+ void saveRepeatRule();
+ bool isRepeatUntilItemAdded();
+
+private:
+ void insertRepeatUntilItem();
+
+private slots:
+ void handleRepeatIndexChanged(int index);
+ void launchRepeatUntilDatePicker();
+ void setRepeatUntilDate();
+
+private:
+ enum RepeatTypes {
+ RepeatOnce,
+ RepeatDaily,
+ RepeatWorkdays,
+ RepeatWeekly,
+ RepeatBiWeekly,
+ RepeatMonthly,
+ RepeatYearly
+ };
+ CalenEditorPrivate* mCalenEditor;
+ HbDataForm* mEditorForm;
+ HbDataFormModel* mCalenEditorModel;
+ HbDataFormModelItem* mRepeatItem;
+ HbComboBox *mRepeatComboBox;
+ HbDataFormModelItem *mCustomRepeatUntilItem;
+ HbDateTimePicker* mDatePicker;
+ QDate mRepeatUntilDate;
+ AgendaRepeatRule::RuleType mRepeatRuleType;
+ bool mIsBiWeekly;
+ bool mIsWorkdays;
+ bool mRepeatUntilItemAdded;
+};
+
+#endif // CALENEDITORREPEATFIELD_H
+
+// End of file --Don't remove this.
+
--- a/calendarui/caleneditor/src/caleneditor_p.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/caleneditor/src/caleneditor_p.cpp Mon May 03 12:30:32 2010 +0300
@@ -60,6 +60,9 @@
#include "caleneditordocloader.h"
#include "caleneditorcommon.h"
#include "calendateutils.h"
+#include "caleneditordatahandler.h"
+#include "caleneditorreminderfield.h"
+#include "caleneditorrepeatfield.h"
/*!
\class CalenEditorPrivate
@@ -189,27 +192,28 @@
*/
CalenEditorPrivate::CalenEditorPrivate(AgendaUtil *agendaUtil,
QObject *parent) :
- QObject(parent),
- mAgendaUtil(NULL),
- mEditRange(ThisAndAll),
+ QObject(parent),
+ mAgendaUtil(NULL),
mEditorDocLoader(NULL),
+ mEditorView(NULL),
+ mDataHandler(NULL),
+ mCalenEditorForm(NULL),
+ mCalenEditorModel(NULL),
+ mSubjectItem(NULL),
mViewFromItem(NULL),
mViewToItem(NULL),
- mEditorView(NULL),
- mCalenEditorForm(NULL),
- mCalenEditorModel(NULL),
- mReminderItem(NULL),
- mRepeatItem(NULL),
- mCustomRepeatUntilItem(NULL),
+ mViewLocationItem(NULL),
+ mAllDayCheckBoxItem(NULL),
+ mReminderField(NULL),
+ mRepeatField(NULL),
mDescriptionItem(NULL),
- mSubjectItem(NULL),
- mAllDayCheckBoxItem(NULL),
- mLocationItem(NULL),
- mNewEntry(true),
- mRepeatUntilItemAdded(false),
- mDescriptionItemAdded(false),
+ mEditRange(ThisAndAll),
+ mOriginalEntry(NULL),
+ mEditedEntry(NULL),
+ mNewEntry(true),
+ mDescriptionItemAdded(false),
mIsChild(false),
- mIsAllDayItemAdded(false),
+ mIsAllDayItemAdded(false),
mLaunchCalendar(false),
mMenuItemAdded(false)
{
@@ -466,6 +470,9 @@
mEditorView->setNavigationAction(mSoftKeyAction);
connect(mSoftKeyAction, SIGNAL(triggered()), this,
SLOT(saveAndCloseEditor()));
+
+ // Create the data handler
+ mDataHandler = new CalenEditorDataHandler(this,mEditedEntry, mOriginalEntry);
}
/*!
@@ -585,7 +592,7 @@
addCustomItemFrom();
addCustomItemTo();
- addLocationItem();
+ addCustomItemLocation();
addReminderItem();
// Add the repeat information only if particular occurence is not being
if (mEditRange == ThisAndAll) {
@@ -647,13 +654,17 @@
/*!
Appends the Location Item to the Data form Model.
*/
-void CalenEditorPrivate::addLocationItem()
+
+/*!
+ Appends the custom Location widget to the Data form Model.
+ */
+void CalenEditorPrivate::addCustomItemLocation()
{
- // Creates and appends a data form model item to set location.
- mLocationItem = mCalenEditorModel->appendDataFormItem(
- HbDataFormModelItem::TextItem, hbTrId(
- "txt_calendar_formlabel_val_location"),
- mCalenEditorModel->invisibleRootItem());
+ HbDataFormModelItem::DataItemType
+ itemType =
+ static_cast<HbDataFormModelItem::DataItemType> (CustomWidgetLocation);
+ HbDataFormModelItem *customModelItem = new HbDataFormModelItem(itemType, hbTrId("txt_calendar_formlabel_val_location"));
+ mCalenEditorModel->appendDataFormItem(customModelItem);
}
/*!
@@ -661,58 +672,20 @@
*/
void CalenEditorPrivate::addRepeatItem()
{
- mRepeatRuleType = mEditedEntry->repeatRule().type();
- mRepeatItem = new HbDataFormModelItem();
- mRepeatItem->setType(HbDataFormModelItem::ComboBoxItem);
- mRepeatItem->setData(HbDataFormModelItem::LabelRole,
- hbTrId("txt_calendar_setlabel_repeat"));
-
- // Create the repeat choices
- QStringList repeatChoices;
- repeatChoices << hbTrId("txt_calendar_setlabel_repeat_val_only_once")
- << hbTrId("txt_calendar_setlabel_repeat_val_daily")
- << hbTrId("txt_calendar_setlabel_repeat_val_weekly")
- << hbTrId("txt_calendar_setlabel_repeat_val_fortnightly")
- << hbTrId("txt_calendar_setlabel_repeat_val_monthly")
- << hbTrId("txt_calendar_setlabel_repeat_val_yearly");
-
- mRepeatItem->setContentWidgetData(QString("items"), repeatChoices);
- mCalenEditorModel->appendDataFormItem( mRepeatItem,
- mCalenEditorModel->invisibleRootItem());
+ // Create the editor reminder field class to handle reminder related
+ // features
+ mRepeatField = new CalenEditorRepeatField(this, mCalenEditorForm,
+ mCalenEditorModel, this);
}
/*!
Appends the reminder item to the Data form Model.
*/
void CalenEditorPrivate::addReminderItem()
{
- mReminderItem = new HbDataFormModelItem();
- mReminderItem->setType(HbDataFormModelItem::ComboBoxItem);
- mReminderItem->setData(HbDataFormModelItem::LabelRole,
- hbTrId("txt_calendar_setlabel_alarm"));
-
- // Create the remaindar choices
- QStringList remaindarChoices;
- remaindarChoices << hbTrId("txt_calendar_setlabel_alarm_val_off")
- << hbTrId("txt_calendar_setlabel_alarm_val_before_ln_minutes", 5)
- << hbTrId("txt_calendar_setlabel_alarm_val_before_ln_minutes", 10)
- << hbTrId("txt_calendar_setlabel_alarm_val_before_ln_minutes", 15)
- << hbTrId("txt_calendar_setlabel_alarm_val_before_ln_minutes", 30)
- << hbTrId("txt_calendar_setlabel_alarm_val_before_ln_hours", 1)
- << hbTrId("txt_calendar_setlabel_alarm_val_before_ln_hours", 2);
-
- mReminderItem->setContentWidgetData(QString("items"), remaindarChoices);
-
- // Build the hash map for the reminder.
- mReminderHash[0] = 0; // OFF.
- mReminderHash[1] = 5;
- mReminderHash[2] = 10;
- mReminderHash[3] = 15;
- mReminderHash[4] = 30;
- mReminderHash[5] = 60;
- mReminderHash[6] = 120;
-
- mCalenEditorModel->appendDataFormItem( mReminderItem,
- mCalenEditorModel->invisibleRootItem());
+ // Create the editor reminder field class to handle reminder related
+ // features
+ mReminderField = new CalenEditorReminderField(this, mCalenEditorForm,
+ mCalenEditorModel, this);
}
/*!
@@ -743,8 +716,8 @@
}
populateCustomItemDateTime();
- populateLocationItem();
- populateReminderItem();
+ populateCustomItemLocation();
+ mReminderField->populateReminderItem(mNewEntry);
// Dont Populate the repeat field when particular occurence is being edited
if (mEditRange == ThisAndAll) {
@@ -829,17 +802,17 @@
} else {
// Check if it is on same day and set the default time and date accordingly.
bool isSameDay = CalenDateUtils::isOnToday(fromDateTime);
- mMinutes = 0;
- mHour = currentTime.hour();
+ int minutes = 0;
+ int hour = currentTime.hour();
if (isSameDay) {
- mMinutes = currentTime.minute();
- if (mMinutes > 0 && mMinutes < 31) {
- mMinutes = 30;
+ minutes = currentTime.minute();
+ if (minutes > 0 && minutes < 31) {
+ minutes = 30;
} else {
- mMinutes = 0;
+ minutes = 0;
}
- currentTime.setHMS(mHour, mMinutes, 0, 0);
- if (mMinutes == 0) {
+ currentTime.setHMS(hour, minutes, 0, 0);
+ if (minutes == 0) {
currentTime = currentTime.addSecs(60 * 60);
}
fromDateTime.setDate(fromDateTime.date());
@@ -907,7 +880,31 @@
mEditedEntry->endTime());
}
}
-
+/*!
+ Populate location item from the editor model and set it in the widget and listen
+ text change happend in the widget.
+*/
+void CalenEditorPrivate::populateCustomItemLocation()
+{
+ //Get the index of the custom location widget item of the event item.
+ // Check if all day has been added or not
+ // and calculate the index accordingly
+ int itemIndex;
+ if (mIsAllDayItemAdded) {
+ itemIndex = LocationItem;
+ }
+ else {
+ itemIndex = LocationItem - 1;
+ }
+ QModelIndex index = mCalenEditorModel->index(itemIndex, 0);
+ mViewLocationItem = qobject_cast<CalenEditorCustomItem *>
+ (mCalenEditorForm->dataFormViewItem(index));
+
+ connect(mViewLocationItem, SIGNAL(locationTextChanged(const QString)),
+ this, SLOT(handleLocationChange(const QString)));
+
+ mViewLocationItem->populateLocation(mEditedEntry->location());
+}
/*!
Save the changed start time of the event.
*/
@@ -933,6 +930,11 @@
}
// Set the times to edited entry
mEditedEntry->setStartAndEndTime(fromDateTime, endTime);
+
+ if (mEditRange == ThisAndAll) {
+ // update the repeat choices depending on the meeting duration
+ mRepeatField->updateRepeatChoices();
+ }
}
/*!
@@ -962,73 +964,10 @@
// Set the times to edited entry
mEditedEntry->setStartAndEndTime(startTime, toDateTime);
- // update the repeat choices depending on the meeting duration
- updateRepeatChoices();
-}
-
-/*!
- Populates the Location item.
- */
-void CalenEditorPrivate::populateLocationItem()
-{
- // Check if all day has been added or not
- // and calculate the index accordingly
- int index;
- if (mIsAllDayItemAdded) {
- index = LocationItem;
- } else {
- index = LocationItem - 1;
+ if (mEditRange == ThisAndAll) {
+ // update the repeat choices depending on the meeting duration
+ mRepeatField->updateRepeatChoices();
}
-
- mLocationItem->setContentWidgetData("text", mEditedEntry->location());
- mSubjectItem->setContentWidgetData("minRows", 2);
- mSubjectItem->setContentWidgetData("maxRows", 4);
- mCalenEditorForm->addConnection(
- mLocationItem,
- SIGNAL(textChanged(const QString)),
- this,
- SLOT(handleLocationChange(const QString)));
-}
-
-/*!
- Populates the reminder item.
- */
-void CalenEditorPrivate::populateReminderItem()
-{
- // Check if all day has been added or not
- // and calculate the index accordingly
- int index;
- if (mIsAllDayItemAdded) {
- index = ReminderItem;
- } else {
- index = ReminderItem - 1;
- }
- // Set the default reminder value to 15 minutes
- if (mNewEntry) {
- mReminderItem->setContentWidgetData("currentIndex", 3);
- // Save the reminder alarm for the entry
- AgendaAlarm reminder;
- reminder.setTimeOffset(mReminderHash.value(3));
- reminder.setAlarmSoundName(QString(" "));
- // Set the reminder to the entry as well as original entry.
- mEditedEntry->setAlarm(reminder);
- mOriginalEntry->setAlarm(reminder);
- } else {
- if (mEditedEntry->alarm().isNull()) {
- // Alarm is set off
- mReminderItem->setContentWidgetData("currentIndex", 0);
- } else {
- // Get the reminder offset value.
- int reminderOffset = mEditedEntry->alarm().timeOffset();
- // Get the index value for the reminder combo box from the hash
- // table.
- int index = mReminderHash.key(reminderOffset);
- mReminderItem->setContentWidgetData("currentIndex", index);
- }
- }
- mCalenEditorForm->addConnection(mReminderItem,
- SIGNAL(currentIndexChanged(int)), this,
- SLOT(handleReminderIndexChanged(int)));
}
/*!
@@ -1044,64 +983,8 @@
} else {
index = RepeatItem - 1;
}
- HbDataFormViewItem
- *item =
- qobject_cast<HbDataFormViewItem *> (
- mCalenEditorForm->itemByIndex(
- mCalenEditorModel->index( index, 0)));
- mRepeatComboBox
- = qobject_cast<HbComboBox *> (item->dataItemContentWidget());
-
- // Set the user roles for the combobox items so that we depend on these
- // roles to identify the correct repeat type when repeat choices are
- // dynamically removed or added
- mRepeatComboBox->setItemData(RepeatOnce, RepeatOnce, Qt::UserRole+100);
- mRepeatComboBox->setItemData(RepeatDaily, RepeatDaily, Qt::UserRole+100);
- mRepeatComboBox->setItemData(RepeatWeekly, RepeatWeekly, Qt::UserRole+100);
- mRepeatComboBox->setItemData(RepeatBiWeekly,
- RepeatBiWeekly, Qt::UserRole+100);
- mRepeatComboBox->setItemData(RepeatMonthly,
- RepeatMonthly, Qt::UserRole+100);
- mRepeatComboBox->setItemData(RepeatYearly, RepeatYearly, Qt::UserRole+100);
- if (mEditedEntry->isRepeating()) {
- switch (mEditedEntry->repeatRule().type()) {
- case AgendaRepeatRule::DailyRule: {
- mRepeatComboBox->setCurrentIndex(1);
- }
- break;
- case AgendaRepeatRule::WeeklyRule: {
- if (mEditedEntry->repeatRule().interval() == 1) {
- mRepeatComboBox->setCurrentIndex(2);
- } else {
- mRepeatComboBox->setCurrentIndex(3);
- mIsBiWeekly = true;
- }
- }
- break;
- case AgendaRepeatRule::MonthlyRule: {
- mRepeatComboBox->setCurrentIndex(4);
- }
- break;
- case AgendaRepeatRule::YearlyRule: {
- mRepeatComboBox->setCurrentIndex(5);
- }
- break;
- default:
- break;
- }
- // If entry is repeating type then insert the repeatuntil item.
- insertRepeatUntilItem();
- } else {
- mRepeatComboBox->setCurrentIndex(0);
- // Set the Original entry value also.
- mOriginalEntry->setRepeatRule(
- AgendaRepeatRule(
- AgendaRepeatRule::InvalidRule));
- }
- connect(mRepeatComboBox, SIGNAL(currentIndexChanged(int)), this,
- SLOT(handleRepeatIndexChanged(int)));
-
+ mRepeatField->populateRepeatItem(index);
}
/*!
@@ -1111,16 +994,16 @@
{
QModelIndex repeatIndex;
if (mEditRange == ThisOnly) {
- repeatIndex = mCalenEditorModel->indexFromItem(mReminderItem);
+ repeatIndex = mReminderField->modelIndex();
} else {
- repeatIndex = mCalenEditorModel->indexFromItem(mRepeatItem);
+ repeatIndex = mRepeatField->modelIndex();
}
int descIndex;
- if (!mRepeatUntilItemAdded) {
+ if (mRepeatField && mRepeatField->isRepeatUntilItemAdded()) {
+ descIndex = repeatIndex.row() + 2;
+ } else {
descIndex = repeatIndex.row() + 1;
- } else {
- descIndex = repeatIndex.row() + 2;
}
mDescriptionItem
= mCalenEditorModel->insertDataFormItem(
@@ -1128,6 +1011,7 @@
QString(hbTrId(
"txt_calendar_formlabel_val_description")),
mCalenEditorModel->invisibleRootItem());
+ mDescriptionItem->setContentWidgetData("text", mEditedEntry->description());
mDescriptionItem->setContentWidgetData("minRows", 2);
mDescriptionItem->setContentWidgetData("maxRows", 4);
mCalenEditorForm->addConnection(
@@ -1152,15 +1036,15 @@
SLOT(handleDescriptionChange(const QString)));
QModelIndex repeatIndex;
if (mEditRange == ThisOnly) {
- repeatIndex = mCalenEditorModel->indexFromItem(mReminderItem);
+ repeatIndex = mReminderField->modelIndex();
} else {
- repeatIndex = mCalenEditorModel->indexFromItem(mRepeatItem);
+ repeatIndex = mRepeatField->modelIndex();
}
int descIndex;
- if (!mRepeatUntilItemAdded) {
+ if (mRepeatField && mRepeatField->isRepeatUntilItemAdded()) {
+ descIndex = repeatIndex.row() + 2;
+ } else {
descIndex = repeatIndex.row() + 1;
- } else {
- descIndex = repeatIndex.row() + 2;
}
mCalenEditorModel->removeItem(mCalenEditorModel->index(descIndex, 0));
// Remove the description from the entry
@@ -1170,34 +1054,6 @@
mDescriptionItemAdded = false;
}
-/*!
- Inserts the repeat until item to the dataform model
- */
-void CalenEditorPrivate::insertRepeatUntilItem()
-{
- HbDataFormModelItem::DataItemType itemType =
- static_cast<HbDataFormModelItem::DataItemType> (RepeatUntilOffset);
-
- QModelIndex repeatIndex = mCalenEditorModel->indexFromItem(mRepeatItem);
- mCustomRepeatUntilItem = mCalenEditorModel->insertDataFormItem(
- RepeatUntilItem,
- itemType,
- QString(
- hbTrId(
- "txt_calendar_setlabel_repeat_until")),
- mCalenEditorModel->invisibleRootItem());
- mRepeatUntilItemAdded = true;
-
- mCalenEditorForm->addConnection(mCustomRepeatUntilItem, SIGNAL(clicked()),
- this, SLOT(launchRepeatUntilDatePicker()));
- if (!mNewEntry && mRepeatRuleType != AgendaRepeatRule::InvalidRule) {
- HbExtendedLocale locale = HbExtendedLocale::system();
- QString dateString = locale.format(mEditedEntry->repeatRule().until(),
- r_qtn_date_usual_with_zero);
- mCustomRepeatUntilItem->setContentWidgetData("text", dateString);
- }
- //TODO: Scroll to functionality has to be implemented
-}
/*!
Close the Editor.
@@ -1225,6 +1081,7 @@
*/
void CalenEditorPrivate::handleAllDayChange(int state)
{
+ Q_UNUSED(state)
if (mAllDayCheckBoxItem->contentWidgetData("checkState") == Qt::Checked) {
// AllDayCheckBox is checked
// Set From/To times buttons Read-Only
@@ -1260,203 +1117,6 @@
addDiscardAction();
}
-/*!
- Triggerd from tapping on reminder item.
- Handles the reminder time change and updates the same in the event.
- \param index The new index chosen in the reminder list.
- */
-void CalenEditorPrivate::handleReminderIndexChanged(int index)
-{
- AgendaAlarm reminder;
- if (!mEditedEntry->alarm().isNull()) {
- reminder = mEditedEntry->alarm();
- }
- // If value for the index in hash table is 0 i.e reminder is "OFF",
- // then dont do anything only set the default constructed reminder to
- // the entry which is Null.
- if (mReminderHash.value(index)) {
- // If not zero then set the reminder offset
- // value to the entry.
- reminder.setTimeOffset(mReminderHash.value(index));
- reminder.setAlarmSoundName(QString(" "));
- } else {
- // Construct the default alarm which is NULL
- reminder = AgendaAlarm();
- }
- // Set the reminder to the entry.
- mEditedEntry->setAlarm(reminder);
- addDiscardAction();
-}
-
-/*!
- Triggerd from tapping on repeat item.
- Handles the repeat rule change and updates the same in the event.
- \param index The new index chosen in the repeat list.
- */
-void CalenEditorPrivate::handleRepeatIndexChanged(int index)
-{
- mIsBiWeekly = false;
-
- HbExtendedLocale locale = HbExtendedLocale::system();
- // Get the user role w ehave set for this index
- QVariant userRole = mRepeatComboBox->itemData(index, Qt::UserRole + 100);
- int value = userRole.toInt();
- switch (value) {
- case 1: {
- if (!mRepeatUntilItemAdded) {
- insertRepeatUntilItem();
- }
- if (mCustomRepeatUntilItem) {
- QDate date = mEditedEntry->startTime().date().addYears(1);
- mCustomRepeatUntilItem->setContentWidgetData( "text",
- locale.format( date,
- r_qtn_date_usual_with_zero));
- }
- mRepeatRuleType = AgendaRepeatRule::DailyRule;
- mIsBiWeekly = false;
- }
- break;
- case 2: {
- if (!mRepeatUntilItemAdded) {
- insertRepeatUntilItem();
- }
- if (mCustomRepeatUntilItem) {
- QDate date = mEditedEntry->startTime().date().addYears(1);
- mCustomRepeatUntilItem->setContentWidgetData( "text",
- locale.format( date,
- r_qtn_date_usual_with_zero));
-
- }
- mRepeatRuleType = AgendaRepeatRule::WeeklyRule;
- mIsBiWeekly = false;
- }
- break;
- case 3: {
- if (!mRepeatUntilItemAdded) {
- insertRepeatUntilItem();
- }
- if (mCustomRepeatUntilItem) {
- QDate date = mEditedEntry->startTime().date().addYears(1);
- mCustomRepeatUntilItem->setContentWidgetData( "text",
- locale.format( date,
- r_qtn_date_usual_with_zero));
- }
- mRepeatRuleType = AgendaRepeatRule::WeeklyRule;
- mIsBiWeekly = true;
- }
- break;
- case 4: {
- if (!mRepeatUntilItemAdded) {
- insertRepeatUntilItem();
- }
- if (mCustomRepeatUntilItem) {
- QDate date = mEditedEntry->startTime().date().addYears(5);
- mCustomRepeatUntilItem->setContentWidgetData( "text",
- locale.format( date,
- r_qtn_date_usual_with_zero));
- }
- mRepeatRuleType = AgendaRepeatRule::MonthlyRule;
- mIsBiWeekly = false;
- }
- break;
- case 5: {
- if (!mRepeatUntilItemAdded) {
- insertRepeatUntilItem();
- }
- if (mCustomRepeatUntilItem) {
- QDate date = mEditedEntry->startTime().date().addYears(10);
- mCustomRepeatUntilItem->setContentWidgetData( "text",
- locale.format( date,
- r_qtn_date_usual_with_zero));
- }
- mRepeatRuleType = AgendaRepeatRule::YearlyRule;
- mIsBiWeekly = false;
- }
- break;
- default: {
- mRepeatRuleType = AgendaRepeatRule::InvalidRule;
- if (mRepeatUntilItemAdded) {
- QModelIndex repeatIndex =
- mCalenEditorModel->indexFromItem(mRepeatItem);
- mCalenEditorModel->removeItem(
- mCalenEditorModel->index(
- repeatIndex.row()+ 1, 0));
- mRepeatUntilItemAdded = false;
- mCustomRepeatUntilItem = NULL;
- }
- mIsBiWeekly = false;
- }
- break;
- }
- addDiscardAction();
-}
-
-/*!
- Launches the date picker by tapping on the repaet until pushbutton
- */
-void CalenEditorPrivate::launchRepeatUntilDatePicker()
-{
- if (mDatePicker) {
- mDatePicker = NULL;
- }
- if (mRepeatRuleType == AgendaRepeatRule::DailyRule) {
- QDate minDate = mEditedEntry->endTime().date().addDays(1);
- mDatePicker = new HbDateTimePicker(mRepeatUntilDate, mEditorView);
- mDatePicker->setMinimumDate(minDate);
- mDatePicker->setMaximumDate(QDate(31, 12, 2100));
- mDatePicker->setDate(mRepeatUntilDate);
- } else if (mRepeatRuleType == AgendaRepeatRule::WeeklyRule) {
- QDate minDate;
- if (!mIsBiWeekly) {
- minDate = mEditedEntry->endTime().date().addDays(7);
- } else {
- minDate = mEditedEntry->endTime().date().addDays(14);
- }
- mDatePicker = new HbDateTimePicker(mRepeatUntilDate, mEditorView);
- mDatePicker->setMinimumDate(minDate);
- mDatePicker->setMaximumDate(QDate(31, 12, 2100));
- mDatePicker->setDate(mRepeatUntilDate);
- } else if (mRepeatRuleType == AgendaRepeatRule::MonthlyRule) {
- QDate minDate = mEditedEntry->endTime().date().addMonths(1);
- mDatePicker = new HbDateTimePicker(mRepeatUntilDate, mEditorView);
- mDatePicker->setMinimumDate(minDate);
- mDatePicker->setMaximumDate(QDate(31, 12, 2100));
- mDatePicker->setDate(mRepeatUntilDate);
- } else if (mRepeatRuleType == AgendaRepeatRule::YearlyRule) {
- QDate minDate = mEditedEntry->endTime().date().addYears(1);
- mDatePicker = new HbDateTimePicker(mRepeatUntilDate, mEditorView);
- mDatePicker->setMinimumDate(minDate);
- mDatePicker->setMaximumDate(QDate(31, 12, 2100));
- mDatePicker->setDate(mRepeatUntilDate);
- }
- HbDialog popUp;
- popUp.setDismissPolicy(HbDialog::NoDismiss);
- popUp.setTimeout(HbDialog::NoTimeout);
- popUp.setContentWidget(mDatePicker);
- popUp.setHeadingWidget( new HbLabel(
- hbTrId("txt_calendar_title_repeat_until")));
- HbAction *okAction = new HbAction(hbTrId("txt_common_button_ok"));
- popUp.setPrimaryAction(okAction);
- connect(okAction, SIGNAL(triggered()), this, SLOT(setRepeatUntilDate()));
- connect(okAction, SIGNAL(triggered()), &popUp, SLOT(close()));
- popUp.setSecondaryAction(new HbAction(hbTrId("txt_common_button_cancel"),
- &popUp));
- popUp.exec();
-}
-
-/*!
- Sets the repeat until date on the repeat until item
- */
-void CalenEditorPrivate::setRepeatUntilDate()
-{
- mRepeatUntilDate = mDatePicker->date();
- if (mRepeatUntilDate.isValid()) {
- HbExtendedLocale locale = HbExtendedLocale::system();
- QString dateString = locale.format(mRepeatUntilDate,
- r_qtn_date_usual_with_zero);
- mCustomRepeatUntilItem->setContentWidgetData("text", dateString);
- }
-}
/*!
Triggered when the description editor is being edited.
@@ -1536,141 +1196,6 @@
}
/*!
- Connect or disconnect the slots.
- */
-void CalenEditorPrivate::connectSlots(bool toConnect)
-{
- if (toConnect) {
- mCalenEditorForm->addConnection( mSubjectItem,
- SIGNAL(textChanged(const QString)), this,
- SLOT(handleSubjectChange(const QString)));
- if (mIsAllDayItemAdded) {
- connect( mCalenEditorModel,
- SIGNAL(dataChanged(const QModelIndex, const QModelIndex)), this,
- SLOT(handleAllDayChange(const QModelIndex, const QModelIndex)));
- }
- mCalenEditorForm->addConnection( mLocationItem,
- SIGNAL(textChanged(const QString)), this,
- SLOT(handleLocationChange(const QString)));
- mCalenEditorForm->addConnection( mReminderItem,
- SIGNAL(currentIndexChanged(int)), this,
- SLOT(handleReminderIndexChanged(int)));
- if (mEditRange == ThisAndAll) {
- connect(mRepeatComboBox, SIGNAL(currentIndexChanged(int)), this,
- SLOT(handleRepeatIndexChanged(int)));
- }
- if (mDescriptionItemAdded) {
- mCalenEditorForm->addConnection( mDescriptionItem,
- SIGNAL(textChanged(const QString)), this,
- SLOT(handleDescriptionChange(const QString)));
- }
- } else {
- mCalenEditorForm->removeConnection( mSubjectItem,
- SIGNAL(textChanged(const QString)),this,
- SLOT(handleSubjectChange(const QString)));
- if (mIsAllDayItemAdded) {
- disconnect( mCalenEditorModel,
- SIGNAL(dataChanged(const QModelIndex, const QModelIndex)), this,
- SLOT(handleAllDayChange(const QModelIndex, const QModelIndex)));
- }
- mCalenEditorForm->removeConnection( mLocationItem,
- SIGNAL(textChanged(const QString)), this,
- SLOT(handleLocationChange(const QString)));
- mCalenEditorForm->removeConnection( mReminderItem,
- SIGNAL(currentIndexChanged(int)), this,
- SLOT(handleReminderIndexChanged(int)));
- if (mEditRange == ThisAndAll) {
- disconnect(mRepeatComboBox, SIGNAL(currentIndexChanged(int)), this,
- SLOT(handleRepeatIndexChanged(int)));
- }
- if (mDescriptionItemAdded) {
- mCalenEditorForm->removeConnection( mDescriptionItem,
- SIGNAL(textChanged(const QString)), this,
- SLOT(handleDescriptionChange(const QString)));
- }
-
- }
-
-}
-
-/*!
- Updates the repeat choices depending on the meeting duration
-*/
-void CalenEditorPrivate::updateRepeatChoices()
-{
- // Only when editing all the occurences, repeat item will be shown
- if (mEditRange == ThisAndAll) {
- // Clear all the choices and add it again. If we dont do it
- // as user would have changed the end times many times and we would have
- // deleted repeat options depending upon that
- // Get the current choice
- int choice = mRepeatComboBox->currentIndex();
- mRepeatComboBox->clear();
- QStringList repeatChoices;
- repeatChoices << hbTrId("txt_calendar_setlabel_repeat_val_only_once")
- << hbTrId("txt_calendar_setlabel_repeat_val_daily")
- << hbTrId("txt_calendar_setlabel_repeat_val_weekly")
- << hbTrId("txt_calendar_setlabel_repeat_val_fortnightly")
- << hbTrId("txt_calendar_setlabel_repeat_val_monthly")
- << hbTrId("txt_calendar_setlabel_repeat_val_yearly");
- mRepeatComboBox->addItems(repeatChoices);
- // Set the user roles for the combobox items so that we depend on these
- // roles to identify the correct repeat type when repeat choices are
- // dynamically removed or added
- mRepeatComboBox->setItemData(RepeatOnce, RepeatOnce, Qt::UserRole + 100);
- mRepeatComboBox->setItemData(RepeatDaily, RepeatDaily,
- Qt::UserRole + 100);
- mRepeatComboBox->setItemData(RepeatWeekly, RepeatWeekly,
- Qt::UserRole + 100);
- mRepeatComboBox->setItemData(RepeatBiWeekly, RepeatBiWeekly,
- Qt::UserRole + 100);
- mRepeatComboBox->setItemData(RepeatMonthly, RepeatMonthly,
- Qt::UserRole + 100);
- mRepeatComboBox->setItemData(RepeatYearly, RepeatYearly,
- Qt::UserRole + 100);
-
- // Now check if the duration of the meeting and remove the repeat choices
- // if necessary
- int duration =
- mEditedEntry->startTime().daysTo(mEditedEntry->endTime());
- if (mEditedEntry->endTime() >= (mEditedEntry->startTime().addYears(1))) {
- // Remove all options except "RepeatOnce"
- // Should be deletd in the descending order only
- mRepeatComboBox->removeItem(RepeatYearly);
- mRepeatComboBox->removeItem(RepeatMonthly);
- mRepeatComboBox->removeItem(RepeatBiWeekly);
- mRepeatComboBox->removeItem(RepeatWeekly);
- mRepeatComboBox->removeItem(RepeatDaily);
- } else if (mEditedEntry->endTime()
- >= (mEditedEntry->startTime().addMonths(1))) {
- // Remove all the options except "Repeat Once"
- // and "Repeat Yearly" options
- // Should be deletd in the descending order only
- mRepeatComboBox->removeItem(RepeatMonthly);
- mRepeatComboBox->removeItem(RepeatBiWeekly);
- mRepeatComboBox->removeItem(RepeatWeekly);
- mRepeatComboBox->removeItem(RepeatDaily);
- } else if (duration >= 14) {
- // Remove daily, weekly and biweekly options
- // Should be deletd in the descending order only
- mRepeatComboBox->removeItem(RepeatBiWeekly);
- mRepeatComboBox->removeItem(RepeatWeekly);
- mRepeatComboBox->removeItem(RepeatDaily);
- } else if (duration >= 7) {
- // Remove daily and weekly options
- // Should be deletd in the descending order only
- mRepeatComboBox->removeItem(RepeatWeekly);
- mRepeatComboBox->removeItem(RepeatDaily);
- } else if (duration >= 1) {
- // Remove ont daily option
- mRepeatComboBox->removeItem(RepeatDaily);
- }
- // Set the previous user's choice
- mRepeatComboBox->setCurrentIndex(choice);
- handleRepeatIndexChanged(choice);
- }
-}
-/*!
* Show delete confirmation query
*/
int CalenEditorPrivate::showDeleteConfirmationQuery()
@@ -1729,385 +1254,6 @@
entry is not repeating.
\return enum Error which shows type of error.
*/
-CalenEditorPrivate::Error CalenEditorPrivate::checkErrorsForThisAndAll()
-{
- const QDateTime startTime = mEditedEntry->startTime();
- const QDateTime endTime = mEditedEntry->endTime();
-
- // Repeating entry checks:
- if (mEditedEntry->isRepeating()) {
- // Check that repeat until date is a) later than start date
- // (for new notes)
- // b) not before start date
- // (for existing notes)
- QDate repeatUntilDay = mEditedEntry->repeatRule().until();
-
- QDate repeatStartDay;
-
- // if new note or old note isnt repeating
- // edited.repeatUntil date must be greater than edited.start date
- // else
- // if IsRepeatRuleEdited or IsStartDateTimeEdited
- // (either one above will make a new rule in which edited.startdate
- // is the start date)
- // edited.repeatUntil must be greater than edited.start date
- // else
- // edited.repeatUntil must be greater than start date on disk
-
- if (mNewEntry || mOriginalEntry->repeatRule().isNull()
- || isRepeatRuleEdited() || isStartDateTimeEdited()) {
- // We don't have an rrule so we can't get the rrule start date,
- // or user has edited a field that will cause new start date to be
- // used in the new rule.
- // Use the edited entry's start date.
- repeatStartDay = startTime.date();
- } else {
- // original rule is valid and new rule will not be created
- repeatStartDay = mOriginalEntry->repeatRule().repeatRuleStart();
- }
-
- if (durationGreaterThanRepeatIntervalError()) {
- return
- CalenEditorPrivate::CalenEditorErrorDurationGreaterThanRepeatInterval;
- }
- return CalenEditorPrivate::CalenEditorErrorNone;
- }
- return CalenEditorPrivate::CalenEditorErrorNone;
-}
-
-/*!
- Returns true if the entry has been modified, false otherwise.
- \return true if the entry has been modified, false otherwise.
- */
-bool CalenEditorPrivate::isEdited() const
-{
- return (isSummaryEdited() ||
- isAllDayEdited() ||
- isLocationEdited() ||
- isStartDateTimeEdited() ||
- isEndDateTimeEdited() ||
- isAlarmEdited() ||
- isRepeatRuleEdited() ||
- isDescriptionEdited());
-}
-
-/*!
- Returns true if the summary has been edited, false otherwise.
- \return true if the summary has been edited, false otherwise.
- */
-bool CalenEditorPrivate::isSummaryEdited() const
-{
- return (mOriginalEntry->summary() != mEditedEntry->summary());
-}
-
-/*!
- Returns true if the all day has been edited, false otherwise.
- \return true if the all day has been edited, false otherwise.
- */
-bool CalenEditorPrivate::isAllDayEdited() const
-{
- if (mAllDayCheckBoxItem) {
- if (mOriginalEntry->type() == AgendaEntry::TypeEvent) {
- if (mAllDayCheckBoxItem->contentWidgetData("checkState")
- == Qt::Checked) {
- return false;
- } else {
- return true;
- }
- } else if (mOriginalEntry->type() == AgendaEntry::TypeAppoinment) {
- if (mAllDayCheckBoxItem->contentWidgetData("checkState")
- == Qt::Checked) {
- return true;
- } else {
- return false;
- }
- }
- }
- return false;
-}
-
-/*!
- Returns true if the location has been edited, false otherwise.
- \return true if the location has been edited, false otherwise.
- */
-bool CalenEditorPrivate::isLocationEdited() const
-{
- return (mOriginalEntry->location() != mEditedEntry->location());
-}
-
-/*!
- Returns true if the start date/time has been edited, false otherwise.
- \return true if the start date/time has been edited, false otherwise.
- */
-bool CalenEditorPrivate::isStartDateTimeEdited() const
-{
- return (mOriginalEntry->startTime() != mEditedEntry->startTime());
-}
-
-/*!
- Returns true if the end date/time has been edited, false otherwise.
- \return true if the end date/time has been edited, false otherwise.
- */
-bool CalenEditorPrivate::isEndDateTimeEdited() const
-{
- return (mOriginalEntry->endTime() != mEditedEntry->endTime());
-}
-
-/*!
- Returns true if the alarm has been edited, false otherwise.
- \return true if the alarm has been edited, false otherwise.
- */
-bool CalenEditorPrivate::isAlarmEdited() const
-{
- return (mOriginalEntry->alarm() != mEditedEntry->alarm());
-}
-
-/*!
- Returns true if the repeat rule has been edited, false otherwise.
- \return true if the repeat rule has been edited, false otherwise.
- */
-bool CalenEditorPrivate::isRepeatRuleEdited() const
-{
- if ((mOriginalEntry->repeatRule().type() == AgendaRepeatRule::InvalidRule)
- && (mEditedEntry->repeatRule().type()
- == AgendaRepeatRule::InvalidRule)) {
- return false;
- } else {
- return (mOriginalEntry->repeatRule() != mEditedEntry->repeatRule());
- }
-}
-
-/*!
- Returns true if the Description field has been edited, false otherwise.
- \return true if the Description field has been edited, false otherwise.
- */
-bool CalenEditorPrivate::isDescriptionEdited() const
-{
- return (mOriginalEntry->description() != mEditedEntry->description());
-}
-
-/*!
- Returns true if any of the non-text items (e.g. time fields) of the entry
- have been edited, false otherwise.
- \return true if any of the non text items edited,false otherwise.
- */
-bool CalenEditorPrivate::nonTextItemsEdited() const
-{
- return (isAllDayEdited() ||
- isStartDateTimeEdited() ||
- isEndDateTimeEdited() ||
- isAlarmEdited() ||
- isRepeatRuleEdited());
-}
-
-/*!
- Returns true if summary && location && description text items are all empty,
- false otherwise.
- \return true if text items are all empty,false otherwise.
- */
-bool CalenEditorPrivate::areTextItemsEmpty() const
-{
- return (mEditedEntry->summary().isEmpty()
- && mEditedEntry->location().isEmpty()
- && mEditedEntry->description().isEmpty());
-}
-
-/*!
- Returns true if the user cleared the text in the location and summary items,
- false otherwise.
- \return true if summary & location items are cleared,false otherwise.
- */
-bool CalenEditorPrivate::areTextItemsCleared() const
-{
- if (mEditedEntry->summary().isEmpty() &&
- mEditedEntry->location().isEmpty() &&
- mEditedEntry->description().isEmpty()) {
- if (isSummaryEmptied()
- || isLocationEmptied()
- || isDescriptionEmptied()) {
- return true;
- }
- }
- return false;
-}
-
-/*!
- Returns true the summary was not empty in original && is empty
- in the edited note,false otherwise
- \return true if summary is cleared in edited note,false otherwise
- */
-bool CalenEditorPrivate::isSummaryEmptied() const
-{
- return (!mOriginalEntry->summary().isEmpty()
- && mEditedEntry->summary().isEmpty());
-}
-
-/*!
- Returns true the location was not empty in original && is empty
- in the edited note,false otherwise
- \return true if location is cleared in edited note,false otherwise
- */
-bool CalenEditorPrivate::isLocationEmptied() const
-{
- return (!mOriginalEntry->location().isEmpty()
- && mEditedEntry->location().isEmpty());
-}
-
-/*!
- Returns true the description was not empty in original && is empty
- in the edited note,false otherwise
- \return true if description is cleared in edited note,false otherwise
- */
-bool CalenEditorPrivate::isDescriptionEmptied() const
-{
- return (!mOriginalEntry->description().isEmpty()
- && mEditedEntry->description().isEmpty());
-}
-
-/*!
- Works out whether the entry should be deleted, saved,
- or whether no action should be taken.
- \return enum Action
- */
-CalenEditorPrivate::Action CalenEditorPrivate::shouldSaveOrDeleteOrDoNothing()
- const
-{
- // Need to save the entry if third party calls editor to launch the
- // calendar after that. So, that entry will be new entry adn we assume
- // that client launches editor with some prefilled text items
- if (!isEdited() && !mLaunchCalendar) {
- // Not edited at all OR
- // Only added space characters to text fields but not
- // edited the non-text items
- // no need to save the entry
- return CalenEditorPrivate::ActionNothing;
- }
- // new entry is edited
- if (mNewEntry) {
- // Subject && Location && Description are text items.
- // If text items as a whole is not empty, we can save the note
- // If text items as a whole is empty, we can still save the note
- // since we edited "non-text" fields
- if (!nonTextItemsEdited() && areTextItemsEmpty()) {
- return CalenEditorPrivate::ActionNothing;
- } else {
- return CalenEditorPrivate::ActionSave;
- }
- }
- if (areTextItemsCleared() && !nonTextItemsEdited()) {
- // ***** edited entry + text items emptied + non-text items not edited
- // Even if user may have edited non-text fields,
- // delete the note
- return CalenEditorPrivate::ActionDelete;
- }
- // Save the note, since the text fields contain something
- return CalenEditorPrivate::ActionSave;
-}
-
-/*!
- Returns true if the duration of instances of the meeting is greater than
- the repeat period of the series, false otherwise.
- \return true if duration of meeting is greater than repeat period, false
- otherwise
- */
-bool CalenEditorPrivate::durationGreaterThanRepeatIntervalError() const
-{
- bool isError = false;
- switch (mEditedEntry->repeatRule().type()) {
- case AgendaRepeatRule::DailyRule: {
- int durationDays =
- mEditedEntry->startTime().daysTo(mEditedEntry->endTime());
- isError = durationDays >= 1;
- }
- break;
- case AgendaRepeatRule::WeeklyRule: {
- int durationDays =
- mEditedEntry->startTime().daysTo(mEditedEntry->endTime());
- if (mEditedEntry->repeatRule().interval() == 1) {
- isError = durationDays >= 7;
- } else {
- isError = durationDays >= 14;
- }
- }
- break;
- case AgendaRepeatRule::MonthlyRule: {
- if (mEditedEntry->endTime()
- >= (mEditedEntry->startTime().addMonths(1))) {
- isError = true;
- }
- }
- break;
- case AgendaRepeatRule::YearlyRule: {
- if (mEditedEntry->endTime()
- >= (mEditedEntry->startTime().addYears(1))) {
- isError = true;
- }
- }
- break;
- default:
- // Not repeating, no error
- isError = false;
- break;
- }
- return isError;
-}
-
-/*!
- Check the alarm fields for errors.
- \return the error if found, or CalenEditorErrorNone if no error found.
- */
-CalenEditorPrivate::Error CalenEditorPrivate::checkAlarmFieldsForErrors(
- bool series) const
-{
- Error error = CalenEditorErrorNone;
- // If alarm not active, no check
- if (!mEditedEntry->alarm().isNull()) {
- int alarm = mEditedEntry->alarm().timeOffset();
- QDateTime startTime = mEditedEntry->startTime();
- QDateTime alarmTime;
- if (alarm > 0) {
- alarmTime = startTime.addSecs(-alarm * 60);
- } else {
- alarmTime = startTime.addSecs(alarm * 60);
- }
- QDateTime currentTime = CalenDateUtils::now();
- if (isAlarmInAcceptablePeriod(error, alarmTime, startTime)) {
- if (!series && (alarmTime < currentTime)) {
- // dont let non-repeating future entries have alarms in past
- error = CalenEditorErrorAlarmTimePast;
- }
- }
- }
- return error;
-}
-
-/*!
- Checks if AlarmTime is 31 days from StartTime,
- then sets Error to CalenEditorErrorAlarmDateTooManyDaysBeforeNote and
- returns false
- Checks if AlarmTime is later StartTime,
- then sets Error to CalenEditorErrorAlarmTimeLaterThanNote and returns false
- \return true if error untouched, false otherwise
- */
-bool CalenEditorPrivate::isAlarmInAcceptablePeriod(Error &error,
- const QDateTime &alarmTime,
- const QDateTime &startTime) const
-{
- QDateTime upperLimit = startTime;
-
- QDateTime lowerLimit = startTime.addDays(-31);
- bool acceptable = true;
- if (alarmTime < lowerLimit) {
- acceptable = false;
- error = CalenEditorErrorAlarmDateTooManyDaysBeforeNote;
- } else {
- if (alarmTime > upperLimit) {
- acceptable = false;
- error = CalenEditorErrorAlarmTimeLaterThanNote;
- }
- }
- return acceptable;
-}
/*!
Handle "Done". Usually saves, but can also delete or do nothing.
@@ -2116,9 +1262,11 @@
*/
CalenEditorPrivate::Action CalenEditorPrivate::handleDone()
{
- updateEditedEntry();
+ if (mEditRange == ThisAndAll) {
+ mRepeatField->saveRepeatRule();
+ }
// TODO: Need to check entry status here. EntryStillExistsL
- switch (shouldSaveOrDeleteOrDoNothing()) {
+ switch (mDataHandler->shouldSaveOrDeleteOrDoNothing(mLaunchCalendar)) {
case CalenEditorPrivate::ActionSave:
if (saveEntry()) {
return CalenEditorPrivate::ActionSave;
@@ -2136,53 +1284,6 @@
}
/*!
- Updates the edited entry
- */
-void CalenEditorPrivate::updateEditedEntry()
-{
- if (mEditRange == ThisAndAll) {
- // saves repeat type of entry.
- if (mRepeatRuleType != AgendaRepeatRule::InvalidRule) {
- AgendaRepeatRule repeatRule(mRepeatRuleType);
-
- //TODO : Set the repeat from and to dates
- QVariant dateVariant =
- mCustomRepeatUntilItem->contentWidgetData("text");
- QString dateString = dateVariant.toString();
- QDate untilDate = QDate::fromString(dateString, "dd/MM/yyyy");
- repeatRule.setRepeatRuleStart(mEditedEntry->startTime().date());
- repeatRule.setInterval(1);
- repeatRule.setUntil(mRepeatUntilDate);
-
- // need to set the day for weekly & monthly repeat rule.
- if (mRepeatRuleType == AgendaRepeatRule::WeeklyRule) {
- QList<AgendaRepeatRule::Day> days;
- if (mIsBiWeekly) {
- repeatRule.setInterval(2);
- mIsBiWeekly = false;
- }
- int dayOfWeek = mEditedEntry->startTime().date().dayOfWeek();
- days.append(AgendaRepeatRule::Day(dayOfWeek - 1));
- repeatRule.setByDay(days);
- } else if (mRepeatRuleType == AgendaRepeatRule::MonthlyRule) {
- QList<int> monthDays;
- //TODO :
- int dayNoInMonth = mEditedEntry->startTime().date().day();
- monthDays.append(dayNoInMonth);
- repeatRule.setByMonthDay(monthDays);
- } else if (mRepeatRuleType == AgendaRepeatRule::YearlyRule) {
- //TODO : Add yearly rule.Check if required.
- }
- mEditedEntry->setRepeatRule(repeatRule);
- } else {
- mEditedEntry->setRepeatRule( AgendaRepeatRule(
- AgendaRepeatRule::InvalidRule));
- }
- // TODO: Need to update rDates here
- }
-}
-
-/*!
Save the entry
\return true if entry is saved ,false otherwise
*/
@@ -2203,7 +1304,7 @@
}
CalenEditorPrivate::Error error = CalenEditorPrivate::CalenEditorErrorNone;
- error = checkErrorsForThisAndAll();
+ error = mDataHandler->checkErrorsForThisAndAll();
if (CalenEditorPrivate::CalenEditorErrorNone == error) {
if (!handleAllDayToSave()) {
if (mNewEntry) {
@@ -2227,7 +1328,7 @@
}
emit q_ptr->entrySaved();
} else if (error) {
- displayErrorMsg(error);
+ mDataHandler->displayErrorMsg(error);
return false;
}
return true;
@@ -2262,87 +1363,6 @@
}
}
}
-
-}
-
-/*!
- Display the given error msg
- */
-void CalenEditorPrivate::displayErrorMsg(int error)
-{
- QString errorMsg = QString::Null();
-
- switch (error) {
- case CalenEditorPrivate::CalenEditorErrorAlarmTimeLaterThanNote:
- errorMsg.append( hbTrId(
- "txt_calendar_dpopinfo_alarm_later_than_note"));
- break;
- case CalenEditorPrivate::CalenEditorErrorAlarmTimePast:
- errorMsg.append( hbTrId(
- "txt_calendar_dpopinfo_the_time_for_the_note_alarm"));
- break;
- case CalenEditorPrivate::CalenEditorErrorAlarmDateTooManyDaysBeforeNote:
- errorMsg.append( hbTrId(
- "txt_calendar_dpopinfo_alarm_date_is_too_past"));
- break;
- case CalenEditorPrivate::CalenEditorErrorRepeatUntilEarlierThanNote:
- errorMsg.append( hbTrId(
- "txt_calendar_dpopinfo_repeat_until_has_to_be_later"));
- break;
- case
- CalenEditorPrivate::CalenEditorErrorDurationGreaterThanRepeatInterval:
- dispalyErrorMsgByRepeatType();
- break;
- case CalenEditorPrivate::CalenEditorErrorStopTimeEarlierThanStartTime:
- errorMsg.append( hbTrId(
- "txt_calendar_dpopinfo_note_ends_before_than_starts"));
- break;
- default:
- break;
- }
- if (!errorMsg.isNull()) {
- HbMessageBox::information(errorMsg);
- }
-}
-
-/*!
- Display conflict error message regarding repeat type
- */
-void CalenEditorPrivate::dispalyErrorMsgByRepeatType()
-{
- QString errorMsg = QString::Null();
-
- int durationDays =
- mEditedEntry->startTime().daysTo(mEditedEntry->endTime());
- int numDaysEntrySpan = durationDays + 1;
- // Add the text proper text ids
- switch (mEditedEntry->repeatRule().type()) {
- case AgendaRepeatRule::DailyRule:
- errorMsg.append( hbTrId(
- "txt_calendar_dpopinfo_l1_day_meeting_cant_daily"));
- break;
- case AgendaRepeatRule::WeeklyRule:
- if (mEditedEntry->repeatRule().interval() == 1) {
- errorMsg.append( hbTrId(
- "txt_calendar_dpopinfo_l1_day_meeting_cant_weekly"));
- } else {
- errorMsg.append("meeting duration is more than 2 weeks");
- }
- break;
- case AgendaRepeatRule::MonthlyRule:
- errorMsg.append( hbTrId(
- "txt_calendar_dpopinfo_l1_day_meeting_cant_monthly"));
- break;
- case AgendaRepeatRule::YearlyRule:
- errorMsg.append( hbTrId(
- "txt_calendar_dpopinfo_l1_day_meeting_cant_yearly"));
- break;
- default:
- break;
- }
- if (!errorMsg.isNull()) {
- HbMessageBox::information(errorMsg.arg(numDaysEntrySpan));
- }
}
/*!
@@ -2410,4 +1430,36 @@
mViewToItem->enableToTimeFieldAndSetTime(enableFileds, toTime);
}
+
+/*!
+ Returns pointer of entyr being edited
+ */
+AgendaEntry* CalenEditorPrivate::editedEntry()
+{
+ return mEditedEntry;
+}
+
+/*!
+ Returns the pointer of original entry
+ */
+AgendaEntry* CalenEditorPrivate::originalEntry()
+{
+ return mOriginalEntry;
+}
+
+/*!
+ Returns true if new entry being created else false
+ */
+bool CalenEditorPrivate::isNewEntry()
+{
+ return mNewEntry;
+}
+
+/*!
+ Returns the pointer of all day check box item
+ */
+HbDataFormModelItem* CalenEditorPrivate::allDayCheckBoxItem()
+{
+ return mAllDayCheckBoxItem;
+}
// End of file --Don't remove this.
--- a/calendarui/caleneditor/src/caleneditorcustomitem.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/caleneditor/src/caleneditorcustomitem.cpp Mon May 03 12:30:32 2010 +0300
@@ -34,10 +34,16 @@
#include <QDate>
#include <QTime>
+//LI related headers
+#include "qlocationpickeritem.h"
+#include <xqaiwrequest.h>
+#include <xqappmgr.h>
+
// User includes
#include "caleneditorcustomitem.h"
#include "calendateutils.h"
#include "caleneditorcommon.h"
+#include "caleneditordocloader.h"
/*!
\class CalenEditorCustomItem
@@ -56,6 +62,8 @@
mMinTime.setHMS(0,0,0,0);
mMaxTime.setHMS(23,59,59,999);
mLocale = HbExtendedLocale::system();
+ mLocationLineEdit = NULL;
+ mLocationPushButton = NULL;
}
/*!
Destructor.
@@ -119,6 +127,28 @@
layoutBottom->addItem(mPushButtonDate);
return widgetBottom;
}
+
+ case CustomWidgetLocation:
+ {
+ CalenEditorDocLoader editorLocationDocLoader;
+ bool loadSuccess = false;
+
+ editorLocationDocLoader.load(CALEN_EDITOR_LOCATION_XML_FILE, &loadSuccess);
+ Q_ASSERT_X(loadSuccess, "caleneditor.cpp",
+ "Unable to load caleneditor location view XML");
+ HbWidget* widgetLocation = qobject_cast<HbWidget *> (editorLocationDocLoader.findWidget(CALEN_EDITOR_LOCATION));
+
+ mLocationLineEdit = qobject_cast<HbLineEdit *>( editorLocationDocLoader.findWidget(CALEN_EDITOR_LOCATION_LINEEDIT));
+ mLocationLineEdit->setMinRows(1);
+ mLocationLineEdit->setMaxRows(4);
+ mLocationPushButton = qobject_cast<HbPushButton*>(editorLocationDocLoader.findWidget(CALEN_EDITOR_LOCATION_PUSHBUTTON));
+ mLocationPushButton->setIcon( HbIcon("qtg_mono_location"));
+
+ connect(mLocationPushButton, SIGNAL(clicked()), this, SLOT(launchLocationPicker()));
+ connect(mLocationLineEdit, SIGNAL(textChanged(const QString)),
+ this, SLOT(handleLocationTextChange(const QString)));
+ return widgetLocation;
+ }
case RepeatUntilOffset:
{
@@ -131,7 +161,49 @@
return 0;
}
}
+/*!
+ launch the location picker application using QT highway with the required service
+*/
+void CalenEditorCustomItem::launchLocationPicker()
+{
+ XQApplicationManager *appManager = new XQApplicationManager();
+
+ XQAiwRequest *request = appManager->create("com.nokia.symbian", "ILocationPick", "pick()", true);
+ if( request )
+ {
+ QVariant retValue;
+ if( request->send( retValue ) )
+ {
+ setSelectedLocation(retValue);
+ }
+ }
+}
+/*!
+ set the selected location from the picker to the line edit widget
+ and notify the other observers.
+*/
+void CalenEditorCustomItem::setSelectedLocation( QVariant &aValue )
+{
+ QLocationPickerItem selectedLocation = aValue.value<QLocationPickerItem>();
+ if( selectedLocation.mIsValid )
+ {
+ QString locationString;
+ if( selectedLocation.mStreet.size() )
+ {
+ locationString.append(selectedLocation.mStreet);
+ locationString.append(',');
+ }
+ if( selectedLocation.mCity.size() )
+ {
+ locationString.append(selectedLocation.mCity);
+ locationString.append(',');
+ }
+ locationString.append(selectedLocation.mCountry);
+ emit locationTextChanged(locationString);
+ mLocationLineEdit->setText(locationString );
+ }
+}
void CalenEditorCustomItem::populateDateTime(QDateTime defaultDateTime, bool isFromItem)
{
// Store the date and time to be shown
@@ -146,6 +218,12 @@
r_qtn_time_usual_with_zero));
}
+void CalenEditorCustomItem::populateLocation(QString location )
+{
+ mLocationLineEdit->setText( location );
+
+}
+
void CalenEditorCustomItem::setDateRange(QDate start, QDate end)
{
mMaxDate = end;
@@ -170,6 +248,12 @@
}
+void CalenEditorCustomItem::handleLocationTextChange(QString location)
+{
+ emit locationTextChanged(location);
+}
+
+
void CalenEditorCustomItem::handleDate()
{
@@ -237,11 +321,10 @@
{
mDate = mDatePicker->date();
if (mDate.isValid()) {
- mDateTime.setDate(mDate);
- mDateTime.setTime(mTime);
mPushButtonDate->setText(mLocale.format(mDate,
r_qtn_date_usual_with_zero));
- emit dateTimeUpdated(mDateTime);
+ QDateTime dateTime(mDate,mTime);
+ emit dateTimeUpdated(dateTime);
}
}
@@ -252,12 +335,11 @@
{
mTime = mTimePicker->time();
if (mTime.isValid()) {
- mDateTime.setTime(mTime);
mPushButtonTime->setText(mLocale.format(mTime,
r_qtn_time_usual_with_zero));
- mDateTime.setDate(mDate);
- emit dateTimeUpdated(mDateTime);
+ QDateTime dateTime(mDate,mTime);
+ emit dateTimeUpdated(dateTime);
}
}
@@ -294,7 +376,8 @@
static_cast<HbDataFormModelItem::DataItemType>(
index.data(HbDataFormModelItem::ItemTypeRole).toInt());
- if(itemType == CustomWidgetFrom || itemType == CustomWidgetTo || itemType == RepeatUntilOffset) {
+ if(itemType == CustomWidgetFrom || itemType == CustomWidgetTo || itemType == RepeatUntilOffset
+ || itemType == CustomWidgetLocation ) {
return true;
} else {
return false;
@@ -320,5 +403,6 @@
}
}
+Q_IMPLEMENT_USER_METATYPE(QLocationPickerItem)
// End of file --Don't remove this.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/caleneditor/src/caleneditordatahandler.cpp Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,539 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Definition of CalenEditorDataHandler class.
+*
+*/
+
+// System Includes
+#include <hbmessagebox.h>
+#include <hbdataformmodelitem.h>
+
+// User Includes
+#include "caleneditordatahandler.h"
+#include "calendateutils.h"
+#include "agendaentry.h"
+
+/*!
+ \class CalenEditorDataHandler
+ */
+/*!
+ Constructor.
+ */
+
+CalenEditorDataHandler::CalenEditorDataHandler(CalenEditorPrivate* calenEditor,
+ AgendaEntry* editedEntry,
+ AgendaEntry* originalEntry)
+: mCalenEditor(calenEditor),mEditedEntry(editedEntry), mOriginalEntry(originalEntry)
+{
+
+}
+
+/*!
+ Destructor
+ */
+CalenEditorDataHandler::~CalenEditorDataHandler()
+{
+ // Nothing Yet
+}
+
+/*!
+ Returns pointer for edited entry
+ \return pointer for edited entry
+ */
+AgendaEntry* CalenEditorDataHandler::editedEntry()
+{
+ return mEditedEntry;
+}
+
+/*!
+ Returns pointer for original entry
+ \return pointer for original entry
+ */
+AgendaEntry* CalenEditorDataHandler::originalEntry()
+{
+ return mOriginalEntry;
+}
+
+/*!
+ Checks if user entered data violates the permitted attributes
+ \return Error Error indicating the violated parameter
+ */
+CalenEditorPrivate::Error CalenEditorDataHandler::checkErrorsForThisAndAll()
+{
+ //TODO : Remove implementation once handle all repeating errors
+ const QDateTime startTime = mEditedEntry->startTime();
+ const QDateTime endTime = mEditedEntry->endTime();
+
+ // Repeating entry checks:
+ if (mEditedEntry->isRepeating()) {
+ // Check that repeat until date is a) later than start date
+ // (for new notes)
+ // b) not before start date
+ // (for existing notes)
+ QDateTime repeatUntilDay = mEditedEntry->repeatRule().until();
+
+ QDateTime repeatStartDay;
+
+ // if new note or old note isnt repeating
+ // edited.repeatUntil date must be greater than edited.start date
+ // else
+ // if IsRepeatRuleEdited or IsStartDateTimeEdited
+ // (either one above will make a new rule in which edited.startdate
+ // is the start date)
+ // edited.repeatUntil must be greater than edited.start date
+ // else
+ // edited.repeatUntil must be greater than start date on disk
+
+ if (mCalenEditor->isNewEntry() || mOriginalEntry->repeatRule().isNull()
+ || isRepeatRuleEdited() || isStartDateTimeEdited()) {
+ // We don't have an rrule so we can't get the rrule start date,
+ // or user has edited a field that will cause new start date to be
+ // used in the new rule.
+ // Use the edited entry's start date.
+ repeatStartDay = startTime;
+ } else {
+ // original rule is valid and new rule will not be created
+ repeatStartDay = mOriginalEntry->repeatRule().repeatRuleStart();
+ }
+
+ if (durationGreaterThanRepeatIntervalError()) {
+ return CalenEditorPrivate::
+ CalenEditorErrorDurationGreaterThanRepeatInterval;
+ }
+ return CalenEditorPrivate::CalenEditorErrorNone;
+ }
+ return CalenEditorPrivate::CalenEditorErrorNone;
+}
+
+/*!
+ Returns true if the entry has been modified, false otherwise.
+ \return true if the entry has been modified, false otherwise.
+ */
+bool CalenEditorDataHandler::isEdited() const
+{
+ return (isSummaryEdited() ||
+ isAllDayEdited() ||
+ isLocationEdited() ||
+ isStartDateTimeEdited() ||
+ isEndDateTimeEdited() ||
+ isAlarmEdited() ||
+ isRepeatRuleEdited() ||
+ isDescriptionEdited());
+}
+
+/*!
+ Returns true if the summary has been edited, false otherwise.
+ \return true if the summary has been edited, false otherwise.
+ */
+bool CalenEditorDataHandler::isSummaryEdited() const
+{
+ return (mOriginalEntry->summary() != mEditedEntry->summary());
+}
+
+/*!
+ Returns true if the all day has been edited, false otherwise.
+ \return true if the all day has been edited, false otherwise.
+ */
+bool CalenEditorDataHandler::isAllDayEdited() const
+{
+ HbDataFormModelItem* alldayItem = mCalenEditor->allDayCheckBoxItem();
+ if (alldayItem) {
+ if (mOriginalEntry->type() == AgendaEntry::TypeEvent) {
+ if (alldayItem->contentWidgetData("checkState")
+ == Qt::Checked) {
+ return false;
+ } else {
+ return true;
+ }
+ } else if (mOriginalEntry->type() == AgendaEntry::TypeAppoinment) {
+ if (alldayItem->contentWidgetData("checkState")
+ == Qt::Checked) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+ }
+ return false;
+}
+
+/*!
+ Returns true if the location has been edited, false otherwise.
+ \return true if the location has been edited, false otherwise.
+ */
+bool CalenEditorDataHandler::isLocationEdited() const
+{
+ return (mOriginalEntry->location() != mEditedEntry->location());
+}
+
+/*!
+ Returns true if the start date/time has been edited, false otherwise.
+ \return true if the start date/time has been edited, false otherwise.
+ */
+bool CalenEditorDataHandler::isStartDateTimeEdited() const
+{
+ return (mOriginalEntry->startTime() != mEditedEntry->startTime());
+}
+
+/*!
+ Returns true if the end date/time has been edited, false otherwise.
+ \return true if the end date/time has been edited, false otherwise.
+ */
+bool CalenEditorDataHandler::isEndDateTimeEdited() const
+{
+ return (mOriginalEntry->endTime() != mEditedEntry->endTime());
+}
+
+/*!
+ Returns true if the alarm has been edited, false otherwise.
+ \return true if the alarm has been edited, false otherwise.
+ */
+bool CalenEditorDataHandler::isAlarmEdited() const
+{
+ return (mOriginalEntry->alarm() != mEditedEntry->alarm());
+}
+
+/*!
+ Returns true if the repeat rule has been edited, false otherwise.
+ \return true if the repeat rule has been edited, false otherwise.
+ */
+bool CalenEditorDataHandler::isRepeatRuleEdited() const
+{
+ if ((mOriginalEntry->repeatRule().type() == AgendaRepeatRule::InvalidRule)
+ && (mEditedEntry->repeatRule().type()
+ == AgendaRepeatRule::InvalidRule)) {
+ return false;
+ } else {
+ return ((mOriginalEntry->repeatRule().type() !=
+ mEditedEntry->repeatRule().type())
+ || (mOriginalEntry->repeatRule().until().date() !=
+ mEditedEntry->repeatRule().until().date()));
+ }
+}
+
+/*!
+ Returns true if the Description field has been edited, false otherwise.
+ \return true if the Description field has been edited, false otherwise.
+ */
+bool CalenEditorDataHandler::isDescriptionEdited() const
+{
+ return (mOriginalEntry->description() != mEditedEntry->description());
+}
+
+/*!
+ Returns true if any of the non-text items (e.g. time fields) of the entry
+ have been edited, false otherwise.
+ \return true if any of the non text items edited,false otherwise.
+ */
+bool CalenEditorDataHandler::nonTextItemsEdited() const
+{
+ return (isAllDayEdited() ||
+ isStartDateTimeEdited() ||
+ isEndDateTimeEdited() ||
+ isAlarmEdited() ||
+ isRepeatRuleEdited());
+}
+
+/*!
+ Returns true if summary && location && description text items are all empty,
+ false otherwise.
+ \return true if text items are all empty,false otherwise.
+ */
+bool CalenEditorDataHandler::areTextItemsEmpty() const
+{
+ return (mEditedEntry->summary().isEmpty()
+ && mEditedEntry->location().isEmpty()
+ && mEditedEntry->description().isEmpty());
+}
+
+/*!
+ Returns true if the user cleared the text in the location and summary items,
+ false otherwise.
+ \return true if summary & location items are cleared,false otherwise.
+ */
+bool CalenEditorDataHandler::areTextItemsCleared() const
+{
+ if (mEditedEntry->summary().isEmpty() &&
+ mEditedEntry->location().isEmpty() &&
+ mEditedEntry->description().isEmpty()) {
+ if (isSummaryEmptied()
+ || isLocationEmptied()
+ || isDescriptionEmptied()) {
+ return true;
+ }
+ }
+ return false;
+}
+
+/*!
+ Returns true the summary was not empty in original && is empty
+ in the edited note,false otherwise
+ \return true if summary is cleared in edited note,false otherwise
+ */
+bool CalenEditorDataHandler::isSummaryEmptied() const
+{
+ return (!mOriginalEntry->summary().isEmpty()
+ && mEditedEntry->summary().isEmpty());
+}
+
+/*!
+ Returns true the location was not empty in original && is empty
+ in the edited note,false otherwise
+ \return true if location is cleared in edited note,false otherwise
+ */
+bool CalenEditorDataHandler::isLocationEmptied() const
+{
+ return (!mOriginalEntry->location().isEmpty()
+ && mEditedEntry->location().isEmpty());
+}
+
+/*!
+ Returns true the description was not empty in original && is empty
+ in the edited note,false otherwise
+ \return true if description is cleared in edited note,false otherwise
+ */
+bool CalenEditorDataHandler::isDescriptionEmptied() const
+{
+ return (!mOriginalEntry->description().isEmpty()
+ && mEditedEntry->description().isEmpty());
+}
+
+/*!
+ Works out whether the entry should be deleted, saved,
+ or whether no action should be taken.
+ \return enum Action
+ */
+CalenEditorPrivate::Action CalenEditorDataHandler::shouldSaveOrDeleteOrDoNothing(bool launchCalendar)
+ const
+{
+ // Need to save the entry if third party calls editor to launch the
+ // calendar after that. So, that entry will be new entry adn we assume
+ // that client launches editor with some prefilled text items
+ if (!isEdited() && !launchCalendar) {
+ // Not edited at all OR
+ // Only added space characters to text fields but not
+ // edited the non-text items
+ // no need to save the entry
+ return CalenEditorPrivate::ActionNothing;
+ }
+ // new entry is edited
+ if (mCalenEditor->isNewEntry()) {
+ // Subject && Location && Description are text items.
+ // If text items as a whole is not empty, we can save the note
+ // If text items as a whole is empty, we can still save the note
+ // since we edited "non-text" fields
+ if (!nonTextItemsEdited() && areTextItemsEmpty()) {
+ return CalenEditorPrivate::ActionNothing;
+ } else {
+ return CalenEditorPrivate::ActionSave;
+ }
+ }
+ if (areTextItemsCleared() && !nonTextItemsEdited()) {
+ // ***** edited entry + text items emptied + non-text items not edited
+ // Even if user may have edited non-text fields,
+ // delete the note
+ return CalenEditorPrivate::ActionDelete;
+ }
+ // Save the note, since the text fields contain something
+ return CalenEditorPrivate::ActionSave;
+}
+
+/*!
+ Returns true if the duration of instances of the meeting is greater than
+ the repeat period of the series, false otherwise.
+ \return true if duration of meeting is greater than repeat period, false
+ otherwise
+ */
+bool CalenEditorDataHandler::durationGreaterThanRepeatIntervalError() const
+{
+ bool isError = false;
+ switch (mEditedEntry->repeatRule().type()) {
+ case AgendaRepeatRule::DailyRule: {
+ int durationDays =
+ mEditedEntry->startTime().daysTo(mEditedEntry->endTime());
+ isError = durationDays >= 1;
+ }
+ break;
+ case AgendaRepeatRule::WeeklyRule: {
+ int durationDays =
+ mEditedEntry->startTime().daysTo(mEditedEntry->endTime());
+ if (mEditedEntry->repeatRule().interval() == 1) {
+ isError = durationDays >= 7;
+ } else {
+ isError = durationDays >= 14;
+ }
+ }
+ break;
+ case AgendaRepeatRule::MonthlyRule: {
+ if (mEditedEntry->endTime()
+ >= (mEditedEntry->startTime().addMonths(1))) {
+ isError = true;
+ }
+ }
+ break;
+ case AgendaRepeatRule::YearlyRule: {
+ if (mEditedEntry->endTime()
+ >= (mEditedEntry->startTime().addYears(1))) {
+ isError = true;
+ }
+ }
+ break;
+ default:
+ // Not repeating, no error
+ isError = false;
+ break;
+ }
+ return isError;
+}
+
+/*!
+ Check the alarm fields for errors.
+ \return the error if found, or CalenEditorErrorNone if no error found.
+ */
+CalenEditorPrivate::Error CalenEditorDataHandler::checkAlarmFieldsForErrors(
+ bool series) const
+{
+ CalenEditorPrivate::Error error = CalenEditorPrivate::CalenEditorErrorNone;
+ // If alarm not active, no check
+ if (!mEditedEntry->alarm().isNull()) {
+ int alarm = mEditedEntry->alarm().timeOffset();
+ QDateTime startTime = mEditedEntry->startTime();
+ QDateTime alarmTime;
+ if (alarm > 0) {
+ alarmTime = startTime.addSecs(-alarm * 60);
+ } else {
+ alarmTime = startTime.addSecs(alarm * 60);
+ }
+ QDateTime currentTime = CalenDateUtils::now();
+ if (isAlarmInAcceptablePeriod(error, alarmTime, startTime)) {
+ if (!series && (alarmTime < currentTime)) {
+ // dont let non-repeating future entries have alarms in past
+ error = CalenEditorPrivate::CalenEditorErrorAlarmTimePast;
+ }
+ }
+ }
+ return error;
+}
+
+/*!
+ Checks if AlarmTime is 31 days from StartTime,
+ then sets Error to CalenEditorErrorAlarmDateTooManyDaysBeforeNote and
+ returns false
+ Checks if AlarmTime is later StartTime,
+ then sets Error to CalenEditorErrorAlarmTimeLaterThanNote and returns false
+ \return true if error untouched, false otherwise
+ */
+bool CalenEditorDataHandler::isAlarmInAcceptablePeriod(CalenEditorPrivate::Error &error,
+ const QDateTime &alarmTime,
+ const QDateTime &startTime) const
+{
+ QDateTime upperLimit = startTime;
+
+ QDateTime lowerLimit = startTime.addDays(-31);
+ bool acceptable = true;
+ if (alarmTime < lowerLimit) {
+ acceptable = false;
+ error = CalenEditorPrivate::CalenEditorErrorAlarmDateTooManyDaysBeforeNote;
+ } else {
+ if (alarmTime > upperLimit) {
+ acceptable = false;
+ error = CalenEditorPrivate::CalenEditorErrorAlarmTimeLaterThanNote;
+ }
+ }
+ return acceptable;
+}
+
+/*!
+ Display the given error msg
+ \param error Error value for which message has to be displayed
+ */
+void CalenEditorDataHandler::displayErrorMsg(int error)
+{
+ QString errorMsg = QString::Null();
+
+ switch (error) {
+ case CalenEditorPrivate::CalenEditorErrorAlarmTimeLaterThanNote:
+ errorMsg.append( hbTrId(
+ "txt_calendar_dpopinfo_alarm_later_than_note"));
+ break;
+ case CalenEditorPrivate::CalenEditorErrorAlarmTimePast:
+ errorMsg.append( hbTrId(
+ "txt_calendar_dpopinfo_the_time_for_the_note_alarm"));
+ break;
+ case CalenEditorPrivate::CalenEditorErrorAlarmDateTooManyDaysBeforeNote:
+ errorMsg.append( hbTrId(
+ "txt_calendar_dpopinfo_alarm_date_is_too_past"));
+ break;
+ case CalenEditorPrivate::CalenEditorErrorRepeatUntilEarlierThanNote:
+ errorMsg.append( hbTrId(
+ "txt_calendar_dpopinfo_repeat_until_has_to_be_later"));
+ break;
+ case
+ CalenEditorPrivate::CalenEditorErrorDurationGreaterThanRepeatInterval:
+ dispalyErrorMsgByRepeatType();
+ break;
+ case CalenEditorPrivate::CalenEditorErrorStopTimeEarlierThanStartTime:
+ errorMsg.append( hbTrId(
+ "txt_calendar_dpopinfo_note_ends_before_than_starts"));
+ break;
+ default:
+ break;
+ }
+ if (!errorMsg.isNull()) {
+ HbMessageBox::information(errorMsg);
+ }
+}
+
+/*!
+ Displays error message related to repeat fields
+ */
+void CalenEditorDataHandler::dispalyErrorMsgByRepeatType()
+{
+ QString errorMsg = QString::Null();
+
+ int durationDays =
+ mEditedEntry->startTime().daysTo(mEditedEntry->endTime());
+ int numDaysEntrySpan = durationDays + 1;
+ // Add the text proper text ids
+ switch (mEditedEntry->repeatRule().type()) {
+ case AgendaRepeatRule::DailyRule:
+ errorMsg.append( hbTrId(
+ "txt_calendar_dpopinfo_l1_day_meeting_cant_daily"));
+ break;
+ case AgendaRepeatRule::WeeklyRule:
+ if (mEditedEntry->repeatRule().interval() == 1) {
+ errorMsg.append( hbTrId(
+ "txt_calendar_dpopinfo_l1_day_meeting_cant_weekly"));
+ } else {
+ errorMsg.append("meeting duration is more than 2 weeks");
+ }
+ break;
+ case AgendaRepeatRule::MonthlyRule:
+ errorMsg.append( hbTrId(
+ "txt_calendar_dpopinfo_l1_day_meeting_cant_monthly"));
+ break;
+ case AgendaRepeatRule::YearlyRule:
+ errorMsg.append( hbTrId(
+ "txt_calendar_dpopinfo_l1_day_meeting_cant_yearly"));
+ break;
+ default:
+ break;
+ }
+ if (!errorMsg.isNull()) {
+ HbMessageBox::information(errorMsg.arg(numDaysEntrySpan));
+ }
+}
+
+// End of file --Don't remove this.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/caleneditor/src/caleneditorreminderfield.cpp Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,174 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Definition of CalenEditorReminderField class.
+*
+*/
+
+
+// System Includes
+#include <hbdataformmodelitem.h>
+#include <hbdataformmodel.h>
+#include <hbdataform.h>
+
+// User Includes
+#include "caleneditorreminderfield.h"
+
+/*!
+ \class CalenEditorReminderField
+ */
+/*!
+ Constructor.
+
+ \param parent QObject pointer
+ */
+
+CalenEditorReminderField::CalenEditorReminderField(
+ CalenEditorPrivate* calenEditor,
+ HbDataForm* form,
+ HbDataFormModel* model,
+ QObject *parent)
+ :QObject(parent),
+ mCalenEditor(calenEditor),
+ mEditorForm(form),
+ mCalenEditorModel(model)
+{
+ mReminderItem = new HbDataFormModelItem();
+ mReminderItem->setType(HbDataFormModelItem::ComboBoxItem);
+ mReminderItem->setData(HbDataFormModelItem::LabelRole,
+ hbTrId("txt_calendar_setlabel_alarm"));
+ // Create the remaindar choices
+ QStringList remaindarChoices;
+ remaindarChoices << hbTrId("txt_calendar_setlabel_alarm_val_off")
+ << hbTrId("txt_calendar_setlabel_alarm_val_before_ln_minutes", 5)
+ << hbTrId("txt_calendar_setlabel_alarm_val_before_ln_minutes", 10)
+ << hbTrId("txt_calendar_setlabel_alarm_val_before_ln_minutes", 15)
+ << hbTrId("txt_calendar_setlabel_alarm_val_before_ln_minutes", 30)
+ << hbTrId("txt_calendar_setlabel_alarm_val_before_ln_hours", 1)
+ << hbTrId("txt_calendar_setlabel_alarm_val_before_ln_hours", 2);
+
+ mReminderItem->setContentWidgetData(QString("items"), remaindarChoices);
+
+ // Build the hash map for the reminder.
+ mReminderHash[0] = 0; // OFF.
+ mReminderHash[1] = 5;
+ mReminderHash[2] = 10;
+ mReminderHash[3] = 15;
+ mReminderHash[4] = 30;
+ mReminderHash[5] = 60;
+ mReminderHash[6] = 120;
+
+ // Add it to the model
+ mCalenEditorModel->appendDataFormItem( mReminderItem,
+ mCalenEditorModel->invisibleRootItem());
+}
+
+/*!
+ Destructor
+ */
+CalenEditorReminderField::~CalenEditorReminderField()
+{
+ // Nothing Yet
+}
+
+/*!
+ Adds reminder item to the model
+ */
+void CalenEditorReminderField::addItemToModel()
+{
+ // Add reminder to the model
+ mCalenEditorModel->appendDataFormItem( mReminderItem,
+ mCalenEditorModel->invisibleRootItem());
+}
+
+/*!
+ Removes reminder item frm the model
+ */
+void CalenEditorReminderField::removeItemFromModel()
+{
+ mCalenEditorModel->removeItem(modelIndex());
+}
+
+/*!
+ Populates reminder item with available choices to the user
+ \param newEntry bool value to indicate if its a new entry
+ */
+void CalenEditorReminderField::populateReminderItem(bool newEntry)
+{
+ // Set the default reminder value to 15 minutes
+ if (newEntry) {
+ mReminderItem->setContentWidgetData("currentIndex", 3);
+ // Save the reminder alarm for the entry
+ AgendaAlarm reminder;
+ reminder.setTimeOffset(mReminderHash.value(3));
+ reminder.setAlarmSoundName(QString(" "));
+ // Set the reminder to the entry as well as original entry.
+ mCalenEditor->editedEntry()->setAlarm(reminder);
+ mCalenEditor->originalEntry()->setAlarm(reminder);
+ } else {
+ if (mCalenEditor->editedEntry()->alarm().isNull()) {
+ // Alarm is set off
+ mReminderItem->setContentWidgetData("currentIndex", 0);
+ } else {
+ // Get the reminder offset value.
+ int reminderOffset = mCalenEditor->editedEntry()->alarm().timeOffset();
+ // Get the index value for the reminder combo box from the hash
+ // table.
+ int index = mReminderHash.key(reminderOffset);
+ mReminderItem->setContentWidgetData("currentIndex", index);
+ }
+ }
+ mEditorForm->addConnection(mReminderItem,
+ SIGNAL(currentIndexChanged(int)), this,
+ SLOT(handleReminderIndexChanged(int)));
+
+}
+
+/*!
+ Triggerd from tapping on reminder item.
+ Handles the reminder time change and updates the same in the event.
+ \param index The new index chosen in the reminder list.
+ */
+void CalenEditorReminderField::handleReminderIndexChanged(int index)
+{
+ AgendaAlarm reminder;
+ if (!mCalenEditor->editedEntry()->alarm().isNull()) {
+ reminder = mCalenEditor->editedEntry()->alarm();
+ }
+ // If value for the index in hash table is 0 i.e reminder is "OFF",
+ // then dont do anything only set the default constructed reminder to
+ // the entry which is Null.
+ if (mReminderHash.value(index)) {
+ // If not zero then set the reminder offset
+ // value to the entry.
+ reminder.setTimeOffset(mReminderHash.value(index));
+ reminder.setAlarmSoundName(QString(" "));
+ } else {
+ // Construct the default alarm which is NULL
+ reminder = AgendaAlarm();
+ }
+ // Set the reminder to the entry.
+ mCalenEditor->editedEntry()->setAlarm(reminder);
+ mCalenEditor->addDiscardAction();
+}
+
+/*!
+ Returns the mode index of the reminder item
+ \return Mode index of the reminder item
+ */
+QModelIndex CalenEditorReminderField::modelIndex()
+{
+ return mCalenEditorModel->indexFromItem(mReminderItem);
+}
+// End of file --Don't remove this.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/caleneditor/src/caleneditorrepeatfield.cpp Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,612 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Definition of CalenEditorRepeatField class.
+*
+*/
+
+
+// System Includes
+#include <hbdataformmodelitem.h>
+#include <hbdataformviewitem.h>
+#include <hbdataformmodel.h>
+#include <hbdataform.h>
+#include <hbcombobox.h>
+#include <hblabel.h>
+#include <hbdatetimepicker.h>
+#include <hbaction.h>
+#include <agendautil.h>
+
+// User Included
+#include "caleneditorrepeatfield.h"
+#include "caleneditorcustomitem.h"
+
+/*!
+ \class CalenEditorRepeatField
+ */
+/*!
+ Constructor.
+
+ \param parent QObject pointer
+ */
+
+CalenEditorRepeatField::CalenEditorRepeatField(CalenEditorPrivate* calenEditor,
+ HbDataForm* form,
+ HbDataFormModel* model,
+ QObject *parent)
+ :QObject(parent),
+ mCalenEditor(calenEditor),
+ mEditorForm(form),
+ mCalenEditorModel(model),
+ mRepeatItem(NULL),
+ mRepeatComboBox(NULL),
+ mCustomRepeatUntilItem(NULL),
+ mIsBiWeekly(false),
+ mIsWorkdays(false),
+ mRepeatUntilItemAdded(false)
+{
+ if (!mCalenEditor->editedEntry()->repeatRule().isNull()) {
+ mRepeatRuleType = mCalenEditor->editedEntry()->repeatRule().type();
+ mRepeatUntilDate = mCalenEditor->editedEntry()->repeatRule().until().date();
+ }
+
+ mRepeatItem = new HbDataFormModelItem();
+ mRepeatItem->setType(HbDataFormModelItem::ComboBoxItem);
+ mRepeatItem->setData(HbDataFormModelItem::LabelRole,
+ hbTrId("txt_calendar_setlabel_repeat"));
+
+ // Create the repeat choices
+ QStringList repeatChoices;
+ repeatChoices << hbTrId("txt_calendar_setlabel_repeat_val_only_once")
+ << hbTrId("txt_calendar_setlabel_repeat_val_daily")
+ // TODO : add text ID for workdays
+ << hbTrId("Workdays")
+ << hbTrId("txt_calendar_setlabel_repeat_val_weekly")
+ << hbTrId("txt_calendar_setlabel_repeat_val_fortnightly")
+ << hbTrId("txt_calendar_setlabel_repeat_val_monthly")
+ << hbTrId("txt_calendar_setlabel_repeat_val_yearly");
+
+ mRepeatItem->setContentWidgetData(QString("items"), repeatChoices);
+ mCalenEditorModel->appendDataFormItem( mRepeatItem,
+ mCalenEditorModel->invisibleRootItem());
+}
+
+/*!
+ Destructor
+ */
+CalenEditorRepeatField::~CalenEditorRepeatField()
+{
+ // Nothing Yet
+}
+
+/*!
+ Adds repeat item to the model
+ */
+void CalenEditorRepeatField::addItemToModel()
+{
+ // Add reminder to the model
+ mCalenEditorModel->appendDataFormItem( mRepeatItem,
+ mCalenEditorModel->invisibleRootItem());
+}
+
+/*!
+ Removes the repeat item from the model
+ */
+void CalenEditorRepeatField::removeItemFromModel()
+{
+ mCalenEditorModel->removeItem(modelIndex());
+}
+
+/*!
+ Populates repeat item with the options available
+ \param index index at which repeat item needs to be added
+ */
+void CalenEditorRepeatField::populateRepeatItem(int index)
+{
+ HbDataFormViewItem
+ *item =
+ qobject_cast<HbDataFormViewItem *> (
+ mEditorForm->itemByIndex(
+ mCalenEditorModel->index( index, 0)));
+ mRepeatComboBox
+ = qobject_cast<HbComboBox *> (item->dataItemContentWidget());
+
+ // Set the user roles for the combobox items so that we depend on these
+ // roles to identify the correct repeat type when repeat choices are
+ // dynamically removed or added
+ mRepeatComboBox->setItemData(RepeatOnce, RepeatOnce, Qt::UserRole+100);
+ mRepeatComboBox->setItemData(RepeatDaily, RepeatDaily, Qt::UserRole+100);
+ mRepeatComboBox->setItemData(RepeatWorkdays,
+ RepeatWorkdays, Qt::UserRole+100);
+ mRepeatComboBox->setItemData(RepeatWeekly, RepeatWeekly, Qt::UserRole+100);
+ mRepeatComboBox->setItemData(RepeatBiWeekly,
+ RepeatBiWeekly, Qt::UserRole+100);
+ mRepeatComboBox->setItemData(RepeatMonthly,
+ RepeatMonthly, Qt::UserRole+100);
+ mRepeatComboBox->setItemData(RepeatYearly, RepeatYearly, Qt::UserRole+100);
+
+ if (mCalenEditor->editedEntry()->isRepeating()) {
+ switch (mCalenEditor->editedEntry()->repeatRule().type()) {
+ case AgendaRepeatRule::DailyRule: {
+ mRepeatComboBox->setCurrentIndex(1);
+ }
+ break;
+ case AgendaRepeatRule::WeeklyRule: {
+ bool isWorkdays = AgendaUtil::isWorkdaysRepeatingEntry(
+ mCalenEditor->editedEntry()->repeatRule());
+ if (isWorkdays) {
+ mRepeatComboBox->setCurrentIndex(2);
+ mIsWorkdays = true;
+ } else {
+ if (mCalenEditor->editedEntry()->repeatRule().interval() == 1) {
+ mRepeatComboBox->setCurrentIndex(3);
+ } else {
+ mRepeatComboBox->setCurrentIndex(4);
+ mIsBiWeekly = true;
+ }
+ }
+ }
+ break;
+ case AgendaRepeatRule::MonthlyRule: {
+ mRepeatComboBox->setCurrentIndex(5);
+ }
+ break;
+ case AgendaRepeatRule::YearlyRule: {
+ mRepeatComboBox->setCurrentIndex(6);
+ }
+ break;
+ default:
+ break;
+ }
+ // If entry is repeating type then insert the repeatuntil item.
+ insertRepeatUntilItem();
+ } else {
+ mRepeatComboBox->setCurrentIndex(0);
+ // Set the Original entry value also.
+ mCalenEditor->originalEntry()->setRepeatRule(
+ AgendaRepeatRule(
+ AgendaRepeatRule::InvalidRule));
+ }
+ connect(mRepeatComboBox, SIGNAL(currentIndexChanged(int)), this,
+ SLOT(handleRepeatIndexChanged(int)));
+
+ // Update the repeat choices depending upon the duration
+ updateRepeatChoices();
+}
+
+/*!
+ Triggerd from tapping on reminder item.
+ Handles the reminder time change and updates the same in the event.
+ \param index The new index chosen in the reminder list.
+ */
+void CalenEditorRepeatField::handleRepeatIndexChanged(int index)
+{
+ mIsBiWeekly = false;
+ mIsWorkdays = false;
+
+ HbExtendedLocale locale = HbExtendedLocale::system();
+ // Get the user role w ehave set for this index
+ QVariant userRole = mRepeatComboBox->itemData(index, Qt::UserRole + 100);
+ int value = userRole.toInt();
+ switch (value) {
+ case 1: {
+ if (!mRepeatUntilItemAdded) {
+ insertRepeatUntilItem();
+ }
+ if (mCustomRepeatUntilItem) {
+ mRepeatUntilDate = mCalenEditor->editedEntry()->startTime().date().addYears(1);
+ mCustomRepeatUntilItem->setContentWidgetData( "text",
+ locale.format( mRepeatUntilDate,
+ r_qtn_date_usual_with_zero));
+ }
+ mRepeatRuleType = AgendaRepeatRule::DailyRule;
+ }
+ break;
+ case 2: {
+ if (!mRepeatUntilItemAdded) {
+ insertRepeatUntilItem();
+ }
+ if (mCustomRepeatUntilItem) {
+ mRepeatUntilDate = mCalenEditor->editedEntry()->startTime().date().addYears(1);
+ mCustomRepeatUntilItem->setContentWidgetData( "text",
+ locale.format( mRepeatUntilDate,
+ r_qtn_date_usual_with_zero));
+ }
+ mRepeatRuleType = AgendaRepeatRule::WeeklyRule;
+ mIsWorkdays = true;
+ }
+ break;
+ case 3: {
+ if (!mRepeatUntilItemAdded) {
+ insertRepeatUntilItem();
+ }
+ if (mCustomRepeatUntilItem) {
+ mRepeatUntilDate = mCalenEditor->editedEntry()->startTime().date().addYears(1);
+ mCustomRepeatUntilItem->setContentWidgetData( "text",
+ locale.format( mRepeatUntilDate,
+ r_qtn_date_usual_with_zero));
+
+ }
+ mRepeatRuleType = AgendaRepeatRule::WeeklyRule;
+ }
+ break;
+ case 4: {
+ if (!mRepeatUntilItemAdded) {
+ insertRepeatUntilItem();
+ }
+ if (mCustomRepeatUntilItem) {
+ mRepeatUntilDate = mCalenEditor->editedEntry()->startTime().date().addYears(1);
+ mCustomRepeatUntilItem->setContentWidgetData( "text",
+ locale.format( mRepeatUntilDate,
+ r_qtn_date_usual_with_zero));
+ }
+ mRepeatRuleType = AgendaRepeatRule::WeeklyRule;
+ mIsBiWeekly = true;
+ }
+ break;
+ case 5: {
+ if (!mRepeatUntilItemAdded) {
+ insertRepeatUntilItem();
+ }
+ if (mCustomRepeatUntilItem) {
+ mRepeatUntilDate = mCalenEditor->editedEntry()->startTime().date().addYears(5);
+ mCustomRepeatUntilItem->setContentWidgetData( "text",
+ locale.format( mRepeatUntilDate,
+ r_qtn_date_usual_with_zero));
+ }
+ mRepeatRuleType = AgendaRepeatRule::MonthlyRule;
+ }
+ break;
+ case 6: {
+ if (!mRepeatUntilItemAdded) {
+ insertRepeatUntilItem();
+ }
+ if (mCustomRepeatUntilItem) {
+ mRepeatUntilDate = mCalenEditor->editedEntry()->startTime().date().addYears(10);
+ mCustomRepeatUntilItem->setContentWidgetData( "text",
+ locale.format( mRepeatUntilDate,
+ r_qtn_date_usual_with_zero));
+ }
+ mRepeatRuleType = AgendaRepeatRule::YearlyRule;
+ }
+ break;
+ default: {
+ mRepeatRuleType = AgendaRepeatRule::InvalidRule;
+ if (mRepeatUntilItemAdded) {
+ QModelIndex repeatIndex =
+ mCalenEditorModel->indexFromItem(mRepeatItem);
+ mCalenEditorModel->removeItem(
+ mCalenEditorModel->index(
+ repeatIndex.row()+ 1, 0));
+ mRepeatUntilItemAdded = false;
+ mCustomRepeatUntilItem = NULL;
+ }
+ }
+ break;
+ }
+ mCalenEditor->addDiscardAction();
+}
+
+/*!
+ Returns model index of the repeat item
+ \return Model index of the repeat item
+ */
+QModelIndex CalenEditorRepeatField::modelIndex()
+{
+ return mCalenEditorModel->indexFromItem(mRepeatItem);
+}
+
+/*!
+ Inserts the repeat until item to the dataform model
+ */
+void CalenEditorRepeatField::insertRepeatUntilItem()
+{
+ HbDataFormModelItem::DataItemType itemType =
+ static_cast<HbDataFormModelItem::DataItemType> (RepeatUntilOffset);
+
+ QModelIndex repeatIndex = mCalenEditorModel->indexFromItem(mRepeatItem);
+ mCustomRepeatUntilItem = mCalenEditorModel->insertDataFormItem(
+ CalenEditorPrivate::RepeatUntilItem,
+ itemType,
+ QString(
+ hbTrId(
+ "txt_calendar_setlabel_repeat_until")),
+ mCalenEditorModel->invisibleRootItem());
+ mRepeatUntilItemAdded = true;
+
+ mEditorForm->addConnection(mCustomRepeatUntilItem, SIGNAL(clicked()),
+ this, SLOT(launchRepeatUntilDatePicker()));
+ if (!mCalenEditor->isNewEntry() && mRepeatRuleType != AgendaRepeatRule::InvalidRule) {
+ HbExtendedLocale locale = HbExtendedLocale::system();
+ QString dateString = locale.format(
+ mCalenEditor->editedEntry()->repeatRule().until().date(),
+ r_qtn_date_usual_with_zero);
+ mCustomRepeatUntilItem->setContentWidgetData("text", dateString);
+ }
+ //TODO: Scroll to functionality has to be implemented
+}
+
+/*!
+ Informs if repeat until item has been added or not
+ \return true if repeat until item is added else false
+ */
+bool CalenEditorRepeatField::isRepeatUntilItemAdded()
+{
+ return mRepeatUntilItemAdded;
+}
+
+/*!
+ Launches the date picker by tapping on the repaet until pushbutton
+ */
+void CalenEditorRepeatField::launchRepeatUntilDatePicker()
+{
+ if (mDatePicker) {
+ mDatePicker = NULL;
+ }
+ if (mRepeatRuleType == AgendaRepeatRule::DailyRule) {
+ QDate minDate = mCalenEditor->editedEntry()->endTime().date().addDays(1);
+ mDatePicker = new HbDateTimePicker(mRepeatUntilDate);
+ mDatePicker->setMinimumDate(minDate);
+ mDatePicker->setMaximumDate(QDate(31, 12, 2100));
+ mDatePicker->setDate(mRepeatUntilDate);
+ } else if (mRepeatRuleType == AgendaRepeatRule::WeeklyRule) {
+ QDate minDate;
+ if (!mIsBiWeekly || mIsWorkdays) {
+ minDate = mCalenEditor->editedEntry()->endTime().date().addDays(7);
+ } else {
+ minDate = mCalenEditor->editedEntry()->endTime().date().addDays(14);
+ }
+ mDatePicker = new HbDateTimePicker(mRepeatUntilDate);
+ mDatePicker->setMinimumDate(minDate);
+ mDatePicker->setMaximumDate(QDate(31, 12, 2100));
+ mDatePicker->setDate(mRepeatUntilDate);
+ } else if (mRepeatRuleType == AgendaRepeatRule::MonthlyRule) {
+ QDate minDate = mCalenEditor->editedEntry()->endTime().date().addMonths(1);
+ mDatePicker = new HbDateTimePicker(mRepeatUntilDate);
+ mDatePicker->setMinimumDate(minDate);
+ mDatePicker->setMaximumDate(QDate(31, 12, 2100));
+ mDatePicker->setDate(mRepeatUntilDate);
+ } else if (mRepeatRuleType == AgendaRepeatRule::YearlyRule) {
+ QDate minDate = mCalenEditor->editedEntry()->endTime().date().addYears(1);
+ mDatePicker = new HbDateTimePicker(mRepeatUntilDate);
+ mDatePicker->setMinimumDate(minDate);
+ mDatePicker->setMaximumDate(QDate(31, 12, 2100));
+ mDatePicker->setDate(mRepeatUntilDate);
+ }
+ HbDialog popUp;
+ popUp.setDismissPolicy(HbDialog::NoDismiss);
+ popUp.setTimeout(HbDialog::NoTimeout);
+ popUp.setContentWidget(mDatePicker);
+ popUp.setHeadingWidget( new HbLabel(
+ hbTrId("txt_calendar_title_repeat_until")));
+ HbAction *okAction = new HbAction(hbTrId("txt_common_button_ok"));
+ popUp.setPrimaryAction(okAction);
+ connect(okAction, SIGNAL(triggered()), this, SLOT(setRepeatUntilDate()));
+ connect(okAction, SIGNAL(triggered()), &popUp, SLOT(close()));
+ popUp.setSecondaryAction(new HbAction(hbTrId("txt_common_button_cancel"),
+ &popUp));
+ popUp.exec();
+}
+
+/*!
+ Sets the repeat until date on the repeat until item
+ */
+void CalenEditorRepeatField::setRepeatUntilDate()
+{
+ mRepeatUntilDate = mDatePicker->date();
+ if (mRepeatUntilDate.isValid()) {
+ HbExtendedLocale locale = HbExtendedLocale::system();
+ QString dateString = locale.format(mRepeatUntilDate,
+ r_qtn_date_usual_with_zero);
+ mCustomRepeatUntilItem->setContentWidgetData("text", dateString);
+ }
+}
+
+/*!
+ Updates the repeat choices depending on the meeting duration
+*/
+void CalenEditorRepeatField::updateRepeatChoices()
+{
+ // Clear all the choices and add it again. If we dont do it
+ // as user would have changed the end times many times and we would have
+ // deleted repeat options depending upon that
+ // Get the current choice
+ int choice = mRepeatComboBox->currentIndex();
+ int previousCount = mRepeatComboBox->count();
+ mRepeatComboBox->clear();
+ QStringList repeatChoices;
+ repeatChoices << hbTrId("txt_calendar_setlabel_repeat_val_only_once")
+ << hbTrId("txt_calendar_setlabel_repeat_val_daily")
+ // TODO : add text ID for workdays
+ << hbTrId("Workdays")
+ << hbTrId("txt_calendar_setlabel_repeat_val_weekly")
+ << hbTrId("txt_calendar_setlabel_repeat_val_fortnightly")
+ << hbTrId("txt_calendar_setlabel_repeat_val_monthly")
+ << hbTrId("txt_calendar_setlabel_repeat_val_yearly");
+ mRepeatComboBox->addItems(repeatChoices);
+ // Set the user roles for the combobox items so that we depend on these
+ // roles to identify the correct repeat type when repeat choices are
+ // dynamically removed or added
+ mRepeatComboBox->setItemData(RepeatOnce, RepeatOnce, Qt::UserRole + 100);
+ mRepeatComboBox->setItemData(RepeatDaily, RepeatDaily,
+ Qt::UserRole + 100);
+ mRepeatComboBox->setItemData(RepeatWorkdays,
+ RepeatWorkdays, Qt::UserRole+100);
+ mRepeatComboBox->setItemData(RepeatWeekly, RepeatWeekly,
+ Qt::UserRole + 100);
+ mRepeatComboBox->setItemData(RepeatBiWeekly, RepeatBiWeekly,
+ Qt::UserRole + 100);
+ mRepeatComboBox->setItemData(RepeatMonthly, RepeatMonthly,
+ Qt::UserRole + 100);
+ mRepeatComboBox->setItemData(RepeatYearly, RepeatYearly,
+ Qt::UserRole + 100);
+
+ int totalCount = mRepeatComboBox->count();
+
+ if (previousCount < totalCount && choice > 0) {
+ choice += (totalCount - previousCount);
+ }
+ // Now check if the duration of the meeting and remove the repeat choices
+ // if necessary
+ int duration =
+ mCalenEditor->editedEntry()->startTime().daysTo(
+ mCalenEditor->editedEntry()->endTime());
+
+ bool isRemovedItem = false;
+ int numberOfItemRemoved = 0;
+
+ if (mCalenEditor->editedEntry()->endTime() >= (mCalenEditor->editedEntry()->startTime().addYears(1))) {
+
+ isRemovedItem = true;
+ numberOfItemRemoved = 6;
+ // Remove all options except "RepeatOnce"
+ // Should be deletd in the descending order only
+ mRepeatComboBox->removeItem(RepeatYearly);
+ mRepeatComboBox->removeItem(RepeatMonthly);
+ mRepeatComboBox->removeItem(RepeatBiWeekly);
+ mRepeatComboBox->removeItem(RepeatWeekly);
+ mRepeatComboBox->removeItem(RepeatWorkdays);
+ mRepeatComboBox->removeItem(RepeatDaily);
+ } else if (mCalenEditor->editedEntry()->endTime()
+ >= (mCalenEditor->editedEntry()->startTime().addMonths(1))) {
+ isRemovedItem = true;
+ numberOfItemRemoved = 5;
+ // Remove all the options except "Repeat Once"
+ // and "Repeat Yearly" options
+ // Should be deletd in the descending order only
+ mRepeatComboBox->removeItem(RepeatMonthly);
+ mRepeatComboBox->removeItem(RepeatBiWeekly);
+ mRepeatComboBox->removeItem(RepeatWeekly);
+ mRepeatComboBox->removeItem(RepeatWorkdays);
+ mRepeatComboBox->removeItem(RepeatDaily);
+ } else if (duration >= 14) {
+ isRemovedItem = true;
+ numberOfItemRemoved = 4;
+ // Remove daily, workdays, weekly and biweekly options
+ // Should be deletd in the descending order only
+ mRepeatComboBox->removeItem(RepeatBiWeekly);
+ mRepeatComboBox->removeItem(RepeatWeekly);
+ mRepeatComboBox->removeItem(RepeatWorkdays);
+ mRepeatComboBox->removeItem(RepeatDaily);
+ } else if (duration >= 7) {
+ isRemovedItem = true;
+ numberOfItemRemoved = 3;
+ // Remove daily, workdays and weekly options
+ // Should be deletd in the descending order only
+ mRepeatComboBox->removeItem(RepeatWeekly);
+ mRepeatComboBox->removeItem(RepeatWorkdays);
+ mRepeatComboBox->removeItem(RepeatDaily);
+ } else if (duration >= 1) {
+ isRemovedItem = true;
+ numberOfItemRemoved = 2;
+ // Remove daily and workdays option
+ mRepeatComboBox->removeItem(RepeatWorkdays);
+ mRepeatComboBox->removeItem(RepeatDaily);
+ }
+
+ if (isRemovedItem && choice > 0) {
+ choice -= numberOfItemRemoved;
+ if (choice <= 0)
+ choice = 1;
+ }
+ int count = mRepeatComboBox->count();
+ if (choice >= count) {
+ choice = count - 1;
+ }
+ // Set the previous user's choice
+ mRepeatComboBox->setCurrentIndex(choice);
+ handleRepeatIndexChanged(choice);
+}
+
+/*!
+ Save RepeatRule to the edited entry
+ */
+void CalenEditorRepeatField::saveRepeatRule()
+{
+ // saves repeat type of entry.
+ if (mRepeatRuleType != AgendaRepeatRule::InvalidRule) {
+ AgendaRepeatRule repeatRule(mRepeatRuleType);
+
+ //TODO : Set the repeat from and to dates
+ QVariant dateVariant =
+ mCustomRepeatUntilItem->contentWidgetData("text");
+ QString dateString = dateVariant.toString();
+ QDate untilDate = QDate::fromString(dateString, "dd/MM/yyyy");
+ repeatRule.setRepeatRuleStart(mCalenEditor->editedEntry()->startTime());
+ repeatRule.setInterval(1);
+ QDateTime repeatUntil(mRepeatUntilDate,
+ QTime(mCalenEditor->editedEntry()->endTime().time()));
+ repeatRule.setUntil(repeatUntil);
+
+ // need to set the day for weekly & monthly repeat rule.
+ if (mRepeatRuleType == AgendaRepeatRule::WeeklyRule) {
+ if (mIsWorkdays) {
+ mIsWorkdays = false;
+ HbExtendedLocale locale = HbExtendedLocale::system();
+ // 0(Sun)0(sat)1(Fri)1(Thu)1(Wed)1(Tue)1(Mon)
+ QString workDaysString = locale.workDays();
+ bool ok;
+ int fixedNum = 1;
+ int ruleday = 0;
+ uint workDays = workDaysString.toUInt(&ok, 2);
+ if (ok) {
+ QList<AgendaRepeatRule::Day> weekDaysFromLocale;
+
+ // "workDays" is a bit mask of seven bits indicating
+ // (by being set) which days are workdays.
+ // The least significant bit corresponds to Monday,
+ // the next bit to Tuesday and so on.
+ for (TInt i = 0; i < KNoOfDaysInWeek; i++) {
+ ruleday = fixedNum << i;
+ if (workDays & ruleday) {
+ weekDaysFromLocale.append(
+ (AgendaRepeatRule::Day) i);
+ repeatRule.setByDay(weekDaysFromLocale);
+ }
+
+ }
+
+ } else {
+ mCalenEditor->editedEntry()->setRepeatRule(AgendaRepeatRule(
+ AgendaRepeatRule::InvalidRule));
+ }
+ } else {
+ QList<AgendaRepeatRule::Day> days;
+ if (mIsBiWeekly) {
+ repeatRule.setInterval(2);
+ mIsBiWeekly = false;
+ }
+ int dayOfWeek =
+ mCalenEditor->editedEntry()->startTime().date().dayOfWeek();
+ days.append(AgendaRepeatRule::Day(dayOfWeek - 1));
+ repeatRule.setByDay(days);
+ }
+ } else if (mRepeatRuleType == AgendaRepeatRule::MonthlyRule) {
+ QList<int> monthDays;
+ //TODO :
+ int dayNoInMonth = mCalenEditor->editedEntry()->startTime().date().day();
+ monthDays.append(dayNoInMonth);
+ repeatRule.setByMonthDay(monthDays);
+ } else if (mRepeatRuleType == AgendaRepeatRule::YearlyRule) {
+ //TODO : Add yearly rule.Check if required.
+ }
+ mCalenEditor->editedEntry()->setRepeatRule(repeatRule);
+ } else {
+ mCalenEditor->editedEntry()->setRepeatRule( AgendaRepeatRule(
+ AgendaRepeatRule::InvalidRule));
+ }
+ // TODO: Need to update rDates here
+}
+
+// End of file --Don't remove this.
--- a/calendarui/calenplugins/agendaeventviewerplugin/inc/agendaeventviewerplugin.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/calenplugins/agendaeventviewerplugin/inc/agendaeventviewerplugin.h Mon May 03 12:30:32 2010 +0300
@@ -20,7 +20,7 @@
// System includes
#include <QObject>
-#include <EventViewerPluginInterface>
+#include <eventviewerplugininterface.h>
#include "agendaeventviewer.h"
@@ -42,12 +42,12 @@
public:
- void viewEvent(const ulong id, Actions action, AgendaUtil *agendaUtil = 0);
+ void viewEvent(const ulong id, Actions action = ActionNothing, AgendaUtil *agendaUtil = 0);
void viewEvent(const QFile &fileHandle,
- Actions action, AgendaUtil
+ Actions action = ActionNothing, AgendaUtil
*agendaUtil = 0);
void viewEvent(AgendaEntry entry,
- Actions action,
+ Actions action = ActionNothing,
AgendaUtil *agendaUtil = 0);
private:
@@ -57,7 +57,7 @@
private slots:
- void handleViewingCompleted(bool status);
+ void handleViewingCompleted(const QDate date);
void handleEditingStarted();
void handleEditingCompleted();
void handleDeletingStarted();
--- a/calendarui/calenplugins/agendaeventviewerplugin/inc/eventviewerplugininterface.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/calenplugins/agendaeventviewerplugin/inc/eventviewerplugininterface.h Mon May 03 12:30:32 2010 +0300
@@ -21,6 +21,7 @@
// System includes
#include <QObject>
#include <QtPlugin>
+#include <QDate>
#include <qglobal.h>
// Forward declarations
@@ -38,6 +39,7 @@
public:
enum Actions {
+ ActionNothing,
ActionEdit = 0x01,
ActionDelete = 0x02,
ActionEditDelete = ActionEdit | ActionDelete,
@@ -49,17 +51,17 @@
public:
virtual void viewEvent(const ulong id,
- Actions action,
- AgendaUtil *agendaUtil) = 0;
+ Actions action = ActionNothing,
+ AgendaUtil *agendaUtil = 0) = 0;
virtual void viewEvent(const QFile &fileHandle,
- Actions action,
- AgendaUtil *agendaUtil) = 0;
+ Actions action = ActionNothing,
+ AgendaUtil *agendaUtil = 0) = 0;
virtual void viewEvent(AgendaEntry entry,
- Actions action,
- AgendaUtil *agendaUtil) = 0;
+ Actions action = ActionNothing,
+ AgendaUtil *agendaUtil = 0) = 0;
signals:
- void viewingCompleted();
+ void viewingCompleted(const QDate date = QDate());
void editingStarted();
void editingCompleted();
void deletingStarted();
--- a/calendarui/calenplugins/agendaeventviewerplugin/src/agendaeventviewerplugin.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/calenplugins/agendaeventviewerplugin/src/agendaeventviewerplugin.cpp Mon May 03 12:30:32 2010 +0300
@@ -27,9 +27,10 @@
*/
/*!
- \fn void AgendaEventViewerPlugin::viewingCompleted(bool status = true)
+ \fn void AgendaEventViewerPlugin::viewingCompleted(const QDate date = QDate())
Signal is emitted when viewing of the agenda entry is complete
+ Returns QDate for calendar application so it has proper context to set.
After receiving this signal use deleteLater() to detele this class object.
*/
@@ -150,8 +151,8 @@
}
if (mEventViewer) {
- connect(mEventViewer, SIGNAL(viewingCompleted(bool)), this,
- SLOT(handleViewingCompleted(bool)));
+ connect(mEventViewer, SIGNAL(viewingCompleted(const QDate)), this,
+ SLOT(handleViewingCompleted(const QDate)));
connect(mEventViewer, SIGNAL(editingStarted()), this,
SLOT(handleEditingStarted()));
connect(mEventViewer, SIGNAL(editingCompleted()), this,
@@ -182,7 +183,7 @@
return AgendaEventViewer::ActionSave;
}
- return AgendaEventViewer::ActionEditDelete;
+ return AgendaEventViewer::ActionNothing;
}
/*!
@@ -190,10 +191,9 @@
\param status true if viewing completed otherwise false.
*/
-void AgendaEventViewerPlugin::handleViewingCompleted(bool status)
+void AgendaEventViewerPlugin::handleViewingCompleted(const QDate date)
{
- Q_UNUSED(status)
- emit viewingCompleted();
+ emit viewingCompleted(date);
// Cleanup viewer.
if (mEventViewer) {
--- a/calendarui/cenrep/CalendarInternalCRKeys.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/cenrep/CalendarInternalCRKeys.h Mon May 03 12:30:32 2010 +0300
@@ -98,4 +98,10 @@
*/
const TUint32 KCalendarPluginAvailability = 0x0000000A;
+/**
+* Defines whether regional information must be shown in the Calendar or not
+* Default value: 1
+*/
+const TUint32 KShowRegionalInformation = 0x0000000B;
+
#endif // CALENDARINTERNALCRKEYS_H
Binary file calendarui/conf/calendarUI.confml has changed
Binary file calendarui/conf/calendarUI_101F874B.crml has changed
--- a/calendarui/controller/inc/calencontroller.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/controller/inc/calencontroller.h Mon May 03 12:30:32 2010 +0300
@@ -58,8 +58,7 @@
* The controller handles events from the rest of Calendar and delegates
* them to the appropriate place (i.e. the action ui classes).
*/
-class CALENCONTROLLER_EXPORT CCalenController : public CBase ,
- public MCalenServicesFactory
+class CALENCONTROLLER_EXPORT CCalenController : public MCalenServicesFactory
{
public: // Construction and destruction
--- a/calendarui/controller/inc/calenviewmanager.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/controller/inc/calenviewmanager.h Mon May 03 12:30:32 2010 +0300
@@ -22,6 +22,7 @@
// INCLUDES
#include <vwsdef.h>
+#include <QDate>
#include "calennotificationhandler.h" // MCalenNotificationHandler
#include "hb_calencommands.hrh"
@@ -84,11 +85,6 @@
*/
void constructAndActivateView(int view);
/**
- * Constructs the other views apart frm firstview and adds
- * them to main window
- */
- void constructOtherViews();
- /**
* Returns the first view
*/
int getFirstView();
@@ -136,10 +132,12 @@
* day
*/
void loadAlternateDayView();
+
+ public slots:
+ void constructOtherViews();
private slots:
-
- void handleViewingCompleted(bool status);
+ void handleViewingCompleted(const QDate date);
void handleEditingStarted();
void handleEditingCompleted();
void handleDeletingStarted();
--- a/calendarui/controller/src/calencontroller.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/controller/src/calencontroller.cpp Mon May 03 12:30:32 2010 +0300
@@ -112,9 +112,6 @@
RegisterForNotificationsL( iViewManager, notificationArray );
notificationArray.Reset();
notificationArray.Close();
- if (!isFromServiceFrmwrk) {
- iViewManager->constructOtherViews();
- }
TRACE_EXIT_POINT;
}
--- a/calendarui/controller/src/calendeleteui.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/controller/src/calendeleteui.cpp Mon May 03 12:30:32 2010 +0300
@@ -386,10 +386,8 @@
// Two pass delete:
// 1. pass
// To prevent destroying entries starting and ending midnight
- // subtract one microsecond and do delete on that range.
- QTime time = mDateTime.time();
- time.setHMS(time.hour(), time.minute(), time.second(), time.msec() - 1);
- mDateTime.setTime(time);
+ // subtract one second and do delete on that range.
+ mDateTime = mDateTime.addSecs(-1);
mDateTime = ( mDateTime > AgendaUtil::minTime()? mDateTime : AgendaUtil::minTime());
HandleDeleteMultipleEventsL( AgendaUtil::minTime(),
@@ -550,8 +548,14 @@
// Connect to the signal that gets generated when deletion is completed
connect(iController.agendaInterface(), SIGNAL(entriesDeleted(int)), this,
SLOT(doCompleted(int)));
+ AgendaUtil::FilterFlags filter =
+ AgendaUtil::FilterFlags(AgendaUtil::IncludeAnniversaries
+ | AgendaUtil::IncludeAppointments
+ | AgendaUtil::IncludeEvents
+ | AgendaUtil::IncludeReminders
+ | AgendaUtil::IncludeIncompletedTodos);
// 1: First pass, delete all entries.
- iController.agendaInterface()->deleteEntries(iStartTime, iEndTime);
+ iController.agendaInterface()->deleteEntries(iStartTime, iEndTime, filter);
TRACE_EXIT_POINT;
}
--- a/calendarui/controller/src/calenviewmanager.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/controller/src/calenviewmanager.cpp Mon May 03 12:30:32 2010 +0300
@@ -66,7 +66,13 @@
mFirstView = ECalenMonthView;
loadMonthView();
ActivateDefaultViewL(ECalenMonthView);
+ // Connect to the view ready signal so that we construct other view
+ // once this view is shown
+ connect(&mController.MainWindow(), SIGNAL(viewReady()),
+ this, SLOT(constructOtherViews()));
+
mController.MainWindow().addView(mCalenMonthView);
+ mController.MainWindow().setCurrentView(mCalenMonthView);
}
TRACE_EXIT_POINT;
@@ -211,6 +217,10 @@
// Setup the settings view
mSettingsView = new CalenSettingsView(mController.Services());
+
+ // disconnect the view ready signal as we dont need it anymore
+ disconnect(&mController.MainWindow(), SIGNAL(viewReady()),
+ this, SLOT(constructOtherViews()));
}
// ----------------------------------------------------------------------------
@@ -246,8 +256,8 @@
"show");
// Set the other day view as the current view
// and animate to provide illusion of swipe
+ mCalenDayViewAlt->doPopulation();
mController.MainWindow().setCurrentView(mCalenDayViewAlt, true, Hb::ViewSwitchUseNormalAnim);
- mCalenDayViewAlt->doPopulation();
} else {
HbEffect::add(mCalenDayViewAlt,
":/fxml/view_hide",
@@ -255,8 +265,8 @@
HbEffect::add(mCalenDayView,
":/fxml/view_show",
"show");
+ mCalenDayView->doPopulation();
mController.MainWindow().setCurrentView(mCalenDayView, true, Hb::ViewSwitchUseNormalAnim);
- mCalenDayView->doPopulation();
}
}
@@ -278,8 +288,8 @@
HbEffect::add(mCalenDayViewAlt,
":/fxml/view_hide",
"show");
+ mCalenDayViewAlt->doPopulation();
mController.MainWindow().setCurrentView(mCalenDayViewAlt, true, Hb::ViewSwitchUseBackAnim);
- mCalenDayViewAlt->doPopulation();
} else {
HbEffect::add(mCalenDayViewAlt,
":/fxml/view_show",
@@ -287,8 +297,8 @@
HbEffect::add(mCalenDayView,
":/fxml/view_hide",
"show");
+ mCalenDayView->doPopulation();
mController.MainWindow().setCurrentView(mCalenDayView, true, Hb::ViewSwitchUseBackAnim);
- mCalenDayView->doPopulation();
}
}
@@ -342,18 +352,32 @@
switch (mCurrentViewId) {
case ECalenMonthView:
mCalenMonthView->doPopulation();
+ mController.MainWindow().setCurrentView(mCalenMonthView);
break;
case ECalenDayView:
if (mController.MainWindow().currentView() == mCalenDayView) {
+ // This happens when settings view or event viewer is opened
+ // from the agenda view. Simply repopulate the view
mCalenDayView->doPopulation();
mController.MainWindow().setCurrentView(mCalenDayView);
- } else {
+ } else if (mController.MainWindow().currentView() == mCalenDayViewAlt){
+ // This happens when settings view or event viewer is opened
+ // from the agenda view. Simply repopulate the view
mCalenDayViewAlt->doPopulation();
mController.MainWindow().setCurrentView(mCalenDayViewAlt);
+ } else {
+ // This is called whenever the day view is opened from the month
+ // view. Since the day view is not added to the mainwindow,
+ // add the day views to mainwindow and set any one of them as
+ // current view
+ mCalenDayView->doPopulation();
+ mController.MainWindow().addView(mCalenDayView);
+ mController.MainWindow().setCurrentView(mCalenDayView);
+ mController.MainWindow().addView(mCalenDayViewAlt);
}
break;
case ECalenLandscapeDayView:
- // mCalenLandscapeDayView->doPopulation();;
+ // For later implementation
break;
}
TRACE_EXIT_POINT;
@@ -378,8 +402,8 @@
}
mCalenEventViewer = new AgendaEventViewer(
mController.Services().agendaInterface(), this);
- connect(mCalenEventViewer, SIGNAL(viewingCompleted(bool)),
- this, SLOT(handleViewingCompleted(bool)));
+ connect(mCalenEventViewer, SIGNAL(viewingCompleted(const QDate)),
+ this, SLOT(handleViewingCompleted(const QDate)));
connect(mCalenEventViewer, SIGNAL(editingStarted()),
this, SLOT(handleEditingStarted()));
connect(mCalenEventViewer, SIGNAL(editingCompleted()),
@@ -444,9 +468,6 @@
// Remove month view from mainwindow.
mController.MainWindow().removeView(mCalenMonthView);
mCurrentViewId = ECalenDayView;
- // Add day view to mainwindow.
- mController.MainWindow().addView(mCalenDayView);
- mController.MainWindow().addView(mCalenDayViewAlt);
activateCurrentView();
break;
case ECalenEventView:
@@ -515,13 +536,16 @@
// (other items were commented in a header).
// ----------------------------------------------------------------------------
//
-void CalenViewManager::handleViewingCompleted(bool status)
+void CalenViewManager::handleViewingCompleted(const QDate date)
{
qDebug() <<"calendar: CalenViewManager::handleEditingCompleted -->";
- Q_UNUSED(status)
// Cleanup.
mCalenEventViewer->deleteLater();
+ if (!date.isNull() && date.isValid()) {
+ mController.Services().Context().setFocusDateL(QDateTime(date),
+ ECalenDayView);
+ }
mController.Services().IssueNotificationL(ECalenNotifyEntryClosed);
qDebug() <<"calendar: CalenViewManager::handleEditingCompleted <--";
--- a/calendarui/customisation/inc/calencustomisation.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/customisation/inc/calencustomisation.h Mon May 03 12:30:32 2010 +0300
@@ -24,7 +24,7 @@
#include <ecom/ecom.h>
// CONSTANTS
-const TUid KCalenCustomisationInterfaceUid = { 0x2018336F };
+const TUid KCalenCustomisationInterfaceUid = { 0x2002EA3B };
// FORWARD DECLARATIONS
class CalenView;
--- a/calendarui/eabi/calencontrolleru.def Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/eabi/calencontrolleru.def Mon May 03 12:30:32 2010 +0300
@@ -24,10 +24,8 @@
_ZN16CCalenController9OfferMenuEP6HbMenu @ 23 NONAME
_ZN16CCalenControllerC1Eb @ 24 NONAME
_ZN16CCalenControllerC2Eb @ 25 NONAME
- _ZN16CCalenControllerD0Ev @ 26 NONAME
- _ZN16CCalenControllerD1Ev @ 27 NONAME
- _ZN16CCalenControllerD2Ev @ 28 NONAME
- _ZTI16CCalenController @ 29 NONAME
- _ZTV16CCalenController @ 30 NONAME
- _ZThn4_N16CCalenController12NewServicesLEv @ 31 NONAME
+ _ZN16CCalenControllerD1Ev @ 26 NONAME
+ _ZN16CCalenControllerD2Ev @ 27 NONAME
+ _ZTI16CCalenController @ 28 NONAME
+ _ZTV16CCalenController @ 29 NONAME
--- a/calendarui/eabi/calensettingsu.def Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/eabi/calensettingsu.def Mon May 03 12:30:32 2010 +0300
@@ -6,13 +6,14 @@
_ZN13CalenSettings19getStaticMetaObjectEv @ 5 NONAME
_ZN13CalenSettings19populateSettingListEv @ 6 NONAME
_ZN13CalenSettings22handleWeekNumberChangeEv @ 7 NONAME
- _ZN13CalenSettings27handleAlarmSnoozeTimeChangeEi @ 8 NONAME
- _ZN13CalenSettingsC1EP10HbDataFormP7QObject @ 9 NONAME
- _ZN13CalenSettingsC2EP10HbDataFormP7QObject @ 10 NONAME
- _ZN13CalenSettingsD0Ev @ 11 NONAME
- _ZN13CalenSettingsD1Ev @ 12 NONAME
- _ZN13CalenSettingsD2Ev @ 13 NONAME
- _ZNK13CalenSettings10metaObjectEv @ 14 NONAME
- _ZTI13CalenSettings @ 15 NONAME
- _ZTV13CalenSettings @ 16 NONAME
+ _ZN13CalenSettings24handleRegionalInfoChangeEv @ 8 NONAME
+ _ZN13CalenSettings27handleAlarmSnoozeTimeChangeEi @ 9 NONAME
+ _ZN13CalenSettingsC1EP10HbDataFormP7QObject @ 10 NONAME
+ _ZN13CalenSettingsC2EP10HbDataFormP7QObject @ 11 NONAME
+ _ZN13CalenSettingsD0Ev @ 12 NONAME
+ _ZN13CalenSettingsD1Ev @ 13 NONAME
+ _ZN13CalenSettingsD2Ev @ 14 NONAME
+ _ZNK13CalenSettings10metaObjectEv @ 15 NONAME
+ _ZTI13CalenSettings @ 16 NONAME
+ _ZTV13CalenSettings @ 17 NONAME
--- a/calendarui/eabi/calenviewsu.def Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/eabi/calenviewsu.def Mon May 03 12:30:32 2010 +0300
@@ -16,7 +16,7 @@
_ZN14CalenMonthGrid11qt_metacastEPKc @ 15 NONAME
_ZN14CalenMonthGrid12timerExpiredEv @ 16 NONAME
_ZN14CalenMonthGrid13itemActivatedERK11QModelIndex @ 17 NONAME
- _ZN14CalenMonthGrid14setActiveDatesE9QDateTime @ 18 NONAME
+ _ZN14CalenMonthGrid14setActiveDatesE5QDate @ 18 NONAME
_ZN14CalenMonthGrid14setCurrentIdexEi @ 19 NONAME
_ZN14CalenMonthGrid15getCurrentIndexEv @ 20 NONAME
_ZN14CalenMonthGrid15mousePressEventEP24QGraphicsSceneMouseEvent @ 21 NONAME
@@ -45,137 +45,145 @@
_ZN14CalenMonthView13launchDayViewEv @ 44 NONAME
_ZN14CalenMonthView13monthDataListEv @ 45 NONAME
_ZN14CalenMonthView14addWeekNumbersEv @ 46 NONAME
- _ZN14CalenMonthView14rowsInFutMonthEv @ 47 NONAME
- _ZN14CalenMonthView14setDateToLabelEv @ 48 NONAME
- _ZN14CalenMonthView15dateFromContextERK13MCalenContext @ 49 NONAME
- _ZN14CalenMonthView15getInstanceListER5QListI11AgendaEntryE9QDateTimeS4_ @ 50 NONAME
- _ZN14CalenMonthView15onLocaleChangedEi @ 51 NONAME
- _ZN14CalenMonthView15rowsInPrevMonthEv @ 52 NONAME
- _ZN14CalenMonthView16getCurrGridIndexEv @ 53 NONAME
- _ZN14CalenMonthView16setCurrGridIndexEi @ 54 NONAME
- _ZN14CalenMonthView16staticMetaObjectE @ 55 NONAME DATA 16
- _ZN14CalenMonthView17changeOrientationEN2Qt11OrientationE @ 56 NONAME
- _ZN14CalenMonthView17populateNextMonthEv @ 57 NONAME
- _ZN14CalenMonthView17populatePrevMonthEv @ 58 NONAME
- _ZN14CalenMonthView17removeWeekNumbersEv @ 59 NONAME
- _ZN14CalenMonthView18addBackgroundFrameEv @ 60 NONAME
- _ZN14CalenMonthView18completePopulationEv @ 61 NONAME
- _ZN14CalenMonthView19getStaticMetaObjectEv @ 62 NONAME
- _ZN14CalenMonthView19populatePreviewPaneER9QDateTime @ 63 NONAME
- _ZN14CalenMonthView20prepareForPopulationEv @ 64 NONAME
- _ZN14CalenMonthView22setContextForActiveDayEi @ 65 NONAME
- _ZN14CalenMonthView22updateWeekNumGridModelEv @ 66 NONAME
- _ZN14CalenMonthView23handleChangeOrientationEv @ 67 NONAME
- _ZN14CalenMonthView23handleGridItemActivatedEv @ 68 NONAME
- _ZN14CalenMonthView24handlePreviewPaneGestureEb @ 69 NONAME
- _ZN14CalenMonthView24populateWithInstanceViewEv @ 70 NONAME
- _ZN14CalenMonthView24updateModelWithPrevMonthEv @ 71 NONAME
- _ZN14CalenMonthView25handleGridItemLongPressedEiR7QPointF @ 72 NONAME
- _ZN14CalenMonthView25handleLeftEffectCompletedERKN8HbEffect12EffectStatusE @ 73 NONAME
- _ZN14CalenMonthView26handleRightEffectCompletedERKN8HbEffect12EffectStatusE @ 74 NONAME
- _ZN14CalenMonthView26updateModelWithFutureMonthEv @ 75 NONAME
- _ZN14CalenMonthView35updateMonthDataArrayWithActiveDatesEv @ 76 NONAME
- _ZN14CalenMonthView7setDateEv @ 77 NONAME
- _ZN14CalenMonthView9goToTodayEv @ 78 NONAME
- _ZN14CalenMonthView9setupViewEP14CalenDocLoader @ 79 NONAME
- _ZN14CalenMonthViewC1ER14MCalenServices @ 80 NONAME
- _ZN14CalenMonthViewC2ER14MCalenServices @ 81 NONAME
- _ZN14CalenMonthViewD0Ev @ 82 NONAME
- _ZN14CalenMonthViewD1Ev @ 83 NONAME
- _ZN14CalenMonthViewD2Ev @ 84 NONAME
- _ZN16CalenPreviewPane11qt_metacallEN11QMetaObject4CallEiPPv @ 85 NONAME
- _ZN16CalenPreviewPane11qt_metacastEPKc @ 86 NONAME
- _ZN16CalenPreviewPane13populateLabelE9QDateTime @ 87 NONAME
- _ZN16CalenPreviewPane13stopScrollingEv @ 88 NONAME
- _ZN16CalenPreviewPane15mousePressEventEP24QGraphicsSceneMouseEvent @ 89 NONAME
- _ZN16CalenPreviewPane15startAutoScrollEv @ 90 NONAME
- _ZN16CalenPreviewPane16GetInstanceListLEv @ 91 NONAME
- _ZN16CalenPreviewPane16staticMetaObjectE @ 92 NONAME DATA 16
- _ZN16CalenPreviewPane17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 93 NONAME
- _ZN16CalenPreviewPane17scrollingFinishedEv @ 94 NONAME
- _ZN16CalenPreviewPane17setNoEntriesLabelEP7HbLabel @ 95 NONAME
- _ZN16CalenPreviewPane19getStaticMetaObjectEv @ 96 NONAME
- _ZN16CalenPreviewPane19onTwoSecondsTimeoutEv @ 97 NONAME
- _ZN16CalenPreviewPane4DateEv @ 98 NONAME
- _ZN16CalenPreviewPane7setViewEP14CalenMonthView @ 99 NONAME
- _ZN16CalenPreviewPaneC1ER14MCalenServicesP13QGraphicsItem @ 100 NONAME
- _ZN16CalenPreviewPaneC2ER14MCalenServicesP13QGraphicsItem @ 101 NONAME
- _ZN16CalenPreviewPaneD0Ev @ 102 NONAME
- _ZN16CalenPreviewPaneD1Ev @ 103 NONAME
- _ZN16CalenPreviewPaneD2Ev @ 104 NONAME
- _ZN17CalenSettingsView11qt_metacallEN11QMetaObject4CallEiPPv @ 105 NONAME
- _ZN17CalenSettingsView11qt_metacastEPKc @ 106 NONAME
- _ZN17CalenSettingsView14initializeFormEv @ 107 NONAME
- _ZN17CalenSettingsView16staticMetaObjectE @ 108 NONAME DATA 16
- _ZN17CalenSettingsView18launchPreviousViewEv @ 109 NONAME
- _ZN17CalenSettingsView19getStaticMetaObjectEv @ 110 NONAME
- _ZN17CalenSettingsViewC1ER14MCalenServicesP13QGraphicsItem @ 111 NONAME
- _ZN17CalenSettingsViewC2ER14MCalenServicesP13QGraphicsItem @ 112 NONAME
- _ZN17CalenSettingsViewD0Ev @ 113 NONAME
- _ZN17CalenSettingsViewD1Ev @ 114 NONAME
- _ZN17CalenSettingsViewD2Ev @ 115 NONAME
- _ZN18CalenDayViewWidgetC1ER14MCalenServicesP14CalenDocLoader @ 116 NONAME
- _ZN18CalenDayViewWidgetC2ER14MCalenServicesP14CalenDocLoader @ 117 NONAME
- _ZN18CalenDayViewWidgetD0Ev @ 118 NONAME
- _ZN18CalenDayViewWidgetD1Ev @ 119 NONAME
- _ZN18CalenDayViewWidgetD2Ev @ 120 NONAME
- _ZN21CalenThickLinesDrawer11qt_metacallEN11QMetaObject4CallEiPPv @ 121 NONAME
- _ZN21CalenThickLinesDrawer11qt_metacastEPKc @ 122 NONAME
- _ZN21CalenThickLinesDrawer16staticMetaObjectE @ 123 NONAME DATA 16
- _ZN21CalenThickLinesDrawer19getStaticMetaObjectEv @ 124 NONAME
- _ZN21CalenThickLinesDrawer5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 125 NONAME
- _ZN21CalenThickLinesDrawerC1EN17CalendarNamespace10WidgetTypeEP13QGraphicsItem @ 126 NONAME
- _ZN21CalenThickLinesDrawerC2EN17CalendarNamespace10WidgetTypeEP13QGraphicsItem @ 127 NONAME
- _ZN21CalenThickLinesDrawerD0Ev @ 128 NONAME
- _ZN21CalenThickLinesDrawerD1Ev @ 129 NONAME
- _ZN21CalenThickLinesDrawerD2Ev @ 130 NONAME
- _ZNK14CalenMonthGrid10metaObjectEv @ 131 NONAME
- _ZNK14CalenMonthView10metaObjectEv @ 132 NONAME
- _ZNK16CalenPreviewPane10metaObjectEv @ 133 NONAME
- _ZNK17CalenSettingsView10metaObjectEv @ 134 NONAME
- _ZNK21CalenThickLinesDrawer10metaObjectEv @ 135 NONAME
- _ZTI14CalenMonthGrid @ 136 NONAME
- _ZTI14CalenMonthView @ 137 NONAME
- _ZTI16CalenPreviewPane @ 138 NONAME
- _ZTI17CalenSettingsView @ 139 NONAME
- _ZTI21CalenThickLinesDrawer @ 140 NONAME
- _ZTV14CalenMonthGrid @ 141 NONAME
- _ZTV14CalenMonthView @ 142 NONAME
- _ZTV16CalenPreviewPane @ 143 NONAME
- _ZTV17CalenSettingsView @ 144 NONAME
- _ZTV21CalenThickLinesDrawer @ 145 NONAME
- _ZThn16_N12CalenDayViewD0Ev @ 146 NONAME
- _ZThn16_N12CalenDayViewD1Ev @ 147 NONAME
- _ZThn16_N14CalenMonthGridD0Ev @ 148 NONAME
- _ZThn16_N14CalenMonthGridD1Ev @ 149 NONAME
- _ZThn16_N14CalenMonthViewD0Ev @ 150 NONAME
- _ZThn16_N14CalenMonthViewD1Ev @ 151 NONAME
- _ZThn16_N16CalenPreviewPaneD0Ev @ 152 NONAME
- _ZThn16_N16CalenPreviewPaneD1Ev @ 153 NONAME
- _ZThn16_N17CalenSettingsViewD0Ev @ 154 NONAME
- _ZThn16_N17CalenSettingsViewD1Ev @ 155 NONAME
- _ZThn16_N18CalenDayViewWidgetD0Ev @ 156 NONAME
- _ZThn16_N18CalenDayViewWidgetD1Ev @ 157 NONAME
- _ZThn16_N21CalenThickLinesDrawerD0Ev @ 158 NONAME
- _ZThn16_N21CalenThickLinesDrawerD1Ev @ 159 NONAME
- _ZThn28_N12CalenDayView18HandleNotificationE18TCalenNotification @ 160 NONAME
- _ZThn8_N12CalenDayViewD0Ev @ 161 NONAME
- _ZThn8_N12CalenDayViewD1Ev @ 162 NONAME
- _ZThn8_N14CalenMonthGrid15mousePressEventEP24QGraphicsSceneMouseEvent @ 163 NONAME
- _ZThn8_N14CalenMonthGrid17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 164 NONAME
- _ZThn8_N14CalenMonthGridD0Ev @ 165 NONAME
- _ZThn8_N14CalenMonthGridD1Ev @ 166 NONAME
- _ZThn8_N14CalenMonthViewD0Ev @ 167 NONAME
- _ZThn8_N14CalenMonthViewD1Ev @ 168 NONAME
- _ZThn8_N16CalenPreviewPane15mousePressEventEP24QGraphicsSceneMouseEvent @ 169 NONAME
- _ZThn8_N16CalenPreviewPane17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 170 NONAME
- _ZThn8_N16CalenPreviewPaneD0Ev @ 171 NONAME
- _ZThn8_N16CalenPreviewPaneD1Ev @ 172 NONAME
- _ZThn8_N17CalenSettingsViewD0Ev @ 173 NONAME
- _ZThn8_N17CalenSettingsViewD1Ev @ 174 NONAME
- _ZThn8_N18CalenDayViewWidgetD0Ev @ 175 NONAME
- _ZThn8_N18CalenDayViewWidgetD1Ev @ 176 NONAME
- _ZThn8_N21CalenThickLinesDrawer5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 177 NONAME
- _ZThn8_N21CalenThickLinesDrawerD0Ev @ 178 NONAME
- _ZThn8_N21CalenThickLinesDrawerD1Ev @ 179 NONAME
+ _ZN14CalenMonthView14firstDayOfGridEv @ 47 NONAME
+ _ZN14CalenMonthView14rowsInFutMonthEv @ 48 NONAME
+ _ZN14CalenMonthView14setDateToLabelEv @ 49 NONAME
+ _ZN14CalenMonthView15dateFromContextERK13MCalenContext @ 50 NONAME
+ _ZN14CalenMonthView15getInstanceListER5QListI11AgendaEntryE9QDateTimeS4_ @ 51 NONAME
+ _ZN14CalenMonthView15onLocaleChangedEi @ 52 NONAME
+ _ZN14CalenMonthView15rowsInPrevMonthEv @ 53 NONAME
+ _ZN14CalenMonthView16getCurrGridIndexEv @ 54 NONAME
+ _ZN14CalenMonthView16setCurrGridIndexEi @ 55 NONAME
+ _ZN14CalenMonthView16staticMetaObjectE @ 56 NONAME DATA 16
+ _ZN14CalenMonthView17changeOrientationEN2Qt11OrientationE @ 57 NONAME
+ _ZN14CalenMonthView17populateNextMonthEv @ 58 NONAME
+ _ZN14CalenMonthView17populatePrevMonthEv @ 59 NONAME
+ _ZN14CalenMonthView17removeWeekNumbersEv @ 60 NONAME
+ _ZN14CalenMonthView18addBackgroundFrameEv @ 61 NONAME
+ _ZN14CalenMonthView18completePopulationEv @ 62 NONAME
+ _ZN14CalenMonthView19getStaticMetaObjectEv @ 63 NONAME
+ _ZN14CalenMonthView19populatePreviewPaneER9QDateTime @ 64 NONAME
+ _ZN14CalenMonthView20prepareForPopulationEv @ 65 NONAME
+ _ZN14CalenMonthView21refreshViewOnGoToDateEv @ 66 NONAME
+ _ZN14CalenMonthView22setContextForActiveDayEi @ 67 NONAME
+ _ZN14CalenMonthView22updateWeekNumGridModelEv @ 68 NONAME
+ _ZN14CalenMonthView23handleChangeOrientationEv @ 69 NONAME
+ _ZN14CalenMonthView23handleGridItemActivatedEv @ 70 NONAME
+ _ZN14CalenMonthView24handlePreviewPaneGestureEb @ 71 NONAME
+ _ZN14CalenMonthView24populateWithInstanceViewEv @ 72 NONAME
+ _ZN14CalenMonthView24updateModelWithPrevMonthEv @ 73 NONAME
+ _ZN14CalenMonthView25handleGridItemLongPressedEiR7QPointF @ 74 NONAME
+ _ZN14CalenMonthView25handleLeftEffectCompletedERKN8HbEffect12EffectStatusE @ 75 NONAME
+ _ZN14CalenMonthView26handleRightEffectCompletedERKN8HbEffect12EffectStatusE @ 76 NONAME
+ _ZN14CalenMonthView26updateModelWithFutureMonthEv @ 77 NONAME
+ _ZN14CalenMonthView35updateMonthDataArrayWithActiveDatesEv @ 78 NONAME
+ _ZN14CalenMonthView7setDateEv @ 79 NONAME
+ _ZN14CalenMonthView9goToTodayEv @ 80 NONAME
+ _ZN14CalenMonthView9setupViewEP14CalenDocLoader @ 81 NONAME
+ _ZN14CalenMonthViewC1ER14MCalenServices @ 82 NONAME
+ _ZN14CalenMonthViewC2ER14MCalenServices @ 83 NONAME
+ _ZN14CalenMonthViewD0Ev @ 84 NONAME
+ _ZN14CalenMonthViewD1Ev @ 85 NONAME
+ _ZN14CalenMonthViewD2Ev @ 86 NONAME
+ _ZN16CalenPreviewPane11qt_metacallEN11QMetaObject4CallEiPPv @ 87 NONAME
+ _ZN16CalenPreviewPane11qt_metacastEPKc @ 88 NONAME
+ _ZN16CalenPreviewPane13populateLabelE9QDateTime @ 89 NONAME
+ _ZN16CalenPreviewPane13stopScrollingEv @ 90 NONAME
+ _ZN16CalenPreviewPane15mousePressEventEP24QGraphicsSceneMouseEvent @ 91 NONAME
+ _ZN16CalenPreviewPane15startAutoScrollEv @ 92 NONAME
+ _ZN16CalenPreviewPane16GetInstanceListLEv @ 93 NONAME
+ _ZN16CalenPreviewPane16staticMetaObjectE @ 94 NONAME DATA 16
+ _ZN16CalenPreviewPane17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 95 NONAME
+ _ZN16CalenPreviewPane17scrollingFinishedEv @ 96 NONAME
+ _ZN16CalenPreviewPane17setNoEntriesLabelEP7HbLabel @ 97 NONAME
+ _ZN16CalenPreviewPane19getStaticMetaObjectEv @ 98 NONAME
+ _ZN16CalenPreviewPane19onTwoSecondsTimeoutEv @ 99 NONAME
+ _ZN16CalenPreviewPane4DateEv @ 100 NONAME
+ _ZN16CalenPreviewPane7setViewEP14CalenMonthView @ 101 NONAME
+ _ZN16CalenPreviewPaneC1ER14MCalenServicesP13QGraphicsItem @ 102 NONAME
+ _ZN16CalenPreviewPaneC2ER14MCalenServicesP13QGraphicsItem @ 103 NONAME
+ _ZN16CalenPreviewPaneD0Ev @ 104 NONAME
+ _ZN16CalenPreviewPaneD1Ev @ 105 NONAME
+ _ZN16CalenPreviewPaneD2Ev @ 106 NONAME
+ _ZN17CalenSettingsView11qt_metacallEN11QMetaObject4CallEiPPv @ 107 NONAME
+ _ZN17CalenSettingsView11qt_metacastEPKc @ 108 NONAME
+ _ZN17CalenSettingsView14initializeFormEv @ 109 NONAME
+ _ZN17CalenSettingsView16staticMetaObjectE @ 110 NONAME DATA 16
+ _ZN17CalenSettingsView18launchPreviousViewEv @ 111 NONAME
+ _ZN17CalenSettingsView19getStaticMetaObjectEv @ 112 NONAME
+ _ZN17CalenSettingsViewC1ER14MCalenServicesP13QGraphicsItem @ 113 NONAME
+ _ZN17CalenSettingsViewC2ER14MCalenServicesP13QGraphicsItem @ 114 NONAME
+ _ZN17CalenSettingsViewD0Ev @ 115 NONAME
+ _ZN17CalenSettingsViewD1Ev @ 116 NONAME
+ _ZN17CalenSettingsViewD2Ev @ 117 NONAME
+ _ZN18CalenDayViewWidgetC1ER14MCalenServicesP14CalenDocLoader @ 118 NONAME
+ _ZN18CalenDayViewWidgetC2ER14MCalenServicesP14CalenDocLoader @ 119 NONAME
+ _ZN18CalenDayViewWidgetD0Ev @ 120 NONAME
+ _ZN18CalenDayViewWidgetD1Ev @ 121 NONAME
+ _ZN18CalenDayViewWidgetD2Ev @ 122 NONAME
+ _ZN21CalenThickLinesDrawer11qt_metacallEN11QMetaObject4CallEiPPv @ 123 NONAME
+ _ZN21CalenThickLinesDrawer11qt_metacastEPKc @ 124 NONAME
+ _ZN21CalenThickLinesDrawer16staticMetaObjectE @ 125 NONAME DATA 16
+ _ZN21CalenThickLinesDrawer19getStaticMetaObjectEv @ 126 NONAME
+ _ZN21CalenThickLinesDrawer5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 127 NONAME
+ _ZN21CalenThickLinesDrawerC1EN17CalendarNamespace10WidgetTypeEP13QGraphicsItem @ 128 NONAME
+ _ZN21CalenThickLinesDrawerC2EN17CalendarNamespace10WidgetTypeEP13QGraphicsItem @ 129 NONAME
+ _ZN21CalenThickLinesDrawerD0Ev @ 130 NONAME
+ _ZN21CalenThickLinesDrawerD1Ev @ 131 NONAME
+ _ZN21CalenThickLinesDrawerD2Ev @ 132 NONAME
+ _ZNK14CalenMonthGrid10metaObjectEv @ 133 NONAME
+ _ZNK14CalenMonthView10metaObjectEv @ 134 NONAME
+ _ZNK16CalenPreviewPane10metaObjectEv @ 135 NONAME
+ _ZNK17CalenSettingsView10metaObjectEv @ 136 NONAME
+ _ZNK21CalenThickLinesDrawer10metaObjectEv @ 137 NONAME
+ _ZTI14CalenMonthGrid @ 138 NONAME
+ _ZTI14CalenMonthView @ 139 NONAME
+ _ZTI16CalenPreviewPane @ 140 NONAME
+ _ZTI17CalenSettingsView @ 141 NONAME
+ _ZTI21CalenThickLinesDrawer @ 142 NONAME
+ _ZTV14CalenMonthGrid @ 143 NONAME
+ _ZTV14CalenMonthView @ 144 NONAME
+ _ZTV16CalenPreviewPane @ 145 NONAME
+ _ZTV17CalenSettingsView @ 146 NONAME
+ _ZTV21CalenThickLinesDrawer @ 147 NONAME
+ _ZThn16_N12CalenDayViewD0Ev @ 148 NONAME
+ _ZThn16_N12CalenDayViewD1Ev @ 149 NONAME
+ _ZThn16_N14CalenMonthGridD0Ev @ 150 NONAME
+ _ZThn16_N14CalenMonthGridD1Ev @ 151 NONAME
+ _ZThn16_N14CalenMonthViewD0Ev @ 152 NONAME
+ _ZThn16_N14CalenMonthViewD1Ev @ 153 NONAME
+ _ZThn16_N16CalenPreviewPaneD0Ev @ 154 NONAME
+ _ZThn16_N16CalenPreviewPaneD1Ev @ 155 NONAME
+ _ZThn16_N17CalenSettingsViewD0Ev @ 156 NONAME
+ _ZThn16_N17CalenSettingsViewD1Ev @ 157 NONAME
+ _ZThn16_N18CalenDayViewWidgetD0Ev @ 158 NONAME
+ _ZThn16_N18CalenDayViewWidgetD1Ev @ 159 NONAME
+ _ZThn16_N21CalenThickLinesDrawerD0Ev @ 160 NONAME
+ _ZThn16_N21CalenThickLinesDrawerD1Ev @ 161 NONAME
+ _ZThn28_N12CalenDayView18HandleNotificationE18TCalenNotification @ 162 NONAME
+ _ZThn8_N12CalenDayViewD0Ev @ 163 NONAME
+ _ZThn8_N12CalenDayViewD1Ev @ 164 NONAME
+ _ZThn8_N14CalenMonthGrid15mousePressEventEP24QGraphicsSceneMouseEvent @ 165 NONAME
+ _ZThn8_N14CalenMonthGrid17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 166 NONAME
+ _ZThn8_N14CalenMonthGridD0Ev @ 167 NONAME
+ _ZThn8_N14CalenMonthGridD1Ev @ 168 NONAME
+ _ZThn8_N14CalenMonthViewD0Ev @ 169 NONAME
+ _ZThn8_N14CalenMonthViewD1Ev @ 170 NONAME
+ _ZThn8_N16CalenPreviewPane15mousePressEventEP24QGraphicsSceneMouseEvent @ 171 NONAME
+ _ZThn8_N16CalenPreviewPane17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 172 NONAME
+ _ZThn8_N16CalenPreviewPaneD0Ev @ 173 NONAME
+ _ZThn8_N16CalenPreviewPaneD1Ev @ 174 NONAME
+ _ZThn8_N17CalenSettingsViewD0Ev @ 175 NONAME
+ _ZThn8_N17CalenSettingsViewD1Ev @ 176 NONAME
+ _ZThn8_N18CalenDayViewWidgetD0Ev @ 177 NONAME
+ _ZThn8_N18CalenDayViewWidgetD1Ev @ 178 NONAME
+ _ZThn8_N21CalenThickLinesDrawer5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 179 NONAME
+ _ZThn8_N21CalenThickLinesDrawerD0Ev @ 180 NONAME
+ _ZThn8_N21CalenThickLinesDrawerD1Ev @ 181 NONAME
+ _ZN14CalenMonthGrid5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 182 NONAME
+ _ZN14CalenMonthView27showHideRegionalInformationEv @ 183 NONAME
+ _ZThn8_N14CalenMonthGrid5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 184 NONAME
+ _ZN16CalenPreviewPane14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 185 NONAME
+ _ZThn8_N16CalenPreviewPane14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 186 NONAME
+ _ZN14CalenMonthView22addRemoveActionsInMenuEv @ 187 NONAME
--- a/calendarui/inc/CalendarInternalCRKeys.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/inc/CalendarInternalCRKeys.h Mon May 03 12:30:32 2010 +0300
@@ -97,4 +97,11 @@
*/
const TUint32 KCalendarPluginAvailability = 0x0000000A;
+/**
+* Defines whether regional information must be shown in the Calendar or not
+* Default value: 1
+*/
+const TUint32 KShowRegionalInformation = 0x0000000B;
+
+
#endif // CALENDARINTERNALCRKEYS_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/inc/calenagendautils.h Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,67 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Static utility functions.
+ * - date utils to help comparisions and calculations witg
+ * dates and times.
+ *
+*/
+
+
+#ifndef CALENAGENDAUTILS_H
+#define CALENAGENDAUTILS_H
+
+// INCLUDES
+
+#include "agendaentry.h"
+#include <qglobal.h> // Q_DECL_EXPORT macro
+
+#ifdef CALENDATEUTILS_DLL
+#define CALENAGENDAUTIL_EXPORT Q_DECL_EXPORT
+#else
+#define CALENAGENDAUTIL_EXPORT Q_DECL_IMPORT
+#endif
+
+// FORWARD DECLARATIONS
+class CCalInstance;
+class CCalEntryView;
+class CCalInstanceView;
+
+// CLASS DECLARATION
+NONSHARABLE_CLASS( CALENAGENDAUTIL_EXPORT CalenAgendaUtils )
+ {
+ public:
+
+ /**
+ * Removes entries ending aDay at midnight.
+ **/
+ static void removeEntriesEndingAtMidnightL( QList<AgendaEntry>& list,
+ const QDateTime& day );
+
+ /**
+ * Checks that if entry ends at starting midnight of the day,
+ * but has started earlier.
+ * Such entries are not shown in day that they end, because end time
+ * is just marking the end of previous day.
+ * @returns ETrue, if entry ends at starting midnight of day, but starts before that
+ * EFalse, otherwise
+ **/
+ static bool endsAtStartOfDayL( AgendaEntry& entry,
+ const QDateTime& day );
+
+ };
+
+#endif // CALENAGENDAUTILS_H
+
+
+// End of File
--- a/calendarui/inc/calencommon.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/inc/calencommon.h Mon May 03 12:30:32 2010 +0300
@@ -24,21 +24,25 @@
#define CALEN_DAYVIEW_WIDGET "dayViewWidget"
#define CALEN_DAYVIEW_LISTWIDGET "eventsList"
#define CALEN_DAYVIEW_HEADING "headingWidget"
+#define CALEN_DAYVIEW_HEADING_REGIONALPLUGIN_WIDGET "headingRegionalPluginWidget"
#define CALEN_DAYVIEW_MENU_NEW_EVENT "newEventAction"
#define CALEN_DAYVIEW_MENU_GO_TO_TODAY "todayAction"
#define CALEN_DAYVIEW_MENU_GO_TO_DATE "goToDateAction"
-#define CALEN_DAYVIEW_MENU_DELETE "deleteAction"
#define CALEN_DAYVIEW_MENU_SETTINGS "settingsAction"
#define CALEN_PORTRAIT "portrait"
#define CALEN_LANDSCAPE "landscape"
#define CALEN_MONTHVIEW_XML_FILE ":/xml/calenmonthview.docml"
#define CALEN_MONTHVIEW "monthView"
+#define CALEN_MONTHVIEW_EXCEPT_PANE "monthViewExceptPreviewPane"
#define CALEN_MONTH_TITLE "monthTitle"
#define CALEN_DAYNAMES_WIDGET "dayNamesWidget"
#define CALEN_MONTHGRID "monthGrid"
+#define CALEN_PREVPANELAYOUT "prevPaneLayout"
#define CALEN_PREVPREVIEWPARENT "prevPaneWidget"
#define CALEN_CURRPREVIEWPARENT "currPaneWidget"
#define CALEN_NEXTPREVIEWPARENT "nextPaneWidget"
+#define CALEN_NEXTPANELAYOUT "nextPaneLayout"
+#define CALEN_CURRPANELAYOUT "currPaneLayout"
#define CALEN_PREVPREVIEWPANE "prevPreviewPane"
#define CALEN_CURRPREVIEWPANE "currPreviewPane"
#define CALEN_NEXTPREVIEWPANE "nextPreviewPane"
@@ -84,12 +88,11 @@
\enum DataRole
*/
enum DataRole {
- CalendarMonthDayRole = Qt::UserRole + 100,
- CalendarMonthEventRole,
+ CalendarMonthDayRole ,
CalendarMonthFocusRole,
CalendarMonthUnderlineRole,
- CalendarMonthTextColorRole,
- CalendarMonthSeventhColumn
+ CalendarMonthEventRole,
+ CalendarMonthTextColorRole
};
/*!
--- a/calendarui/inc/calencustomisation.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/inc/calencustomisation.h Mon May 03 12:30:32 2010 +0300
@@ -24,7 +24,7 @@
#include <ecom/ecom.h>
// CONSTANTS
-const TUid KCalenCustomisationInterfaceUid = { 0x2018336F };
+const TUid KCalenCustomisationInterfaceUid = { 0x2002EA3B };
// FORWARD DECLARATIONS
class CalenView;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/inc/calendateutils.h Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,147 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+ *
+*/
+
+#ifndef __CALENDATEUTILS_H__
+#define __CALENDATEUTILS_H__
+
+#include <e32base.h>
+#include <qglobal.h> // Q_DECL_EXPORT macro
+
+#ifdef CALENDATEUTILS_DLL
+#define CALENDATEUTIL_EXPORT Q_DECL_EXPORT
+#else
+#define CALENDATEUTIL_EXPORT Q_DECL_IMPORT
+#endif
+
+// forward declarations
+class QDateTime;
+
+/**
+ * CalenDateUtils contains static utility functions useful
+ * when comparing and calculating with dates and times.
+ *
+ * @lib Calendar.app
+ * @since 2.1
+ */
+
+class CALENDATEUTIL_EXPORT CalenDateUtils
+ {
+public:
+ static bool onSameDay( const QDateTime& x, const QDateTime& y );
+ static bool onSameMonth( const QDateTime& x, const QDateTime& y );
+ static QDateTime beginningOfDay( const QDateTime& startTime );
+ static QDateTime displayTimeOnDay( const QDateTime& startTime,
+ const QDateTime& day );
+
+ static bool timeRangesIntersect( const QDateTime& xStart,
+ const QDateTime& xEnd,
+ const QDateTime& yStart,
+ const QDateTime& yEnd );
+
+ /**
+ * Is aTime between KCalenMaxYear/KCalenMaxMonth/KCalenMaxDay
+ * and KCalenMinYear/KCalenMinMonth/KCalenMinDay.
+ * Min/Max day is defined agenda server.
+ * @param aTime aTime to be checked
+ * @return EFalse : Out of range
+ */
+ static bool isValidDay( const QDateTime& time );
+
+ /**
+ * Return ETrue if aTime is NULL
+ * @param aTime time to be compared against NULL time
+ */
+ static bool isNullTime( QDateTime& time );
+
+ /**
+ * Return Min or Max time if aTime goes out of bounds.
+ * Valid range is [CalenDateUtils::MinTime(), CalenDateUtils::MaxTime]
+ * @param aTime time to be checked
+ * @return aTime, if aTime in [CalenDateUtils::MinTime(), CalenDateUtils::MaxTime]
+ * CalenDateUtils::MinTime(), if aTime < CalenDateUtils::MinTime()
+ * CalenDateUtils::MaxTime(), if aTime > CalenDateUtils::MaxTime()
+ */
+ static QDateTime limitToValidTime( const QDateTime& time );
+
+ /**
+ * Return maximum allowed time. (31.
+ */
+ static QDateTime maxTime();
+
+ /**
+ * Return minimum allowed time.
+ */
+ static QDateTime minTime();
+
+ /**
+ * Return time of day as a minutes from midnight. Useful to get hours::minutes component of datetime,
+ * regardless of date
+ */
+ static int timeOfDay( const QDateTime& dateTime );
+
+ /**
+ * Round QDateTime to previous full hour, e.g. RoundToPreviousHour( 23.11.2006 9:31 ) = 23.11.2006 9:00
+ */
+ static QDateTime roundToPreviousHour( const QDateTime& dateTime );
+
+ /**
+ * Round QDateTimeIntervalMinutes to previous full hour, e.g. RoundToPreviousHour( 130 min ) = 120 min
+ */
+ static int roundToPreviousHour( const int& minutes );
+
+
+ /**
+ * @return current time.
+ */
+ static QDateTime now();
+
+ /**
+ * @return today with time component set to 00:00.
+ */
+ static QDateTime today();
+
+ /**
+ * @return ETrue if given aTime is on today, EFalse otherwise
+ */
+ static bool isOnToday( const QDateTime& time );
+
+ /*
+ * Given aDate = DD::MM::YY @ hh:mm:ss, it returns a QDateTime obj DD::MM::YY @ 08:00 am
+ * @param: aDate, which has the DD::MM::YY
+ */
+ static QDateTime defaultTime( const QDateTime& date );
+
+ static QDateTime pastOf(const QDateTime& dateTime, int numOfDays);
+
+ static QDateTime futureOf(const QDateTime& dateTime, int numOfDays);
+
+
+private:
+ // Hiding constructor, because this is static utility class.
+ //lint -e{1526}
+ CalenDateUtils();
+
+ // Hiding assignment, because this is static utility class.
+ //lint -e{1526}
+ CalenDateUtils& operator=( const CalenDateUtils& );
+
+ };
+
+#endif // __CALENDATEUTILS_H__
+
+
+// End of File
--- a/calendarui/inc/hb_calencommands.hrh Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/inc/hb_calencommands.hrh Mon May 03 12:30:32 2010 +0300
@@ -93,7 +93,8 @@
ECalenCmdGotoCalendar,
ECalenMissedAlarmsViewFromIdle,
ECalenMissedEventViewFromIdle,
- ECalenLastCommand
+ ECalenLastCommand,
+ ECalenRegionalPluginTapEvent
};
#endif // HB_CALENCOMMANDS_HRH
--- a/calendarui/regionalplugins/Thai/inc/CalenThaiPluginUids.hrh Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/regionalplugins/Thai/inc/CalenThaiPluginUids.hrh Mon May 03 12:30:32 2010 +0300
@@ -19,5 +19,5 @@
#define SYMBIAN_ECOM_PLUGIN_UID 0x10009D8D
#define CALENTHAIPLUGIN_DLL_UID 0x102823A9
#define CALENTHAIPLUGIN_IMPLEMENTATION_UID 0x102823A7
-#define CALENUIPLUGININTERFACE_ECOM_INTERFACE_UID 0x1028336F
+#define CALENUIPLUGININTERFACE_ECOM_INTERFACE_UID 0x2002EA3B
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/regionalplugins/bwins/calenlunarchinesepluginu.def Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,10 @@
+EXPORTS
+ ?AnimalYear@CCalenLunarLocalizedInfo@@QAEABVTDesC16@@XZ @ 1 NONAME ; class TDesC16 const & CCalenLunarLocalizedInfo::AnimalYear(void)
+ ?SolarTerm@CCalenLunarLocalizedInfo@@QAEABVTDesC16@@XZ @ 2 NONAME ; class TDesC16 const & CCalenLunarLocalizedInfo::SolarTerm(void)
+ ?GregorianDate@CCalenLunarLocalizedInfo@@QAEABVTDesC16@@XZ @ 3 NONAME ; class TDesC16 const & CCalenLunarLocalizedInfo::GregorianDate(void)
+ ?LunarMonthAndDay@CCalenLunarLocalizedInfo@@QAEABVTDesC16@@XZ @ 4 NONAME ; class TDesC16 const & CCalenLunarLocalizedInfo::LunarMonthAndDay(void)
+ ?Festival@CCalenLunarLocalizedInfo@@QAEABVTDesC16@@XZ @ 5 NONAME ; class TDesC16 const & CCalenLunarLocalizedInfo::Festival(void)
+ ?ImplementationGroupProxy@@YAPBUTImplementationProxy@@AAH@Z @ 6 NONAME ; struct TImplementationProxy const * ImplementationGroupProxy(int &)
+ ?FullLunarDate@CCalenLunarLocalizedInfo@@QAEABVTDesC16@@XZ @ 7 NONAME ; class TDesC16 const & CCalenLunarLocalizedInfo::FullLunarDate(void)
+ ?LunarYear@CCalenLunarLocalizedInfo@@QAEABVTDesC16@@XZ @ 8 NONAME ; class TDesC16 const & CCalenLunarLocalizedInfo::LunarYear(void)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/regionalplugins/calenregionalutil/bwins/calenregionalutilu.def Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,30 @@
+EXPORTS
+ ?SolarTerm@CCalenLunarLocalizedInfo@@QAEABVTDesC16@@XZ @ 1 NONAME ; class TDesC16 const & CCalenLunarLocalizedInfo::SolarTerm(void)
+ ?GetLunarInfoL@CCalenLunarInfoProvider@@QAE?AVTCalenLunarInfo@@ABVTTime@@@Z @ 2 NONAME ; class TCalenLunarInfo CCalenLunarInfoProvider::GetLunarInfoL(class TTime const &)
+ ?AnimalYear@TCalenLunarInfo@@QAE?AW4TAnimalYear@1@XZ @ 3 NONAME ; enum TCalenLunarInfo::TAnimalYear TCalenLunarInfo::AnimalYear(void)
+ ??0CCalenLunarLocalizer@@IAE@XZ @ 4 NONAME ; CCalenLunarLocalizer::CCalenLunarLocalizer(void)
+ ?AnimalYear@CCalenLunarLocalizedInfo@@QAEABVTDesC16@@XZ @ 5 NONAME ; class TDesC16 const & CCalenLunarLocalizedInfo::AnimalYear(void)
+ ?GetExtraRowTextL@CCalenLunarLocalizer@@UAE?AVTPtrC16@@AAVCCalenLunarLocalizedInfo@@@Z @ 6 NONAME ; class TPtrC16 CCalenLunarLocalizer::GetExtraRowTextL(class CCalenLunarLocalizedInfo &)
+ ??1CCalenExtraRowFormatter@@UAE@XZ @ 7 NONAME ; CCalenExtraRowFormatter::~CCalenExtraRowFormatter(void)
+ ?LunarMonthAndDay@CCalenLunarLocalizedInfo@@QAEABVTDesC16@@XZ @ 8 NONAME ; class TDesC16 const & CCalenLunarLocalizedInfo::LunarMonthAndDay(void)
+ ?GetField@CCalenLunarLocalizedInfo@@QAEABVTDesC16@@W4TField@1@@Z @ 9 NONAME ; class TDesC16 const & CCalenLunarLocalizedInfo::GetField(enum CCalenLunarLocalizedInfo::TField)
+ ?HasSolarTerm@TCalenLunarInfo@@QAEHXZ @ 10 NONAME ; int TCalenLunarInfo::HasSolarTerm(void)
+ ??1CCalenLunarLocalizer@@UAE@XZ @ 11 NONAME ; CCalenLunarLocalizer::~CCalenLunarLocalizer(void)
+ ?LunarYear@CCalenLunarLocalizedInfo@@QAEABVTDesC16@@XZ @ 12 NONAME ; class TDesC16 const & CCalenLunarLocalizedInfo::LunarYear(void)
+ ?CheckSolarTermDateL@CCalenSolarTerms@@QAEHABVTDateTime@@@Z @ 13 NONAME ; int CCalenSolarTerms::CheckSolarTermDateL(class TDateTime const &)
+ ?Festival@CCalenLunarLocalizedInfo@@QAEABVTDesC16@@XZ @ 14 NONAME ; class TDesC16 const & CCalenLunarLocalizedInfo::Festival(void)
+ ?NewL@CCalenLunarInfoProvider@@SAPAV1@AAVRFs@@@Z @ 15 NONAME ; class CCalenLunarInfoProvider * CCalenLunarInfoProvider::NewL(class RFs &)
+ ?LocalizeL@CCalenLunarLocalizer@@UAEPAVCCalenLunarLocalizedInfo@@AAVTCalenLunarInfo@@@Z @ 16 NONAME ; class CCalenLunarLocalizedInfo * CCalenLunarLocalizer::LocalizeL(class TCalenLunarInfo &)
+ ?NewL@CCalenLunarLocalizer@@SAPAV1@XZ @ 17 NONAME ; class CCalenLunarLocalizer * CCalenLunarLocalizer::NewL(void)
+ ?NewL@CCalenLunarLocalizedInfo@@SAPAV1@XZ @ 18 NONAME ; class CCalenLunarLocalizedInfo * CCalenLunarLocalizedInfo::NewL(void)
+ ?FullLunarDate@CCalenLunarLocalizedInfo@@QAEABVTDesC16@@XZ @ 19 NONAME ; class TDesC16 const & CCalenLunarLocalizedInfo::FullLunarDate(void)
+ ?GregorianDate@CCalenLunarLocalizedInfo@@QAEABVTDesC16@@XZ @ 20 NONAME ; class TDesC16 const & CCalenLunarLocalizedInfo::GregorianDate(void)
+ ?NewL@CCalenSolarTerms@@SAPAV1@AAVRFs@@@Z @ 21 NONAME ; class CCalenSolarTerms * CCalenSolarTerms::NewL(class RFs &)
+ ?HasFestival@TCalenLunarInfo@@QAEHXZ @ 22 NONAME ; int TCalenLunarInfo::HasFestival(void)
+ ??1CCalenLunarLocalizedInfo@@UAE@XZ @ 23 NONAME ; CCalenLunarLocalizedInfo::~CCalenLunarLocalizedInfo(void)
+ ??1CCalenLunarInfoProvider@@UAE@XZ @ 24 NONAME ; CCalenLunarInfoProvider::~CCalenLunarInfoProvider(void)
+ ?NewL@CCalenExtraRowFormatter@@SAPAV1@XZ @ 25 NONAME ; class CCalenExtraRowFormatter * CCalenExtraRowFormatter::NewL(void)
+ ?ConstructL@CCalenLunarLocalizer@@IAEXXZ @ 26 NONAME ; void CCalenLunarLocalizer::ConstructL(void)
+ ??1CCalenSolarTerms@@UAE@XZ @ 27 NONAME ; CCalenSolarTerms::~CCalenSolarTerms(void)
+ ?FormatExtraRowInformationL@CCalenExtraRowFormatter@@QAE?AVTPtrC16@@AAVCCalenLunarLocalizedInfo@@AAV?$RArray@W4TField@CCalenLunarLocalizedInfo@@@@@Z @ 28 NONAME ; class TPtrC16 CCalenExtraRowFormatter::FormatExtraRowInformationL(class CCalenLunarLocalizedInfo &, class RArray<enum CCalenLunarLocalizedInfo::TField> &)
+
--- a/calendarui/regionalplugins/calenregionalutil/calenregionalutil.pro Fri Apr 16 14:57:40 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-#
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: Project definition file for Calendar regional utils
-#
-
-TEMPLATE = lib
-TARGET = calenregionalutil
-
-BLD_INF_RULES.prj_exports += \
-"./inc/calenextrarowformatter.h |../inc/calenextrarowformatter.h" \
-"./inc/calenlunarinfo.h |../inc/calenlunarinfo.h" \
-"./inc/calenlunarinfoprovider.h |../inc/calenlunarinfoprovider.h" \
-"./inc/calenlunarlocalizedinfo.h |../inc/calenlunarlocalizedinfo.h" \
-"./inc/calenlunarlocalizer.h |../inc/calenlunarlocalizer.h" \
-"./inc/calenlunarpanic.h |../inc/calenlunarpanic.h" \
-"./inc/CalenLunarPaths.h |../inc/CalenLunarPaths.h" \
-"./inc/CalenRegionalPluginUids.h |../inc/CalenRegionalPluginUids.h" \
-"./inc/CalenSolarTerms.h |../inc/CalenSolarTerms.h"
-
-# MMP Rules
-mmpRules = \
-"$${LITERAL_HASH}include <data_caging_paths.hrh>" \
-"START RESOURCE ./data/calenregionalutil.rss" \
-"HEADER" \
-"TARGETPATH RESOURCE_FILES_DIR" \
-"LANGUAGE_IDS" \
-"END"
-
-MMP_RULES +=mmpRules
-
-symbian: {
-TARGET.UID3 = 0x20022EDB
-TARGET.CAPABILITY = CAP_GENERAL_DLL
-
-INCLUDEPATH += ./inc \
- ../inc \
- ../../inc \
- /epoc32/include \
- /epoc32/include/platform \
- /epoc32/include/platform/app \
- /epoc32/include/platform/loc \
- /epoc32/include/app/exported \
- /epoc32/include/app \
- /epoc32/include/platform/mw/loc \
- /epoc32/include/platform/app/loc \
- /epoc32/include/platform/loc/sc \
- /epoc32/include/platform/mw/loc/sc \
- /epoc32/include/platform/app/loc/sc \
- /epoc32/include/platform/mw \
- /epoc32/include/mw
-
-
-LIBS += -leuser \
- -lcalinterimapi \
- -lecom \
- -lavkon \
- -lcone \
- -lgdi \
- -lbafl \
- -lplatformenv \
- -lefsrv \
- -lCommonEngine \
- -lccon \
- -lestor \
- -lcentralrepository \
- -lCdlEngine
-
-}
-
-SOURCES += ./src/calenextrarowformatter.cpp \
- ./src/calenlunarinfo.cpp \
- ./src/calenlunarinfoprovider.cpp \
- ./src/calenlunarlocalizedinfo.cpp \
- ./src/calenlunarlocalizer.cpp \
- ./src/calensolarterms.cpp
-
-# End of file --Don't remove this.
--- a/calendarui/regionalplugins/calenregionalutil/data/calenregionalutil.rss Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/regionalplugins/calenregionalutil/data/calenregionalutil.rss Mon May 03 12:30:32 2010 +0300
@@ -20,7 +20,7 @@
#include <avkon.rh>
#include <avkon.rsg>
-#include <calendar.loc>
+#include "calendarregionalplugin.loc"
NAME CLRU
RESOURCE RSS_SIGNATURE { }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/regionalplugins/calenregionalutil/eabi/calenregionalutilu.def Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,35 @@
+EXPORTS
+ _ZN15TCalenLunarInfo10AnimalYearEv @ 1 NONAME
+ _ZN20CCalenLunarLocalizer10ConstructLEv @ 2 NONAME
+ _ZN20CCalenLunarLocalizer16GetExtraRowTextLER24CCalenLunarLocalizedInfo @ 3 NONAME
+ _ZN20CCalenLunarLocalizer4NewLEv @ 4 NONAME
+ _ZN20CCalenLunarLocalizer9LocalizeLER15TCalenLunarInfo @ 5 NONAME
+ _ZN20CCalenLunarLocalizerC1Ev @ 6 NONAME
+ _ZN20CCalenLunarLocalizerC2Ev @ 7 NONAME
+ _ZN20CCalenLunarLocalizerD0Ev @ 8 NONAME
+ _ZN20CCalenLunarLocalizerD1Ev @ 9 NONAME
+ _ZN20CCalenLunarLocalizerD2Ev @ 10 NONAME
+ _ZN23CCalenExtraRowFormatter26FormatExtraRowInformationLER24CCalenLunarLocalizedInfoR6RArrayINS0_6TFieldEE @ 11 NONAME
+ _ZN23CCalenExtraRowFormatter4NewLEv @ 12 NONAME
+ _ZN23CCalenExtraRowFormatterD0Ev @ 13 NONAME
+ _ZN23CCalenExtraRowFormatterD1Ev @ 14 NONAME
+ _ZN23CCalenExtraRowFormatterD2Ev @ 15 NONAME
+ _ZN23CCalenLunarInfoProvider13GetLunarInfoLERK5TTime @ 16 NONAME
+ _ZN23CCalenLunarInfoProvider4NewLER3RFs @ 17 NONAME
+ _ZN23CCalenLunarInfoProviderD0Ev @ 18 NONAME
+ _ZN23CCalenLunarInfoProviderD1Ev @ 19 NONAME
+ _ZN23CCalenLunarInfoProviderD2Ev @ 20 NONAME
+ _ZN24CCalenLunarLocalizedInfo4NewLEv @ 21 NONAME
+ _ZN24CCalenLunarLocalizedInfo8GetFieldENS_6TFieldE @ 22 NONAME
+ _ZN24CCalenLunarLocalizedInfoD0Ev @ 23 NONAME
+ _ZN24CCalenLunarLocalizedInfoD1Ev @ 24 NONAME
+ _ZN24CCalenLunarLocalizedInfoD2Ev @ 25 NONAME
+ _ZTI20CCalenLunarLocalizer @ 26 NONAME
+ _ZTI23CCalenExtraRowFormatter @ 27 NONAME
+ _ZTI23CCalenLunarInfoProvider @ 28 NONAME
+ _ZTI24CCalenLunarLocalizedInfo @ 29 NONAME
+ _ZTV20CCalenLunarLocalizer @ 30 NONAME
+ _ZTV23CCalenExtraRowFormatter @ 31 NONAME
+ _ZTV23CCalenLunarInfoProvider @ 32 NONAME
+ _ZTV24CCalenLunarLocalizedInfo @ 33 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/regionalplugins/calenregionalutil/group/bld.inf Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,36 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file provides the information required for building
+* CalenInterimUtils
+*
+*/
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+../inc/calenextrarowformatter.h |../../inc/calenextrarowformatter.h
+../inc/calenlunarinfo.h |../../inc/calenlunarinfo.h
+../inc/calenlunarinfoprovider.h |../../inc/calenlunarinfoprovider.h
+../inc/calenlunarlocalizedinfo.h |../../inc/calenlunarlocalizedinfo.h
+../inc/calenlunarlocalizer.h |../../inc/calenlunarlocalizer.h
+../inc/calenlunarpanic.h |../../inc/calenlunarpanic.h
+../inc/calenlunarpaths.h |../../inc/calenlunarpaths.h
+../inc/calenregionalpluginuids.h |../../inc/calenregionalpluginuids.h
+../inc/calensolarterms.h |../../inc/calensolarterms.h
+
+PRJ_MMPFILES
+calenregionalutil.mmp
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/regionalplugins/calenregionalutil/group/calenregionalutil.mmp Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,73 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Project description file for calendar regional utilities
+*
+*/
+
+#include <platform_paths.hrh>
+#include <data_caging_paths.hrh>
+
+// Target
+TARGET calenregionalutil.dll
+TARGETTYPE DLL
+
+UID 0x1000008d 0x20022EDB
+CAPABILITY CAP_GENERAL_DLL
+VENDORID VID_DEFAULT
+
+// Includes
+USERINCLUDE ../inc
+USERINCLUDE ../../inc
+USERINCLUDE ../../../inc
+USERINCLUDE ../../loc
+APP_LAYER_SYSTEMINCLUDE
+
+// Resource
+SOURCEPATH ../data
+START RESOURCE calenregionalutil.rss
+HEADER
+TARGETPATH RESOURCE_FILES_DIR
+LANGUAGE_IDS
+END // RESOURCE
+
+// Source
+SOURCEPATH ../src
+SOURCE calenextrarowformatter.cpp
+SOURCE calenlunarinfo.cpp
+SOURCE calenlunarinfoprovider.cpp
+SOURCE calenlunarlocalizedinfo.cpp
+SOURCE calenlunarlocalizer.cpp
+SOURCE calensolarterms.cpp
+
+// Libraries
+LIBRARY avkon.lib
+LIBRARY calinterimapi.lib
+LIBRARY cone.lib
+LIBRARY ecom.lib
+LIBRARY eikcdlg.lib
+LIBRARY eikctl.lib
+LIBRARY eikcoctl.lib
+LIBRARY eikcore.lib
+LIBRARY euser.lib
+LIBRARY gdi.lib
+LIBRARY bafl.lib
+LIBRARY platformenv.lib
+LIBRARY efsrv.lib
+LIBRARY commonengine.lib
+LIBRARY ccon.lib
+LIBRARY estor.lib
+LIBRARY centralrepository.lib
+LIBRARY cdlengine.lib
+
+// End of file
--- a/calendarui/regionalplugins/calenregionalutil/inc/calenextrarowformatter.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/regionalplugins/calenregionalutil/inc/calenextrarowformatter.h Mon May 03 12:30:32 2010 +0300
@@ -34,22 +34,10 @@
IMPORT_C virtual ~CCalenExtraRowFormatter();
- IMPORT_C TPtrC FormatExtraRowInformationL( CCalenLunarLocalizedInfo& aLocInfo,
- RArray<CCalenLunarLocalizedInfo::TField>& aPrioritizedFields,
- TInt aMaxWidth,
- const CFont& aFont
-
- , TBool aTwoLines
-
- );
-
-private:
- TBool TryToFitL( const TDesC& aStr, TInt aMaxWidth, const CFont& aFont
-
- , TBool aTwoLines
-
- );
-
+ IMPORT_C TPtrC FormatExtraRowInformationL(
+ CCalenLunarLocalizedInfo& aLocInfo,
+ RArray<CCalenLunarLocalizedInfo::TField>& aPrioritizedFields
+ );
private: // own methods
CCalenExtraRowFormatter();
--- a/calendarui/regionalplugins/calenregionalutil/inc/calenlunarlocalizer.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/regionalplugins/calenregionalutil/inc/calenlunarlocalizer.h Mon May 03 12:30:32 2010 +0300
@@ -41,11 +41,7 @@
IMPORT_C virtual CCalenLunarLocalizedInfo* LocalizeL( TCalenLunarInfo& aInfo );
- IMPORT_C virtual TPtrC GetExtraRowTextL( CCalenLunarLocalizedInfo& aLocInfo,
- TInt aMaxWidth,
- const CFont& aFont,
- TBool aTwoLines
- );
+ IMPORT_C virtual TPtrC GetExtraRowTextL( CCalenLunarLocalizedInfo& aLocInfo );
protected:
--- a/calendarui/regionalplugins/calenregionalutil/inc/calenregionalpluginuids.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/regionalplugins/calenregionalutil/inc/calenregionalpluginuids.h Mon May 03 12:30:32 2010 +0300
@@ -18,15 +18,15 @@
#ifndef CALENREGIONALPLUGINUIDS_H
#define CALENREGIONALPLUGINUIDS_H
-#define SYMBIAN_ECOM_PLUGIN_UID 0x10009D8D
-#define CALENUIPLUGININTERFACE_ECOM_INTERFACE_UID 0x1028336F
+#define SYMBIAN_ECOM_PLUGIN_UID 0x10009D8D
+#define CALENUIPLUGININTERFACE_ECOM_INTERFACE_UID 0x2002EA3B
// Lunar Plugin uids
-#define CALENLUNARCHINESEPLUGIN_DLL_UID 0x102823A8
-#define CALENLUNARPLUGIN_CHINESE_IMPLEMENTATION_UID 0x102823A5
+#define CALENLUNARCHINESEPLUGIN_DLL_UID 0x2002EA3C
+#define CALENLUNARPLUGIN_CHINESE_IMPLEMENTATION_UID 0x2002EA3D
// Vietnamese Plugin uids
-#define CALENLUNARPLUGIN_VIETNAMESE_IMPLEMENTATION_UID 0x102823A6
-#define CALENVIETNAMESEPLUGIN_DLL_UID 0x102823AA
+#define CALENLUNARPLUGIN_VIETNAMESE_IMPLEMENTATION_UID 0x102823A6
+#define CALENVIETNAMESEPLUGIN_DLL_UID 0x102823AA
#endif //CALENREGIONALPLUGINUIDS_H
--- a/calendarui/regionalplugins/calenregionalutil/src/calenextrarowformatter.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/regionalplugins/calenregionalutil/src/calenextrarowformatter.cpp Mon May 03 12:30:32 2010 +0300
@@ -16,14 +16,14 @@
*/
-#include "calendarui_debug.h"
-#include "CalenExtraRowFormatter.h"
+
#include <calenregionalutil.rsg>
-#include <aknbiditextutils.h>
#include <badesca.h>
#include <eikenv.h>
#include <StringLoader.h>
+#include "calendarui_debug.h"
+#include "CalenExtraRowFormatter.h"
// -----------------------------------------------------------------------------
// CollapseDuplicatesL
@@ -158,11 +158,7 @@
//
EXPORT_C TPtrC CCalenExtraRowFormatter::FormatExtraRowInformationL(
CCalenLunarLocalizedInfo& aLocInfo,
- RArray<CCalenLunarLocalizedInfo::TField>& aPrioritizedFields,
- TInt aMaxWidth,
- const CFont& aFont
- ,TBool aTwoLines
- )
+ RArray<CCalenLunarLocalizedInfo::TField>& aPrioritizedFields )
{
TRACE_ENTRY_POINT;
@@ -190,159 +186,91 @@
ASSERT( subLabels.Find( aPrioritizedFields[i] ) >= 0 );
}
- TBool fits = EFalse;
+ // Initialize substring array
+ CPtrCArray* subs = new (ELeave) CPtrCArray(10);
+ CleanupStack::PushL( subs );
+ for ( TInt i = 0; i < subLabels.Count(); i++)
+ {
+ subs->AppendL( TPtrC( KNullDesC ) );
+ }
+ // subs->InsertL( 0, TPtrC( KNullDesC ), 5 );
+
+ // Set wanted fields to substring array
+ for ( TInt i = 0; i < aPrioritizedFields.Count(); i++)
+ {
+ CCalenLunarLocalizedInfo::TField field = aPrioritizedFields[i];
+ TInt subIx = subLabels.Find( field );
+ // Replace
+ subs->Delete(subIx);
+ RDebug::Print( _L("A sub count %d"), subs->Count() );
+ subs->InsertL(subIx, TPtrC( aLocInfo.GetField( field ) ) );
+ RDebug::Print( _L("B sub count %d"), subs->Count() );
+ RDebug::Print( _L("B field %S"), &(subs->At(subIx)) );
+
+ }
+
+ // Format all fields to extra row
+ HBufC* extraRowFmt = StringLoader::LoadLC( R_CALE_EXTRA_ROW_LUNAR );
+
+ RDebug::RawPrint( *extraRowFmt );
+
+ TBuf<1000> fmt = *extraRowFmt;
+ for (TInt i=0; i < subLabels.Count(); i++)
+ {
+ RDebug::Print( _L("Before Format") );
+ RDebug::RawPrint( fmt );
+ StringLoader::Format( iText,
+ fmt,
+ i + 1, // %0U is a separator
+ subs->At( i ) );
+ fmt = iText;
+ RDebug::Print( _L("After Format") );
+ RDebug::RawPrint( fmt );
+ }
+
+ // Now we have something like "Year of Dog%0U%0U6/11%0U%0U"
+ // First We need to remove multiple occurences of %0U
+ _LIT(KSeparatorFmt, "%0U");
+
+ CollapseDuplicatesL( iText, 0, KSeparatorFmt );
+ RDebug::Print( _L("After collapse") );
+ RDebug::RawPrint( iText );
- do
- {
- // Initialize substring array
- CPtrCArray* subs = new (ELeave) CPtrCArray(10);
- CleanupStack::PushL( subs );
- for ( TInt i = 0; i < subLabels.Count(); i++)
- {
- subs->AppendL( TPtrC( KNullDesC ) );
- }
- // subs->InsertL( 0, TPtrC( KNullDesC ), 5 );
-
- // Set wanted fields to substring array
- for ( TInt i = 0; i < aPrioritizedFields.Count(); i++)
- {
- CCalenLunarLocalizedInfo::TField field = aPrioritizedFields[i];
- TInt subIx = subLabels.Find( field );
- // Replace
- subs->Delete(subIx);
- RDebug::Print( _L("A sub count %d"), subs->Count() );
- subs->InsertL(subIx, TPtrC( aLocInfo.GetField( field ) ) );
- RDebug::Print( _L("B sub count %d"), subs->Count() );
- RDebug::Print( _L("B field %S"), &(subs->At(subIx)) );
-
- }
-
- // Format all fields to extra row
- HBufC* extraRowFmt = StringLoader::LoadLC( R_CALE_EXTRA_ROW_LUNAR );
-
- RDebug::RawPrint( *extraRowFmt );
-
- TBuf<1000> fmt = *extraRowFmt;
- for (TInt i=0; i < subLabels.Count(); i++)
- {
- RDebug::Print( _L("Before Format") );
- RDebug::RawPrint( fmt );
- StringLoader::Format( iText,
- fmt,
- i + 1, // %0U is a separator
- subs->At( i ) );
- fmt = iText;
- RDebug::Print( _L("After Format") );
- RDebug::RawPrint( fmt );
- }
-
- // Now we have something like "Year of Dog%0U%0U6/11%0U%0U"
- // First We need to remove multiple occurences of %0U
- _LIT(KSeparatorFmt, "%0U");
-
- CollapseDuplicatesL( iText, 0, KSeparatorFmt );
- RDebug::Print( _L("After collapse") );
- RDebug::RawPrint( iText );
+ // Remove leading and trailing %0U
+ // By now, we are sure that there is max 1 %0U in the beginning
+ // and in the end of string.
+ RemoveLeadingAndTrailingL( iText, KSeparatorFmt );
+ RDebug::Print( _L("After leading and trailing removal") );
+ RDebug::RawPrint( iText );
+
- // Remove leading and trailing %0U
- // By now, we are sure that there is max 1 %0U in the beginning
- // and in the end of string.
- RemoveLeadingAndTrailingL( iText, KSeparatorFmt );
- RDebug::Print( _L("After leading and trailing removal") );
- RDebug::RawPrint( iText );
-
-
- // If there are now separators anymore, then do not fill them
- TBool hasSeparators = iText.Find( KSeparatorFmt ) >= 0;
-
- if ( hasSeparators )
- {
-
- // fill in separators
- HBufC* separator = StringLoader::LoadLC( R_CALE_LUNAR_SEPARATOR );
- fmt = iText;
- StringLoader::Format( iText,
- fmt,
- 0, // %0U is a separator
- *separator );
-
- RDebug::Print( _L("After separator insert") );
- RDebug::RawPrint( iText );
- CleanupStack::PopAndDestroy( separator );
- }
+ // If there are now separators anymore, then do not fill them
+ TBool hasSeparators = iText.Find( KSeparatorFmt ) >= 0;
+
+ if ( hasSeparators )
+ {
+
+ // fill in separators
+ HBufC* separator = StringLoader::LoadLC( R_CALE_LUNAR_SEPARATOR );
+ fmt = iText;
+ StringLoader::Format( iText,
+ fmt,
+ 0, // %0U is a separator
+ *separator );
+
+ RDebug::Print( _L("After separator insert") );
+ RDebug::RawPrint( iText );
+ CleanupStack::PopAndDestroy( separator );
+ }
- CleanupStack::PopAndDestroy( extraRowFmt );
- CleanupStack::PopAndDestroy( subs );
-
- fits = TryToFitL( iText, aMaxWidth, aFont
-
- , aTwoLines
-
- );
- if ( ! fits )
- {
- iText = KNullDesC;
- TInt last = aPrioritizedFields.Count() - 1;
- if ( last >= 0 )
- {
- aPrioritizedFields.Remove( last );
- }
- }
-
-
- } while ( ! fits && aPrioritizedFields.Count() );
-
+ CleanupStack::PopAndDestroy( extraRowFmt );
+ CleanupStack::PopAndDestroy( subs );
CleanupStack::PopAndDestroy( &subLabels );
-
-
TRACE_EXIT_POINT;
return iText;
}
-// -----------------------------------------------------------------------------
-// CCalenExtraRowFormatter::TryToFitL
-// -----------------------------------------------------------------------------
-//
-TBool CCalenExtraRowFormatter::TryToFitL( const TDesC& aStr, TInt aMaxWidth, const CFont& aFont
- , TBool aTwoLines )
- {
- TRACE_ENTRY_POINT;
-
- TBool result(EFalse);
- if(aTwoLines)
- {
- CArrayFixFlat<TPtrC>* textLines = new(ELeave)CArrayFixFlat<TPtrC>( 3 );
- CleanupStack::PushL( textLines );
-
- CArrayFixFlat<TInt>* lineWidths = new( ELeave )CArrayFixFlat<TInt>( 1 );
- CleanupStack::PushL( lineWidths );
-
- lineWidths->AppendL( aMaxWidth );
-
- HBufC* visualText = AknBidiTextUtils::ConvertToVisualAndWrapToArrayWholeTextL(
- aStr,
- *lineWidths,
- aFont,
- *textLines);
-
- result = (textLines->Count() <= 2);
-
- CleanupStack::PopAndDestroy( lineWidths );
- CleanupStack::PopAndDestroy( textLines );
- delete visualText;
- }
- else
- {
- CFont::TMeasureTextInput::TFlags logicalOrder = static_cast<CFont::TMeasureTextInput::TFlags>(0);
- TInt textW = AknBidiTextUtils::MeasureTextBoundsWidth( aFont, aStr, logicalOrder );
- result = (textW <= aMaxWidth);
- }
-
- TRACE_EXIT_POINT;
- return result;
- }
-
//EOF
--- a/calendarui/regionalplugins/calenregionalutil/src/calenlunarlocalizer.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/regionalplugins/calenregionalutil/src/calenlunarlocalizer.cpp Mon May 03 12:30:32 2010 +0300
@@ -16,16 +16,9 @@
*/
-#include "calendarui_debug.h"
-#include "CalenLunarLocalizer.h"
-#include "CalenLunarInfo.h"
-#include "CalenLunarLocalizedInfo.h"
-#include "CalenExtraRowFormatter.h"
-#include <calenregionalutil.rsg>
-#include <aknbiditextutils.h>
#include <avkon.rsg>
#include <badesca.h>
#include <eikenv.h>
@@ -33,6 +26,14 @@
#include <bautils.h>
#include <data_caging_path_literals.hrh>
+#include <calenregionalutil.rsg>
+
+#include "calendarui_debug.h"
+
+#include "CalenLunarLocalizer.h"
+#include "CalenLunarInfo.h"
+#include "CalenLunarLocalizedInfo.h"
+#include "CalenExtraRowFormatter.h"
//CONSTANTS
const TInt KCharMonth = 0x6708;
const TInt KCharFirstMonth = 0x6b63;
@@ -126,22 +127,6 @@
iGregorianDateFormat = StringLoader::LoadL(R_QTN_DATE_USUAL_WITH_ZERO);
-
-#ifdef _DEBUG
- // Validate assumptions
- TInt maxStem = -1;
- for (TInt i = 0; i < iHeavenlyStemNames->Count(); i++)
- {
- maxStem = Max( maxStem, iHeavenlyStemNames->MdcaPoint(i).Length() );
- }
-
- TInt maxBranch = -1;
- for (TInt i = 0; i < iTerrestialBranchNames->MdcaPoint(i).Length() ; i++)
- {
- maxBranch = Max( maxBranch, iTerrestialBranchNames->MdcaPoint(i).Length() );
- }
- ASSERT( maxStem + maxBranch <= 100);
-#endif
TRACE_EXIT_POINT;
}
@@ -178,13 +163,13 @@
yearSubs->AppendL( iHeavenlyStemNames->MdcaPoint( aInfo.iHeavenlyStem ) );
yearSubs->AppendL( iTerrestialBranchNames->MdcaPoint( aInfo.iTerrestialBranch ) );
- HBufC* tmp = StringLoader::LoadLC( R_CALE_LUNAR_YEAR, *yearSubs, iEikEnv );
+ HBufC* tmp = StringLoader::LoadLC( R_CALE_LUNAR_YEAR, *yearSubs);
RDebug::Print( *tmp );
localized->iLunarYear = *tmp;
CleanupStack::PopAndDestroy( tmp );
CleanupStack::PopAndDestroy( yearSubs );
- RDebug::Print( localized->iLunarYear );
+ RDebug::Print( localized->iLunarYear );
LocalizeMonthAndDayL(localized, aInfo);
@@ -215,8 +200,8 @@
// CCalenLunarLocalizer::GetExtraRowTextL
// -----------------------------------------------------------------------------
//
-EXPORT_C TPtrC CCalenLunarLocalizer::GetExtraRowTextL( CCalenLunarLocalizedInfo& aLocInfo, TInt aMaxWidth,
- const CFont& aFont, TBool aTwoLines )
+EXPORT_C TPtrC CCalenLunarLocalizer::GetExtraRowTextL(
+ CCalenLunarLocalizedInfo& aLocInfo )
{
TRACE_ENTRY_POINT;
@@ -228,11 +213,7 @@
fields.AppendL( CCalenLunarLocalizedInfo::EAnimalYear );
fields.AppendL( CCalenLunarLocalizedInfo::ELunarYear );
- TPtrC text = iRowFormatter->FormatExtraRowInformationL( aLocInfo, fields, aMaxWidth, aFont
-
- , aTwoLines
-
- );
+ TPtrC text = iRowFormatter->FormatExtraRowInformationL( aLocInfo, fields );
CleanupStack::PopAndDestroy( &fields );
--- a/calendarui/regionalplugins/calenregionalutil/src/calensolarterms.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/regionalplugins/calenregionalutil/src/calensolarterms.cpp Mon May 03 12:30:32 2010 +0300
@@ -33,9 +33,9 @@
_LIT(KSolarTermsFile, "SolarItems");
// search path for solar item file
//Uncomment for emulator
-//_LIT( KSolarTermsPath, "\\private\\10005901\\" );
+_LIT( KSolarTermsPath, "\\private\\10005901\\" );
-_LIT( KSolarTermsPath, "\\data\\" );
+//_LIT( KSolarTermsPath, "\\data\\" );
const TInt KFirstSolarTermYear(1900);
const TInt KLastSolarTermYear(2100);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/regionalplugins/eabi/calenlunarchinesepluginu.def Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ _Z24ImplementationGroupProxyRi @ 1 NONAME
+
--- a/calendarui/regionalplugins/inc/CalenRegionalPluginUids.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/regionalplugins/inc/CalenRegionalPluginUids.h Mon May 03 12:30:32 2010 +0300
@@ -18,15 +18,15 @@
#ifndef CALENREGIONALPLUGINUIDS_H
#define CALENREGIONALPLUGINUIDS_H
-#define SYMBIAN_ECOM_PLUGIN_UID 0x10009D8D
-#define CALENUIPLUGININTERFACE_ECOM_INTERFACE_UID 0x1028336F
+#define SYMBIAN_ECOM_PLUGIN_UID 0x10009D8D
+#define CALENUIPLUGININTERFACE_ECOM_INTERFACE_UID 0x2002EA3B
// Lunar Plugin uids
-#define CALENLUNARCHINESEPLUGIN_DLL_UID 0x102823A8
-#define CALENLUNARPLUGIN_CHINESE_IMPLEMENTATION_UID 0x102823A5
+#define CALENLUNARCHINESEPLUGIN_DLL_UID 0x2002EA3C
+#define CALENLUNARPLUGIN_CHINESE_IMPLEMENTATION_UID 0x2002EA3D
// Vietnamese Plugin uids
-#define CALENLUNARPLUGIN_VIETNAMESE_IMPLEMENTATION_UID 0x102823A6
-#define CALENVIETNAMESEPLUGIN_DLL_UID 0x102823AA
+#define CALENLUNARPLUGIN_VIETNAMESE_IMPLEMENTATION_UID 0x102823A6
+#define CALENVIETNAMESEPLUGIN_DLL_UID 0x102823AA
#endif //CALENREGIONALPLUGINUIDS_H
--- a/calendarui/regionalplugins/inc/calenextrarowformatter.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/regionalplugins/inc/calenextrarowformatter.h Mon May 03 12:30:32 2010 +0300
@@ -34,22 +34,10 @@
IMPORT_C virtual ~CCalenExtraRowFormatter();
- IMPORT_C TPtrC FormatExtraRowInformationL( CCalenLunarLocalizedInfo& aLocInfo,
- RArray<CCalenLunarLocalizedInfo::TField>& aPrioritizedFields,
- TInt aMaxWidth,
- const CFont& aFont
-
- , TBool aTwoLines
-
- );
-
-private:
- TBool TryToFitL( const TDesC& aStr, TInt aMaxWidth, const CFont& aFont
-
- , TBool aTwoLines
-
- );
-
+ IMPORT_C TPtrC FormatExtraRowInformationL(
+ CCalenLunarLocalizedInfo& aLocInfo,
+ RArray<CCalenLunarLocalizedInfo::TField>& aPrioritizedFields
+ );
private: // own methods
CCalenExtraRowFormatter();
--- a/calendarui/regionalplugins/inc/calenlunarlocalizer.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/regionalplugins/inc/calenlunarlocalizer.h Mon May 03 12:30:32 2010 +0300
@@ -41,11 +41,7 @@
IMPORT_C virtual CCalenLunarLocalizedInfo* LocalizeL( TCalenLunarInfo& aInfo );
- IMPORT_C virtual TPtrC GetExtraRowTextL( CCalenLunarLocalizedInfo& aLocInfo,
- TInt aMaxWidth,
- const CFont& aFont,
- TBool aTwoLines
- );
+ IMPORT_C virtual TPtrC GetExtraRowTextL( CCalenLunarLocalizedInfo& aLocInfo );
protected:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/regionalplugins/loc/calendarregionalplugin.loc Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,2037 @@
+/*
+* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This is a localisation file for Calendar
+* A _loc file is the one and only place where the logical
+* strings to be localised are defined
+*
+*/
+
+
+
+// LOCALISATION STRINGS
+
+
+//d:Application title for listview
+//l:list_single_large_graphic_pane_t1
+//
+#define qtn_apps_calendar_list "Calendar"
+
+//d:Application title for general settings pane
+//l:list_single_large_graphic_pane_t1_cp2
+//
+#define qtn_cale_title_calendar "Calendar"
+
+//d:Application title for grid
+//l:cell_app_pane_t1
+//
+#define qtn_apps_calendar_grid "Calendar"
+
+//d:Opens New entry SubMenu
+//l:list_single_pane_t1_cp2
+//
+#define qtn_cale_opt_make_note "New entry"
+
+//d:Opens delete SubMenu in MonthView
+//l:list_single_pane_t1_cp2
+//
+#define qtn_cale_opt_delete "Delete"
+
+//d:Deletes a note
+//l:list_single_pane_t1_cp2
+//
+#define qtn_cale_om_delete "Delete"
+
+//d:Discard changes to a note
+//l:list_single_pane_t1_cp2
+//
+#define qtn_cale_om_cancel_changes "Discard changes"
+
+//d:Confirmation text when discarding changes to a note
+//l:popup_note_window
+//
+#define qtn_cale_query_cancel_changes "Discard changes?"
+
+//d:Opens SettingView
+//l:list_single_pane_t1_cp2
+//
+#define text_calendar_settings "Settings"
+
+//d:Opens DayView
+//l:list_single_pane_t1_cp2
+//
+#define qtn_cale_opt_open "Open"
+
+//d:Opens WeekView
+//l:list_single_pane_t1_cp2
+//
+#define qtn_cale_opt_view_week "View by weeks"
+
+//d:Jumps to a specific date
+//l:list_single_pane_t1_cp2
+//
+#define text_calendar_goto_date "Go to date"
+
+//d:Opens Meeting note
+//l:list_single_popup_submenu_pane_t1
+//
+#define qtn_cale_meeting_note "Meeting"
+
+
+//d:Opens Meeting Request note
+//d:Option list item for this is "Make Note"
+//l:list_single_popup_submenu_pane_t1
+//w:
+//r:3.0
+//
+#define qtn_cale_meeting_request_note "Meeting Request"
+
+
+//d:Opens Anniversary Note
+//l:list_single_popup_submenu_pane_t1
+//
+#define qtn_cale_note_anniversary "Anniversary"
+
+//d:Opens Day Note
+//l:list_single_popup_submenu_pane_t1
+//
+#define qtn_cale_day_note "Day note"
+
+//d:Opens MonthView
+//l:list_single_pane_t1_cp2
+//
+#define qtn_cale_opt_view_month "View month"
+
+//d:Deletes all notes
+//l:list_single_popup_submenu_pane_t1
+//
+#define qtn_cale_sub_all "All notes"
+
+//d:the date before the notes are to be deleted.
+//l:list_single_popup_submenu_pane_t1
+//
+#define qtn_cale_sub_setdate "Before set date"
+
+//d:Settings is changed
+//l:list_single_pane_t1_cp2
+//
+#define qtn_cale_om_change "Change"
+
+//d:Subject item text of Meeting
+//l:list_double_graphic_heading_pane_t1
+//
+#define qtn_cale_note_subject "subject"
+
+//d:Start date item text of Meeting form
+//l:list_double_graphic_heading_pane_t1
+//
+#define qtn_cale_note_meeting_date "start date"
+
+//d:End date item text of Meeting form
+//l:list_double_graphic_heading_pane_t1
+//
+#define qtn_cale_note_meeting_end "end date"
+
+//d:Start date and time item text of entry editor
+//l:list_double_graphic_heading_pane_t1
+//
+#define qtn_cale_note_start_time_date "start time and date"
+
+//d:End date and time item text of entry editor
+//l:list_double_graphic_heading_pane_t1
+//
+#define qtn_cale_note_end_time_date "end time and date"
+
+//d:Alarm date and time item text of entry editor
+//l:list_double_graphic_heading_pane_t1
+//
+#define qtn_cale_note_alarm_time_date "alarm time and date"
+
+//d:Start time item text of Meeting form
+//l:list_double_graphic_heading_pane_t1
+//
+#define qtn_cale_note_meeting_start "start time"
+
+//d:End time item text of Meeting form
+//l:list_double_graphic_heading_pane_t1
+//
+#define qtn_cale_note_end_meet_time "end time"
+
+//d:Alarm item text of Meeting, Anniversary form
+//l:list_double_graphic_heading_pane_t1
+//
+#define qtn_cale_alarm_activity "alarm"
+
+//d:Alarm time item text of Meeting, Anniversary form
+//l:list_double_graphic_heading_pane_t1
+//
+#define qtn_cale_note_meeting_alarm "alarm time"
+
+//d:Alarm date item text of Meeting, Anniversary form
+//l:list_double_graphic_heading_pane_t1
+//
+#define qtn_cale_note_meeting_alarmdate "alarm date"
+
+//d:Repeat item text of Meeting, Day form
+//l:list_double_graphic_heading_pane_t1
+//
+#define qtn_cale_note_meeting_repeat "repeat"
+
+//d:Repeat until item text of Meeting, Day form
+//l:list_double_graphic_heading_pane_t1
+//
+#define qtn_cale_note_meeting_until "repeat until"
+
+//d:Confidentiality item text of Meeting form
+//l:list_double_graphic_heading_pane_t1
+//
+#define qtn_cale_note_meeting_confident "synchronisation"
+
+//d:Subject item text of Anniversary form
+//l:list_double_graphic_heading_pane_t1
+//
+#define qtn_cale_anniversary_occasion "occasion"
+
+//d:Start date item text of Anniversary form
+//l:list_double_graphic_heading_pane_t1
+//
+#define qtn_cale_anniversary_start_date "date"
+
+//d:Subject item text of Day form
+//l:list_double_graphic_heading_pane_t1
+//
+#define qtn_cale_day_description "description"
+
+//d:Start date item text of Day form
+//l:list_double_graphic_heading_pane_t1
+//
+#define qtn_cale_day_start_date "start date"
+
+//d:End date item text of Day form
+//l:list_double_graphic_heading_pane_t1
+//
+#define qtn_cale_day_end_date "end date"
+
+//d:Occasion item text of note viewer
+//l:list_double_graphic_heading_pane_t1
+//r:3.2
+//
+#define qtn_cale_viewer_occasion "Occasion:"
+
+//d:Date item text of note viewer
+//l:list_double_graphic_heading_pane_t1
+//r:3.2
+//
+#define qtn_cale_viewer_date "Date:"
+
+//d:Subject item text of note viewer
+//l:list_double_graphic_heading_pane_t1
+//r:3.2
+//
+#define qtn_cale_viewer_subject "Subject:"
+
+//d:Location item text of note viewer
+//l:list_double_graphic_heading_pane_t1
+//r:3.2
+//
+#define qtn_cale_viewer_location "Location:"
+
+//d:Synchronisation item text of note viewer
+//l:list_double_graphic_heading_pane_t1
+//r:3.2
+//
+#define qtn_cale_viewer_sync "Synchronisation:"
+
+//d:Alarm item text of note viewer
+//l:list_double_graphic_heading_pane_t1
+//r:3.2
+//
+#define qtn_cale_viewer_alarm "Alarm:"
+
+//d:Repeat item text of note viewer
+//l:list_double_graphic_heading_pane_t1
+//r:3.2
+//
+#define qtn_cale_viewer_repeat_daily "Repeats daily:"
+
+//d:Repeat item text of note viewer
+//l:list_double_graphic_heading_pane_t1
+//r:3.2
+//
+#define qtn_cale_viewer_repeat_weekly "Repeats weekly:"
+
+//d:Repeat item text of note viewer
+//l:list_double_graphic_heading_pane_t1
+//r:3.2
+//
+#define qtn_cale_viewer_repeat_fortnightly "Repeats fortnightly:"
+
+//d:Repeat item text of note viewer
+//l:list_double_graphic_heading_pane_t1
+//r:3.2
+//
+#define qtn_cale_viewer_repeat_monthly "Repeats monthly:"
+
+//d:Repeat item text of note viewer
+//l:list_double_graphic_heading_pane_t1
+//r:3.2
+//
+#define qtn_cale_viewer_repeat_yearly "Repeats yearly:"
+
+//d:Repeat item text of note viewer
+//l:list_double_graphic_heading_pane_t1
+//r:3.2
+//
+#define qtn_cale_viewer_repeat_other "Recurring entry:"
+
+//d:Repeat item text of note viewer when no end date (repeat from ...)
+//d:%0U is date entry repeats from
+//l:list_form_graphic_pane_t1
+//r:3.2
+//
+#define qtn_cale_viewer_valid_forever "From %0U"
+
+//d:Navi pane decoration for event viewers
+//d:%0U is current instance date
+//d:%1U is index of current instance
+//d:%2U is total instance count for current day
+//l:navi_text_pane_t1
+//r:3.2
+//
+#define qtn_cale_viewer_navi "%0U %1U/%2U"
+
+//d:Repeat item text of note viewer
+//l:list_double_graphic_heading_pane_t1
+//r:3.2
+//
+#define qtn_cale_viewer_repeat "Repeat:"
+
+//d:Time item text of note viewer
+//l:list_double_graphic_heading_pane_t1
+//r:3.2
+//
+#define qtn_cale_viewer_time "Time:"
+
+//d:Due date item text of note viewer
+//l:list_double_graphic_heading_pane_t1
+//r:3.2
+//
+#define qtn_cale_viewer_due_date "Due date:"
+
+//d:Since item text of note viewer (anniversaries only)
+//l:list_double_graphic_heading_pane_t1
+//r:3.2
+//
+#define qtn_cale_viewer_since "Since:"
+
+//d:Priority item text of note viewer
+//l:list_double_graphic_heading_pane_t1
+//r:3.2
+//
+#define qtn_cale_viewer_prio "Priority:"
+
+//d:Description item text of note viewer
+//l:list_double_graphic_heading_pane_t1
+//r:3.2
+//
+#define qtn_cale_viewer_desc "Description:"
+
+//d:Private item text of note viewer (Sync)
+//l:list_double_graphic_heading_pane_t1
+//r:3.2
+//
+#define qtn_cale_viewer_sync_private "Private"
+
+//d:Public item text of note viewer (Sync)
+//l:list_double_graphic_heading_pane_t1
+//r:3.2
+//
+#define qtn_cale_viewer_sync_public "Public"
+
+//d:None item text of note viewer (Sync)
+//l:list_double_graphic_heading_pane_t1
+//r:3.2
+//
+#define qtn_cale_viewer_sync_none "None"
+
+//d:High item text of note viewer (Priority)
+//l:list_double_graphic_heading_pane_t1
+//r:3.2
+//
+#define qtn_cale_viewer_prio_high "High"
+
+//d:Normal item text of note viewer (Priority)
+//l:list_double_graphic_heading_pane_t1
+//r:3.2
+//
+#define qtn_cale_viewer_prio_normal "Normal"
+
+//d:Low item text of note viewer (Priority)
+//l:list_double_graphic_heading_pane_t1
+//r:3.2
+//
+#define qtn_cale_viewer_prio_low "Low"
+
+//d:Completed item text of note viewer (Priority)
+//l:list_double_graphic_heading_pane_t1
+//r:3.2
+//
+#define qtn_cale_viewer_completed "Completed:"
+
+//d:Date and time when appointment starts and ends on the same day
+//d:The string is small enough to fit onto one line
+//d:%0U is start time
+//d:%1U is end time
+//d:%2U is start date
+//l:popup_preview_text_window/opt1
+//r:3.2
+//
+#define qtn_cale_viewer_time_day "%0U - %1U %2U"
+
+//d:Date and time when appointment starts and ends on the same day
+//d:The string is too long to fit onto one line so must include a linebreak
+//d:%0U is start time
+//d:%1U is end time
+//d:%2U is start date
+//d:<\x2028> is line break
+//l:popup_preview_text_window/opt1
+//r:3.2
+//
+#define qtn_cale_viewer_time_day_wrapped "%0U - %1U"<0x2028>"%2U"
+
+//d:Date and time when appointment starts and ends on different days
+//d:The string is small enough to fit onto one line
+//d:%0U is start time
+//d:%1U is start date
+//d:%2U is end time
+//d:%3U is end date
+//l:popup_preview_text_window/opt1
+//r:3.2
+//
+#define qtn_cale_viewer_time_days "%0U %1U - %2U %3U"
+
+//d:Date and time when appointment starts and ends on different days
+//d:The string is too long to fit onto one line so must include a linebreak
+//d:%0U is start time
+//d:%1U is start date
+//d:%2U is end time
+//d:%3U is end date
+//d:<\x2028> is line break
+//l:popup_preview_text_window/opt1
+//r:3.2
+//
+#define qtn_cale_viewer_time_days_wrapped "%0U %1U -"<0x2028>"%2U %3U"
+
+//d:Date and time of alarm (when alarm is on different day to event)
+//d:%0U is alarm time
+//d:%1U is alarm date
+//l:popup_preview_text_window/opt1
+//r:3.2
+//
+#define qtn_cale_viewer_alarm_time "%0U %1U"
+
+//d:Start and end date of event, when event lasts for more than one day
+//d:%0U is start date
+//d:%1U is end date
+//l:msg_body_pane/opt
+//r:3.2
+//
+#define qtn_cale_viewer_valid_limited "%0U - %1U"
+
+//d:Error text when adjusting repeating meeting instance times
+//l:popup_note_window
+//r:3.2
+//
+#define qtn_cale_note_cannot_occur_daily "%N day meeting cannot repeat daily"
+
+//d:Error text when adjusting repeating meeting instance times
+//l:popup_note_window
+//r:3.2
+//
+#define qtn_cale_note_cannot_occur_weekly "%N day meeting cannot repeat weekly"
+
+//d:Error text when adjusting repeating meeting instance times
+//l:popup_note_window
+//r:3.2
+//
+#define qtn_cale_note_cannot_occur_fortnightly "%N day meeting cannot repeat fortnightly"
+
+//d:Error text when adjusting repeating meeting instance times
+//l:popup_note_window
+//r:3.2
+//
+#define qtn_cale_note_cannot_occur_monthly "%N day meeting cannot repeat monthly"
+
+//d:Error text when adjusting repeating meeting instance times
+//l:popup_note_window
+//r:3.2
+//
+#define qtn_cale_note_cannot_occur_yearly "%N day meeting cannot repeat yearly"
+
+//d:Error text when attempting to move a meeting out of sequence
+//l:popup_note_window
+//r:3.2
+//
+#define qtn_cale_note_child_out_of_sequence "Unable to move a meeting out of sequence"
+
+//d:Error note when attempting to move an instance of a meeting to a day when an instance already exists
+//l:popup_note_window
+//r:3.2
+//
+#define qtn_cale_note_child_same_day "Two occurrences of a meeting cannot occur on the same day"
+
+//d:Error note when attempting to move a meeting to overlap another instance of the meeting
+//l:popup_note_window
+//r:3.2
+//
+#define qtn_cale_note_child_overlap "Meeting cannot overlap another instance of itself"
+
+//d:Alarm active text of Note form
+//l:list_form_graphic_pane_t1
+//
+#define qtn_cale_alarm_active "Active"
+
+//d:Alarm off text of the Note form
+//l:list_form_graphic_pane_t1
+//
+#define qtn_cale_alarm_off "Off"
+
+//d:Synchronisation type text of the Note form
+//l:list_form_graphic_pane_t1
+//
+#define qtn_cale_confident_public "Public"
+
+//d:Synchronisation type text of the Note form
+//l:list_form_graphic_pane_t1
+//
+#define qtn_cale_confident_private "Private"
+
+//d:Synchronisation type text of the Note form
+//l:list_form_graphic_pane_t1
+//
+#define qtn_cale_confident_none "None"
+
+//d:Repeat type "Not repeated" text of note form
+//l:list_set_graphic_pane_t1
+//
+#define qtn_cale_not_repeated "Not repeated"
+
+//d:Repeat type "Every day" text of note form
+//l:list_set_graphic_pane_t1
+//
+#define text_calendar_every_day "Every day"
+
+//d:Repeat type "Every week" text of note form
+//l:list_set_graphic_pane_t1
+//
+#define text_calendar_every_week "Every week"
+
+//d:Repeat type "Every two weeks" text of note form
+//l:list_set_graphic_pane_t1
+//
+#define text_calendar_bi_weekly "Every 2 weeks"
+
+//d:Repeat type "Monthly" text of note form
+//l:list_set_graphic_pane_t1
+//
+#define qtn_cale_repeat_monthly "Monthly"
+
+//d:Repeat type "Yearly" text of note form
+//l:list_set_graphic_pane_t1
+//
+#define text_calendar_every_year "Every year"
+
+//d:Repeat type "Other" text of note form
+//l:list_set_graphic_pane_t1
+//
+#define qtn_cale_other "Other"
+
+//d:Title pane text of Meeting form
+//l:title_pane_t2/opt9
+//
+#define text_calendar_title_meeting "Meeting"
+
+//d:Title pane text of Anniversary form
+//l:title_pane_t2/opt9
+//
+#define qtn_cale_anniversary_title "Anniversary"
+
+//d:Title pane text of Day form
+//l:title_pane_t2/opt9
+//
+#define qtn_cale_title_daynote "Day note"
+
+//d:After confirming the saving,the confirmation note
+//d:Calendar note savedis shown
+//l:popup_note_window
+//
+#define text_calendar_note_saved "Note saved"
+
+//d:The List_Query with the prompt text Save Repeat Note?
+//l:heading_pane_t1
+//
+#define qtn_cale_lq_save_chang_repeated "Save changes?"
+
+//d:The List_Query with the prompt text "Edit:" (choices being Series or Occurrence)
+//l:heading_pane_t1
+//
+#define qtn_cale_lq_edit_recurring "Edit:"
+
+//d:All notes delete prompt
+//l:popup_note_window
+//
+#define qtn_cale_quest_delete_all_notes "Delete all notes"
+
+//d:A note delete prompt
+//l:popup_note_window
+//
+#define qtn_cale_quest_delete_event "Delete note?"
+
+//d:Data query for inputting the date before the notes are to be deleted.
+//l:popup_query_data_window
+//
+#define qtn_cale_prmpt_del_before_date "Delete before set date"
+
+//d:When deleting a repeated note,
+//d:the phone prompts the List_Query
+//l:heading_pane_t1
+//
+#define qtn_cale_lq_del_repeated_note "Delete repeated note"
+
+//d:After deleting of notes phone displays the information note
+//l:popup_note_window
+//
+#define qtn_cale_conf_past_note_deleted "Notes from past to set date deleted"
+
+//d:After deleting of notes phone displays the information note
+//l:popup_note_window
+//
+#define qtn_cale_conf_all_notes_deleted "All notes deleted from Calendar"
+
+//d:Erase or update note selection list of choice items
+//l:list_single_pane_t1_cp2
+//
+#define qtn_cale_lq_all_occurences "All occurrences"
+
+//d:Erase or update selection list of choice items
+//l:list_single_pane_t1_cp2
+//
+#define qtn_cale_lq_this_occurence "Only this occurrence"
+
+//d:Edit note selection list of choice items
+//l:list_single_pane_t1_cp2
+//
+#define qtn_cale_lq_edit_series "All occurrences"
+
+//d:Edit note selection list of choice items
+//l:list_single_pane_t1_cp2
+//
+#define qtn_cale_lq_edit_this "Only this occurrence"
+
+//d:Specified Out of range of date
+//l:popup_note_window
+//
+#define qtn_cale_info_year_limit "Year limit is from 1900 to 2100"
+
+//d:Error prompt for alarm date too past
+//l:popup_note_window
+//
+#define qtn_cale_date_alarm_past "Alarm date is too past"
+
+//d:Error prompt for alarm time earlier than note
+//l:popup_note_window
+//
+#define qtn_cale_later_date "Alarm later than note"
+
+//d:Error prompt for setting alarm time which is past.
+//l:popup_note_window
+//
+#define qtn_cale_not_expired "The time for the note alarm has already expired"
+
+//d:Error prompt for repeat until date earlier than start date.
+//l:popup_note_window
+//
+#define qtn_cale_info_repeat_invalid "Repeat until has to be later than the start date"
+
+//d:Confirmaiton prompt for updating start date on repeat note.
+//l:popup_note_window
+//
+#define qtn_cale_quest_change_start_day "Are you sure to change start date of selected recurring note?"
+
+//d:Error prompt "Note ends before than starts"
+//l:popup_note_window
+//
+#define qtn_cale_info_note_ends_before "Note ends before than starts"
+
+//d:Error prompt. Date limit could be set only to the past.
+//l:popup_note_window
+//
+#define qtn_cale_date_not_future "Date in the future not allowed"
+
+//d:Calendar Settings title pane
+//l:title_pane_t2/opt9
+//
+#define text_calendar_setting_title "Settings"
+
+//d:Calendar Settings main pane item
+//l:list_setting_pane_t1/opt1
+//
+#define qtn_cale_default_view "Default view"
+
+//d:Calendar Settings main pane item
+//l:list_setting_pane_t1/opt1
+//
+#define qtn_cale_week_format "Week format"
+
+//d:Calendar Settings main pane item
+//l:list_setting_pane_t1/opt1
+//
+#define text_calendar_week_title_format "Title of week view"
+
+//d: Calendar Settings "Default view" item
+//l:list_set_graphic_pane_t1
+//
+#define qtn_cale_default_day_view "Day View"
+
+//d: Calendar Settings "Default view" item
+//l:list_set_graphic_pane_t1
+//
+#define qtn_cale_default_week_view "Week View"
+
+//d: Calendar Settings "Default view" item
+//l:list_set_graphic_pane_t1
+//
+#define qtn_cale_default_month_view "Month View"
+
+//d: Calendar Settings "Title of week view" item
+//l:list_set_graphic_pane_t1
+//
+#define text_calendar_week_title_numb "Week number"
+
+//d: Calendar Settings "Title of week view" item
+//l:list_set_graphic_pane_t1
+//
+#define text_calendar_week_title_dur "Duration of week"
+
+//d:Calendar Settings "Default Mailbox" item
+//l:heading_pane_t1
+//w:
+//r:3.0
+//
+#define qtn_cale_lq_select_mailbox "Select Default Mailbox: "
+
+//d:Calendar "Default Mailbox" setting item name.
+//l:list_setting_pane_t1/opt1
+//w:
+//r:3.0
+//
+#define qtn_cale_default_mailbox "Default mailbox"
+
+//d:Calendar no default mailboxes defined prompt
+//l:popup_note_window
+//w:
+//r:3.0
+//
+#define qtn_cale_query_define_mailbox "No mailboxes defined, define now?"
+
+
+//d:Calendar Settings main pane item
+//l:list_setting_pane_t1
+//r:3.2
+//
+#define qtn_cale_sett_arabic_cale "Arabic calendar"
+
+//d:Opens external calendar application
+//l:list_single_pane_t1_cp2
+//r:3.2
+//
+#define qtn_cale_om_external_cale "External calendar"
+
+//d: Calendar date query prompt
+//l:popup_query_data_window
+//
+#define text_calendar_date_prompt "Date:"
+
+//d:Title pane text in WeekView main state
+//d:currently highlighted day's Week %N
+//d:%N was setted week number
+//l:title_pane_t2/opt9
+//
+#define qtn_cale_week_view_title "Week %N"
+
+//d:Title pane text in WeekView main state
+//d:currently highlighted day's %0U - %1U
+//d:The date of dd/mm/yy form is set to %0U or %1U.
+//l:title_pane_t2/opt9
+//
+#define qtn_cale_title_week_days "%0U -\n %1U"
+
+//d:Confirmation note.
+//d:Message is shown after system time change, but no alarms were missed.
+//l:popup_note_window
+//
+#define qtn_cale_note_system_time_changed "System time changed, Calendar events are updated accordingly"
+
+//d:Deleting wait note text
+//l:popup_note_wait_window
+//
+#define qtn_cale_wait_deleting_notes "Deleting notes..."
+
+//d:Location item text of Meeting form
+//l:list_double_graphic_heading_pane_t1
+//
+#define qtn_cale_note_meeting_location "location"
+
+//d:Calendar Settings main pane item
+//l:list_setting_pane_t1/opt1
+//
+#define qtn_chi_cale_sett_lunar_cale "Lunar calendar"
+
+//d: Calendar Settings "Lunar calendar" item
+//l:list_set_graphic_pane_t1
+//
+#define qtn_chi_cale_lunar_cale_on "On"
+
+//d: Calendar Settings "Lunar calendar" item
+//l:list_set_graphic_pane_t1
+//
+#define qtn_chi_cale_lunar_cale_off "Off"
+
+//d:Chinese Animal year - Rat
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_animal_rat "Year of the Rat"
+
+//d:Chinese Animal year - Ox
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_animal_ox "Year of the Ox"
+
+//d:Chinese Animal year - Tiger
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_animal_tiger "Year of the Tiger"
+
+//d:Chinese Animal year - Rabbit
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_animal_rabbit "Year of the Rabbit"
+
+//d:Chinese Animal - Rabbit
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_animal_dragon "Year of the Dragon"
+
+//d:Chinese Animal - Snake
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_animal_snake "Year of the Snake"
+
+//d:Chinese Animal - Horse
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_animal_horse "Year of the Horse"
+
+//d:Chinese Animal - Sheep
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_animal_sheep "Year of the Sheep"
+
+//d:Chinese Animal - Monkey
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_animal_monkey "Year of the Monkey"
+
+//d:Chinese Animal - Rooster
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_animal_rooster "Year of the Rooster"
+
+//d:Chinese Animal - Dog
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_animal_dog "Year of the Dog"
+
+//d:Chinese Animal - Pig
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_animal_pig "Year of the Pig"
+
+//d:Chinese Heavenly stem 1
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_heav_stem_1 "Jia"
+
+//d:Chinese Heavenly stem 2
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_heav_stem_2 "Yi"
+
+//d:Chinese Heavenly stem 3
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_heav_stem_3 "Bing"
+
+//d:Chinese Heavenly stem 4
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_heav_stem_4 "Ding"
+
+//d:Chinese Heavenly stem 5
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_heav_stem_5 "Wu"
+
+//d:Chinese Heavenly stem 6
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_heav_stem_6 "Ji"
+
+//d:Chinese Heavenly stem 7
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_heav_stem_7 "Geng"
+
+//d:Chinese Heavenly stem 8
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_heav_stem_8 "Xing"
+
+//d:Chinese Heavenly stem 9
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_heav_stem_9 "Reng"
+
+//d:Chinese Heavenly stem 10
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_heav_stem_10 "Gui"
+
+//d:Chinese Terrestrial branch 1
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_terr_branch_1 "Zi"
+
+//d:Chinese Terrestrial branch 2
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_terr_branch_2 "Chou"
+
+//d:Chinese Terrestrial branch 3
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_terr_branch_3 "Yin"
+
+//d:Chinese Terrestrial branch 4
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_terr_branch_4 "Mao"
+
+//d:Chinese Terrestrial branch 5
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_terr_branch_5 "Chen"
+
+//d:Chinese Terrestrial branch 6
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_terr_branch_6 "Si"
+
+//d:Chinese Terrestrial branch 7
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_terr_branch_7 "Wu"
+
+//d:Chinese Terrestrial branch 8
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_terr_branch_8 "Wei"
+
+//d:Chinese Terrestrial branch 9
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_terr_branch_9 "Shen"
+
+//d:Chinese Terrestrial branch 10
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_terr_branch_10 "You"
+
+//d:Chinese Terrestrial branch 11
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_terr_branch_11 "Xu"
+
+//d:Chinese Terrestrial branch 12
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_terr_branch_12 "Hai"
+
+//d:Chinese solar items 1
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_solar_item_1 "Li Chun"
+
+//d:Chinese solar items 2
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_solar_item_2 "Yu Shui"
+
+//d:Chinese solar items 3
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_solar_item_3 "Jing Zhe"
+
+//d:Chinese solar items 4
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_solar_item_4 "Chun Fen"
+
+//d:Chinese solar items 5
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_solar_item_5 "Qing Ming"
+
+//d:Chinese solar items 6
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_solar_item_6 "Gu Yu"
+
+//d:Chinese solar items 7
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_solar_item_7 "Li Xia"
+
+//d:Chinese solar items 8
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_solar_item_8 "Xiao Man"
+
+//d:Chinese solar items 9
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_solar_item_9 "Mang Zhong"
+
+//d:Chinese solar items 10
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_solar_item_10 "Xia Zhi"
+
+//d:Chinese solar items 11
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_solar_item_11 "Xiao Shu"
+
+//d:Chinese solar items 12
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_solar_item_12 "Da Shu"
+
+//d:Chinese solar items 13
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_solar_item_13 "Li Qiu"
+
+//d:Chinese solar items 14
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_solar_item_14 "Chu Shu"
+
+//d:Chinese solar items 15
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_solar_item_15 "Bai Lu"
+
+//d:Chinese solar items 16
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_solar_item_16 "Qiu Fen"
+
+//d:Chinese solar items 17
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_solar_item_17 "Han Lu"
+
+//d:Chinese solar items 18
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_solar_item_18 "Shuang Jiang"
+
+//d:Chinese solar items 19
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_solar_item_19 "Li Dong"
+
+//d:Chinese solar items 20
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_solar_item_20 "Xiao Xue"
+
+//d:Chinese solar items 21
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_solar_item_21 "Da Xue"
+
+//d:Chinese solar items 22
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_solar_item_22 "Dong Zhi"
+
+//d:Chinese solar items 23
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_solar_item_23 "Xiao Han"
+
+//d:Chinese solar items 24
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_solar_item_24 "Da Han"
+
+//d:Lunar festivals 1
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_festival_name_1 "Spring festival"
+
+//d:Lunar festivals 2
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_festival_name_2 "Lantern festival"
+
+//d:Lunar festivals 3
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_festival_name_3 "Dragon boat festival"
+
+//d:Lunar festivals 4
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_festival_name_4 "Seventh night festival"
+
+//d:Lunar festivals 5
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_festival_name_5 "Ghost festival"
+
+//d:Lunar festivals 6
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_festival_name_6 "Mid autumn festival"
+
+//d:Lunar festivals 7
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_festival_name_7 "Double ninth festival"
+
+//d:Lunar festivals 8
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_festival_name_8 "Eighth day of twelfth month festival"
+
+//d:Lunar festivals 9
+//l:navi_text_pane_t1
+//
+#define qtn_chi_cale_festival_name_9 "New year's eve"
+
+//d:Opens Lunar data dialog
+//l:list_single_pane_t1_cp2
+//
+#define qtn_chi_cale_lunar_data "Show lunar data"
+
+//d:Title pane sting in "Show lunar data" dialog
+//l:heading_pane_t1
+//
+#define qtn_chi_cale_lunar_calendar "Lunar calendar"
+
+//d:Calendar Settings main pane item
+//l:list_setting_pane_t1
+//
+#define qtn_cale_alarm_tone "Calendar alarm tone"
+
+//d: Empty listbox
+//l: main_list_empty_pane
+//
+#define qtn_cale_no_events "(No Events)"
+
+//d: The subject text when the item subject is empty in DayView
+//l: list_single_heading_pane_t1
+//
+#define qtn_cale_no_subject "<Unnamed>"
+
+//d: Profile Settings Item Edit - setting selection data
+//l: list_set_graphic_pane_t1
+#define qtn_tc_off "Off"
+
+//d: File list dialog header
+//l: heading_pane_t1
+#define qtn_tc_popup_heading "Select tone: "
+
+//d:Default tone selection choice in alarm tone list for Calendar and Clock
+//l:list_set_graphic_pane_t1
+//
+#define qtn_mode_default_tone "Default tone"
+
+//d:Options menu item.
+//d:Opens Add Description submenu in note editor
+//l:list_single_pane_t1_cp2
+//
+#define qtn_cale_om_add_descript "Add Description"
+
+//d:Submenu item for adding new description text to Calendar entry
+//d:Opens Notepad Editor.
+//l:list_single_popup_submenu_pane_t1
+//
+#define qtn_cale_om_descript_new "New"
+
+//d:Submenu item for adding description text to Calendar entry
+//d:from existing Notepad memos. Launches Notepad memo fetch.
+//l:list_single_popup_submenu_pane_t1
+//
+#define qtn_cale_om_descript_exist "Use existing"
+
+//d:Options menu item.
+//d:Shows Calendar entry description text in Notepad viewer.
+//d:Opens Notepad viewer.
+//l:list_single_pane_t1_cp2
+//
+#define qtn_cale_om_desc_show "Show Description"
+
+//d:Options menu item.
+//d:Removes description text from Calendar entry.
+//d:Launches confirmation query before removing.
+//l:list_single_pane_t1_cp2
+//
+#define qtn_cale_om_desc_remove "Remove Description"
+
+//d:Title text, when editing Calendar description in Notepad
+//l:title_pane_t2/opt9
+//
+#define qtn_cale_note_title "Calendar Description"
+
+//d:Confirmation text, when deleting Calendar description data from
+//d:Notepad editor
+//l:popup_note_window
+//
+#define qtn_cale_q_del_notep_desc "Delete Calendar Description?"
+
+//d:Informatio note text shown, when Calendar description is deleted from
+//d:Notepad editor or viewer
+//l:popup_note_window
+//
+#define qtn_cale_inote_desc_del_memo "Calendar description deleted"
+
+//d:Confirmation text, when deleting Calendar description data from
+//d:Calendar meeting editor
+//l:popup_note_window
+//
+#define qtn_cale_query_remove_descr "Remove Description?"
+
+//d:Header text for Description form item.
+//d:One truncated line of description is visible below this.
+//l:data_form_wide_pane_t1
+//
+#define qtn_cale_meeting_description "Description"
+
+//d:Title text of title pane
+//d:Note View
+//l:title_pane_t2/opt9
+//
+#define qtn_todo_note_header "To-Do Note"
+
+//d:Command in options menu.
+//d:Delete the selected item.
+//l:list_single_pane_t1_cp2
+//
+#define qtn_todo_om_delete "Delete"
+
+//d:Command in options sub-menu.
+//d:Set a priority high to selected item.
+//l:list_form_graphic_pane_t1
+//
+#define qtn_todo_attr_high "High"
+
+//d:Command in options sub-menu.
+//d:Set a priority normal to selected item.
+//l:list_form_graphic_pane_t1
+//
+#define qtn_todo_attr_normal "Normal"
+
+//d:Command in options sub-menu.
+//d:Set a priority low to selected item.
+//l:list_form_graphic_pane_t1
+//
+#define qtn_todo_attr_low "Low"
+
+//d:Command in options menu.
+//d:Marked the To-Do item done in List View
+//l:list_single_pane_t1_cp2
+//
+#define qtn_todo_cmd_task_completed "Task completed"
+
+//d:Command in options menu.
+//d:Unmarked the To-Do item done in List View
+//l:list_single_pane_t1_cp2
+//
+#define qtn_todo_cmd_restore_task "Restore task"
+
+//d:Confirmation query prompt.
+//d:Deleting the selected one note.
+//l:popup_note_window
+//
+#define qtn_todo_quest_delete_note "Delete note?"
+
+//d:Confirmation query prompt.
+//d:Deleting the marked one or more notes.
+//l:popup_note_window
+//
+#define qtn_todo_quest_delete_notes "Delete\n%N notes?"
+
+//d:Wait note text in deleting items.
+//l:popup_note_wait_window
+//
+#define qtn_todo_wait_deleting_notes "Deleting notes..."
+
+//d:Item texts of form
+//d:Priority field of To-Do Note form
+//l:list_double_graphic_heading_pane_t1
+//
+#define qtn_todo_note_view_priority "priority"
+
+//d:Item texts of form
+//d:Due date field of To-Do Note form
+//l:list_double_graphic_heading_pane_t1
+//
+#define qtn_todo_note_duedate "due date"
+
+//d:Item texts of form
+//d:Subject field of To-Do Note form
+//l:list_double_graphic_heading_pane_t1
+//
+#define qtn_todo_note_subject "subject"
+
+//d: Information note text shown in Calendar application start,
+//d: when alarms have been passed due system time change
+//l:popup_note_window
+//w:
+//r:3.0
+#define qtn_cale_note_missed_alarms "1 or more alarms missed due to time change"
+
+//d: Setting item choice to select Todo view as Calendar default view
+//l:list_set_graphic_pane_t1
+//w:
+//r:3.0
+//
+#define qtn_cale_default_todo_view "Todo view"
+
+
+//d: Options Submenu item to create new Todo note
+//l:list_single_popup_submenu_pane_t1
+//w:
+//r:3.0
+#define qtn_cale_note_todo "Todo"
+
+//d: Confirmation note shown, when edited Todo note is saved
+//l:popup_note_window
+//w:
+//r:3.0
+#define qtn_cale_note_todo_saved "Todo Note saved"
+
+//d: Options menu item to open Calendar day view from Todo view
+//l:list_single_pane_t1_cp2
+//w:
+//r:3.0
+#define qtn_cale_opt_view_day "Day view"
+
+//d: Options menu item to open Todo view from other Calendar views
+//l:list_single_pane_t1_cp2
+//w:
+//r:3.0
+#define qtn_cale_opt_view_todo "Todo view"
+
+//d: Title pane text for Calendar Todo view that shows all users Todo entries
+//l:title_pane_t2/opt9
+//w:
+//r:3.0
+#define qtn_cale_title_todos "All Todos"
+
+//d:Snooze time setting header.
+//l:list_setting_pane_t1/opt1
+//w:
+//r:3.1
+#define qtn_cale_set_snooze_time "Calendar Alarm Snooze Time"
+
+//d:Context-specific text for the current snooze time value in Calendar Settings.
+//l:setting_slider_pane_t2
+//w:
+//r:3.1
+#define qtn_sanim_time_out_slider_ykcur "1 minute"
+
+//d:Context-specific text for the current snooze time value in Calendar Settings.
+//d:%U in minutes, plural.
+//l:list_set_graphic_pane_t1
+//w:
+//r:3.1
+#define qtn_cale_sanim_time_out_slider_cur "%U minutes"
+
+//d:Context-specific text for the minimum snooze time value in Calendar Settings.
+//l:setting_slider_pane_t2
+//w:
+//r:3.1
+#define qtn_cale_sanim_time_out_slider_min "1 min."
+
+//d:Context-specific text for the maximum snooze time value in Calendar Settings.
+//l:setting_slider_pane_t2
+//w:
+//r:3.1
+#define qtn_snooze_time_max "60 min."
+
+
+//d: Format string for lunar calendar information in Calendar day, week and month views
+//d: Format string is used dynamically to display as much information as possible.
+//d: If all information doesn't fit some information and separators are dropped.
+//d: Localization can affect order of information.
+//d: If data element is dropped, empty string is supplied for it.
+//d: and either for preceding (or following) separator (%0U)
+//d:
+//d: e.g. in Chinese, order should be somethinglike (201030405): "%2U%0U%1U%0U%3U%0U%4U%0U%5U"
+//d: e.g. in Vietnamese, (304050201): "%3U%0U%4U%0U%5U%0U%2U%0U%1U"
+//d: %0U separator between data elements, qtn_cale_lunar_separator
+//d: %1U animal year format, qtn_cale_animal_year_in_extra_row
+//d: %2U lunar year, qtn_cale_lunar_year
+//d: %3U lunar date, either qtn_cale_lunar_date or qtn_cale_lunar_leap_date
+//d: %4U festival, qtn_chi_cale_festival_name_X
+//d: %5U solar term, qtn_chi_cale_solar_item_X
+//l: None
+//w:
+//r:3.2
+//
+#define qtn_cale_extra_row_lunar "%1U%0U%2U%0U%3U%0U%4U%0U%5U"
+
+
+//d: Separator between data elements in Lunar Calendar extra row.
+//d: E.g. in Chinese, " "
+//d: E.g. in Vietnamese, ", "
+//l: (None)
+//w:
+//r:3.2
+//
+#define qtn_cale_lunar_separator ", "
+
+
+//d: Chinese lunar date with day, month and year.
+//d: %0U is lunar date. either qtn_cale_lunar_date or qtn_cale_lunar_leap_date
+//d: %1U lunar year. qtn_cale_lunar_year
+//d:
+//l: (None)
+//w:
+//r:3.2
+//
+#define qtn_cale_lunar_full_date "%0U %1U"
+
+
+//d: Chinese lunar date for dates. Used for non-leap month dates.
+//d: Localication can add language specific separator and extra symbols.
+//d: E.g. in Chinese, character for month should be used: "%0U·%1U"
+//d: E.g. in Vietnamese, order is different and separator is slash "%1U/%0U"
+//d: %0U is lunar month
+//d: %1U lunar day
+//l: (None)
+//w:
+//r:3.2
+//
+#define qtn_cale_lunar_date "%0U/%1U"
+
+
+//d: Chinese lunar date for dates that are on leap months.
+//d: This should be similar to qtn_cale_lunar_date,
+//d: but language specific leap month indicator should be added to correct place.
+//d: E.g. in Vietnamese: "%1U/%0U N"
+//d: %0U is lunar month
+//d: %1U lunar day
+//l: (None)
+//w:
+//r:3.2
+//
+#define qtn_cale_lunar_leap_date "%0UL/%1U"
+
+
+//d: Chinese lunar year, combination of heavenly stem and terrestial branch
+//d: %0U is heavenly stem (qtn_chi_cale_heav_stem_X)
+//d: %1U is terrestial branch (qtn_chi_cale_terr_branch_X)
+//d: Localization can add language specific separator between words
+//d: and if words are written together, space can be removed (e.g. in Chinese).
+//d: E.g. in Chinese "%0U%1U·"
+//d: E.g. in Vietnamese "Nam %0U %1U"
+//l: (None)
+//w:
+//r:3.2
+//
+#define qtn_cale_lunar_year "%0U %1U"
+
+
+//d: Heading text for chinese festival
+//d: in Lunar calendar information pop-up.
+//d: It's not shown for dates that do not have festival.
+//l: list_single_pane_t1
+//w:
+//r:3.2
+//
+#define qtn_cale_lunar_info_festival "Festival:"
+
+
+//d: Heading text for chinese solar term
+//d: in Lunar calendar information pop-up.
+//d: It's not shown for dates that do not have solar term.
+//l: list_single_pane_t1
+//w:
+//r:3.2
+//
+#define qtn_cale_lunar_info_solar "Solar term:"
+
+
+//d: Heading text for chinese lunar calendar date
+//d: in Lunar calendar information pop-up.
+//d: Data for this header is qtn_cale_lunar_full_date.
+//l: list_single_pane_t1
+//w:
+//r:3.2
+//
+#define qtn_cale_info_lunar_date "Lunar date:"
+
+
+//d: Heading text for animal year
+//d: in Lunar calendar information pop-up.
+//d: Data for this header is qtn_chi_cale_animal_X
+//l: list_single_pane_t1
+//w:
+//r:3.2
+//
+#define qtn_cale_info_animal_year "Animal year:"
+
+
+//d: Heading text for Gregorian (normal) date
+//d: in Lunar calendar information pop-up.
+//d: Data for this header is qtn_date_usual_with_zero
+//l: list_single_pane_t1
+//w:
+//r:3.2
+//
+#define qtn_cale_info_western_date "Gregorian date:"
+
+
+//d: Year of Cat.
+//d: In Vietnamese Lunar Calendar, year of rabbit of Chinese Lunar Calendar is instead a year of cat.
+//l: list_single_pane_t1_cp2
+//w:
+//r:3.2
+//
+#define qtn_chi_cale_animal_cat "Year of the Cat"
+
+
+//d: Setting item header for Thai Buddhist year display.
+//d: Values are On and Off.
+//d: If setting is on, Buddhist year is shown on
+//d: separate area in month, week and day views
+//l: list_set_graphic_pane_t1
+//w:
+//r:3.2
+//
+#define qtn_cale_sett_thai_year "Show Buddhist year"
+
+//d: Database conflict note: entry was deleted by other application
+//l: popup_note_window
+//r: 3.2/5.0
+#define qtn_cale_note_db_conflict "Calendar database conflict. This entry has been deleted by another application."
+
+//d: Database conflict note: entry was modified by other application
+//l: popup_note_window
+//r: 3.2/5.0
+#define qtn_cale_note_db_modified "Calendar database conflict. This entry has been modified by another application."
+
+//d: Menu item for grouping views.
+//d: Values are month, week, day and todo.
+//l: list_single_pane_t1_cp2
+//w:
+//r:4.0
+//
+#define qtn_cale_opt_change_view "Change view"
+
+//d: Menu item for changing to month view.
+//d: Value is month.
+//l: list_single_popup_submenu_pane_t1
+//w:
+//r:4.0
+//
+#define qtn_cale_opt_change_month "Month"
+
+//d: Menu item for changing to week view.
+//d: Value is week.
+//l: list_single_popup_submenu_pane_t1
+//w:
+//r:4.0
+//
+#define qtn_cale_opt_change_week "Week"
+
+//d: Menu item for changing to day view.
+//d: Value is day.
+//l: list_single_popup_submenu_pane_t1
+//w:
+//r:4.0
+//
+#define qtn_cale_opt_change_day "Day"
+
+//d: Menu item for changing to todo view.
+//d: Value is todo.
+//l: list_single_popup_submenu_pane_t1
+//w:
+//r:4.0
+//
+#define qtn_cale_opt_change_todo "To-Do"
+
+//d: Tooltip text for previous view button.
+//l: popup_preview_text_window_t1
+//w:
+//r:3.2
+//
+#define qtn_cale_tooltip_prev_view "Previous view"
+
+//d: Tooltip text for month view button.
+//l: popup_preview_text_window_t1
+//w:
+//r:3.2
+//
+#define qtn_cale_tooltip_month_view "Month view"
+
+//d: Tooltip text for week view button.
+//l: popup_preview_text_window_t1
+//w:
+//r:3.2
+//
+#define qtn_cale_tooltip_week_view "Week view"
+
+//d: Tooltip text for day view button.
+//l: popup_preview_text_window_t1
+//w:
+//r:3.2
+//
+#define qtn_cale_tooltip_day_view "Day view"
+
+//d: Tooltip text for todo view button.
+//l: popup_preview_text_window_t1
+//w:
+//r:3.2
+//
+#define qtn_cale_tooltip_todo_view "ToDo view"
+
+//d: Tooltip text for next view button.
+//l: popup_preview_text_window_t1
+//w:
+//r:3.2
+//
+#define qtn_cale_tooltip_next_view "Next view"
+
+//d: Tooltip text for new entry button.
+//l: popup_preview_text_window_t1
+//w:
+//r:3.2
+//
+#define qtn_cale_tooltip_new_entry "New entry"
+
+//d: New note query heading, which shows up when MSK is pressed, when day view or to do view is empty
+//d: Value is New Entry
+//l: heading_pane_t1
+//w:
+//r:5.0
+//
+#define qtn_cale_lq_new_entry "New entry"
+
+//d: List item in new note query, which shows up when MSK is pressed when day view or to do view is empty
+//d: Value is meeting
+//l: list_single_pane_t1_cp2
+//w:
+//r:5.0
+//
+#define qtn_cale_lq_new_meeting "Meeting"
+
+//d: List item in new note query, which shows up when MSK is pressed when day view or to do view is empty
+//d: Value is mr
+//l: list_single_pane_t1_cp2
+//w:
+//r:5.0
+//
+#define qtn_cale_lq_new_mr "Meeting Request"
+
+//d: List item in new note query, which shows up when MSK is pressed when day view or to do view is empty
+//d: Value is memo
+//l: list_single_pane_t1_cp2
+//w:
+//r:5.0
+//
+#define qtn_cale_lq_new_memo "Memo"
+
+//d: List item in new note query, which shows up when MSK is pressed when day view or to do view is empty
+//d: Value is anniv
+//l: list_single_pane_t1_cp2
+//w:
+//r:5.0
+//
+#define qtn_cale_lq_new_anniversary "Anniversary"
+
+//d: List item in new note query, which shows up when MSK is pressed, when day view or to do view is empty
+//d: Value is todo
+//l: list_single_pane_t1_cp2
+//w:
+//r:5.0
+//
+#define qtn_cale_lq_new_todo "To-Do"
+
+//d: Edits a note
+//d: Value is Edit
+//l: list_single_pane_t1_cp2
+//r 3.2
+//
+#define qtn_cale_om_edit "Edit"
+
+//d: Calendar Go to date query prompt
+//l: popup_query_data_window_t3/opt2
+//
+#define qtn_cale_go_to_date "Go to date:"
+
+//d: Msk label displayed in Todo/Day view when there are no events for a day
+//d: Value is New
+//l: control_pane_t3/opt7
+//r: 5.0
+//
+#define qtn_cale_msk_new_entry "New"
+
+//d: Tooltip text for Next View
+//l: popup_preview_text_window_t1
+//w:
+//r: 5.0
+//
+#define qtn_cale_tb_next_view "Next view"
+
+//d: Tooltip text for New Meeting
+//l: popup_preview_text_window_t1
+//w:
+//r: 5.0
+//
+#define qtn_cale_tb_new_meeting "New meeting"
+
+//d: Tooltip text for New ToDo
+//l: popup_preview_text_window_t1
+//w:
+//r: 5.0
+//
+#define qtn_cale_tb_new_todo "New to-do"
+
+//d:Long tap on day opens Long tap menu to create new Meeting note
+//l:list_single_pane_t1_cp2
+//w:
+//r: 5.0
+//
+#define qtn_cale_long_tap_meeting "New meeting"
+
+//d:Long tap on day opens Long tap menu to create new Anniversary Note
+//l:list_single_pane_t1_cp2
+//w:
+//r: 5.0
+//
+#define qtn_cale_long_tap_anniversary "New anniversary"
+
+//dLong tap on day opens Long tap menu to create new Day Note
+//l:list_single_pane_t1_cp2
+//w:
+//r: 5.0
+//
+#define qtn_cale_long_tap_memo "New memo"
+
+//d: Long tap on day opens Long tap menu to create new Todo note
+//l:list_single_pane_t1_cp2
+//w:
+//r: 5.0
+//
+#define qtn_cale_long_tap_todo "New todo"
+
+//d: Format string for data shown in preview pane
+//d: %0U is start time
+//d: %1U is hyphen or space
+//d: %2U is end time
+//d: %3U is subject
+//d: %4U is location
+//d: %5U is description
+//d: %6U is language specific separator
+//d: %7U is space
+//l: list_single_fp_cale_pane_t2/opt1
+//w:
+//r: 5.0
+//
+#define qtn_cale_pane_event_data "%0U%1U%2U%7U%3U%6U%4U%6U%5U"
+
+//d: Title for the preview pane
+//d: %0U is currently focused week day
+//d: %1U is currently focused date
+//l: popup_fixed_preview_cale_window_t1
+//w:
+//r: 5.0
+//
+#define qtn_cale_pane_title "%0U %1U"
+
+//d: No events in preview pane
+//l: popup_fixed_preview_cale_window_t2/opt1
+//w:
+//r: 5.0
+//
+#define qtn_cale_pane_no_events "(No events)"
+
+//d: Popup Event Separator
+//l: None
+//w:
+//r: 5.0
+//
+#define qtn_cale_popup_event_separator ","
+
+//d: Options menu item for clearing a missed alarm
+//l: list_single_pane_t1_cp2
+//w:
+//r: 5.0
+#define qtn_cale_mav_opt_clear "Clear"
+
+//d: Options menu items for clearing all the missed alarms
+//l: list_single_pane_t1_cp2
+//w:
+//r: 5.0
+#define qtn_cale_mav_opt_clear_all "Clear all"
+
+//d: Go to previous view from where Missed Alarms View is launched
+//l: list_single_pane_t1_cp2
+//w:
+//r: 5.0
+#define qtn_cale_mav_opt_goto_cale "Go to Calendar"
+
+//d: Options menu item to open Calendar's Missed Alarms View
+//l: list_single_pane_t1_cp2
+//w:
+//r: 5.0
+#define qtn_cale_opt_mav "Missed alarms"
+
+//d: Title pane text for Calendar's Missed Alarms view that shows all the missed alarms
+//l: title_pane_t2/opt9
+//w:
+//r: 5.0
+#define qtn_cale_title_missed_alarms "Missed Alarms"
+
+//d: Start date and time of the missed alarm event
+//l: list_double_graphic_pane_t2
+//w:
+//r: 5.0
+#define qtn_cale_mav_start_time "%0U %1U"
+
+//d: Tooltip text for Clearing a Missed Alarm
+//l: popup_preview_text_window_t1
+//w:
+//r: 5.0
+//
+#define qtn_cale_mav_tb_clear "Clear"
+
+//d: Tooltip text for Clearing all the Missed Alarms
+//l: popup_preview_text_window_t1
+//w:
+//r: 5.0
+//
+#define qtn_cale_mav_tb_clearall "Clear all"
+
+//d: Tooltip text for activating the previous view from where Missed Alarms View is launched
+//l: popup_preview_text_window_t1
+//w:
+//r: 5.0
+//
+#define qtn_cale_mav_tb_goto_cale "Go to Calendar"
+
+//d: Query for viewing the missed alarms view for one missed alarm
+//l: popup_note_window
+//w:
+//r: 5.0
+//
+#define qtn_cale_query_view_missed "One missed Calendar event.Do you want to view it?"
+
+//d: Query for viewing the missed alarms view for multiple missed alarms
+//l: popup_note_window
+//w:
+//r: 5.0
+//
+#define qtn_cale_query_view_missed_n "%N missed Calendar events.Do you want to view them?"
+
+//d: The subject text when the item subject is empty in Missed alarms view
+//l: list_double_large_graphic_pane_t1
+//w:
+//r: 5.0
+//
+#define qtn_cale_mav_unnamed "(Unnamed)"
+
+//d:Command in stylus popup menu.
+//d:Marked the To-Do item done in List View and Preview popup.
+//l:list_single_touch_menu_pane_t1
+//w:
+//r: 5.0
+//
+#define qtn_cale_stylus_popup_cmd_task_completed "Mark as done"
+
+//d:Command in stylus popup menu.
+//d:Unmarked the To-Do item done in List View.
+//l:list_single_touch_menu_pane_t1
+//w:
+//r: 5.0
+//
+#define qtn_cale_stylus_cmd_restore_task "Mark as not done"
+
+//d:Command in stylus popup menu.
+//d:Delete the selected item.
+//l:list_single_touch_menu_pane_t1
+//w:
+//r: 5.0
+//
+#define qtn_cale_stylus_popup_delete "Delete"
+
+//d:Command in stylus popup menu.
+//d:Send the selected item.
+//l:list_single_touch_menu_pane_t1
+//w:
+//r: 5.0
+//
+#define qtn_cale_stylus_popup_send "Send"
+
+//d:Command in stylus popup menu.
+//d:Mark-operation. Marks selected item.
+//l:list_single_touch_menu_pane_t1
+//w:
+//r: 5.0
+//
+#define qtn_cale_stylus_popup_mark "Mark"
+
+//d:Command in stylus popup menu.
+//d:Unmark-operation. Unmarks selected marked item.
+//l:list_single_touch_menu_pane_t1
+//w:
+//r: 5.0
+//
+#define qtn_cale_stylus_popup_unmark "Unmark"
+
+//d: Tooltip text for editing current calendar note
+//l: popup_preview_text_window_t1
+//w:
+//r: 5.0
+//
+#define qtn_cale_tb_edit "Edit"
+
+//d: Tooltip text for deleting current calendar note
+//l: popup_preview_text_window_t1
+//w:
+//r: 5.0
+//
+#define qtn_cale_tb_delete "Delete"
+
+//d: Tooltip text for sending calendar note
+//l: popup_preview_text_window_t1
+//w:
+//r: 5.0
+//
+#define qtn_cale_tb_send "Send"
+
+//d: Default tone selection choice in alarm tone list for Calendar and Clock
+//l: list_single_graphic_pane_t1_cp2
+//w:
+//r: 5.0
+#define qtn_cale_tc_no_personal_tone "Default tone"
+
+//d: "Off" tone selection choice in alarm tone list for Calendar and Clock
+//l: list_single_graphic_pane_t1_cp2
+//w:
+//r: 5.0
+#define qtn_cale_tc_none "Off"
+
+//d:Opens Maps application for choosing new location
+//l:list_single_pane_t1_cp2
+//w:
+//r: 5.1
+#define qtn_cale_om_assign_from_map "Assign from map"
+
+//d: Msk label displayed in Editors when there is no map location
+//d: Value is From map
+//l: control_pane_t3/opt7
+//r: 5.1
+//
+#define text_softkey_from_map "From map"
+
+//d:Opens Maps application for choosing new location
+//l:list_single_pane_t1_cp2
+//w:
+//r: 5.1
+#define qtn_cale_om_find_on_map "Find on map"
+
+//d:Opens Maps application fto show the location
+//l:list_single_pane_t1_cp2
+//w:
+//r: 5.1
+#define qtn_cale_om_show_on_map "Show on map"
+
+//d:Shows Update location query
+//l:heading_pane_t1
+//w:
+//r: 5.1
+#define qtn_cale_update_location "Update location:"
+
+//d:Adds selected address to existing location details
+//l:list_single_pane_t1_cp2
+//w:
+//r: 5.1
+#define qtn_cale_addto_existing_location "Add to existing"
+
+//d:Replaces existing location details with selected address
+//l:list_single_pane_t1_cp2
+//w:
+//r: 5.1
+#define qtn_replace_existing_location "Replace existing"
+
+//d:Confirmation query prompt.
+//d:Replace the exisitng map location with new one
+//d: %0U is the name of the location with which existing one is being replaced
+//l:popup_note_window
+//w:
+//r: 5.1
+#define qtn_cale_confirm_change_address "Update Address to %U?"
+
+//d: Confirmation note shown, when address is replaced with new one
+//l:popup_note_window
+//w:
+//r:5.1
+#define qtn_cale_note_address_updated "Address Updated"
+
+//d: Confirmation note shown, when address with coordinates is manually changed
+//l:popup_note_window
+//w:
+//r:5.1
+#define qtn_cale_confirm_keep_coordinates "Address will be updated. Keep existing map location?"
+
+//d:Context-specific text for the current snooze time value in Calendar Settings.
+//l:list_set_graphic_pane_t1
+//w:
+//r:3.1
+#define qtn_cale_sanim_time_out_slider_ykcur "1 minute"
+
+//d:Context-specific text for the current snooze time value in Calendar Settings.
+//d:%U in minutes, plural.
+//l:setting_slider_pane_t2
+//w:
+//r:3.1
+#define qtn_set_cale_sanim_time_out_slider_cur "%U minutes"
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/regionalplugins/lunarchinese/data/2002EA3C.rss Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,69 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Calendar Lunar Plugin
+*
+*/
+
+#ifndef CALENLUNARPLUGINREG_H
+#define CALENLUNARPLUGINREG_H
+
+#include <ecom/registryinfov2.rh>
+#include "calendarregionalplugin.loc"
+
+#include "calenregionalpluginuids.h"
+
+RESOURCE REGISTRY_INFO registry_info
+ {
+ resource_format_version = RESOURCE_FORMAT_VERSION_2;
+ dll_uid = CALENLUNARCHINESEPLUGIN_DLL_UID;
+ interfaces =
+ {
+ INTERFACE_INFO
+ {
+ interface_uid = CALENUIPLUGININTERFACE_ECOM_INTERFACE_UID;
+ implementations =
+ {
+ IMPLEMENTATION_INFO
+ {
+ implementation_uid = CALENLUNARPLUGIN_CHINESE_IMPLEMENTATION_UID;
+ version_no = 1;
+ display_name = qtn_chi_cale_sett_lunar_cale;
+ // Supported languages can be inserted as follows:
+ // "language(1)||language(14)||language(151)
+ // Numbers can be Symbian language codes (TLanguage)
+ // or S60 extensions (151,161...) to them
+ //
+ // Plugin is loaded only when current phone language
+ // is one of the listed languages.
+ //
+ // If plugin should be loaded for all languages, then
+ // language(*) can be defined,
+ // 29 Chinese (Taiwan)
+ // 30 Chinese (Hongkong)
+ // 31 Chinese (PRC)
+ // 157 English (Taiwan)
+ // 158 English (Hongkong)
+ // 159 English (PRC)
+ //default_data = "language(29)||language(30)||language(31)";
+ default_data = "language(1)";
+ opaque_data = "";
+ }
+ };
+ }
+ };
+ }
+
+#endif //CALENLUNARPLUGINREG_H
+
+// End of file
--- a/calendarui/regionalplugins/lunarchinese/data/CalenLunarChinesePluginData.rss Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/regionalplugins/lunarchinese/data/CalenLunarChinesePluginData.rss Mon May 03 12:30:32 2010 +0300
@@ -22,7 +22,7 @@
#include <avkon.rh>
#include <avkon.rsg>
-#include <Calendar.loc>
+#include "calendarregionalplugin.loc"
NAME CLU2
--- a/calendarui/regionalplugins/lunarchinese/data/hb_calenlunarchineseplugin.rss Fri Apr 16 14:57:40 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Calendar Lunar Plugin
- *
-*/
-
-
-
-#include "CalenRegionalPluginUids.h"
-
-#include <ecom/registryinfo.rh>
-//#include <RegistryInfoV2.rh>
-#include <calendar.loc>
-
-RESOURCE REGISTRY_INFO registry_info
- {
- dll_uid = CALENLUNARCHINESEPLUGIN_DLL_UID;
- interfaces =
- {
- INTERFACE_INFO
- {
- interface_uid = CALENUIPLUGININTERFACE_ECOM_INTERFACE_UID;
- implementations =
- {
- IMPLEMENTATION_INFO
- {
- implementation_uid = CALENLUNARPLUGIN_CHINESE_IMPLEMENTATION_UID;
- version_no = 1;
- display_name = qtn_chi_cale_sett_lunar_cale;
- // Supported languages can be inserted as follows:
- // "language(1)||language(14)||language(151)
- // Numbers can be Symbian language codes (TLanguage)
- // or S60 extensions (151,161...) to them
- //
- // Plugin is loaded only when current phone language
- // is one of the listed languages.
- //
- // If plugin should be loaded for all languages, then
- // language(*) can be defined,
- // 29 Chinese (Taiwan)
- // 30 Chinese (Hongkong)
- // 31 Chinese (PRC)
- // 157 English (Taiwan)
- // 158 English (Hongkong)
- // 159 English (PRC)
- //default_data = "language(29)||language(30)||language(31)";
- default_data = "language(1)";
- opaque_data = "";
- }
- };
- }
- };
- }
-
-// End of file
--- a/calendarui/regionalplugins/lunarchinese/inc/CalenLunarChinesePlugin.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/regionalplugins/lunarchinese/inc/CalenLunarChinesePlugin.h Mon May 03 12:30:32 2010 +0300
@@ -21,20 +21,12 @@
#define __CALENLUNARCHINESEPLUGIN_H__
//SYSTEM INCLUDES
-#include <e32base.h>
#include <ecom.h>
-#include <ConeResLoader.h>
-
-#include <QtGui>
-
-#include <hblabel.h>
//CALENDAR INCLUDES
#include <calencommandhandler.h>
#include <calennotificationhandler.h>
#include <calenservices.h>
-#include <eiklabel.h>
-#include <COECNTRL.H>
#include <calencustomisation.h>
#include "CalendarVariant.hrh"
@@ -46,7 +38,6 @@
class HbWidget;
class HbMenu;
-class CEikonEnv;
class CCalenLunarInfoProvider;
class CCalenLunarLocalizer;
class CCalenLunarLocalizedInfo;
@@ -85,8 +76,7 @@
void HandleNotification( const TCalenNotification aNotification );
private:
- void SetLabelContentL( HbLabel& aLabel );
- void FormatExtraRowStringL( HbLabel& aLabel,TBool aTwoLines);
+ void FormatExtraRowStringL();
void UpdateLocalizerInfoL();
void ExecuteMessageDialogL( TDesC& aMsgText );
@@ -120,38 +110,9 @@
* infobar in Month/Day/Week.
*/
HBufC* iInfoBarText;
-
- /**
- * This control is used in view.
- */
- HbLabel* iLabelControl;
TInt iStart;
TInt iEnd;
- TRect iRect;
TInt iResourceFileOffset;
-
};
-class CalenPluginLabel : public HbLabel
- {
- Q_OBJECT
-
- public:
- CalenPluginLabel( CCalenLunarChinesePlugin& aPlugin,QGraphicsItem *parent=0);
- ~CalenPluginLabel();
-
- public slots:
- void showLunarData();
-
- private:
- void paint ( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0 );
- void mousePressEvent(QGraphicsSceneMouseEvent *event);
- private:
- CCalenLunarChinesePlugin& iPlugin;
- };
-
#endif //__CALENLUNARCHINESEPLUGIN_H__
-
-
-
-
--- a/calendarui/regionalplugins/lunarchinese/lunarchinese.pro Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/regionalplugins/lunarchinese/lunarchinese.pro Mon May 03 12:30:32 2010 +0300
@@ -14,54 +14,15 @@
# Description: Project file for LunarChinese plugin module.
#
-
TEMPLATE = lib
CONFIG += hb
TARGET = calenlunarchineseplugin
-DEPENDPATH += ./inc ./src ./data
+
+DEPENDPATH += ./inc ./src
INCLUDEPATH += ./inc
INCLUDEPATH += ../inc ../../inc
-INCLUDEPATH += /epoc32/include/ecom
-INCLUDEPATH += /orbit/include
-INCLUDEPATH += /epoc32/include/osextensions/stdapis/stlport \
- /sf/mw/hb/include/hbservices \
- /sf/mw/hb/include/hbservices/private \
- /sf/mw/hb/include/hbcore \
- /sf/mw/hb/hbcore/private
-
-BLD_INF_RULES.prj_exports += \
-"./data/solaritems /epoc32/data/z/data/solaritems"
-
-# MMP Rules
-mmpRules = \
-"$${LITERAL_HASH}include <platform_paths.hrh>" \
-#"$${LITERAL_HASH}include <../inc/CalenRegionalPluginUids.h>" \
-"$${LITERAL_HASH}include <data_caging_paths.hrh>" \
-"APP_LAYER_SYSTEMINCLUDE" \
- \
-"SOURCEPATH ./data" \
-"START RESOURCE hb_calenlunarchineseplugin.rss" \
-"TARGET hb_calenlunarchineseplugin.rsc" \
-"TARGETPATH ECOM_RESOURCE_DIR" \
-"LANGUAGE_IDS" \
-"END" \
-\
-"START RESOURCE ./data/calenlunarchineseplugindata.rss" \
-"HEADER" \
-"TARGETPATH RESOURCE_FILES_DIR" \
-"LANGUAGE_IDS" \
-"END"
-
-MMP_RULES +=mmpRules
-symbian: {
-
-TARGET.UID2 = 0x10009D8D #SYMBIAN_ECOM_PLUGIN_UID
-TARGET.UID3 = 0x102823A8 #CALENLUNARCHINESEPLUGIN_DLL_UID
-TARGET.CAPABILITY = CAP_ECOM_PLUGIN
-
-}
# Input
HEADERS += ./inc/CalenLunarChinesePlugin.h
@@ -92,4 +53,49 @@
-lavkon \
-lcalenregionalutil
+symbian: {
+
+INCLUDEPATH += /epoc32/include/ecom \
+ ../loc
+
+TARGET.UID2 = 0x10009D8D #SYMBIAN_ECOM_PLUGIN_UID
+TARGET.UID3 = 0x2002EA3C #CALENLUNARCHINESEPLUGIN_DLL_UID
+TARGET.CAPABILITY = CAP_ECOM_PLUGIN
+TARGET.EPOCALLOWDLLDATA = 1
+
+BLD_INF_RULES.prj_exports += \
+"./data/solaritems /epoc32/data/z/private/10005901/solaritems" \
+"./data/solaritems /epoc32/release/winscw/udeb/z/private/10005901/solaritems" \
+"./data/solaritems /epoc32/release/winscw/urel/z/private/10005901/solaritems"
+
+# MMP Rules
+mmpRules = \
+"$${LITERAL_HASH}include <platform_paths.hrh>" \
+#"$${LITERAL_HASH}include <../inc/CalenRegionalPluginUids.h>" \
+"$${LITERAL_HASH}include <data_caging_paths.hrh>" \
+"APP_LAYER_SYSTEMINCLUDE" \
+ \
+"SOURCEPATH ./data" \
+"START RESOURCE 2002EA3C.rss" \
+"TARGET calenlunarchineseplugin.rsc" \
+"TARGETPATH ECOM_RESOURCE_DIR" \
+"LANGUAGE_IDS" \
+"END" \
+\
+"START RESOURCE calenlunarchineseplugindata.rss" \
+"HEADER" \
+"TARGETPATH RESOURCE_FILES_DIR" \
+"LANGUAGE_IDS" \
+"END" \
+\
+"TARGETTYPE plugin"
+
+
+MMP_RULES +=mmpRules
+
+MMP_RULES -= "OPTION_REPLACE ARMCC --export_all_vtbl -D__QT_NOEFFECTMACRO_DONOTUSE"
+
+}
+
+
# End of file --Don't remove this.
\ No newline at end of file
--- a/calendarui/regionalplugins/lunarchinese/src/CalenLunarChinesePlugin.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/regionalplugins/lunarchinese/src/CalenLunarChinesePlugin.cpp Mon May 03 12:30:32 2010 +0300
@@ -15,28 +15,19 @@
*
*/
-#include <QtGui>
-
#include <eikenv.h>
-#include <aknutils.h>
-#include <eiklabel.h>
-#include <avkon.hrh>
#include <StringLoader.h>
#include <data_caging_path_literals.hrh>
#include <bautils.h>
-#include <aknbiditextutils.h>
#include <CalenLunarChinesePluginData.rsg>
-#include <layoutmetadata.cdl.h>
-#include <hblabel.h>
-#include <hbwidget.h>
-#include <qstring.h>
-#include <hbaction.h>
-#include <hbtextedit.h>
-#include <hbmainwindow.h>
-#include <hbview.h>
-#include <hbmenu.h>
+#include <QString>
+#include <HbAction>
+#include <HbView>
+#include <HbMenu>
+#include <HbMessageBox>
+#include <HbLabel>
#include "calendarui_debug.h"
#include "CalenLunarChinesePlugin.h"
@@ -67,9 +58,7 @@
iLocInfo(NULL),
iServices(aServices),
iInfoBarText(NULL),
- iResourceFileOffset( NULL ),
- iLabelControl(NULL)
-
+ iResourceFileOffset( NULL )
{
TRACE_ENTRY_POINT;
@@ -80,11 +69,12 @@
// CCalenLunarChinesePlugin::CreateChinesePluginL
// -----------------------------------------------------------------------------
//
-CCalenLunarChinesePlugin* CCalenLunarChinesePlugin::NewL( MCalenServices* aServices )
+CCalenLunarChinesePlugin* CCalenLunarChinesePlugin::NewL(
+ MCalenServices* aServices )
{
TRACE_ENTRY_POINT;
CCalenLunarChinesePlugin* self = new( ELeave )
- CCalenLunarChinesePlugin( aServices);
+ CCalenLunarChinesePlugin( aServices);
CleanupStack::PushL( self );
self->ConstructL();
CleanupStack::Pop(self);
@@ -100,8 +90,6 @@
{
TRACE_ENTRY_POINT;
- delete iLabelControl;
- iLabelControl = NULL;
//Deregister services
if ( iServices )
@@ -142,81 +130,35 @@
resourceFilename.Append(dllName.Mid(0,2));
resourceFilename.Append(KResourcePath);
resourceFilename.Append(KResourceChinesePluginFile);
- BaflUtils::NearestLanguageFile( CEikonEnv::Static()->FsSession(), resourceFilename );
+ BaflUtils::NearestLanguageFile( CEikonEnv::Static()->FsSession(),
+ resourceFilename );
// Add the resource file.
- iResourceFileOffset = CEikonEnv::Static()->AddResourceFileL( resourceFilename );
+ iResourceFileOffset = CEikonEnv::Static()->AddResourceFileL(
+ resourceFilename );
iServices->RegisterForNotificationsL( this, ECalenNotifyContextChanged );
iServices->GetCommandRange( iStart, iEnd );
iLocalizer = CCalenLunarLocalizer::NewL();
- iInfoProvider = CCalenLunarInfoProvider::NewL(CEikonEnv::Static()->FsSession());
+ iInfoProvider = CCalenLunarInfoProvider::NewL(
+ CEikonEnv::Static()->FsSession() );
- iLabelControl = new CalenPluginLabel(*this);
-
TRACE_EXIT_POINT;
}
-
// -----------------------------------------------------------------------------
-// CCalenLunarChinesePlugin::SetLabelContentL
-// -----------------------------------------------------------------------------
-//
-void CCalenLunarChinesePlugin::SetLabelContentL( HbLabel& aLabel)
- {
- TRACE_ENTRY_POINT;
-
- FormatExtraRowStringL( aLabel, EFalse );
- //aLabel.UseLogicalToVisualConversion(ETrue);
- //aLabel.SetLabelAlignment(ELayoutAlignCenter);
- //aLabel.setPlainText( iExtraRowText );
-
- QString text = QString::fromUtf16(iExtraRowText.Ptr(),iExtraRowText.Length());
- aLabel.setPlainText(text);
-
- TRACE_EXIT_POINT;
- }
-
-// -----------------------------------------------------------------------------
// CCalenLunarChinesePlugin::FormatExtraRowStringL
// -----------------------------------------------------------------------------
//
-void CCalenLunarChinesePlugin::FormatExtraRowStringL( HbLabel& aLabel,TBool aTwoLines)
+void CCalenLunarChinesePlugin::FormatExtraRowStringL()
{
TRACE_ENTRY_POINT;
- Q_UNUSED(aLabel);
- const CFont* labelFont = NULL;
-
- if( aTwoLines )
- {
- labelFont = AknLayoutUtils::FontFromId(EAknLogicalFontPrimarySmallFont,NULL);
- }
- else
- {
- labelFont = AknLayoutUtils::FontFromId(EAknLogicalFontSecondaryFont,NULL);
- }
-
- //aLabel.SetFont( labelFont );
- TInt maxWidth = 0;
- if(iRect.IsEmpty())
- {
- maxWidth = 450; //For hitch we take max value
- }
- else
- {
- maxWidth = iRect.Size().iWidth;
- }
-
- if ( labelFont && iLocInfo )
+ if ( iLocInfo )
{
- iExtraRowText.Set( iLocalizer->GetExtraRowTextL( *iLocInfo,
- maxWidth,
- *labelFont,
- aTwoLines )
- );
+ iExtraRowText.Set( iLocalizer->GetExtraRowTextL( *iLocInfo) );
}
else
{
@@ -233,14 +175,8 @@
HbWidget* CCalenLunarChinesePlugin::InfobarL( )
{
TRACE_ENTRY_POINT;
-
- UpdateLocalizerInfoL();
-
- SetLabelContentL(*iLabelControl);
-
- return iLabelControl;
-
- TRACE_EXIT_POINT;
+ TRACE_EXIT_POINT;
+ return NULL;
}
// ----------------------------------------------------------------------------
@@ -251,8 +187,6 @@
QString* CCalenLunarChinesePlugin::InfobarTextL( )
{
TRACE_ENTRY_POINT;
- TRect nullRect(0,0,0,0);
- iRect = nullRect;
if(iInfoBarText)
{
delete iInfoBarText;
@@ -261,7 +195,7 @@
//Update the local information based on current context
//from framework.
UpdateLocalizerInfoL();
- SetLabelContentL(*iLabelControl);
+ FormatExtraRowStringL();
iInfoBarText = iExtraRowText.AllocLC();
CleanupStack::Pop();
@@ -282,7 +216,6 @@
TInt count = actionList.count() - 1;
if(count >= 0)
aHbMenu->insertAction(actionList[count], lunarAction);
- QObject::connect(lunarAction, SIGNAL(triggered()), iLabelControl, SLOT(showLunarData()));
}
// -----------------------------------------------------------------------------
@@ -294,7 +227,7 @@
TRACE_ENTRY_POINT;
const TInt commandId = aCommand.Command();
- if(iStart == commandId)
+ if(ECalenRegionalPluginTapEvent == commandId)
{
ShowDetailsL();
}
@@ -307,7 +240,8 @@
//
// ----------------------------------------------------------------------------
//
-TAny* CCalenLunarChinesePlugin::CalenCommandHandlerExtensionL( TUid /*aExtensionUid*/ )
+TAny* CCalenLunarChinesePlugin::CalenCommandHandlerExtensionL(
+ TUid /*aExtensionUid*/ )
{
TRACE_ENTRY_POINT;
TRACE_EXIT_POINT;
@@ -324,7 +258,7 @@
MCalenCommandHandler* commandHandler = NULL;
- if(iStart == aCommand)
+ if(ECalenRegionalPluginTapEvent == aCommand)
{
commandHandler = this;
}
@@ -340,7 +274,13 @@
void CCalenLunarChinesePlugin::UpdateLocalizerInfoL()
{
TRACE_ENTRY_POINT;
- TTime focusTime = iServices->Context().FocusDateAndTimeL().TimeLocalL();
+ QDateTime focusDateTime= iServices->Context().focusDateAndTimeL();
+ TDateTime tempDateTime(
+ focusDateTime.date().year(),
+ static_cast<TMonth>(focusDateTime.date().month() - 1),
+ focusDateTime.date().day() - 1, focusDateTime.time().hour(),
+ focusDateTime.time().minute(), 0, 0);
+ TTime focusTime(tempDateTime);
TCalenLunarInfo lunarInfo = iInfoProvider->GetLunarInfoL( focusTime );
delete iLocInfo;
iLocInfo = NULL;
@@ -355,7 +295,8 @@
// CCalenLunarChinesePlugin::HandleNotification
// -----------------------------------------------------------------------------
//
-void CCalenLunarChinesePlugin::HandleNotification(const TCalenNotification aNotification)
+void CCalenLunarChinesePlugin::HandleNotification(
+ const TCalenNotification aNotification )
{
TRACE_ENTRY_POINT;
if (aNotification == ECalenNotifyContextChanged)
@@ -435,84 +376,23 @@
QString text = QString::fromUtf16(aMsgText.Ptr(),aMsgText.Length());
// Instantiate a popup
- HbPopup popup;
+ HbMessageBox popup;
+ popup.setDismissPolicy(HbDialog::NoDismiss);
+ popup.setTimeout(HbDialog::NoTimeout);
+ popup.setIconVisible(false);
- // Set dismiss policy that determines what tap events will cause the popup
- // to be dismissed
- popup.setDismissPolicy(HbPopup::NoDismiss);
- popup.setTimeout(HbPopup::NoTimeout);
-
- // Set the label as heading widget
popup.setHeadingWidget(new HbLabel("Lunar Calendar"));
- HbTextEdit* contentWidget = new HbTextEdit (text);
- contentWidget->setReadOnly(true);
- //contentWidget->setCursorHidden(true);
- QSizeF size = contentWidget->maximumSize();
- contentWidget->setMinimumSize(200,250);
- popup.setContentWidget(contentWidget);
+ popup.setText(text);
// Sets the primary action
- popup.setPrimaryAction(new HbAction("Ok",&popup));
+ popup.setPrimaryAction(new HbAction(hbTrId("txt_calendar_button_cancel"),
+ &popup));
// Launch popup syncronously
popup.exec();
TRACE_EXIT_POINT;
}
-
-CalenPluginLabel::CalenPluginLabel(CCalenLunarChinesePlugin& aPlugin , QGraphicsItem* parent)
- :HbLabel(parent),iPlugin(aPlugin)
- {
- TRACE_ENTRY_POINT;
-
- setAlignment(Qt::AlignHCenter);
- setTextColor(Qt::blue);
- QFont font("Times", 9, QFont::Bold);
- setFont(font);
- setTextWrapping(Hb::TextWrapping);
- setOpacity(12);
-
- TRACE_EXIT_POINT;
- }
-
-CalenPluginLabel::~CalenPluginLabel()
- {
- TRACE_ENTRY_POINT;
- TRACE_EXIT_POINT;
- }
-
-void CalenPluginLabel::showLunarData()
- {
- TRACE_ENTRY_POINT;
- iPlugin.ShowDetailsL();
- TRACE_EXIT_POINT;
- }
-void CalenPluginLabel::paint ( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget )
- {
- TRACE_ENTRY_POINT;
-
- HbLabel::paint(painter,option,widget);
- QPen pen;//
- pen.setStyle(Qt::SolidLine);
- pen.setWidth(1);
- pen.setBrush(Qt::gray);
- painter->setPen(pen);
- QRectF rect = this->rect();
- painter->eraseRect(rect);
- painter->drawRect(rect);
- painter->fillRect(rect,Qt::gray);
-
- TRACE_EXIT_POINT;
- }
-
-void CalenPluginLabel::mousePressEvent(QGraphicsSceneMouseEvent* event)
- {
- TRACE_ENTRY_POINT;
- Q_UNUSED(event);
- iPlugin.ShowDetailsL();
- TRACE_EXIT_POINT;
- }
-
//EOF
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/regionalplugins/regionalplugins.pro Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,35 @@
+#
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: Project definition file for calendar regional plugins
+#
+
+BLD_INF_RULES.prj_mmpfiles += "./calenregionalutil/group/calenregionalutil.mmp"
+
+BLD_INF_RULES.prj_exports += \
+"./calenregionalutil/inc/calenextrarowformatter.h |./inc/calenextrarowformatter.h" \
+"./calenregionalutil/inc/calenlunarinfo.h |./inc/calenlunarinfo.h" \
+"./calenregionalutil/inc/calenlunarinfoprovider.h |./inc/calenlunarinfoprovider.h" \
+"./calenregionalutil/inc/calenlunarlocalizedinfo.h |./inc/calenlunarlocalizedinfo.h" \
+"./calenregionalutil/inc/calenlunarlocalizer.h |./inc/calenlunarlocalizer.h" \
+"./calenregionalutil/inc/calenlunarpanic.h |./inc/calenlunarpanic.h" \
+"./calenregionalutil/inc/CalenLunarPaths.h |./inc/CalenLunarPaths.h" \
+"./calenregionalutil/inc/CalenRegionalPluginUids.h |./inc/CalenRegionalPluginUids.h" \
+"./calenregionalutil/inc/CalenSolarTerms.h |./inc/CalenSolarTerms.h" \
+"./lunarchinese/data/SolarItems /epoc32/data/z/private/10005901/solaritems" \
+"./lunarchinese/data/SolarItems /epoc32/release/winscw/udeb/z/private/10005901/solaritems" \
+"./lunarchinese/data/SolarItems /epoc32/release/winscw/urel/z/private/10005901/solaritems"
+
+TEMPLATE = subdirs
+SUBDIRS += lunarchinese
+CONFIG += ordered
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/rom/calenlunarchinese_variant.iby Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: IBY file for non-localizable elements of Calendar.app
+*
+*/
+
+#ifndef CALENLUNAR_VARIANT_IBY
+#define CALENLUNAR_VARIANT_IBY
+
+#ifdef __SERIES60_LUNAR_CALENDAR
+
+#ifdef RD_CALENDAR_PLUGIN_FW
+ECOM_PLUGIN( calenlunarchineseplugin.dll , calenlunarchineseplugin.rsc )
+
+data=DATAZ_\RESOURCE_FILES_DIR\calenlunarchineseplugindata.rsc RESOURCE_FILES_DIR\calenlunarchineseplugindata.rsc
+
+//TODO: once we have USER_RESOURCE_FILES_LOCALIZED defined
+//#define USER_RESOURCE_FILES_LOCALIZED calenlunarchineseplugindata
+//#include <Variant/localized_resources.iby>
+
+#endif
+
+#endif // __SERIES60_LUNAR_CALENDAR
+
+#endif // CALENLUNAR_IBY
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/rom/calenregionalutil.iby Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: DLL containing Calen regional util
+*
+*/
+
+#ifndef CALENREGIONALUTIL_IBY
+#define CALENREGIONALUTIL_IBY
+
+file=ABI_DIR\BUILD_DIR\calenregionalutil.dll SHARED_LIB_DIR\calenregionalutil.dll
+data=DATAZ_\RESOURCE_FILES_DIR\calenregionalutil.rsc RESOURCE_FILES_DIR\calenregionalutil.rsc
+data=DATAZ_\private\10005901\SolarItems private\10005901\SolarItems
+
+#endif // CALENREGIONALUTIL_IBY
+
+// End of File
+
\ No newline at end of file
--- a/calendarui/settings/inc/calensettings.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/settings/inc/calensettings.h Mon May 03 12:30:32 2010 +0300
@@ -52,19 +52,22 @@
public slots:
void handleAlarmSnoozeTimeChange(int index);
void handleWeekNumberChange();
+ void handleRegionalInfoChange();
private:
HbDataForm *mSettingsForm;
HbDataFormModel *mSettingsModel;
HbDataFormModelItem *mAlarmSnoozeTimeItem;
HbDataFormModelItem* mShowWeekNumberItem;
+ HbDataFormModelItem* mShowRegionalInfoItem;
XQSettingsManager *mSettingsManager;
XQSettingsKey *mAlarmSnoozeCenrepKey;
XQSettingsKey *mWeekNumberCenrepKey;
+ XQSettingsKey *mShowRegionalInfoKey;
uint mAlarmSnoozeTime;
uint mShowWeekNumber;
-
+ uint mShowRegionalInfo;
};
#endif // CALENSETTINGS_H
--- a/calendarui/settings/src/calensettings.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/settings/src/calensettings.cpp Mon May 03 12:30:32 2010 +0300
@@ -30,7 +30,8 @@
CalenSettings::CalenSettings(HbDataForm *form, QObject *parent)
:QObject(parent),
mSettingsForm(form),
- mSettingsModel(0)
+ mSettingsModel(0),
+ mShowRegionalInfoItem(NULL)
{
mSettingsManager = new XQSettingsManager(this);
mAlarmSnoozeCenrepKey = new XQSettingsKey(
@@ -39,6 +40,8 @@
mWeekNumberCenrepKey = new XQSettingsKey(
XQSettingsKey::TargetCentralRepository,
KCRUidCalendar, KCalendarWeekViewTitle);
+ mShowRegionalInfoKey = new XQSettingsKey(XQSettingsKey::TargetCentralRepository,
+ KCRUidCalendar, KShowRegionalInformation);
// Read the initial values from the cenrep
QVariant value = mSettingsManager->readItemValue(*mAlarmSnoozeCenrepKey);
@@ -46,6 +49,9 @@
value = mSettingsManager->readItemValue(*mWeekNumberCenrepKey);
mShowWeekNumber = value.toUInt();
+
+ value = mSettingsManager->readItemValue(*mShowRegionalInfoKey);
+ mShowRegionalInfo = value.toUInt();
}
CalenSettings::~CalenSettings()
@@ -102,9 +108,26 @@
QString(hbTrId("txt_calendar_button_no")));
mShowWeekNumberItem->setContentWidgetData(QString("additionalText"),
QString(hbTrId("txt_calendar_button_yes")));
+
mSettingsForm->addConnection(mShowWeekNumberItem, SIGNAL(clicked()),
- this, SLOT(handleWeekNumberChange()));
+ this, SLOT(handleWeekNumberChange()));
mSettingsModel->appendDataFormItem(mShowWeekNumberItem);
+
+ // TODO: Append the regional information setting only if any regional plugins have been
+ // loaded by the customisation manager
+ mShowRegionalInfoItem = new HbDataFormModelItem();
+ mShowRegionalInfoItem->setType(HbDataFormModelItem::ToggleValueItem);
+ mShowRegionalInfoItem->setData(HbDataFormModelItem::LabelRole,
+ QString("Show regional info"));
+
+ // For HbPushButton type properties -- to be used for toggle value item
+ mShowRegionalInfoItem->setContentWidgetData(QString("text"),
+ QString(hbTrId("txt_calendar_button_no")));
+ mShowRegionalInfoItem->setContentWidgetData(QString("additionalText"),
+ QString(hbTrId("txt_calendar_button_yes")));
+ mSettingsForm->addConnection(mShowRegionalInfoItem, SIGNAL(clicked()),
+ this, SLOT(handleRegionalInfoChange()));
+ mSettingsModel->appendDataFormItem(mShowRegionalInfoItem);
}
void CalenSettings::handleAlarmSnoozeTimeChange(int index)
@@ -156,6 +179,21 @@
}
}
+void CalenSettings::handleRegionalInfoChange()
+{
+ QVariant data = mShowRegionalInfoItem->contentWidgetData(QString("text"));
+ QString value = data.toString();
+ if(!value.compare(hbTrId("txt_calendar_button_no"))) {
+ // User has made it OFF
+ mShowRegionalInfo = 0;
+ mSettingsManager->writeItemValue(*mShowRegionalInfoKey, 0);
+ } else if(!value.compare(hbTrId("txt_calendar_button_yes"))) {
+ // User has made it ON.
+ mShowRegionalInfo = 1;
+ mSettingsManager->writeItemValue(*mShowRegionalInfoKey, 1);
+ }
+}
+
void CalenSettings::populateSettingList()
{
// Read the values from cenrep
@@ -201,7 +239,23 @@
QString(hbTrId("txt_calendar_button_no")));
mShowWeekNumberItem->setContentWidgetData(QString("additionalText"),
QString(hbTrId("txt_calendar_button_yes")));
- }
+ }
+
+ value = mSettingsManager->readItemValue(*mShowRegionalInfoKey);
+ mShowRegionalInfo = value.toUInt();
+
+ if (mShowRegionalInfo) {
+ mShowRegionalInfoItem->setContentWidgetData(QString("text"),
+ QString(hbTrId("txt_calendar_button_yes")));
+ mShowRegionalInfoItem->setContentWidgetData(QString("additionalText"),
+ QString(hbTrId("txt_calendar_button_no")));
+ } else {
+ mShowRegionalInfoItem->setContentWidgetData(QString("text"),
+ QString(hbTrId("txt_calendar_button_no")));
+ mShowRegionalInfoItem->setContentWidgetData(QString("additionalText"),
+ QString(hbTrId("txt_calendar_button_yes")));
+ }
+
mSettingsForm->setModel(mSettingsModel);
}
// End of file
--- a/calendarui/styleplugins/calengriditemstyleplugin/calengriditemstyleplugin.pro Fri Apr 16 14:57:40 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: Project definition file for calengriditemstyleplugin
-#
-
-TEMPLATE = lib
-TARGET = $$qtLibraryTarget(calengriditemstyleplugin)
-
-CONFIG += plugin hb
-
-INCLUDEPATH += .\
- ./inc
-
-DEPENDPATH += . \
- ./inc \
- ./src \
- ./data
-
-symbian:{
-TARGET.UID3 = 0x2001FE72
-TARGET.EPOCALLOWDLLDATA = 1
-TARGET.CAPABILITY = CAP_GENERAL_DLL
-}
-
-SOURCES += calengriditemstyleplugin.cpp
-
-HEADERS += calengriditemstyleplugin.h
-
-RESOURCES += calengriditemstyleplugin.qrc
-
-
--- a/calendarui/styleplugins/calengriditemstyleplugin/calengriditemstyleplugin.qrc Fri Apr 16 14:57:40 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<RCC>
- <qresource>
- <file alias="calengriditem.css">resources/calengriditem.css</file>
- <file alias="calengriditem.widgetml">resources/calengriditem.widgetml</file>
- </qresource>
-</RCC>
--- a/calendarui/styleplugins/calengriditemstyleplugin/inc/calengriditemstyleplugin.h Fri Apr 16 14:57:40 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: Header file for class CalenGridItemStylePlugin.
- *
- */
-
-#ifndef CALENGRIDITEMSTYLEPLUGIN_H
-#define CALENGRIDITEMSTYLEPLUGIN_H
-
-// System includes
-#include <QObject>
-#include <hbstyleinterface.h>
-
-// Forward declarations
-class QGraphicsItem;
-class QStyleOption;
-
-class CalenGridItemStylePlugin : public QObject, public HbStyleInterface
-{
- Q_OBJECT Q_INTERFACES(HbStyleInterface)
-
-public:
- int primitiveCount() const;
- QGraphicsItem *createPrimitive(HbStyle::Primitive primitive,
- QGraphicsItem *parent = 0) const;
- void updatePrimitive(QGraphicsItem *item, HbStyle::Primitive primitive,
- const QStyleOption *option) const;
- QString layoutPath() const;
-};
-
-#endif // CALENGRIDITEMSTYLEPLUGIN_H
-
-// End of file --Don't remove this.
--- a/calendarui/styleplugins/calengriditemstyleplugin/resources/calengriditem.css Fri Apr 16 14:57:40 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-CalenGridItem {
- layout: layout-griditem;
-}
-
-CalenGridItem::eventIconItem {
- fixed-height: 1un;
- fixed-width: 1un;
-}
-
-CalenGridItem::focusIconItem {
- top: -0.5un;
- left: -0.5un;
- right: 0.5un;
- bottom: 0.5un;
-}
-
-CalenGridItem::monthDayInfoTextItem {
- pref-height: var(hb-param-text-height-secondary);
- font-variant: secondary;
- text-align: center;
-}
-
-CalenGridItem::todayIndicatorItem {
- top: -0.75un;
- left: -0.75un;
- right: 0.75un;
- fixed-height: 0.75un;
- background-color: red;
-}
--- a/calendarui/styleplugins/calengriditemstyleplugin/resources/calengriditem.widgetml Fri Apr 16 14:57:40 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-<hbwidget type="CalenGridItem" version="0.1">
- <layout name="layout-griditem" type="mesh">
- <meshitem src="monthDayInfoTextItem" srcEdge="CENTERV" dst="" dstEdge="CENTERV" />
- <meshitem src="monthDayInfoTextItem" srcEdge="CENTERH" dst="" dstEdge="CENTERH" />
- <meshitem src="eventIconItem" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
- <meshitem src="eventIconItem" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
- <meshitem src="todayIndicatorItem" srcEdge="TOP" dst="monthDayInfoTextItem" dstEdge="BOTTOM" />
- <meshitem src="todayIndicatorItem" srcEdge="LEFT" dst="" dstEdge="LEFT" />
- <meshitem src="todayIndicatorItem" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
- <meshitem src="focusIconItem" srcEdge="TOP" dst="" dstEdge="TOP" />
- <meshitem src="focusIconItem" srcEdge="LEFT" dst="" dstEdge="LEFT" />
- <meshitem src="focusIconItem" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
- <meshitem src="focusIconItem" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
- </layout>
-</hbwidget>
--- a/calendarui/styleplugins/calengriditemstyleplugin/rom/clkalarmlistitemplugin.iby Fri Apr 16 14:57:40 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef __CLKALARMLISTITEMPLUGIN_IBY__
-#define __CLKALARMLISTITEMPLUGIN_IBY__
-
-REM DLL
-file=ABI_DIR\UREL\clkalarmlistitemplugin.dll SHARED_LIB_DIR\clkalarmlistitemplugin.dll
-
-#endif // __CLKALARMLISTITEMPLUGIN_IBY__
--- a/calendarui/styleplugins/calengriditemstyleplugin/src/calengriditemstyleplugin.cpp Fri Apr 16 14:57:40 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: Definition file for class CalenGridItemStylePlugin.
- *
- */
-
-// System includes
-#include <QtPlugin>
-#include <QGraphicsItem>
-#include <hbiconitem.h>
-#include <hbtextitem.h>
-#include <hbframeitem.h>
-#include <hbframedrawer.h>
-
-// User includes
-#include "calengriditemstyleplugin.h"
-
-// Constants
-#define PRIMITIVE_COUNT 1
-
-/*!
- \class CalenGridItemStylePlugin
-
- Style plugin of Custom Grid Item of Calendar
- */
-
-/*!
- From HbStyleInterface.
- Returns the number of primitives in the widget.
-
- \return int The number of primitives.
- \sa HbStyleInterface.
- */
-int CalenGridItemStylePlugin::primitiveCount() const
-{
- qDebug("CalenGridItemStylePlugin::primitiveCount");
-
- return PRIMITIVE_COUNT;
-}
-
-/*!
- From HbStyleInterface.
-
- \sa HbStyleInterface.
- */
-QGraphicsItem *CalenGridItemStylePlugin::createPrimitive(
- HbStyle::Primitive primitive,
- QGraphicsItem *parent) const
-{
- qDebug("CalenGridItemStylePlugin::createPrimitive");
- Q_UNUSED(primitive)
- Q_UNUSED(parent)
- return NULL;
-}
-
-/*!
- From HbStyleInterface.
-
- \sa HbStyleInterface.
- */
-void CalenGridItemStylePlugin::updatePrimitive(QGraphicsItem *item,
- HbStyle::Primitive primitive,
- const QStyleOption *option) const
-{
- qDebug("CalenGridItemStylePlugin::updatePrimitive");
-
- Q_UNUSED(item)
- Q_UNUSED(primitive)
- Q_UNUSED(option)
-
-}
-
-/*!
- From HbStyleInterface.
-
- \sa HbStyleInterface.
- */
-QString CalenGridItemStylePlugin::layoutPath() const
-{
- qDebug("CalenGridItemStylePlugin::layoutPath");
-
- QString layoutPath(":/");
-
- return layoutPath;
-}
-
-/*!
- Plugin registration.
- */
-Q_EXPORT_PLUGIN2(calengriditemstyleplugin, CalenGridItemStylePlugin)
-
-
-// End of file --Don't remove this.
--- a/calendarui/views/inc/calendayview.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/views/inc/calendayview.h Mon May 03 12:30:32 2010 +0300
@@ -87,13 +87,10 @@
*/
CALENDAYVIEW_EXPORT CalenDocLoader* docLoader();
-
/**
- * @brief Called from the content widget to indicate if the day
- * has any events or not
- * @param yes true if day has events, false otherwise
- */
- void hasEvents(bool yes);
+ * @brief Refreshes the view with the date set in the context
+ */
+ void refreshViewOnGoToDate();
protected:
@@ -162,12 +159,6 @@
*/
HbAction *mGoToTodayAction;
- /**
- * @var mDeleteAction
- * Action which provides "Delete" functionality
- */
- HbAction *mDeleteAction;
-
// TODO: Remove these after gestures are available
QPointF mTapPoint;
bool mActionTaken;
--- a/calendarui/views/inc/calendayviewwidget.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/views/inc/calendayviewwidget.h Mon May 03 12:30:32 2010 +0300
@@ -19,6 +19,7 @@
#define CALENDAYVIEWWIDGET_H
// System includes
+#include <QGraphicsLinearLayout>
#include <QDateTime>
#include <hbwidget.h>
@@ -32,6 +33,7 @@
class HbListView;
class HbLabel;
class HbDateTimePicker;
+class XQSettingsManager;
class MCalenServices;
class CalenDayView;
class AgendaEntry;
@@ -56,13 +58,13 @@
* @param services The reference to the MCalenServices object
* @param docLoader The document loader object
*/
- Q_DECL_EXPORT CalenDayViewWidget(MCalenServices &services,
+ IMPORT_C CalenDayViewWidget(MCalenServices &services,
CalenDocLoader *docLoader);
/**
* @brief Default C++ destructor
*/
- Q_DECL_EXPORT ~CalenDayViewWidget();
+ IMPORT_C ~CalenDayViewWidget();
/**
* @brief Initializes the widget to show all the events/to-do's
@@ -152,6 +154,12 @@
*/
int getIndexToScrollTo();
+ /**
+ * @brief To Show and hide regional plugin label depends upon settings
+ */
+
+ void showHideRegionalInformation();
+
private slots:
/**
@@ -211,11 +219,6 @@
* events for some day other than the current day
*/
void goToToday();
-
- /**
- * @brief Callback function for deleting multiple entries
- */
- void deleteEntries();
private:
/**
@@ -299,6 +302,25 @@
* @brief The date picker component
*/
HbDateTimePicker *mDatePicker;
+
+ /**
+ * @var mRegionalPluginLayout
+ * @brief Regional Plugin layout pointer
+ */
+ QGraphicsLinearLayout* mRegionalPluginLayout;
+
+ /**
+ * @var mRegionalInfoGroupBox
+ * @brief Regional Plugin Info groupbox
+ */
+ HbGroupBox *mRegionalInfoGroupBox;
+
+ /**
+ * @var mSettingsManager
+ * @brief Setting Manager pointer
+ */
+
+ XQSettingsManager *mSettingsManager;
};
#endif //CALENDAYVIEWWIDGET_H
--- a/calendarui/views/inc/calengriditem.h Fri Apr 16 14:57:40 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: Definition file for class CalenGridItem.
- *
- */
-#ifndef CALENGRIDITEM_H
-#define CALENGRIDITEM_H
-
-// System includes
-#include <hbwidget.h>
-
-// Forward declarations
-class HbAbstractItem;
-class QString;
-class HbIconItem;
-class HbTextItem;
-class HbFrameItem;
-class CalenTodayIndicator;
-class QGraphicsWidget;
-
-class CalenGridItem : public HbWidget
-{
- Q_OBJECT
-
-public:
- CalenGridItem(QGraphicsWidget *parent = 0);
- virtual ~CalenGridItem();
-
-public:
- void updateMonthDayInfo(QString monthDayText);
- void updateMonthDayInfoColor(QColor monthTextColor);
- void updateEventIndicator(QString eventIconPath);
- void updateFocusIndicator(QString focusIconPath);
- void drawUnderline(bool underlineEnabled);
-
-private:
-
- QString pluginPath();
- void init();
-
-private:
- HbIconItem *mEventIndicatorItem;
- HbTextItem *mMonthDayInfoItem;
- HbFrameItem *mFocusIndicatorItem;
- HbIconItem* mTodayIndicatorItem;
-};
-
-#endif // CALENGRIDITEM_H
-
-// End of file --Don't remove this.
--- a/calendarui/views/inc/calengriditemprototype.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/views/inc/calengriditemprototype.h Mon May 03 12:30:32 2010 +0300
@@ -25,10 +25,12 @@
// Forward declarations
class QGraphicsWidget;
class QGraphicsLinearLayout;
+class HbIconItem;
+class HbTextItem;
+class HbFrameItem;
class CalenGridItem;
-class CalenGridItemPrototype : public HbAbstractViewItem //HbGridViewItem
-//TODO :with current release it's crashing .. public HbGridViewItem
+class CalenGridItemPrototype : public HbGridViewItem
{
Q_OBJECT
@@ -39,18 +41,24 @@
}
public:
- virtual HbAbstractViewItem *createItem();
- virtual void updateChildItems();
+ HbAbstractViewItem *createItem();
+ void updateChildItems();
+ void pressStateChanged(bool pressed,bool animate);
+ void pressStateChanged(bool animate);
+ bool canSetModelIndex(const QModelIndex& index);
private:
- void createItemLayout();
- void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget);
+ void drawUnderline(bool underlineEnabled);
private:
QGraphicsLinearLayout *mLayout;
CalenGridItem *mWidget;
QColor mCurrentDateColor;
QColor mGridBorderColor;
- bool mIsSeventhColumn;
+ HbIconItem *mEventIndicatorItem;
+ HbTextItem *mMonthDayInfoItem;
+ HbFrameItem *mFocusIndicatorItem;
+ HbIconItem *mTodayIndicatorItem;
+ QColor mTodayUnderLineColor;
};
#endif // CALENGRIDITEMPROTOTYPE_H
--- a/calendarui/views/inc/calenmonthgrid.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/views/inc/calenmonthgrid.h Mon May 03 12:30:32 2010 +0300
@@ -67,7 +67,8 @@
void mousePressEvent(QGraphicsSceneMouseEvent* event);
void mouseReleaseEvent(QGraphicsSceneMouseEvent* event);
void setFocusToProperDay();
- void setActiveDates(QDateTime activeDate);
+ void setActiveDates(QDate activeDate);
+ void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget);
public slots:
void scrollingFinished();
@@ -93,6 +94,9 @@
QDateTime mNonActiveFocusedDay;
bool mIgnoreItemActivated;
QPointF mPressedPos;
+ QColor mGridLineColor;
+ QColor mGridBorderColor;
+ QGraphicsWidget* mContentWidget;
};
#endif // CALENMONTHGRID_H
--- a/calendarui/views/inc/calenmonthview.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/views/inc/calenmonthview.h Mon May 03 12:30:32 2010 +0300
@@ -43,6 +43,7 @@
class CalenDocLoader;
class CalenThickLinesDrawer;
class CalenMonthGrid;
+class CalenPluginLabel;
// Constants
const int KCalenDaysInWeek = 7;
@@ -82,6 +83,7 @@
void updateModelWithFutureMonth();
void populatePreviewPane(QDateTime &dateTime);
void handlePreviewPaneGesture(bool rightGesture);
+ QDateTime firstDayOfGrid();
private:
void createGrid();
@@ -99,7 +101,9 @@
void addWeekNumbers();
void removeWeekNumbers();
void addBackgroundFrame();
-
+ void refreshViewOnGoToDate();
+ void showHideRegionalInformation();
+ void onContextChanged();
private slots:
void createEditor();
@@ -107,6 +111,7 @@
void updateMonthDataArrayWithActiveDates();
void handleLeftEffectCompleted(const HbEffect::EffectStatus &status);
void handleRightEffectCompleted(const HbEffect::EffectStatus &status);
+ void addRemoveActionsInMenu();
public slots:
void launchDayView();
@@ -118,8 +123,14 @@
CalenThickLinesDrawer *mDayNameWidget;
CalenMonthGrid *mMonthGrid;
HbWidget* mPrevPaneParent;
+ HbWidget* mPrevPaneLayoutWidget;
+ QGraphicsLinearLayout* mPrevPaneLayout;
HbWidget* mCurrPaneParent;
+ HbWidget* mCurrPaneLayoutWidget;
+ QGraphicsLinearLayout* mCurrPaneLayout;
HbWidget* mNextPaneParent;
+ HbWidget* mNextPaneLayoutWidget;
+ QGraphicsLinearLayout* mNextPaneLayout;
CalenPreviewPane* mCurrPreviewPane;
CalenPreviewPane* mPrevPreviewPane;
CalenPreviewPane* mNextPreviewPane;
@@ -158,6 +169,10 @@
AgendaUtil *mAgendaUtil;
bool mIsPrevPaneGesture;
HbAction *mGoToTodayAction;
+ CalenPluginLabel *mPrevRegionalInfo;
+ CalenPluginLabel *mCurrRegionalInfo;
+ CalenPluginLabel *mNextRegionalInfo;
+ HbMenu *mDeleteSubMenu;
};
#endif //CALENMONTHVIEW_H
--- a/calendarui/views/inc/calennativeview.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/views/inc/calennativeview.h Mon May 03 12:30:32 2010 +0300
@@ -43,17 +43,17 @@
* Destructor.
*/
virtual ~CalenNativeView();
- HbWidget* ControlOrNull();
- bool isPlugin();
virtual void populationComplete();
TBool pluginEnabled();
+ virtual void refreshViewOnGoToDate();
+ QString *pluginText();
protected: // New functions
CalenNativeView( MCalenServices& services );
- void checkInfobarL();
void HandleNotification( const TCalenNotification notification );
virtual void onLocaleChanged(int reason)=0;
+ virtual void onContextChanged() {};
protected slots:
@@ -66,12 +66,10 @@
protected:
- MCalenServices& mServices; // not owned.
- TBool mPluginEnabled;
+ MCalenServices &mServices; // not owned.
private:
- HbWidget* mInfobar;//plugin label
- HbDateTimePicker* mDatePicker;
+ HbDateTimePicker *mDatePicker;
};
#endif // CALENNATIVEVIEW_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/inc/calenpluginlabel.h Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: CalenPluginLabel class definition.
+*
+*/
+
+#ifndef CALENPLUGINLABEL_H
+#define CALENPLUGINLABEL_H
+
+// System includes
+#include <hblabel.h>
+
+class MCalenServices;
+class CalenPluginLabel : public HbLabel
+{
+ Q_OBJECT
+
+public:
+ CalenPluginLabel(MCalenServices &services, QGraphicsItem *parent = 0);
+ ~CalenPluginLabel();
+
+private:
+ void mousePressEvent(QGraphicsSceneMouseEvent *event);
+
+private:
+ MCalenServices &mServices;
+};
+
+#endif /* CALENPLUGINLABEL_H */
+
+// End of file --Don't remove this.
--- a/calendarui/views/inc/calenpreviewpane.h Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/views/inc/calenpreviewpane.h Mon May 03 12:30:32 2010 +0300
@@ -52,6 +52,7 @@
void startAutoScroll();
void mousePressEvent(QGraphicsSceneMouseEvent* event);
void mouseReleaseEvent(QGraphicsSceneMouseEvent* event);
+ void mouseMoveEvent(QGraphicsSceneMouseEvent* event);
void setView(CalenMonthView* view);
void stopScrolling();
@@ -80,6 +81,7 @@
int mNumOfScrolls;
HbLabel* mNoEntriesLabel;
bool mIsNoEntriesAdded;
+ bool mIsGestureHandled;
};
#endif /* CALENPREVIEWPANE_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/resources/calengriditemprototype.css Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,40 @@
+CalenGridItemPrototype:portrait {
+ layout: calendarCustomGridItem;
+}
+
+CalenGridItemPrototype:landscape {
+ layout: calendarCustomGridItem;
+}
+
+CalenGridItemPrototype[layoutName="calendarCustomGridItem"]:portrait{
+ layout:calendarCustomGridItem;
+}
+
+CalenGridItemPrototype[layoutName="calendarCustomGridItem"]:landscape{
+ layout:calendarCustomGridItem;
+}
+
+CalenGridItemPrototype::eventIconItem[layoutName="calendarCustomGridItem"] {
+ fixed-height: 1un;
+ fixed-width: 1un;
+}
+
+CalenGridItemPrototype::focusIconItem[layoutName="calendarCustomGridItem"] {
+ top: -0.5un;
+ left: -0.5un;
+ right: 0.5un;
+ bottom: 0.5un;
+}
+
+CalenGridItemPrototype::monthDayInfoTextItem[layoutName="calendarCustomGridItem"] {
+ pref-height: var(hb-param-text-height-secondary);
+ font-variant: secondary;
+ text-align: center;
+}
+
+CalenGridItemPrototype::todayIndicatorItem[layoutName="calendarCustomGridItem"] {
+ left: -0.75un;
+ right: 0.75un;
+ fixed-height: 0.75un;
+ background-color: red;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/resources/calengriditemprototype.widgetml Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,15 @@
+<hbwidget type="gridviewitem" version="0.1">
+ <layout name="calendarCustomGridItem" type="mesh">
+ <meshitem src="monthDayInfoTextItem" srcEdge="CENTERV" dst="" dstEdge="CENTERV" />
+ <meshitem src="monthDayInfoTextItem" srcEdge="CENTERH" dst="" dstEdge="CENTERH" />
+ <meshitem src="eventIconItem" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
+ <meshitem src="eventIconItem" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
+ <meshitem src="todayIndicatorItem" srcEdge="TOP" dst="monthDayInfoTextItem" dstEdge="BOTTOM" />
+ <meshitem src="todayIndicatorItem" srcEdge="LEFT" dst="" dstEdge="LEFT" />
+ <meshitem src="todayIndicatorItem" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
+ <meshitem src="focusIconItem" srcEdge="TOP" dst="" dstEdge="TOP" />
+ <meshitem src="focusIconItem" srcEdge="LEFT" dst="" dstEdge="LEFT" />
+ <meshitem src="focusIconItem" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
+ <meshitem src="focusIconItem" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
+ </layout>
+</hbwidget>
--- a/calendarui/views/resources/calenresources.qrc Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/views/resources/calenresources.qrc Mon May 03 12:30:32 2010 +0300
@@ -1,6 +1,8 @@
<RCC>
<qresource prefix="/" >
- <file>caleneventlistviewitem.widgetml</file>
+ <file>calengriditemprototype.widgetml</file>
+ <file>calengriditemprototype.css</file>
+ <file>caleneventlistviewitem.widgetml</file>
<file>caleneventlistviewitem.css</file>
<file>qgn_indi_cdr_meeting_layer0.svg</file>
<file>qtg_mono_exception.png</file>
--- a/calendarui/views/src/calendayview.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/views/src/calendayview.cpp Mon May 03 12:30:32 2010 +0300
@@ -124,6 +124,29 @@
populationComplete();
}
+/*!
+ Funtion to refresh the current view upon selecting a date
+ from GoToDate popup
+ */
+void CalenDayView::refreshViewOnGoToDate()
+{
+ // Get the day for which this view is being shown from the context
+ mDate = mServices.Context().focusDateAndTimeL();
+
+ // Check if the current day being shown is "Today"
+ if (mGoToTodayAction) {
+ if (mDate.date() == CalenDateUtils::today().date()) {
+ // Hide the "Go to today" option
+ mGoToTodayAction->setVisible(false);
+ } else {
+ mGoToTodayAction->setVisible(true);
+ }
+ }
+
+ // Initialize the content widget
+ mDayViewWidget->showWidget();
+}
+
// ----------------------------------------------------------------------------
// CCalenDayView::HandleNotification
// Rest of the details are commented in the header
@@ -146,18 +169,6 @@
}
// ----------------------------------------------------------------------------
-// CCalenDayView::hasEvents
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayView::hasEvents(bool yes)
-{
- if (mDeleteAction) {
- mDeleteAction->setVisible(yes);
- }
-}
-
-// ----------------------------------------------------------------------------
// CalenDayView::handleLocaleChange
// Rest of the details are commented in the header
// ----------------------------------------------------------------------------
@@ -251,14 +262,6 @@
// Connect to the signal triggered by new event action
connect(goToDateAction, SIGNAL(triggered()), this, SLOT(goToDate()));
- mDeleteAction = qobject_cast<HbAction *>
- (mDocLoader->findObject(CALEN_DAYVIEW_MENU_DELETE));
- if (!mDeleteAction) {
- qFatal("calendayview.cpp : Unable to find delete action");
- }
- // Connect to the signal triggered by new event action
- connect(mDeleteAction, SIGNAL(triggered()), mDayViewWidget, SLOT(deleteEntries()));
-
HbAction *settingsAction = qobject_cast<HbAction *>
(mDocLoader->findObject(CALEN_DAYVIEW_MENU_SETTINGS));
if (!settingsAction) {
--- a/calendarui/views/src/calendayviewwidget.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/views/src/calendayviewwidget.cpp Mon May 03 12:30:32 2010 +0300
@@ -27,6 +27,7 @@
#include <hbstyleloader.h>
#include <hbdatetimepicker.h>
#include <hbdialog.h>
+#include <xqsettingsmanager.h>
#include <agendautil.h>
#include <noteseditor.h>
@@ -40,6 +41,8 @@
#include "calendateutils.h"
#include "CalenUid.h"
#include "caleneventlistviewitem.h"
+#include "calenpluginlabel.h"
+#include "CalendarInternalCRKeys.h"
// Constants
static const QString singleSpace(" ");
@@ -60,10 +63,11 @@
// Rest of the details are commented in the header
// ----------------------------------------------------------------------------
//
-CalenDayViewWidget::CalenDayViewWidget(MCalenServices &services,
+EXPORT_C CalenDayViewWidget::CalenDayViewWidget(MCalenServices &services,
CalenDocLoader *docLoader) :
mServices(services),
-mDocLoader(docLoader)
+mDocLoader(docLoader),
+mRegionalInfoGroupBox(NULL)
{
// Construct the list view prototype
mListViewPrototype = new CalenEventListViewItem(this);
@@ -73,6 +77,9 @@
// Register the custom docml and css to provide our own style to the list items
HbStyleLoader::registerFilePath(":/");
+
+ //Create the setting manager
+ mSettingsManager = new XQSettingsManager(this);
}
// ----------------------------------------------------------------------------
@@ -80,7 +87,7 @@
// Rest of the details are commented in the header
// ----------------------------------------------------------------------------
//
-CalenDayViewWidget::~CalenDayViewWidget()
+EXPORT_C CalenDayViewWidget::~CalenDayViewWidget()
{
if (mListViewPrototype) {
delete mListViewPrototype;
@@ -126,6 +133,10 @@
// Get the instance list
getInstanceList();
+
+ // Check if regional information needs to be shown
+ // and add it or remove it
+ showHideRegionalInformation();
// Load the appropriate section based on the number of events for the day
if (0 == mInstanceArray.count()) {
@@ -295,6 +306,11 @@
if (!mEmptyListLabel) {
qFatal("calendayviewwidget.cpp : Unable to find empty list label");
}
+ HbWidget *headingPluginWidget =
+ qobject_cast<HbWidget*> (mDocLoader->findWidget(CALEN_DAYVIEW_HEADING_REGIONALPLUGIN_WIDGET));
+
+ mRegionalPluginLayout = static_cast<QGraphicsLinearLayout*>(headingPluginWidget->layout());
+
}
// ----------------------------------------------------------------------------
@@ -372,11 +388,7 @@
mEventsList->hide();
// Show the empty list text
mEmptyListLabel->show();
- // Inform the view about the change
- mView->hasEvents(false);
return;
- } else {
- mView->hasEvents(true);
}
}
@@ -476,12 +488,30 @@
}
HbExtendedLocale locale = HbExtendedLocale::system();
- // Get the start time and format as per the locale
- QTime eventStartTime = entry.startTime().time();
+ // Get the start time and format as per the locale
+ QDateTime startTime = entry.startTime();
+ QTime eventStartTime;
+
+ if (CalenDateUtils::beginningOfDay(startTime)
+ < CalenDateUtils::beginningOfDay(mDate)) {
+ // event is started previous day, show StarTime as 12:00 am in Agendaview,
+ eventStartTime.setHMS(00, 00, 00);
+ } else {
+ eventStartTime = entry.startTime().time();
+ }
QString eventTime = locale.format(eventStartTime, r_qtn_time_usual_with_zero);
- // Get the event end time
- QTime eventEndTime = entry.endTime().time();
+ // Get the event end time
+ QDateTime endTime = entry.endTime();
+ QTime eventEndTime;
+
+ if (CalenDateUtils::beginningOfDay(endTime)
+ > CalenDateUtils::beginningOfDay(mDate)) {
+ // event has MidNight crossover, show EndTime as 11:59pm in Agendaview,
+ eventEndTime.setHMS(23, 59, 59);
+ } else {
+ eventEndTime = entry.endTime().time();
+ }
if (eventStartTime < eventEndTime) {
// Raise the flag to indicate that the list item
@@ -774,6 +804,42 @@
}
// ----------------------------------------------------------------------------
+// CalenDayViewWidget::showHideRegionalInformation
+// To Show and hide regional plugin label depends upon settings
+// ----------------------------------------------------------------------------
+//
+void CalenDayViewWidget::showHideRegionalInformation()
+{
+ XQSettingsKey regionalInfo(XQSettingsKey::TargetCentralRepository,
+ KCRUidCalendar.iUid, KShowRegionalInformation);
+
+ int showRegionalInfo = mSettingsManager->readItemValue(regionalInfo).toUInt();
+ if (showRegionalInfo) {
+
+ if (!mRegionalInfoGroupBox) {
+ mRegionalInfoGroupBox = new HbGroupBox();
+ CalenPluginLabel *regionalInfo = new CalenPluginLabel(
+ mServices, this);
+ mRegionalInfoGroupBox->setContentWidget(regionalInfo);
+ mRegionalPluginLayout->insertItem(1, mRegionalInfoGroupBox);
+ }
+
+ if (mView->pluginEnabled()) {
+ QString *pluginString = mView->pluginText();
+ HbLabel *pluginInfoLabel = qobject_cast <HbLabel *>
+ (mRegionalInfoGroupBox->contentWidget());
+ pluginInfoLabel->setPlainText(*pluginString);
+ }
+ } else {
+ if (mRegionalInfoGroupBox) {
+ mRegionalPluginLayout->removeItem(mRegionalInfoGroupBox);
+ delete mRegionalInfoGroupBox;
+ mRegionalInfoGroupBox = NULL;
+ }
+ }
+}
+
+// ----------------------------------------------------------------------------
// CalenDayViewWidget::createNewEvent
// Rest of the details are commented in the header
// ----------------------------------------------------------------------------
@@ -982,18 +1048,7 @@
// Set the context for the current day
mServices.Context().setFocusDateL(CalenDateUtils::today(), KCalenDayViewUidValue);
- // Issue a command to re-populate the entire view
- mServices.IssueCommandL(ECalenStartActiveStep);
-}
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::deleteEntries
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayViewWidget::deleteEntries()
-{
- // TODO: Show a checklist to allow multiple delete
+ mView->refreshViewOnGoToDate();
}
// End of file --Don't remove this.
--- a/calendarui/views/src/calengriditem.cpp Fri Apr 16 14:57:40 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,156 +0,0 @@
-/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: Definition file for class CalenGridItem.
- *
- */
-
-// System includes
-#include <QString>
-#include <QGraphicsWidget>
-#include <hbstyle.h>
-#include <hbwidget.h>
-#include <hbtextitem.h>
-#include <hbframeitem.h>
-#include <hbframedrawer.h>
-#include <hbiconitem.h>
-#include <hbcolorscheme.h>
-
-// User includes
-#include "calengriditem.h"
-
-#define PLUGINPATH "calengriditemstyleplugin.dll"
-
-/*!
- \class CalenGridItem
-
- Custom Calendar Grid Item class
- */
-
-/*!
- Default constructor.
- */
-CalenGridItem::CalenGridItem(QGraphicsWidget *parent):
- HbWidget(parent),
- mEventIndicatorItem(NULL),
- mMonthDayInfoItem(NULL),
- mFocusIndicatorItem(NULL),
- mTodayIndicatorItem(NULL)
-{
- qDebug("CalenGridItem::CalenGridItem");
-
- // Here we register the plugin.
- setPluginBaseId(style()->registerPlugin(pluginPath()));
-
- // Now create each of the primitives.
- init();
-
-}
-
-/*!
- Destructor.
- */
-CalenGridItem::~CalenGridItem()
-{
- // Here we un-register the plugin .
- style()->unregisterPlugin(pluginPath());
-}
-
-/*!
- To update the month day info
- */
-void CalenGridItem::updateMonthDayInfo(QString monthDayText)
-{
- mMonthDayInfoItem->setText(monthDayText);
- mMonthDayInfoItem->setElideMode(Qt::ElideNone);
-}
-
-/*!
- To update the month day info color
- */
-void CalenGridItem::updateMonthDayInfoColor(QColor monthTextColor)
-{
- mMonthDayInfoItem->setTextColor(monthTextColor);
-}
-
-/*!
- To update the event indicator icon
- */
-void CalenGridItem::updateEventIndicator(QString eventIconPath)
-{
- mEventIndicatorItem->setIconName(eventIconPath);
-}
-
-/*!
- To update the focus indicator icon
- */
-void CalenGridItem::updateFocusIndicator(QString focusIconPath)
-{
- mFocusIndicatorItem->frameDrawer().setFrameGraphicsName(focusIconPath);
-}
-
-/*!
- If underlineEnabled is true then will draw underline else not
- */
-void CalenGridItem::drawUnderline(bool underlineEnabled)
-{
- if (underlineEnabled) {
- if (!mTodayIndicatorItem) {
- mTodayIndicatorItem = new HbIconItem(this);
- HbStyle::setItemName(mTodayIndicatorItem,
- QLatin1String("todayIndicatorItem"));
- // Get the color from the theme
- QColor todayColor = HbColorScheme::color("qtc_cal_month_current_day");
- if (todayColor.isValid()) {
- mTodayIndicatorItem->setColor(todayColor);
- }
- }
- } else {
- if (mTodayIndicatorItem) {
- delete mTodayIndicatorItem;
- mTodayIndicatorItem = NULL;
- }
- }
-}
-
-/*!
- Returns the style plugin path
- */
-QString CalenGridItem::pluginPath()
-{
- QString pluginPath;
- pluginPath.append(PLUGINPATH);
- return pluginPath;
-}
-
-/*!
- Create primitives
- */
-void CalenGridItem::init()
-{
-
- mEventIndicatorItem = new HbIconItem(this);
- HbStyle::setItemName(mEventIndicatorItem, QLatin1String("eventIconItem"));
-
- mMonthDayInfoItem = new HbTextItem(this);
- HbStyle::setItemName(mMonthDayInfoItem,
- QLatin1String("monthDayInfoTextItem"));
-
- mFocusIndicatorItem = new HbFrameItem(this);
- mFocusIndicatorItem->frameDrawer().setFrameType(HbFrameDrawer::NinePieces);
- mFocusIndicatorItem->setZValue(-1);
- HbStyle::setItemName(mFocusIndicatorItem, QLatin1String("focusIconItem"));
-
-}
-
-// End of file --Don't remove this.
--- a/calendarui/views/src/calengriditemprototype.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/views/src/calengriditemprototype.cpp Mon May 03 12:30:32 2010 +0300
@@ -22,11 +22,15 @@
#include <QGraphicsWidget>
#include <QGraphicsLinearLayout>
#include <hblabel.h>
+#include <hbtextitem.h>
+#include <hbframeitem.h>
+#include <hbframedrawer.h>
+#include <hbiconitem.h>
+#include <hbframebackground.h>
#include <hbcolorscheme.h>
// User includes
#include "calengriditemprototype.h"
-#include "calengriditem.h"
#include "calencommon.h"
#define GRIDLINE_WIDTH 0.075 //units
@@ -40,13 +44,17 @@
Constructor.
*/
CalenGridItemPrototype::CalenGridItemPrototype(QGraphicsWidget *parent) :
- HbAbstractViewItem(parent),
+ HbGridViewItem(parent),
mLayout(0),
mCurrentDateColor(Qt::black),
mGridBorderColor(Qt::gray),
- mIsSeventhColumn(false)
+ mEventIndicatorItem(0),
+ mMonthDayInfoItem(0),
+ mFocusIndicatorItem(0),
+ mTodayIndicatorItem(0),
+ mTodayUnderLineColor(Qt::gray)
{
- // Nothing yet.
+ mTodayUnderLineColor = HbColorScheme::color("qtc_cal_month_current_day");
}
/*!
@@ -57,9 +65,7 @@
*/
HbAbstractViewItem *CalenGridItemPrototype::createItem()
{
- CalenGridItemPrototype *item = new CalenGridItemPrototype();
- item->createItemLayout();
- return item;
+ return new CalenGridItemPrototype(*this);
}
/*!
@@ -69,106 +75,122 @@
*/
void CalenGridItemPrototype::updateChildItems()
{
+
+ // base class implementation
+ HbGridViewItem::updateChildItems();
+
// Here update content of each item.
-
- QVariant monthDayRole =
- modelIndex().data(CalendarNamespace::CalendarMonthDayRole);
- if (monthDayRole.isValid()) {
- if (monthDayRole.canConvert<QString>()) {
- mWidget->updateMonthDayInfo(monthDayRole.toString());
- }
- }
-
- QVariant monthEventRole =
- modelIndex().data(CalendarNamespace::CalendarMonthEventRole);
- if (monthEventRole.isValid()) {
- if (monthEventRole.canConvert<QString>()) {
- mWidget->updateEventIndicator(monthEventRole.toString());
+ QVariant monthDayRole;
+ QVariant monthFocusRole;
+ bool underlineEnabled = false;
+ QVariant monthEventRole;
+ QVariant monthTextColorRole;
+ QVariant itemData = modelIndex().data(Qt::UserRole + 1);
+ if (itemData.isValid()) {
+ if (itemData.canConvert<QVariantList>()) {
+ // Get the item list
+ QVariantList itemList = itemData.toList();
+ // Get the day text
+ monthDayRole = itemList.at(CalendarNamespace::CalendarMonthDayRole);
+ if (monthDayRole.canConvert<QString>()) {
+ QString monthDayText = monthDayRole.toString();
+
+ if (!mMonthDayInfoItem) {
+ mMonthDayInfoItem = new HbTextItem(this);
+ HbStyle::setItemName(mMonthDayInfoItem,
+ QLatin1String("monthDayInfoTextItem"));
+
+ }
+
+ mMonthDayInfoItem->setText(monthDayText);
+ mMonthDayInfoItem->setElideMode(Qt::ElideNone);
+ }
+
+ // Get the focus data
+ monthFocusRole = itemList.at(CalendarNamespace::CalendarMonthFocusRole);
+ if (monthFocusRole.canConvert<QString>()) {
+ QString focusIconPath = monthFocusRole.toString();
+ if (!mFocusIndicatorItem) {
+ mFocusIndicatorItem = new HbFrameItem(this);
+ mFocusIndicatorItem->frameDrawer().setFrameType(HbFrameDrawer::NinePieces);
+ mFocusIndicatorItem->setZValue(-1);
+ HbStyle::setItemName(mFocusIndicatorItem, QLatin1String("focusIconItem"));
+ }
+ mFocusIndicatorItem->frameDrawer().setFrameGraphicsName(focusIconPath);
+ }
+
+ // Get the today indicator role
+ underlineEnabled = itemList.at(CalendarNamespace::CalendarMonthUnderlineRole).value<bool>();
+ drawUnderline(underlineEnabled);
+
+ // Get the event indicator data
+ monthEventRole = itemList.at(CalendarNamespace::CalendarMonthEventRole);
+ if (monthEventRole.canConvert<QString>()) {
+ QString eventIconPath = monthEventRole.toString();
+ if (!mEventIndicatorItem) {
+ mEventIndicatorItem = new HbIconItem(this);
+ HbStyle::setItemName(mEventIndicatorItem, QLatin1String("eventIconItem"));
+ }
+ mEventIndicatorItem->setIconName(eventIconPath);
+ }
+
+ // Get the text color
+ monthTextColorRole = itemList.at(CalendarNamespace::CalendarMonthTextColorRole);
+ if (monthTextColorRole.canConvert<QColor>()) {
+ QColor monthTextColor = monthTextColorRole.value<QColor>();
+ mMonthDayInfoItem->setTextColor(monthTextColor);
+ }
}
}
- QVariant monthFocusRole =
- modelIndex().data(CalendarNamespace::CalendarMonthFocusRole);
- if (monthFocusRole.isValid()) {
- if (monthFocusRole.canConvert<QString>()) {
- mWidget->updateFocusIndicator(monthFocusRole.toString());
- }
- }
-
- QVariant monthTextColorRole =
- modelIndex().data(CalendarNamespace::CalendarMonthTextColorRole);
- if (monthTextColorRole.isValid()) {
- if (monthTextColorRole.canConvert<QColor>()) {
- mWidget->updateMonthDayInfoColor(monthTextColorRole.value<QColor>());
- }
- }
-
- QVariant seventhColumnRole =
- modelIndex().data(CalendarNamespace::CalendarMonthSeventhColumn);
- if (seventhColumnRole.isValid()) {
- if (seventhColumnRole.canConvert<bool>()) {
- mIsSeventhColumn = seventhColumnRole.value<bool>();
- }
- }
- bool underlineEnabled = modelIndex().data(
- CalendarNamespace::CalendarMonthUnderlineRole).value<bool>();
- mWidget->drawUnderline(underlineEnabled);
-
}
/*!
- Creates the item layout.
+ Function to create the underline icon item
*/
-void CalenGridItemPrototype::createItemLayout()
+void CalenGridItemPrototype::drawUnderline(bool underlineEnabled)
{
- mLayout = new QGraphicsLinearLayout(Qt::Vertical, this);
+ if (underlineEnabled) {
+ if (!mTodayIndicatorItem) {
+ mTodayIndicatorItem = new HbIconItem(this);
+ HbStyle::setItemName(mTodayIndicatorItem,
+ QLatin1String("todayIndicatorItem"));
+ if (mTodayUnderLineColor.isValid()) {
+ mTodayIndicatorItem->setColor(mTodayUnderLineColor);
+ }
+ }
+ } else {
+ if (mTodayIndicatorItem) {
+ delete mTodayIndicatorItem;
+ mTodayIndicatorItem = NULL;
+ }
+ }
+}
- mWidget = new CalenGridItem(this);
- mLayout->addItem(mWidget);
- mLayout->setSpacing(0);
- mLayout->setContentsMargins(0, 0, 0, 0);
-
- setLayout(mLayout);
+/*!
+ Function overwritten to avoid default behavior
+ */
+void CalenGridItemPrototype::pressStateChanged(bool pressed,bool animate)
+{
+ Q_UNUSED(pressed)
+ Q_UNUSED(animate)
+ // Just overrode it as we dont want to have any default behavior
}
/*!
- To paint grid item border
+ Function overwritten to avoid default behavior
*/
-void CalenGridItemPrototype::paint(QPainter* painter,
- const QStyleOptionGraphicsItem* option,
- QWidget* widget)
+void CalenGridItemPrototype::pressStateChanged(bool animate)
{
- Q_UNUSED(option);
- Q_UNUSED(widget);
-
- QPen pen;//
- pen.setStyle(Qt::SolidLine);
- pen.setWidth(GRIDLINE_WIDTH);
- QColor gridLineColor = HbColorScheme::color("qtc_cal_grid_line");
- if (gridLineColor.isValid()) {
- pen.setBrush(gridLineColor);
- } else {
- pen.setBrush(mGridBorderColor);
- }
- painter->setPen(pen);
- QRectF controlRect = boundingRect();
- // Check if this is seventh column item
- if ( !mIsSeventhColumn ) {
- // Then draw right and bottom borders
- QPointF startPoint = controlRect.bottomLeft();
- QPointF endPoint = controlRect.bottomRight();
- // Draw the bottom border
- painter->drawLine(startPoint, endPoint);
- startPoint = controlRect.topRight();
- // Draw right border
- painter->drawLine(startPoint, endPoint);
- } else {
- // Then draw only bottom border
- QPointF startPoint = controlRect.bottomLeft();
- QPointF endPoint = controlRect.bottomRight();
- // Draw the bottom border
- painter->drawLine(startPoint, endPoint);
- }
+ Q_UNUSED(animate)
+ // Just overrode it as we dont want to have any default behavior
}
+
+bool CalenGridItemPrototype::canSetModelIndex(const QModelIndex& index)
+{
+ Q_UNUSED(index)
+ return true;
+}
+
// End of file --Don't remove this.
--- a/calendarui/views/src/calenmonthgrid.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/views/src/calenmonthgrid.cpp Mon May 03 12:30:32 2010 +0300
@@ -22,6 +22,7 @@
#include <hbmainwindow.h>
#include <hbgridview.h>
#include <hbabstractviewitem.h>
+#include <hbstyleloader.h>
#include <hbcolorscheme.h>
// User includes
@@ -34,6 +35,7 @@
// Constants
#define SCROLL_SPEEED 1000
+#define GRIDLINE_WIDTH 0.075 //units
/*!
\class CalenMonthGrid
@@ -53,7 +55,8 @@
mView(NULL),
mCurrentRow(0),
mIsNonActiveDayFocused(false),
- mIgnoreItemActivated(false)
+ mIgnoreItemActivated(false),
+ mGridBorderColor(Qt::gray)
{
setScrollDirections(Qt::Vertical);
setRowCount(KNumOfVisibleRows);
@@ -64,10 +67,26 @@
setUniformItemSizes(true);
setVerticalScrollBarPolicy(HbScrollArea::ScrollBarAlwaysOff);
setClampingStyle(HbScrollArea::StrictClamping );
- CalenGridItemPrototype *gridItemPrototype = new CalenGridItemPrototype(this);
- setItemPrototype(gridItemPrototype);
+
+ // Get the content widget of the scroll area to draw the grid lines
+ mContentWidget = contentWidget();
+
+ // Get the color of the grid lines
+ mGridLineColor = HbColorScheme::color("qtc_cal_grid_line");
+
+ // Create the prototype
+ CalenGridItemPrototype* gridItemPrototype = new CalenGridItemPrototype(this);
+ // Create the model
mModel = new QStandardItemModel(14*KCalenDaysInWeek, 1, this);
- setModel(mModel);
+ // Set the mode and the prototype
+ setModel(mModel,gridItemPrototype);
+
+ // Register the widgetml and css files
+ HbStyleLoader::registerFilePath(":/");
+
+ // Set the layout name
+ setLayoutName("calendarCustomGridItem");
+
connect(this, SIGNAL(scrollingEnded()), this,
SLOT(scrollingFinished()));
@@ -109,75 +128,77 @@
mModel->insertRows(rowCount,countDiff);
}
QDateTime currDate = mView->getCurrentDay();
+ QDateTime currDateTime = CalenDateUtils::beginningOfDay(currDate);
QDateTime activeDay = mView->getActiveDay();
+ QDateTime activeDateTime = CalenDateUtils::beginningOfDay(activeDay);
+
QModelIndex currentIndex;
+
+ // Get the default text color to be set
+ QColor textColor = HbColorScheme::color("qtc_cal_month_notactive_dates");
+ HbExtendedLocale locale = HbExtendedLocale::system();
for (int i = 0; i < dataCount; i++) {
QDateTime dateTime = monthDataArray[i].Day();
currentIndex = mModel->index(i, 0);
- HbExtendedLocale locale = HbExtendedLocale::system();
// Get the localised string for the day
QString date = locale.toString(dateTime.date().day());
- mModel->itemFromIndex(currentIndex)->setData(date,
- CalendarNamespace::CalendarMonthDayRole);
+
+ // Create the variant list to contain the date to depict a grid item
+ QVariantList itemData;
+
+ // NOTE: Add the data in the order mentioned in the
+ // CalendarNamespace::DataRole enum. Dont change the order.
+ itemData << date;
// Check for active day
- if (CalenDateUtils::beginningOfDay(activeDay)
- == CalenDateUtils::beginningOfDay(dateTime)) {
+ if (activeDateTime == CalenDateUtils::beginningOfDay(dateTime)) {
mCurrentRow = currentIndex.row();
// Set the focus icon
- mModel->itemFromIndex(currentIndex)->setData(
- QString("qtg_fr_cal_focused_day_ind"),
- CalendarNamespace::CalendarMonthFocusRole);
+ itemData << QString("qtg_fr_cal_focused_day_ind");
} else {
// reset the highlight
- mModel->itemFromIndex(currentIndex)->setData(
- QString(""),
- CalendarNamespace::CalendarMonthFocusRole);
+ itemData << QString("");
}
// Check for current day
- if (CalenDateUtils::beginningOfDay(currDate)
- == CalenDateUtils::beginningOfDay(dateTime)) {
+ if (currDateTime == CalenDateUtils::beginningOfDay(dateTime)) {
// Set the underline icon
- mModel->itemFromIndex(currentIndex)->setData(true,
- CalendarNamespace::CalendarMonthUnderlineRole);
- } else {
- mModel->itemFromIndex(currentIndex)->setData(false,
- CalendarNamespace::CalendarMonthUnderlineRole);
+ itemData << true;
+ } else {
+ itemData << false;
}
- // Reset the event indicator attribute
- mModel->itemFromIndex(currentIndex)->setData(QString(""),
- CalendarNamespace::CalendarMonthEventRole);
-
// Check for events
if (monthDataArray[i].HasEvents()) {
// Set the underline icon
- mModel->itemFromIndex(currentIndex)->setData(QString(
- "qtg_graf_cal_event_ind"),
- CalendarNamespace::CalendarMonthEventRole);
+ itemData << QString("qtg_graf_cal_event_ind");
+ } else {
+ itemData << QString("");
}
- // Check if this item falls on seventh column
- if ((i % KCalenDaysInWeek) == 6) {
- // Set the seventh column role
- mModel->itemFromIndex(currentIndex)->setData(true,
- CalendarNamespace::CalendarMonthSeventhColumn);
- }
+
+ // Add default text color
+ itemData << textColor;
+ mModel->itemFromIndex(currentIndex)->setData(itemData);
}
mMonthDataArray = monthDataArray;
// Get the active month
QDateTime activeDate = mView->getActiveDay();
// Set the text color properly
- setActiveDates(activeDate);
+ setActiveDates(activeDate.date());
- // Reset the view and update it again
- reset();
- update();
-
- // Calculate the last visible item in the grid
- QModelIndex index = mModel->index(indexToBeScrolled, 0);
- scrollTo(index);
+ // NOTE: To make sure that we always display proper month,
+ // two calls have been made to scrollTo(), one with top
+ // visible item and other with bottom visible item
+ // Calculate the first visible item in the grid
+ QModelIndex firstVisibleIndex = mModel->index(indexToBeScrolled -
+ (KNumOfVisibleRows * KCalenDaysInWeek - 1), 0);
+ scrollTo(firstVisibleIndex);
+
+
+ // Calculate the last visible item in the grid
+ QModelIndex lastVisibleIndex = mModel->index(indexToBeScrolled, 0);
+ scrollTo(lastVisibleIndex);
}
/*!
@@ -187,6 +208,9 @@
{
Q_UNUSED(value)
mDirection = down;
+ // Before we start scrolling, setthe active text color to previous month
+ QDateTime activeDate = mView->getActiveDay();
+ setActiveDates(activeDate.addMonths(-1).date());
HbScrollArea::downGesture(SCROLL_SPEEED);
}
@@ -197,6 +221,9 @@
{
Q_UNUSED(value)
mDirection = up;
+ // Before we start scrolling, setthe active text color to future month
+ QDateTime activeDate = mView->getActiveDay();
+ setActiveDates(activeDate.addMonths(1).date());
HbScrollArea::upGesture(SCROLL_SPEEED);
}
@@ -272,21 +299,6 @@
return; // return immediately
}
} else if(!mIsAtomicScroll) {
- if (mDirection == down) {
- // Before we start scrolling, setthe active text color to previous month
- QDateTime activeDate = mView->getActiveDay();
- if (!mIsNonActiveDayFocused) {
- activeDate = activeDate.addMonths(-1);
- }
- setActiveDates(activeDate);
- } else if (mDirection == up) {
- // Before we start scrolling, setthe active text color to previous month
- QDateTime activeDate = mView->getActiveDay();
- if (!mIsNonActiveDayFocused) {
- activeDate = activeDate.addMonths(1);
- }
- setActiveDates(activeDate);
- }
// Before we do anything, set the focus to proper date
// Set it only when non active day was focussed. When inactive day
// was focussed, we need to focus the same day
@@ -320,6 +332,7 @@
{
mIsNonActiveDayFocused = false;
QDateTime currDate = mView->getCurrentDay();
+ QDateTime currDateTime = CalenDateUtils::beginningOfDay( currDate );
int rowsInFutMonthEarlier = mView->rowsInFutMonth();
int rowsInPrevMonthEarlier = mView->rowsInPrevMonth();
@@ -341,34 +354,53 @@
// Add the new days
int countToBeAdded = rowsInPrevMonth * KCalenDaysInWeek;
+
mModel->insertRows(0, countToBeAdded);
count = mModel->rowCount();
+
+ // Get the default text color to be set
+ QColor textColor = HbColorScheme::color("qtc_cal_month_notactive_dates");
+ HbExtendedLocale locale = HbExtendedLocale::system();
+
for (int i = 0; i < countToBeAdded; i++) {
QDateTime dateTime = monthDataList[i].Day();
- int date = dateTime.date().day();
+
+ // Get the localised string for the day
+ QString date = locale.toString(dateTime.date().day());
QModelIndex currentIndex = mModel->index(i, 0);
- mModel->itemFromIndex(currentIndex)->setData(date,
- CalendarNamespace::CalendarMonthDayRole);
- // Check for current date
- if (CalenDateUtils::beginningOfDay( currDate ) ==
- CalenDateUtils::beginningOfDay( dateTime )) {
+
+ // Create the variant list to contain the date to depict a grid item
+ QVariantList itemData;
+
+ // NOTE: Add the data in the order mentioned in the
+ // CalendarNamespace::DataRole enum. Dont change the order.
+ itemData << date;
+
+ // Diable the focus role
+ itemData << QString("");
+
+ // Check for current day
+ if (currDateTime == CalenDateUtils::beginningOfDay( dateTime )) {
// Set the underline icon
- mModel->setData(mModel->index(i, 0), true,
- CalendarNamespace::CalendarMonthUnderlineRole);
- }
- if (monthDataList[i].HasEvents()) {
- // Set the underline icon
- mModel->setData(mModel->index(i, 0),
- QString("qtg_graf_cal_event_ind"),
- CalendarNamespace::CalendarMonthEventRole);
+ itemData << true;
+ } else {
+ itemData << false;
}
- // Check if this item falls on seventh column
- if ((i%KCalenDaysInWeek) == 6) {
- // Set the seventh column role
- mModel->setData(mModel->index(i, 0), true,
- CalendarNamespace::CalendarMonthSeventhColumn);
+ // Update the event indicators
+ if (monthDataList[i].HasEvents()) {
+ // Set the event indicator icon
+ itemData << QString("qtg_graf_cal_event_ind");
+ } else {
+ itemData << QString("");
}
+
+ // Add default text color
+
+ itemData << textColor;
+
+ // Set the data to model
+ mModel->itemFromIndex(currentIndex)->setData(itemData);
}
// Update the mCurrentRow
@@ -400,6 +432,7 @@
{
mIsNonActiveDayFocused = false;
QDateTime currDate = mView->getCurrentDay();
+ QDateTime currDateTime = CalenDateUtils::beginningOfDay( currDate );
int rowsInFutMonth = mView->rowsInFutMonth();
int rowsInPrevMonth = mView->rowsInPrevMonth();
// remove the cells in the previous month
@@ -414,46 +447,62 @@
rowsInFutMonth = mView->rowsInFutMonth();
int countToBeAdded = rowsInFutMonth * KCalenDaysInWeek;
int lastVisibleIndex = monthDataList.count() - countToBeAdded;
+
int rowCount = mModel->rowCount();
mModel->insertRows(rowCount, countToBeAdded);
+
+ // Get the default text color to be set
+ QColor textColor = HbColorScheme::color("qtc_cal_month_notactive_dates");
for (int i = 0; i < countToBeAdded; i++) {
QMap<int, QVariant> data;
- QModelIndex currentIndex = mModel->index(i, 0);
+ QModelIndex currentIndex = mModel->index(rowCount + i, 0);
QDateTime dateTime = monthDataList[lastVisibleIndex + i].Day();
- int date = dateTime.date().day();
+ HbExtendedLocale locale = HbExtendedLocale::system();
+ // Get the localised string for the day
+ QString date = locale.toString(dateTime.date().day());
data.insert(CalendarNamespace::CalendarMonthDayRole, date);
- mModel->setItemData(mModel->index(rowCount + i, 0), data);
- // Check for active day
- if (CalenDateUtils::beginningOfDay( currDate ) ==
- CalenDateUtils::beginningOfDay( dateTime )) {
+
+ // Create the variant list to contain the date to depict a grid item
+ QVariantList itemData;
+
+ // NOTE: Add the data in the order mentioned in the
+ // CalendarNamespace::DataRole enum. Dont change the order.
+ itemData << date;
+
+ // Disable the focus role
+ itemData << QString("");
+
+ // Check for current day
+ if (currDateTime == CalenDateUtils::beginningOfDay( dateTime )) {
// Set the underline icon
- mModel->setData(mModel->index(rowCount + i, 0),true,
- CalendarNamespace::CalendarMonthUnderlineRole);
+ itemData << true;
+ } else {
+ itemData << false;
}
// Update the event indicators
if (monthDataList[lastVisibleIndex + i].HasEvents()) {
// Set the underline icon
- mModel->setData(mModel->index(rowCount + i, 0),
- QString("qtg_graf_cal_event_ind"),
- CalendarNamespace::CalendarMonthEventRole);
+ itemData << QString("qtg_graf_cal_event_ind");
+ } else {
+ itemData << QString("");
}
- if ((i%KCalenDaysInWeek) == 6) {
- // Set the seventh column role
- mModel->setData(mModel->index(rowCount + i, 0), true,
- CalendarNamespace::CalendarMonthSeventhColumn);
- }
+ // Add default text color
+ itemData << textColor;
+
+ // Set the data to model
+ mModel->itemFromIndex(currentIndex)->setData(itemData);
}
// Update the mCurrentRow
mCurrentRow -= (countToBeDeleted);
-
- mIsAtomicScroll = true;
for (int i = 0; i < countToBeDeleted; i++) {
mModel->removeRow(0);
}
+ mIsAtomicScroll = true;
+
// Calculate the proper index to be scrolled to
int itemToBeScrolled = rowsInPrevMonth * KCalenDaysInWeek;
QModelIndex indexToBeScrolled = mModel->index(itemToBeScrolled, 0);
@@ -475,21 +524,28 @@
// Launch the agenda view
mView->launchDayView();
} else {
- // Reset the focus attribute to this item
- mModel->setData(mModel->index(mCurrentRow,0), QString(""),
- CalendarNamespace::CalendarMonthFocusRole);
+ // Reset the focus attribute to this item
+ QModelIndex itemIndex = mModel->index(mCurrentRow,0);
+ QVariant itemData = itemIndex.data(Qt::UserRole + 1);
+ QVariantList list = itemData.toList();
+ list.replace(CalendarNamespace::CalendarMonthFocusRole, QString(""));
+ mModel->itemFromIndex(itemIndex)->setData(list);
// Inform view to update the context and preview panes
mCurrentRow = index.row();
- mModel->setData(mModel->index(mCurrentRow,0),
- QString("qtg_fr_cal_focused_day_ind"),
- CalendarNamespace::CalendarMonthFocusRole);
+ itemIndex = mModel->index(mCurrentRow,0);
+ itemData = itemIndex.data(Qt::UserRole + 1);
+ list = itemData.toList();
+ list.replace(CalendarNamespace::CalendarMonthFocusRole,
+ QString("qtg_fr_cal_focused_day_ind"));
+ mModel->itemFromIndex(itemIndex)->setData(list);
// Check if inactive date is tapped
- QList<CalenMonthData> list = mView->monthDataList();
- if(!list[mCurrentRow].isActive()){
+ QDateTime activeMonth = mView->getActiveDay();
+ int month = activeMonth.date().month();
+ if(month != mMonthDataArray[mCurrentRow].Day().date().month()){
// Set the flag
mIsNonActiveDayFocused = true;
- mNonActiveFocusedDay = list[mCurrentRow].Day();
+ mNonActiveFocusedDay = mMonthDataArray[mCurrentRow].Day();
// Get the current active month
QDateTime activeMonth = mView->getActiveDay();
@@ -529,14 +585,21 @@
indexEnd = (rowsInPrevMonth + 1) * KCalenDaysInWeek;
}
// Reset the focus attribute to earlier current item
- mModel->setData(mModel->index(mCurrentRow,0), QString(""),
- CalendarNamespace::CalendarMonthFocusRole);
+ QModelIndex index = mModel->index(mCurrentRow,0);
+ QVariant itemData = index.data(Qt::UserRole + 1);
+ QVariantList list = itemData.toList();
+ list.replace(CalendarNamespace::CalendarMonthFocusRole, QString(""));
+ mModel->itemFromIndex(index)->setData(list);
+
// Search for this date in the model
for (int i = indexStart; i <= indexEnd; i++) {
if (monthDataList[i].Day().date() == dateToBeFocussed.date()) {
- mModel->setData(mModel->index(i,0),
- QString("qtg_fr_cal_focused_day_ind"),
- CalendarNamespace::CalendarMonthFocusRole);
+ index = mModel->index(i,0);
+ itemData = index.data(Qt::UserRole + 1);
+ list = itemData.toList();
+ list.replace(CalendarNamespace::CalendarMonthFocusRole,
+ QString("qtg_fr_cal_focused_day_ind"));
+ mModel->itemFromIndex(index)->setData(list);
mCurrentRow = i;
mView->setContextForActiveDay(i);
break;
@@ -545,23 +608,89 @@
}
/*!
- Sets the appropriate text colot depending upon the active dates
+ Sets the appropriate text color depending upon the active dates
*/
-void CalenMonthGrid::setActiveDates(QDateTime activeDate)
+void CalenMonthGrid::setActiveDates(QDate activeDate)
{
- int month = activeDate.date().month();
- for (int i = 0; i < mMonthDataArray.count(); i++) {
- QColor textColor;
- if (month == mMonthDataArray[i].Day().date().month()) {
- // Set the active text color
- textColor = HbColorScheme::color("qtc_cal_month_active_dates");
- } else {
- // Set the inactive text color
- textColor = HbColorScheme::color("qtc_cal_month_notactive_dates");
+ // By default, text color will be set as inactive date color
+ // set active date color only for the dates that fall in current month
+ // So, in the whole data array, start from where the current month starts
+ // and stop the loop where it the current month ends
+
+ int start = 0;
+ int end = mMonthDataArray.count();
+
+ // Calculate the start and end values
+ QDate firstDateInGrid = mView->firstDayOfGrid().date();
+
+ // Get the date where active month starts
+ QDate startOfActiveMonth(activeDate.year(), activeDate.month(),1);
+ // Number of days frm start of the grid to start of the month
+ start = firstDateInGrid.daysTo(startOfActiveMonth);
+
+ // Get the date where active month ends
+ QDate endOfActiveMonth = startOfActiveMonth.addDays(
+ activeDate.daysInMonth());
+ // Number of days frm start of the grid to end of the month
+ end = firstDateInGrid.daysTo(endOfActiveMonth);
+
+ // Set the active text color
+ QColor textColor = HbColorScheme::color("qtc_cal_month_active_dates");
+ if (textColor.isValid()) {
+ for (int i = start; i < end; i++) {
+ QModelIndex index = mModel->index(i,0);
+ QVariant itemData = index.data(Qt::UserRole + 1);
+ QVariantList list = itemData.toList();
+ list.replace(CalendarNamespace::CalendarMonthTextColorRole, textColor);
+ mModel->itemFromIndex(index)->setData(list);
}
- if (textColor.isValid()) {
- mModel->setData(mModel->index(i,0), textColor,
- CalendarNamespace::CalendarMonthTextColorRole);
+ }
+
+ // Now set the inactive text color to those which were active before the swipe
+ if (mDirection == invalid) {
+ // no need to do anything as other dates will be in inactive dates color
+ return;
+ }
+
+ if (mDirection == up) {
+ // Came here as user did up gesture
+ // Get the activeDate that was set before the swipe
+ activeDate = activeDate.addMonths(-1);
+
+ // Get the date where active month starts
+ startOfActiveMonth = QDate(activeDate.year(), activeDate.month(),1);
+ // Number of days frm start of the grid to start of the month
+ start = firstDateInGrid.daysTo(startOfActiveMonth);
+
+ // Get the date where active month ends
+ QDate endOfActiveMonth = startOfActiveMonth.addDays(activeDate.daysInMonth());
+ // Number of days frm start of the grid to end of the month
+ end = firstDateInGrid.daysTo(endOfActiveMonth);
+ } else if (mDirection == down) {
+ // Came here as user did down gesture
+ // Get the activeDate that was set before the swipe
+ activeDate = activeDate.addMonths(1);
+
+ // Get the activeDate that was set before the swipe
+ startOfActiveMonth = QDate(activeDate.year(), activeDate.month(),1);
+ // Number of days frm start of the grid to start of the month
+ start = firstDateInGrid.daysTo(startOfActiveMonth);
+
+ // Get the date where active month ends
+ QDate endOfActiveMonth = startOfActiveMonth.addDays(activeDate.daysInMonth());
+ // Number of days frm start of the grid to end of the month
+ end = firstDateInGrid.daysTo(endOfActiveMonth);
+ }
+
+ // Set the inactive text color
+ textColor = HbColorScheme::color("qtc_cal_month_notactive_dates");
+ if (textColor.isValid()) {
+ for (int i = start; i < end; i++) {
+ QModelIndex index = mModel->index(i,0);
+ QVariant itemData = index.data(Qt::UserRole + 1);
+ QVariantList list = itemData.toList();
+ list.replace(CalendarNamespace::CalendarMonthTextColorRole, textColor);
+ mModel->itemFromIndex(index)->setData(list);
}
}
}
@@ -591,4 +720,66 @@
// We are overriding this function to avoid the default behavior of
// hbgridview on orientation change as it swaps the row and column counts
}
+
+/*!
+ Paint function to draw grid lines
+ */
+void CalenMonthGrid::paint(QPainter* painter,
+ const QStyleOptionGraphicsItem* option,
+ QWidget* widget)
+{
+ Q_UNUSED(option);
+ Q_UNUSED(widget);
+
+ // Set the required attributes to the pen
+ QPen pen;
+ pen.setStyle(Qt::SolidLine);
+ pen.setWidth(GRIDLINE_WIDTH);
+ if (mGridLineColor.isValid()) {
+ pen.setBrush(mGridLineColor);
+ } else {
+ pen.setBrush(mGridBorderColor);
+ }
+ // Set the pen to the painter
+ painter->setPen(pen);
+
+ // Get the sizes of content widget
+ qreal contentHeight = mContentWidget->size().height();
+ qreal contentWidth = mContentWidget->size().width();
+
+ // Get the num of rows
+ int numOfRows = mModel->rowCount() / KCalenDaysInWeek;
+ // Draw horizontal lines
+ qreal rowWidth = contentHeight / numOfRows;
+
+ QPointF startPoint = mContentWidget->pos();
+ QPointF endPoint(startPoint.x() + contentWidth,
+ startPoint.y());
+
+ // Create the list of points for which lines have to be drawn
+ // List should have even number of points so that it draws all the lines
+ // Painter draws the line for first two points in the list and then second
+ // line for next two points in the list like that. Hence, list should
+ // contain even number of points
+ QVector<QPointF> pointList;
+ for (int i = 0; i < numOfRows; i++) {
+ pointList.append(QPointF(startPoint.x(),
+ startPoint.y() + (i * rowWidth)));
+ pointList.append(QPointF(endPoint.x(), endPoint.y() + (i * rowWidth)));
+ }
+
+ // Draw vertical lines
+ qreal colWidth = contentWidth / KCalenDaysInWeek;
+ endPoint = QPointF(startPoint.x(),
+ startPoint.y() + contentHeight);
+ for (int i = 1; i < KCalenDaysInWeek; i++) {
+ pointList.append(QPointF(startPoint.x() + (i * colWidth),
+ startPoint.y()));
+ pointList.append(QPointF(endPoint.x() + (i * colWidth), endPoint.y()));
+ }
+
+ // Draw the lines for the points in the vector list
+ painter->drawLines(pointList);
+}
+
// End of File
--- a/calendarui/views/src/calenmonthview.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/views/src/calenmonthview.cpp Mon May 03 12:30:32 2010 +0300
@@ -47,7 +47,7 @@
#include "calenthicklinesdrawer.h"
#include "calencommon.h"
#include "CalendarInternalCRKeys.h"
-
+#include "calenpluginlabel.h"
/*!
\class CalenMonthView
@@ -59,7 +59,10 @@
*/
CalenMonthView::CalenMonthView(MCalenServices &services) :
CalenNativeView(services), mAgendaUtil(services.agendaInterface()),
- mGoToTodayAction(0)
+ mGoToTodayAction(0),
+ mPrevRegionalInfo(0),
+ mCurrRegionalInfo(0),
+ mNextRegionalInfo(0)
{
mIsWeekNumbersShown = 0;
mOrientation = mServices.MainWindow().orientation();
@@ -95,6 +98,12 @@
mTitleLabel
= qobject_cast<HbLabel *> (
mDocLoader->findWidget(CALEN_MONTH_TITLE));
+ // Set the title text color
+ QColor monthTitleColor = HbColorScheme::color("qtc_cal_monthgrid_title");
+ if (monthTitleColor.isValid()) {
+ mTitleLabel->setTextColor(monthTitleColor);
+ }
+
mDayNameWidget
= qobject_cast<CalenThickLinesDrawer *> (
mDocLoader->findWidget(
@@ -159,6 +168,9 @@
mCurrPreviewPane->setView(this);
mCurrPreviewPane->setNoEntriesLabel(currPaneNoEntriesLabel);
+ mCurrPaneLayoutWidget = qobject_cast<HbWidget*>(docLoader->findWidget(CALEN_CURRPANELAYOUT));
+ mCurrPaneLayout = static_cast<QGraphicsLinearLayout*>(mCurrPaneLayoutWidget->layout());
+
mPrevPaneParent = qobject_cast<HbWidget *> (
mDocLoader->findWidget(CALEN_PREVPREVIEWPARENT));
// Get previous day preview pane widget
@@ -173,6 +185,8 @@
mPrevPreviewPane->setNoEntriesLabel(prevPaneNoEntriesLabel);
mPrevPaneParent->setVisible(false);
+ mPrevPaneLayoutWidget = qobject_cast<HbWidget*>(docLoader->findWidget(CALEN_PREVPANELAYOUT));
+ mPrevPaneLayout = static_cast<QGraphicsLinearLayout*>(mPrevPaneLayoutWidget->layout());
mNextPaneParent = qobject_cast<HbWidget *> (
mDocLoader->findWidget(CALEN_NEXTPREVIEWPARENT));
// Get next day preview pane widget
@@ -186,6 +200,8 @@
mNextPreviewPane->setView(this);
mNextPreviewPane->setNoEntriesLabel(nextPaneNoEntriesLabel);
mNextPaneParent->setVisible(false);
+ mNextPaneLayoutWidget = qobject_cast<HbWidget*>(docLoader->findWidget(CALEN_NEXTPANELAYOUT));
+ mNextPaneLayout = static_cast<QGraphicsLinearLayout*>(mNextPaneLayoutWidget->layout());
mMonthGridPlusWeekNumWidget
= qobject_cast<HbWidget *> (
@@ -215,11 +231,10 @@
// TODO: Need to move this to docml
// Set the title to the submenu
- HbMenu
- *deleteSubMenu =
+ mDeleteSubMenu =
qobject_cast<HbMenu *> (
mDocLoader->findObject(CALEN_MONTVIEW_DELETE_SUBMENU));
- deleteSubMenu->setTitle(hbTrId("txt_calendar_opt_delete_entries"));
+ mDeleteSubMenu->setTitle(hbTrId("txt_calendar_opt_delete_entries"));
HbAction
*beforeDateAction =
@@ -250,6 +265,12 @@
connect(&(mServices.MainWindow()),
SIGNAL(orientationChanged(Qt::Orientation)), this,
SLOT(changeOrientation(Qt::Orientation)));
+
+ // Connect to the signal when options menu is shown
+ // This is required to add/remove dynamically some options
+ connect(menu(), SIGNAL(aboutToShow ()), this,
+ SLOT(addRemoveActionsInMenu()));
+
mIsFirstTimeLoad = true;
// Add background items to all the widgets
@@ -371,13 +392,15 @@
{
// Set the background items for all the widgets
HbFrameItem* frame = NULL;
- if (mMonthGrid) {
+ HbWidget* monthViewExceptPreviewPane = qobject_cast<HbWidget *> (
+ mDocLoader->findWidget(CALEN_MONTHVIEW_EXCEPT_PANE));
+ if (monthViewExceptPreviewPane) {
// The grid background
frame = new HbFrameItem(this);
frame->frameDrawer().setFrameType(HbFrameDrawer::NinePieces);
frame->frameDrawer().setFrameGraphicsName("qtg_fr_cal_monthgrid_bg");
- mMonthGrid->setBackgroundItem(frame->graphicsItem(), -2);
+ monthViewExceptPreviewPane->setBackgroundItem(frame->graphicsItem(), -2);
}
if (mTitleLabel) {
// The month title
@@ -387,7 +410,104 @@
frame->frameDrawer().setFrameGraphicsName("qtg_fr_cal_monthgrid_title_bg");
mTitleLabel->setBackgroundItem(frame->graphicsItem(), -2);
}
-
+
+ // Set the frame to the preview pane
+ frame = new HbFrameItem(this);
+ frame->frameDrawer().setFrameType(HbFrameDrawer::NinePieces);
+
+ frame->frameDrawer().setFrameGraphicsName("qtg_fr_cal_preview_bg");
+ mPrevPaneLayoutWidget->setBackgroundItem(frame->graphicsItem(), -5);
+
+ // Set the frame to the preview pane
+ frame = new HbFrameItem(this);
+ frame->frameDrawer().setFrameType(HbFrameDrawer::NinePieces);
+
+ frame->frameDrawer().setFrameGraphicsName("qtg_fr_cal_preview_bg");
+ mCurrPaneLayoutWidget->setBackgroundItem(frame->graphicsItem(), -5);
+
+ // Set the frame to the preview pane
+ frame = new HbFrameItem(this);
+ frame->frameDrawer().setFrameType(HbFrameDrawer::NinePieces);
+
+ frame->frameDrawer().setFrameGraphicsName("qtg_fr_cal_preview_bg");
+ mNextPaneLayoutWidget->setBackgroundItem(frame->graphicsItem(), -5);
+}
+
+void CalenMonthView::showHideRegionalInformation()
+{
+ XQSettingsKey regionalInfo(XQSettingsKey::TargetCentralRepository,
+ KCRUidCalendar.iUid, KShowRegionalInformation);
+
+ int showRegionalInfo = mSettingsManager->readItemValue(regionalInfo).toUInt();
+ if (showRegionalInfo) {
+
+ // Add the regional information to the preview panes
+ if (!mPrevRegionalInfo) {
+ mPrevRegionalInfo = new CalenPluginLabel(mServices, this);
+ mPrevPaneLayout->insertItem(0, mPrevRegionalInfo);
+
+ HbFrameItem *frameCurr = new HbFrameItem(this);
+ frameCurr->frameDrawer().setFrameType(HbFrameDrawer::ThreePiecesHorizontal);
+ frameCurr->frameDrawer().setFrameGraphicsName("qtg_fr_cal_preview_title_bg");
+ mPrevRegionalInfo->setBackgroundItem(frameCurr->graphicsItem(), -2);
+ }
+ if (!mCurrRegionalInfo) {
+ mCurrRegionalInfo = new CalenPluginLabel(mServices, this);
+ mCurrPaneLayout->insertItem(0, mCurrRegionalInfo);
+
+ HbFrameItem *frameCurr = new HbFrameItem(this);
+ frameCurr->frameDrawer().setFrameType(HbFrameDrawer::ThreePiecesHorizontal);
+ frameCurr->frameDrawer().setFrameGraphicsName("qtg_fr_cal_preview_title_bg");
+ mCurrRegionalInfo->setBackgroundItem(frameCurr->graphicsItem(), -2);
+ }
+ if (!mNextRegionalInfo) {
+ mNextRegionalInfo = new CalenPluginLabel(mServices, this);
+ mNextPaneLayout->insertItem(0, mNextRegionalInfo);
+
+ HbFrameItem *frameCurr = new HbFrameItem(this);
+ frameCurr->frameDrawer().setFrameType(HbFrameDrawer::ThreePiecesHorizontal);
+ frameCurr->frameDrawer().setFrameGraphicsName("qtg_fr_cal_preview_title_bg");
+ mNextRegionalInfo->setBackgroundItem(frameCurr->graphicsItem(), -2);
+ }
+
+ if (pluginEnabled()) {
+ QString *pluginString = pluginText();
+ mPrevRegionalInfo->setPlainText(*pluginString);
+ mCurrRegionalInfo->setPlainText(*pluginString);
+ mNextRegionalInfo->setPlainText(*pluginString);
+ }
+ } else {
+ if (mPrevRegionalInfo) {
+ mPrevPaneLayout->removeItem(mPrevRegionalInfo);
+ delete mPrevRegionalInfo;
+ mPrevRegionalInfo = NULL;
+ }
+ if (mCurrRegionalInfo) {
+ mPrevPaneLayout->removeItem(mCurrRegionalInfo);
+ delete mCurrRegionalInfo;
+ mCurrRegionalInfo = NULL;
+ }
+ if (mNextRegionalInfo) {
+ mPrevPaneLayout->removeItem(mNextRegionalInfo);
+ delete mNextRegionalInfo;
+ mNextRegionalInfo = NULL;
+ }
+ }
+}
+
+/*!
+ Handles the context changed notification
+ */
+void CalenMonthView::onContextChanged()
+{
+ //Update plugin label after setting context
+ if (mCurrRegionalInfo && mPrevRegionalInfo && mNextPaneLayout
+ && pluginEnabled()) {
+ QString *pluginString = pluginText();
+ mPrevRegionalInfo->setPlainText(*pluginString);
+ mCurrRegionalInfo->setPlainText(*pluginString);
+ mNextRegionalInfo->setPlainText(*pluginString);
+ }
}
/*!
@@ -440,17 +560,49 @@
void CalenMonthView::goToToday()
{
QDateTime today = CalenDateUtils::today();
- // First check if we are not already
+ // First check if we are not alread
// showing today's month view
if (mDate == today) {
return;
+ } else if (mActiveMonth.date().year() == today.date().year() &&
+ mActiveMonth.date().month() == today.date().month()) {
+ // User is in current month only, so just set the focus to current
+ // date grid item and refresh the preview pane
+ int currIndex = mFirstDayOfGrid.daysTo(today);
+ setCurrGridIndex(currIndex);
+ return;
}
// Set the context and repopulate the view
MCalenContext &context = mServices.Context();
context.setFocusDateAndTimeL(today, KCalenMonthViewUidValue);
- mServices.IssueCommandL(ECalenStartActiveStep);
+ refreshViewOnGoToDate();
+}
+
+/*
+ Slot to handle adding / removing actions frm the menu when menu is about to
+ shown to the user
+ */
+void CalenMonthView::addRemoveActionsInMenu()
+{
+ HbAction* menuAction = mDeleteSubMenu->menuAction();
+ // Check if there are no entries in the database
+ if (mAgendaUtil->areNoEntriesInCalendar() && menuAction) {
+ // hide the delete entries option
+ menuAction->setVisible(false);
+ } else if (menuAction) {
+ // Show the option to delete
+ menuAction->setVisible(true);
+ }
+
+ // Check if we are population for current day, if yes then disable the
+ // gototoday action
+ if ((CalenDateUtils::today().date() == mDate.date()) && mGoToTodayAction) {
+ mGoToTodayAction->setVisible(false);
+ } else if (mGoToTodayAction){
+ mGoToTodayAction->setVisible(true);
+ }
}
/*!
@@ -477,6 +629,10 @@
// Create the grid items with proper dates
createGrid();
+
+ // Check if regional information needs to be shown
+ // and add it or remove it
+ showHideRegionalInformation();
// Complete the population
completePopulation();
@@ -498,6 +654,25 @@
}
/*!
+ Slot to handle gotodate action
+ */
+void CalenMonthView::refreshViewOnGoToDate()
+{
+ setActiveDay(dateFromContext(mServices.Context()));
+ setDate();
+ setDateToLabel();
+ // fetch list of required calendar instances
+ populateWithInstanceView();
+
+ populatePreviewPane(mDate);
+
+ mMonthGrid->updateMonthGridModel(mMonthDataArray, mIndexToBeScrolled);
+
+ // Start the auto scroll on current preview pane
+ mCurrPreviewPane->startAutoScroll();
+}
+
+/*!
Reads the date from the context and stores into mDate
*/
QDateTime CalenMonthView::dateFromContext(const MCalenContext &context)
@@ -522,13 +697,6 @@
void CalenMonthView::setActiveDay(QDateTime day)
{
mDate = day;
- // Check if we are population for current day, if yes then disable the
- // gototoday action
- if ((CalenDateUtils::today().date() == mDate.date()) && mGoToTodayAction) {
- mGoToTodayAction->setVisible(false);
- } else if (mGoToTodayAction){
- mGoToTodayAction->setVisible(true);
- }
mActiveMonth = mDate;
// Get the first day of the previous month
@@ -582,7 +750,7 @@
// Calculate the last visible day
int index = (mNumOfRowsInPrevMonth + KNumOfVisibleRows) * KCalenDaysInWeek;
- QDateTime lastVisibleDate = mFirstDayOfGrid.addDays(index);
+ QDateTime lastVisibleDate = mFirstDayOfGrid.addDays(index - 1);
QDateTime dateTimeToCalc = mLastDayOfGrid;
mNumOfRowsInFutureMonth = 0;
while (dateTimeToCalc > lastVisibleDate) {
@@ -604,8 +772,6 @@
CalenMonthData element(currentDay);
mMonthDataArray.append(element);
}
- // Update the dates with active flag
- updateMonthDataArrayWithActiveDates();
}
/*!
@@ -726,9 +892,6 @@
if (mIsWeekNumbersShown) {
updateWeekNumGridModel();
}
-
- // Update the dates with active flag
- updateMonthDataArrayWithActiveDates();
}
/*!
Called when up gesture is performed
@@ -772,8 +935,7 @@
mMonthDataArray.append(element);
}
- // Update the mMonthDataArray with instances if any
- populateNextMonth();
+
// Update the necessary globals
mTotalNumOfGridItems += countToBeAdded;
@@ -795,9 +957,10 @@
if (mIsWeekNumbersShown) {
updateWeekNumGridModel();
}
-
- // Update the dates with active flag
- updateMonthDataArrayWithActiveDates();
+
+ // Update the mMonthDataArray with instances if any
+ populateNextMonth();
+
}
/*!
@@ -879,77 +1042,24 @@
QDateTime gridEnd(mLastDayOfGrid.date(), QTime(23, 59, 59, 0));
QList<AgendaEntry> list;
- getInstanceList(list, gridStart, gridEnd);
-
- //Parse fetched items
- if (list.count()) {
- for (int i(0); i < list.count(); i++) {
- AgendaEntry entry = list[i];
-
- // Parse Day Notes, Appointments and Remainders
- // Start and end time of Event/Appointment/Remainders has to be
- // indentified before marking the tags
- // EEvents/Appointments can span multiple days,
- // while Anniversaries cannot.
- if ((entry.type() == AgendaEntry::TypeEvent) || (entry.type()
- == AgendaEntry::TypeAppoinment) || (entry.type()
- == AgendaEntry::TypeReminder)) {
- // The start time of the instance
- QDateTime startTime = entry.startTime();
- // The instance's start index from the grid start
- int startIndex(gridStart.daysTo(startTime));
- // The end time of the instance
- QDateTime endTime = entry.endTime();
-
- if (CalenAgendaUtils::endsAtStartOfDayL(entry, endTime)) {
- // prevent problems with items ending tomorrow at 00:00
- QTime time = endTime.time();
- time.setHMS(time.hour(), time.minute() - 1, time.second(),
- time.msec());
- endTime.setTime(time);
+ AgendaUtil::FilterFlags filter =
+ AgendaUtil::FilterFlags(AgendaUtil::IncludeAnniversaries
+ | AgendaUtil::IncludeAppointments
+ | AgendaUtil::IncludeEvents
+ | AgendaUtil::IncludeReminders
+ | AgendaUtil::IncludeIncompletedTodos);
+
+ // Get the list of dates which have events
+ QList<QDate> datesWithEvents;
+ mAgendaUtil->markDatesWithEvents(gridStart,gridEnd,filter,datesWithEvents);
+
+ // Parse thru the list of dates and set the required flags
+ for(int i(0); i < datesWithEvents.count(); i++) {
+ int offset = mFirstDayOfGrid.date().daysTo(datesWithEvents.at(i));
+ mMonthDataArray[offset].SetHasEvents(true);
+ }
- if (endTime <= gridStart) {
- // ends at the start of the grid -> not visible
- continue; // skip
- }
- }
- // The instance's end index from the grid start
- int endIndex(gridStart.daysTo(endTime));
-
- // Mark the days from start index to end index
- for (; startIndex <= endIndex; startIndex++) {
- if (startIndex >= 0 &&
- startIndex < mMonthDataArray.count()) {
- mMonthDataArray[startIndex].SetHasEvents(true);
- }
- } // Parse Anniversaries
- } else if (entry.type() == AgendaEntry::TypeAnniversary) {
- QDateTime startTime = entry.startTime();
- // The instance's start index from the grid start
- int index(gridStart.daysTo(startTime));
- // Mark the particular day
- if (index >= 0 && index < mMonthDataArray.count()) {
- mMonthDataArray[index].SetHasEvents(true);
- } // Parse To DOs
- } else if (entry.type() == AgendaEntry::TypeTodo) {
- QDateTime startTime = entry.startTime();
- ;
- int index;
- // Mark the particular day if the instance's start
- // time is not in the past
- if (startTime >= today) {
- index = gridStart.daysTo(startTime);
- } else {// Mark for today if the instance's
- // start time is in the past
- index = todayIndex;
- }
- if (index >= 0 && index < mMonthDataArray.count()) {
- mMonthDataArray[index].SetHasEvents(true);
- }
- }
- }
- }
- list.clear();
+ datesWithEvents.clear();
}
/*!
@@ -966,77 +1076,25 @@
QDateTime end = gridStart.addDays(mNumOfRowsInPrevMonth * KCalenDaysInWeek);
QDateTime gridEnd(end.date(), QTime(23, 59, 59, 0));
- getInstanceList(list, gridStart, gridEnd);
- //Parse fetched items
- if (list.count()) {
- for (int i(0); i < list.count(); i++) {
- AgendaEntry entry = list[i];
-
- // Parse Day Notes, Appointments and Remainders
- // Start and end time of Event/Appointment/Remainders
- // has to be indentified before marking the tags
- // EEvents/Appointments can span multiple days,
- // while Anniversaries cannot.
- if ((entry.type() == AgendaEntry::TypeEvent) || (entry.type()
- == AgendaEntry::TypeAppoinment) || (entry.type()
- == AgendaEntry::TypeReminder)) {
- // The start time of the instance
- QDateTime startTime = entry.startTime();
- // The instance's start index from the grid start
- int startIndex(gridStart.daysTo(startTime));
- // The end time of the instance
- QDateTime endTime = entry.endTime();
-
- if (CalenAgendaUtils::endsAtStartOfDayL(entry, endTime)) {
- // prevent problems with items ending tomorrow at 00:00
- QTime time = endTime.time();
- time.setHMS(time.hour(), time.minute() - 1, time.second(),
- time.msec());
- endTime.setTime(time);
-
- if (endTime <= gridStart) {
- // ends at the start of the grid -> not visible
- continue; // skip
- }
- }
- // The instance's end index from the grid start
- int endIndex(gridStart.daysTo(endTime));
-
- // Mark the days from start index to end index
- for (; startIndex <= endIndex; startIndex++) {
- if (startIndex >= 0 &&
- startIndex < mMonthDataArray.count()) {
- mMonthDataArray[startIndex].SetHasEvents(true);
- }
- } // Parse Anniversaries
- } else if (entry.type() == AgendaEntry::TypeAnniversary) {
- QDateTime startTime = entry.startTime();
- // The instance's start index from the grid start
- int index(gridStart.daysTo(startTime));
- // Mark the particular day
- if (index >= 0 && index < mMonthDataArray.count()) {
- mMonthDataArray[index].SetHasEvents(true);
- } // Parse To DOs
- } else if (entry.type() == AgendaEntry::TypeTodo) {
- QDateTime startTime = entry.startTime();
- ;
- int index;
- // Mark the particular day if the instance's
- // start time is not in the past
- if (startTime >= today) {
- index = gridStart.daysTo(startTime);
- } else {// Mark for today if the instance's
- //start time is in the past
- index = todayIndex;
- }
- if (index >= 0 && index < mMonthDataArray.count()) {
- mMonthDataArray[index].SetHasEvents(true);
- }
- }
- }
+ AgendaUtil::FilterFlags filter =
+ AgendaUtil::FilterFlags(AgendaUtil::IncludeAnniversaries
+ | AgendaUtil::IncludeAppointments
+ | AgendaUtil::IncludeEvents
+ | AgendaUtil::IncludeReminders
+ | AgendaUtil::IncludeIncompletedTodos);
+
+ // Get the list of dates which have events
+ QList<QDate> datesWithEvents;
+ mAgendaUtil->markDatesWithEvents(gridStart,gridEnd,filter,datesWithEvents);
+
+ // Parse thru the list of dates and set the required flags
+ for(int i(0); i < datesWithEvents.count(); i++) {
+ int offset = mFirstDayOfGrid.date().daysTo(datesWithEvents.at(i));
+ mMonthDataArray[offset].SetHasEvents(true);
}
- list.clear();
+
+ datesWithEvents.clear();
}
/*!
@@ -1054,77 +1112,27 @@
const int todayIndex(gridStart.daysTo(today)); // grid index for "today"
QDateTime gridEnd(mLastDayOfGrid.date(), QTime(23, 59, 59, 0));
- getInstanceList(list, gridStart, gridEnd);
-
- //Parse fetched items
- if (list.count()) {
- for (int i(0); i < list.count(); i++) {
- AgendaEntry entry = list[i];
-
- // Parse Day Notes, Appointments and Remainders
- // Start and end time of Event/Appointment/Remainders
- // has to be indentified before marking the tags
- // EEvents/Appointments can span multiple days,
- // while Anniversaries cannot.
- if ((entry.type() == AgendaEntry::TypeEvent) || (entry.type()
- == AgendaEntry::TypeAppoinment) || (entry.type()
- == AgendaEntry::TypeReminder)) {
- // The start time of the instance
- QDateTime startTime = entry.startTime();
- // The instance's start index from the grid start
- int startIndex(gridStart.daysTo(startTime));
- // The end time of the instance
- QDateTime endTime = entry.endTime();
-
- if (CalenAgendaUtils::endsAtStartOfDayL(entry, endTime)) {
- // prevent problems with items ending tomorrow at 00:00
- QTime time = endTime.time();
- time.setHMS(time.hour(), time.minute() - 1, time.second(),
- time.msec());
- endTime.setTime(time);
- if (endTime <= gridStart) {
- // ends at the start of the grid -> not visible
- continue; // skip
- }
- }
- // The instance's end index from the grid start
- int endIndex(gridStart.daysTo(endTime));
+ AgendaUtil::FilterFlags filter =
+ AgendaUtil::FilterFlags(AgendaUtil::IncludeAnniversaries
+ | AgendaUtil::IncludeAppointments
+ | AgendaUtil::IncludeEvents
+ | AgendaUtil::IncludeReminders
+ | AgendaUtil::IncludeIncompletedTodos);
+
+ // Get the list of dates which have events
+ QList<QDate> datesWithEvents;
+ mAgendaUtil->markDatesWithEvents(gridStart,gridEnd,filter,datesWithEvents);
+
+ // Parse thru the list of dates and set the required flags
+ for(int i(0); i < datesWithEvents.count(); i++) {
+ int offset = mFirstDayOfGrid.date().daysTo(datesWithEvents.at(i));
+ mMonthDataArray[offset].SetHasEvents(true);
+ }
- // Mark the days from start index to end index
- for (; startIndex <= endIndex; startIndex++) {
- if (startIndex >= 0 &&
- startIndex < mMonthDataArray.count()) {
- mMonthDataArray[actualIndex + startIndex].SetHasEvents(true);
- }
- } // Parse Anniversaries
- } else if (entry.type() == AgendaEntry::TypeAnniversary) {
- QDateTime startTime = entry.startTime();
- // The instance's start index from the grid start
- int index(gridStart.daysTo(startTime));
- // Mark the particular day
- if (actualIndex +index >= 0 && (actualIndex + index) < mMonthDataArray.count()) {
- mMonthDataArray[actualIndex + index].SetHasEvents(true);
- } // Parse To DOs
- } else if (entry.type() == AgendaEntry::TypeTodo) {
- QDateTime startTime = entry.startTime();
- ;
- int index;
- // Mark the particular day if the instance's
- // start time is not in the past
- if (startTime >= today) {
- index = gridStart.daysTo(startTime);
- } else {// Mark for today if the instance's
- // start time is in the past
- index = todayIndex;
- }
- if (actualIndex + index >= 0 && (actualIndex + index) < mMonthDataArray.count()) {
- mMonthDataArray[actualIndex + index].SetHasEvents(true);
- }
- }
- }
- }
- list.clear();
+
+
+ datesWithEvents.clear();
}
/*!
@@ -1144,9 +1152,6 @@
void CalenMonthView::completePopulation()
{
setDateToLabel();
-
- //Set this view as current view
- mServices.MainWindow().setCurrentView(this);
}
/*!
@@ -1200,13 +1205,6 @@
mIsPrevPaneGesture = false;
}
- // Check if we are population for current day, if yes then disable the
- // gototoday action
- if ((CalenDateUtils::today() == mDate) && mGoToTodayAction) {
- mGoToTodayAction->setVisible(false);
- } else if (mGoToTodayAction){
- mGoToTodayAction->setVisible(true);
- }
}
/*!
@@ -1287,10 +1285,6 @@
mLocale.setNumberOptions(QLocale::OmitGroupSeparator);
QString yearString = mLocale.toString(mDate.date().year());
mTitleLabel->setPlainText(hbTrId("txt_calendar_month_label_title_12").arg(monthString).arg(yearString));
- QColor monthTitleColor = HbColorScheme::color("qtc_cal_monthgrid_title");
- if (monthTitleColor.isValid()) {
- mTitleLabel->setTextColor(monthTitleColor);
- }
}
/*!
@@ -1305,23 +1299,23 @@
// Create the effect on mCurrPreviewPane to slide to right side
mPrevPaneParent->setVisible(true);
if (mOrientation == Qt::Vertical) {
- HbEffect::add(mCurrPreviewPane,
+ HbEffect::add(mCurrPaneLayoutWidget,
":/fxml/portrait_preview_pane_hide_on_right_gesture",
"hide");
- HbEffect::add(mPrevPreviewPane,
+ HbEffect::add(mPrevPaneLayoutWidget,
":/fxml/portrait_preview_pane_show_on_right_gesture",
"show");
} else {
- HbEffect::add(mCurrPreviewPane,
+ HbEffect::add(mCurrPaneLayoutWidget,
":/fxml/landscape_preview_pane_hide_on_right_gesture",
"hide");
- HbEffect::add(mPrevPreviewPane,
+ HbEffect::add(mPrevPaneLayoutWidget,
":/fxml/landscape_preview_pane_show_on_right_gesture",
"show");
}
// Start the effects
- HbEffect::start(mCurrPreviewPane, "hide");
- HbEffect::start(mPrevPreviewPane, "show",
+ HbEffect::start(mCurrPaneLayoutWidget, "hide");
+ HbEffect::start(mPrevPaneLayoutWidget, "show",
this, "handleRightEffectCompleted");
//Remove the mCurrPreviewPane from the layout and add mPrevPreviewPane
@@ -1333,24 +1327,24 @@
// Create the effect on mCurrPreviewPane to slide to left side
mNextPaneParent->setVisible(true);
if (mOrientation == Qt::Vertical) {
- HbEffect::add(mCurrPreviewPane,
+ HbEffect::add(mCurrPaneLayoutWidget,
":/fxml/portrait_preview_pane_hide_on_left_gesture",
"hide");
- HbEffect::add(mNextPreviewPane,
+ HbEffect::add(mNextPaneLayoutWidget,
":/fxml/portrait_preview_pane_show_on_left_gesture",
"show");
} else {
- HbEffect::add(mCurrPreviewPane,
+ HbEffect::add(mCurrPaneLayoutWidget,
":/fxml/landscape_preview_pane_hide_on_left_gesture",
"hide");
- HbEffect::add(mNextPreviewPane,
+ HbEffect::add(mNextPaneLayoutWidget,
":/fxml/landscape_preview_pane_show_on_left_gesture",
"show");
}
// Start the effects
- HbEffect::start(mCurrPreviewPane, "hide");
- HbEffect::start(mNextPreviewPane, "show",
+ HbEffect::start(mCurrPaneLayoutWidget, "hide");
+ HbEffect::start(mNextPaneLayoutWidget, "show",
this, "handleLeftEffectCompleted");
//Remove the mCurrPreviewPane from the layout and add mNextPreviewPane
@@ -1361,6 +1355,14 @@
}
/*!
+ Returns the first date in the month grid
+ */
+QDateTime CalenMonthView::firstDayOfGrid()
+{
+ return mFirstDayOfGrid;
+}
+
+/*!
Function to handle any locale related changes
*/
void CalenMonthView::onLocaleChanged(int reason)
@@ -1385,12 +1387,16 @@
// Swap the preview panes properly
CalenPreviewPane* pane = mCurrPreviewPane;
HbWidget* paneParent = mCurrPaneParent;
+ HbWidget* paneLayoutWidget = mCurrPaneLayoutWidget;
mCurrPreviewPane = mNextPreviewPane;
mCurrPaneParent = mNextPaneParent;
+ mCurrPaneLayoutWidget = mNextPaneLayoutWidget;
mNextPreviewPane = mPrevPreviewPane;
mNextPaneParent = mPrevPaneParent;
+ mNextPaneLayoutWidget = mPrevPaneLayoutWidget;
mPrevPreviewPane = pane;
mPrevPaneParent = paneParent;
+ mPrevPaneLayoutWidget = paneLayoutWidget;
// Set the focus to proper date
setCurrGridIndex(index);
@@ -1416,12 +1422,16 @@
// Swap the preview panes properly
CalenPreviewPane* pane = mCurrPreviewPane;
HbWidget* paneParent = mCurrPaneParent;
+ HbWidget* paneLayoutWidget = mCurrPaneLayoutWidget;
mCurrPreviewPane = mPrevPreviewPane;
mCurrPaneParent = mPrevPaneParent;
+ mCurrPaneLayoutWidget = mPrevPaneLayoutWidget;
mPrevPreviewPane = mNextPreviewPane;
mPrevPaneParent = mNextPaneParent;
+ mPrevPaneLayoutWidget = mNextPaneLayoutWidget;
mNextPreviewPane = pane;
mNextPaneParent = paneParent;
+ mNextPaneLayoutWidget = paneLayoutWidget;
// Set the focus to proper date
setCurrGridIndex(index);
--- a/calendarui/views/src/calennativeview.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/views/src/calennativeview.cpp Mon May 03 12:30:32 2010 +0300
@@ -41,8 +41,8 @@
/*!
Default constructor.
*/
-CalenNativeView::CalenNativeView(MCalenServices& services) :
- mServices(services), mPluginEnabled(false)//,mGoToDateForm(NULL)
+CalenNativeView::CalenNativeView(MCalenServices &services) :
+ mServices(services)
{
setTitle(hbTrId("txt_calendar_title_calendar"));
@@ -51,6 +51,7 @@
notificationArray.Append(ECalenNotifySystemTimeChanged);
notificationArray.Append(ECalenNotifySystemLocaleChanged);
+ notificationArray.Append(ECalenNotifyContextChanged);
mServices.RegisterForNotificationsL(this, notificationArray);
@@ -65,38 +66,6 @@
}
/*!
- Checks to see if an info bar is available from a customisation plugin
- */
-void CalenNativeView::checkInfobarL()
-{
- HbWidget* pluginInfobar = mServices.Infobar();
-
- if (mInfobar && mInfobar != pluginInfobar) {
- mServices.IssueNotificationL(ECalenNotifyCheckPluginUnloading);
- mInfobar = NULL;
- }
-
- if (pluginInfobar) {
- mInfobar = pluginInfobar;
- }
-
-}
-
-/*!
- Returns true if infobar is there
- */
-bool CalenNativeView::isPlugin()
-{
- HbWidget* pluginInfobar = mServices.Infobar();
- if (pluginInfobar) {
- return true;
- } else {
- return false;
- }
-
-}
-
-/*!
Issues populcaiton complete to the framework
*/
void CalenNativeView::populationComplete()
@@ -106,22 +75,6 @@
}
/*!
- Returns a pointer to the available secondary control, or NULL if none is
- available. The secondary control may be either an info bar or a preview pane
- */
-HbWidget* CalenNativeView::ControlOrNull()
-{
- HbWidget* pluginInfobar = NULL;
- if (mInfobar) {
- pluginInfobar = mInfobar;
-
- } else {
- pluginInfobar = mServices.Infobar();
- }
- return pluginInfobar;
-}
-
-/*!
Slot for delete before date
*/
void CalenNativeView::deleteBeforeDate()
@@ -182,8 +135,17 @@
//Set the selected date to contextDate.
contextDate.setDate(selectedDate);
context.setFocusDateAndTimeL(contextDate, KCalenMonthViewUidValue);
- mServices.IssueCommandL(ECalenStartActiveStep);
}
+ refreshViewOnGoToDate();
+}
+
+/*!
+ Virtual function to refresh the current view upon selecting a date
+ from GoToDate popup
+ */
+void CalenNativeView::refreshViewOnGoToDate()
+{
+ mServices.IssueCommandL(ECalenStartActiveStep);
}
/*!
@@ -213,17 +175,31 @@
onLocaleChanged(EChangesLocale);
}
break;
+ case ECalenNotifyContextChanged: {
+ onContextChanged();
+ }
+ break;
default:
break;
}
}
/*!
- Returns true if plugin is enabled
+ Returns true if plugin is loaded
*/
TBool CalenNativeView::pluginEnabled()
{
- return mPluginEnabled;
+ QString *pluginInfo = mServices.InfobarTextL();
+ if (!pluginInfo) {
+ return false;
+ } else {
+ return true;
+ }
+}
+
+QString *CalenNativeView::pluginText()
+{
+ return mServices.InfobarTextL();
}
//End Of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/src/calenpluginlabel.cpp Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,59 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: CalenPluginLabel implementation.
+*
+*/
+
+// System includes
+
+// User includes
+#include "calenservices.h"
+#include "calenpluginlabel.h"
+/*!
+ \class CalenPluginLabel
+
+ Class to show plugin information on Label
+ */
+
+/*!
+ constructor
+ */
+CalenPluginLabel::CalenPluginLabel(MCalenServices& services,
+ QGraphicsItem* parent) :
+ HbLabel(parent),mServices(services)
+{
+ setAlignment(Qt::AlignCenter);
+ setFontSpec(HbFontSpec(HbFontSpec::Secondary));
+ setPlainText("Reg plugin");
+}
+
+/*!
+ Destructor
+ */
+CalenPluginLabel::~CalenPluginLabel()
+{
+}
+
+/*!
+ To handle mouse press event.
+ \sa QGraphicsItem
+ */
+void CalenPluginLabel::mousePressEvent(QGraphicsSceneMouseEvent* event)
+{
+ Q_UNUSED(event);
+
+ mServices.IssueCommandL(ECalenRegionalPluginTapEvent);
+}
+
+// End of file --Don't remove this.
--- a/calendarui/views/src/calenpreviewpane.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/views/src/calenpreviewpane.cpp Mon May 03 12:30:32 2010 +0300
@@ -57,16 +57,11 @@
mTwoSecTimer = new QTimer(this);
mScrollDirection = invalid;
mIsNoEntriesAdded = true;
+ mIsGestureHandled = false;
mNoEntriesLabel = 0;
setAcceptDrops(true);
setScrollDirections(Qt::Vertical);
setVerticalScrollBarPolicy(HbScrollArea::ScrollBarAlwaysOff);
- // Set the frame to the preview pane
- HbFrameItem* frame = new HbFrameItem(this);
- frame->frameDrawer().setFrameType(HbFrameDrawer::NinePieces);
-
- frame->frameDrawer().setFrameGraphicsName("qtg_fr_cal_preview_bg");
- setBackgroundItem(frame->graphicsItem(), -5);
// Connect the scrollig finished signal
connect(this, SIGNAL(scrollingEnded()), this,
@@ -110,19 +105,14 @@
// Adjust the layout
QGraphicsLinearLayout* layout = static_cast<QGraphicsLinearLayout *>
(content->layout());
-
- layout->setPreferredWidth(preferredWidth());
- layout->setMinimumWidth(minimumWidth());
- layout->setMaximumWidth(maximumWidth());
-
int instanceCount = mInstanceArray.count();
HbFontSpec font(HbFontSpec::Secondary);
if (mIsNoEntriesAdded) {
if (!instanceCount) {
- return;
+ mNoEntriesLabel->setVisible(true);
+ return;
} else {
// Remove the no entries label
- layout->removeAt(0);
mNoEntriesLabel->setVisible(false);
}
}
@@ -207,8 +197,6 @@
// Add the no entries text to the preview pane
mNoEntriesLabel->setVisible(true);
- layout->addItem(mNoEntriesLabel);
- layout->setStretchFactor(mNoEntriesLabel,1);
mIsNoEntriesAdded = true;
}
layout->activate();
@@ -306,7 +294,9 @@
*/
void CalenPreviewPane::mousePressEvent(QGraphicsSceneMouseEvent* event)
{
+ mIsGestureHandled = false;
mPressedPos = event->pos();
+ event->accept();
}
/*!
@@ -315,16 +305,29 @@
void CalenPreviewPane::mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
{
qreal posDiff = mPressedPos.x()-event->pos().x();
- if (abs(posDiff) < 50) {
+ if (abs(posDiff) < 50 && !mIsGestureHandled) {
// Preview pane tapped
mServices.IssueCommandL(ECalenDayView);
- } else if (posDiff < -50) {
+ }
+ event->accept();
+}
+
+/*!
+ Function to listen mouse move events
+ */
+void CalenPreviewPane::mouseMoveEvent(QGraphicsSceneMouseEvent* event)
+{
+ qreal posDiff = mPressedPos.x()-event->pos().x();
+ if (posDiff < -50) {
+ mIsGestureHandled = true;
// right gesture
mView->handlePreviewPaneGesture(true);
} else if (posDiff > 50) {
+ mIsGestureHandled = true;
// left gesture
mView->handlePreviewPaneGesture(false);
}
+ event->accept();
}
/*!
--- a/calendarui/views/views.pro Fri Apr 16 14:57:40 2010 +0300
+++ b/calendarui/views/views.pro Mon May 03 12:30:32 2010 +0300
@@ -51,27 +51,27 @@
calenmonthdata.h \
calenmonthgrid.h \
calengriditemprototype.h \
- calengriditem.h \
calennativeview.h \
calendayview.h \
caleneventlistviewitem.h \
calendayviewwidget.h \
calenpreviewpane.h \
calensettingsview.h \
- calenthicklinesdrawer.h
+ calenthicklinesdrawer.h \
+ calenpluginlabel.h
SOURCES += calenmonthview.cpp \
calenmonthdata.cpp \
calenmonthgrid.cpp \
calengriditemprototype.cpp \
- calengriditem.cpp \
calennativeview.cpp \
calendayview.cpp \
caleneventlistviewitem.cpp \
calendayviewwidget.cpp \
calenpreviewpane.cpp \
calensettingsview.cpp \
- calenthicklinesdrawer.cpp
+ calenthicklinesdrawer.cpp \
+ calenpluginlabel.cpp
RESOURCES += calenresources.qrc
--- a/clock/clockui/clocksettingsview/inc/clocksettingsview.h Fri Apr 16 14:57:40 2010 +0300
+++ b/clock/clockui/clocksettingsview/inc/clocksettingsview.h Mon May 03 12:30:32 2010 +0300
@@ -33,8 +33,7 @@
class HbDataFormModel;
class HbDataFormModelItem;
class HbLabel;
-class HbPushButton;
-class HbCheckBox;
+
class TimezoneClient;
class SettingsUtility;
class SkinnableClock;
@@ -57,15 +56,12 @@
private slots:
void handleBackAction();
void updateDateLabel();
- void updatePlaceLabel();
+ void updatePlaceInfo();
void updateClockWidget();
- void formItemDisplayed(const QModelIndex &index);
- void formItemValueChanged(
- const QModelIndex& topLeft, const QModelIndex& bottomRight);
void updateDateItem();
void updateTimeItem();
- void updatePlaceItem();
void handleOrientationChanged(Qt::Orientation orientation);
+ void handleNetworkTimeStateChange(int state);
private:
void setupView();
@@ -86,10 +82,10 @@
HbLabel *mDayDateLabel;
HbLabel *mPlaceLabel;
+ HbDataFormModelItem *mNetworkTimeItem;
HbDataFormModelItem *mTimeDataFormItem;
HbDataFormModelItem *mDateDataFormItem;
HbDataFormModelItem *mPlaceDataFormItem;
- QPointer<HbCheckBox> mNetworkTimeWidget;
ClockSettingsDocLoader *mDocLoader;
SettingsUtility *mSettingsUtility;
--- a/clock/clockui/clocksettingsview/src/clockregionalsettingsview.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/clock/clockui/clocksettingsview/src/clockregionalsettingsview.cpp Mon May 03 12:30:32 2010 +0300
@@ -277,18 +277,6 @@
switch (topLeft.row()) {
-/* case 4:
- {
- // Weekdays item.
- HbDataFormModelItem *workdayItem = mFormModel->itemFromIndex(topLeft);
- QList<QVariant> items = workdayItem
- ->contentWidgetData("selectedItems").toList();
- int temp = items.count();
- for (int var = 0; var < temp; ++var) {
- int temp1 = items.at(var).toInt();
- }
- }
- break;*/
case 5:
{
// The Start of week item.
--- a/clock/clockui/clocksettingsview/src/clocksettingsview.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/clock/clockui/clocksettingsview/src/clocksettingsview.cpp Mon May 03 12:30:32 2010 +0300
@@ -72,7 +72,7 @@
mTimezoneClient = new TimezoneClient();
connect(
mTimezoneClient, SIGNAL(timechanged()),
- this, SLOT(updatePlaceLabel()));
+ this, SLOT(updatePlaceInfo()));
connect(
mTimezoneClient, SIGNAL(timechanged()),
this, SLOT(updateDateLabel()));
@@ -81,9 +81,6 @@
this, SLOT(updateClockWidget()));
connect(
mTimezoneClient, SIGNAL(timechanged()),
- this, SLOT(updatePlaceItem()));
- connect(
- mTimezoneClient, SIGNAL(timechanged()),
this, SLOT(updateDateItem()));
connect(
mTimezoneClient, SIGNAL(timechanged()),
@@ -205,7 +202,7 @@
/*!
Updates the zone info in the place label.
*/
-void ClockSettingsView::updatePlaceLabel()
+void ClockSettingsView::updatePlaceInfo()
{
qDebug() << "clock: ClockSettingsView::updateClockZoneInfo -->";
@@ -259,10 +256,13 @@
if (mTimezoneClient->timeUpdateOn()) {
mPlaceLabel->setPlainText(
currentZoneInfo.countryName + tr(" ") + gmtOffset);
+ mPlaceDataFormItem->setContentWidgetData(
+ "text", currentZoneInfo.countryName);
} else {
- mPlaceLabel->setPlainText(
- currentZoneInfo.cityName + tr(", ")
- + currentZoneInfo.countryName + tr(" ") + gmtOffset);
+ QString placeInfo = currentZoneInfo.cityName
+ + tr(", ") + currentZoneInfo.countryName;
+ mPlaceLabel->setPlainText(placeInfo + tr(" ") + gmtOffset);
+ mPlaceDataFormItem->setContentWidgetData("text", placeInfo);
}
qDebug() << "clock: ClockSettingsView::updateDayDateInfo <--";
@@ -281,133 +281,6 @@
}
/*!
- Slot which connects to the itemShown signal of the data form.
- */
-void ClockSettingsView::formItemDisplayed(const QModelIndex &index)
-{
- qDebug() << "clock: ClockSettingsView::settingItemDisplayed -->";
-
- // In this function implement only display updation.
- // DO NOT connect slots here.
-
- bool timeUpdateValue = mTimezoneClient->timeUpdateOn();
-
- // Get the form item.
- HbDataFormViewItem *item =
- static_cast<HbDataFormViewItem*>(mSettingsForm->itemByIndex(index));
- HbWidget *contentWidget = item->dataItemContentWidget();
-
- switch (index.row()) {
- case NetworkTimeItem:
- {
- mNetworkTimeWidget = static_cast<HbCheckBox *>(contentWidget);
- /*if (timeUpdateValue) {
- mNetworkTimeWidget->setCheckState(Qt::Checked);
- } else {
- mNetworkTimeWidget->setCheckState(Qt::Unchecked);
- }*/
- }
- break;
- case TimeItem:
- {
-
- }
- break;
-
- case DateItem:
- {
- // Update the item display.
-
- }
- break;
-
- case PlaceItem:
- {
- // Update the item display.
-// mPlaceWidget = static_cast<HbPushButton *>(contentWidget);
- // Get the current zone info.
- updatePlaceLabel();
-
-
- }
- break;
-
- default:
- break;
- }
-
- qDebug() << "clock: ClockSettingsView::settingItemDisplayed <--";
-}
-
-/*!
- Slot which connects to the dataChanged signal of the data form.
- */
-void ClockSettingsView::formItemValueChanged(
- const QModelIndex& topLeft, const QModelIndex& bottomRight)
-{
- qDebug("clock: ClockSettingsView::formItemValueChanged() -->");
-
- Q_UNUSED(bottomRight)
- // Get the form item.
- HbDataFormViewItem *item =
- static_cast<HbDataFormViewItem*>(
- mSettingsForm->itemByIndex(topLeft));
- HbWidget *contentWidget = item->dataItemContentWidget();
-
-
- switch (topLeft.row()) {
- case NetworkTimeItem:
- {
- Qt::CheckState state = mNetworkTimeWidget->checkState();
- bool cenrepValue = mTimezoneClient->timeUpdateOn();
-
- if ((Qt::Checked == state && !cenrepValue)
- || (Qt::Unchecked == state && cenrepValue)) {
- if (Qt::Checked == state) {
- // Disable the time, date and place item.
- if (mTimeDataFormItem) {
- mTimeDataFormItem->setEnabled(false);
- }
- if (mDateDataFormItem) {
- mDateDataFormItem->setEnabled(false);
- }
- if (mPlaceDataFormItem) {
- mPlaceDataFormItem->setEnabled(false);
- }
- // Update the cenrep value.
- mTimezoneClient->setTimeUpdateOn(true);
-
- } else if (Qt::Unchecked == state) {
- // Enable the time, date and place item.
- if (mTimeDataFormItem) {
- mTimeDataFormItem->setEnabled(true);
- }
- if (mDateDataFormItem) {
- mDateDataFormItem->setEnabled(true);
- }
- if (mPlaceDataFormItem) {
- mPlaceDataFormItem->setEnabled(true);
- }
-
- // Update the cenrep value.
- mTimezoneClient->setTimeUpdateOn(false);
- }
-
- updatePlaceItem();
- updatePlaceLabel();
- }
- }
- break;
-
- default:
- break;
- }
-
-
- qDebug("clock: ClockSettingsView::formItemValueChanged() <--");
-}
-
-/*!
Slot to update the display of the date settings item field.
*/
void ClockSettingsView::updateDateItem()
@@ -430,20 +303,6 @@
}
/*!
- Slot to update the display of the place settings item field.
- */
-void ClockSettingsView::updatePlaceItem()
-{
- // Get the current zone info.
- LocationInfo currentZoneInfo = mTimezoneClient->getCurrentZoneInfoL();
- QString placeItemText(currentZoneInfo.cityName);
- placeItemText+= tr(",");
- placeItemText.append(currentZoneInfo.countryName);
- mPlaceDataFormItem->setContentWidgetData("text", placeItemText);
-// mPlaceWidget->setText(placeItemText);
-}
-
-/*!
This slot is called whenever orientattion of the view changes.
*/
void ClockSettingsView::handleOrientationChanged(Qt::Orientation orientation)
@@ -468,6 +327,45 @@
}
+void ClockSettingsView::handleNetworkTimeStateChange(int state)
+{
+ bool cenrepValue = mTimezoneClient->timeUpdateOn();
+ if ((Qt::Checked == state && !cenrepValue)
+ || (Qt::Unchecked == state && cenrepValue)) {
+ if (Qt::Checked == state) {
+ // Disable the time, date and place item.
+ if (mTimeDataFormItem) {
+ mTimeDataFormItem->setEnabled(false);
+ }
+ if (mDateDataFormItem) {
+ mDateDataFormItem->setEnabled(false);
+ }
+ if (mPlaceDataFormItem) {
+ mPlaceDataFormItem->setEnabled(false);
+ }
+ // Update the cenrep value.
+ mTimezoneClient->setTimeUpdateOn(true);
+
+ } else if (Qt::Unchecked == state) {
+ // Enable the time, date and place item.
+ if (mTimeDataFormItem) {
+ mTimeDataFormItem->setEnabled(true);
+ }
+ if (mDateDataFormItem) {
+ mDateDataFormItem->setEnabled(true);
+ }
+ if (mPlaceDataFormItem) {
+ mPlaceDataFormItem->setEnabled(true);
+ }
+
+ // Update the cenrep value.
+ mTimezoneClient->setTimeUpdateOn(false);
+ }
+
+ updatePlaceInfo();
+ }
+}
+
/*!
Called after loading the view from the docml.
The initializaion/setup of the view is done here.
@@ -493,10 +391,6 @@
mSettingsForm = static_cast<HbDataForm *> (
mDocLoader->findWidget(CLOCK_SETTINGS_DATA_FORM));
- connect(
- mSettingsForm, SIGNAL(itemShown(const QModelIndex)),
- this, SLOT(formItemDisplayed(const QModelIndex)));
-
// Get the day-date label.
mDayDateLabel = static_cast<HbLabel *> (
mDocLoader->findWidget(CLOCK_SETTINGS_DATE_LABEL));
@@ -520,7 +414,7 @@
// Update the relevant info.
updateDateLabel();
updateClockWidget();
- updatePlaceLabel();
+ updatePlaceInfo();
mTickTimer->start(60000 - 1000 * QTime::currentTime().second());
@@ -543,12 +437,6 @@
// Add the items to the view.
populateModel();
mSettingsForm->setModel(mSettingsModel);
-
- connect(
- mSettingsModel,
- SIGNAL(dataChanged(const QModelIndex, const QModelIndex)),
- this,
- SLOT(formItemValueChanged(const QModelIndex, const QModelIndex)));
}
/*!
@@ -561,18 +449,20 @@
}
// Add the network time update item.
- HbDataFormModelItem *networkTimeItem = mSettingsModel->appendDataFormItem(
- HbDataFormModelItem::CheckBoxItem,
- "");
+ mNetworkTimeItem = mSettingsModel->appendDataFormItem(
+ HbDataFormModelItem::CheckBoxItem, "");
bool networkTime = mTimezoneClient->timeUpdateOn();
Qt::CheckState state = Qt::Unchecked;
if (networkTime) {
state = Qt::Checked;
}
- networkTimeItem->setContentWidgetData(
+ mNetworkTimeItem->setContentWidgetData(
"checkState", state);
- networkTimeItem->setContentWidgetData(
+ mNetworkTimeItem->setContentWidgetData(
"text", QString(hbTrId("txt_clk_setlabel_use_network_date_time")));
+ mSettingsForm->addConnection(
+ mNetworkTimeItem, SIGNAL(stateChanged(int)),
+ this, SLOT(handleNetworkTimeStateChange(int)));
// Add the time item.
// Custom data type for adding a time button to the data form.
@@ -606,7 +496,6 @@
placeItemText+= tr(", ");
}
placeItemText.append(currentZoneInfo.countryName);
-// mPlaceWidget->setText(placeItemText);
mPlaceDataFormItem->setContentWidgetData("text", placeItemText);
if (networkTime) {
@@ -622,7 +511,7 @@
// Add the regional settings item.
HbDataFormModelItem::DataItemType regionalSettingsItem =
static_cast<HbDataFormModelItem::DataItemType>
- (HbDataFormModelItem::CustomItemBase + RegionalSettingsItem);
+ (HbDataFormModelItem::CustomItemBase + RegionalSettingsItem);
mSettingsModel->appendDataFormItem(regionalSettingsItem);
}
--- a/clock/clockui/clocksettingsview/src/settingscustomitem.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/clock/clockui/clocksettingsview/src/settingscustomitem.cpp Mon May 03 12:30:32 2010 +0300
@@ -115,9 +115,6 @@
case (PlaceItemOffset + HbDataFormModelItem::CustomItemBase):
mPlaceWidget->setProperty("text", modlItem->contentWidgetData("text"));
break;
-/* case (RegionalItemOffset + HbDataFormModelItem::CustomItemBase):
-
- break;*/
case (50 + HbDataFormModelItem::CustomItemBase):
break;
--- a/clock/ftudatetimewizard/inc/ftudatetimewizard.h Fri Apr 16 14:57:40 2010 +0300
+++ b/clock/ftudatetimewizard/inc/ftudatetimewizard.h Mon May 03 12:30:32 2010 +0300
@@ -37,7 +37,7 @@
~FtuDateTimeWizard();
protected:
- void initializeWizard();
+ void initializeWizard(qint32 cenrepOwnerId, int wizardIdx);
void activateWizard();
void deactivateWizard();
bool shutdownWizard(ShutdownReason reason);
--- a/clock/ftudatetimewizard/src/ftudatetimewizard.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/clock/ftudatetimewizard/src/ftudatetimewizard.cpp Mon May 03 12:30:32 2010 +0300
@@ -64,8 +64,11 @@
/*!
Initialises the wizard.This is called by the FTU framework
*/
-void FtuDateTimeWizard::initializeWizard()
+void FtuDateTimeWizard::initializeWizard(qint32 cenrepOwnerId, int wizardIdx)
{
+ Q_UNUSED(cenrepOwnerId)
+ Q_UNUSED(wizardIdx)
+
//Check if valid Nitz info is received
XQSettingsManager *settingsManager = new XQSettingsManager();
XQSettingsKey *validNitzCenrepKey =
--- a/notes/data/notes.qrc Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/data/notes.qrc Mon May 03 12:30:32 2010 +0300
@@ -1,1 +1,1 @@
-<!DOCTYPE RCC><RCC version="1.0"> <qresource prefix="/translations"> <file alias="notes">translations/notes.qm</file> </qresource> <qresource prefix="/xml"> <file alias="notesmainview.docml">xml/notesmainview.docml</file> <file alias="notescollectionsview.docml">xml/notescollectionsview.docml</file> <file alias="notestodoview.docml">xml/notestodoview.docml</file> <file alias="notesfavoriteview.docml">xml/notesfavoriteview.docml</file> <file alias="notesnoteview.docml">xml/notesnoteview.docml</file> </qresource></RCC>
\ No newline at end of file
+<!DOCTYPE RCC><RCC version="1.0"> <qresource prefix="/translations"> <file alias="notes">translations/notes.qm</file> </qresource> <qresource prefix="/xml"> <file alias="notesmainview.docml">xml/notesmainview.docml</file> <file alias="notescollectionsview.docml">xml/notescollectionsview.docml</file> <file alias="notestodoview.docml">xml/notestodoview.docml</file> <file alias="notesfavoriteview.docml">xml/notesfavoriteview.docml</file> <file alias="notesnoteview.docml">xml/notesnoteview.docml</file> </qresource> <qresource prefix= "/style"> <file alias="hblistviewitem.css">style/hblistviewitem.css</file> <file alias="hblistviewitem.widgetml">style/hblistviewitem.widgetml</file> </qresource></RCC>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/notes/data/style/hblistviewitem.css Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,19 @@
+HbListViewItem[layoutName="custom"]{
+ layout:custom;
+}
+
+HbListViewItem[layoutName="custom"]::text-1{
+ left: -var(hb-param-margin-gene-left);
+ top: -var(hb-param-margin-gene-top);
+ bottom: var(hb-param-margin-gene-bottom);
+ text-height: var(hb-param-text-height-primary);
+ text-align: left;
+
+}
+HbListViewItem[layoutName="custom"]::text-2{
+ top: -var(hb-param-margin-gene-top);
+ right: var(hb-param-margin-gene-right);
+ text-height: var(hb-param-text-height-tiny);
+ text-align: right;
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/notes/data/style/hblistviewitem.widgetml Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,14 @@
+<hbwidget version="0.1" type="listviewitem">
+ <layout name="custom" type="mesh">
+ <!-- For the alarm time item -->
+ <meshitem src="text-1" srcEdge="LEFT" dst="" dstEdge="LEFT" />
+ <meshitem src="text-1" srcEdge="TOP" dst="" dstEdge="TOP" />
+ <meshitem src="text-1" srcEdge="RIGHT" dst="text-2" dstEdge="LEFT" />
+ <meshitem src="text-1" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
+
+ <!-- For the alarm remiainting time item -->
+ <meshitem src="text-2" srcEdge="CENTERV" dst="text-1" dstEdge="CENTERV" />
+ <meshitem src="text-2" srcEdge="RIGHT" dst="" dstEdge="RIGHT"/>
+
+ </layout>
+</hbwidget>
Binary file notes/data/translations/notes.qm has changed
--- a/notes/data/translations/notes.ts Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/data/translations/notes.ts Mon May 03 12:30:32 2010 +0300
@@ -2,6 +2,26 @@
<!DOCTYPE TS>
<TS version="3.0" sourcelanguage="en_GB">
<context>
+<message numerus="no" id="txt_notes_list_due_date">
+ <comment>Due date for To-do note</comment>
+ <source>%1</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_list_pri_graphic</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P11</extra-loc-viewid>
+ <extra-loc-positionid>list</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_notes_button_new_todo">
+ <comment>Toolbar button to create new To-do note</comment>
+ <source>New To-do </source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_toolbar_tiny_4</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_L7</extra-loc-viewid>
+ <extra-loc-positionid>button</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
<message numerus="no" id="txt_notes_formlabel_val_description">
<comment>Default texxt value for Description field in a dataform</comment>
<source>Description</source>
@@ -22,16 +42,6 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
-<message numerus="no" id="txt_notes_button_new_todo">
- <comment>Toolbar button to create nbew to-do event in to-do collections view</comment>
- <source>New To-do</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_toolbar_tiny_4</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P10</extra-loc-viewid>
- <extra-loc-positionid>button</extra-loc-positionid>
- <extra-loc-feature>No</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
<message numerus="no" id="txt_notes_menu_make_it_as_todo_note">
<comment>Item specific menu item . This action launchs the To-Do editor to add due date and remainder for the selected note</comment>
<source>Make it as To-do note</source>
@@ -42,16 +52,6 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
-<message numerus="no" id="txt_notes_list_recent_notes">
- <comment>Collections name in the list widget (Left Side)</comment>
- <source>Recent notes</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P2</extra-loc-viewid>
- <extra-loc-positionid>list</extra-loc-positionid>
- <extra-loc-feature>No</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
<message numerus="no" id="txt_notes_button_find">
<comment>toolbar button text in landscape mode . If user taps on this button, Find functionality is enabled in all notes view</comment>
<source>Find</source>
@@ -82,6 +82,16 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
+<message numerus="no" id="txt_notes_dblist_note_modified_at_time">
+ <comment>Secondary text item to mention modification time for a note</comment>
+ <source>Modified at %1</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P1</extra-loc-viewid>
+ <extra-loc-positionid>dblist_14_val</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
<message numerus="no" id="txt_notes_setlabel_priority_val_low">
<comment>Priority value in Combo Box used in a dataform</comment>
<source>Low</source>
@@ -112,16 +122,6 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
-<message numerus="no" id="txt_notes_button_2">
- <comment>Layout ID Parent. Date Push Button in Dataform to set alarm date for a To-do note. This action opens the date picker component</comment>
- <source>0.02</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>txt_notes_button_2</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P8</extra-loc-viewid>
- <extra-loc-positionid>button</extra-loc-positionid>
- <extra-loc-feature>No</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
<message numerus="no" id="txt_notes_formlabel_due_date">
<comment>Label item in Data form </comment>
<source>Due date</source>
@@ -182,13 +182,13 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
-<message numerus="no" id="txt_notes_list_1">
- <comment>Due date for To-do note</comment>
- <source>0.01</source>
+<message numerus="no" id="txt_notes_dblist_note_created_at_time">
+ <comment>Secondary text item to mention creation time for a note</comment>
+ <source>Created at %1</source>
<translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_list_pri_graphic</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P11</extra-loc-viewid>
- <extra-loc-positionid>list</extra-loc-positionid>
+ <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P1</extra-loc-viewid>
+ <extra-loc-positionid>dblist_12_val</extra-loc-positionid>
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
@@ -216,7 +216,7 @@
<comment>Primary text label in To-do viewer</comment>
<source>Subject:</source>
<translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_list_pri_add</extra-loc-layout_id>
+ <extra-loc-layout_id>qtl_list_pri_graphic_add</extra-loc-layout_id>
<extra-loc-viewid>Notes_P11</extra-loc-viewid>
<extra-loc-positionid>dblist_5</extra-loc-positionid>
<extra-loc-feature>No</extra-loc-feature>
@@ -232,6 +232,26 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
+<message numerus="no" id="txt_notes_list_note_count">
+ <comment>List item to show the number<Count> of items (To-Dos, Recent notes, Favourites) - Right side of the list item</comment>
+ <source>[ %1 ]</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P2</extra-loc-viewid>
+ <extra-loc-positionid>list</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_notes_button_due_date">
+ <comment>Date push button in Data Form to set due date for a To-do note. This action opens the date picker component</comment>
+ <source>%1</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P8</extra-loc-viewid>
+ <extra-loc-positionid>button</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
<message numerus="no" id="txt_notes_setlabel_priority_val_high">
<comment>Priority value in Combo Box used in a dataform</comment>
<source>High</source>
@@ -244,7 +264,7 @@
</message>
<message numerus="no" id="txt_notes_dblist_completed_date_val_1">
<comment>Completed date value (Secondary text ) in To-do viewer</comment>
- <source>0.01</source>
+ <source>%1</source>
<translation variants="no" type="unfinished"></translation>
<extra-loc-layout_id>qtl_list_sec</extra-loc-layout_id>
<extra-loc-viewid>Notes_P11</extra-loc-viewid>
@@ -272,6 +292,16 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
+<message numerus="no" id="txt_notes_button_dialog_delete">
+ <comment>Delete - Confirmation dialog softkey button </comment>
+ <source>Delete</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_dialog_softkey_2</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P19</extra-loc-viewid>
+ <extra-loc-positionid>button</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
<message numerus="no" id="txt_notes_opt_mark_as_not_done">
<comment>Options menu item to change the completed to-do status to not-completed</comment>
<source>Mark as not done</source>
@@ -302,6 +332,16 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
+<message numerus="no" id="txt_notes_subhead_plain_notes">
+ <comment>Sub title in Recent notes list view</comment>
+ <source>Plain notes</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P6</extra-loc-viewid>
+ <extra-loc-positionid>subhead</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
<message numerus="no" id="txt_notes_button_delete">
<comment>Toolbar button item to delete the note</comment>
<source>Delete</source>
@@ -322,13 +362,43 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
-<message numerus="no" id="txt_notes_list_1_2">
- <comment>Alarm time and date for To-do note</comment>
+<message numerus="no" id="txt_notes_info_delete_note">
+ <comment>Confirmation dialog text for deleting a note</comment>
+ <source>Delete note?</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_dialog_pri5_large_graphic</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P19</extra-loc-viewid>
+ <extra-loc-positionid>info</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_notes_subhead_edit_time">
+ <comment>Creation & Modification time and date will be shown in the groupBox. Custom groupBox label . Text shown on the right side of the widget</comment>
<source>%1 %2</source>
<translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_list_pri_graphic</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P11</extra-loc-viewid>
- <extra-loc-positionid>list</extra-loc-positionid>
+ <extra-loc-layout_id>txt_notes_subhead_1_2</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P5</extra-loc-viewid>
+ <extra-loc-positionid>subhead</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_notes_button_all_notes">
+ <comment>One of the toolbar button text in landscape mode . If user taps on this button, All notes view is displayed</comment>
+ <source>All notes</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_toolbar_tiny_4</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_L1</extra-loc-viewid>
+ <extra-loc-positionid>button</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_notes_info_delete_todo_note">
+ <comment>Confirmation dialog text for deleting a To-do note</comment>
+ <source>Delete To-do note?</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_dialog_pri5_large_graphic</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P19</extra-loc-viewid>
+ <extra-loc-positionid>info</extra-loc-positionid>
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
@@ -362,6 +432,16 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
+<message numerus="no" id="txt_notes_list_no_notes_available">
+ <comment>Custom layout ID. No parent . If the view is empty, this text should be displayed in the All notes empy list view. Same text is used in landscape as well</comment>
+ <source>No notes available</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>txt_notes_list_no_notes_available</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P1</extra-loc-viewid>
+ <extra-loc-positionid>list</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
<message numerus="no" id="txt_notes_button_send">
<comment>Tool bar button used to send the note to other user</comment>
<source>Send</source>
@@ -372,6 +452,36 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
+<message numerus="no" id="txt_notes_list_plain_notes">
+ <comment>Collections name in the list widget (Left Side)</comment>
+ <source>Plain notes</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P2</extra-loc-viewid>
+ <extra-loc-positionid>list</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_notes_list_alarm_date">
+ <comment>Alarm time and date for To-do note</comment>
+ <source>%1 %2</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_list_pri_graphic</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P11</extra-loc-viewid>
+ <extra-loc-positionid>list</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_notes_dblist_note_created_on_date">
+ <comment>Secondary text item to mention creation date for a note</comment>
+ <source>Created on %1</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P1</extra-loc-viewid>
+ <extra-loc-positionid>dblist_11_val</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
<message numerus="no" id="txt_notes_title_due_date">
<comment>Message dialog header text . Date picker component embedded</comment>
<source>Due date</source>
@@ -402,6 +512,16 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
+<message numerus="no" id="txt_notes_info_delete_todo_notes">
+ <comment>Confirmation dialog text for deleting multiple to-do notes</comment>
+ <source>Delete To-do notes?</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_dialog_pri5_large_graphic</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P19</extra-loc-viewid>
+ <extra-loc-positionid>info</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
<message numerus="no" id="txt_notes_dpopinfo_new_note_saved">
<comment>Soft notification dialog info text. This dialog is displayed once the new note is saved</comment>
<source>New note saved</source>
@@ -412,6 +532,16 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
+<message numerus="no" id="txt_notes_button_alarm_date">
+ <comment>Layout ID Parent. Date Push Button in Dataform to set alarm date for a To-do note. This action opens the date picker component</comment>
+ <source>%1</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>txt_notes_button_2</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P8</extra-loc-viewid>
+ <extra-loc-positionid>button</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
<message numerus="no" id="txt_notes_opt_make_it_as_todo_note">
<comment>Options menu item to convert a note to To-Do item. This action launchs To-Do editor to add due date and reminder</comment>
<source>Make it as To-do note</source>
@@ -432,16 +562,6 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
-<message numerus="no" id="txt_notes_button_all">
- <comment>One of the toolbar button text in landscape mode . If user taps on this button, All notes view is displayed</comment>
- <source>All</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_toolbar_tiny_4</extra-loc-layout_id>
- <extra-loc-viewid>Notes_L1</extra-loc-viewid>
- <extra-loc-positionid>button</extra-loc-positionid>
- <extra-loc-feature>No</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
<message numerus="no" id="txt_notes_subhead_new_note">
<comment>Layout ID Parent. Custom GroupBox. Sub title in Notes editor (Creating new note) - Left side text</comment>
<source>New note</source>
@@ -452,16 +572,6 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
-<message numerus="no" id="txt_notes_subhead_1_2">
- <comment>Creation & Modification time and date will be shown in the groupBox. Custom groupBox label . Text shown on the right side of the widget</comment>
- <source>%1 %2</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>txt_notes_subhead_1_2</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P5</extra-loc-viewid>
- <extra-loc-positionid>subhead</extra-loc-positionid>
- <extra-loc-feature>No</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
<message numerus="no" id="txt_notes_subhead_new_todo">
<comment>Sub title in New To-do note editor</comment>
<source>New To-do</source>
@@ -502,16 +612,6 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
-<message numerus="no" id="txt_notes_subhead_recent_notes">
- <comment>Sub title in Recent notes list view</comment>
- <source>Recent notes</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P6</extra-loc-viewid>
- <extra-loc-positionid>subhead</extra-loc-positionid>
- <extra-loc-feature>No</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
<message numerus="no" id="txt_notes_formlabel_alarm_date_and_time">
<comment>Label item in Data form</comment>
<source>Alarm date and time</source>
@@ -552,12 +652,32 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
+<message numerus="no" id="txt_notes_button_alarm_time">
+ <comment>Layout ID Parent. Custom Widget . Time Push Button in Dataform to set alarm time for a To-do note. This action opens the time picker component</comment>
+ <source>%1</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>txt_notes_button_1</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P8</extra-loc-viewid>
+ <extra-loc-positionid>button</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_notes_info_delete_notes">
+ <comment>Confirmation dialog text for deleting multiple notes</comment>
+ <source>Delete notes?</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_dialog_pri5_large_graphic</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P19</extra-loc-viewid>
+ <extra-loc-positionid>info</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
<message numerus="no" id="txt_notes_subhead_favorites">
<comment>Sub title in Favorite notes list view</comment>
<source>Favorites</source>
<translation variants="no" type="unfinished"></translation>
<extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P6</extra-loc-viewid>
+ <extra-loc-viewid>Notes_P3</extra-loc-viewid>
<extra-loc-positionid>subhead</extra-loc-positionid>
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
@@ -582,6 +702,16 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
+<message numerus="no" id="txt_notes_dblist_val_unnamed">
+ <comment>Secondary text in the list item. If subject is not mentioned for a note, this text is displayed as secondary text in the All notes list view</comment>
+ <source>Unnamed</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P11</extra-loc-viewid>
+ <extra-loc-positionid>dblist_5_val</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
<message numerus="no" id="txt_notes_dblist_val_completed_on_1">
<comment>Secondary text item in the list to show completed date for To-do note</comment>
<source>Completed on %1</source>
@@ -602,13 +732,13 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
-<message numerus="no" id="txt_notes_button_1">
- <comment>Layout ID Parent. Custom Widget . Time Push Button in Dataform to set alarm time for a To-do note. This action opens the time picker component</comment>
- <source>0.01</source>
+<message numerus="no" id="txt_notes_dpopinfo_new_todo_note_saved">
+ <comment>Soft notification dialog info text. This dialog is displayed once the new to-do note is saved</comment>
+ <source>New To-do note saved</source>
<translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>txt_notes_button_1</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P8</extra-loc-viewid>
- <extra-loc-positionid>button</extra-loc-positionid>
+ <extra-loc-layout_id>qtl_notifdialog_pri2</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P10</extra-loc-viewid>
+ <extra-loc-positionid>dpopinfo</extra-loc-positionid>
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
@@ -622,16 +752,6 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
-<message numerus="no" id="txt_notes_dpopinfo_new_todo_note_saved">
- <comment>Soft notification dialog info text. This dialog is displayed once the new to-do note is saved</comment>
- <source>New To-do note saved</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_notifdialog_pri2</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P10</extra-loc-viewid>
- <extra-loc-positionid>dpopinfo</extra-loc-positionid>
- <extra-loc-feature>No</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
<message numerus="no" id="txt_notes_dpopinfo_todo_note_saved">
<comment>Soft notification dialog info text. This dialog is displayed once to-do note is modified and saved</comment>
<source>To-do note saved</source>
@@ -662,6 +782,26 @@
<extra-loc-feature>Ta</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
+<message numerus="no" id="txt_notes_dblist_note_modified_on_date">
+ <comment>Secondary text item to mention modification date for a note</comment>
+ <source>Modified on %1</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P1</extra-loc-viewid>
+ <extra-loc-positionid>dblist_13_val</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_notes_dblist_unnamed">
+ <comment>Primary text in all notes list view if the subject is not mentioned for a To-do note</comment>
+ <source>Unnamed</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_list_pri_graphic_add</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P1</extra-loc-viewid>
+ <extra-loc-positionid>dblist_11</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
<message numerus="no" id="txt_notes_menu_add_to_calendar">
<comment>Item specific menu item. This action launches the event editor and adds the notes content to the subject & description field</comment>
<source>Add to Calendar</source>
--- a/notes/notesui/bwins/notesmodelu.def Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/bwins/notesmodelu.def Mon May 03 12:30:32 2010 +0300
@@ -1,36 +1,36 @@
EXPORTS
- ?appendNotesToModel@NotesModel@@AAEXAAV?$QList@K@@@Z @ 1 NONAME ; void NotesModel::appendNotesToModel(class QList<unsigned long> &)
- ?sourceModel@NotesModel@@QAEPAVQAbstractItemModel@@XZ @ 2 NONAME ; class QAbstractItemModel * NotesModel::sourceModel(void)
- ?filterAcceptsRow@NotesSortFilterProxyModel@@MBE_NHABVQModelIndex@@@Z @ 3 NONAME ; bool NotesSortFilterProxyModel::filterAcceptsRow(int, class QModelIndex const &) const
- ?modifyEntryInModel@NotesModel@@AAEXKH@Z @ 4 NONAME ; void NotesModel::modifyEntryInModel(unsigned long, int)
- ?getStaticMetaObject@NotesSortFilterProxyModel@@SAABUQMetaObject@@XZ @ 5 NONAME ; struct QMetaObject const & NotesSortFilterProxyModel::getStaticMetaObject(void)
+ ?sourceModel@NotesModel@@QAEPAVQAbstractItemModel@@XZ @ 1 NONAME ; class QAbstractItemModel * NotesModel::sourceModel(void)
+ ?filterAcceptsRow@NotesSortFilterProxyModel@@MBE_NHABVQModelIndex@@@Z @ 2 NONAME ; bool NotesSortFilterProxyModel::filterAcceptsRow(int, class QModelIndex const &) const
+ ?modifyEntryInModel@NotesModel@@AAEXKH@Z @ 3 NONAME ; void NotesModel::modifyEntryInModel(unsigned long, int)
+ ?getStaticMetaObject@NotesSortFilterProxyModel@@SAABUQMetaObject@@XZ @ 4 NONAME ; struct QMetaObject const & NotesSortFilterProxyModel::getStaticMetaObject(void)
+ ?appendCompTodosToModel@NotesModel@@AAEXAAV?$QList@VAgendaEntry@@@@@Z @ 5 NONAME ; void NotesModel::appendCompTodosToModel(class QList<class AgendaEntry> &)
?tr@NotesSortFilterProxyModel@@SA?AVQString@@PBD0H@Z @ 6 NONAME ; class QString NotesSortFilterProxyModel::tr(char const *, char const *, int)
?rowAdded@NotesModel@@IAEXVQModelIndex@@@Z @ 7 NONAME ; void NotesModel::rowAdded(class QModelIndex)
?qt_metacast@NotesModel@@UAEPAXPBD@Z @ 8 NONAME ; void * NotesModel::qt_metacast(char const *)
?trUtf8@NotesSortFilterProxyModel@@SA?AVQString@@PBD0@Z @ 9 NONAME ; class QString NotesSortFilterProxyModel::trUtf8(char const *, char const *)
?lessThan@NotesSortFilterProxyModel@@MBE_NABVQModelIndex@@0@Z @ 10 NONAME ; bool NotesSortFilterProxyModel::lessThan(class QModelIndex const &, class QModelIndex const &) const
- ?appendInCompTodosToModel@NotesModel@@AAEXAAV?$QList@K@@@Z @ 11 NONAME ; void NotesModel::appendInCompTodosToModel(class QList<unsigned long> &)
- ?metaObject@NotesSortFilterProxyModel@@UBEPBUQMetaObject@@XZ @ 12 NONAME ; struct QMetaObject const * NotesSortFilterProxyModel::metaObject(void) const
- ?appendCompTodosToModel@NotesModel@@AAEXAAV?$QList@K@@@Z @ 13 NONAME ; void NotesModel::appendCompTodosToModel(class QList<unsigned long> &)
- ?trUtf8@NotesSortFilterProxyModel@@SA?AVQString@@PBD0H@Z @ 14 NONAME ; class QString NotesSortFilterProxyModel::trUtf8(char const *, char const *, int)
- ?metaObject@NotesModel@@UBEPBUQMetaObject@@XZ @ 15 NONAME ; struct QMetaObject const * NotesModel::metaObject(void) const
- ?tr@NotesModel@@SA?AVQString@@PBD0H@Z @ 16 NONAME ; class QString NotesModel::tr(char const *, char const *, int)
- ?staticMetaObject@NotesModel@@2UQMetaObject@@B @ 17 NONAME ; struct QMetaObject const NotesModel::staticMetaObject
- ?staticMetaObject@NotesSortFilterProxyModel@@2UQMetaObject@@B @ 18 NONAME ; struct QMetaObject const NotesSortFilterProxyModel::staticMetaObject
- ??0NotesModel@@QAE@PAVAgendaUtil@@PAVQObject@@@Z @ 19 NONAME ; NotesModel::NotesModel(class AgendaUtil *, class QObject *)
- ??_ENotesSortFilterProxyModel@@UAE@I@Z @ 20 NONAME ; NotesSortFilterProxyModel::~NotesSortFilterProxyModel(unsigned int)
- ??1NotesSortFilterProxyModel@@UAE@XZ @ 21 NONAME ; NotesSortFilterProxyModel::~NotesSortFilterProxyModel(void)
- ?qt_metacall@NotesSortFilterProxyModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 22 NONAME ; int NotesSortFilterProxyModel::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?tr@NotesModel@@SA?AVQString@@PBD0@Z @ 23 NONAME ; class QString NotesModel::tr(char const *, char const *)
- ?getStaticMetaObject@NotesModel@@SAABUQMetaObject@@XZ @ 24 NONAME ; struct QMetaObject const & NotesModel::getStaticMetaObject(void)
- ?tr@NotesSortFilterProxyModel@@SA?AVQString@@PBD0@Z @ 25 NONAME ; class QString NotesSortFilterProxyModel::tr(char const *, char const *)
- ?addEntryToModel@NotesModel@@AAEXK@Z @ 26 NONAME ; void NotesModel::addEntryToModel(unsigned long)
- ??1NotesModel@@UAE@XZ @ 27 NONAME ; NotesModel::~NotesModel(void)
- ?removeEntryFromModel@NotesModel@@AAEXK@Z @ 28 NONAME ; void NotesModel::removeEntryFromModel(unsigned long)
- ?qt_metacast@NotesSortFilterProxyModel@@UAEPAXPBD@Z @ 29 NONAME ; void * NotesSortFilterProxyModel::qt_metacast(char const *)
- ?insertNoteToModel@NotesModel@@AAE_NAAVQModelIndex@@K@Z @ 30 NONAME ; bool NotesModel::insertNoteToModel(class QModelIndex &, unsigned long)
- ?qt_metacall@NotesModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 31 NONAME ; int NotesModel::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?populateSourceModel@NotesModel@@AAEXV?$QList@K@@@Z @ 32 NONAME ; void NotesModel::populateSourceModel(class QList<unsigned long>)
+ ?metaObject@NotesSortFilterProxyModel@@UBEPBUQMetaObject@@XZ @ 11 NONAME ; struct QMetaObject const * NotesSortFilterProxyModel::metaObject(void) const
+ ?trUtf8@NotesSortFilterProxyModel@@SA?AVQString@@PBD0H@Z @ 12 NONAME ; class QString NotesSortFilterProxyModel::trUtf8(char const *, char const *, int)
+ ?metaObject@NotesModel@@UBEPBUQMetaObject@@XZ @ 13 NONAME ; struct QMetaObject const * NotesModel::metaObject(void) const
+ ?tr@NotesModel@@SA?AVQString@@PBD0H@Z @ 14 NONAME ; class QString NotesModel::tr(char const *, char const *, int)
+ ?staticMetaObject@NotesModel@@2UQMetaObject@@B @ 15 NONAME ; struct QMetaObject const NotesModel::staticMetaObject
+ ?staticMetaObject@NotesSortFilterProxyModel@@2UQMetaObject@@B @ 16 NONAME ; struct QMetaObject const NotesSortFilterProxyModel::staticMetaObject
+ ??0NotesModel@@QAE@PAVAgendaUtil@@PAVQObject@@@Z @ 17 NONAME ; NotesModel::NotesModel(class AgendaUtil *, class QObject *)
+ ??_ENotesSortFilterProxyModel@@UAE@I@Z @ 18 NONAME ; NotesSortFilterProxyModel::~NotesSortFilterProxyModel(unsigned int)
+ ??1NotesSortFilterProxyModel@@UAE@XZ @ 19 NONAME ; NotesSortFilterProxyModel::~NotesSortFilterProxyModel(void)
+ ?qt_metacall@NotesSortFilterProxyModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 20 NONAME ; int NotesSortFilterProxyModel::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?tr@NotesModel@@SA?AVQString@@PBD0@Z @ 21 NONAME ; class QString NotesModel::tr(char const *, char const *)
+ ?getStaticMetaObject@NotesModel@@SAABUQMetaObject@@XZ @ 22 NONAME ; struct QMetaObject const & NotesModel::getStaticMetaObject(void)
+ ?tr@NotesSortFilterProxyModel@@SA?AVQString@@PBD0@Z @ 23 NONAME ; class QString NotesSortFilterProxyModel::tr(char const *, char const *)
+ ?addEntryToModel@NotesModel@@AAEXK@Z @ 24 NONAME ; void NotesModel::addEntryToModel(unsigned long)
+ ??1NotesModel@@UAE@XZ @ 25 NONAME ; NotesModel::~NotesModel(void)
+ ?removeEntryFromModel@NotesModel@@AAEXK@Z @ 26 NONAME ; void NotesModel::removeEntryFromModel(unsigned long)
+ ?qt_metacast@NotesSortFilterProxyModel@@UAEPAXPBD@Z @ 27 NONAME ; void * NotesSortFilterProxyModel::qt_metacast(char const *)
+ ?appendInCompTodosToModel@NotesModel@@AAEXAAV?$QList@VAgendaEntry@@@@@Z @ 28 NONAME ; void NotesModel::appendInCompTodosToModel(class QList<class AgendaEntry> &)
+ ?insertNoteToModel@NotesModel@@AAE_NAAVQModelIndex@@K@Z @ 29 NONAME ; bool NotesModel::insertNoteToModel(class QModelIndex &, unsigned long)
+ ?qt_metacall@NotesModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 30 NONAME ; int NotesModel::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?populateSourceModel@NotesModel@@AAEXV?$QList@K@@@Z @ 31 NONAME ; void NotesModel::populateSourceModel(class QList<unsigned long>)
+ ?appendNotesToModel@NotesModel@@AAEXAAV?$QList@VAgendaEntry@@@@@Z @ 32 NONAME ; void NotesModel::appendNotesToModel(class QList<class AgendaEntry> &)
?updateSourceModel@NotesModel@@AAEXK@Z @ 33 NONAME ; void NotesModel::updateSourceModel(unsigned long)
??_ENotesModel@@UAE@I@Z @ 34 NONAME ; NotesModel::~NotesModel(unsigned int)
?trUtf8@NotesModel@@SA?AVQString@@PBD0H@Z @ 35 NONAME ; class QString NotesModel::trUtf8(char const *, char const *, int)
@@ -39,4 +39,6 @@
?insertCompTodoToModel@NotesModel@@AAE_NAAVQModelIndex@@K@Z @ 38 NONAME ; bool NotesModel::insertCompTodoToModel(class QModelIndex &, unsigned long)
??0NotesSortFilterProxyModel@@QAE@AAVAgendaUtil@@PAVQObject@@@Z @ 39 NONAME ; NotesSortFilterProxyModel::NotesSortFilterProxyModel(class AgendaUtil &, class QObject *)
?populateSourceModel@NotesModel@@AAEXXZ @ 40 NONAME ; void NotesModel::populateSourceModel(void)
+ ?dateFormatString@NotesModel@@AAE?AVQString@@XZ @ 41 NONAME ; class QString NotesModel::dateFormatString(void)
+ ?timeFormatString@NotesModel@@AAE?AVQString@@XZ @ 42 NONAME ; class QString NotesModel::timeFormatString(void)
--- a/notes/notesui/eabi/notesmodelu.def Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/eabi/notesmodelu.def Mon May 03 12:30:32 2010 +0300
@@ -6,16 +6,16 @@
_ZN10NotesModel16staticMetaObjectE @ 5 NONAME DATA 16
_ZN10NotesModel17insertNoteToModelER11QModelIndexm @ 6 NONAME
_ZN10NotesModel17updateSourceModelEm @ 7 NONAME
- _ZN10NotesModel18appendNotesToModelER5QListImE @ 8 NONAME
+ _ZN10NotesModel18appendNotesToModelER5QListI11AgendaEntryE @ 8 NONAME
_ZN10NotesModel18modifyEntryInModelEmi @ 9 NONAME
_ZN10NotesModel19getStaticMetaObjectEv @ 10 NONAME
_ZN10NotesModel19populateSourceModelE5QListImE @ 11 NONAME
_ZN10NotesModel19populateSourceModelEv @ 12 NONAME
_ZN10NotesModel20removeEntryFromModelEm @ 13 NONAME
_ZN10NotesModel21insertCompTodoToModelER11QModelIndexm @ 14 NONAME
- _ZN10NotesModel22appendCompTodosToModelER5QListImE @ 15 NONAME
+ _ZN10NotesModel22appendCompTodosToModelER5QListI11AgendaEntryE @ 15 NONAME
_ZN10NotesModel23insertInCompTodoToModelER11QModelIndexm @ 16 NONAME
- _ZN10NotesModel24appendInCompTodosToModelER5QListImE @ 17 NONAME
+ _ZN10NotesModel24appendInCompTodosToModelER5QListI11AgendaEntryE @ 17 NONAME
_ZN10NotesModel8rowAddedE11QModelIndex @ 18 NONAME
_ZN10NotesModelC1EP10AgendaUtilP7QObject @ 19 NONAME
_ZN10NotesModelC2EP10AgendaUtilP7QObject @ 20 NONAME
@@ -39,4 +39,6 @@
_ZTI25NotesSortFilterProxyModel @ 38 NONAME
_ZTV10NotesModel @ 39 NONAME
_ZTV25NotesSortFilterProxyModel @ 40 NONAME
+ _ZN10NotesModel16dateFormatStringEv @ 41 NONAME
+ _ZN10NotesModel16timeFormatStringEv @ 42 NONAME
--- a/notes/notesui/notesappcontroller/src/notesappcontroller.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/notesappcontroller/src/notesappcontroller.cpp Mon May 03 12:30:32 2010 +0300
@@ -15,9 +15,6 @@
*
*/
-// System includes
-#include <QDebug>
-
// User includes
#include "notesappcontroller.h"
#include "notesappcontrollerifimpl.h"
@@ -40,8 +37,6 @@
mNotesModelHandler(0),
mIfImpl(0)
{
- qDebug() << "notes: NotesAppController::NoteAppController -->";
-
// Construct the interface implementation.
mIfImpl = new NotesAppControllerIfImpl(this, this);
@@ -56,8 +51,6 @@
Q_ASSERT_X(
mViewManager, "notesappcontroller.cpp",
"NotesViewManager is 0");
-
- qDebug() << "notes: NotesAppController::NoteAppController <--";
}
/*!
@@ -65,8 +58,6 @@
*/
NotesAppController::~NotesAppController()
{
- qDebug() << "notes: NotesAppController::~NoteAppController -->";
-
if (mViewManager) {
delete mViewManager;
mViewManager = 0;
@@ -79,8 +70,6 @@
delete mIfImpl;
mIfImpl = 0;
}
-
- qDebug() << "notes: NotesAppController::~NoteAppController <--";
}
// End of file --Don't remove this.
--- a/notes/notesui/notesappcontroller/src/notesappcontrollerifimpl.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/notesappcontroller/src/notesappcontrollerifimpl.cpp Mon May 03 12:30:32 2010 +0300
@@ -16,9 +16,6 @@
*
*/
-// System includes
-#include <QDebug>
-
// User includes
#include "notesappcontrollerifimpl.h"
#include "notesmodelhandler.h"
@@ -44,11 +41,7 @@
:QObject(parent),
mAppController(controller)
{
- qDebug() << "notes: NotesAppControllerIfImpl::NotesAppControllerIfImpl -->";
-
// Nothing yet.
-
- qDebug() << "notes: NotesAppControllerIfImpl::NotesAppControllerIfImpl <--";
}
/*!
@@ -56,11 +49,7 @@
*/
NotesAppControllerIfImpl::~NotesAppControllerIfImpl()
{
- qDebug() << "notes: NotesAppControllerIfImpl::~NotesAppControllerIfImpl -->";
-
// Nothing yet.
-
- qDebug() << "notes: NotesAppControllerIfImpl::~NotesAppControllerIfImpl <--";
}
/*!
@@ -72,10 +61,6 @@
*/
AgendaUtil *NotesAppControllerIfImpl::agendaUtil()
{
- qDebug() << "notes: NotesAppControllerIfImpl::agendaUtil -->";
-
- qDebug() << "notes: NotesAppControllerIfImpl::agendaUtil <--";
-
return mAppController->mNotesModelHandler->agendaInterface();
}
@@ -88,10 +73,6 @@
*/
NotesModel *NotesAppControllerIfImpl::notesModel()
{
- qDebug() << "notes: NotesAppControllerIfImpl::notesModel -->";
-
- qDebug() << "notes: NotesAppControllerIfImpl::notesModel <--";
-
return mAppController->mNotesModelHandler->notesModel();
}
@@ -104,11 +85,7 @@
*/
void NotesAppControllerIfImpl::switchToView(NotesNamespace::NotesViewIds viewId)
{
- qDebug() << "notes: NotesAppControllerIfImpl::switchToView -->";
-
mAppController->mViewManager->switchToView(viewId);
-
- qDebug() << "notes: NotesAppControllerIfImpl::switchToView <--";
}
// End of file --Don't remove this.
--- a/notes/notesui/notesapplication/src/main.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/notesapplication/src/main.cpp Mon May 03 12:30:32 2010 +0300
@@ -16,7 +16,6 @@
*/
// System includes
-#include <qdebug.h>
#include <QScopedPointer>
#include <QTranslator>
#include <hbapplication.h>
@@ -33,8 +32,6 @@
*/
int main(int argc, char *argv[])
{
- qDebug() << "notes: main -->";
-
// Create and initialize an HbApplication instance
HbApplication app(argc, argv);
@@ -55,9 +52,6 @@
// Show the main window.
window.show();
-
- qDebug() << "notes: main <--";
-
// Start the event loop for the application
return app.exec();
}
--- a/notes/notesui/noteseditor/data/noteseditor.qrc Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/noteseditor/data/noteseditor.qrc Mon May 03 12:30:32 2010 +0300
@@ -1,1 +1,1 @@
-<!DOCTYPE RCC><RCC version="1.0"> <qresource prefix="/translations"> <file alias="notes">translations/notes.qm</file> </qresource> <qresource prefix="/docml"> <file alias="notesnoteeditor.docml">xml/notesnoteeditor.docml</file> <file alias="todoeditor.docml">xml/todoeditor.docml</file> </qresource> <qresource prefix="/style"> <file alias="hbtextedit.css">style/hbtextedit.css</file> </qresource></RCC>
\ No newline at end of file
+<!DOCTYPE RCC><RCC version="1.0"> <qresource prefix="/translations"> <file alias="notes">translations/notes.qm</file> </qresource> <qresource prefix="/docml"> <file alias="notesnoteeditor.docml">xml/notesnoteeditor.docml</file> <file alias="todoeditor.docml">xml/todoeditor.docml</file> </qresource></RCC>
\ No newline at end of file
--- a/notes/notesui/noteseditor/data/style/hbtextedit.css Fri Apr 16 14:57:40 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-HbTextEdit[objectName="textEdit"]
-{
- layout: default;
- line-enabled: 1;
- line-width: 1;
- line-color: #ffffff;
-}
Binary file notes/notesui/noteseditor/data/translations/notes.qm has changed
--- a/notes/notesui/noteseditor/data/translations/notes.ts Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/noteseditor/data/translations/notes.ts Mon May 03 12:30:32 2010 +0300
@@ -2,6 +2,26 @@
<!DOCTYPE TS>
<TS version="3.0" sourcelanguage="en_GB">
<context>
+<message numerus="no" id="txt_notes_list_due_date">
+ <comment>Due date for To-do note</comment>
+ <source>%1</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_list_pri_graphic</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P11</extra-loc-viewid>
+ <extra-loc-positionid>list</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_notes_button_new_todo">
+ <comment>Toolbar button to create new To-do note</comment>
+ <source>New To-do </source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_toolbar_tiny_4</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_L7</extra-loc-viewid>
+ <extra-loc-positionid>button</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
<message numerus="no" id="txt_notes_formlabel_val_description">
<comment>Default texxt value for Description field in a dataform</comment>
<source>Description</source>
@@ -22,16 +42,6 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
-<message numerus="no" id="txt_notes_button_new_todo">
- <comment>Toolbar button to create nbew to-do event in to-do collections view</comment>
- <source>New To-do</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_toolbar_tiny_4</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P10</extra-loc-viewid>
- <extra-loc-positionid>button</extra-loc-positionid>
- <extra-loc-feature>No</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
<message numerus="no" id="txt_notes_menu_make_it_as_todo_note">
<comment>Item specific menu item . This action launchs the To-Do editor to add due date and remainder for the selected note</comment>
<source>Make it as To-do note</source>
@@ -42,16 +52,6 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
-<message numerus="no" id="txt_notes_list_recent_notes">
- <comment>Collections name in the list widget (Left Side)</comment>
- <source>Recent notes</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P2</extra-loc-viewid>
- <extra-loc-positionid>list</extra-loc-positionid>
- <extra-loc-feature>No</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
<message numerus="no" id="txt_notes_button_find">
<comment>toolbar button text in landscape mode . If user taps on this button, Find functionality is enabled in all notes view</comment>
<source>Find</source>
@@ -82,6 +82,16 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
+<message numerus="no" id="txt_notes_dblist_note_modified_at_time">
+ <comment>Secondary text item to mention modification time for a note</comment>
+ <source>Modified at %1</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P1</extra-loc-viewid>
+ <extra-loc-positionid>dblist_14_val</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
<message numerus="no" id="txt_notes_setlabel_priority_val_low">
<comment>Priority value in Combo Box used in a dataform</comment>
<source>Low</source>
@@ -112,16 +122,6 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
-<message numerus="no" id="txt_notes_button_2">
- <comment>Layout ID Parent. Date Push Button in Dataform to set alarm date for a To-do note. This action opens the date picker component</comment>
- <source>0.02</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>txt_notes_button_2</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P8</extra-loc-viewid>
- <extra-loc-positionid>button</extra-loc-positionid>
- <extra-loc-feature>No</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
<message numerus="no" id="txt_notes_formlabel_due_date">
<comment>Label item in Data form </comment>
<source>Due date</source>
@@ -182,13 +182,13 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
-<message numerus="no" id="txt_notes_list_1">
- <comment>Due date for To-do note</comment>
- <source>0.01</source>
+<message numerus="no" id="txt_notes_dblist_note_created_at_time">
+ <comment>Secondary text item to mention creation time for a note</comment>
+ <source>Created at %1</source>
<translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_list_pri_graphic</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P11</extra-loc-viewid>
- <extra-loc-positionid>list</extra-loc-positionid>
+ <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P1</extra-loc-viewid>
+ <extra-loc-positionid>dblist_12_val</extra-loc-positionid>
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
@@ -216,7 +216,7 @@
<comment>Primary text label in To-do viewer</comment>
<source>Subject:</source>
<translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_list_pri_add</extra-loc-layout_id>
+ <extra-loc-layout_id>qtl_list_pri_graphic_add</extra-loc-layout_id>
<extra-loc-viewid>Notes_P11</extra-loc-viewid>
<extra-loc-positionid>dblist_5</extra-loc-positionid>
<extra-loc-feature>No</extra-loc-feature>
@@ -232,6 +232,26 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
+<message numerus="no" id="txt_notes_list_note_count">
+ <comment>List item to show the number<Count> of items (To-Dos, Recent notes, Favourites) - Right side of the list item</comment>
+ <source>[ %1 ]</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P2</extra-loc-viewid>
+ <extra-loc-positionid>list</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_notes_button_due_date">
+ <comment>Date push button in Data Form to set due date for a To-do note. This action opens the date picker component</comment>
+ <source>%1</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P8</extra-loc-viewid>
+ <extra-loc-positionid>button</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
<message numerus="no" id="txt_notes_setlabel_priority_val_high">
<comment>Priority value in Combo Box used in a dataform</comment>
<source>High</source>
@@ -244,7 +264,7 @@
</message>
<message numerus="no" id="txt_notes_dblist_completed_date_val_1">
<comment>Completed date value (Secondary text ) in To-do viewer</comment>
- <source>0.01</source>
+ <source>%1</source>
<translation variants="no" type="unfinished"></translation>
<extra-loc-layout_id>qtl_list_sec</extra-loc-layout_id>
<extra-loc-viewid>Notes_P11</extra-loc-viewid>
@@ -272,6 +292,16 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
+<message numerus="no" id="txt_notes_button_dialog_delete">
+ <comment>Delete - Confirmation dialog softkey button </comment>
+ <source>Delete</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_dialog_softkey_2</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P19</extra-loc-viewid>
+ <extra-loc-positionid>button</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
<message numerus="no" id="txt_notes_opt_mark_as_not_done">
<comment>Options menu item to change the completed to-do status to not-completed</comment>
<source>Mark as not done</source>
@@ -302,6 +332,16 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
+<message numerus="no" id="txt_notes_subhead_plain_notes">
+ <comment>Sub title in Recent notes list view</comment>
+ <source>Plain notes</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P6</extra-loc-viewid>
+ <extra-loc-positionid>subhead</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
<message numerus="no" id="txt_notes_button_delete">
<comment>Toolbar button item to delete the note</comment>
<source>Delete</source>
@@ -322,13 +362,43 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
-<message numerus="no" id="txt_notes_list_1_2">
- <comment>Alarm time and date for To-do note</comment>
+<message numerus="no" id="txt_notes_info_delete_note">
+ <comment>Confirmation dialog text for deleting a note</comment>
+ <source>Delete note?</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_dialog_pri5_large_graphic</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P19</extra-loc-viewid>
+ <extra-loc-positionid>info</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_notes_subhead_edit_time">
+ <comment>Creation & Modification time and date will be shown in the groupBox. Custom groupBox label . Text shown on the right side of the widget</comment>
<source>%1 %2</source>
<translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_list_pri_graphic</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P11</extra-loc-viewid>
- <extra-loc-positionid>list</extra-loc-positionid>
+ <extra-loc-layout_id>txt_notes_subhead_1_2</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P5</extra-loc-viewid>
+ <extra-loc-positionid>subhead</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_notes_button_all_notes">
+ <comment>One of the toolbar button text in landscape mode . If user taps on this button, All notes view is displayed</comment>
+ <source>All notes</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_toolbar_tiny_4</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_L1</extra-loc-viewid>
+ <extra-loc-positionid>button</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_notes_info_delete_todo_note">
+ <comment>Confirmation dialog text for deleting a To-do note</comment>
+ <source>Delete To-do note?</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_dialog_pri5_large_graphic</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P19</extra-loc-viewid>
+ <extra-loc-positionid>info</extra-loc-positionid>
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
@@ -362,6 +432,16 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
+<message numerus="no" id="txt_notes_list_no_notes_available">
+ <comment>Custom layout ID. No parent . If the view is empty, this text should be displayed in the All notes empy list view. Same text is used in landscape as well</comment>
+ <source>No notes available</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>txt_notes_list_no_notes_available</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P1</extra-loc-viewid>
+ <extra-loc-positionid>list</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
<message numerus="no" id="txt_notes_button_send">
<comment>Tool bar button used to send the note to other user</comment>
<source>Send</source>
@@ -372,6 +452,36 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
+<message numerus="no" id="txt_notes_list_plain_notes">
+ <comment>Collections name in the list widget (Left Side)</comment>
+ <source>Plain notes</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P2</extra-loc-viewid>
+ <extra-loc-positionid>list</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_notes_list_alarm_date">
+ <comment>Alarm time and date for To-do note</comment>
+ <source>%1 %2</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_list_pri_graphic</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P11</extra-loc-viewid>
+ <extra-loc-positionid>list</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_notes_dblist_note_created_on_date">
+ <comment>Secondary text item to mention creation date for a note</comment>
+ <source>Created on %1</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P1</extra-loc-viewid>
+ <extra-loc-positionid>dblist_11_val</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
<message numerus="no" id="txt_notes_title_due_date">
<comment>Message dialog header text . Date picker component embedded</comment>
<source>Due date</source>
@@ -402,6 +512,16 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
+<message numerus="no" id="txt_notes_info_delete_todo_notes">
+ <comment>Confirmation dialog text for deleting multiple to-do notes</comment>
+ <source>Delete To-do notes?</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_dialog_pri5_large_graphic</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P19</extra-loc-viewid>
+ <extra-loc-positionid>info</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
<message numerus="no" id="txt_notes_dpopinfo_new_note_saved">
<comment>Soft notification dialog info text. This dialog is displayed once the new note is saved</comment>
<source>New note saved</source>
@@ -412,6 +532,16 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
+<message numerus="no" id="txt_notes_button_alarm_date">
+ <comment>Layout ID Parent. Date Push Button in Dataform to set alarm date for a To-do note. This action opens the date picker component</comment>
+ <source>%1</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>txt_notes_button_2</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P8</extra-loc-viewid>
+ <extra-loc-positionid>button</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
<message numerus="no" id="txt_notes_opt_make_it_as_todo_note">
<comment>Options menu item to convert a note to To-Do item. This action launchs To-Do editor to add due date and reminder</comment>
<source>Make it as To-do note</source>
@@ -432,16 +562,6 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
-<message numerus="no" id="txt_notes_button_all">
- <comment>One of the toolbar button text in landscape mode . If user taps on this button, All notes view is displayed</comment>
- <source>All</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_toolbar_tiny_4</extra-loc-layout_id>
- <extra-loc-viewid>Notes_L1</extra-loc-viewid>
- <extra-loc-positionid>button</extra-loc-positionid>
- <extra-loc-feature>No</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
<message numerus="no" id="txt_notes_subhead_new_note">
<comment>Layout ID Parent. Custom GroupBox. Sub title in Notes editor (Creating new note) - Left side text</comment>
<source>New note</source>
@@ -452,16 +572,6 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
-<message numerus="no" id="txt_notes_subhead_1_2">
- <comment>Creation & Modification time and date will be shown in the groupBox. Custom groupBox label . Text shown on the right side of the widget</comment>
- <source>%1 %2</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>txt_notes_subhead_1_2</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P5</extra-loc-viewid>
- <extra-loc-positionid>subhead</extra-loc-positionid>
- <extra-loc-feature>No</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
<message numerus="no" id="txt_notes_subhead_new_todo">
<comment>Sub title in New To-do note editor</comment>
<source>New To-do</source>
@@ -502,16 +612,6 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
-<message numerus="no" id="txt_notes_subhead_recent_notes">
- <comment>Sub title in Recent notes list view</comment>
- <source>Recent notes</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P6</extra-loc-viewid>
- <extra-loc-positionid>subhead</extra-loc-positionid>
- <extra-loc-feature>No</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
<message numerus="no" id="txt_notes_formlabel_alarm_date_and_time">
<comment>Label item in Data form</comment>
<source>Alarm date and time</source>
@@ -552,12 +652,32 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
+<message numerus="no" id="txt_notes_button_alarm_time">
+ <comment>Layout ID Parent. Custom Widget . Time Push Button in Dataform to set alarm time for a To-do note. This action opens the time picker component</comment>
+ <source>%1</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>txt_notes_button_1</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P8</extra-loc-viewid>
+ <extra-loc-positionid>button</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_notes_info_delete_notes">
+ <comment>Confirmation dialog text for deleting multiple notes</comment>
+ <source>Delete notes?</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_dialog_pri5_large_graphic</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P19</extra-loc-viewid>
+ <extra-loc-positionid>info</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
<message numerus="no" id="txt_notes_subhead_favorites">
<comment>Sub title in Favorite notes list view</comment>
<source>Favorites</source>
<translation variants="no" type="unfinished"></translation>
<extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P6</extra-loc-viewid>
+ <extra-loc-viewid>Notes_P3</extra-loc-viewid>
<extra-loc-positionid>subhead</extra-loc-positionid>
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
@@ -582,6 +702,16 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
+<message numerus="no" id="txt_notes_dblist_val_unnamed">
+ <comment>Secondary text in the list item. If subject is not mentioned for a note, this text is displayed as secondary text in the All notes list view</comment>
+ <source>Unnamed</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P11</extra-loc-viewid>
+ <extra-loc-positionid>dblist_5_val</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
<message numerus="no" id="txt_notes_dblist_val_completed_on_1">
<comment>Secondary text item in the list to show completed date for To-do note</comment>
<source>Completed on %1</source>
@@ -602,13 +732,13 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
-<message numerus="no" id="txt_notes_button_1">
- <comment>Layout ID Parent. Custom Widget . Time Push Button in Dataform to set alarm time for a To-do note. This action opens the time picker component</comment>
- <source>0.01</source>
+<message numerus="no" id="txt_notes_dpopinfo_new_todo_note_saved">
+ <comment>Soft notification dialog info text. This dialog is displayed once the new to-do note is saved</comment>
+ <source>New To-do note saved</source>
<translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>txt_notes_button_1</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P8</extra-loc-viewid>
- <extra-loc-positionid>button</extra-loc-positionid>
+ <extra-loc-layout_id>qtl_notifdialog_pri2</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P10</extra-loc-viewid>
+ <extra-loc-positionid>dpopinfo</extra-loc-positionid>
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
@@ -622,16 +752,6 @@
<extra-loc-feature>No</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
-<message numerus="no" id="txt_notes_dpopinfo_new_todo_note_saved">
- <comment>Soft notification dialog info text. This dialog is displayed once the new to-do note is saved</comment>
- <source>New To-do note saved</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_notifdialog_pri2</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P10</extra-loc-viewid>
- <extra-loc-positionid>dpopinfo</extra-loc-positionid>
- <extra-loc-feature>No</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
<message numerus="no" id="txt_notes_dpopinfo_todo_note_saved">
<comment>Soft notification dialog info text. This dialog is displayed once to-do note is modified and saved</comment>
<source>To-do note saved</source>
@@ -662,6 +782,26 @@
<extra-loc-feature>Ta</extra-loc-feature>
<extra-loc-blank>False</extra-loc-blank>
</message>
+<message numerus="no" id="txt_notes_dblist_note_modified_on_date">
+ <comment>Secondary text item to mention modification date for a note</comment>
+ <source>Modified on %1</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P1</extra-loc-viewid>
+ <extra-loc-positionid>dblist_13_val</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_notes_dblist_unnamed">
+ <comment>Primary text in all notes list view if the subject is not mentioned for a To-do note</comment>
+ <source>Unnamed</source>
+ <translation variants="no" type="unfinished"></translation>
+ <extra-loc-layout_id>qtl_list_pri_graphic_add</extra-loc-layout_id>
+ <extra-loc-viewid>Notes_P1</extra-loc-viewid>
+ <extra-loc-positionid>dblist_11</extra-loc-positionid>
+ <extra-loc-feature>No</extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
<message numerus="no" id="txt_notes_menu_add_to_calendar">
<comment>Item specific menu item. This action launches the event editor and adds the notes content to the subject & description field</comment>
<source>Add to Calendar</source>
--- a/notes/notesui/noteseditor/inc/noteseditor_p.h Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/noteseditor/inc/noteseditor_p.h Mon May 03 12:30:32 2010 +0300
@@ -69,6 +69,7 @@
private:
bool isNoteEdited();
bool isTodoEdited();
+ void showNotification(QString text);
private:
NotesEditor *q_ptr;
--- a/notes/notesui/noteseditor/inc/noteseditorcommon.h Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/noteseditor/inc/noteseditorcommon.h Mon May 03 12:30:32 2010 +0300
@@ -29,8 +29,7 @@
#define NOTES_EDITOR_FAVOURITE_ICON "favoriteIcon"
#define NOTES_EDITOR_MARK_FAVOURITE_ACTION "makeFavoriteAction"
#define NOTES_EDITOR_DISCARD_CHANGES_ACTION "discardChangesAction"
-#define NOTES_EDITOR_STYLE_PATH ":/style"
-#define NOTES_EDITOR_TEXTEDIT_OBJECT "textEdit"
+#define NOTES_EDITOR_NEWNOTE_ACTION "newNoteAction"
#define TODO_EDITOR_DOCML ":/docml/todoeditor.docml"
#define TODO_EDITOR_VIEW "todoEditorview"
#define TODO_EDITOR_SUB_HEADING "subHeading"
--- a/notes/notesui/noteseditor/inc/notesnoteeditor.h Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/noteseditor/inc/notesnoteeditor.h Mon May 03 12:30:32 2010 +0300
@@ -48,6 +48,7 @@
private:
void execute(AgendaEntry entry);
QString getDescription();
+ bool showDeleteConfirmationQuery();
private slots:
void markNoteAsTodo();
@@ -61,13 +62,13 @@
void handleAddToCalendarAction();
void handleEntrySaveFromCalendar();
void handleCalendarEditorClosed();
+ void handleNewNoteAction();
private:
HbView *mEditor;
QPointer<HbTextEdit> mTextEditor;
QPointer<HbLabel> mViewHeading;
- QPointer<HbLabel> mModificationDateLabel;
QPointer<HbLabel> mFavouriteIcon;
QPointer<HbAction> mMarkToDoAction;
@@ -75,6 +76,7 @@
QPointer<HbAction> mDeleteAction;
QPointer<HbAction> mMarkFavouriteAction;
QPointer<HbAction> mDiscardChangesAction;
+ QPointer<HbAction> mNewNoteAction;
NotesEditorDocLoader *mDocLoader;
NotesEditorPrivate* mOwner;
--- a/notes/notesui/noteseditor/inc/notestodoeditor.h Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/noteseditor/inc/notestodoeditor.h Mon May 03 12:30:32 2010 +0300
@@ -71,6 +71,7 @@
void addMenu();
bool validAlarmSet();
void addDiscardChangesAction();
+ bool showDeleteConfirmationQuery();
private slots:
void saveTodo();
--- a/notes/notesui/noteseditor/src/noteseditor_p.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/noteseditor/src/noteseditor_p.cpp Mon May 03 12:30:32 2010 +0300
@@ -17,7 +17,6 @@
*/
// System includes
-#include <QDebug>
#include <QDateTime>
#include <QTranslator>
#include <HbApplication>
@@ -52,8 +51,6 @@
mSaveEntry(true),
mNoteId(0)
{
- qDebug() << "notes: NotesEditorPrivate::NotesEditorPrivate -->";
-
// First get the q-pointer.
q_ptr = static_cast<NotesEditor *> (parent);
@@ -77,8 +74,6 @@
int success=mTranslator->load("notes",":/translations");
HbApplication::instance()->installTranslator(mTranslator);
-
- qDebug() << "notes: NotesEditorPrivate::NotesEditorPrivate <--";
}
/*!
@@ -86,8 +81,6 @@
*/
NotesEditorPrivate::~NotesEditorPrivate()
{
- qDebug() << "notes: NotesEditorPrivate::~NotesEditorPrivate -->";
-
if (mOwnsAgendaUtil) {
delete mAgendaUtil;
mAgendaUtil = 0;
@@ -98,8 +91,6 @@
delete mTranslator;
mTranslator = 0;
}
-
- qDebug() << "notes: NotesEditorPrivate::~NotesEditorPrivate <--";
}
@@ -110,8 +101,6 @@
*/
void NotesEditorPrivate::edit(const QString &string)
{
- qDebug() << "notes: NotesEditorPrivate::show -->";
-
// Create a agenda entry by setting the text as description for the note.
AgendaEntry newNote;
newNote.setType(AgendaEntry::TypeNote);
@@ -125,8 +114,6 @@
// launch note editor
mNoteEditor->execute(newNote);
-
- qDebug() << "notes: NotesEditorPrivate::show <--";
}
/*!
@@ -137,11 +124,7 @@
*/
void NotesEditorPrivate::edit(const QFile &handle)
{
- qDebug() << "notes: NotesEditorPrivate::show(handle) -->";
-
Q_UNUSED(handle)
-
- qDebug() << "notes: NotesEditorPrivate::show(handle) <--";
}
/*!
@@ -151,8 +134,6 @@
*/
void NotesEditorPrivate::edit(AgendaEntry entry)
{
- qDebug() << "notes: NotesEditorPrivate::show(entry) -->";
-
// Check if its a new note or a note being edited.
if (0 < entry.id()) {
mNewEntry = false;
@@ -182,8 +163,6 @@
// Invalid entry type.
return;
}
-
- qDebug() << "notes: NotesEditorPrivate::show(entry) <--";
}
/*!
@@ -193,8 +172,6 @@
*/
void NotesEditorPrivate::edit(ulong id)
{
- qDebug() << "notes: NotesEditorPrivate::show(id) -->";
-
// Fetch the entry using the id provided
AgendaEntry entry = mAgendaUtil->fetchById(id);
if (!entry.isNull()) {
@@ -205,7 +182,6 @@
return;
}
- qDebug() << "notes: NotesEditorPrivate::show(id) <--";
}
/*!
@@ -216,7 +192,6 @@
*/
void NotesEditorPrivate::create(NotesEditor::CreateType type)
{
- qDebug() << "notes: NotesEditorPrivate::create -->";
switch(type) {
case NotesEditor::CreateNote: {
@@ -266,7 +241,6 @@
break;
}
- qDebug() << "notes: NotesEditorPrivate::create <--";
}
@@ -277,7 +251,6 @@
*/
ulong NotesEditorPrivate::close(NotesEditor::CloseType type)
{
- qDebug() << "notes: NotesEditorPrivate::close -->";
switch (type) {
case NotesEditor::CloseWithSave: {
@@ -316,7 +289,6 @@
mNoteId = 0;
break;
}
- qDebug() << "notes: NotesEditorPrivate::close <--";
return mNoteId;
}
@@ -389,15 +361,11 @@
*/
void NotesEditorPrivate::handleEntriesChanged(QList<ulong> ids)
{
- qDebug() << "notes: NotesEditorPrivate::handleEntriesChanged -->";
-
if (!mNewEntry) {
if (ids.contains(mModifiedNote.id())) {
mSaveEntry = false;
}
}
-
- qDebug() << "notes: NotesEditorPrivate::handleEntriesChanged <--";
}
/*!
@@ -405,8 +373,6 @@
*/
void NotesEditorPrivate::markNoteAsTodo()
{
- qDebug() << "notes: NotesEditorPrivate::markNoteAsTodo -->";
-
// This function should not be called by any other function except the
// noteeditor.
if (mModifiedNote.type() != AgendaEntry::TypeNote) {
@@ -448,7 +414,6 @@
window->removeView(mNoteEditor->mEditor);
mNoteEditor->deleteLater();
- qDebug() << "notes: NotesEditorPrivate::markNoteAsTodo <--";
}
/*!
@@ -457,11 +422,9 @@
*/
void NotesEditorPrivate::updateNoteText()
{
- qDebug() << "notes: NotesEditorPrivate::updateNoteText -->";
mModifiedNote.setDescription(mNoteEditor->getDescription());
- qDebug() << "notes: NotesEditorPrivate::updateNoteText <--";
}
/*!
@@ -469,7 +432,6 @@
*/
void NotesEditorPrivate::deleteNote()
{
- qDebug() << "notes: NotesEditorPrivate::deleteNote -->";
if (!mNewEntry) {
// Delete the note. All the changes are discarded.
@@ -485,7 +447,6 @@
mTodoEditor->deleteLater();
}
- qDebug() << "notes: NotesEditorPrivate::deleteNote <--";
}
/*!
@@ -493,7 +454,6 @@
*/
bool NotesEditorPrivate::saveNote()
{
- qDebug() << "notes: NotesEditorPrivate::saveNote -->";
bool status = false;
QString description = mNoteEditor->getDescription();
@@ -506,6 +466,9 @@
mModifiedNote.setDescription(description);
mModifiedNote.setLastModifiedDateTime(
QDateTime(QDate::currentDate(), QTime::currentTime()));
+ // Set the creation time as DTStamp time
+ mModifiedNote.setDTStamp(
+ QDateTime(QDate::currentDate(), QTime::currentTime()));
} else if (AgendaEntry::TypeTodo == mModifiedNote.type()) {
mModifiedNote.setSummary(description);
mModifiedNote.setDescription(description);
@@ -516,10 +479,9 @@
// Now save the entry.
mNoteId = mAgendaUtil->addEntry(mModifiedNote);
if (mNoteId) {
- HbNotificationDialog::launchDialog(
+ showNotification(
hbTrId("txt_notes_dpopinfo_new_note_saved"));
}
-
} else {
if (mOriginalNote.type() != mModifiedNote.type()) {
// Entry has been morphed, delete the original one and create
@@ -543,7 +505,7 @@
if (isNoteEdited()) {
bool updateStatus = mAgendaUtil->updateEntry(mModifiedNote);
if (updateStatus) {
- HbNotificationDialog::launchDialog(
+ showNotification(
hbTrId("txt_notes_dpopinfo_note_saved"));
}
}
@@ -555,7 +517,6 @@
mNoteId = 0;
}
- qDebug() << "notes: NotesEditorPrivate::saveNote <--";
return status;
}
@@ -564,7 +525,6 @@
*/
bool NotesEditorPrivate::saveTodo()
{
- qDebug() << "notes: NotesEditorPrivate::saveTodo -->";
if (AgendaEntry::TypeTodo != mModifiedNote.type()) {
// This should never happen.
@@ -578,7 +538,7 @@
mNoteId = mAgendaUtil->addEntry(mModifiedNote);
if (mNoteId) {
status = true;
- HbNotificationDialog::launchDialog(
+ showNotification(
hbTrId("txt_notes_dpopinfo_new_todo_note_saved"));
}
}
@@ -606,14 +566,13 @@
status = mAgendaUtil->updateEntry(mModifiedNote);
mNoteId = mModifiedNote.id();
if (status) {
- HbNotificationDialog::launchDialog(
+ showNotification(
hbTrId("txt_notes_dpopinfo_todo_note_saved"));
}
}
}
}
- qDebug() << "notes: NotesEditorPrivate::saveTodo <--";
return status;
}
@@ -624,7 +583,6 @@
*/
void NotesEditorPrivate::editingCompleted(bool status)
{
- qDebug() << "notes: NotesEditorPrivate::editingCompleted -->";
if(mNoteEditor) {
mNoteEditor->deleteLater();
@@ -634,7 +592,6 @@
}
emit q_ptr->editingCompleted(status);
- qDebug() << "notes: NotesEditorPrivate::editingCompleted <--";
}
/*!
@@ -644,8 +601,6 @@
*/
bool NotesEditorPrivate::isNoteEdited()
{
- qDebug() << "notes: NotesEditorPrivate::isNoteEdited -->";
- qDebug() << "notes: NotesEditorPrivate::isNoteEdited <--";
if (mModifiedNote.description().compare(mOriginalNote.description())) {
return ETrue;
@@ -664,8 +619,6 @@
*/
bool NotesEditorPrivate::isTodoEdited()
{
- qDebug() << "notes: NotesEditorPrivate::isTodoEdited -->";
- qDebug() << "notes: NotesEditorPrivate::isTodoEdited <--";
if ( mModifiedNote.summary().compare(mOriginalNote.summary())) {
return ETrue;
@@ -688,4 +641,18 @@
return EFalse;
}
+
+/*!
+ Shows the save/update notification.
+
+ \param text Text to be shown as notification.
+ */
+void NotesEditorPrivate::showNotification(QString text)
+{
+ HbNotificationDialog *notificationDialog = new HbNotificationDialog();
+ notificationDialog->setTimeout(
+ HbNotificationDialog::ConfirmationNoteTimeout);
+ notificationDialog->setTitle(text);
+ notificationDialog->show();
+}
// End of file --Don't remove this.
--- a/notes/notesui/noteseditor/src/notesnoteeditor.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/noteseditor/src/notesnoteeditor.cpp Mon May 03 12:30:32 2010 +0300
@@ -18,7 +18,6 @@
// System includes
#include <QObject>
-#include <QDebug>
#include <QDateTime>
#include <HbTextEdit>
#include <HbView>
@@ -30,7 +29,7 @@
#include <HbExtendedLocale>
#include <HbMenu>
#include <CalenEditor>
-#include <HbStyleLoader>
+#include <HbMessageBox>
// User includes
#include "notesnoteeditor.h"
@@ -73,9 +72,6 @@
mDocLoader->load(NOTES_EDITOR_VIEW_DOCML, &success);
Q_ASSERT(success);
- // Load the css file for displaying background lines.
- HbStyleLoader::registerFilePath(NOTES_EDITOR_STYLE_PATH);
-
// Now load the view and the contents.
mEditor = static_cast<HbView *> (
mDocLoader->findWidget(NOTES_EDITOR_VIEW_OBJECT));
@@ -98,9 +94,6 @@
mTextEditor, SIGNAL(contentsChanged()),
this, SLOT(updateNoteText()));
- // Set the object name
- mTextEditor->setObjectName(NOTES_EDITOR_TEXTEDIT_OBJECT);
-
// Take the menu actions.
mDiscardChangesAction = static_cast<HbAction *> (
mDocLoader->findObject(NOTES_EDITOR_DISCARD_CHANGES_ACTION));
@@ -111,6 +104,15 @@
mDiscardChangesAction, SIGNAL(triggered()),
this, SLOT(handleDiscardChangesAction()));
+ mNewNoteAction = static_cast<HbAction *> (
+ mDocLoader->findObject(NOTES_EDITOR_NEWNOTE_ACTION));
+ if (!mNewNoteAction) {
+ qFatal("Unable to get object from document");
+ }
+ connect(
+ mNewNoteAction, SIGNAL(triggered()),
+ this, SLOT(handleNewNoteAction()));
+
mMarkToDoAction = static_cast<HbAction *> (
mDocLoader->findObject(NOTES_EDITOR_MARKTODO_ACTION));
if (!mMarkToDoAction) {
@@ -154,14 +156,7 @@
qFatal("Unable to get widget from document");
}
- // Get the modification date text.
- mModificationDateLabel = static_cast<HbLabel *> (
- mDocLoader->findWidget(NOTES_EDITOR_MODIFICATION_LABEL));
- if (!mModificationDateLabel) {
- qFatal("Unable to get widget from document");
- }
-
- // Get the modification date text.
+ // Get favorite icon
mFavouriteIcon = static_cast<HbLabel *> (
mDocLoader->findWidget(NOTES_EDITOR_FAVOURITE_ICON));
if (!mFavouriteIcon) {
@@ -193,16 +188,6 @@
if (!mOwner->mNewEntry) {
mTextEditor->setPlainText(mOwner->mModifiedNote.description());
- QString modificationDate = mOwner->
- mModifiedNote.lastModifiedDateTime().date().toString("dd/MM/yyyy");
-
- modificationDate.append(
- " "+
- mOwner->mModifiedNote.
- lastModifiedDateTime().time().toString("hh:mm ap"));
-
- mModificationDateLabel->setPlainText(modificationDate);
-
QString iconName;
if (mOwner->mModifiedNote.favourite()) {
iconName = "qtg_small_favorite";
@@ -218,17 +203,13 @@
mFavouriteIcon->setIcon(HbIcon(iconName));
+ // Insert new note action.
+ HbMenu *viewMenu = mEditor->menu();
+ viewMenu->insertAction(mMarkToDoAction, mNewNoteAction);
+
// Set the sub heading
mViewHeading->setPlainText(hbTrId("txt_notes_subhead_note"));
} else {
- QString creationDateTime =
- (QDate::currentDate()).toString("dd/MM/yyyy");
-
- creationDateTime.append(
- " "+ (QTime::currentTime()).toString("hh:mm ap"));
-
- mModificationDateLabel->setPlainText(creationDateTime);
-
mFavouriteIcon->setIcon(HbIcon(""));
// For handling the edit of note when text is given as input
@@ -236,7 +217,6 @@
// Set the sub heading
mViewHeading->setPlainText(hbTrId("txt_notes_subhead_new_note"));
- mModificationDateLabel->setPlainText(tr(" "));
// Dim the toolbar icons till text insertion.
mDeleteAction->setEnabled(false);
@@ -315,15 +295,19 @@
*/
void NotesNoteEditor::deleteNote()
{
- mOwner->deleteNote();
+ if (showDeleteConfirmationQuery()) {
+ mOwner->deleteNote();
- HbMainWindow *window = hbInstance->allMainWindows().first();
- bool status = false;
+ HbMainWindow *window = hbInstance->allMainWindows().first();
+ bool status = false;
- // Now close the editor.
- window->removeView(mEditor);
+ // Now close the editor.
+ window->removeView(mEditor);
- mOwner->editingCompleted(status);
+ mOwner->editingCompleted(status);
+
+ }
+
}
/*!
@@ -358,7 +342,12 @@
// existing entry
if (!mOwner->mNewEntry && !mDiscardChangesActionActive) {
HbMenu *viewMenu = mEditor->menu();
- viewMenu->insertAction(mMarkToDoAction, mDiscardChangesAction);
+ if (mNewNoteAction) {
+ viewMenu->insertAction(mNewNoteAction, mDiscardChangesAction);
+ } else {
+ viewMenu->insertAction(mMarkToDoAction, mDiscardChangesAction);
+ }
+
mDiscardChangesActionActive = true;
}
}
@@ -423,12 +412,8 @@
*/
void NotesNoteEditor::handleDiscardChangesAction()
{
- qDebug() <<"notes: NotesNoteEditor::handleDiscardChangesAction -->";
-
// Close the note editor
close();
-
- qDebug() <<"notes: NotesNoteEditor::handleDiscardChangesAction <--";
}
/*!
@@ -457,7 +442,8 @@
QString currentDateStr = currentDate.toString("dd/mm/yyyy");
- mCalenEditor->create(calendarEntry,1);
+ mCalenEditor->create(
+ calendarEntry, 1, CalenEditor::TypeAppointment);
}
@@ -503,4 +489,69 @@
mCalenEditor->deleteLater();
}
+/*!
+ Handles creation of new note signal
+ */
+void NotesNoteEditor::handleNewNoteAction()
+{
+ if (mOwner->isNoteEdited()) {
+ mOwner->mAgendaUtil->updateEntry(mOwner->mModifiedNote);
+ }
+
+ AgendaEntry entry;
+ entry.setType(AgendaEntry::TypeNote);
+
+ mOwner->mModifiedNote = mOwner->mOriginalNote = entry;
+ mOwner->mNewEntry = true;
+
+ mFavouriteIcon->setIcon(HbIcon(""));
+
+ // For handling the edit of note when text is given as input
+ mTextEditor->setPlainText(mOwner->mModifiedNote.description());
+
+ // Set the sub heading
+ mViewHeading->setPlainText(hbTrId("txt_notes_subhead_new_note"));
+
+ // Dim the toolbar icons till text insertion.
+ mDeleteAction->setEnabled(false);
+ mAddToCalendarAction->setEnabled(false);
+
+ mIgnoreFirstContentChange = false;
+
+ if (mDiscardChangesActionActive) {
+ mEditor->menu()->removeAction(mDiscardChangesAction);
+ mDiscardChangesActionActive = false;
+ }
+ mEditor->menu()->removeAction(mNewNoteAction);
+}
+
+/* !
+ Show the delete confirmation query.
+ */
+bool NotesNoteEditor::showDeleteConfirmationQuery()
+{
+ bool retValue(false);
+
+ HbMessageBox confirmationQuery(HbMessageBox::MessageTypeQuestion);
+ confirmationQuery.setDismissPolicy(HbDialog::NoDismiss);
+ confirmationQuery.setTimeout(HbDialog::NoTimeout);
+ confirmationQuery.setIconVisible(true);
+
+ QString displayText;
+ displayText = displayText.append(hbTrId("txt_notes_info_delete_note"));
+
+ confirmationQuery.setText(displayText);
+
+ confirmationQuery.setPrimaryAction(new HbAction(
+ hbTrId("txt_notes_button_dialog_delete"), &confirmationQuery));
+ confirmationQuery.setSecondaryAction(new HbAction(
+ hbTrId("txt_common_button_cancel"), &confirmationQuery));
+ HbAction *selected = confirmationQuery.exec();
+ if (selected == confirmationQuery.primaryAction()) {
+ retValue = true;
+ }
+
+ return retValue;
+}
+
// End of file --Don't remove this.
--- a/notes/notesui/noteseditor/src/notestodoeditor.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/noteseditor/src/notestodoeditor.cpp Mon May 03 12:30:32 2010 +0300
@@ -18,7 +18,6 @@
// System includes
#include <QDateTime>
-#include <QDebug>
#include <HbApplication>
#include <HbLineEdit>
#include <HbMainWindow>
@@ -39,6 +38,7 @@
#include <HbCheckbox>
#include <HbDialog>
#include <HbGroupBox>
+#include <HbMessageBox>
// User includes
#include "notestodoeditor.h"
@@ -70,8 +70,6 @@
mDescriptionItemIndex(5),
mDiscardChangesActive(false)
{
- qDebug() <<"notes: NotesTodoEditor::NotesTodoEditor -->";
-
mDocLoader = new NotesEditorDocLoader;
Q_ASSERT(mDocLoader);
@@ -104,8 +102,6 @@
QList <HbAbstractViewItem*> prototypes = mDataForm->itemPrototypes();
prototypes.append(customItem);
mDataForm->setItemPrototypes(prototypes);
-
- qDebug() <<"notes: NotesTodoEditor::NotesTodoEditor <--";
}
/*!
@@ -113,16 +109,12 @@
*/
NotesTodoEditor::~NotesTodoEditor()
{
- qDebug() <<"notes: NotesTodoEditor::~NotesTodoEditor -->";
-
if (mFormModel) {
delete mFormModel;
}
mDocLoader->reset();
delete mDocLoader;
-
- qDebug() <<"notes: NotesTodoEditor::~NotesTodoEditor <--";
}
/*!
@@ -130,12 +122,8 @@
*/
void NotesTodoEditor::updateSummaryText(const QString &text)
{
- qDebug() <<"notes: NotesTodoEditor::updateSummaryText -->";
-
mOwner->mModifiedNote.setSummary(text);
addDiscardChangesAction();
-
- qDebug() <<"notes: NotesTodoEditor::updateSummaryText <--";
}
/*!
@@ -145,12 +133,8 @@
*/
void NotesTodoEditor::updatePriority(int index)
{
- qDebug() <<"notes: NotesTodoEditor::updatePriority -->";
-
mOwner->mModifiedNote.setPriority(index + 1);
addDiscardChangesAction();
-
- qDebug() <<"notes: NotesTodoEditor::updatePriority <--";
}
/*!
@@ -160,8 +144,6 @@
*/
void NotesTodoEditor::updateDescription(const QString &text)
{
- qDebug() <<"notes: NotesTodoEditor::updateDescription -->";
-
mOwner->mModifiedNote.setDescription(text);
addDiscardChangesAction();
}
@@ -174,8 +156,6 @@
*/
bool NotesTodoEditor::validAlarmSet()
{
- qDebug() << "notes: NotesTodoEditor::updateAlarm -->";
-
bool alarmSet(true);
// Sanity Check.
@@ -252,8 +232,6 @@
mOwner->mModifiedNote.setAlarm(dummyAlarm);
return alarmSet;
}
-
- qDebug() << "notes: NotesTodoEditor::updateAlarm <--";
return alarmSet;
}
@@ -282,8 +260,6 @@
*/
void NotesTodoEditor::execute(AgendaEntry entry)
{
- qDebug() <<"notes: NotesTodoEditor::execute -->";
-
Q_UNUSED(entry)
HbMenu *viewMenu = mEditor->menu();
@@ -327,8 +303,6 @@
this, SLOT(saveTodo()));
window->addView(mEditor);
window->setCurrentView(mEditor);
-
- qDebug() <<"notes: NotesTodoEditor::execute <--";
}
/*!
@@ -338,20 +312,14 @@
*/
void NotesTodoEditor::create(AgendaEntry entry)
{
- qDebug() <<"notes: NotesTodoEditor::execute -->";
-
Q_UNUSED(entry)
-
- qDebug() <<"notes: NotesTodoEditor::execute <--";
}
/*!
Initializes the data form model.
*/
void NotesTodoEditor::initFormModel()
{
- qDebug() <<"notes: NotesTodoEditor::initFormModel -->";
-
// Delete the model if already there.
if (mFormModel) {
delete mFormModel;
@@ -373,8 +341,6 @@
// Set the model to the form.
mDataForm->setModel(mFormModel);
-
- qDebug() <<"notes: NotesTodoEditor::initFormModel <--";
}
/*!
@@ -382,8 +348,6 @@
*/
void NotesTodoEditor::insertSubjectItem()
{
- qDebug() <<"notes: NotesTodoEditor::insertSubjectItem -->";
-
mSubjectItem = mFormModel->appendDataFormItem(
HbDataFormModelItem::TextItem,
QString(""), mFormModel->invisibleRootItem());
@@ -394,8 +358,6 @@
mDataForm->addConnection(
mSubjectItem , SIGNAL(textChanged(const QString &)),
this, SLOT(updateSummaryText(const QString &)));
-
- qDebug() <<"notes: NotesTodoEditor::insertSubjectItem <--";
}
/*!
@@ -403,8 +365,6 @@
*/
void NotesTodoEditor::insertDueDateItem()
{
- qDebug() <<"notes: NotesTodoEditor::insertDueDateItem -->";
-
HbDataFormModelItem::DataItemType itemType =
static_cast<HbDataFormModelItem::DataItemType>
(HbDataFormModelItem::CustomItemBase + DueDateItemOffset);
@@ -426,16 +386,12 @@
mOwner->dateFormatString());
}
mDueDateItem->setContentWidgetData("text",dueDateText);
-
- qDebug() <<"notes: NotesTodoEditor::insertDueDateItem <--";
}
/*!
Inserts the reminder enabler item into the model.
*/
void NotesTodoEditor::insertReminderToggle()
{
- qDebug() << "notes: NotesTodoEditor::insertReminderToggle -->";
-
mReminderEnabler = mFormModel->appendDataFormItem(
HbDataFormModelItem::CheckBoxItem,
tr(""), mFormModel->invisibleRootItem());
@@ -452,8 +408,6 @@
mDataForm->addConnection(
mReminderEnabler, SIGNAL(stateChanged(int)),
this, SLOT(handleReminderItem(int)));
-
- qDebug() << "notes: NotesTodoEditor::insertReminderToggle <--";
}
/*!
@@ -537,8 +491,6 @@
*/
void NotesTodoEditor::insertPriorityItem()
{
- qDebug() <<"notes: NotesTodoEditor::insertPriorityItem -->";
-
mPriorityItem = mFormModel->appendDataFormItem(
HbDataFormModelItem::ComboBoxItem,
hbTrId("txt_notes_setlabel_priority"),
@@ -561,8 +513,6 @@
mDataForm->addConnection(
mPriorityItem, SIGNAL(currentIndexChanged(int)),
this, SLOT(updatePriority(int)));
-
- qDebug() <<"notes: NotesTodoEditor::insertPriorityItem <--";
}
/*!
@@ -570,8 +520,6 @@
*/
void NotesTodoEditor::insertDescriptionItem()
{
- qDebug() <<"notes: NotesTodoEditor::insertDescriptionItem -->";
-
mDescriptionItem = mFormModel->appendDataFormItem(
HbDataFormModelItem::TextItem,
hbTrId("txt_notes_formlabel_val_description"),
@@ -586,8 +534,6 @@
mDataForm->addConnection(
mDescriptionItem, SIGNAL(textChanged(const QString)),
this, SLOT(updateDescription(const QString)));
-
- qDebug() <<"notes: NotesTodoEditor::insertDescriptionItem <--";
}
/*!
@@ -595,14 +541,10 @@
*/
void NotesTodoEditor::addMenu()
{
- qDebug() <<"notes: NotesTodoEditor::addMenu -->";
-
mDeleteAction = mEditor->menu()->addAction(hbTrId("txt_common_opt_delete"));
connect(
mDeleteAction, SIGNAL(triggered()),
this, SLOT(handleDeleteAction()));
-
- qDebug() <<"notes: NotesTodoEditor::addMenu <--";
}
/*!
@@ -610,8 +552,6 @@
*/
void NotesTodoEditor::saveTodo()
{
- qDebug() <<"notes: NotesTodoEditor::saveTodo -->";
-
// Here we check if the user has set the appropriate alarm time.
// And save only if its fine to do so. Else we note a discrete notification
// asking the user to check for the alarm time.
@@ -639,13 +579,10 @@
*/
void NotesTodoEditor::close()
{
- qDebug() <<"notes: NotesTodoEditor::close -->";
-
HbMainWindow *window = hbInstance->allMainWindows().first();
// Now close the editor.
window->removeView(mEditor);
- qDebug() <<"notes: NotesTodoEditor::close <--";
}
/*!
@@ -654,8 +591,6 @@
*/
void NotesTodoEditor::handleAddDescriptionAction()
{
- qDebug() <<"notes: NotesTodoEditor::handleAddDescriptionAction -->";
-
// Now we add the description item here.
insertDescriptionItem();
@@ -669,8 +604,6 @@
connect(
mDescriptionAction, SIGNAL(triggered()),
this, SLOT(handleRemoveDescriptionAction()));
-
- qDebug() <<"notes: NotesTodoEditor::handleAddDescriptionAction <--";
}
/*!
@@ -679,8 +612,6 @@
*/
void NotesTodoEditor::handleRemoveDescriptionAction()
{
- qDebug() <<"notes: NotesTodoEditor::handleRemoveDescriptionAction -->";
-
// Here we firstset the description text in the entry to empty.
mOwner->mModifiedNote.setDescription("");
@@ -698,7 +629,6 @@
mDescriptionAction, SIGNAL(triggered()),
this, SLOT(handleAddDescriptionAction()));
- qDebug() <<"notes: NotesTodoEditor::handleRemoveDescriptionAction <--";
}
/*!
@@ -706,15 +636,14 @@
*/
void NotesTodoEditor::handleDeleteAction()
{
- qDebug() <<"notes: NotesTodoEditor::handleDeleteAction -->";
-
+ if (showDeleteConfirmationQuery()) {
// Delete the to-do entry.
mOwner->deleteNote();
// Close the to-do editor.
close();
+ }
- qDebug() <<"notes: NotesTodoEditor::handleDeleteAction <--";
}
/*!
@@ -722,12 +651,37 @@
*/
void NotesTodoEditor::handleDiscardChangesAction()
{
- qDebug() <<"notes: NotesTodoEditor::handleDiscardChangesAction -->";
-
// Close the to-do editor
close();
- qDebug() <<"notes: NotesTodoEditor::handleDiscardChangesAction <--";
}
+/* !
+ Show the delete confirmation query.
+ */
+bool NotesTodoEditor::showDeleteConfirmationQuery()
+{
+ bool retValue(false);
+
+ HbMessageBox confirmationQuery(HbMessageBox::MessageTypeQuestion);
+ confirmationQuery.setDismissPolicy(HbDialog::NoDismiss);
+ confirmationQuery.setTimeout(HbDialog::NoTimeout);
+ confirmationQuery.setIconVisible(true);
+
+ QString displayText;
+ displayText = displayText.append(hbTrId("txt_notes_info_delete_todo_note"));
+
+ confirmationQuery.setText(displayText);
+
+ confirmationQuery.setPrimaryAction(new HbAction(
+ hbTrId("txt_notes_button_dialog_delete"), &confirmationQuery));
+ confirmationQuery.setSecondaryAction(new HbAction(
+ hbTrId("txt_common_button_cancel"), &confirmationQuery));
+ HbAction *selected = confirmationQuery.exec();
+ if (selected == confirmationQuery.primaryAction()) {
+ retValue = true;
+ }
+
+ return retValue;
+}
// End of file --Don't remove this.
--- a/notes/notesui/noteseditor/src/notestodoeditorcustomitem.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/noteseditor/src/notestodoeditorcustomitem.cpp Mon May 03 12:30:32 2010 +0300
@@ -19,7 +19,6 @@
// System inlcudes.
#include <QTime>
#include <QGraphicsLinearLayout>
-#include <QDebug>
#include <HbExtendedLocale>
#include <HbLabel>
#include <HbDateTimePicker>
@@ -71,8 +70,6 @@
*/
HbAbstractViewItem* NotesTodoEditorCustomItem::createItem()
{
- qDebug() << "notes: NotesTodoEditorCustomItem::createItem <-->";
-
return new NotesTodoEditorCustomItem(*this);
}
@@ -83,8 +80,6 @@
*/
HbWidget* NotesTodoEditorCustomItem::createCustomWidget()
{
- qDebug() << "notes: NotesTodoEditorCustomItem::createCustomWidget -->";
-
HbDataFormModelItem::DataItemType itemType =
static_cast<HbDataFormModelItem::DataItemType>(modelIndex()
.data(HbDataFormModelItem::ItemTypeRole).toInt());
@@ -116,15 +111,10 @@
connect(
mDateWidget, SIGNAL(clicked()),
this, SLOT(launchDatePicker()));
-
- qDebug() <<
- "notes: NotesTodoEditorCustomItem::createCustomWidget <--";
return widget;
}
case HbDataFormModelItem::CustomItemBase + ItemOffsetUnKnown:
default:
- qDebug() <<
- "notes: NotesTodoEditorCustomItem::createCustomWidget <--";
return 0;
}
}
@@ -183,8 +173,6 @@
*/
void NotesTodoEditorCustomItem::launchTimePicker()
{
- qDebug() << "notes: NotesTodoEditorCustomItem::launchTimePicker -->";
-
if (mTimePickerDialog) {
delete mTimePickerDialog;
}
@@ -199,11 +187,13 @@
mTimePickerDialog->setHeadingWidget(timeLabel);
// Create the tumbler.
HbDateTimePicker *timePicker = new HbDateTimePicker(mTimePickerDialog);
-
+
+ // Set the format for time picker.
+ timePicker->setDisplayFormat(mNotesTodoeditorPvt->timeFormatString());
+ // Set the time needs to be displayed in time picker.
timePicker->setTime(QTime::fromString(mTimeWidget->text(),
mNotesTodoeditorPvt->timeFormatString()));
- timePicker->setDisplayFormat(mNotesTodoeditorPvt->timeFormatString());
// Set the tumbler as the content widget.
mTimePickerDialog->setContentWidget(timePicker);
@@ -222,8 +212,6 @@
this, SLOT(handleCancelAction()));
mTimePickerDialog->exec();
-
- qDebug() << "notes: NotesTodoEditorCustomItem::launchTimePicker <--";
}
/*!
@@ -231,8 +219,6 @@
*/
void NotesTodoEditorCustomItem::launchDatePicker()
{
- qDebug() << "notes: NotesTodoEditorCustomItem::launcDatePicker -->";
-
if (mDatePickerDialog) {
delete mDatePickerDialog;
}
@@ -252,11 +238,14 @@
datePicker->setDateRange(QDate::fromString("01/01/1900",
mNotesTodoeditorPvt->dateFormatString()), QDate::fromString("31/12/2100",
mNotesTodoeditorPvt->dateFormatString()));
-
+
+ // Set the date format in date picker.
+ datePicker->setDisplayFormat(mNotesTodoeditorPvt->dateFormatString());
+ // Set the date needs to be in focus in date picker.
datePicker->setDate(QDate::fromString(mDateWidget->text(),
mNotesTodoeditorPvt->dateFormatString()));
- datePicker->setDisplayFormat(mNotesTodoeditorPvt->dateFormatString());
+
// Set the tumbler as the content widget.
mDatePickerDialog->setContentWidget(datePicker);
@@ -274,16 +263,12 @@
this, SLOT(handleCancelAction()));
mDatePickerDialog->exec();
-
- qDebug() << "notes: NotesTodoEditorCustomItem::launchDatePicker <--";
}
/*!
Handles the ok action of date/time picker dialog.
*/
void NotesTodoEditorCustomItem::handleOkAction()
{
- qDebug() << "notes: NotesTodoEditorCustomItem::handleOkAction -->";
-
HbExtendedLocale locale = HbExtendedLocale::system();
HbDataFormModelItem *modelItem =
@@ -356,16 +341,12 @@
}
handleCancelAction();
-
- qDebug() << "notes: NotesTodoEditorCustomItem::handleOkAction <--";
}
/*!
Handles the ok action of date/time picker dialog.
*/
void NotesTodoEditorCustomItem::handleCancelAction()
{
- qDebug() << "notes: NotesTodoEditorCustomItem::handleCancelAction -->";
-
// Close the dialog.
if (mDatePickerDialog) {
mDatePickerDialog->close();
@@ -374,8 +355,6 @@
mTimePickerDialog->close();
mTimePickerDialog->deleteLater();
}
-
- qDebug() << "notes: NotesTodoEditorCustomItem::handleCancelAction <--";
}
/*
@@ -383,8 +362,6 @@
*/
void NotesTodoEditorCustomItem::selectDueDate()
{
- qDebug() <<"notes: NotesTodoEditorCustomItem::selectDueDate -->";
-
if( mDueDateItem->isDown()) {
mDueDateItem->setDown(false);
return;
@@ -407,12 +384,13 @@
datePicker->setDateRange(QDate::fromString("01/01/1900",
mNotesTodoeditorPvt->dateFormatString()), QDate::fromString("31/12/2100",
mNotesTodoeditorPvt->dateFormatString()));
-
+
+ // Set the format of date picker.
+ datePicker->setDisplayFormat(mNotesTodoeditorPvt->dateFormatString());
+ // Set the date needs to be displayed in datepicker.
datePicker->setDate(QDate::fromString(mDueDateItem->text(),
mNotesTodoeditorPvt->dateFormatString()));
- datePicker->setDisplayFormat(mNotesTodoeditorPvt->dateFormatString());
-
// Set the heading text
HbLabel *label = new HbLabel(hbTrId("txt_notes_formlabel_due_date"));
mDatePickerDialog->setHeadingWidget(label);
@@ -432,8 +410,6 @@
mDatePickerDialog->setContentWidget(datePicker);
mDatePickerDialog->exec();
-
- qDebug() <<"notes: NotesTodoEditorCustomItem::selectDueDate <--";
}
// End of file --Don't delete.
--- a/notes/notesui/notesmodel/inc/notesmodel.h Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/notesmodel/inc/notesmodel.h Mon May 03 12:30:32 2010 +0300
@@ -31,6 +31,7 @@
class QAbstractItemModel;
class QStandardItemModel;
class AgendaUtil;
+class AgendaEntry;
NOTES_TEST_CLASS(TestNotesModel)
@@ -57,12 +58,14 @@
private:
void modifyEntryInModel(ulong id, int row);
- void appendNotesToModel(QList<ulong> &ids);
- void appendInCompTodosToModel(QList<ulong> &ids);
- void appendCompTodosToModel(QList<ulong> &ids);
+ void appendNotesToModel(QList<AgendaEntry> &agendaEntryList);
+ void appendInCompTodosToModel(QList<AgendaEntry> &agendaEntryList);
+ void appendCompTodosToModel(QList<AgendaEntry> &agendaEntryList);
bool insertNoteToModel(QModelIndex &index, ulong id);
bool insertInCompTodoToModel(QModelIndex &index, ulong id);
bool insertCompTodoToModel(QModelIndex &index, ulong id);
+ QString dateFormatString();
+ QString timeFormatString();
private:
QStandardItemModel *mSourceModel;
--- a/notes/notesui/notesmodel/src/notesmodel.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/notesmodel/src/notesmodel.cpp Mon May 03 12:30:32 2010 +0300
@@ -17,12 +17,12 @@
*/
// System includes
-#include <QDebug>
#include <QAbstractItemModel>
#include <QStandardItemModel>
#include <QTimer>
#include <QDateTime>
#include <HbIcon>
+#include <HbExtendedLocale>
// User includes
#include "notesmodel.h"
@@ -48,8 +48,6 @@
:QObject(parent),
mAgendaUtil(agendaUtil)
{
- qDebug() << "notes: NotesModel::NotesModel -->";
-
// Construct the source model.
mSourceModel = new QStandardItemModel(0, 1, this);
@@ -72,8 +70,6 @@
// Populate the model in a different thread.
QTimer::singleShot(1, this, SLOT(populateSourceModel()));
-
- qDebug() << "notes: NotesModel::NotesModel <--";
}
/*!
@@ -81,11 +77,7 @@
*/
NotesModel::~NotesModel()
{
- qDebug() << "notes: NotesModel::~NotesModel -->";
-
// Nothing yet.
-
- qDebug() << "notes: NotesModel::~NotesModel <--";
}
/*!
@@ -96,12 +88,7 @@
*/
QAbstractItemModel *NotesModel::sourceModel()
{
- qDebug() << "notes: NotesModel::sourceModel -->";
-
Q_ASSERT(mSourceModel);
-
- qDebug() << "notes: NotesModel::sourceModel <--";
-
return mSourceModel;
}
@@ -110,8 +97,6 @@
*/
void NotesModel::populateSourceModel()
{
- qDebug() << "notes: NotesModel::populateSourceModel -->";
-
// Clear the model if it has any data already
mSourceModel->clear();
mSourceModel->setColumnCount(1);
@@ -120,29 +105,27 @@
// The order of appending the items to the model is:
// 1. Notes, 2. Incompleted to-dos, 3. Completed to-dos.
// First get only the notes and populate the model.
- QList<ulong> entryIds = mAgendaUtil->entryIds(
+ QList<AgendaEntry> agendaEntyList = mAgendaUtil->fetchAllEntries(
(AgendaUtil::FilterFlags) (AgendaUtil::IncludeNotes));
// Add the notes to the model.
- appendNotesToModel(entryIds);
+ appendNotesToModel(agendaEntyList);
// Get the incompleted to-dos.
- entryIds.clear();
- entryIds = mAgendaUtil->entryIds(
+ agendaEntyList.clear();
+ agendaEntyList = mAgendaUtil->fetchAllEntries(
(AgendaUtil::FilterFlags) (AgendaUtil::IncludeIncompletedTodos));
// Add the incompleted to-dos to the model.
- appendInCompTodosToModel(entryIds);
+ appendInCompTodosToModel(agendaEntyList);
// Get the completed to-dos.
- entryIds.clear();
- entryIds = mAgendaUtil->entryIds(
+ agendaEntyList.clear();
+ agendaEntyList = mAgendaUtil->fetchAllEntries(
(AgendaUtil::FilterFlags) (AgendaUtil::IncludeCompletedTodos));
// Add the completed to-dos to the model.
- appendCompTodosToModel(entryIds);
-
- qDebug() << "notes: NotesModel::populateSourceModel <--";
+ appendCompTodosToModel(agendaEntyList);
}
/*!
@@ -154,8 +137,6 @@
*/
void NotesModel::updateSourceModel(ulong id)
{
- qDebug() << "notes: NotesModel::updateSourceModel -->";
-
AgendaEntry entry = mAgendaUtil->fetchById(id);
if (entry.isNull()) {
return;
@@ -251,7 +232,6 @@
}
}
}
- qDebug() << "notes: NotesModel::updateSourceModel <--";
}
/*!
@@ -262,13 +242,9 @@
*/
void NotesModel::populateSourceModel(QList<ulong> ids)
{
- qDebug() << "notes: NotesModel::populateSourceModel(ids) -->";
-
Q_UNUSED(ids)
QTimer::singleShot(1, this, SLOT(populateSourceModel()));
-
- qDebug() << "notes: NotesModel::populateSourceModel(ids) <--";
}
/*!
@@ -279,8 +255,6 @@
*/
void NotesModel::addEntryToModel(ulong id)
{
- qDebug() << "notes: NotesModel::addEntryToModel -->";
-
// We have different logic for adding a note or an incompleted to-do or a
// completed to-do.
AgendaEntry entry = mAgendaUtil->fetchById(id);
@@ -309,8 +283,6 @@
if (notify) {
emit rowAdded(indexToNotify);
}
-
- qDebug() << "notes: NotesModel::addEntryToModel <--";
}
/*!
@@ -361,8 +333,6 @@
*/
void NotesModel::modifyEntryInModel(ulong id, int row)
{
- qDebug() << "notes: NotesModel::modifyEntryInModel -->";
-
// Get the model index.
QModelIndex modelIndex = mSourceModel->index(row, 0);
Q_ASSERT(modelIndex.isValid());
@@ -380,14 +350,28 @@
// Set the display data to the index.
if (AgendaEntry::TypeNote == entry.type()) {
+ QString displayText;
+ QString dateTimeText;
+ QString modifiedText;
+
// Read modification time from agenda entry
- QString displayText;
- QString timeText(qtTrId("txt_notes_dblist_val_modified_on_1_2"));
- QString modifiedDateText =
- entry.startTime().date().toString("dd/MM/yyyy");
- QString modifiedTimeText =
- entry.startTime().time().toString("hh:mm ap");
- displayText = timeText.arg(modifiedDateText,modifiedTimeText);
+ QDateTime entryStartDateTime = entry.startTime();
+
+ // If modified on today,show only modified time otherwise show the
+ // modified date.
+ if ((QDate::currentDate()) == entryStartDateTime.date() ) {
+ dateTimeText =
+ hbTrId("txt_notes_dblist_note_modified_at_time");
+ modifiedText =
+ entryStartDateTime.time().toString(timeFormatString());
+ } else {
+ dateTimeText =
+ hbTrId("txt_notes_dblist_note_modified_on_date");
+ modifiedText =
+ entryStartDateTime.date().toString(dateFormatString());
+ }
+
+ displayText = dateTimeText.arg(modifiedText);
QStringList stringList;
stringList << entry.description().left(15) << displayText;
@@ -397,24 +381,29 @@
// Set the favourite icon.
if (entry.favourite()) {
QList<QVariant> iconList;
- iconList.append(QVariant(QVariant::Invalid));
+ iconList.append(HbIcon("qtg_small_note"));
iconList.append(HbIcon("qtg_mono_favourites"));
mSourceModel->setData(modelIndex, iconList, Qt::DecorationRole);
} else {
QList<QVariant> iconList;
- iconList.append(QVariant(QVariant::Invalid));
+ iconList.append(HbIcon("qtg_small_note"));
iconList.append(QVariant(QVariant::Invalid));
mSourceModel->setData(modelIndex, iconList, Qt::DecorationRole);
}
} else if (AgendaEntry::TypeTodo == entry.type()) {
QStringList stringList;
- stringList << entry.summary();
+ if (entry.summary().isEmpty()) {
+ // If empty set unnamed text
+ stringList<<hbTrId("txt_notes_dblist_unnamed");
+ } else {
+ stringList << entry.summary();
+ }
if (AgendaEntry::TodoNeedsAction == entry.status()) {
// Read due date from agenda entry
QString displayText;
QString timeText(hbTrId("txt_notes_dblist_val_due_on_1"));
QString dueDateText =
- entry.startTime().toString("dd/MM/yyyy");
+ entry.startTime().toString(dateFormatString());
displayText = timeText.arg(dueDateText);
stringList << displayText;
}
@@ -430,17 +419,19 @@
iconList.append(HbIcon("qtg_small_todo"));
}
- // Set the alarm icon if reminder is set.
- if (!entry.alarm().isNull()) {
+ if (1 == entry.priority()) {
+ // Set the High Priority icon if priority is high.
+ iconList.append(HbIcon("qtg_small_priority_high"));
+ } else if (!entry.alarm().isNull()) {
+ // Set the alarm if set.
iconList.append(HbIcon("qtg_mono_alarm"));
} else {
iconList.append(QVariant(QVariant::Invalid));
}
+
// Set the icons.
mSourceModel->setData(modelIndex, iconList, Qt::DecorationRole);
}
-
- qDebug() << "notes: NotesModel::modifyEntryInModel <--";
}
/*!
@@ -448,18 +439,17 @@
\param ids QList of uids containing the notes.
*/
-void NotesModel::appendNotesToModel(QList<ulong> &ids)
+void NotesModel::appendNotesToModel(QList<AgendaEntry> &agendaEntryList)
{
- qDebug() << "notes: NotesModel::appendNotesToModel -->";
-
+ int entriesCount = agendaEntryList.count();
// Iterate and add notes to the model.
- mSourceModel->insertRows(mSourceModel->rowCount(), ids.count());
+ mSourceModel->insertRows(mSourceModel->rowCount(), entriesCount);
int rowCount = mSourceModel->rowCount();
- for (int idIter = 0, modelIter = rowCount - ids.count();
- idIter < ids.count(); idIter++, modelIter++) {
- // Fetch the note details.
- ulong id = ids[rowCount - 1 - idIter];
- AgendaEntry entry = mAgendaUtil->fetchById(id);
+ for (int idIter = 0, modelIter = rowCount - entriesCount;
+ idIter < entriesCount; idIter++, modelIter++) {
+
+ // Read the note details.
+ AgendaEntry entry = agendaEntryList[rowCount - 1 - idIter];
if (AgendaEntry::TypeNote != entry.type()) {
continue;
@@ -470,7 +460,7 @@
// Set the note id.
mSourceModel->setData(
- mdlIndex, (qulonglong) id, NotesNamespace::IdRole);
+ mdlIndex, (qulonglong) entry.id(), NotesNamespace::IdRole);
// Set the type of the note.
mSourceModel->setData(
mdlIndex, entry.type(), NotesNamespace::TypeRole);
@@ -481,12 +471,45 @@
// Set the display data now.
// Read modification time from agenda entry
QString displayText;
- QString timeText(hbTrId("txt_notes_dblist_val_modified_on_1_2"));
- QString modifiedDateText =
- entry.lastModifiedDateTime().date().toString("dd/MM/yyyy");
- QString modifiedTimeText =
- entry.lastModifiedDateTime().time().toString("hh:mm ap");
- displayText = timeText.arg(modifiedDateText,modifiedTimeText);
+ QString dateTimeText;
+ QString modifiedText;
+
+ // Show the creation time if entry is not modified.
+ if (entry.dtStamp().isValid()) {
+ QDateTime creationDateTime = entry.dtStamp();
+
+ // If created on today,show only creation time otherwise show the
+ // creation date.
+ if ((QDate::currentDate()) == creationDateTime.date()) {
+ dateTimeText =
+ hbTrId("txt_notes_dblist_note_created_at_time");
+ modifiedText =
+ creationDateTime.time().toString(timeFormatString());
+ } else {
+ dateTimeText =
+ hbTrId("txt_notes_dblist_note_created_on_date");
+ modifiedText =
+ creationDateTime.date().toString(dateFormatString());
+ }
+ } else {
+ QDateTime modifiedDateTime = entry.lastModifiedDateTime();
+
+ // If modified on today,show only modified time otherwise show the
+ // modified date.
+ if ((QDate::currentDate()) == modifiedDateTime.date() ) {
+ dateTimeText =
+ hbTrId("txt_notes_dblist_note_modified_at_time");
+ modifiedText =
+ modifiedDateTime.time().toString(timeFormatString());
+ } else {
+ dateTimeText =
+ hbTrId("txt_notes_dblist_note_modified_on_date");
+ modifiedText =
+ modifiedDateTime.date().toString(dateFormatString());
+ }
+ }
+
+ displayText = dateTimeText.arg(modifiedText);
QStringList stringList;
stringList << entry.description().left(100) << displayText;
@@ -497,12 +520,12 @@
if (entry.favourite()) {
// Set the favourite icon.
QList<QVariant> iconList;
- iconList.append(QVariant(QVariant::Invalid));
+ iconList.append(HbIcon("qtg_small_note"));
iconList.append(HbIcon("qtg_mono_favourites"));
mSourceModel->setData(mdlIndex, iconList, Qt::DecorationRole);
} else {
QList<QVariant> iconList;
- iconList.append(QVariant(QVariant::Invalid));
+ iconList.append(HbIcon("qtg_small_note"));
iconList.append(QVariant(QVariant::Invalid));
mSourceModel->setData(mdlIndex, iconList, Qt::DecorationRole);
}
@@ -510,8 +533,6 @@
// Update the notes count.
mNotesCount++;
}
-
- qDebug() << "notes: NotesModel::appendNotesToModel <--";
}
/*!
@@ -519,18 +540,17 @@
\param ids QList of uids containing the incompleted to-dos.
*/
-void NotesModel::appendInCompTodosToModel(QList<ulong> &ids)
+void NotesModel::appendInCompTodosToModel(QList<AgendaEntry> &agendaEntryList)
{
- qDebug() << "notes: NotesModel::appendInCompTodosToModel -->";
-
+ int entriesCount = agendaEntryList.count();
// Iterate and add incomplete to-do to the model.
- mSourceModel->insertRows(mSourceModel->rowCount(), ids.count());
+ mSourceModel->insertRows(mSourceModel->rowCount(), entriesCount);
int rowCount = mSourceModel->rowCount();
- for (int idIter = 0, modelIter = rowCount - ids.count();
- idIter < ids.count(); idIter++, modelIter++) {
- // Fetch the to-do details.
- ulong id = ids[idIter];
- AgendaEntry entry = mAgendaUtil->fetchById(id);
+ for (int idIter = 0, modelIter = rowCount - entriesCount;
+ idIter < entriesCount; idIter++, modelIter++) {
+
+ // Read the to-do details.
+ AgendaEntry entry = agendaEntryList[idIter];
if (AgendaEntry::TypeTodo != entry.type()) {
continue;
@@ -545,7 +565,7 @@
// Set the to-do id.
mSourceModel->setData(
- mdlIndex, (qulonglong) id, NotesNamespace::IdRole);
+ mdlIndex, (qulonglong) entry.id(), NotesNamespace::IdRole);
// Set the type of the to-do.
mSourceModel->setData(
mdlIndex, entry.type(), NotesNamespace::TypeRole);
@@ -555,13 +575,19 @@
// Set the display data now.
QStringList stringList;
- stringList << entry.summary();
+ if (entry.summary().isEmpty()) {
+ // If empty set unnamed text
+ stringList<<hbTrId("txt_notes_dblist_unnamed");
+ } else {
+ stringList << entry.summary();
+ }
+
if (AgendaEntry::TodoNeedsAction == entry.status()) {
// Read due date from agenda entry
QString displayText;
QString timeText(hbTrId("txt_notes_dblist_val_due_on_1"));
QString dueDateText =
- entry.startTime().toString("dd/MM/yyyy");
+ entry.startTime().toString(dateFormatString());
displayText = timeText.arg(dueDateText);
stringList << displayText;
}
@@ -571,8 +597,11 @@
QList<QVariant> iconList;
iconList.append(HbIcon("qtg_small_todo"));
- // Set the alarm icon if reminder is set.
- if (!entry.alarm().isNull()) {
+ if (1 == entry.priority()) {
+ // Set the High Priority icon if priority is high.
+ iconList.append(HbIcon("qtg_small_priority_high"));
+ } else if (!entry.alarm().isNull()) {
+ // Set the alarm if set.
iconList.append(HbIcon("qtg_mono_alarm"));
} else {
iconList.append(QVariant(QVariant::Invalid));
@@ -584,8 +613,6 @@
// Update the incompleted to-do count.
mInCompTodoCount++;
}
-
- qDebug() << "notes: NotesModel::appendInCompTodosToModel <--";
}
/*!
@@ -593,18 +620,17 @@
\param ids QList of uids containing the completed to-dos.
*/
-void NotesModel::appendCompTodosToModel(QList<ulong> &ids)
+void NotesModel::appendCompTodosToModel(QList<AgendaEntry> &agendaEntryList)
{
- qDebug() << "notes: NotesModel::appendCompTodosToModel -->";
-
+ int entriesCount = agendaEntryList.count();
// Iterate and add complete to-do to the model.
- mSourceModel->insertRows(mSourceModel->rowCount(), ids.count());
+ mSourceModel->insertRows(mSourceModel->rowCount(), entriesCount);
int rowCount = mSourceModel->rowCount();
- for (int idIter = 0, modelIter = rowCount - ids.count();
- idIter < ids.count(); idIter++, modelIter++) {
- // Fetch the to-do details.
- ulong id = ids[idIter];
- AgendaEntry entry = mAgendaUtil->fetchById(id);
+ for (int idIter = 0, modelIter = rowCount - entriesCount;
+ idIter < entriesCount; idIter++, modelIter++) {
+
+ // Read the completed to-do details.
+ AgendaEntry entry = agendaEntryList[idIter];
if (AgendaEntry::TypeTodo != entry.type()) {
continue;
@@ -619,7 +645,7 @@
// Set the to-do id.
mSourceModel->setData(
- mdlIndex, (qulonglong) id, NotesNamespace::IdRole);
+ mdlIndex, (qulonglong) entry.id(), NotesNamespace::IdRole);
// Set the type of the to-do.
mSourceModel->setData(
mdlIndex, entry.type(), NotesNamespace::TypeRole);
@@ -629,13 +655,18 @@
// Set the display data now.
QStringList stringList;
- stringList << entry.summary();
+ if (entry.summary().isEmpty()) {
+ // If empty set unnamed text
+ stringList<<hbTrId("txt_notes_dblist_unnamed");
+ } else {
+ stringList << entry.summary();
+ }
if (AgendaEntry::TodoCompleted == entry.status()) {
// Read completed date from agenda entry
QString displayText;
QString timeText(hbTrId("txt_notes_dblist_val_completed_on_1"));
QString completedTimeText =
- entry.completedDateTime().toString("dd/MM/yyyy");
+ entry.completedDateTime().toString(dateFormatString());
displayText = timeText.arg(completedTimeText);
stringList << displayText;
}
@@ -654,8 +685,6 @@
// Update the completed to-do count.
mCompTodoCount++;
}
-
- qDebug() << "notes: NotesModel::appendCompTodosToModel <--";
}
/*!
@@ -667,8 +696,6 @@
*/
bool NotesModel::insertNoteToModel(QModelIndex &index, ulong id)
{
- qDebug() << "notes: NotesModel::insertNoteToModel -->";
-
AgendaEntry entry = mAgendaUtil->fetchById(id);
if (entry.isNull()) {
return false;
@@ -691,12 +718,44 @@
// Set the display data now.
// Read modification time from agenda entry
QString displayText;
- QString timeText(hbTrId("txt_notes_dblist_val_modified_on_1_2"));
- QString modifiedDateText =
- entry.lastModifiedDateTime().date().toString("dd/MM/yyyy");
- QString modifiedTimeText =
- entry.lastModifiedDateTime().time().toString("hh:mm ap");
- displayText = timeText.arg(modifiedDateText,modifiedTimeText);
+ QString dateTimeText;
+ QString modifiedText;
+
+ // Show the creation time if entry is not modified.
+ if (entry.dtStamp().isValid()) {
+ QDateTime creationDateTime = entry.dtStamp();
+
+ // If created on today,show only creation time otherwise show the
+ // creation date.
+ if ((QDate::currentDate()) == creationDateTime.date()) {
+ dateTimeText =
+ hbTrId("txt_notes_dblist_note_created_at_time");
+ modifiedText =
+ creationDateTime.time().toString(timeFormatString());
+ } else {
+ dateTimeText =
+ hbTrId("txt_notes_dblist_note_created_on_date");
+ modifiedText =
+ creationDateTime.date().toString(dateFormatString());
+ }
+ } else {
+ QDateTime modifiedDateTime = entry.lastModifiedDateTime();
+
+ // If modified on today,show only modified time otherwise show the
+ // modified date.
+ if ((QDate::currentDate()) == modifiedDateTime.date() ) {
+ dateTimeText =
+ hbTrId("txt_notes_dblist_note_modified_at_time");
+ modifiedText =
+ modifiedDateTime.time().toString(timeFormatString());
+ } else {
+ dateTimeText =
+ hbTrId("txt_notes_dblist_note_modified_on_date");
+ modifiedText =
+ modifiedDateTime.date().toString(dateFormatString());
+ }
+ }
+ displayText = dateTimeText.arg(modifiedText);
QStringList stringList;
stringList << entry.description().left(100) << displayText;
@@ -707,12 +766,12 @@
// Set the favourite icon.
if (entry.favourite()) {
QList<QVariant> iconList;
- iconList.append(QVariant(QVariant::Invalid));
+ iconList.append(HbIcon("qtg_small_note"));
iconList.append(HbIcon("qtg_mono_favourites"));
mSourceModel->setData(mdlIndex, iconList, Qt::DecorationRole);
} else {
QList<QVariant> iconList;
- iconList.append(QVariant(QVariant::Invalid));
+ iconList.append(HbIcon("qtg_small_note"));
iconList.append(QVariant(QVariant::Invalid));
mSourceModel->setData(mdlIndex, iconList, Qt::DecorationRole);
}
@@ -721,8 +780,6 @@
index = mdlIndex;
- qDebug() << "notes: NotesModel::insertNoteToModel <--";
-
return true;
}
@@ -736,7 +793,6 @@
*/
bool NotesModel::insertInCompTodoToModel(QModelIndex &index, ulong id)
{
- qDebug() << "notes: NotesModel::insertInCompTodoToModel -->";
bool success = false;
@@ -746,7 +802,6 @@
return success;
}
-
// First fetch the list of incompleted to-dos.
QList<ulong> entryIds = mAgendaUtil->entryIds(
(AgendaUtil::FilterFlags) (AgendaUtil::IncludeIncompletedTodos));
@@ -786,13 +841,18 @@
// Set the display data now.
QStringList stringList;
- stringList << entry.summary();
+ if (entry.summary().isEmpty()) {
+ // If empty set unnamed text
+ stringList<<hbTrId("txt_notes_dblist_unnamed");
+ } else {
+ stringList << entry.summary();
+ }
if (AgendaEntry::TodoNeedsAction == entry.status()) {
// Read due date from agenda entry
QString displayText;
QString timeText(hbTrId("txt_notes_dblist_val_due_on_1"));
QString dueDateText =
- entry.startTime().toString("dd/MM/yyyy");
+ entry.startTime().toString(dateFormatString());
displayText = timeText.arg(dueDateText);
stringList << displayText;
}
@@ -803,12 +863,16 @@
QList<QVariant> iconList;
iconList.append(HbIcon("qtg_small_todo"));
- // Set the alarm icon if reminder is set.
- if (!entry.alarm().isNull()) {
+ if (1 == entry.priority()) {
+ // Set the High Priority icon if priority is high.
+ iconList.append(HbIcon("qtg_small_priority_high"));
+ } else if (!entry.alarm().isNull()) {
+ // Set the alarm if set.
iconList.append(HbIcon("qtg_mono_alarm"));
} else {
iconList.append(QVariant(QVariant::Invalid));
}
+
// Set the icons.
mSourceModel->setData(
newModelIndex, iconList, Qt::DecorationRole);
@@ -821,8 +885,6 @@
}
}
- qDebug() << "notes: NotesModel::insertInCompTodoToModel <--";
-
return success;
}
@@ -836,8 +898,6 @@
*/
bool NotesModel::insertCompTodoToModel(QModelIndex &index, ulong id)
{
- qDebug() << "notes: NotesModel::insertCompTodoToModel -->";
-
bool success = false;
// Fetch the entry first.
@@ -888,13 +948,18 @@
// Set the display data now.
QStringList stringList;
- stringList << entry.summary();
+ if (entry.summary().isEmpty()) {
+ // If empty set unnamed text
+ stringList<<hbTrId("txt_notes_dblist_unnamed");
+ } else {
+ stringList << entry.summary();
+ }
if (AgendaEntry::TodoCompleted == entry.status()) {
// Read completed date from agenda entry
QString displayText;
QString timeText(hbTrId("txt_notes_dblist_val_completed_on_1"));
QString completedTimeText =
- entry.completedDateTime().toString("dd/MM/yyyy");
+ entry.completedDateTime().toString(dateFormatString());
displayText = timeText.arg(completedTimeText);
stringList << displayText;
}
@@ -920,9 +985,72 @@
}
}
- qDebug() << "notes: NotesModel::insertCompTodoToModel <--";
-
return success;
}
+/*!
+ Retruns the dateformat based current locale settings.
+ Common method can be used by any class.
+ Can be removed once format strings are defined in hb.
+ */
+QString NotesModel::dateFormatString()
+{
+ HbExtendedLocale locale = HbExtendedLocale::system();
+
+ QString dateFormat;
+ switch (locale.dateStyle()) {
+ case HbExtendedLocale::American:
+ dateFormat.append("MM");
+ dateFormat.append(locale.dateSeparator(1));
+ dateFormat.append("dd");
+ dateFormat.append(locale.dateSeparator(1));
+ dateFormat.append("yyyy");
+ break;
+
+ case HbExtendedLocale::European:
+ dateFormat.append("dd");
+ dateFormat.append(locale.dateSeparator(1));
+ dateFormat.append("MM");
+ dateFormat.append(locale.dateSeparator(1));
+ dateFormat.append("yyyy");
+ break;
+
+ case HbExtendedLocale::Japanese:
+ dateFormat.append("yyyy");
+ dateFormat.append(locale.dateSeparator(1));
+ dateFormat.append("MM");
+ dateFormat.append(locale.dateSeparator(1));
+ dateFormat.append("dd");
+ break;
+ }
+
+ return dateFormat;
+}
+
+/*!
+ Retruns the timeformat string based on current locale settings
+ Common method can be used by any class.
+ Can be removed once format strings are defined in hb.
+ */
+QString NotesModel::timeFormatString()
+{
+ QString timeFormat;
+
+ HbExtendedLocale locale = HbExtendedLocale::system();
+
+ if (locale.timeStyle() == HbExtendedLocale::Time12) {
+ timeFormat.append("h");
+ timeFormat.append(locale.timeSeparator(1));
+ timeFormat.append("mm");
+ timeFormat.append(" ap");
+ } else {
+ timeFormat.append("hh");
+ timeFormat.append(locale.timeSeparator(1));
+ timeFormat.append("mm");
+ }
+
+ return timeFormat;
+}
+
+
// End of file --Don't remove this.
--- a/notes/notesui/notesmodel/src/notessortfilterproxymodel.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/notesmodel/src/notessortfilterproxymodel.cpp Mon May 03 12:30:32 2010 +0300
@@ -17,7 +17,6 @@
*/
// System includes
-#include <qdebug.h>
#include <QAbstractItemModel>
// User includes
@@ -44,11 +43,7 @@
:QSortFilterProxyModel(parent),
mAgendaUtil(agendaUtil)
{
- qDebug() << "notes: NotesSortFilterProxyModel::NotesSortFilterProxyModel -->";
-
// Nothing yet.
-
- qDebug() << "notes: NotesSortFilterProxyModel::NotesSortFilterProxyModel <--";
}
/*!
@@ -56,11 +51,7 @@
*/
NotesSortFilterProxyModel::~NotesSortFilterProxyModel()
{
- qDebug() << "notes: NotesSortFilterProxyModel::~NotesSortFilterProxyModel -->";
-
// Nothing yet.
-
- qDebug() << "notes: NotesSortFilterProxyModel::~NotesSortFilterProxyModel <--";
}
/*!
@@ -71,10 +62,6 @@
bool NotesSortFilterProxyModel::lessThan(
const QModelIndex &left, const QModelIndex &right) const
{
- qDebug() << "notes: NotesSortFilterProxyModel::lessThan -->";
-
- qDebug() << "notes: NotesSortFilterProxyModel::lessThan <--";
-
return QSortFilterProxyModel::lessThan(left, right);
}
@@ -87,8 +74,6 @@
int sourceRow,
const QModelIndex &sourceParent) const
{
- qDebug() << "notes: NotesSortFilterProxyModel::filterAcceptsRow -->";
-
// Get the model index of the source model.
QModelIndex modelIndex = sourceModel()->index(
sourceRow, filterKeyColumn(), sourceParent);
@@ -105,17 +90,11 @@
modelIndex, filterRole()).value<int>());
if (AgendaEntry::TypeNote == type
&& QString("note").contains(filterRegExp())) {
- qDebug() << "notes: NotesSortFilterProxyModel::filterAcceptsRow <--";
-
return true;
} else if (AgendaEntry::TypeTodo == type
&& QString("todo").contains(filterRegExp())) {
- qDebug() << "notes: NotesSortFilterProxyModel::filterAcceptsRow <--";
-
return true;
}
- qDebug() << "notes: NotesSortFilterProxyModel::filterAcceptsRow <--";
-
return false;
}
@@ -126,12 +105,8 @@
if (1 == favouriteStatus
&& QString("favourites").contains(filterRegExp())) {
- qDebug() << "notes: NotesSortFilterProxyModel::filterAcceptsRow <--";
-
return true;
}
- qDebug() << "notes: NotesSortFilterProxyModel::filterAcceptsRow <--";
-
return false;
}
@@ -147,19 +122,14 @@
QString string = dataList.value(i).toString();
if (string.contains(filterRegExp())) {
- qDebug() << "notes: NotesSortFilterProxyModel::filterAcceptsRow <--";
-
return true;
}
}
- qDebug() << "notes: NotesSortFilterProxyModel::filterAcceptsRow <--";
return false;
}
}
}
- qDebug() << "notes: NotesSortFilterProxyModel::filterAcceptsRow <--";
-
// Allow the base class to check if row accepts filter.
return QSortFilterProxyModel::filterAcceptsRow(sourceRow, sourceParent);
}
--- a/notes/notesui/notesmodelhandler/notesmodelhandler.pro Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/notesmodelhandler/notesmodelhandler.pro Mon May 03 12:30:32 2010 +0300
@@ -16,6 +16,7 @@
#
TEMPLATE = lib
+CONFIG += hb
TARGET = notesmodelhandler
DEFINES += NOTESMODELHANDLER_LIB
--- a/notes/notesui/notesmodelhandler/src/notesmodelhandler.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/notesmodelhandler/src/notesmodelhandler.cpp Mon May 03 12:30:32 2010 +0300
@@ -17,8 +17,6 @@
// System includes
#include <QtGui>
-#include <QDebug>
-
// User includes
#include "notesmodelhandler.h"
#include "agendautil.h"
@@ -38,15 +36,11 @@
mAgendaUtil(0),
mNotesModel(0)
{
- qDebug() << "notes: NotesModelHandler::NotesModelHandler -->";
-
QT_TRAP_THROWING(mAgendaUtil = new AgendaUtil(this));
Q_ASSERT_X(mAgendaUtil, "notesviewmanager.cpp", "mAgendaUtil is 0");
// Construct the source model here.
mNotesModel = new NotesModel(mAgendaUtil, this);
-
- qDebug() << "notes: NotesModelHandler::NotesModelHandler <--";
}
/*!
@@ -54,8 +48,6 @@
*/
NotesModelHandler::~NotesModelHandler()
{
- qDebug() << "notes: NotesModelHandler::~NotesModelHandler -->";
-
if (mAgendaUtil) {
delete mAgendaUtil;
mAgendaUtil = 0;
@@ -64,8 +56,6 @@
delete mNotesModel;
mNotesModel = 0;
}
-
- qDebug() << "notes: NotesModelHandler::~NotesModelHandler <--";
}
/*!
@@ -75,12 +65,8 @@
*/
AgendaUtil *NotesModelHandler::agendaInterface()
{
- qDebug() << "notes: NotesModelHandler::agendaInterface -->";
-
Q_ASSERT(mAgendaUtil);
- qDebug() << "notes: NotesModelHandler::agendaInterface <--";
-
return mAgendaUtil;
}
@@ -91,12 +77,8 @@
*/
NotesModel *NotesModelHandler::notesModel()
{
- qDebug() << "notes: NotesModelHandler::notesModel -->";
-
Q_ASSERT(mNotesModel);
- qDebug() << "notes: NotesModelHandler::notesModel <--";
-
return mNotesModel;
}
--- a/notes/notesui/notesviewmanager/inc/notesviewmanager.h Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/notesviewmanager/inc/notesviewmanager.h Mon May 03 12:30:32 2010 +0300
@@ -49,15 +49,20 @@
NotesNamespace::NotesViewIds viewId);
private:
- void loadViews();
void loadNotesMainView();
void loadNotesCollectionView();
void loadTodoView();
void loadFavoritesView();
void loadNoteView();
+ bool showDeleteConfirmationQuery(ulong entryId);
+
+private slots:
+ void loadOtherViews();
+ void deleteEntryFromView(ulong entryId);
private:
NotesAppControllerIf &mAppControllerIf;
+ AgendaUtil *mAgendaUtil;
NotesMainView *mMainView;
NotesCollectionView *mCollectionView;
--- a/notes/notesui/notesviewmanager/src/notesdocloader.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/notesviewmanager/src/notesdocloader.cpp Mon May 03 12:30:32 2010 +0300
@@ -15,8 +15,6 @@
*
*/
-// System includes
-#include <qdebug.h>
// User includes
#include "notesdocloader.h"
@@ -43,8 +41,6 @@
*/
QObject* NotesDocLoader::createObject(const QString &type, const QString &name)
{
- qDebug() << "notes: NotesDocLoader::createObject -->";
-
if (NOTES_MAIN_VIEW == name) {
QObject *object = new NotesMainView();
object->setObjectName(name);
@@ -67,8 +63,6 @@
return object;
}
- qDebug() << "notes: NotesDocLoader::createObject <--";
-
return HbDocumentLoader::createObject(type, name);
}
--- a/notes/notesui/notesviewmanager/src/notesviewmanager.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/notesviewmanager/src/notesviewmanager.cpp Mon May 03 12:30:32 2010 +0300
@@ -16,13 +16,14 @@
*/
// System includes
-#include <qdebug.h>
#include <qglobal.h>
#include <QtGui>
#include <HbMainWindow>
#include <HbView>
#include <HbInstance>
#include <HbListView>
+#include <HbMessageBox>
+#include <HbAction>
// User includes
#include "notesviewmanager.h"
@@ -54,12 +55,17 @@
:QObject(parent),
mAppControllerIf(controllerIf)
{
- qDebug() << "notes: NotesViewManager::NotesViewManager -->";
+ HbMainWindow *window = hbInstance->allMainWindows().first();
+
+ mAgendaUtil = mAppControllerIf.agendaUtil();
- // The document loader and views.
- loadViews();
+ // Load the main view at the start up.
+ loadNotesMainView();
- qDebug() << "notes: NotesViewManager::NotesViewManager <--";
+ // Delay loading of other views till main view is loaded.
+ connect(
+ window, SIGNAL(viewReady()),
+ this, SLOT(loadOtherViews()));
}
/*!
@@ -116,36 +122,10 @@
}
/*!
- Loads the views from the docml file.
- */
-void NotesViewManager::loadViews()
-{
- qDebug() << "notes: NotesViewManager::loadViews -->";
-
- // Load the main view.
- loadNotesMainView();
- // Load the collection view.
- loadNotesCollectionView();
- // Load the to-do view.
- loadTodoView();
- // Load the favorites view.
- loadFavoritesView();
- // Load the recent notes view.
- loadNoteView();
-
- // Set the main view to the window
- hbInstance->allMainWindows().first()->addView(mMainView);
-
- qDebug() << "notes: NotesViewManager::loadViews <--";
-}
-
-/*!
Loads the notes main view.
*/
void NotesViewManager::loadNotesMainView()
{
- qDebug() << "notes: NotesViewManager::loadNotesMainView -->";
-
bool loadSuccess;
// Construct the document loader instance
@@ -165,8 +145,13 @@
mMainView, "notesviewmanager.cpp", "Unable to find the main view.");
// Setup the view.
mMainView->setupView(mAppControllerIf, docLoader);
+ // Connect to main view signal for entry deletion.
+ connect (
+ mMainView, SIGNAL(deleteEntry(ulong)),
+ this, SLOT(deleteEntryFromView(ulong)));
- qDebug() << "notes: NotesViewManager::loadNotesMainView <--";
+ // Set the main view to the window
+ hbInstance->allMainWindows().first()->addView(mMainView);
}
/*!
@@ -174,8 +159,6 @@
*/
void NotesViewManager::loadNotesCollectionView()
{
- qDebug("notes: NotesViewManager::loadNotesCollectionView -- Entry");
-
bool loadSuccess;
// Construct the document loader instance
@@ -189,8 +172,6 @@
docLoader->findWidget(NOTES_COLLECTION_VIEW));
// Setup the view.
mCollectionView->setupView(mAppControllerIf, docLoader);
-
- qDebug() << "notes: NotesViewManager::loadNotesCollectionView <--";
}
/*!
@@ -198,7 +179,6 @@
*/
void NotesViewManager::loadTodoView()
{
- qDebug("notes: NotesViewManager::loadTodoView -->");
bool loadSuccess;
@@ -213,8 +193,10 @@
docLoader->findWidget(NOTES_TODO_VIEW));
// Setup the view.
mTodoView->setupView(mAppControllerIf, docLoader);
-
- qDebug() << "notes: NotesViewManager::loadTodoView <--";
+ // Connect to to-do view signal for entry deletion.
+ connect (
+ mTodoView, SIGNAL(deleteEntry(ulong)),
+ this, SLOT(deleteEntryFromView(ulong)));
}
/*!
@@ -222,8 +204,6 @@
*/
void NotesViewManager::loadFavoritesView()
{
- qDebug("notes: NotesViewManager::loadFavoritesView -->");
-
bool loadSuccess;
// Construct the document loader instance
@@ -238,7 +218,10 @@
// Setup the view.
mFavoriteView->setupView(mAppControllerIf, docLoader);
- qDebug() << "notes: NotesViewManager::loadFavoritesView <--";
+ // Connect to favourite view signal for entry deletion.
+ connect (
+ mFavoriteView, SIGNAL(deleteEntry(ulong)),
+ this, SLOT(deleteEntryFromView(ulong)));
}
/*!
@@ -246,8 +229,6 @@
*/
void NotesViewManager::loadNoteView()
{
- qDebug("notes: NotesViewManager::loadNoteView -->");
-
bool loadSuccess;
// Construct the document loader instance
@@ -262,7 +243,75 @@
// Setup the view.
mNoteView->setupView(mAppControllerIf, docLoader);
- qDebug() << "notes: NotesViewManager::loadNoteView <--";
+ connect(
+ mNoteView, SIGNAL(deleteEntry(ulong)),
+ this, SLOT(deleteEntryFromView(ulong)));
+}
+
+/*!
+ Delete the entry.
+ */
+void NotesViewManager::deleteEntryFromView(ulong entryId)
+{
+ if (showDeleteConfirmationQuery(entryId)) {
+ // Delete the given note.
+ mAgendaUtil->deleteEntry(entryId);
+ }
}
+/*!
+ Loads other views from the docml file.
+ */
+void NotesViewManager::loadOtherViews()
+{
+ // Load the collection view.
+ loadNotesCollectionView();
+ // Load the to-do view.
+ loadTodoView();
+ // Load the favorites view.
+ loadFavoritesView();
+ // Load the recent notes view.
+ loadNoteView();
+
+ // Disconnect the signal viewReady as all the views are loaded.
+ HbMainWindow *window = hbInstance->allMainWindows().first();
+ disconnect(
+ window, SIGNAL(viewReady()),
+ this, SLOT(loadOtherViews()));
+}
+
+/* !
+ Show the delete confirmation query.
+ */
+bool NotesViewManager::showDeleteConfirmationQuery(ulong noteId)
+{
+ bool retValue(false);
+
+ HbMessageBox confirmationQuery(HbMessageBox::MessageTypeQuestion);
+ confirmationQuery.setDismissPolicy(HbDialog::NoDismiss);
+ confirmationQuery.setTimeout(HbDialog::NoTimeout);
+ confirmationQuery.setIconVisible(true);
+
+ QString displayText;
+ QString x;
+ AgendaEntry entry = mAgendaUtil->fetchById(noteId);
+ if (AgendaEntry::TypeTodo == entry.type()) {
+ displayText += hbTrId("txt_notes_info_delete_todo_note");
+ } else {
+ displayText += hbTrId("txt_notes_info_delete_note");
+ }
+
+ confirmationQuery.setText(displayText);
+
+ confirmationQuery.setPrimaryAction(new HbAction(
+ hbTrId("txt_notes_button_dialog_delete"), &confirmationQuery));
+ confirmationQuery.setSecondaryAction(new HbAction(
+ hbTrId("txt_common_button_cancel"), &confirmationQuery));
+ HbAction *selected = confirmationQuery.exec();
+ if (selected == confirmationQuery.primaryAction()) {
+ retValue = true;
+ }
+
+ return retValue;
+}
// End of file --Don't remove this.
--- a/notes/notesui/notesviews/inc/notescollectionview.h Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/notesviews/inc/notescollectionview.h Mon May 03 12:30:32 2010 +0300
@@ -28,8 +28,7 @@
// Forward declarations
class QGraphicsWidget;
-class HbListWidget;
-class HbListWidgetItem;
+class HbListView;
class HbLabel;
class AgendaUtil;
class NotesModel;
@@ -56,16 +55,17 @@
void handleEditingCompleted(bool status);
void updateData(ulong id);
void updateData(QList<ulong> ids);
- void handleActivated(HbListWidgetItem *item);
+ void handleActivated(const QModelIndex &index);
void updateFavouritesCount(const QModelIndex &index, int start, int end);
void handleActionStateChanged();
- void updateToolbarTexts(Qt::Orientation orientation);
private:
void populateListView();
+ int todosCount();
+ int recentNotesCount();
private:
- HbListWidget *mListWidget;
+ HbListView *mListView;
HbAction *mAllNotesAction;
HbAction *mViewCollectionAction;
HbAction *mAddNoteAction;
--- a/notes/notesui/notesviews/inc/notesfavoriteview.h Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/notesviews/inc/notesfavoriteview.h Mon May 03 12:30:32 2010 +0300
@@ -50,6 +50,9 @@
NOTESVIEWS_EXPORT void setupView(
NotesAppControllerIf &controllerIf, NotesDocLoader *docLoader);
+signals:
+ void deleteEntry(ulong entryId);
+
private slots:
void createNewNote();
void handleItemReleased(const QModelIndex &index);
@@ -58,13 +61,12 @@
void deleteNote();
void markNoteAsNotFavourite();
void markNoteAsTodo();
-
void handleEditingCompleted(bool status);
void displayCollectionView();
void displayAllNotesView();
-
void handleActionStateChanged();
void handleOrientationChanged(Qt::Orientation);
+ void openNote();
private:
HbListView *mListView;
@@ -73,10 +75,10 @@
HbAction *mAllNotesAction;
HbAction *mViewCollectionAction;
HbAction *mAddNoteAction;
-
HbAction *mDeleteAction;
HbAction *mRemoveFavoriteAction;
HbAction *mMarkTodoAction;
+ HbAction *mOpenAction;
AgendaUtil *mAgendaUtil;
--- a/notes/notesui/notesviews/inc/notesmainview.h Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/notesviews/inc/notesmainview.h Mon May 03 12:30:32 2010 +0300
@@ -53,6 +53,8 @@
public:
NOTESVIEWS_EXPORT void setupView(
NotesAppControllerIf &controllerIf, NotesDocLoader *docLoader);
+signals:
+ void deleteEntry(ulong entryId);
private slots:
void createNewNote();
@@ -65,11 +67,13 @@
void handleEditingCompleted(bool status);
void displayCollectionView();
void scrollTo(QModelIndex index);
- void handleViewingCompleted(bool status);
+ void handleViewingCompleted();
void handleActionStateChanged();
void editTodo();
void handleOrientationChanged(Qt::Orientation);
void updateSubTitle(ulong id=0);
+ void markNoteAsTodo();
+ void openNote();
private:
HbListView *mListView;
@@ -85,6 +89,9 @@
HbAction *mMakeFavouriteAction;
HbAction *mTodoStatusAction;
HbAction *mEditTodoAction;
+ HbAction *mMarkTodoAction;
+ HbAction *mOpenAction;
+
HbGroupBox *mSubTitle;
AgendaUtil *mAgendaUtil;
--- a/notes/notesui/notesviews/inc/notesnoteview.h Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/notesviews/inc/notesnoteview.h Mon May 03 12:30:32 2010 +0300
@@ -49,6 +49,9 @@
public:
NOTESVIEWS_EXPORT void setupView(
NotesAppControllerIf &controllerIf, NotesDocLoader *docLoader);
+
+signals:
+ void deleteEntry(ulong entryId);
private slots:
void createNewNote();
@@ -63,6 +66,7 @@
void displayAllNotesView();
void handleActionStateChanged();
void handleOrientationChanged(Qt::Orientation);
+ void openNote();
private:
HbListView *mListView;
@@ -71,11 +75,11 @@
HbAction *mAllNotesAction;
HbAction *mViewCollectionAction;
HbAction *mAddNoteAction;
-
HbAction *mEditAction;
HbAction *mDeleteAction;
HbAction *mMakeFavouriteAction;
HbAction *mMarkTodoAction;
+ HbAction *mOpenAction;
AgendaUtil *mAgendaUtil;
--- a/notes/notesui/notesviews/inc/notestodoview.h Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/notesviews/inc/notestodoview.h Mon May 03 12:30:32 2010 +0300
@@ -50,6 +50,9 @@
public:
NOTESVIEWS_EXPORT void setupView(
NotesAppControllerIf &controllerIf, NotesDocLoader *docLoader);
+
+signals:
+ void deleteEntry(ulong entryId);
private slots:
void createNewTodo();
@@ -63,10 +66,11 @@
void displayCollectionView();
void displayAllNotesView();
void handleEditingCompleted();
- void handleViewingCompleted(bool status);
+ void handleViewingCompleted();
void handleActionStateChanged();
void handleOrientationChanged(Qt::Orientation);
void updateSubTitle(ulong id=0);
+ void openTodo();
private:
HbListView *mListView;
@@ -75,10 +79,11 @@
HbAction *mAllNotesAction;
HbAction *mViewCollectionAction;
HbAction *mAddTodoAction;
-
HbAction *mEditAction;
HbAction *mDeleteAction;
HbAction *mTodoStatusAction;
+ HbAction *mOpenAction;
+
HbGroupBox *mSubTitle;
AgendaUtil *mAgendaUtil;
--- a/notes/notesui/notesviews/src/notescollectionview.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/notesviews/src/notescollectionview.cpp Mon May 03 12:30:32 2010 +0300
@@ -17,9 +17,9 @@
*/
// System includes
-#include <QDebug>
#include <HbListWidget>
-#include <HbListWidgetItem>
+#include <QStandardItemModel>
+#include <HbListView>
#include <HbAction>
#include <HbTextEdit>
#include <HbInstance>
@@ -29,6 +29,7 @@
#include <HbLabel>
#include <HbAbstractViewItem>
#include <HbGroupBox>
+#include <HbStyleLoader>
// User includes
#include "notescollectionview.h"
@@ -55,11 +56,7 @@
NotesCollectionView::NotesCollectionView(QGraphicsWidget *parent)
:HbView(parent)
{
- qDebug() << "notes: NotesCollectionView::NotesCollectionView -->";
-
// Nothing yet.
-
- qDebug() << "notes: NotesCollectionView::NotesCollectionView <--";
}
/*!
@@ -67,14 +64,10 @@
*/
NotesCollectionView::~NotesCollectionView()
{
- qDebug() << "notes: NotesCollectionView::~NotesCollectionView -->";
-
if (mDocLoader) {
delete mDocLoader;
mDocLoader = 0;
}
-
- qDebug() << "notes: NotesCollectionView::~NotesCollectionView <--";
}
/*!
@@ -87,8 +80,6 @@
void NotesCollectionView::setupView(
NotesAppControllerIf &controllerIf, NotesDocLoader *docLoader)
{
- qDebug() << "notes: NotesCollectionView::setupView -->";
-
mDocLoader = docLoader;
mAppControllerIf = &controllerIf;
mNotesModel = mAppControllerIf->notesModel();
@@ -110,7 +101,8 @@
mFavouriteModel->setDynamicSortFilter(true);
mFavouriteModel->setFilterRole(NotesNamespace::FavouriteRole);
mFavouriteModel->setFilterRegExp(QRegExp("favourites"));
- mFavouriteModel->setSourceModel(mAppControllerIf->notesModel()->sourceModel());
+ mFavouriteModel->setSourceModel(
+ mAppControllerIf->notesModel()->sourceModel());
connect(
mFavouriteModel, SIGNAL(rowsInserted(QModelIndex, int, int)),
this, SLOT(updateFavouritesCount(QModelIndex, int, int)));
@@ -118,12 +110,12 @@
mFavouriteModel, SIGNAL(rowsRemoved(QModelIndex, int, int)),
this, SLOT(updateFavouritesCount(QModelIndex, int, int)));
- // Get the list object from the document and update the model.
- mListWidget = static_cast<HbListWidget *> (
- mDocLoader->findWidget("listWidget"));
+ // Get the list view from the document and update the model.
+ mListView = static_cast<HbListView *> (
+ mDocLoader->findWidget("listView"));
connect(
- mListWidget, SIGNAL(activated(HbListWidgetItem *)),
- this, SLOT(handleActivated(HbListWidgetItem *)));
+ mListView, SIGNAL(activated(const QModelIndex &)),
+ this, SLOT(handleActivated(const QModelIndex &)));
// Populate the content of the view.
populateListView();
@@ -163,16 +155,6 @@
connect(
mAddNoteAction, SIGNAL(triggered()),
this, SLOT(createNewNote()));
-
- // Check orientation and update the toolbar action's text
- // icons in potriat mode and icons + text in landscape mode.
- HbMainWindow *window = hbInstance->allMainWindows().first();
- updateToolbarTexts(window->orientation());
- connect(
- window, SIGNAL(orientationChanged(Qt::Orientation)),
- this, SLOT(updateToolbarTexts(Qt::Orientation)));
-
- qDebug() << "notes: NotesCollectionView::setupView <--";
}
/*!
@@ -180,12 +162,8 @@
*/
void NotesCollectionView::displayAllNotesView()
{
- qDebug() << "notes: NotesMainView::displayAllNotesView -->";
-
// Switch to collections view.
mAppControllerIf->switchToView(NotesNamespace::NotesMainViewId);
-
- qDebug() << "notes: NotesMainView::displayAllNotesView <--";
}
/*!
@@ -193,26 +171,22 @@
*/
void NotesCollectionView::resetCollectionView()
{
- qDebug() << "notes: NotesCollectionView::resetCollectionView -->";
-
- QString countString("(%1)");
+ QString countString(hbTrId("txt_notes_list_note_count"));
- // Get the count of to-dos.
- QList<ulong> entries = mAgendaUtil->entryIds(
- (AgendaUtil::FilterFlags)
- (AgendaUtil::IncludeCompletedTodos
- | AgendaUtil::IncludeIncompletedTodos));
// Update the count of to-do's.
- HbListWidgetItem *item = mListWidget->item(0);
- item->setSecondaryText(countString.arg(QString::number(entries.count())));
+ QModelIndex mdlIndex = mListView->model()->index(0, 0);
+ QStringList todoStringList;
+ todoStringList.append(hbTrId("txt_notes_list_todos"));
+ todoStringList.append(countString.arg(QString::number(todosCount())));
+ mListView->model()->setData(mdlIndex, todoStringList, Qt::DisplayRole);
- // Get the count of notes.
- entries = mAgendaUtil->entryIds(AgendaUtil::IncludeNotes);
// Update the count of notes in the view.
- item = mListWidget->item(2);
- item->setSecondaryText(countString.arg(QString::number(entries.count())));
-
- qDebug() << "notes: NotesCollectionView::resetCollectionView <--";
+ mdlIndex = mListView->model()->index(2, 0);
+ QStringList notesStringList;
+ notesStringList.append(hbTrId("txt_notes_list_plain_notes"));
+ notesStringList.append(
+ countString.arg(QString::number(recentNotesCount())));
+ mListView->model()->setData(mdlIndex, notesStringList, Qt::DisplayRole);
}
/*!
@@ -220,8 +194,6 @@
*/
void NotesCollectionView::createNewNote()
{
- qDebug() << "notes: NotesMainView::createNewNote -->";
-
// Here we Display an editor to the use to enter text.
mNotesEditor = new NotesEditor(mAgendaUtil, this);
connect(
@@ -229,8 +201,6 @@
this, SLOT(handleEditingCompleted(bool)));
mNotesEditor->create(NotesEditor::CreateNote);
-
- qDebug() << "notes: NotesMainView::createNewNote <--";
}
/*!
@@ -238,8 +208,6 @@
*/
void NotesCollectionView::handleEditingCompleted(bool status)
{
- qDebug() << "notes: NotesMainView::handleEditingCompleted -->";
-
Q_UNUSED(status)
// Refresh the content of the view.
@@ -247,8 +215,6 @@
// Cleanup.
mNotesEditor->deleteLater();
-
- qDebug() << "notes: NotesMainView::handleEditingCompleted <--";
}
/*!
@@ -257,14 +223,10 @@
*/
void NotesCollectionView::updateData(ulong id)
{
- qDebug() << "notes: NotesMainView::updateData -->";
-
Q_UNUSED(id)
// Refresh the content of the view.
resetCollectionView();
-
- qDebug() << "notes: NotesMainView::updateData <--";
}
/*!
@@ -273,44 +235,50 @@
*/
void NotesCollectionView::updateData(QList<ulong> ids)
{
- qDebug() << "notes: NotesMainView::updateData -->";
-
Q_UNUSED(ids)
// Refresh the content of the view.
resetCollectionView();
-
- qDebug() << "notes: NotesMainView::updateData <--";
}
/*!
Handles the case when a list item is activated and the corresponding
collections view (viz., notes, to-dos, favourites) is opened.
- \param item The item that was activated.
+ \param index The index of the item that was activated.
*/
-void NotesCollectionView::handleActivated(HbListWidgetItem *item)
+void NotesCollectionView::handleActivated(const QModelIndex &index)
{
- QString secondary = item->secondaryText();
- QString primary = item->text();
+
+ switch (index.row()) {
+ case 0: {
+ if (todosCount()) {
+ // To-do item selected.
+ // Switch to to-do view if to-do entries exist.
+ mAppControllerIf->switchToView(NotesNamespace::NotesTodoViewId);
+ }
+ }
+ break;
- switch (mListWidget->row(item)) {
- case 0:
- // To-do item selected. Switch to to-do view.
- mAppControllerIf->switchToView(NotesNamespace::NotesTodoViewId);
- break;
+ case 1: {
+ if (mFavouriteModel->rowCount()) {
+ // Favorites item selected.
+ // Switch to favorites view if favorites exist.
+ mAppControllerIf->switchToView(
+ NotesNamespace::NotesFavoritesViewId);
+ }
+ }
+ break;
- case 1:
- // Favorites item selected. Switch to favorites view.
- mAppControllerIf->switchToView(
- NotesNamespace::NotesFavoritesViewId);
- break;
-
- case 2:
- // Recent notes item selected.
- mAppControllerIf->switchToView(
- NotesNamespace::NotesNoteViewId);
- break;
+ case 2: {
+ if (recentNotesCount()) {
+ // Recent notes item selected.
+ // Switch to recent notes view if notes exist.
+ mAppControllerIf->switchToView(
+ NotesNamespace::NotesNoteViewId);
+ }
+ }
+ break;
default:
// Nothing yet.
@@ -331,9 +299,20 @@
Q_UNUSED(end)
// Update the count of notes in the view.
- QString countString("(%1)");
- HbListWidgetItem *item = mListWidget->item(1);
- item->setSecondaryText(countString.arg(mFavouriteModel->rowCount()));
+ QString countString(hbTrId("txt_notes_list_note_count"));
+ QModelIndex mdlIndex = mListView->model()->index(1, 0);
+ QStringList favStringList;
+ favStringList.append(hbTrId("txt_notes_list_favorites"));
+ favStringList.append(countString.arg(mFavouriteModel->rowCount()));
+ mListView->model()->setData(mdlIndex, favStringList, Qt::DisplayRole);
+}
+
+/*!
+ Slot to handle the case when the state of an action has changed.
+ */
+void NotesCollectionView::handleActionStateChanged()
+{
+ mViewCollectionAction->setChecked(true);
}
/*!
@@ -341,65 +320,65 @@
*/
void NotesCollectionView::populateListView()
{
- qDebug() << "notes: NotesCollectionView::populateListView -->";
+ QStandardItemModel *model = new QStandardItemModel(this);
+ model->setColumnCount(1);
- QString countString(hbTrId("[%1]"));
+ QString countString(hbTrId("txt_notes_list_note_count"));
+
// Add To-do's item.
- HbListWidgetItem *item = new HbListWidgetItem;
- item->setText(hbTrId("txt_notes_list_todos"));
- // Get the number of to-do entries.
+ QStandardItem *item = new QStandardItem();
+ QStringList todoStringList;
+ todoStringList.append(hbTrId("txt_notes_list_todos"));
+ todoStringList.append(countString.arg(QString::number(todosCount())));
+ item->setData(todoStringList, Qt::DisplayRole);
+ model->appendRow(item);
+
+ // Add Favorites item.
+ item = new QStandardItem();
+ QStringList favStringList;
+ favStringList.append(hbTrId("txt_notes_list_favorites"));
+ favStringList.append(countString.arg(mFavouriteModel->rowCount()));
+ item->setData(favStringList, Qt::DisplayRole);
+ model->appendRow(item);
+
+ // Add Recent notes item.
+ item = new QStandardItem();
+ QStringList notesStringList;
+ notesStringList.append(hbTrId("txt_notes_list_plain_notes"));
+ notesStringList.append(
+ countString.arg(QString::number(recentNotesCount())));
+ item->setData(notesStringList, Qt::DisplayRole);
+ model->appendRow(item);
+
+ HbStyleLoader::registerFilePath(":/style");
+ mListView->setLayoutName("custom");
+ mListView->setModel(model);
+}
+
+
+/*!
+ Returns the todos count
+
+ \return int todos count.
+ */
+int NotesCollectionView::todosCount()
+{
QList<ulong> entries = mAgendaUtil->entryIds(
(AgendaUtil::FilterFlags)
(AgendaUtil::IncludeCompletedTodos
| AgendaUtil::IncludeIncompletedTodos));
- item->setSecondaryText(countString.arg(QString::number(entries.count())));
- mListWidget->addItem(item);
-
- // Add Favorites item.
- item = new HbListWidgetItem;
- item->setText(hbTrId("txt_notes_list_favorites"));
- item->setSecondaryText(countString.arg(mFavouriteModel->rowCount()));
- mListWidget->addItem(item);
-
- // Get the number of notes.
- entries = mAgendaUtil->entryIds(AgendaUtil::IncludeNotes);
- // Add Recent notes item.
- item = new HbListWidgetItem;
- item->setText(hbTrId("txt_notes_list_recent_notes"));
- item->setSecondaryText(countString.arg(QString::number(entries.count())));
- mListWidget->addItem(item);
-
- qDebug() << "notes: NotesCollectionView::populateListView <--";
+ return entries.count();
}
/*!
- Slot to handle the case when the state of an action has changed.
- */
-void NotesCollectionView::handleActionStateChanged()
-{
- qDebug() << "notes: NotesCollectionView::handleActionStateChanged -->";
+ Returns recent notes count.
- mViewCollectionAction->setChecked(true);
-
- qDebug() << "notes: NotesCollectionView::handleActionStateChanged <--";
-}
-
-/*!
- Update the toolbar actions texts on orientation change.
+ \return int recent notes count.
*/
-void NotesCollectionView::updateToolbarTexts(Qt::Orientation orientation)
+int NotesCollectionView::recentNotesCount()
{
- if (Qt::Horizontal == orientation) {
- // Set the text in landscape mode
- mAllNotesAction->setText(hbTrId("txt_notes_button_all"));
- mViewCollectionAction->setText(hbTrId("txt_notes_button_collections"));
- mAddNoteAction->setText(hbTrId("txt_notes_button_new_note"));
- } else if( Qt::Vertical == orientation) {
- // Set empty text in portriat mode so that only icons are visible.
- mAllNotesAction->setText("");
- mViewCollectionAction->setText("");
- mAddNoteAction->setText("");
- }
+ QList<ulong> entries = mAgendaUtil->entryIds(AgendaUtil::IncludeNotes);
+ return entries.count();
}
// End of file --Don't remove this.
--- a/notes/notesui/notesviews/src/notesfavoriteview.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/notesviews/src/notesfavoriteview.cpp Mon May 03 12:30:32 2010 +0300
@@ -17,7 +17,6 @@
*/
// System includes
-#include <QDebug>
#include <QDateTime>
#include <HbListView>
#include <HbListWidget>
@@ -59,11 +58,7 @@
mSelectedItem(0),
mDeleteAction(0)
{
- qDebug() << "notes: NotesFavoriteView::NotesFavoriteView -->";
-
// Nothing yet.
-
- qDebug() << "notes: NotesFavoriteView::NotesFavoriteView <--";
}
/*!
@@ -71,14 +66,11 @@
*/
NotesFavoriteView::~NotesFavoriteView()
{
- qDebug() << "notes: NotesFavoriteView::~NotesFavoriteView -->";
-
if (mDocLoader) {
delete mDocLoader;
mDocLoader = 0;
}
- qDebug() << "notes: NotesFavoriteView::~NotesFavoriteView <--";
}
/*!
@@ -91,8 +83,6 @@
void NotesFavoriteView::setupView(
NotesAppControllerIf &controllerIf, NotesDocLoader *docLoader)
{
- qDebug() << "notes: NotesMainView::setupView -->";
-
mDocLoader = docLoader;
mAppControllerIf = &controllerIf;
mNotesModel = mAppControllerIf->notesModel();
@@ -157,7 +147,9 @@
window, SIGNAL(orientationChanged(Qt::Orientation)),
this, SLOT(handleOrientationChanged(Qt::Orientation)));
- qDebug() << "notes: NotesMainView::setupView <--";
+ // Set the graphics size for the icons.
+ HbListViewItem *prototype = mListView->listItemPrototype();
+ prototype->setGraphicsSize(HbListViewItem::SmallIcon);
}
/*!
@@ -166,16 +158,12 @@
*/
void NotesFavoriteView::createNewNote()
{
- qDebug() << "notes: NotesFavoriteView::createNewNote -->";
-
// Here we Display an editor to the use to enter text.
mNotesEditor = new NotesEditor(mAgendaUtil, this);
connect(
mNotesEditor, SIGNAL(editingCompleted(bool)),
this, SLOT(handleEditingCompleted(bool)));
mNotesEditor->create(NotesEditor::CreateNote);
-
- qDebug() << "notes: NotesFavoriteView::createNewNote <--";
}
/*!
@@ -188,12 +176,8 @@
*/
void NotesFavoriteView::handleItemReleased(const QModelIndex &index)
{
- qDebug() << "notes: NotesFavoriteView::handleItemReleased -->";
-
// Sanity check.
if (!index.isValid()) {
- qDebug() << "notes: NotesFavoriteView::handleItemReleased <--";
-
return;
}
@@ -202,8 +186,6 @@
ulong noteId = index.data(NotesNamespace::IdRole).value<qulonglong>();
if (0 >= noteId) {
- qDebug() << "notes: NotesFavoriteView::handleItemReleased <--";
-
// Something wrong.
return;
}
@@ -212,7 +194,6 @@
AgendaEntry entry = mAgendaUtil->fetchById(noteId);
if (entry.isNull()) {
- qDebug() << "notes: NotesFavoriteView::handleItemReleased <--";
// Entry invalid.
return;
@@ -224,8 +205,6 @@
mNotesEditor, SIGNAL(editingCompleted(bool)),
this, SLOT(handleEditingCompleted(bool)));
mNotesEditor->edit(entry);
-
- qDebug() << "notes: NotesFavoriteView::handleItemReleased <--";
}
/*!
@@ -239,8 +218,6 @@
void NotesFavoriteView::handleItemLongPressed(
HbAbstractViewItem *item, const QPointF &coords)
{
- qDebug() << "notes: NotesFavoriteView::handleItemLongPressed -->";
-
mSelectedItem = item;
// Get the entry of the selected item.
@@ -252,6 +229,12 @@
HbMenu *contextMenu = new HbMenu();
// Add actions to the context menu.
+ mOpenAction =
+ contextMenu->addAction(hbTrId("txt_common_menu_open"));
+ connect(
+ mOpenAction, SIGNAL(triggered()),
+ this, SLOT(openNote()));
+
mDeleteAction =
contextMenu->addAction(hbTrId("txt_common_menu_delete"));
connect(
@@ -275,8 +258,6 @@
// Show the menu.
contextMenu->exec(coords);
-
- qDebug() << "notes: NotesFavoriteView::handleItemLongPressed <--";
}
/*!
@@ -284,30 +265,22 @@
*/
void NotesFavoriteView::deleteNote()
{
- qDebug() << "notes: NotesFavoriteView::deleteNote -->";
-
Q_ASSERT(mSelectedItem);
QModelIndex index = mSelectedItem->modelIndex();
if (!index.isValid()) {
- qDebug() << "notes: NotesFavoriteView::deleteNote <--";
-
return;
}
ulong entryId =
index.data(NotesNamespace::IdRole).value<qulonglong>();
if (!entryId) {
- qDebug() << "notes: NotesFavoriteView::deleteNote <--";
-
return;
}
- // Delete the given note.
- mAgendaUtil->deleteEntry(entryId);
+ // Emit the signal.Deletion would happen in view manager.
+ emit deleteEntry(entryId);
mSelectedItem = 0;
-
- qDebug() << "notes: NotesFavoriteView::deleteNote <--";
}
/*!
@@ -315,8 +288,6 @@
*/
void NotesFavoriteView::markNoteAsNotFavourite()
{
- qDebug() << "notes : NotesFavoriteView::markNoteAsNotFavourite -->";
-
ulong noteId = mSelectedItem->modelIndex().data(
NotesNamespace::IdRole).value<qulonglong>();
AgendaEntry entry = mAgendaUtil->fetchById(noteId);
@@ -325,8 +296,6 @@
entry.setFavourite(0);
}
mAgendaUtil->updateEntry(entry);
-
- qDebug() << "notes : NotesFavoriteView::markNoteAsNotFavourite <--";
}
/*!
@@ -334,28 +303,21 @@
*/
void NotesFavoriteView::markNoteAsTodo()
{
- qDebug() << "notes : NotesFavoriteView::markNoteAsTodo -->";
-
Q_ASSERT(mSelectedItem);
QModelIndex index = mSelectedItem->modelIndex();
if (!index.isValid()) {
- qDebug() << "notes: NotesFavoriteView::markNoteAsTodo <--";
return;
}
ulong noteId = index.data(NotesNamespace::IdRole).value<qulonglong> ();
if (!noteId) {
- qDebug() << "notes: NotesFavoriteView::markNoteAsTodo <--";
-
return;
}
// Get the entry details.
AgendaEntry entry = mAgendaUtil->fetchById(noteId);
if (entry.isNull()) {
- qDebug() << "notes: NotesFavoriteView::markNoteAsTodo <--";
-
// Entry invalid.
return;
}
@@ -365,7 +327,10 @@
entry.setType(AgendaEntry::TypeTodo);
QDateTime dueDateTime;
- dueDateTime.setDate(QDate::currentDate());
+ QDate currentDate(QDate::currentDate());
+ dueDateTime.setDate(
+ QDate(currentDate.year(),currentDate.month(),currentDate.day()+1));
+
dueDateTime.setTime(QTime::fromString("12:00 am", "hh:mm ap"));
entry.setStartAndEndTime(dueDateTime, dueDateTime);
@@ -387,8 +352,6 @@
// Delete the old entry.
mAgendaUtil->deleteEntry(entry.id());
-
- qDebug() << "notes : NotesFavoriteView::markNoteAsTodo <--";
}
/*!
@@ -400,14 +363,10 @@
*/
void NotesFavoriteView::handleEditingCompleted(bool status)
{
- qDebug() << "notes: NotesFavoriteView::handleEditingCompleted -->";
-
Q_UNUSED(status)
// Cleanup.
mNotesEditor->deleteLater();
-
- qDebug() << "notes: NotesFavoriteView::handleEditingCompleted <--";
}
/*!
@@ -415,12 +374,8 @@
*/
void NotesFavoriteView::displayCollectionView()
{
- qDebug() << "notes: NotesFavoriteView::displayCollectionView -->";
-
// Switch to collections view.
mAppControllerIf->switchToView(NotesNamespace::NotesCollectionViewId);
-
- qDebug() << "notes: NotesFavoriteView::displayCollectionView <--";
}
/*!
@@ -428,12 +383,8 @@
*/
void NotesFavoriteView::displayAllNotesView()
{
- qDebug() << "notes: NotesFavoriteView::displayAllNotesView -->";
-
// Switch to collections view.
mAppControllerIf->switchToView(NotesNamespace::NotesMainViewId);
-
- qDebug() << "notes: NotesFavoriteView::displayAllNotesView <--";
}
/*!
@@ -441,11 +392,7 @@
*/
void NotesFavoriteView::handleActionStateChanged()
{
- qDebug() << "notes: NotesFavoriteView::handleActionStateChanged -->";
-
mAllNotesAction->setChecked(true);
-
- qDebug() << "notes: NotesFavoriteView::handleActionStateChanged <--";
}
/*!
@@ -460,20 +407,28 @@
if (Qt::Horizontal == orientation) {
prototype->setStretchingStyle(HbListViewItem::StretchLandscape);
-
- // Set the text in landscape mode
- mAllNotesAction->setText(hbTrId("txt_notes_button_all"));
- mViewCollectionAction->setText(hbTrId("txt_notes_button_collections"));
- mAddNoteAction->setText(hbTrId("txt_notes_button_new_note"));
} else {
prototype->setStretchingStyle(HbListViewItem::NoStretching);
-
- // Set empty text in portriat mode so that only icons are visible.
- mAllNotesAction->setText("");
- mViewCollectionAction->setText("");
- mAddNoteAction->setText("");
}
}
+/*
+ Opens the notes editor to edit the favorite note.
+ */
+void NotesFavoriteView::openNote()
+{
+ ulong noteId = mSelectedItem->modelIndex().data(
+ NotesNamespace::IdRole).value<qulonglong>();
+ AgendaEntry entry = mAgendaUtil->fetchById(noteId);
+
+ // Construct notes editor.
+ mNotesEditor = new NotesEditor(mAgendaUtil, this);
+ connect(
+ mNotesEditor, SIGNAL(editingCompleted(bool)),
+ this, SLOT(handleEditingCompleted(bool)));
+
+ // Launch the notes editor with the obtained info.
+ mNotesEditor->edit(entry);
+}
// End of file --Don't remove this.
--- a/notes/notesui/notesviews/src/notesmainview.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/notesviews/src/notesmainview.cpp Mon May 03 12:30:32 2010 +0300
@@ -17,7 +17,6 @@
*/
// System includes
-#include <QDebug>
#include <QDateTime>
#include <HbListView>
#include <HbListWidget>
@@ -60,11 +59,7 @@
mSelectedItem(0),
mDeleteAction(0)
{
- qDebug() << "notes: NotesMainView::NotesMainView -->";
-
// Nothing yet.
-
- qDebug() << "notes: NotesMainView::NotesMainView <--";
}
/*!
@@ -72,14 +67,11 @@
*/
NotesMainView::~NotesMainView()
{
- qDebug() << "notes: NotesMainView::~NotesMainView -->";
-
if (mDocLoader) {
delete mDocLoader;
mDocLoader = 0;
}
- qDebug() << "notes: NotesMainView::~NotesMainView <--";
}
/*!
@@ -92,7 +84,6 @@
void NotesMainView::setupView(
NotesAppControllerIf &controllerIf, NotesDocLoader *docLoader)
{
- qDebug() << "notes: NotesMainView::setupView -->";
mDocLoader = docLoader;
mAppControllerIf = &controllerIf;
@@ -190,7 +181,10 @@
connect(
mAgendaUtil, SIGNAL(entryUpdated(ulong)),
this, SLOT(updateSubTitle(ulong)));
- qDebug() << "notes: NotesMainView::setupView <--";
+
+ // Set the graphics size for the icons.
+ HbListViewItem *prototype = mListView->listItemPrototype();
+ prototype->setGraphicsSize(HbListViewItem::SmallIcon);
}
/*!
@@ -199,7 +193,6 @@
*/
void NotesMainView::createNewNote()
{
- qDebug() << "notes: NotesMainView::createNewNote -->";
// Here we Display an editor to the use to enter text.
mNotesEditor = new NotesEditor(mAgendaUtil, this);
@@ -207,8 +200,6 @@
mNotesEditor, SIGNAL(editingCompleted(bool)),
this, SLOT(handleEditingCompleted(bool)));
mNotesEditor->create(NotesEditor::CreateNote);
-
- qDebug() << "notes: NotesMainView::createNewNote <--";
}
/*!
@@ -221,12 +212,8 @@
*/
void NotesMainView::handleItemReleased(const QModelIndex &index)
{
- qDebug() << "notes: NotesMainView::handleItemReleased -->";
-
// Sanity check.
if (!index.isValid()) {
- qDebug() << "notes: NotesMainView::handleItemReleased <--";
-
return;
}
@@ -235,8 +222,6 @@
ulong noteId = index.data(NotesNamespace::IdRole).value<qulonglong>();
if (0 >= noteId) {
- qDebug() << "notes: NotesMainView::handleItemReleased <--";
-
// Something wrong.
return;
}
@@ -244,8 +229,6 @@
// Get the entry details.
AgendaEntry entry = mAgendaUtil->fetchById(noteId);
if (entry.isNull()) {
- qDebug() << "notes: NotesMainView::handleItemReleased <--";
-
// Entry invalid.
return;
}
@@ -255,8 +238,8 @@
mAgendaEventViewer = new AgendaEventViewer(mAgendaUtil, this);
connect(
- mAgendaEventViewer, SIGNAL(viewingCompleted(bool)),
- this, SLOT(handleViewingCompleted(bool)));
+ mAgendaEventViewer, SIGNAL(viewingCompleted(const QDate)),
+ this, SLOT(handleViewingCompleted()));
// Launch agenda event viewer
mAgendaEventViewer->view(
entry, AgendaEventViewer::ActionEditDelete);
@@ -270,8 +253,6 @@
// Launch the notes editor with the obtained info.
mNotesEditor->edit(entry);
}
-
- qDebug() << "notes: NotesMainView::handleItemReleased <--";
}
/*!
@@ -285,8 +266,6 @@
void NotesMainView::handleItemLongPressed(
HbAbstractViewItem *item, const QPointF &coords)
{
- qDebug() << "notes: NotesMainView::handleItemLongPressed -->";
-
mSelectedItem = item;
ulong noteId = item->modelIndex().data(
@@ -295,6 +274,11 @@
// Display a context specific menu.
HbMenu *contextMenu = new HbMenu();
+ mOpenAction =
+ contextMenu->addAction(hbTrId("txt_common_menu_open"));
+ connect(
+ mOpenAction, SIGNAL(triggered()),
+ this, SLOT(openNote()));
// Add actions to the context menu.
if (AgendaEntry::TypeTodo == entry.type()) {
@@ -329,6 +313,13 @@
this, SLOT(markNoteAsFavourite()));
}
+ mMarkTodoAction =
+ contextMenu->addAction(
+ hbTrId("txt_notes_menu_make_it_as_todo_note"));
+ connect(
+ mMarkTodoAction, SIGNAL(triggered()),
+ this, SLOT(markNoteAsTodo()));
+
} else if (AgendaEntry::TypeTodo == entry.type()) {
if (AgendaEntry::TodoNeedsAction == entry.status()) {
mTodoStatusAction = contextMenu->addAction(
@@ -351,7 +342,6 @@
// Show the menu.
contextMenu->exec(coords);
- qDebug() << "notes: NotesMainView::handleItemLongPressed <--";
}
/*!
@@ -359,30 +349,23 @@
*/
void NotesMainView::deleteNote()
{
- qDebug() << "notes: NotesMainView::deleteNote -->";
-
Q_ASSERT(mSelectedItem);
QModelIndex index = mSelectedItem->modelIndex();
if (!index.isValid()) {
- qDebug() << "notes: NotesMainView::deleteNote <--";
-
return;
}
ulong noteId =
index.data(NotesNamespace::IdRole).value<qulonglong>();
if (!noteId) {
- qDebug() << "notes: NotesMainView::deleteNote <--";
return;
}
- // Delete the given note.
- mAgendaUtil->deleteEntry(noteId);
+ // Emit the signal.Deletion would happen in view manager.
+ emit deleteEntry(noteId);
mSelectedItem = 0;
-
- qDebug() << "notes: NotesMainView::deleteNote <--";
}
/*!
@@ -394,8 +377,6 @@
*/
void NotesMainView::markTodoStatus()
{
- qDebug() << "notes: NotesMainView::markTodoStatus -->";
-
ulong noteId = mSelectedItem->modelIndex().data(
NotesNamespace::IdRole).value<qulonglong>();
AgendaEntry entry = mAgendaUtil->fetchById(noteId);
@@ -408,7 +389,6 @@
mAgendaUtil->setCompleted(entry, false, currentDateTime);
}
- qDebug() << "notes: NotesMainView::markTodoStatus <-- ";
}
/*!
@@ -416,8 +396,6 @@
*/
void NotesMainView::markNoteAsFavourite()
{
- qDebug() << "notes : NotesMainView::markNoteAsFavourite -->";
-
ulong noteId = mSelectedItem->modelIndex().data(
NotesNamespace::IdRole).value<qulonglong>();
AgendaEntry entry = mAgendaUtil->fetchById(noteId);
@@ -429,7 +407,6 @@
}
mAgendaUtil->updateEntry(entry);
- qDebug() << "notes : NotesMainView::markNoteAsFavourite <--";
}
/*!
@@ -441,14 +418,11 @@
*/
void NotesMainView::handleEditingCompleted(bool status)
{
- qDebug() << "notes: NotesMainView::handleEditingCompleted -->";
-
Q_UNUSED(status)
// Cleanup.
mNotesEditor->deleteLater();
- qDebug() << "notes: NotesMainView::handleEditingCompleted <--";
}
/*!
@@ -456,12 +430,10 @@
*/
void NotesMainView::displayCollectionView()
{
- qDebug() << "notes: NotesMainView::displayCollectionView -->";
// Switch to collections view.
mAppControllerIf->switchToView(NotesNamespace::NotesCollectionViewId);
- qDebug() << "notes: NotesMainView::displayCollectionView <--";
}
/*!
@@ -471,11 +443,7 @@
*/
void NotesMainView::scrollTo(QModelIndex index)
{
- qDebug() << "notes: NotesMainView::scrollTo -->";
-
mListView->scrollTo(index, HbAbstractItemView::EnsureVisible);
-
- qDebug() << "notes: NotesMainView::scrollTo <--";
}
/*!
@@ -483,15 +451,12 @@
\param status Indicates the status of viewing
*/
-void NotesMainView::handleViewingCompleted(bool status)
+void NotesMainView::handleViewingCompleted()
{
- qDebug() << "notes: NotesMainView::handleViewingCompleted -->";
- Q_UNUSED(status)
mAgendaEventViewer->deleteLater();
- qDebug() << "notes: NotesMainView::handleViewingCompleted <--";
}
/*!
@@ -499,11 +464,7 @@
*/
void NotesMainView::handleActionStateChanged()
{
- qDebug() << "notes: NotesMainView::handleActionStateChanged -->";
-
mAllNotesAction->setChecked(true);
-
- qDebug() << "notes: NotesMainView::handleActionStateChanged <--";
}
/*!
@@ -512,18 +473,15 @@
void NotesMainView::editTodo()
{
- qDebug() << "notes: NotesMainView::editTodo -->";
// Get the selected list item index
QModelIndex index = mSelectedItem->modelIndex();
if (!index.isValid()) {
- qDebug() << "notes: NotesMainView::editTodo <--";
return;
}
ulong todoId =
index.data(NotesNamespace::IdRole).value<qulonglong>();
if (!todoId) {
- qDebug() << "notes: NotesMainView::editTodo <--";
return;
}
@@ -537,7 +495,6 @@
// Launch the to-do editor with the obtained info.
mNotesEditor->edit(todoId);
- qDebug() << "notes: NotesMainView::editTodo <--";
}
/*!
@@ -552,18 +509,8 @@
if (Qt::Horizontal == orientation) {
prototype->setStretchingStyle(HbListViewItem::StretchLandscape);
-
- // Set the text in landscape mode
- mAllNotesAction->setText(hbTrId("txt_notes_button_all"));
- mViewCollectionAction->setText(hbTrId("txt_notes_button_collections"));
- mAddNoteAction->setText(hbTrId("txt_notes_button_new_note"));
} else {
prototype->setStretchingStyle(HbListViewItem::NoStretching);
-
- // Set empty text in portriat mode so that only icons are visible.
- mAllNotesAction->setText("");
- mViewCollectionAction->setText("");
- mAddNoteAction->setText("");
}
}
@@ -584,4 +531,92 @@
mSubTitle->setHeading(
hbTrId("txt_notes_subhead_ln_notes",entries.count()));
}
+
+/*!
+ Slot to make a note as to-do.
+ */
+void NotesMainView::markNoteAsTodo()
+{
+ Q_ASSERT(mSelectedItem);
+
+ QModelIndex index = mSelectedItem->modelIndex();
+ if (!index.isValid()) {
+ return;
+ }
+ ulong noteId = index.data(NotesNamespace::IdRole).value<qulonglong> ();
+ if (!noteId) {
+ return;
+ }
+ // Get the entry details.
+ AgendaEntry entry = mAgendaUtil->fetchById(noteId);
+
+ if (entry.isNull()) {
+ // Entry invalid.
+ return;
+ }
+
+ // Here change the type of modified note and destroy the noteeditor and
+ // construct the to-do editor.
+ entry.setType(AgendaEntry::TypeTodo);
+
+ QDateTime dueDateTime;
+ QDate currentDate(QDate::currentDate());
+ dueDateTime.setDate(
+ QDate(currentDate.year(),currentDate.month(),currentDate.day()+1));
+ dueDateTime.setTime(QTime::fromString("12:00 am", "hh:mm ap"));
+
+ entry.setStartAndEndTime(dueDateTime, dueDateTime);
+
+ entry.setSummary(entry.description().left(80));
+
+ if (80 > entry.description().length()) {
+ entry.setDescription("");
+ }
+
+ // Remove favourite if marked so.
+ entry.setFavourite(0);
+
+ // Set the status of the to-do.
+ entry.setStatus(AgendaEntry::TodoNeedsAction);
+
+ // First clone the todoEntry for the new type.
+ mAgendaUtil->cloneEntry(entry, AgendaEntry::TypeTodo);
+
+ // Delete the old entry.
+ mAgendaUtil->deleteEntry(entry.id());
+}
+
+
+/*
+ Opens the notes editor if selected item is note otherwise opens
+ to-do viewer if selected item is to-do event
+ */
+void NotesMainView::openNote()
+{
+ ulong noteId = mSelectedItem->modelIndex().data(
+ NotesNamespace::IdRole).value<qulonglong>();
+ AgendaEntry entry = mAgendaUtil->fetchById(noteId);
+
+ if (AgendaEntry::TypeNote == entry.type()) {
+ // Construct notes editor.
+ mNotesEditor = new NotesEditor(mAgendaUtil, this);
+ connect(
+ mNotesEditor, SIGNAL(editingCompleted(bool)),
+ this, SLOT(handleEditingCompleted(bool)));
+
+ // Launch the notes editor with the obtained info.
+ mNotesEditor->edit(entry);
+ } else if (AgendaEntry::TypeTodo == entry.type()) {
+
+ // Construct agenda event viewer.
+ mAgendaEventViewer = new AgendaEventViewer(mAgendaUtil, this);
+
+ connect(
+ mAgendaEventViewer, SIGNAL(viewingCompleted(bool)),
+ this, SLOT(handleViewingCompleted(bool)));
+ // Launch agenda event viewer
+ mAgendaEventViewer->view(
+ entry, AgendaEventViewer::ActionEditDelete);
+ }
+}
// End of file --Don't remove this.
--- a/notes/notesui/notesviews/src/notesnoteview.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/notesviews/src/notesnoteview.cpp Mon May 03 12:30:32 2010 +0300
@@ -17,7 +17,6 @@
*/
// System includes
-#include <QDebug>
#include <QDateTime>
#include <HbListView>
#include <HbListWidget>
@@ -56,11 +55,7 @@
mSelectedItem(0),
mDeleteAction(0)
{
- qDebug() << "notes: NotesNoteView::NotesNoteView -->";
-
// Nothing yet.
-
- qDebug() << "notes: NotesNoteView::NotesNoteView <--";
}
/*!
@@ -68,14 +63,10 @@
*/
NotesNoteView::~NotesNoteView()
{
- qDebug() << "notes: NotesNoteView::~NotesNoteView -->";
-
if (mDocLoader) {
delete mDocLoader;
mDocLoader = 0;
}
-
- qDebug() << "notes: NotesNoteView::~NotesNoteView <--";
}
/*!
@@ -88,8 +79,6 @@
void NotesNoteView::setupView(
NotesAppControllerIf &controllerIf, NotesDocLoader *docLoader)
{
- qDebug() << "notes: NotesNoteView::setupView -->";
-
mDocLoader = docLoader;
mAppControllerIf = &controllerIf;
mNotesModel = mAppControllerIf->notesModel();
@@ -153,7 +142,9 @@
window, SIGNAL(orientationChanged(Qt::Orientation)),
this, SLOT(handleOrientationChanged(Qt::Orientation)));
- qDebug() << "notes: NotesNoteView::setupView <--";
+ // Set the graphics size for the icons.
+ HbListViewItem *prototype = mListView->listItemPrototype();
+ prototype->setGraphicsSize(HbListViewItem::SmallIcon);
}
/*!
@@ -161,16 +152,12 @@
*/
void NotesNoteView::createNewNote()
{
- qDebug() << "notes: NotesNoteView::createNewNote -->";
-
// Here we Display an editor to the use to enter text.
mNotesEditor = new NotesEditor(mAgendaUtil, this);
connect(
mNotesEditor, SIGNAL(editingCompleted(bool)),
this, SLOT(handleEditingCompleted(bool)));
mNotesEditor->create(NotesEditor::CreateNote);
-
- qDebug() << "notes: NotesNoteView::createNewNote <--";
}
/*!
@@ -183,12 +170,8 @@
*/
void NotesNoteView::handleItemReleased(const QModelIndex &index)
{
- qDebug() << "notes: NotesNoteView::handleItemReleased -->";
-
// Sanity check.
if (!index.isValid()) {
- qDebug() << "notes: NotesNoteView::handleItemReleased <--";
-
return;
}
@@ -197,8 +180,6 @@
ulong noteId = index.data(NotesNamespace::IdRole).value<qulonglong>();
if (0 >= noteId) {
- qDebug() << "notes: NotesNoteView::handleItemReleased <--";
-
// Something wrong.
return;
}
@@ -207,8 +188,6 @@
AgendaEntry entry = mAgendaUtil->fetchById(noteId);
if (entry.isNull()) {
- qDebug() << "notes: NotesNoteView::handleItemReleased <--";
-
// Entry invalid.
return;
}
@@ -219,8 +198,6 @@
mNotesEditor, SIGNAL(editingCompleted(bool)),
this, SLOT(handleEditingCompleted(bool)));
mNotesEditor->edit(entry);
-
- qDebug() << "notes: NotesNoteView::handleItemReleased <--";
}
/*!
@@ -234,8 +211,6 @@
void NotesNoteView::handleItemLongPressed(
HbAbstractViewItem *item, const QPointF &coords)
{
- qDebug() << "notes: NotesNoteView::handleItemLongPressed -->";
-
mSelectedItem = item;
ulong noteId = item->modelIndex().data(
@@ -246,6 +221,12 @@
HbMenu *contextMenu = new HbMenu();
// Add actions to the context menu.
+ mOpenAction =
+ contextMenu->addAction(hbTrId("txt_common_menu_open"));
+ connect(
+ mOpenAction, SIGNAL(triggered()),
+ this, SLOT(openNote()));
+
mDeleteAction =
contextMenu->addAction(hbTrId("txt_common_menu_delete"));
connect(
@@ -280,8 +261,6 @@
// Show the menu.
contextMenu->exec(coords);
-
- qDebug() << "notes: NotesNoteView::handleItemLongPressed <--";
}
/*!
@@ -289,30 +268,21 @@
*/
void NotesNoteView::deleteNote()
{
- qDebug() << "notes: NotesNoteView::deleteNote -->";
-
Q_ASSERT(mSelectedItem);
QModelIndex index = mSelectedItem->modelIndex();
if (!index.isValid()) {
- qDebug() << "notes: NotesNoteView::deleteNote <--";
-
return;
}
ulong noteId =
index.data(NotesNamespace::IdRole).value<qulonglong>();
if (!noteId) {
- qDebug() << "notes: NotesNoteView::deleteNote <--";
-
return;
}
-
- // Delete the given note.
- mAgendaUtil->deleteEntry(noteId);
+ // Emitting the signal , deletion would be handle in view manager.
+ emit deleteEntry(noteId);
mSelectedItem = 0;
-
- qDebug() << "notes: NotesNoteView::deleteNote <--";
}
/*!
@@ -320,8 +290,6 @@
*/
void NotesNoteView::markNoteAsFavourite()
{
- qDebug() << "notes : NotesNoteView::markNoteAsFavourite -->";
-
ulong noteId = mSelectedItem->modelIndex().data(
NotesNamespace::IdRole).value<qulonglong>();
AgendaEntry entry = mAgendaUtil->fetchById(noteId);
@@ -332,8 +300,6 @@
entry.setFavourite(1);
}
mAgendaUtil->updateEntry(entry);
-
- qDebug() << "notes : NotesNoteView::markNoteAsFavourite <--";
}
/*!
@@ -341,29 +307,21 @@
*/
void NotesNoteView::markNoteAsTodo()
{
- qDebug() << "notes : NotesNoteView::markNoteAsTodo -->";
-
Q_ASSERT(mSelectedItem);
QModelIndex index = mSelectedItem->modelIndex();
if (!index.isValid()) {
- qDebug() << "notes: NotesNoteView::markNoteAsTodo <--";
-
return;
}
ulong noteId =
index.data(NotesNamespace::IdRole).value<qulonglong>();
if (!noteId) {
- qDebug() << "notes: NotesNoteView::markNoteAsTodo <--";
-
return;
}
// Get the entry details.
AgendaEntry entry = mAgendaUtil->fetchById(noteId);
if (entry.isNull()) {
- qDebug() << "notes: NotesNoteView::markNoteAsTodo <--";
-
// Entry invalid.
return;
}
@@ -373,7 +331,9 @@
entry.setType(AgendaEntry::TypeTodo);
QDateTime dueDateTime;
- dueDateTime.setDate(QDate::currentDate());
+ QDate currentDate(QDate::currentDate());
+ dueDateTime.setDate(
+ QDate(currentDate.year(),currentDate.month(),currentDate.day()+1));
dueDateTime.setTime(QTime::fromString("12:00 am", "hh:mm ap"));
entry.setStartAndEndTime(dueDateTime, dueDateTime);
@@ -397,7 +357,6 @@
// Delete the old entry.
mAgendaUtil->deleteEntry(entry.id());
- qDebug() << "notes : NotesNoteView::markNoteAsTodo <--";
}
/*!
@@ -409,14 +368,10 @@
*/
void NotesNoteView::handleEditingCompleted(bool status)
{
- qDebug() << "notes: NotesNoteView::handleEditingCompleted -->";
-
Q_UNUSED(status)
// Cleanup.
mNotesEditor->deleteLater();
-
- qDebug() << "notes: NotesNoteView::handleEditingCompleted <--";
}
/*!
@@ -424,12 +379,9 @@
*/
void NotesNoteView::displayCollectionView()
{
- qDebug() << "notes: NotesNoteView::displayCollectionView -->";
-
// Switch to collections view.
mAppControllerIf->switchToView(NotesNamespace::NotesCollectionViewId);
- qDebug() << "notes: NotesNoteView::displayCollectionView <--";
}
/*!
@@ -437,12 +389,8 @@
*/
void NotesNoteView::displayAllNotesView()
{
- qDebug() << "notes: NotesNoteView::displayAllNotesView -->";
-
// Switch to collections view.
mAppControllerIf->switchToView(NotesNamespace::NotesMainViewId);
-
- qDebug() << "notes: NotesNoteView::displayAllNotesView <--";
}
/*!
@@ -450,11 +398,7 @@
*/
void NotesNoteView::handleActionStateChanged()
{
- qDebug() << "notes: NotesNoteView::handleActionStateChanged -->";
-
mAllNotesAction->setChecked(true);
-
- qDebug() << "notes: NotesNoteView::handleActionStateChanged <--";
}
/*!
@@ -469,20 +413,29 @@
if (Qt::Horizontal == orientation) {
prototype->setStretchingStyle(HbListViewItem::StretchLandscape);
-
- // Set the text in landscape mode
- mAllNotesAction->setText(hbTrId("txt_notes_button_all"));
- mViewCollectionAction->setText(hbTrId("txt_notes_button_collections"));
- mAddNoteAction->setText(hbTrId("txt_notes_button_new_note"));
} else {
prototype->setStretchingStyle(HbListViewItem::NoStretching);
-
- // Set empty text in portriat mode so that only icons are visible.
- mAllNotesAction->setText("");
- mViewCollectionAction->setText("");
- mAddNoteAction->setText("");
}
}
+/*
+ Opens the notes editor to edit the note.
+ */
+void NotesNoteView::openNote()
+{
+ ulong noteId = mSelectedItem->modelIndex().data(
+ NotesNamespace::IdRole).value<qulonglong>();
+
+ AgendaEntry entry = mAgendaUtil->fetchById(noteId);
+
+ // Construct notes editor.
+ mNotesEditor = new NotesEditor(mAgendaUtil, this);
+ connect(
+ mNotesEditor, SIGNAL(editingCompleted(bool)),
+ this, SLOT(handleEditingCompleted(bool)));
+
+ // Launch the notes editor with the obtained info.
+ mNotesEditor->edit(entry);
+}
// End of file --Don't remove this.
--- a/notes/notesui/notesviews/src/notestodoview.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/notes/notesui/notesviews/src/notestodoview.cpp Mon May 03 12:30:32 2010 +0300
@@ -17,7 +17,6 @@
*/
// System includes
-#include <QDebug>
#include <QDateTime>
#include <HbListView>
#include <HbListWidget>
@@ -60,11 +59,7 @@
mSelectedItem(0),
mDeleteAction(0)
{
- qDebug() << "notes: NotesTodoView::NotesTodoView -->";
-
// Nothing yet.
-
- qDebug() << "notes: NotesTodoView::NotesTodoView <--";
}
/*!
@@ -72,14 +67,10 @@
*/
NotesTodoView::~NotesTodoView()
{
- qDebug() << "notes: NotesTodoView::~NotesTodoView -->";
-
if (mDocLoader) {
delete mDocLoader;
mDocLoader = 0;
}
-
- qDebug() << "notes: NotesTodoView::~NotesTodoView <--";
}
/*!
@@ -92,8 +83,6 @@
void NotesTodoView::setupView(
NotesAppControllerIf &controllerIf, NotesDocLoader *docLoader)
{
- qDebug() << "notes: NotesMainView::setupView -->";
-
mDocLoader = docLoader;
mAppControllerIf = &controllerIf;
mNotesModel = mAppControllerIf->notesModel();
@@ -173,7 +162,9 @@
mAgendaUtil, SIGNAL(entryUpdated(ulong)),
this, SLOT(updateSubTitle(ulong)));
- qDebug() << "notes: NotesMainView::setupView <--";
+ // Set the graphics size for the icons.
+ HbListViewItem *prototype = mListView->listItemPrototype();
+ prototype->setGraphicsSize(HbListViewItem::SmallIcon);
}
/*!
@@ -181,16 +172,12 @@
*/
void NotesTodoView::createNewTodo()
{
- qDebug() << "notes: NotesTodoView::createNewTodo -->";
-
mNotesEditor = new NotesEditor(mAgendaUtil, this);
connect(
mNotesEditor, SIGNAL(editingCompleted(bool)),
this, SLOT(handleEditingCompleted(bool)));
mNotesEditor->create(NotesEditor::CreateTodo);
-
- qDebug() << "notes: NotesTodoView::createNewTodo -->";
}
/*!
@@ -203,12 +190,8 @@
*/
void NotesTodoView::handleItemReleased(const QModelIndex &index)
{
- qDebug() << "notes: NotesTodoView::handleItemReleased -->";
-
// Sanity check.
if (!index.isValid()) {
- qDebug() << "notes: NotesTodoView::handleItemReleased <--";
-
return;
}
@@ -217,8 +200,6 @@
ulong toDoId = index.data(NotesNamespace::IdRole).value<qulonglong>();
if (0 >= toDoId) {
- qDebug() << "notes: NotesTodoView::handleItemReleased <--";
-
// Something wrong.
return;
}
@@ -227,12 +208,10 @@
mAgendaEventViewer = new AgendaEventViewer(mAgendaUtil, this);
connect(
- mAgendaEventViewer, SIGNAL(viewingCompleted(bool)),
+ mAgendaEventViewer, SIGNAL(viewingCompleted(const QDate)),
this, SLOT(handleViewingCompleted()));
// Launch agenda event viewer
mAgendaEventViewer->view(toDoId, AgendaEventViewer::ActionEditDelete);
-
- qDebug() << "notes: NotesTodoView::handleItemReleased <--";
}
/*!
@@ -246,8 +225,6 @@
void NotesTodoView::handleItemLongPressed(
HbAbstractViewItem *item, const QPointF &coords)
{
- qDebug() << "notes: NotesTodoView::handleItemLongPressed -->";
-
mSelectedItem = item;
// Get the entry of the selected item.
@@ -259,13 +236,18 @@
HbMenu *contextMenu = new HbMenu();
// Add actions to the context menu.
+ mOpenAction =
+ contextMenu->addAction(hbTrId("txt_common_menu_open"));
+ connect(
+ mOpenAction, SIGNAL(triggered()),
+ this, SLOT(openTodo()));
+
mEditAction = contextMenu->addAction(
hbTrId("txt_common_menu_edit"));
connect(
mEditAction, SIGNAL(triggered()),
this, SLOT(editTodo()));
-
mDeleteAction = contextMenu->addAction(
hbTrId("txt_common_menu_delete"));
connect(
@@ -292,8 +274,6 @@
// Show the menu.
contextMenu->exec(coords);
-
- qDebug() << "notes: NotesTodoView::handleItemLongPressed <--";
}
/*!
@@ -301,30 +281,22 @@
*/
void NotesTodoView::deleteTodo()
{
- qDebug() << "notes: NotesTodoView::deleteTodo -->";
-
Q_ASSERT(mSelectedItem);
QModelIndex index = mSelectedItem->modelIndex();
if (!index.isValid()) {
- qDebug() << "notes: NotesTodoView::deleteTodo <--";
-
return;
}
ulong entryId =
index.data(NotesNamespace::IdRole).value<qulonglong>();
if (!entryId) {
- qDebug() << "notes: NotesTodoView::deleteTodo <--";
-
return;
}
- // Delete the given note.
- mAgendaUtil->deleteEntry(entryId);
+ // Emit the signal. Delete would be handled in view manager.
+ emit deleteEntry(entryId);
mSelectedItem = 0;
-
- qDebug() << "notes: NotesTodoView::deleteTodo <--";
}
/*!
@@ -332,8 +304,6 @@
*/
void NotesTodoView::markTodoStatus()
{
- qDebug() << "notes: NotesTodoView::markTodoStatus -->";
-
ulong entryId = mSelectedItem->modelIndex().data(
NotesNamespace::IdRole).value<qulonglong>();
AgendaEntry entry = mAgendaUtil->fetchById(entryId);
@@ -345,8 +315,6 @@
} else if (AgendaEntry::TodoCompleted == entry.status()) {
mAgendaUtil->setCompleted(entry, false, currentDateTime);
}
-
- qDebug() << "notes: NotesTodoView::markTodoStatus <-- ";
}
/*!
@@ -354,14 +322,10 @@
*/
void NotesTodoView::editTodo()
{
- qDebug() << "notes: NotesTodoView::editTodo -->";
-
QModelIndex index = mSelectedItem->modelIndex();
// Sanity check.
if (!index.isValid()) {
- qDebug() << "notes: NotesTodoView::editTodo <--";
-
return;
}
@@ -370,8 +334,6 @@
ulong noteId = index.data(NotesNamespace::IdRole).value<qulonglong>();
if (0 >= noteId) {
- qDebug() << "notes: NotesTodoView::editTodo <--";
-
// Something wrong.
return;
}
@@ -380,8 +342,6 @@
AgendaEntry entry = mAgendaUtil->fetchById(noteId);
if (entry.isNull()) {
- qDebug() << "notes: NotesTodoView::editTodo <--";
-
// Entry invalid.
return;
}
@@ -392,8 +352,6 @@
mNotesEditor, SIGNAL(editingCompleted(bool)),
this, SLOT(handleEditingCompleted(bool)));
mNotesEditor->edit(entry);
-
- qDebug() << "notes: NotesTodoView::editTodo <--";
}
/*!
@@ -405,14 +363,10 @@
*/
void NotesTodoView::handleEditingCompleted(bool status)
{
- qDebug() << "notes: NotesMainView::handleEditingCompleted -->";
-
Q_UNUSED(status)
// Cleanup.
mNotesEditor->deleteLater();
-
- qDebug() << "notes: NotesMainView::handleEditingCompleted <--";
}
/*!
@@ -420,12 +374,8 @@
*/
void NotesTodoView::displayCollectionView()
{
- qDebug() << "notes: NotesTodoView::displayCollectionView -->";
-
// Switch to collections view.
mAppControllerIf->switchToView(NotesNamespace::NotesCollectionViewId);
-
- qDebug() << "notes: NotesTodoView::displayCollectionView <--";
}
/*!
@@ -433,12 +383,8 @@
*/
void NotesTodoView::displayAllNotesView()
{
- qDebug() << "notes: NotesTodoView::displayAllNotesView -->";
-
// Switch to collections view.
mAppControllerIf->switchToView(NotesNamespace::NotesMainViewId);
-
- qDebug() << "notes: NotesTodoView::displayAllNotesView <--";
}
/*!
@@ -446,26 +392,17 @@
*/
void NotesTodoView::handleEditingCompleted()
{
- qDebug() <<"notes: NotesTodoView::handleEditingCompleted -->";
-
// Cleanup.
mNotesEditor->deleteLater();
-
- qDebug() <<"notes: NotesTodoView::handleEditingCompleted <--";
}
/*!
Slot to handle signal handleViewingompleted by the agenda event viewer
*/
-void NotesTodoView::handleViewingCompleted(bool status)
+void NotesTodoView::handleViewingCompleted()
{
- qDebug() <<"notes: NotesTodoView::handleEditingCompleted -->";
-
- Q_UNUSED(status)
// Cleanup.
mAgendaEventViewer->deleteLater();
-
- qDebug() <<"notes: NotesTodoView::handleEditingCompleted <--";
}
/*!
@@ -473,11 +410,7 @@
*/
void NotesTodoView::handleActionStateChanged()
{
- qDebug() << "notes: NotesTodoView::handleActionStateChanged -->";
-
mAllNotesAction->setChecked(true);
-
- qDebug() << "notes: NotesTodoView::handleActionStateChanged <--";
}
/*!
@@ -492,18 +425,8 @@
if (Qt::Horizontal == orientation) {
prototype->setStretchingStyle(HbListViewItem::StretchLandscape);
-
- // Set the text in landscape mode
- mAllNotesAction->setText(hbTrId("txt_notes_button_all"));
- mViewCollectionAction->setText(hbTrId("txt_notes_button_collections"));
- mAddTodoAction->setText(hbTrId("txt_notes_button_new_todo"));
} else {
prototype->setStretchingStyle(HbListViewItem::NoStretching);
-
- // Set empty text in portriat mode so that only icons are visible.
- mAllNotesAction->setText("");
- mViewCollectionAction->setText("");
- mAddTodoAction->setText("");
}
}
@@ -521,4 +444,25 @@
hbTrId("txt_notes_subhead_todos_ln_pending",entries.count()));
}
+/*
+ Opens the to-do viewer to view the to-do.
+ */
+void NotesTodoView::openTodo()
+{
+ ulong noteId = mSelectedItem->modelIndex().data(
+ NotesNamespace::IdRole).value<qulonglong>();
+ AgendaEntry entry = mAgendaUtil->fetchById(noteId);
+
+ // Construct agenda event viewer.
+ mAgendaEventViewer = new AgendaEventViewer(mAgendaUtil, this);
+
+ connect(
+ mAgendaEventViewer, SIGNAL(viewingCompleted(bool)),
+ this, SLOT(handleViewingCompleted(bool)));
+
+ // Launch agenda event viewer
+ mAgendaEventViewer->view(
+ entry, AgendaEventViewer::ActionEditDelete);
+}
+
// End of file --Don't remove this.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/organizer_info/organizer_metadata/organizer_metadata.mrp Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,22 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+component organizer_metadata
+source \sf\app\organizer\organizer_info\organizer_metadata
+source \sf\app\organizer\package_definition.xml
+source \sf\app\organizer\distribution.policy.s60
+notes_source \component_defs\release.src
+ipr T
--- a/organizer_plat/agenda_interface_api/inc/agendaentry.h Fri Apr 16 14:57:40 2010 +0300
+++ b/organizer_plat/agenda_interface_api/inc/agendaentry.h Mon May 03 12:30:32 2010 +0300
@@ -32,6 +32,7 @@
class AgendaCategoryPrivate;
class AgendaEntryPrivate;
class AgendaRepeatRulePrivate;
+class AgendaGeoValuePrivate;
class XQCALENDAR_EXPORT AgendaAttendee
{
@@ -158,6 +159,30 @@
AgendaAlarmPrivate* d;
};
+class XQCALENDAR_EXPORT AgendaGeoValue
+{
+public:
+
+ AgendaGeoValue();
+ AgendaGeoValue(const AgendaGeoValue& other);
+ ~AgendaGeoValue();
+
+ void setLatLong(double latitude, double longitude);
+ void getLatLong(double& latitude, double& longitude) const;
+
+ bool isNull() const;
+
+ AgendaGeoValue& operator=(const AgendaGeoValue& other);
+ bool operator==(const AgendaGeoValue& other) const;
+ bool operator!=(const AgendaGeoValue& other) const;
+
+private:
+ void detach();
+
+private:
+ AgendaGeoValuePrivate* d;
+};
+
class XQCALENDAR_EXPORT AgendaRepeatRule
{
public:
@@ -210,11 +235,11 @@
void setInterval(int interval);
int interval() const;
- void setUntil(const QDate& date);
- QDate until() const;
+ void setUntil(const QDateTime& date);
+ QDateTime until() const;
- void setRepeatRuleStart(const QDate& date);
- QDate repeatRuleStart() const;
+ void setRepeatRuleStart(const QDateTime& date);
+ QDateTime repeatRuleStart() const;
void setWeekStart(Day day);
Day weekStart() const;
@@ -349,6 +374,12 @@
void setCompletedDateTime(const QDateTime& dateTime);
QDateTime completedDateTime() const;
+
+ void setDTStamp(const QDateTime& dateTime);
+ QDateTime dtStamp() const;
+
+ void setGeoValue(const AgendaGeoValue& geoValue);
+ AgendaGeoValue geoValue() const;
int durationInSecs() const;
AgendaEntry& operator=(const AgendaEntry& other);
--- a/organizer_plat/agenda_interface_api/inc/agendautil.h Fri Apr 16 14:57:40 2010 +0300
+++ b/organizer_plat/agenda_interface_api/inc/agendautil.h Mon May 03 12:30:32 2010 +0300
@@ -106,10 +106,14 @@
QDateTime& endTime);
void getNextInstanceTimes(AgendaEntry& entry, QDateTime& startTime,
QDateTime& endTime);
-
+ void markDatesWithEvents(QDateTime rangeStart, QDateTime rangeEnd,
+ AgendaUtil::FilterFlags filter, QList<QDate>& dates);
+ bool areNoEntriesInCalendar();
static QDateTime minTime();
static QDateTime maxTime();
+ static bool isWorkdaysRepeatingEntry(const AgendaRepeatRule& repeatRule);
+
Q_SIGNALS:
void entriesChanged(QList<ulong> ids);
void entryAdded(ulong id);
--- a/organizer_plat/agenda_interface_api/tsrc/unittest_agendautil/src/unittest_agendautil.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/organizer_plat/agenda_interface_api/tsrc/unittest_agendautil/src/unittest_agendautil.cpp Mon May 03 12:30:32 2010 +0300
@@ -38,6 +38,7 @@
void init();
void cleanup();
void initTestCase();
+ void cleanupTestCase();
// Test cases.
void test_addEntry();
@@ -50,13 +51,7 @@
void test_fetchAllEntries();
void test_deleteEntries();
void test_fetchEntriesInRange();
- void test_createException();
- void test_storeRepeatingEntries();
- void test_setCompleted();
- void test_clearRepeatingEntries();
- void test_getNextInstanceTimes();
- void test_getPreviousInstanceTimes();
-
+
private:
AgendaUtil *mAgendaUtil;
CActiveSchedulerWait* mWait;
@@ -73,7 +68,7 @@
*/
void TestAgendaUtil::init()
{
- QT_TRAP_THROWING(mAgendaUtil = new AgendaUtil);
+ /*QT_TRAP_THROWING(mAgendaUtil = new AgendaUtil);
Q_ASSERT_X(mAgendaUtil, "TestAgendaUtil::test_addEntry", "No agendautil");
@@ -82,7 +77,7 @@
mAgendaUtil, SIGNAL(entriesDeleted(int)), this,
SLOT(handleEntriesDeletion(int)));
- mWait = NULL;
+ mWait = NULL;*/
}
/*!
@@ -90,14 +85,13 @@
*/
void TestAgendaUtil::cleanup()
{
- if (mAgendaUtil) {
- delete mAgendaUtil;
- }
-
- if (mWait && mWait->IsStarted()) {
- mWait->AsyncStop();
- }
- delete mWait;
+
+ //User::Exit(0);
+ if (mWait && mWait->IsStarted()) {
+ mWait->AsyncStop();
+ }
+ delete mWait;
+ mWait = NULL;
}
/*!
This function is called to init the testcase.
@@ -116,6 +110,14 @@
mWait = NULL;
}
+void TestAgendaUtil::cleanupTestCase()
+{
+ //User::Exit(0);
+ QCoreApplication::processEvents();
+ if (mAgendaUtil) {
+ delete mAgendaUtil;
+ }
+}
/*
Tests the AgendaUtil::addEntry.
*/
@@ -180,8 +182,10 @@
QDateTime::currentDateTime());
AgendaRepeatRule repeatRule;
repeatRule.setType(AgendaRepeatRule::DailyRule);
- repeatRule.setRepeatRuleStart(QDate(2019, 11, 3));
- repeatRule.setUntil(QDate(2019, 12, 3));
+ QDateTime ruleStartDateTime(QDate(2019, 11, 3));
+ repeatRule.setRepeatRuleStart(ruleStartDateTime);
+ QDateTime until(QDate(2019, 12, 3));
+ repeatRule.setUntil(until);
repeatRule.setInterval(1);
entry.setRepeatRule(repeatRule);
@@ -552,6 +556,10 @@
// Verify
int num = entries.count();
QVERIFY( 1 == entries.count());
+
+ //cleanup();
+
+ //User::Exit(0);
}
/*!
@@ -567,273 +575,6 @@
}
/*!
- Test the api AgendaUtil::createException.
- */
-void TestAgendaUtil::test_createException()
-{
- // Clean up all the entries.
- QDateTime startRange(QDate(1900, 01, 1), QTime(0, 0, 0, 0));
- QDateTime endRange(QDate(2100, 12, 30), QTime(23, 59, 59, 0));
- mAgendaUtil->deleteEntries(startRange,endRange);
-
- // Start the timer as the above operation is asynchronous
- if (!mWait) {
- QT_TRAP_THROWING(mWait = new (ELeave) CActiveSchedulerWait;);
- if (!mWait->IsStarted()) {
- mWait->Start();
- }
- }
-
- // Test case setup.
- // Create a repeating entry.
- AgendaEntry entry;
- QDate dateSet(2010, 05, 05);
- QDate repeatUntilDate(2010, 05, 15);
- QDateTime exceptionEntryDate(QDate(2010, 05, 15), QTime(0, 0, 0, 0));
- QTime timeSet(10, 10, 10, 10);
- QDateTime startDateTimeSet(dateSet,timeSet);
- QDateTime endDateTimeSet = startDateTimeSet.addSecs(60*60);
- entry.setType(AgendaEntry::TypeEvent);
- entry.setSummary("parent");
- AgendaRepeatRule repeatRule;
- repeatRule.setType(AgendaRepeatRule::DailyRule);
- repeatRule.setRepeatRuleStart(dateSet);
- repeatRule.setInterval(1);
- repeatRule.setUntil(repeatUntilDate);
- entry.setRepeatRule(repeatRule);
- entry.setStartAndEndTime(startDateTimeSet, endDateTimeSet);
-
- ulong id = mAgendaUtil->addEntry(entry);
-
- // Get the instance
- QList<AgendaEntry> entriesList;
- entriesList.append(mAgendaUtil->createEntryIdListForDay(exceptionEntryDate));
-
- AgendaEntry exceptionEntry = entriesList.at(0);
- // Make some changes to make it exception
- exceptionEntry.setSummary("child");
- mAgendaUtil->createException(exceptionEntry);
-
- // Fetch the parent and child entry and check for changes.
- entriesList.clear();
- entriesList.append(mAgendaUtil->createEntryIdListForDay(exceptionEntryDate));
- AgendaEntry parentEntry = mAgendaUtil->fetchById(id);
- QVERIFY(parentEntry.summary() == "parent");
- QVERIFY(entriesList[0].summary() == "child");
-}
-
-/*!
- Test the api AgendaUtil::storeRepeatingEntries.
- */
-void TestAgendaUtil::test_storeRepeatingEntries()
-{
- // Clean up all the entries.
- QDateTime startRange(QDate(1900, 01, 1), QTime(0, 0, 0, 0));
- QDateTime endRange(QDate(2100, 12, 30), QTime(23, 59, 59, 0));
- mAgendaUtil->deleteEntries(startRange,endRange);
-
- // Start the timer as the above operation is asynchronous
- if (!mWait) {
- QT_TRAP_THROWING(mWait = new (ELeave) CActiveSchedulerWait;);
- if (!mWait->IsStarted()) {
- mWait->Start();
- }
- }
-
- // Test case setup.
- // Create a repeating entry.
- AgendaEntry entry;
- QDate dateSet(2010, 05, 05);
- QDate repeatUntilDate(2010, 05, 15);
- QDateTime instanceEntryDate(QDate(2010, 05, 15), QTime(0, 0, 0, 0));
- QTime timeSet(10, 10, 10, 10);
- QDateTime startDateTimeSet(dateSet,timeSet);
- QDateTime endDateTimeSet = startDateTimeSet.addSecs(60*60);
- entry.setType(AgendaEntry::TypeEvent);
- entry.setSummary("subject");
- AgendaRepeatRule repeatRule;
- repeatRule.setType(AgendaRepeatRule::DailyRule);
- repeatRule.setRepeatRuleStart(dateSet);
- repeatRule.setInterval(1);
- repeatRule.setUntil(repeatUntilDate);
- entry.setRepeatRule(repeatRule);
- entry.setStartAndEndTime(startDateTimeSet, endDateTimeSet);
-
- ulong id = mAgendaUtil->addEntry(entry);
-
- // Fetch the repeating entry.
- AgendaEntry repeatingEntry = mAgendaUtil->fetchById(id);
-
- // Make some changes and store it back.
- repeatingEntry.setSummary("changedsubject");
- repeatingEntry.setLocation("addedlocation");
- mAgendaUtil->storeRepeatingEntry(repeatingEntry, true);
-
- QList<AgendaEntry> entriesList(mAgendaUtil->createEntryIdListForDay(instanceEntryDate));
-
- // Check for the changes.
- QVERIFY(entriesList[0].summary() == "changedsubject");
- QVERIFY(entriesList[0].location() == "addedlocation");
-}
-
-/*!
- Test the api AgendaUtil::setCompleted.
- */
-void TestAgendaUtil::test_setCompleted()
-{
- // Clean up all the entries.
- QDateTime startRange(QDate(1900, 01, 1), QTime(0, 0, 0, 0));
- QDateTime endRange(QDate(2100, 12, 30), QTime(23, 59, 59, 0));
- mAgendaUtil->deleteEntries(startRange,endRange);
-
- // Start the timer as the above operation is asynchronous
- if (!mWait) {
- QT_TRAP_THROWING(mWait = new (ELeave) CActiveSchedulerWait;);
- if (!mWait->IsStarted()) {
- mWait->Start();
- }
- }
-
- // Create a todo.
- AgendaEntry todo;
- todo.setType(AgendaEntry::TypeTodo);
- todo.setSummary("todo");
-
- ulong id = mAgendaUtil->addEntry(todo);
-
- // Fetch the todo back.
- AgendaEntry fetchedToDo = mAgendaUtil->fetchById(id);
- QDate completedDate(2010, 05, 05);
- QTime completedTime(10, 10, 10);
- QDateTime completedDateTime(completedDate, completedTime);
-
- // Mark it as completed.
- mAgendaUtil->setCompleted(fetchedToDo, true, completedDateTime);
-
- // Check if there is only one completed ToDo and Zero Incompleted ToDo.
- QList<AgendaEntry> entries = mAgendaUtil->fetchAllEntries(AgendaUtil::IncludeCompletedTodos);
- QVERIFY(entries.count() == 1);
- QVERIFY(entries[0].summary() == "todo");
- entries.clear();
- entries.append(mAgendaUtil->fetchAllEntries(AgendaUtil::IncludeIncompletedTodos));
- QVERIFY(entries.count() == 0);
-}
-
-/*!
- Test the api AgendaUtil::getNextInstanceTimes.
- */
-void TestAgendaUtil::test_getNextInstanceTimes()
-{
- // Clean up all the entries.
- QDateTime startRange(QDate(1900, 01, 1), QTime(0, 0, 0, 0));
- QDateTime endRange(QDate(2100, 12, 30), QTime(23, 59, 59, 0));
- mAgendaUtil->deleteEntries(startRange,endRange);
-
- // Start the timer as the above operation is asynchronous
- if (!mWait) {
- QT_TRAP_THROWING(mWait = new (ELeave) CActiveSchedulerWait;);
- if (!mWait->IsStarted()) {
- mWait->Start();
- }
- }
-
- // Test case setup.
- AgendaEntry entry;
- QDate dateSet(2010, 05, 05);
- QDate repeatUntilDate(2010, 05, 15);
- QTime timeSet(10, 10, 10, 10);
- QDateTime startDateTimeSet(dateSet,timeSet);
- QDateTime endDateTimeSet = startDateTimeSet.addSecs(60*60);
- entry.setType(AgendaEntry::TypeEvent);
- entry.setSummary("createdentry");
- AgendaRepeatRule repeatRule;
- repeatRule.setType(AgendaRepeatRule::DailyRule);
- repeatRule.setRepeatRuleStart(dateSet);
- repeatRule.setInterval(1);
- repeatRule.setUntil(repeatUntilDate);
- entry.setRepeatRule(repeatRule);
- entry.setStartAndEndTime(startDateTimeSet, endDateTimeSet);
-
- ulong id = mAgendaUtil->addEntry(entry);
-
- QDateTime startDateTime;
- QDateTime endDateTime;
-
- // Check for a date in between first and last instance.
- QDateTime referenceDateTime(QDate(2010, 05, 8), QTime(0, 0, 0, 0));
- QList<AgendaEntry> entriesList = mAgendaUtil->createEntryIdListForDay(referenceDateTime);
- mAgendaUtil->getNextInstanceTimes(entriesList[0], startDateTime, endDateTime);
-
- QVERIFY(startDateTime.date().day() == 9);
- QVERIFY(startDateTime.date().month() == 5);
- QVERIFY(endDateTime.date().day() == 9);
- QVERIFY(endDateTime.date().month() == 5);
- QVERIFY(startDateTime.time().hour() == 10);
- QVERIFY(startDateTime.time().minute() == 10);
- QVERIFY(endDateTime.time().hour() == 11);
- QVERIFY(endDateTime.time().minute() == 10);
-
- // TODO: Need to check for the boundary condition.
-}
-
-/*!
- Test the api AgendaUtil::getPreviousInstanceTimes.
- */
-void TestAgendaUtil::test_getPreviousInstanceTimes()
-{
- // Clean up all the entries.
- QDateTime startRange(QDate(1900, 01, 1), QTime(0, 0, 0, 0));
- QDateTime endRange(QDate(2100, 12, 30), QTime(23, 59, 59, 0));
- mAgendaUtil->deleteEntries(startRange,endRange);
-
- // Start the timer as the above operation is asynchronous
- if (!mWait) {
- QT_TRAP_THROWING(mWait = new (ELeave) CActiveSchedulerWait;);
- if (!mWait->IsStarted()) {
- mWait->Start();
- }
- }
-
- // Test case setup.
- AgendaEntry entry;
- QDate dateSet(2010, 05, 05);
- QDate repeatUntilDate(2010, 05, 15);
- QTime timeSet(10, 10, 10, 10);
- QDateTime startDateTimeSet(dateSet,timeSet);
- QDateTime endDateTimeSet = startDateTimeSet.addSecs(60*60);
- entry.setType(AgendaEntry::TypeEvent);
- entry.setSummary("createdentry");
- AgendaRepeatRule repeatRule;
- repeatRule.setType(AgendaRepeatRule::DailyRule);
- repeatRule.setRepeatRuleStart(dateSet);
- repeatRule.setInterval(1);
- repeatRule.setUntil(repeatUntilDate);
- entry.setRepeatRule(repeatRule);
- entry.setStartAndEndTime(startDateTimeSet, endDateTimeSet);
-
- ulong id = mAgendaUtil->addEntry(entry);
-
- QDateTime startDateTime;
- QDateTime endDateTime;
-
- // Check for a date in between first and last instance.
- QDateTime referenceDateTime(QDate(2010, 05, 8), QTime(0, 0, 0, 0));
- QList<AgendaEntry> entriesList = mAgendaUtil->createEntryIdListForDay(referenceDateTime);
- mAgendaUtil->getPreviousInstanceTimes(entriesList[0], startDateTime, endDateTime);
-
- QVERIFY(startDateTime.date().day() == 7);
- QVERIFY(startDateTime.date().month() == 5);
- QVERIFY(endDateTime.date().day() == 7);
- QVERIFY(endDateTime.date().month() == 5);
- QVERIFY(startDateTime.time().hour() == 10);
- QVERIFY(startDateTime.time().minute() == 10);
- QVERIFY(endDateTime.time().hour() == 11);
- QVERIFY(endDateTime.time().minute() == 10);
-
- // TODO: Need to check for the boundary condition.
-}
-
-/*!
Private function to create entries needed for some of the test cases.
*/
int TestAgendaUtil::createMultipleEntries()
@@ -880,59 +621,6 @@
return numOfEntries;
}
-/*!
- Test the api AgendaUtil::clearRepeatingEntries.
- */
-void TestAgendaUtil::test_clearRepeatingEntries()
-{
- // TODO : Test case failing. Need to relook into this.
-
- /*// Clean up all the entries.
- QDateTime startRange(QDate(1900, 01, 1), QTime(0, 0, 0, 0));
- QDateTime endRange(QDate(2100, 12, 30), QTime(23, 59, 59, 0));
- mAgendaUtil->deleteEntries(startRange,endRange);
-
- // Start the timer as the above operation is asynchronous
- if (!mWait) {
- QT_TRAP_THROWING(mWait = new (ELeave) CActiveSchedulerWait;);
- if (!mWait->IsStarted()) {
- mWait->Start();
- }
- }
-
- // Test case setup.
- AgendaEntry entry;
- QDate dateSet(2010, 05, 05);
- QDate repeatUntilDate(2010, 05, 15);
- QDateTime exceptionEntryDate(QDate(2010, 05, 15), QTime(0, 0, 0, 0));
- QTime timeSet(10, 10, 10, 10);
- QDateTime startDateTimeSet(dateSet,timeSet);
- QDateTime endDateTimeSet = startDateTimeSet.addSecs(60*60);
- entry.setType(AgendaEntry::TypeEvent);
- entry.setSummary("createdentry");
- AgendaRepeatRule repeatRule;
- repeatRule.setType(AgendaRepeatRule::DailyRule);
- repeatRule.setRepeatRuleStart(dateSet);
- repeatRule.setInterval(1);
- repeatRule.setUntil(repeatUntilDate);
- entry.setRepeatRule(repeatRule);
- entry.setStartAndEndTime(startDateTimeSet, endDateTimeSet);
-
- ulong id = mAgendaUtil->addEntry(entry);
-
- // Fetch the stored entry.
- AgendaEntry fetchedEntry = mAgendaUtil->fetchById(id);
- QVERIFY(fetchedEntry.isRepeating() == true);
-
- // Clear repeating properties.
- mAgendaUtil->clearRepeatingProperties(fetchedEntry);
- QList<AgendaEntry> entries = mAgendaUtil->fetchAllEntries(AgendaUtil::IncludeAll);
- int count = entries.count();
- // Check if it is non-repeating now.
- fetchedEntry = mAgendaUtil->fetchById(id);
- QVERIFY(fetchedEntry.isRepeating() == false);*/
-}
-
QTEST_MAIN(TestAgendaUtil)
#include "unittest_agendautil.moc"
--- a/organizer_plat/agenda_interface_api/tsrc/unittest_agendautil/unittest_agendautil.moc Fri Apr 16 14:57:40 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/****************************************************************************
-** Meta object code from reading C++ file 'unittest_agendautil.cpp'
-**
-** Created: Thu Feb 11 15:50:34 2010
-** by: The Qt Meta Object Compiler version 62 (Qt 4.6.1)
-**
-** WARNING! All changes made in this file will be lost!
-*****************************************************************************/
-
-#if !defined(Q_MOC_OUTPUT_REVISION)
-#error "The header file 'unittest_agendautil.cpp' doesn't include <QObject>."
-#elif Q_MOC_OUTPUT_REVISION != 62
-#error "This file was generated using the moc from 4.6.1. It"
-#error "cannot be used with the include files from this version of Qt."
-#error "(The moc has changed too much.)"
-#endif
-
-QT_BEGIN_MOC_NAMESPACE
-static const uint qt_meta_data_TestAgendaUtil[] = {
-
- // content:
- 4, // revision
- 0, // classname
- 0, 0, // classinfo
- 14, 14, // methods
- 0, 0, // properties
- 0, 0, // enums/sets
- 0, 0, // constructors
- 0, // flags
- 0, // signalCount
-
- // slots: signature, parameters, type, tag, flags
- 22, 16, 15, 15, 0x0a,
- 49, 15, 15, 15, 0x08,
- 56, 15, 15, 15, 0x08,
- 66, 15, 15, 15, 0x08,
- 81, 15, 15, 15, 0x08,
- 97, 15, 15, 15, 0x08,
- 116, 15, 15, 15, 0x08,
- 143, 15, 15, 15, 0x08,
- 160, 15, 15, 15, 0x08,
- 179, 15, 15, 15, 0x08,
- 210, 15, 15, 15, 0x08,
- 226, 15, 15, 15, 0x08,
- 249, 15, 15, 15, 0x08,
- 270, 15, 15, 15, 0x08,
-
- 0 // eod
-};
-
-static const char qt_meta_stringdata_TestAgendaUtil[] = {
- "TestAgendaUtil\0\0error\0handleEntriesDeletion(int)\0"
- "init()\0cleanup()\0initTestCase()\0"
- "test_addEntry()\0test_deleteEntry()\0"
- "test_deleteRepeatedEntry()\0test_fetchById()\0"
- "test_updateEntry()\0test_createEntryIdListForDay()\0"
- "test_entryIds()\0test_fetchAllEntries()\0"
- "test_deleteEntries()\0test_fetchEntriesInRange()\0"
-};
-
-const QMetaObject TestAgendaUtil::staticMetaObject = {
- { &QObject::staticMetaObject, qt_meta_stringdata_TestAgendaUtil,
- qt_meta_data_TestAgendaUtil, 0 }
-};
-
-#ifdef Q_NO_DATA_RELOCATION
-const QMetaObject &TestAgendaUtil::getStaticMetaObject() { return staticMetaObject; }
-#endif //Q_NO_DATA_RELOCATION
-
-const QMetaObject *TestAgendaUtil::metaObject() const
-{
- return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
-}
-
-void *TestAgendaUtil::qt_metacast(const char *_clname)
-{
- if (!_clname) return 0;
- if (!strcmp(_clname, qt_meta_stringdata_TestAgendaUtil))
- return static_cast<void*>(const_cast< TestAgendaUtil*>(this));
- return QObject::qt_metacast(_clname);
-}
-
-int TestAgendaUtil::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) {
- switch (_id) {
- case 0: handleEntriesDeletion((*reinterpret_cast< int(*)>(_a[1]))); break;
- case 1: init(); break;
- case 2: cleanup(); break;
- case 3: initTestCase(); break;
- case 4: test_addEntry(); break;
- case 5: test_deleteEntry(); break;
- case 6: test_deleteRepeatedEntry(); break;
- case 7: test_fetchById(); break;
- case 8: test_updateEntry(); break;
- case 9: test_createEntryIdListForDay(); break;
- case 10: test_entryIds(); break;
- case 11: test_fetchAllEntries(); break;
- case 12: test_deleteEntries(); break;
- case 13: test_fetchEntriesInRange(); break;
- default: ;
- }
- _id -= 14;
- }
- return _id;
-}
-QT_END_MOC_NAMESPACE
--- a/organizer_plat/agenda_interface_api/tsrc/unittest_agendautil/unittest_agendautil.pkg Fri Apr 16 14:57:40 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description: Pkg file for the unittest_agendautil component.
-;
-
-
-; Language
-&EN
-
-; SIS header: name, uid, version
-#{"utagendautil"}, (0xE704d0a5), 1, 0, 0
-
-; Localised Vendor name
-%{"Nokia"}
-
-; Unique Vendor name
-:"Nokia"
-
-; Executable and default resource files
-"/epoc32/release/armv5/urel/utagendautil.exe" - "!:\sys\bin\utagendautil.exe"
-"/epoc32/data/z/resource/apps/utagendautil.rsc" - "!:\resource\apps\utagendautil.rsc"
-"/epoc32/data/z/private/10003a3f/import/apps/utagendautil_reg.rsc" - "!:\private\10003a3f\import\apps\utagendautil_reg.rsc"
-
-; End of file --Don't remove this.
--- a/organizer_plat/calendar_editor_api/tsrc/unittest_caleneditor/src/unittest_caleneditor.cpp Fri Apr 16 14:57:40 2010 +0300
+++ b/organizer_plat/calendar_editor_api/tsrc/unittest_caleneditor/src/unittest_caleneditor.cpp Mon May 03 12:30:32 2010 +0300
@@ -2,7 +2,7 @@
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
+ * under the terms of the License "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
--- a/organizer_plat/calendar_editor_api/tsrc/unittest_caleneditor/unittest_caleneditor.pro Fri Apr 16 14:57:40 2010 +0300
+++ b/organizer_plat/calendar_editor_api/tsrc/unittest_caleneditor/unittest_caleneditor.pro Mon May 03 12:30:32 2010 +0300
@@ -2,7 +2,7 @@
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
+# under the terms of the License "Eclipse Public License v1.0"
# which accompanies this distribution, and is available
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
#
--- a/organizer_plat/eventviewer_plugin_api/inc/eventviewerplugininterface.h Fri Apr 16 14:57:40 2010 +0300
+++ b/organizer_plat/eventviewer_plugin_api/inc/eventviewerplugininterface.h Mon May 03 12:30:32 2010 +0300
@@ -21,6 +21,7 @@
// System includes
#include <QObject>
#include <QtPlugin>
+#include <QDate>
#include <qglobal.h>
// Forward declarations
@@ -29,10 +30,8 @@
class AgendaUtil;
class AgendaEntry;
-#define CALENDAR_EVENTVIEWER_PLUGIN_PATH QString(
- "z:/resource/qt/plugins/calendar")
-#define CALENDAR_EVENTVIEWER_PLUGIN_NAME QString(
- "agendaeventviewerplugin.qtplugin")
+#define CALENDAR_EVENTVIEWER_PLUGIN_PATH QString("z:/resource/qt/plugins/calendar")
+#define CALENDAR_EVENTVIEWER_PLUGIN_NAME QString("agendaeventviewerplugin.qtplugin")
class EventViewerPluginInterface : public QObject
{
@@ -40,6 +39,7 @@
public:
enum Actions {
+ ActionNothing,
ActionEdit = 0x01,
ActionDelete = 0x02,
ActionEditDelete = ActionEdit | ActionDelete,
@@ -51,17 +51,17 @@
public:
virtual void viewEvent(const ulong id,
- Actions action,
- AgendaUtil *agendaUtil) = 0;
+ Actions action = ActionNothing,
+ AgendaUtil *agendaUtil = 0) = 0;
virtual void viewEvent(const QFile &fileHandle,
- Actions action,
- AgendaUtil *agendaUtil) = 0;
+ Actions action = ActionNothing,
+ AgendaUtil *agendaUtil = 0) = 0;
virtual void viewEvent(AgendaEntry entry,
- Actions action,
- AgendaUtil *agendaUtil) = 0;
+ Actions action = ActionNothing,
+ AgendaUtil *agendaUtil = 0) = 0;
signals:
- void viewingCompleted();
+ void viewingCompleted(const QDate date = QDate());
void editingStarted();
void editingCompleted();
void deletingStarted();
--- a/organizer_pub/calendar_interim_utils2_api/tsrc/stiff/group/CalenInterimUtils2Test_DoxyFile.txt Fri Apr 16 14:57:40 2010 +0300
+++ b/organizer_pub/calendar_interim_utils2_api/tsrc/stiff/group/CalenInterimUtils2Test_DoxyFile.txt Mon May 03 12:30:32 2010 +0300
@@ -2,7 +2,7 @@
# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
+# under the terms of the License "Eclipse Public License v1.0"
# which accompanies this distribution, and is available
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
#
--- a/pimappservices/appenginesdocs/app-engines_documentation.history.xml Fri Apr 16 14:57:40 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<relnotes name="DEVELOPERLIBRARY">
- <purpose>
- </purpose>
-</relnotes>
--- a/pimappservices/appenginesdocs/app-engines_documentation.mrp Fri Apr 16 14:57:40 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-component app-engines_documentation
-
-source \sf\app\organizer\pimappservices\appenginesdocs\
-
-notes_source \component_defs\release.src
-
-
-ipr E
-
--- a/pimappservices/calendar/group/app-engines_calendar.mrp Fri Apr 16 14:57:40 2010 +0300
+++ b/pimappservices/calendar/group/app-engines_calendar.mrp Mon May 03 12:30:32 2010 +0300
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
# under the terms of "Eclipse Public License v1.0"
--- a/pimappservices/calendarvcalplugin/group/app-engines_agnversit2.mrp Fri Apr 16 14:57:40 2010 +0300
+++ b/pimappservices/calendarvcalplugin/group/app-engines_agnversit2.mrp Mon May 03 12:30:32 2010 +0300
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
# under the terms of "Eclipse Public License v1.0"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pimappservices/group/bld.inf Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,36 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: Build information for pim app services
+//
+
+PRJ_PLATFORMS
+DEFAULT
+
+// calendar package which includes calinterimapi,agenda model and agenda server
+#include "../calendar/group/bld.inf"
+
+// calendar vcal plugin
+#include "../calendarvcalplugin/group/bld.inf"
+
+
+PRJ_EXPORTS
+
+PRJ_MMPFILES
+
+PRJ_TESTMMPFILES
+
+PRJ_TESTEXPORTS
+
+
+// End of File
+
--- a/pimappsupport/chinesecalendaralg/group/app-services_chinesecalendaralgorithm.mrp Fri Apr 16 14:57:40 2010 +0300
+++ b/pimappsupport/chinesecalendaralg/group/app-services_chinesecalendaralgorithm.mrp Mon May 03 12:30:32 2010 +0300
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
# under the terms of "Eclipse Public License v1.0"
--- a/pimappsupport/chinesecalendarconverter/group/app-services_calcon.mrp Fri Apr 16 14:57:40 2010 +0300
+++ b/pimappsupport/chinesecalendarconverter/group/app-services_calcon.mrp Mon May 03 12:30:32 2010 +0300
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
# under the terms of "Eclipse Public License v1.0"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pimappsupport/group/bld.inf Mon May 03 12:30:32 2010 +0300
@@ -0,0 +1,38 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description: Build information for pim app support component
+//
+
+PRJ_PLATFORMS
+DEFAULT
+
+// chinese calendar algorithm
+#include "../chinesecalendaralg/group/bld.inf"
+
+// chinese calendar converter package
+#include "../chinesecalendarconverter/group/bld.inf"
+
+// vcal parser components
+#include "../vcardandvcal/group/bld.inf"
+
+PRJ_EXPORTS
+
+PRJ_MMPFILES
+
+PRJ_TESTMMPFILES
+
+PRJ_TESTEXPORTS
+
+
+// End of File
+
--- a/pimappsupport/vcardandvcal/documentation/TestVersit.rtf Fri Apr 16 14:57:40 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-{\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}
-{\f85\froman\fcharset238\fprq2 Times New Roman CE;}{\f86\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f88\froman\fcharset161\fprq2 Times New Roman Greek;}{\f89\froman\fcharset162\fprq2 Times New Roman Tur;}
-{\f90\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f91\fswiss\fcharset238\fprq2 Arial CE;}{\f92\fswiss\fcharset204\fprq2 Arial Cyr;}{\f94\fswiss\fcharset161\fprq2 Arial Greek;}{\f95\fswiss\fcharset162\fprq2 Arial Tur;}
-{\f96\fswiss\fcharset186\fprq2 Arial Baltic;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;
-\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\widctlpar\adjustright \fs20\lang2057 \snext0 Normal;}{
-\s1\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs28\lang2057\kerning28 \sbasedon0 \snext0 heading 1;}{\s2\sb240\sa60\keepn\widctlpar\adjustright \b\i\f1\lang2057 \sbasedon0 \snext0 heading 2;}{\s3\sb240\sa60\keepn\widctlpar\adjustright \f1\lang2057
-\sbasedon0 \snext0 heading 3;}{\s4\keepn\widctlpar\outlinelevel3\adjustright \b\f1\fs20\lang2057 \sbasedon0 \snext0 heading 4;}{\s5\keepn\widctlpar\outlinelevel4\adjustright \b\f1\lang2057 \sbasedon0 \snext0 heading 5;}{\*\cs10 \additive
-Default Paragraph Font;}}{\*\listtable{\list\listtemplateid38323078\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat0\levelspace0\levelindent0{\leveltext\'01-;}{\levelnumbers;}\f0\fbias0 \fi-360\li1800\jclisttab\tx1800 }{\listname
-;}\listid817500656}{\list\listtemplateid38323078\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat0\levelspace0\levelindent0{\leveltext\'01-;}{\levelnumbers;}\f0\fbias0 \fi-360\li1800\jclisttab\tx1800 }{\listname ;}\listid1308366115}
-{\list\listtemplateid38323078\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat0\levelspace0\levelindent0{\leveltext\'01-;}{\levelnumbers;}\f0\fbias0 \fi-360\li1800\jclisttab\tx1800 }{\listname ;}\listid1721782559}}{\*\listoverridetable
-{\listoverride\listid1308366115\listoverridecount0\ls1}{\listoverride\listid817500656\listoverridecount0\ls2}{\listoverride\listid1721782559\listoverridecount0\ls3}}{\info{\title BITGDI test code}{\author Lane Roberts}{\operator Symbian}
-{\creatim\yr2001\mo9\dy28\hr15\min24}{\revtim\yr2001\mo12\dy5\hr17\min7}{\version6}{\edmins80}{\nofpages1}{\nofwords171}{\nofchars977}{\*\company Dell Computer Corporation}{\nofcharsws0}{\vern113}}\paperw11909\paperh16834\margl1440\margr1440
-\widowctrl\ftnbj\aenddoc\hyphcaps0\formshade\viewkind1\viewscale100 \fet0\sectd \psz9\linex0\headery706\footery706\colsx709\endnhere\sectdefaultcl {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2
-\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6
-\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang
-{\pntxtb (}{\pntxta )}}\pard\plain \s1\sb240\sa60\keepn\widctlpar\outlinelevel0\adjustright \b\f1\fs28\lang2057\kerning28 {VERSIT test code
-\par }\pard\plain \widctlpar\adjustright \fs20\lang2057 {\f1
-\par }{\b\f1\fs24 Test executable file locations
-\par
-\par }\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
-\brdrs\brdrw10 \clshdng10000\cltxlrtb \cellx3050\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \clshdng10000\cltxlrtb \cellx6208\pard \widctlpar\intbl\adjustright {\b\f1 WINS location\cell
-Hardware location\cell }\pard \widctlpar\intbl\adjustright {\b\f1 \row }\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt
-\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx3050\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx6208\pard
-\widctlpar\intbl\adjustright {\f1 \\epoc32\\release\\wins\\udeb\\
-\par or
-\par \\epoc32\\release\\wins\\urel\\\cell z:\\system\cell }\pard \widctlpar\intbl\adjustright {\f1 \row }\pard \widctlpar\adjustright {\f1
-\par }\pard\plain \s5\keepn\widctlpar\outlinelevel4\adjustright \b\f1\lang2057 {Automatic test executables - should be run before every release
-\par }\pard\plain \widctlpar\adjustright \fs20\lang2057 {\f1 Success: Test program exits cleanly
-\par Failure: Test program stops with an error message._
-\par }{\b\f1
-\par }\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
-\brdrs\brdrw10 \clshdng10000\cltxlrtb \cellx2552\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \clshdng10000\cltxlrtb \cellx8155\pard\plain \s4\keepn\widctlpar\intbl\outlinelevel3\adjustright
-\b\f1\fs20\lang2057 {Filename\cell Purpose\cell }\pard\plain \widctlpar\intbl\adjustright \fs20\lang2057 {\b\f1 \row }\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh
-\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx2552\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
-\brdrs\brdrw10 \cltxlrtb \cellx8155\pard \widctlpar\intbl\adjustright {\f1 TBUGFIX.EXE\tab \cell General test. It should be updated each time when a defect has been fixed.}{\b\f1 \cell }\pard \widctlpar\intbl\adjustright {\b\f1 \row }\pard
-\widctlpar\intbl\adjustright {\f1 TPERFORMANCE.EXE\tab \tab \cell Do the bench marking in terms of performance and heap usage.}{\b\f1 \cell }\pard \widctlpar\intbl\adjustright {\b\f1 \row }\pard \widctlpar\intbl\adjustright {\f1 TCHARSETVCARD.EXE\tab
-\tab \cell Internalise dozens of vCard from files in \\c\\ TestvCards and externalise them by setting different charset and encoding}{\b\f1 \cell }\pard \widctlpar\intbl\adjustright {\b\f1 \row }\pard \widctlpar\intbl\adjustright {\f1 TOOM.EXE\tab \tab
-\cell Out of memory test}{\b\f1 \cell }\pard \widctlpar\intbl\adjustright {\b\f1 \row }\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10
-\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx2552\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx8155\pard
-\widctlpar\intbl\adjustright {\f1 TVGEN.EXE\tab \tab \cell Build a vCard\\vCal randomly and internalise\\externalise it}{\b\f1 \cell }\pard \widctlpar\intbl\adjustright {\b\f1 \row }\pard \widctlpar\adjustright {\b\f1
-\par }{\b\f1\fs24 Manual test executables - should be run if relevant changes have been made}{\f1
-\par }{\b\f1
-\par }\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
-\brdrs\brdrw10 \clshdng10000\cltxlrtb \cellx1487\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \clshdng10000\cltxlrtb \cellx7817\pard \widctlpar\intbl\adjustright {\b\f1 Filename\cell Purpose\cell
-}\pard \widctlpar\intbl\adjustright {\b\f1 \row }\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10
-\clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx2552\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx8155\pard \widctlpar\intbl\adjustright {\f1
-TVERSIT.EXE\tab \tab \cell Need interaction from the user to test various cases such build, internalise, externalise a vCard or vCal}{\b\f1 \cell }\pard \widctlpar\intbl\adjustright {\b\f1 \row }\pard \widctlpar\adjustright {\b\f1\fs24
-\par Test support files}{\f1
-\par }{\b\f1
-\par }\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
-\brdrs\brdrw10 \clshdng10000\cltxlrtb \cellx851\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \clshdng10000\cltxlrtb \cellx4536\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb
-\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \clshdng10000\cltxlrtb \cellx7088\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \clshdng10000\cltxlrtb \cellx9639\pard \widctlpar\intbl\adjustright {\b\f1
-Filename\cell Emulator location\cell Hardware location\cell Used by\cell }\pard \widctlpar\intbl\adjustright {\b\f1 \row }\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh
-\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx851\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
-\brdrs\brdrw10 \cltxlrtb \cellx4536\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx7088\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
-\brdrs\brdrw10 \cltxlrtb \cellx9639\pard \widctlpar\intbl\adjustright {\f1 All files \cell \\epoc32\\wins\\c\\testfiles\cell c:\\ testfiles\cell TBUGFIX.EXE\cell }\pard \widctlpar\intbl\adjustright {\f1 \row }\pard \widctlpar\intbl\adjustright {\f1
-All files \cell \\epoc32\\wins\\c\\ tPerformance\\inputfile\cell c:\\ tPerformance\\inputfile\cell TPERFORMANCE.EXE\cell }\pard \widctlpar\intbl\adjustright {\f1 \row }\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb
-\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx851\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl
-\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx4536\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx7088\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl
-\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx9639\pard \widctlpar\intbl\adjustright {\f1 All files\cell \\epoc32\\wins\\c\\ testvcards\cell c:\\ testvcards\cell TCHARSETVCARD.EXE\cell }\pard \widctlpar\intbl\adjustright {
-\f1 \row }\pard \widctlpar\adjustright {\b\f1\fs24
-\par Test rom building
-\par }{\f1
-\par \\versit\\tsrc\\tVersit.iby is listed in bld.inf as a test export with destination \\epoc32\\rom\\include\\. This automatically includes all test programs and files in a rom when used as follows from \\epoc32\\rom\\: \ldblquote tools\\
-buildrom assabet engbuild tVersit.iby\rdblquote . All testing input files specified in the table above}{\f1 }{\f1 are in}{\f1 cluded in tVersit.iby but need to be copied cross to}{\f1 a related directory in c: drive before testing.
-\par }}
--- a/pimappsupport/vcardandvcal/group/BLD.INF Fri Apr 16 14:57:40 2010 +0300
+++ b/pimappsupport/vcardandvcal/group/BLD.INF Mon May 03 12:30:32 2010 +0300
@@ -15,6 +15,8 @@
//
//
+#include <platform_paths.hrh>
+
PRJ_PLATFORMS
DEFAULT WINC
@@ -46,9 +48,9 @@
../inc/vcard3.h SYMBIAN_APP_LAYER_PLATFORM_EXPORT_PATH(vcard3.h)
#endif
-./versit.iby /epoc32/rom/include/versit.iby
+./versit.iby /epoc32/rom/include/versit.iby
./versitrecognizer.iby /epoc32/rom/include/versitrecognizer.iby
-
+./versitrecognizer.iby CORE_APP_LAYER_IBY_EXPORT_PATH(versitrecognizer.iby)
PRJ_MMPFILES
--- a/pimappsupport/vcardandvcal/group/app-services_versit.mrp Fri Apr 16 14:57:40 2010 +0300
+++ b/pimappsupport/vcardandvcal/group/app-services_versit.mrp Mon May 03 12:30:32 2010 +0300
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
# under the terms of "Eclipse Public License v1.0"