--- a/agendainterface/agendautil/src/agendautil_p.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/agendainterface/agendautil/src/agendautil_p.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -43,7 +43,6 @@
//recognition string for vcal
_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};
@@ -207,18 +206,16 @@
return localUid;
}
+ // Get the global uid.
+ CCalenInterimUtils2* calenInterimUtils2 = CCalenInterimUtils2::NewL();
+ HBufC8* globalUid = calenInterimUtils2->GlobalUidL();
if (AgendaEntry::TypeNote == entry.type()) {
TRAP(
iError,
RPointerArray<CCalEntry> entryArray;
CleanupResetAndDestroyPushL(entryArray);
-
- // Get the global uid.
- CCalenInterimUtils2* calenInterimUtils2 = CCalenInterimUtils2::NewL();
- HBufC8* globalUid = calenInterimUtils2->GlobalUidL();
CleanupStack::PushL(globalUid);
- delete calenInterimUtils2;
// Construct a CCalEntry object and start filling the details.
CCalEntry* newEntry = 0;
@@ -276,15 +273,7 @@
RPointerArray<CCalEntry> entryArray;
CleanupResetAndDestroyPushL(entryArray);
-
- // Get the global uid.
- TTime homeTime;
- homeTime.HomeTime();
- TInt64 seed = homeTime.Int64();
- TInt randumNumber = Math::Rand(seed);
- HBufC8* globalUid = HBufC8::NewLC(KGuidLength);
- globalUid->Des().Num(randumNumber);
-
+ CleanupStack::PushL(globalUid);
// Construct a CCalEntry object and start filling the details.
CCalEntry* newEntry = 0;
newEntry = CCalEntry::NewL(
@@ -395,6 +384,9 @@
CleanupStack::PopAndDestroy(&entryArray);
)
}
+
+ delete calenInterimUtils2;
+
// Emit signal upon successful creation of entry.
if (0 < localUid && 1 == success) {
emit q->entryAdded(localUid);
@@ -445,9 +437,7 @@
// Now save the GUID of the saved entry.
TRAP(
iError,
-
- globalUid = HBufC8::NewL(KGuidLength);
- *globalUid = originalEntry->UidL();
+ globalUid = originalEntry->UidL().AllocL();
)
delete originalEntry;
@@ -458,7 +448,7 @@
iError,
RPointerArray<CCalEntry> entryArray;
- CleanupResetAndDestroyPushL(entryArray);
+ CleanupClosePushL(entryArray);
// Construct a CCalEntry object and start filling the details.
CCalEntry* newEntry = 0;
@@ -489,7 +479,7 @@
iError,
RPointerArray<CCalEntry> entryArray;
- CleanupResetAndDestroyPushL(entryArray);
+ CleanupClosePushL(entryArray);
// Construct a CCalEntry object and start filling the details.
CCalEntry* newEntry = 0;
@@ -650,7 +640,6 @@
AgendaEntry& entry,
AgendaUtil::RecurrenceRange range)
{
- qDebug("AgendaUtilPrivate::deleteRepeatedEntry");
// First prepare the session with agenda server.
if (!mInstanceViewCreated) {
--- a/alarmui/alarmalertwidget/alarmalertinterface/bwins/alarmalertwidgetu.def Wed Jun 23 18:11:28 2010 +0300
+++ b/alarmui/alarmalertwidget/alarmalertinterface/bwins/alarmalertwidgetu.def Tue Jul 06 14:14:56 2010 +0300
@@ -1,7 +1,7 @@
EXPORTS
?updateAlarmAlert@AlarmAlert@@QAE_NPAUSAlarmInfo@@@Z @ 1 NONAME ; bool AlarmAlert::updateAlarmAlert(struct SAlarmInfo *)
- ??0AlarmAlert@@QAE@PAVAlarmAlertObserver@@@Z @ 2 NONAME ; AlarmAlert::AlarmAlert(class AlarmAlertObserver *)
- ?dismissAlarmAlert@AlarmAlert@@QAE_NXZ @ 3 NONAME ; bool AlarmAlert::dismissAlarmAlert(void)
+ ?dismissAlarmAlert@AlarmAlert@@QAEXXZ @ 2 NONAME ; void AlarmAlert::dismissAlarmAlert(void)
+ ??0AlarmAlert@@QAE@PAVAlarmAlertObserver@@@Z @ 3 NONAME ; AlarmAlert::AlarmAlert(class AlarmAlertObserver *)
?showAlarmAlert@AlarmAlert@@QAE_NPAUSAlarmInfo@@@Z @ 4 NONAME ; bool AlarmAlert::showAlarmAlert(struct SAlarmInfo *)
??1AlarmAlert@@QAE@XZ @ 5 NONAME ; AlarmAlert::~AlarmAlert(void)
--- a/alarmui/alarmalertwidget/alarmalertinterface/inc/alarmalertwidget.h Wed Jun 23 18:11:28 2010 +0300
+++ b/alarmui/alarmalertwidget/alarmalertinterface/inc/alarmalertwidget.h Tue Jul 06 14:14:56 2010 +0300
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description:
+* Description:
*
*/
// alarmalertwidget.h
@@ -21,15 +21,16 @@
// System includes
#include <QObject>
-#include <QVariantMap>
-#include <QDateTime>
+#include <hbdevicedialogsymbian.h>
// User includes
#include "alarmcommon.h"
// Forward declarations
-class HbDeviceDialog;
+class CHbDeviceDialogSymbian;
class AlarmAlertObserver;
+class CHbSymbianVariantMap;
+class CHbSymbianVariant;
// Class declaration
/**
@@ -37,10 +38,8 @@
* @brief This is the client side of the device dialog plugin.
* Contains API's to show, update and dismiss alarm dialogs
*/
-class AlarmAlertWidget : public QObject
+class AlarmAlertWidget : public MHbDeviceDialogObserver
{
-Q_OBJECT
-
public:
/**
@@ -48,93 +47,118 @@
* @param observer This is the observer of all user events
*/
AlarmAlertWidget(AlarmAlertObserver *observer);
-
+
/**
* @brief Destructor
*/
~AlarmAlertWidget();
-
+
/**
* @brief Shows the alarm dialog
* @param The alarm information to display
* @return true on success, false otherwise
*/
bool showAlarmDialog(SAlarmInfo *alarmInfo);
-
+
/**
* @brief Dismisses any alarm dialog that is being shown
* @return true on success, false otherwise
*/
- bool dismissAlarmDialog();
-
+ void dismissAlarmDialog();
+
/**
* @brief Updates the alarm dialog with new information
* @param The alarm information to update
* @return true on success, false otherwise
*/
bool updateAlarmDialog(SAlarmInfo *alarmInfo);
+
+public:
-private slots:
+ /**
+ * @brief Inform the client about user interaction on dialog.
+ * @param List of aruguemnts the dialog has sent.
+ */
+ void DataReceived(CHbSymbianVariantMap& aData);
+
+ /**
+ * @brief Updates the alarm dialog with new information
+ * @param The alarm information to update
+ */
+ void DeviceDialogClosed(TInt aCompletionCode);
+
+private:
+ /**
+ * @brief Handle the events sent by dialog.
+ * @param params List of arguments the dialog has sent
+ */
+ void triggerAction(const CHbSymbianVariant* source);
+
+private:
/**
- * @brief Slot to handle user interactions
- * @param params List of arguments the dialog has sent
+ * @var mVariantMap
+ * @brief Contain the parameters.
*/
- void triggerAction(QVariantMap params);
-
-private:
-
+ CHbSymbianVariantMap* mVariantMap;
+
/**
* @var mSubject
* @brief Holds the alarm subject
*/
- QString mSubject;
-
+ CHbSymbianVariant* mAlarmSubject;
+
/**
* @var mLocation
* @brief Holds the alarm location (for calendar alerts only)
*/
- QString mLocation;
-
+ CHbSymbianVariant* mLocation;
+
/**
* @var mAlarmTime
* @brief Holds the alarm expiry time
*/
- QDateTime mAlarmTime;
+ CHbSymbianVariant* mAlarmTime;
/**
+ * @var mAlarmDate
+ * @brief Holds the alarm expiry date
+ */
+ CHbSymbianVariant* mAlarmDate;
+
+ /**
* @var mDeviceDialog
* @brief The interface to the device dialog server
*/
- HbDeviceDialog *mDeviceDialog;
-
+ CHbDeviceDialogSymbian *mDeviceDialog;
+
/**
* @var mAlarmAlertType
* @brief Tells if the type of alert being displayed
* is a clock /calendar/to-do alert
*/
- int mAlarmAlertType;
-
+ CHbSymbianVariant* mAlarmAlertType;
+
/**
* @var mCanSnooze
* @brief Tells whether the current alert can be snoozed.
* true->alarm can be snoozed
* false->alarm cannot be snoozed
*/
- bool mCanSnooze;
-
+ CHbSymbianVariant* mCanSnooze;
+
/**
* @var mIsSilent
* @brief Indicates if the alarm is silent or not
*/
- bool mIsSilent;
-
+ CHbSymbianVariant* mIsSilent;
+
/**
* @var mIsTimedAlarm
* @brief Indicates if the alarm has time info or not
*/
- bool mIsTimedAlarm;
-
+ CHbSymbianVariant* mIsTimedAlarm;
+
/**
* @var mObserver
* @brief The observer for user responses
--- a/alarmui/alarmalertwidget/alarmalertinterface/inc/alarmalertwrapper.h Wed Jun 23 18:11:28 2010 +0300
+++ b/alarmui/alarmalertwidget/alarmalertinterface/inc/alarmalertwrapper.h Tue Jul 06 14:14:56 2010 +0300
@@ -74,10 +74,9 @@
* AlarmAlertObserver::alertCancelled is called once the
* alert is cancelled successfully
*
- * @return true on success, false otherwise
*/
- IMPORT_C bool dismissAlarmAlert();
-
+ IMPORT_C void dismissAlarmAlert();
+
/**
* @brief Updates the alarm alert with the information
* provided
--- a/alarmui/alarmalertwidget/alarmalertinterface/src/alarmalertwidget.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/alarmui/alarmalertwidget/alarmalertinterface/src/alarmalertwidget.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -11,21 +11,22 @@
*
* Contributors:
*
-* Description:
+* Description:
*
*/
// alarmalertwidget.cpp
// System includes
-#include <QDateTime>
-#include <hbdevicedialog.h>
-#include <QDebug>
+#include <hbsymbianvariant.h>
// User includes
#include "alarmalertwidget.h"
#include "alarmalert.h"
#include "alarmalertobserver.h"
+// Constants.
+const TInt KMaxlength=30;
+
// ---------------------------------------------------------
// AlarmAlertWidget::AlarmAlertWidget
// rest of the details are commented in the header
@@ -34,11 +35,6 @@
AlarmAlertWidget::AlarmAlertWidget(AlarmAlertObserver *observer) :
mObserver(observer)
{
- // Create a session with the device dialog server
- mDeviceDialog = new HbDeviceDialog(HbDeviceDialog::NoFlags, this);
-
- // Connect to signals to receive events sent by the dialog
- connect(mDeviceDialog, SIGNAL(dataReceived(QVariantMap)), this, SLOT(triggerAction(QVariantMap)));
}
// ---------------------------------------------------------
@@ -48,10 +44,47 @@
//
AlarmAlertWidget::~AlarmAlertWidget()
{
- // Cleanup
- if (mDeviceDialog) {
- delete mDeviceDialog;
- }
+ // Cleanup
+
+ if (mAlarmSubject) {
+ delete mAlarmSubject;
+ }
+
+ if (mLocation) {
+ delete mLocation;
+ }
+
+ if (mAlarmTime) {
+ delete mAlarmTime;
+ }
+
+ if (mAlarmDate) {
+ delete mAlarmDate;
+ }
+
+ if (mAlarmAlertType) {
+ delete mAlarmAlertType;
+ }
+
+ if (mCanSnooze) {
+ delete mCanSnooze;
+ }
+
+ if (mIsSilent) {
+ delete mIsSilent;
+ }
+
+ if (mIsTimedAlarm) {
+ delete mIsTimedAlarm;
+ }
+
+ if (mVariantMap) {
+ delete mVariantMap;
+ }
+
+ if (mDeviceDialog) {
+ delete mDeviceDialog;
+ }
}
// ---------------------------------------------------------
@@ -61,40 +94,77 @@
//
bool AlarmAlertWidget::showAlarmDialog(SAlarmInfo *alarmInfo)
{
- // Get the subject of the alarm (description for clock alarms
- // and subject for calendar alarms)
- mSubject = QString::fromUtf16(alarmInfo->iSubject->Ptr(),
- alarmInfo->iSubject->Length());
+ // Get the alarm date and time
+ TBuf<KMaxlength> timeString;
+ TBuf<KMaxlength> dateString;
+
+ TBuf<KMaxlength> timeFormat(_L("%-B%:0%J%:1%T%:3%+B"));
+ TBuf<KMaxlength> dateFormat;
+ TLocale locale;
+ switch (locale.DateFormat()) {
+ case EDateEuropean:
+ dateFormat.Copy(_L("%F%/0%D%/1%M%/2%Y%/3"));
+ break;
+ case EDateAmerican:
+ dateFormat.Copy(_L("%F%/0%M%/1%D%/2%Y%/3"));
+ break;
+ case EDateJapanese:
+ dateFormat.Copy(_L("%F%/0%Y%/1%M%/2%D%/3"));
+ break;
+ default:
+ // Nothing yet.
+ break;
+ }
+
- // Get the location (for calendar alarms)
- mLocation = QString::fromUtf16(alarmInfo->iLocation->Ptr(),
- alarmInfo->iLocation->Length());
+ alarmInfo->iTime.FormatL(timeString, timeFormat);
+ alarmInfo->iTime.FormatL(dateString, dateFormat);
+
+ // Create a session with the device dialog server
+ mDeviceDialog = CHbDeviceDialogSymbian::NewL();
- // Get the alarm date and time
- // TODO: Check QDateTime to TTime compatibility
- mAlarmTime.setTime(QTime(alarmInfo->iTime.DateTime().Hour(),
- alarmInfo->iTime.DateTime().Minute(),
- alarmInfo->iTime.DateTime().Second()));
- mAlarmTime.setDate(QDate(alarmInfo->iDate.DateTime().Year(),
- alarmInfo->iDate.DateTime().Month(),
- alarmInfo->iDate.DateTime().Day()));
+
+ // Package the different parameters to send
+ mVariantMap = CHbSymbianVariantMap::NewL();
+
+ // Get the subject of the alarm (description for clock alarms
+ // and subject for calendar alarms)
+ mAlarmSubject = CHbSymbianVariant::NewL(
+ alarmInfo->iSubject, CHbSymbianVariant::EDes );
+ mVariantMap->Add(alarmSubjectSymbian, mAlarmSubject);
+
+ // Get the location (for calendar alarms)
+ mLocation = CHbSymbianVariant::NewL(
+ alarmInfo->iLocation, CHbSymbianVariant::EDes);
+ mVariantMap->Add(alarmLocationSymbian, mLocation);
+
+ mAlarmTime = CHbSymbianVariant::NewL(
+ &timeString, CHbSymbianVariant::EDes);
+ mVariantMap->Add(alarmTimeSymbian, mAlarmTime);
- mCanSnooze = alarmInfo->iCanSnooze;
- mIsSilent = alarmInfo->iIsSilent;
- mAlarmAlertType = alarmInfo->iAlarmAlertType;
- mIsTimedAlarm = alarmInfo->iIsTimed;
+ mAlarmDate = CHbSymbianVariant::NewL(
+ &dateString, CHbSymbianVariant::EDes);
+ mVariantMap->Add(alarmDateSymbian, mAlarmDate);
+
+ mIsSilent = CHbSymbianVariant::NewL(
+ &alarmInfo->iIsSilent, CHbSymbianVariant::EBool);
+ mVariantMap->Add(alarmRingingTypeSymbian, mIsSilent);
+
+ mCanSnooze = CHbSymbianVariant::NewL(
+ &alarmInfo->iCanSnooze, CHbSymbianVariant::EBool);
+ mVariantMap->Add(alarmCanSnoozeSymbain, mCanSnooze);
+
+ mAlarmAlertType = CHbSymbianVariant::NewL(
+ &alarmInfo->iAlarmAlertType, CHbSymbianVariant::EInt);
+ mVariantMap->Add(alarmTypeSymbian, mAlarmAlertType);
+
+ mIsTimedAlarm = CHbSymbianVariant::NewL(
+ &alarmInfo->iIsTimed, CHbSymbianVariant::EBool);
+ mVariantMap->Add(alarmIsTimedSymbian, mIsTimedAlarm);
+
+ // Package the different parameters to send
+ return mDeviceDialog->Show(ALARM_ALERT_PLUGIN_SYMBIAN, *mVariantMap, this);
- // Package the different parameters to send
- QVariantMap params;
- params.insert(alarmSubject, mSubject);
- params.insert(alarmLocation, mLocation);
- params.insert(alarmDateTime, mAlarmTime);
- params.insert(alarmRingingType, mIsSilent);
- params.insert(alarmCanSnooze, mCanSnooze);
- params.insert(alarmType, mAlarmAlertType);
- params.insert(alarmIsTimed, mIsTimedAlarm);
-
- return mDeviceDialog->show(ALARM_ALERT_PLUGIN, params);
}
// ---------------------------------------------------------
@@ -102,10 +172,10 @@
// rest of the details are commented in the header
// ---------------------------------------------------------
//
-bool AlarmAlertWidget::dismissAlarmDialog()
+void AlarmAlertWidget::dismissAlarmDialog()
{
// Dismiss the dialog
- return mDeviceDialog->cancel();
+ mDeviceDialog->Cancel();
}
// ---------------------------------------------------------
@@ -113,13 +183,37 @@
// rest of the details are commented in the header
// ---------------------------------------------------------
//
-bool AlarmAlertWidget::updateAlarmDialog(SAlarmInfo* alarmInfo)
+bool AlarmAlertWidget::updateAlarmDialog(SAlarmInfo* /*alarmInfo*/)
{
- Q_UNUSED(alarmInfo);
// Update the dialog with any new information
// TODO: Pass the updated information sent by the observer
- QVariantMap params;
- return mDeviceDialog->update(params);
+ /*CHbSymbianVariantMap params;
+ mDeviceDialog->Update(params);*/
+ return false;
+}
+
+// ---------------------------------------------------------
+// AlarmAlertWidget::DataReceived
+// rest of the details are commented in the header
+// ---------------------------------------------------------
+//
+void AlarmAlertWidget::DataReceived(CHbSymbianVariantMap& aData)
+{
+ if (!aData.Keys().MdcaCount()) {
+ return;
+ }
+
+ triggerAction(aData.Get(alarmCommandSymbian));
+}
+
+// ---------------------------------------------------------
+// AlarmAlertWidget::DeviceDialogClosed
+// rest of the details are commented in the header
+// ---------------------------------------------------------
+//
+void AlarmAlertWidget::DeviceDialogClosed(TInt /*aCompletionCode*/)
+{
+
}
// ---------------------------------------------------------
@@ -127,33 +221,28 @@
// rest of the details are commented in the header
// ---------------------------------------------------------
//
-void AlarmAlertWidget::triggerAction(QVariantMap params)
+void AlarmAlertWidget::triggerAction(const CHbSymbianVariant* source)
{
- // Check what is the command being sent by the dialog
- // Based on that, update the command to be sent
- QVariantMap::const_iterator iter = params.find(alarmCommand);
- if (iter != params.constEnd()) {
- AlarmCommand command(AlarmCmdLast);
- if (iter.value().toInt() == Stop) {
- command = AlarmStop;
- }
- else if (iter.value().toInt() == Snooze) {
- command = AlarmSnooze;
- }
- else if (iter.value().toInt() == Silence) {
- command = AlarmSilence;
- } else if (iter.value().toInt() == Shown) {
- command = AlarmShown;
- mObserver->alertDisplayed(command);
- return;
- } else {
- command = AlarmCmdLast;
- }
- if (command != AlarmCmdLast) {
- // Notify the observer with the command
- mObserver->alertCompleted(command);
- }
-
- }
+ AlarmCommand command(AlarmCmdLast);
+
+ if (*source->Value<TInt>() == Stop) {
+ command = AlarmStop;
+ } else if (*source->Value<TInt>() == Snooze) {
+ command = AlarmSnooze;
+ } else if (*source->Value<TInt>() == Silence) {
+ command = AlarmSilence;
+ } else if (*source->Value<TInt>() == Shown) {
+ command = AlarmShown;
+ mObserver->alertDisplayed(command);
+ return;
+ } else {
+ command = AlarmCmdLast;
+ }
+
+ if (command != AlarmCmdLast) {
+ // Notify the observer with the command
+ mObserver->alertCompleted(command);
+ }
}
+
// End of file --Don't remove this.
--- a/alarmui/alarmalertwidget/alarmalertinterface/src/alarmalertwrapper.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/alarmui/alarmalertwidget/alarmalertinterface/src/alarmalertwrapper.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -60,10 +60,10 @@
// rest of the details are commented in the header
// ---------------------------------------------------------
//
-EXPORT_C bool AlarmAlert::dismissAlarmAlert()
+EXPORT_C void AlarmAlert::dismissAlarmAlert()
{
// Forward the call to the client
- return mAlarmWidget->dismissAlarmDialog();
+ mAlarmWidget->dismissAlarmDialog();
}
// ---------------------------------------------------------
--- a/alarmui/alarmalertwidget/alarmalertplugin/alarmalertplugin.pro Wed Jun 23 18:11:28 2010 +0300
+++ b/alarmui/alarmalertwidget/alarmalertplugin/alarmalertplugin.pro Tue Jul 06 14:14:56 2010 +0300
@@ -31,3 +31,7 @@
alarmalertdocloader.cpp
RESOURCES += alarmalert.qrc
+
+TRANSLATIONS += alarmui.ts
+
+# End of file --Don't remove this.
--- a/alarmui/alarmalertwidget/alarmalertplugin/data/alarmalert.qrc Wed Jun 23 18:11:28 2010 +0300
+++ b/alarmui/alarmalertwidget/alarmalertplugin/data/alarmalert.qrc Tue Jul 06 14:14:56 2010 +0300
@@ -7,7 +7,4 @@
<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>
- </qresource>
</RCC>
\ No newline at end of file
Binary file alarmui/alarmalertwidget/alarmalertplugin/data/alarmui_en_GB.qm has changed
--- a/alarmui/alarmalertwidget/alarmalertplugin/inc/alarmalert.h Wed Jun 23 18:11:28 2010 +0300
+++ b/alarmui/alarmalertwidget/alarmalertplugin/inc/alarmalert.h Tue Jul 06 14:14:56 2010 +0300
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description:
+* Description:
*
*/
// alarmalert.h
@@ -21,30 +21,45 @@
// The plugin name. Do not remove the "com.nokia.hb" part.
const QString ALARM_ALERT_PLUGIN("com.nokia.hb.alarmalertdialog");
+_LIT(ALARM_ALERT_PLUGIN_SYMBIAN, "com.nokia.hb.alarmalertdialog");
// The string identifier for command
const QString alarmCommand("command");
+_LIT(alarmCommandSymbian, "command");
// The string identifier for alarm subject
const QString alarmSubject("subject");
+_LIT(alarmSubjectSymbian, "subject");
// The string identifier for alarm location
const QString alarmLocation("location");
+_LIT(alarmLocationSymbian, "location");
-// The string identifier for alarm date and time
-const QString alarmDateTime("dateTime");
+// The string identifier for alarm time
+const QString alarmTime("time");
+_LIT(alarmTimeSymbian, "time");
+
+// The string identifier for alarm date.
+const QString alarmDate("date");
+_LIT(alarmDateSymbian, "date");
+
+// The string identifier for alarm time
// The string identifier for alarm type
const QString alarmType("type");
+_LIT(alarmTypeSymbian, "type");
// The string identifier for alarm ringing type
const QString alarmRingingType("ringingType");
+_LIT(alarmRingingTypeSymbian, "ringingType");
// The string identifier for alarm snoozability
const QString alarmCanSnooze("canSnooze");
+_LIT(alarmCanSnoozeSymbain, "canSnooze");
// The string identifier for checking the nontimed alarms
const QString alarmIsTimed("isTimed");
+_LIT(alarmIsTimedSymbian, "isTimed");
/**
@@ -62,7 +77,7 @@
/**
* @enum AlarmType
- * @brief Alarm types to be sent
+ * @brief Alarm types to be sent
* to the alarm dialog
*/
enum AlarmType {
--- a/alarmui/alarmalertwidget/alarmalertplugin/inc/alarmalertwidget_p.h Wed Jun 23 18:11:28 2010 +0300
+++ b/alarmui/alarmalertwidget/alarmalertplugin/inc/alarmalertwidget_p.h Tue Jul 06 14:14:56 2010 +0300
@@ -28,7 +28,7 @@
// Forward declarations
class QGraphicsWidget;
class QEvent;
-class QTranslator;
+class HbTranslator;
class HbMainWindow;
class HbDocumentLoader;
class HbLabel;
@@ -140,6 +140,11 @@
*/
void silenced();
+ /**
+ * @brief Called when the alarmui is about to display.
+ */
+ void aboutToDisplay();
+
private:
/**
* @brief Extracts the parameters sent by the client
@@ -192,13 +197,19 @@
* @var mAlarmTime
* @brief Holds the alarm expiry time
*/
- QDateTime mAlarmTime;
+ QString mAlarmTime;
+
+ /**
+ * @var mAlarmDate
+ * @brief Holds the alarm expiry time
+ */
+ QString mAlarmDate;
/**
* @var mTranslator
* @brief translator for the localisation of strings
*/
- QTranslator *mTranslator;
+ HbTranslator *mTranslator;
/**
* @var mAlarmDescription
--- a/alarmui/alarmalertwidget/alarmalertplugin/src/alarmalertplugin.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/alarmui/alarmalertwidget/alarmalertplugin/src/alarmalertplugin.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -19,7 +19,6 @@
// System includes
#include <QString>
#include <QVariantMap>
-#include <QDebug>
#include <hbdevicedialog.h>
// User includes
@@ -80,7 +79,7 @@
Q_UNUSED(deviceDialogType);
Q_UNUSED(parameters);
- info->group = GenericDeviceDialogGroup;
+ info->group = CriticalGroup;
info->priority = DefaultPriority;
info->flags = NoDeviceDialogFlags;
return true;
--- a/alarmui/alarmalertwidget/alarmalertplugin/src/alarmalertwidget_p.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/alarmui/alarmalertwidget/alarmalertplugin/src/alarmalertwidget_p.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -20,17 +20,16 @@
#include <QApplication>
#include <QGesture>
#include <QGestureEvent>
-#include <QDebug>
#include <QGraphicsSceneMouseEvent>
-#include <QTranslator>
+
#include <hbdocumentloader.h>
#include <hbpushbutton.h>
#include <hblabel.h>
#include <hbinstance.h>
#include <hbextendedlocale.h>
#include <hbi18ndef.h>
-#include <hbapplication.h>
#include <hbaction.h>
+#include <hbtranslator.h>
// User includes
#include "alarmalertwidget_p.h"
@@ -43,6 +42,7 @@
// ---------------------------------------------------------
//
AlarmAlertDialogPrivate::AlarmAlertDialogPrivate(const QVariantMap ¶meters):
+ mTranslator(new HbTranslator("alarmui")),
mClosedByClient(false),
mIsSilenceKey(false)
{
@@ -52,19 +52,13 @@
// Set the dismiss policy and timeout property
setDismissPolicy(HbPopup::NoDismiss);
setTimeout(HbPopup::NoTimeout);
+
+ // Listen the signal when alarmui is about to display so that we can start playing the alarm tone.
+ connect(this, SIGNAL(aboutToShow()), this, SLOT(aboutToDisplay()) );
// Initialize the user response
mUserResponse = Other;
- // Load the translation file and install the editor specific translator
- mTranslator = new QTranslator;
- QString lang = QLocale::system().name();
- QString path = "Z:/resource/qt/translations/";
- bool loaded = mTranslator->load("alarmui_en_GB",":/translations");
- // TODO: Load the appropriate .qm file based on locale
- //bool loaded = mTranslator->load("alarmui_" + lang, path);
- HbApplication::instance()->installTranslator(mTranslator);
-
// TODO: Gestures not working. Integrate once support is available from Qt
grabGesture(Qt::SwipeGesture);
}
@@ -88,7 +82,6 @@
HbEffect::remove(mSlider);
// Remove the translator
- HbApplication::instance()->removeTranslator(mTranslator);
if (mTranslator) {
delete mTranslator;
mTranslator = 0;
@@ -151,7 +144,7 @@
HbDialog::showEvent(event);
QVariantMap param;
param.insert(alarmCommand, mUserResponse);
- //emit deviceDialogData(param);
+ emit deviceDialogData(param);
}
// ---------------------------------------------------------
@@ -161,9 +154,7 @@
//
void AlarmAlertDialogPrivate::closeEvent(QCloseEvent *event)
{
- // Forward the call to the base class
- HbDialog::closeEvent(event);
-
+
// Do not notify the client back if the close was initiated by client itself
if(!mClosedByClient) {
// Package the user response and send it
@@ -173,6 +164,9 @@
}
// This signal has to be emitted so that the dialog can be cleaned up later
emit deviceDialogClosed();
+
+ // Forward the call to the base class
+ HbDialog::closeEvent(event);
}
// ---------------------------------------------------------
@@ -215,7 +209,20 @@
close();
}
}
-
+
+// ---------------------------------------------------------
+// AlarmAlertDialogPrivate::aboutToDisplay
+// rest of the details are commented in the header
+// ---------------------------------------------------------
+//
+void AlarmAlertDialogPrivate::aboutToDisplay()
+ {
+ mUserResponse = Shown;
+ QVariantMap param;
+ param.insert(alarmCommand, mUserResponse);
+ emit deviceDialogData(param);
+ }
+
// ---------------------------------------------------------
// AlarmAlertDialogPrivate::dismissed
// rest of the details are commented in the header
@@ -243,8 +250,10 @@
mSubject = iter.value().toString();
} else if (alarmLocation == key) {
mLocation = iter.value().toString();
- } else if (alarmDateTime == key) {
- mAlarmTime = iter.value().toDateTime();
+ } else if (alarmTime == key) {
+ mAlarmTime = iter.value().toString();
+ } else if (alarmDate == key) {
+ mAlarmDate = iter.value().toString();
} else if (alarmType == key) {
mAlarmAlertType = static_cast <AlarmType> (iter.value().toInt());
} else if (alarmCanSnooze == key) {
@@ -302,8 +311,7 @@
}
HbExtendedLocale locale = HbExtendedLocale::system();
mAlarmDateTime->setPlainText(
- hbTrId("txt_calendar_info_alarm_start_time").arg(
- locale.format(mAlarmTime.time(), r_qtn_time_usual)));
+ hbTrId("txt_calendar_info_alarm_start_time").arg(mAlarmTime));
mAlarmDescription = qobject_cast<HbLabel*> (
mAlertDocLoader->findWidget("alarmDescription"));
@@ -367,16 +375,14 @@
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)));
+ hbTrId("txt_calendar_info_alarm_start_time").arg(mAlarmTime));
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)));
+ hbTrId("txt_calendar_info_alarm_start_date").arg(mAlarmDate));
HbLabel *alarmDateNonTimed = qobject_cast<HbLabel*> (
mAlertDocLoader->findWidget("nonTimedAlarmDate"));
if (!alarmDateNonTimed) {
@@ -407,8 +413,7 @@
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)));
+ hbTrId("txt_calendar_info_alarm_start_date").arg(mAlarmDate));
}
QGraphicsWidget *headingWidget = mAlertDocLoader->findWidget("heading");
@@ -482,8 +487,7 @@
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)));
+ hbTrId("txt_calendar_info_alarm_start_date").arg(mAlarmDate));
mAlarmDescription = qobject_cast<HbLabel*> (
mAlertDocLoader->findWidget("alarmDescription"));
--- a/alarmui/src/AlmAlarmControl.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/alarmui/src/AlmAlarmControl.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -177,7 +177,7 @@
iAlarmUtils->StartKeyBlocker();
// reset the key guard
- iAlarmUtils->SetKeyGuard( ETrue );
+ //iAlarmUtils->SetKeyGuard( ETrue );
}
break;
@@ -227,26 +227,9 @@
// Allow auto-snooze only while waiting user input
if( IsState( EStateWaitingInput ) )
{
- SetState( EStateAfterInput );
- if( iAlarmUtils->IsCalendarAlarm() )
- {
- if( iAlarmUtils->IsCalendarAlarmViewer() )
- {
- iAlarmUtils->SetCalendarAlarmViewer(EFalse);
- }
- else
- {
- TRAP_IGNORE( StoreMissedAlarmDataL() );
- }
- iAlarmUtils->DoStopAlarm();
- DoCancelDialog();
-
- }
- else
- {
- iAlarmUtils->TryToSnoozeActiveAlarm();
- DoCancelDialog();
- }
+ SetState( EStateAfterInput );
+ iAlarmUtils->TryToSnoozeActiveAlarm();
+ DoCancelDialog();
}
TRACE_EXIT_POINT;
}
@@ -529,9 +512,9 @@
delete text; // only delete if GetAlarmLabelL call was successfull
ASSERT( !err ); */
iAlarmUtils->NotifierDialogController()->showAlarmAlert(alarmInfo);
- iAlarmUtils->StartAutoSnoozeTimer();
- iAlarmUtils->PlayAlarmSound();
- SetState( EStateWaitingInput );
+ //iAlarmUtils->StartAutoSnoozeTimer();
+ //iAlarmUtils->PlayAlarmSound();
+ //SetState( EStateWaitingInput );
if( err ) // failed to fetch alarm data or show the notification
{
@@ -962,7 +945,7 @@
{
iAlarmUtils->StartAutoSnoozeTimer();
iAlarmUtils->PlayAlarmSound();
- iAlarmUtils->SetKeyGuard( EFalse );
+ //iAlarmUtils->SetKeyGuard( EFalse );
SetState( EStateWaitingInput );
iAlarmUtils->StartKeyBlocker(); // block all input for 0.5 seconds
}
@@ -1385,7 +1368,7 @@
{
iAlarmUtils->StartAutoSnoozeTimer();
iAlarmUtils->PlayAlarmSound();
- iAlarmUtils->SetKeyGuard( EFalse );
+ //iAlarmUtils->SetKeyGuard( EFalse );
SetState( EStateWaitingInput );
iAlarmUtils->StartKeyBlocker(); // block all input for 0.5 seconds
}
--- a/calendarui/agendaeventviewer/agendaeventviewer.pro Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/agendaeventviewer/agendaeventviewer.pro Tue Jul 06 14:14:56 2010 +0300
@@ -67,7 +67,8 @@
agendaeventviewerdocloader.h \
agendaeventvieweritem.h
-RESOURCES += \
- agendaeventviewer.qrc
+RESOURCES += agendaeventviewer.qrc
+
+TRANSLATIONS += caleneventviewer.ts
# End of file --Don't remove this.
--- a/calendarui/agendaeventviewer/data/agendaeventviewer.docml Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/agendaeventviewer/data/agendaeventviewer.docml Tue Jul 06 14:14:56 2010 +0300
@@ -15,7 +15,9 @@
<widget name="reminderWidget" type="HbWidget"/>
<widget name="repeatWidget" type="HbWidget"/>
<widget name="descriptionWidget" type="HbWidget"/>
- <widget name="maptileWidget" type="HbLabel" />
+ <widget name="maptileWidget" type="HbLabel">
+ <contentsmargins bottom="var(hb-param-margin-gene-bottom)" left="var(hb-param-margin-gene-left)" right="var(hb-param-margin-gene-right)" top="0un"/>
+ </widget>
<layout orientation="Vertical" type="linear">
<contentsmargins bottom="0un" left="0un" top="0un"/>
<linearitem itemname="subjectWidget"/>
--- a/calendarui/agendaeventviewer/data/agendaeventviewer.qrc Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/agendaeventviewer/data/agendaeventviewer.qrc Tue Jul 06 14:14:56 2010 +0300
@@ -2,9 +2,6 @@
<qresource prefix="/docml">
<file alias="agendaeventviewer.docml">agendaeventviewer.docml</file>
</qresource>
- <qresource prefix="/translations">
- <file alias="caleneventviewer_en_GB">caleneventviewer_en_GB.qm</file>
- </qresource>
<qresource>
<file alias="agendaeventvieweritem.css">agendaeventvieweritem.css</file>
<file alias="agendaeventvieweritem_color.css">agendaeventvieweritem_color.css</file>
--- a/calendarui/agendaeventviewer/data/agendaeventvieweritem.css Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/agendaeventviewer/data/agendaeventvieweritem.css Tue Jul 06 14:14:56 2010 +0300
@@ -26,7 +26,8 @@
fixed-height:var(hb-param-graphic-size-primary-small);
top: -var(hb-param-margin-gene-top);
left: -var(hb-param-margin-gene-left);
- right: var(hb-param-margin-gene-middle-horizontal);
+
+
}
AgendaEventViewerItem::primaryRightIconItem {
@@ -40,23 +41,40 @@
fixed-width:var(hb-param-graphic-size-primary-small);
fixed-height:var(hb-param-graphic-size-primary-small);
left: -var(hb-param-margin-gene-left);
- right: var(hb-param-margin-gene-middle-horizontal);
+
}
-AgendaEventViewerItem::primaryTextItem {
+AgendaEventViewerItem::primaryTextItem[leftPrimaryIconItem="true"] {
text-height: var(hb-param-text-height-primary);
font-variant: primary;
text-align: left;
top: -var(hb-param-margin-gene-top);
right: var(hb-param-margin-gene-middle-horizontal);
+ left: -var(hb-param-margin-gene-middle-horizontal);
}
-
-AgendaEventViewerItem::secondaryTextItem {
+AgendaEventViewerItem::primaryTextItem[leftPrimaryIconItem="false"] {
+ text-height: var(hb-param-text-height-primary);
+ font-variant: primary;
+ text-align: left;
+ top: -var(hb-param-margin-gene-top);
+ right: var(hb-param-margin-gene-middle-horizontal);
+
+
+}
+AgendaEventViewerItem::secondaryTextItem[leftPrimaryIconItem="true"]{
text-height: var(hb-param-text-height-secondary);
font-variant: secondary;
text-align: left;
top: -var(hb-param-margin-gene-middle-vertical);
right: var(hb-param-margin-gene-right);
bottom: var(hb-param-margin-gene-bottom);
-
}
+AgendaEventViewerItem::secondaryTextItem[leftPrimaryIconItem="false"] {
+ text-height: var(hb-param-text-height-secondary);
+ font-variant: secondary;
+ text-align: left;
+ top: -var(hb-param-margin-gene-middle-vertical);
+ right: var(hb-param-margin-gene-right);
+ bottom: var(hb-param-margin-gene-bottom);
+ left: -var(hb-param-margin-gene-middle-horizontal);
+}
--- a/calendarui/agendaeventviewer/data/agendaeventvieweritem_color.css Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/agendaeventviewer/data/agendaeventvieweritem_color.css Tue Jul 06 14:14:56 2010 +0300
@@ -20,4 +20,8 @@
AgendaEventViewerItem::secondaryTextItem[state="disabled"]{
color: var(qtc_list_item_disabled);
+}
+
+AgendaEventViewerItem::primaryRightIconItem{
+ color: var(qtc_list_item_content_normal);
}
\ No newline at end of file
Binary file calendarui/agendaeventviewer/data/caleneventviewer_en_GB.qm has changed
--- a/calendarui/agendaeventviewer/inc/agendaeventview.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/agendaeventviewer/inc/agendaeventview.h Tue Jul 06 14:14:56 2010 +0300
@@ -29,13 +29,13 @@
// Forward declarations
class QGraphicsLinearLayout;
-class QTranslator;
class QTimer;
class QPluginLoader;
class HbView;
class HbAction;
class HbLabel;
class HbMainWindow;
+class HbTranslator;
class MapTileService;
class AgendaEventViewerItem;
class AgendaEventViewerPrivate;
@@ -90,8 +90,10 @@
void handleDeleteAction();
void updateProgressIndicator();
void receiveMapTileStatus(int entryid,int addressType, int status);
+ void changedOrientation(Qt::Orientation orientation);
+
private:
-
+ HbMainWindow* mMainWindow;
HbView *mViewer;
QPointer<AgendaEventViewerItem> mSubjectWidget;
QPointer<AgendaEventViewerItem> mDateTimeWidget;
@@ -111,10 +113,10 @@
CalenEditor *mCalenEditor;
QGraphicsLinearLayout *mLinearLayout;
- QTranslator *mTranslator;
+ HbTranslator *mTranslator;
bool mReminderWidgetAdded;
HbAction *mBackAction;
- HbMainWindow* mMainWindow;
+
bool mLocationFeatureEnabled;
QString mMaptilePath;
MapTileService *mMaptileService;
--- a/calendarui/agendaeventviewer/inc/agendaeventviewer_p.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/agendaeventviewer/inc/agendaeventviewer_p.h Tue Jul 06 14:14:56 2010 +0300
@@ -50,6 +50,7 @@
void editingCompleted();
void deletingStarted();
void deletingCompleted();
+ void viewCreationCompleted(int error);
private:
AgendaEventViewer *q_ptr;
@@ -60,6 +61,11 @@
private:
friend class AgendaEventView;
+ ulong mId;
+ AgendaEventViewer::Actions mAction;
+ bool mShowEventViewById;
+ bool mShowEventViewByFileHandle;
+ QString mFileName;
};
#endif // AGENDAEVENTVIEWERPRIVATE_H
--- a/calendarui/agendaeventviewer/src/agendaeventview.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/agendaeventviewer/src/agendaeventview.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -17,9 +17,7 @@
// System includes
#include <QObject>
-#include <QDebug>
#include <QDateTime>
-#include <qtranslator.h>
#include <QGraphicsLinearLayout>
#include <QFile>
#include <QString>
@@ -27,7 +25,6 @@
#include <QPluginLoader>
#include <QDir>
#include <HbInstance>
-#include <hbapplication.h>
#include <HbMainWindow>
#include <HbView>
#include <HbMenu>
@@ -42,6 +39,8 @@
#include <HbMessageBox>
#include <HbDialog>
#include <HbLabel>
+#include <HbTranslator>
+
// User includes
#include <maptileservice.h>//maptile service
#include <agendautil.h>
@@ -58,11 +57,6 @@
#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;
-
//This Property is use for setting a primary left icon
static const char *primaryLeftIconItem("leftPrimaryIconItem");
@@ -83,9 +77,10 @@
AgendaEventView::AgendaEventView(
AgendaEventViewerPrivate *owner, QObject *parent):
QObject(parent),
+ mMainWindow(NULL),
mOwner(owner),
+ mTranslator(new HbTranslator("caleneventviewer")),
mReminderWidgetAdded(true),
- mMainWindow(NULL),
mMaptilePath(NULL),
mMaptileService(NULL),
mProgressTimer(NULL),
@@ -94,16 +89,6 @@
mMaptileStatus(-1),
mNotesPluginLoaded(false)
{
- qDebug() << "AgendaEventViewer: AgendaEventView::AgendaEventView -->";
-
- // Load the translator based on locale
- mTranslator = new QTranslator;
- QString lang = QLocale::system().name();
- QString path = "Z:/resource/qt/translations/";
- mTranslator->load("caleneventviewer_en_GB",":/translations");
- // TODO: Load the appropriate .qm file based on locale
- //bool loaded = mTranslator->load("caleneventviewer_" + lang, path);
- HbApplication::instance()->installTranslator(mTranslator);
mDocLoader = new AgendaEventViewerDocLoader;
@@ -161,7 +146,7 @@
mProgressTimer->setSingleShot(true);
connect(mProgressTimer, SIGNAL(timeout()), this, SLOT(updateProgressIndicator()));
}
- qDebug() << "AgendaEventViewer: AgendaEventView::AgendaEventView <--";
+
}
@@ -170,10 +155,8 @@
*/
AgendaEventView::~AgendaEventView()
{
- qDebug() << "AgendaEventViewer: AgendaEventView::~AgendaEventView -->";
// Remove the translator
- HbApplication::instance()->removeTranslator(mTranslator);
if (mTranslator) {
delete mTranslator;
mTranslator = 0;
@@ -205,7 +188,6 @@
mProgressTimer = NULL;
}
- qDebug() << "AgendaEventViewer: AgendaEventView::~AgendaEventView <--";
}
/*!
@@ -216,7 +198,6 @@
void AgendaEventView::execute(AgendaEntry entry,
AgendaEventViewer::Actions action)
{
- qDebug() << "AgendaEventViewer: AgendaEventView::execute -->";
mOriginalAgendaEntry = entry;
mAgendaEntry = entry;
@@ -232,9 +213,6 @@
// Add the toolbar items to event viewer
addToolBarItem(action);
-
- // Add the title to event viewer.
- addGroupBoxData();
// Connect for the entry updation and addtion signal to refresh the view
// when the same is edited in editor.
@@ -256,9 +234,11 @@
mMainWindow = new HbMainWindow();
mMainWindow->addView(mViewer);
mMainWindow->setCurrentView(mViewer);
+ connect(mMainWindow,SIGNAL(orientationChanged(Qt::Orientation)),this,SLOT(changedOrientation(Qt::Orientation)));
} else {
window->addView(mViewer);
window->setCurrentView(mViewer);
+ connect(window,SIGNAL(orientationChanged(Qt::Orientation)),this,SLOT(changedOrientation(Qt::Orientation)));
}
// Add softkey after adding view on window
@@ -267,7 +247,6 @@
connect(mBackAction, SIGNAL(triggered()), this, SLOT(close()));
- qDebug() << "AgendaEventViewer: AgendaEventView::execute <--";
}
/*!
@@ -275,7 +254,9 @@
*/
void AgendaEventView::addViewerData()
{
- qDebug() << "AgendaEventViewer: AgendaEventView::addViewerData -->";
+
+ // Add the title to event viewer.
+ addGroupBoxData();
// Set the summary & priority to viewer.
addSubjectAndPriorityData();
@@ -308,7 +289,6 @@
// Set the description.
addDescriptionData();
- qDebug() << "AgendaEventViewer: AgendaEventView::addViewerData <--";
}
/*!
@@ -316,7 +296,6 @@
*/
void AgendaEventView::addMenuItem()
{
- qDebug() << "AgendaEventViewer: AgendaEventView::addMenuItem -->";
if (mAgendaEntry.type() == AgendaEntry::TypeTodo) {
@@ -334,7 +313,6 @@
SLOT(markTodoStatus()));
menu->addAction(mMarkTodoAction);
}
- qDebug() << "AgendaEventViewer: AgendaEventView::addMenuItem <--";
}
/*!
@@ -342,7 +320,6 @@
*/
void AgendaEventView::addToolBarItem(AgendaEventViewer::Actions action)
{
- qDebug() << "AgendaEventViewer: AgendaEventView::addToolBarItem -->";
HbToolBar *toolBar = qobject_cast<HbToolBar *> (
mDocLoader->findWidget(AGENDA_EVENT_VIEWER_TOOLBAR));
@@ -373,7 +350,6 @@
toolBar->addAction(saveAction);
}
- qDebug() << "AgendaEventViewer: AgendaEventView::addToolBarItem <--";
}
/*!
@@ -381,21 +357,20 @@
*/
void AgendaEventView::addGroupBoxData()
{
- qDebug() << "AgendaEventViewer: AgendaEventView::addGroupBoxData -->";
HbGroupBox *groupBox = qobject_cast<HbGroupBox *> (
mDocLoader->findWidget(AGENDA_EVENT_VIEWER_GROUPBOX));
- if (mAgendaEntry.type() == AgendaEntry::TypeTodo) {
+ AgendaEntry::Type entryType = mAgendaEntry.type();
+ if (entryType == AgendaEntry::TypeTodo) {
groupBox->setHeading(hbTrId("txt_calendar_subhead_to_do"));
- } else if (mAgendaEntry.type() == AgendaEntry::TypeNote) {
- groupBox->setHeading(tr("Note"));
- } else {
- // TODO: Add the text id based on the entry type Anniversary or meeting
- groupBox->setHeading(hbTrId("txt_calendar_subhead_event"));
+ } else if (entryType == AgendaEntry::TypeAppoinment) {
+ groupBox->setHeading(hbTrId("txt_calendar_subhead_meeting"));
+ }else if (entryType == AgendaEntry::TypeEvent) {
+ //TODO: Add text id once available
+ groupBox->setHeading(hbTrId("All day event"));
}
-
- qDebug() << "AgendaEventViewer: AgendaEventView::addGroupBoxData <--";
+
}
/*!
@@ -403,8 +378,6 @@
*/
void AgendaEventView::addSubjectAndPriorityData()
{
- qDebug()
- << "AgendaEventViewer: AgendaEventView::addSubjectAndPriorityData -->";
QStringList itemList;
itemList.append(hbTrId("txt_calendar_dblist_subject"));
@@ -428,8 +401,6 @@
mSubjectWidget->setEventViewerItemData(itemList, Qt::DecorationRole);
- qDebug()
- << "AgendaEventViewer: AgendaEventView::addSubjectAndPriorityData <--";
}
/*!
@@ -437,9 +408,6 @@
*/
void AgendaEventView::addDateTimeData()
{
- qDebug()
- << "AgendaEventViewer: AgendaEventView::addDateTimeData -->";
-
QStringList itemData;
HbExtendedLocale systemLocale = HbExtendedLocale::system();
@@ -520,8 +488,6 @@
itemData.append(data);
mDateTimeWidget->setEventViewerItemData(itemData, Qt::DisplayRole);
- qDebug()
- << "AgendaEventViewer: AgendaEventView::addDateTimeData <--";
}
/*!
@@ -529,7 +495,6 @@
*/
void AgendaEventView::addLocationData()
{
- qDebug() << "AgendaEventViewer: AgendaEventView::addLocationData -->";
QStringList itemData;
QString progressIcon(QString::null);
if ( mLocationFeatureEnabled ) {
@@ -552,7 +517,6 @@
itemData.append(QString::null);
itemData.append(mAgendaEntry.location());
mLocationWidget->setEventViewerItemData(itemData, Qt::DisplayRole);
- qDebug() << "AgendaEventViewer: AgendaEventView::addLocationData <--";
}
/*!
@@ -564,11 +528,7 @@
HbIcon maptile(mMaptilePath);
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));
-
+ mMaptileLabel->setPreferredSize(QSizeF(maptile.width(), maptile.height()));
}
}
/*!
@@ -576,7 +536,6 @@
*/
void AgendaEventView::addReminderData()
{
- qDebug() << "AgendaEventViewer: AgendaEventView::addReminderData -->";
QStringList itemData;
itemData.append(QString::null);
itemData.append(QString::null);
@@ -587,7 +546,6 @@
itemData.append(QString::null);
itemData.append(alarmTimeText());
mReminderWidget->setEventViewerItemData(itemData, Qt::DisplayRole);
- qDebug() << "AgendaEventViewer: AgendaEventView::addReminderData <--";
}
/*!
@@ -595,7 +553,6 @@
*/
void AgendaEventView::addCompletedTodoData()
{
- qDebug() << "AgendaEventViewer: AgendaEventView::addCompletedTodoData -->";
QStringList itemData;
QString completedText;
HbExtendedLocale systemLocale = HbExtendedLocale::system();;
@@ -610,7 +567,6 @@
itemData.append(hbTrId("txt_calendar_dblist_completed_date"));
itemData.append(completedText);
mReminderWidget->setEventViewerItemData(itemData, Qt::DisplayRole);
- qDebug() << "AgendaEventViewer: AgendaEventView::addCompletedTodoData <--";
}
/*!
@@ -618,7 +574,6 @@
*/
void AgendaEventView::addRepeatData()
{
- qDebug() << "AgendaEventViewer: AgendaEventView::addRepeatData -->";
QStringList itemData;
itemData.append(QString::null);
itemData.append(QString::null);
@@ -629,7 +584,6 @@
itemData.append(QString::null);
itemData.append(repeatRule());
mRepeatWidget->setEventViewerItemData(itemData, Qt::DisplayRole);
- qDebug() << "AgendaEventViewer: AgendaEventView::addRepeatData <--";
}
/*!
@@ -637,7 +591,6 @@
*/
void AgendaEventView::addDescriptionData()
{
- qDebug() << "AgendaEventViewer: AgendaEventView::addDiscriptionData -->";
QStringList itemData;
itemData.append(QString::null);
itemData.append(QString::null);
@@ -648,7 +601,6 @@
itemData.append(hbTrId("txt_calendar_dblist_description"));
itemData.append(mAgendaEntry.description());
mDescriptionWidget->setEventViewerItemData(itemData, Qt::DisplayRole);
- qDebug() << "AgendaEventViewer: AgendaEventView::addDiscriptionData <--";
}
/*!
@@ -656,7 +608,6 @@
*/
void AgendaEventView::getPriorityIcon(int priority, QString &priorityIcon)
{
- qDebug() << "AgendaEventViewer: AgendaEventView::getPriorityIcon -->";
switch(priority) {
case 1:priorityIcon.append("qtg_small_priority_high");
@@ -667,7 +618,6 @@
break;
}
- qDebug() << "AgendaEventViewer: AgendaEventView::getPriorityIcon <--";
}
/*!
@@ -675,7 +625,6 @@
*/
QString AgendaEventView::repeatRule() const
{
- qDebug() << "AgendaEventViewer: AgendaEventView::repeatRule -->";
QString repeatRule;
AgendaRepeatRule agendaRepeatRule = mAgendaEntry.repeatRule();
@@ -687,8 +636,7 @@
break;
case AgendaRepeatRule::WeeklyRule:
if (AgendaUtil::isWorkdaysRepeatingEntry(agendaRepeatRule)) {
- //TODO: Add text id for workdays
- repeatRule.append(hbTrId("Workdays"));
+ repeatRule.append(hbTrId("txt_calendar_dblist_repeats_workdays"));
} else {
if (agendaRepeatRule.interval() == 2) {
repeatRule.append(
@@ -719,7 +667,6 @@
hbTrId("txt_calendar_dblist_repeats_daily_val_until_1").
arg(untilDateString));
}
- qDebug() << "AgendaEventViewer: AgendaEventView::repeatRule <--";
return repeatRule;
}
@@ -731,7 +678,6 @@
*/
QString AgendaEventView::alarmTimeText() const
{
- qDebug() << "AgendaEventViewer: AgendaEventView::alarmTimeText -->";
QString alarmDateTimeText;
QDateTime startTime;
@@ -756,7 +702,6 @@
r_qtn_date_usual_with_zero)));
}
- qDebug() << "AgendaEventViewer: AgendaEventView::alarmTimeText <--";
return alarmDateTimeText;
}
@@ -765,7 +710,6 @@
*/
void AgendaEventView::removeWidget()
{
- qDebug() << "AgendaEventViewer: AgendaEventView::removeWidget -->";
if (mAgendaEntry.location().isEmpty()) {
mLocationWidget->hide();
@@ -783,7 +727,7 @@
if (mAgendaEntry.alarm().isNull()) {
if (mAgendaEntry.type() == AgendaEntry::TypeTodo ) {
- if (AgendaEntry::TodoNeedsAction == mAgendaEntry.status()) {
+ if (AgendaEntry::TodoCompleted != mAgendaEntry.status()) {
mReminderWidget->hide();
mLinearLayout->removeItem(mReminderWidget);
mReminderWidgetAdded = false;
@@ -808,7 +752,6 @@
mLinearLayout->invalidate();
mLinearLayout->activate();
- qDebug() << "AgendaEventViewer: AgendaEventView::removeWidget <--";
}
/*!
@@ -816,8 +759,6 @@
*/
void AgendaEventView::updateCompletedReminderData()
{
- qDebug()
- << "AgendaEventViewer: AgendaEventView::updateCompletedReminderData -->";
if (AgendaEntry::TodoCompleted == mAgendaEntry.status()) {
addCompletedTodoData();
@@ -847,8 +788,6 @@
mLinearLayout->invalidate();
mLinearLayout->activate();
- qDebug()
- << "AgendaEventViewer: AgendaEventView::updateCompletedReminderData <--";
}
/*!
@@ -856,7 +795,6 @@
*/
void AgendaEventView::removeAllWidgets()
{
- qDebug() << "AgendaEventViewer: AgendaEventView::removeAllWidgets -->";
for (int i = 2; i < mLinearLayout->count(); i++) {
mLinearLayout->removeAt(i);
@@ -864,7 +802,6 @@
mLinearLayout->invalidate();
mLinearLayout->activate();
- qDebug() << "AgendaEventViewer: AgendaEventView::removeAllWidgets <--";
}
/*!
@@ -872,7 +809,6 @@
*/
void AgendaEventView::addAllWidgets()
{
- qDebug() << "AgendaEventViewer: AgendaEventView::addAllWidgets -->";
mLinearLayout->addItem(mLocationWidget);
mLocationWidget->show();
@@ -888,7 +824,6 @@
mLinearLayout->invalidate();
mLinearLayout->activate();
- qDebug() << "AgendaEventViewer: AgendaEventView::addAllWidgets <--";
}
/*!
@@ -896,8 +831,6 @@
*/
void AgendaEventView::showDeleteOccurencePopup()
{
- qDebug()
- << "AgendaEventViewer: AgendaEventView::showDeleteOccurencePopup -->";
HbDialog *popUp = new HbDialog();
popUp->setDismissPolicy(HbDialog::NoDismiss);
popUp->setTimeout(HbDialog::NoTimeout);
@@ -931,8 +864,6 @@
// Show the popup
popUp->open();
- qDebug()
- << "AgendaEventViewer: AgendaEventView::showDeleteOccurencePopup <--";
}
/*!
@@ -940,8 +871,6 @@
*/
void AgendaEventView::showDeleteConfirmationQuery()
{
- qDebug()
- << "AgendaEventViewer: AgendaEventView::showDeleteConfirmationQuery -->";
HbMessageBox *popup = new HbMessageBox(HbMessageBox::MessageTypeQuestion);
popup->setDismissPolicy(HbDialog::NoDismiss);
@@ -983,8 +912,6 @@
SLOT(handleDeleteAction()));
popup->addAction(new HbAction(hbTrId("txt_calendar_button_cancel"), popup));
popup->open();
- qDebug()
- << "AgendaEventViewer: AgendaEventView::showDeleteConfirmationQuery <--";
}
/*!
@@ -1006,36 +933,26 @@
*/
void AgendaEventView::markTodoStatus()
{
- qDebug() << "AgendaEventViewer: AgendaEventView::markTodoStatus -->";
QDateTime currentDateTime = QDateTime::currentDateTime();
// Set the to-do status using the agenda util.
- if (AgendaEntry::TodoNeedsAction == mAgendaEntry.status()) {
-
+ if (AgendaEntry::TodoCompleted != mAgendaEntry.status()) {
// Update the menu text to mark to-do as undone.
mMarkTodoAction->setText(hbTrId("txt_calendar_menu_mark_as_not_done"));
-
mAgendaEntry.setStatus(AgendaEntry::TodoCompleted);
mAgendaEntry.setCompletedDateTime(currentDateTime);
mOwner->mAgendaUtil->setCompleted(mAgendaEntry, true, currentDateTime);
-
-
-
- } else if (AgendaEntry::TodoCompleted == mAgendaEntry.status()) {
+ } else {
// Update the menu text to mark to-do as done.
mMarkTodoAction->setText(hbTrId("txt_calendar_menu_mark_as_done"));
-
mAgendaEntry.setStatus(AgendaEntry::TodoNeedsAction);
mOwner->mAgendaUtil->setCompleted(mAgendaEntry, false, currentDateTime);
-
-
}
updateCompletedReminderData();
- qDebug() << "AgendaEventViewer: AgendaEventView::markTodoStatus <--";
}
/*!
@@ -1043,7 +960,6 @@
*/
void AgendaEventView::edit()
{
- qDebug() << "AgendaEventViewer: AgendaEventView::edit -->";
mOwner->editingStarted();
@@ -1082,7 +998,6 @@
}
- qDebug() << "AgendaEventViewer: AgendaEventView::edit <--";
}
/*!
@@ -1090,7 +1005,6 @@
*/
void AgendaEventView::deleteAgendaEntry()
{
- qDebug() << "AgendaEventViewer: AgendaEventView::deleteAgendaEntry -->";
// Before we do anything, check in the entry is repeating
// OR its a child item
@@ -1105,7 +1019,6 @@
showDeleteConfirmationQuery();
}
- qDebug() << "AgendaEventViewer: AgendaEventView::deleteAgendaEntry <--";
}
/*!
@@ -1113,21 +1026,18 @@
*/
void AgendaEventView::saveAgendaEntry()
{
- qDebug() << "AgendaEventViewer: AgendaEventView::saveAgendaEntry -->";
// Save entry to calendar.
mOwner->mAgendaUtil->addEntry(mAgendaEntry);
// Close the agenda entry viewer
close();
- qDebug() << "AgendaEventViewer: AgendaEventView::saveAgendaEntry <--";
}
/*!
Closes the event viewer
*/
void AgendaEventView::close()
{
- qDebug() << "AgendaEventViewer: AgendaEventView::close -->";
// Remove the view from main window.
HbMainWindow *window = hbInstance->allMainWindows().first();
@@ -1140,7 +1050,6 @@
window->removeView(mViewer);
mOwner->viewingCompleted(mAgendaEntry.startTime().date());
- qDebug() << "AgendaEventViewer: AgendaEventView::close <--";
}
/*!
@@ -1148,7 +1057,6 @@
*/
void AgendaEventView::handleEntryUpdation(ulong id)
{
- qDebug() << "AgendaEventViewer: AgendaEventView::handleEntryUpdation -->";
AgendaEntry updatedEntry = mOwner->mAgendaUtil->fetchById(id);
@@ -1194,7 +1102,6 @@
close();
}
- qDebug() << "AgendaEventViewer: AgendaEventView::handleEntryUpdation <--";
}
/*!
@@ -1202,7 +1109,6 @@
*/
void AgendaEventView::handleEntryDeletion(ulong id)
{
- qDebug() <<"AgendaEventViewer: AgendaEventView::handleEntryDeletion -->";
if (id == mAgendaEntry.id()) {
// Close the agenda entry viewer
@@ -1210,7 +1116,6 @@
mOwner->deletingCompleted();
}
- qDebug() <<"AgendaEventViewer: AgendaEventView::handleEntryDeletion <--";
}
/*!
@@ -1219,14 +1124,12 @@
void AgendaEventView::handleNoteEditorClosed(bool status)
{
Q_UNUSED(status);
- qDebug() <<"AgendaEventViewer: AgendaEventView::handleNoteEditorClosed -->";
// To avoid loading the plugin again for editing,
// Unload the plug-in while destruction.
mOwner->editingCompleted();
- qDebug() <<"AgendaEventViewer: AgendaEventView::handleNoteEditorClosed <--";
}
/*!
@@ -1234,15 +1137,11 @@
*/
void AgendaEventView::handleCalendarEditorClosed()
{
- qDebug()
- <<"AgendaEventViewer: AgendaEventView::handleCalendarEditorClosed -->";
// Cleanup.
mCalenEditor->deleteLater();
mOwner->editingCompleted();
- qDebug()
- <<"AgendaEventViewer: AgendaEventView::handleCalendarEditorClosed <--";
}
/*!
@@ -1250,7 +1149,6 @@
*/
void AgendaEventView::handleDeleteOccurence(int index)
{
- qDebug() << "AgendaEventViewer: AgendaEventView::handleDeleteOccurence -->";
// To notify client that deleting Started
// Calendar Application changing state from viewing to deleting.
@@ -1270,7 +1168,6 @@
break;
}
- qDebug() << "AgendaEventViewer: AgendaEventView::handleDeleteOccurence <--";
}
/*!
@@ -1278,11 +1175,10 @@
*/
void AgendaEventView::getSubjectIcon(AgendaEntry::Type type, QString &subjectIcon)
{
- qDebug() << "AgendaEventViewer: AgendaEventView::getSubjectIcon -->";
switch(type) {
case AgendaEntry::TypeAppoinment:
{
- subjectIcon.append("qtg_small_favorite");//@to do add proper icon
+ subjectIcon.append("qtg_small_meeting");
}
break;
case AgendaEntry::TypeTodo:
@@ -1304,7 +1200,6 @@
break;
}
- qDebug() << "AgendaEventViewer: AgendaEventView::getSubjectIcon <--";
}
/*!
@@ -1335,15 +1230,14 @@
itemData.append("qtg_small_location");
mLocationWidget->setProperty(primaryLeftIconItem, false);
mLocationWidget->setEventViewerItemData(itemData, Qt::DecorationRole);
- MapTileService::AddressType addressType;
- addressType = MapTileService::AddressPlain;
- int eventId = mAgendaEntry.id();
- mMaptileService->getMapTileImage(eventId, addressType, mMaptilePath);
+ Qt::Orientations orientation=hbInstance->allMainWindows().first()->orientation();
+ mMaptilePath.clear();
+ mMaptileStatus = mMaptileService->getMapTileImage(mAgendaEntry.id(), MapTileService::AddressPlain, mMaptilePath ,orientation);
addMapTileImage();
QFile file(mMaptilePath);
if (file.exists()) {
//add to linear layout
- int indexMaptileLabel = 3;
+ int indexMaptileLabel = 3;// index of maptile widget position
mLinearLayout->insertItem(indexMaptileLabel, mMaptileLabel);
mMaptileLabel->show();
}
@@ -1385,19 +1279,19 @@
addressType = MapTileService::AddressPlain;
int eventId = mAgendaEntry.id();
mMaptilePath.clear();
- int status = 0;
+ mMaptileStatus = -1;
connect(mMaptileService, SIGNAL(maptileFetchingStatusUpdate(int,
int ,int)), this, SLOT(receiveMapTileStatus(int,int,int)));
- status = mMaptileService->getMapTileImage(eventId, addressType, mMaptilePath);
- if (status == MapTileService::MapTileFetchingNetworkError || status
+ Qt::Orientations orientation=hbInstance->allMainWindows().first()->orientation();
+ mMaptileStatus = mMaptileService->getMapTileImage(eventId, addressType, mMaptilePath ,orientation);
+ if (mMaptileStatus == MapTileService::MapTileFetchingNetworkError || mMaptileStatus
== MapTileService::MapTileFetchingInProgress) {
mMaptilePath.clear();
- mMaptileStatusReceived = false; //reseting receiving status value
- mMaptileStatus = -1;// reseting status value;
+ mMaptileStatusReceived = false; //reseting receiving status value
progressIcon.append(QString("qtg_anim_small_loading_1"));
mProgressTimer->start(100);
}
- else if (status == MapTileService::MapTileFetchingInvalidAddress || status
+ else if (mMaptileStatus == MapTileService::MapTileFetchingInvalidAddress || mMaptileStatus
== MapTileService::MapTileFetchingUnknownError) {
mMaptilePath.clear();
//no further need of this coonnection
@@ -1412,4 +1306,16 @@
progressIcon.append(QString::null);
}
}
+/*!
+ Reload the maptile image on system orientation change.
+ */
+void AgendaEventView::changedOrientation(Qt::Orientation orientation)
+{
+ if (mMaptileStatus == MapTileService::MapTileFetchingCompleted) {
+ mMaptilePath.clear();
+ mMaptileService->getMapTileImage(mAgendaEntry.id(), MapTileService::AddressPlain, mMaptilePath,orientation);
+ addMapTileImage();
+ }
+}
+
// End of file
--- a/calendarui/agendaeventviewer/src/agendaeventviewer_p.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/agendaeventviewer/src/agendaeventviewer_p.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -16,7 +16,6 @@
*/
// System includes.
-#include <QDebug>
#include <QFile>
#include <QDir>
@@ -43,9 +42,8 @@
*/
AgendaEventViewerPrivate::AgendaEventViewerPrivate(
AgendaUtil *agendaUtil, QObject *parent)
-: QObject(parent)
+: QObject(parent),mShowEventViewById(false),mShowEventViewByFileHandle(false),mFileName(NULL),mAction(AgendaEventViewer::ActionNothing)
{
- qDebug() <<"AgendaEventViewerPrivate::AgendaEventViewerPrivate -->";
// Get the q-pointer.from parent
q_ptr = static_cast<AgendaEventViewer *> (parent);
@@ -65,8 +63,12 @@
connect(
mAgendaUtil, SIGNAL(entriesChanged(QList<ulong> )),
this, SLOT(handleEntriesChanged(QList<ulong> )));
+
+ // Register for the calenInstance view creation sucessfully
+ connect(
+ mAgendaUtil, SIGNAL(entryViewCreationCompleted(int)),
+ this, SLOT(viewCreationCompleted(int)));
- qDebug() <<"AgendaEventViewerPrivate::AgendaEventViewerPrivate <--";
}
/*!
@@ -74,14 +76,12 @@
*/
AgendaEventViewerPrivate::~AgendaEventViewerPrivate()
{
- qDebug() <<"AgendaEventViewerPrivate::~AgendaEventViewerPrivate -->";
if (mViewerOwnsAgendaUtil) {
delete mAgendaUtil;
mAgendaUtil = 0;
}
- qDebug() <<"AgendaEventViewerPrivate::~AgendaEventViewerPrivate <--";
}
/*!
@@ -93,18 +93,22 @@
void AgendaEventViewerPrivate::view(const ulong id,
AgendaEventViewer::Actions action)
{
- qDebug() <<"AgendaEventViewerPrivate::view(id) -->";
AgendaEntry entry = mAgendaUtil->fetchById(id);
if (entry.isNull()) {
+ // save the entries , to show the entry once instances are created
+ // if entry is null exit ,later call back comes in viewCreationCompleted
+ mAction = action;
+ mId =id;
+ //to avoid view creation multiple times
+ mShowEventViewById = true;
return;
}
// Construct the agenda event view
mAgendaEventView = new AgendaEventView(this);
mAgendaEventView->execute(entry, action);
- qDebug() <<"AgendaEventViewerPrivate::view(id) <--";
}
/*!
@@ -116,7 +120,6 @@
void AgendaEventViewerPrivate::view(const QFile &fileHandle,
AgendaEventViewer::Actions action)
{
- qDebug() <<"AgendaEventViewerPrivate::view(fileHandle) -->";
// Using calendar importer read the filehandle and generate agenda entry
QString filePath = fileHandle.fileName();
@@ -127,9 +130,12 @@
mAgendaEventView = new AgendaEventView(this);
mAgendaEventView->execute(entry, action);
} else {
- q_ptr->viewingCompleted(QDateTime::currentDateTime().date());
+ //store the file name
+ mFileName = filePath ;
+ mAction = action ;
+ mShowEventViewByFileHandle = true;
+ q_ptr->viewingCompleted(QDateTime::currentDateTime().date());
}
- qDebug() <<"AgendaEventViewerPrivate::view(fileHandle) <--";
}
/*!
@@ -139,7 +145,6 @@
void AgendaEventViewerPrivate::view(AgendaEntry entry,
AgendaEventViewer::Actions action)
{
- qDebug() <<"AgendaEventViewerPrivate::view(entry) -->";
if (entry.isNull()) {
return;
@@ -148,7 +153,6 @@
mAgendaEventView = new AgendaEventView(this);
mAgendaEventView->execute(entry, action);
- qDebug() <<"AgendaEventViewerPrivate::view(entry) <--";
}
/*!
@@ -158,7 +162,6 @@
*/
void AgendaEventViewerPrivate::viewingCompleted(const QDate date)
{
- qDebug() <<"AgendaEventViewerPrivate::viewingCompleted -->";
emit q_ptr->viewingCompleted(date);
@@ -167,7 +170,6 @@
mAgendaEventView->deleteLater();
}
- qDebug() <<"AgendaEventViewerPrivate::viewingCompleted -->";
}
/*!
@@ -175,11 +177,9 @@
*/
void AgendaEventViewerPrivate::editingStarted()
{
- qDebug() <<"AgendaEventViewerPrivate::editingStarted -->";
emit q_ptr->editingStarted();
- qDebug() <<"AgendaEventViewerPrivate::editingStarted -->";
}
/*!
@@ -187,11 +187,9 @@
*/
void AgendaEventViewerPrivate::editingCompleted()
{
- qDebug() <<"AgendaEventViewerPrivate::editingCompleted -->";
emit q_ptr->editingCompleted();
- qDebug() <<"AgendaEventViewerPrivate::editingCompleted -->";
}
/*!
@@ -199,11 +197,9 @@
*/
void AgendaEventViewerPrivate::deletingStarted()
{
- qDebug() <<"AgendaEventViewerPrivate::deletingStarted -->";
emit q_ptr->deletingStarted();
- qDebug() <<"AgendaEventViewerPrivate::deletingStarted -->";
}
/*!
@@ -211,11 +207,43 @@
*/
void AgendaEventViewerPrivate::deletingCompleted()
{
- qDebug() <<"AgendaEventViewerPrivate::deletingCompleted -->";
emit q_ptr->deletingCompleted();
- qDebug() <<"AgendaEventViewerPrivate::deletingCompleted -->";
}
+
+/*!
+ calls when instances of calenInstanceview and
+ entryInstanceview is created successfully
+ */
+void AgendaEventViewerPrivate::viewCreationCompleted(int error)
+ {
+
+ if((KErrNone == error))
+ {
+ AgendaEntry entry;
+ if (mShowEventViewById)
+ {
+ entry = mAgendaUtil->fetchById(mId);
+ }
+ else if(mShowEventViewByFileHandle)
+ {
+ QString nativeFilePath = QDir::toNativeSeparators(mFileName);
+ mAgendaUtil->importvCalendar(nativeFilePath, entry);
+ }
+ //if entry is there , then show the view
+ if (!entry.isNull())
+ {
+ mAgendaEventView = new AgendaEventView(this);
+ mAgendaEventView->execute(entry, mAction);
+ }
+ }
+ //reset the variables
+ mId = 0;
+ mFileName.clear();
+ mShowEventViewById = false;
+ mShowEventViewByFileHandle = false;
+ mAction = AgendaEventViewer::ActionNothing;
+ }
// End of file
--- a/calendarui/application/application.pro Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/application/application.pro Tue Jul 06 14:14:56 2010 +0300
@@ -25,7 +25,6 @@
CONFIG += hb
-
symbian: {
BLD_INF_RULES.prj_exports += \
@@ -57,10 +56,6 @@
CONFIG += service
SERVICE.FILE = calendar_conf.xml
-
- RESOURCES += calendar.qrc
-
- TRANSLATIONS += calendar.ts
SKINICON = qtg_large_calendar
@@ -72,4 +67,8 @@
SOURCES += main.cpp \
calenserviceprovider.cpp
+RESOURCES += calendar.qrc
+
+TRANSLATIONS += calendar.ts
+
# End of file --Don't remove this.
\ No newline at end of file
--- a/calendarui/application/inc/calenserviceprovider.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/application/inc/calenserviceprovider.h Tue Jul 06 14:14:56 2010 +0300
@@ -27,7 +27,7 @@
public:
enum CalenView{
MonthView = 0,
- DayView
+ AgendaView
};
//Q_DECLARE_USER_METATYPE_ENUM(enum);
CalenServiceProvider(CCalenController *controller, QObject* parent = 0);
--- a/calendarui/application/src/calenserviceprovider.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/application/src/calenserviceprovider.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -15,9 +15,10 @@
*
*/
//#include <qdatetime.h>
-#include <qdebug.h>
#include <hbmainwindow.h>
+#include <CalenLauncher>
+
#include "calencontroller.h"
#include "caleneditor.h"
#include "calenserviceprovider.h"
@@ -36,17 +37,16 @@
void CalenServiceProvider::launchCalendarApp(const QDateTime& date, int viewId)
{
- qDebug() << "launchCalendarApp slot getting called -->";
// Check the view ID and launch the corresponding view
switch(viewId) {
- case 0:
+ case CalenLauncher::MonthView:
// Launch the month view
mController->handleServiceManagerSlot(ECalenMonthView, date);
break;
- case 1:
- // Launch the month view
- mController->handleServiceManagerSlot(ECalenDayView, date);
+ case CalenLauncher::AgendaView:
+ // Launch the agenda view
+ mController->handleServiceManagerSlot(ECalenAgendaView, date);
break;
default:
// Keep Quiet
--- a/calendarui/application/src/main.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/application/src/main.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -17,10 +17,10 @@
#include <QtGui>
-#include <QTranslator>
#include <xqserviceutil.h>
-#include <hbapplication.h>
-#include <hbmainwindow.h>
+#include <hbapplication.h>
+#include <hbmainwindow.h>
+#include <hbtranslator.h>
#include "calencontroller.h"
#include "calenserviceprovider.h"
@@ -33,26 +33,25 @@
HbMainWindow window;
//For translation, loading and installing translator
- QTranslator translator;
- QString lang = QLocale::system().name();
- QString path = "Z:/resource/qt/translations/";
- // TODO: Load the appropriate .qm file based on locale
- bool loaded = translator.load("calendar_en_GB",":/translations");
- app.installTranslator(&translator);
-
- //Backup and restore code need to write here.
+ HbTranslator translator("calendar");
+ translator.loadCommon();
+
+ // Backup and restore code need to write here.
CCalenController *controller = new CCalenController();
-
- // Create the Calendar service provider
- CalenServiceProvider service(controller);
+
+ int retValue = 0;
+ if (controller) {
+ controller->constructController();
+ // Create the Calendar service provider
+ CalenServiceProvider service(controller);
- int retValue = app.exec();
+ retValue = app.exec();
- // delete the controller
- controller->ReleaseCustomisations();
- controller->Release();
-
+ // delete the controller
+ controller->ReleaseCustomisations();
+ controller->Release();
+ }
return retValue;
}
--- a/calendarui/caleneditor/caleneditor.pro Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/caleneditor/caleneditor.pro Tue Jul 06 14:14:56 2010 +0300
@@ -44,22 +44,24 @@
}
SOURCES += caleneditor.cpp \
- caleneditorcustomitem.cpp \
- caleneditor_p.cpp \
+ caleneditorcustomitem.cpp \
+ caleneditor_p.cpp \
caleneditordocloader.cpp \
caleneditorreminderfield.cpp \
caleneditorrepeatfield.cpp \
caleneditordatahandler.cpp
-
+
HEADERS += caleneditor.h \
- caleneditorcustomitem.h \
- caleneditorcommon.h \
- caleneditordocloader.h \
- caleneditor_p.h \
- caleneditorreminderfield.h \
- caleneditorrepeatfield.h \
- caleneditordatahandler.h
-
-RESOURCES += caleneditor.qrc
-
+ caleneditorcustomitem.h \
+ caleneditorcommon.h \
+ caleneditordocloader.h \
+ caleneditor_p.h \
+ caleneditorreminderfield.h \
+ caleneditorrepeatfield.h \
+ caleneditordatahandler.h
+
+RESOURCES += caleneditor.qrc
+
+TRANSLATIONS += caleneditor.ts
+
# End of file --Don't remove this.
--- a/calendarui/caleneditor/data/caleneditor.qrc Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/caleneditor/data/caleneditor.qrc Tue Jul 06 14:14:56 2010 +0300
@@ -3,7 +3,4 @@
<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>
- </qresource>
</RCC>
Binary file calendarui/caleneditor/data/caleneditor_en_GB.qm has changed
--- a/calendarui/caleneditor/inc/caleneditor.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/caleneditor/inc/caleneditor.h Tue Jul 06 14:14:56 2010 +0300
@@ -45,6 +45,7 @@
public:
enum CreateType{
TypeAppointment = 0,
+ // TODO: Need to add more types
TypeUnKnown = -1
};
--- a/calendarui/caleneditor/inc/caleneditor_p.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/caleneditor/inc/caleneditor_p.h Tue Jul 06 14:14:56 2010 +0300
@@ -20,6 +20,7 @@
// System includes
#include <QObject>
+#include <QPointer>
#include <hbmainwindow.h>
#include <QHash>
#include <QDateTime>
@@ -31,7 +32,6 @@
#include "caleneditorcommon.h"
//forward declarations
-class QTranslator;
class QFile;
class HbDataForm;
class HbDataFormModel;
@@ -42,6 +42,7 @@
class HbCheckBox;
class HbComboBox;
class HbView;
+class HbTranslator;
class MCalenServices;
class AgendaEntry;
class AgendaUtil;
@@ -159,6 +160,8 @@
void saveFromDateTime(QDateTime& fromDateTime);
void saveToDateTime(QDateTime& toDateTime);
void handleLocationChange(const QString location);
+ void handleLocationChange(const QString location,
+ const double geoLatitude, const double geoLongitude);
void handleDescriptionChange(const QString description);
void saveAndCloseEditor();
void showDeleteConfirmationQuery(bool closeEditor = false);
@@ -170,6 +173,8 @@
void handleCancel();
void handleCalendarLaunchError(int error);
void closeEditor();
+ void handleLocationEditingFinished();
+ void selectEditingFinishedAction(HbAction* action);
private:
enum EditRange {
@@ -179,7 +184,7 @@
};
CalenEditor *q_ptr;
- AgendaUtil *mAgendaUtil;
+ QPointer<AgendaUtil> mAgendaUtil;
CalenEditorDocLoader *mEditorDocLoader;
HbView *mEditorView;
@@ -208,7 +213,7 @@
HbAction *mSoftKeyAction;
HbAction *mDescriptionAction;
HbMainWindow *mMainWindow;
- QTranslator *mTranslator;
+ HbTranslator *mTranslator;
bool mNewEntry;
bool mDescriptionItemAdded;
--- a/calendarui/caleneditor/inc/caleneditorcustomitem.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/caleneditor/inc/caleneditorcustomitem.h Tue Jul 06 14:14:56 2010 +0300
@@ -63,11 +63,13 @@
void saveDate();
void handleLocationTextChange(QString location);
void launchLocationPicker();
+ void handleEditingFinished();
Q_SIGNALS:
void dateTimeUpdated(QDateTime& fromDateTime);
void locationTextChanged(QString location);
-
+ void locationTextChanged(QString location, double latitude, double longitude);
+ void locationEditingFinished();
private:
AgendaEntry *mEditedEntry;
QDate mDate;
--- a/calendarui/caleneditor/src/caleneditor.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/caleneditor/src/caleneditor.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -81,6 +81,9 @@
*/
void CalenEditor::edit(AgendaEntry entry, bool launchCalendar)
{
+ if(entry.isNull()) {
+ return;
+ }
d_ptr->edit(entry, launchCalendar);
}
@@ -118,6 +121,9 @@
void CalenEditor::create(AgendaEntry entry, bool launchCalendar,
CalenEditor::CreateType type)
{
+ if(entry.isNull()) {
+ return;
+ }
d_ptr->create(type, entry, launchCalendar);
}
--- a/calendarui/caleneditor/src/caleneditor_p.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/caleneditor/src/caleneditor_p.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -19,8 +19,8 @@
#include <QObject>
#include <QTimer>
#include <QGraphicsLinearLayout>
-#include <qtranslator.h>
-#include <qapplication.h>
+#include <QApplication>
+
#include <hbdataform.h>
#include <hbmainwindow.h>
#include <hbinstance.h>
@@ -42,9 +42,9 @@
#include <hbi18ndef.h>
#include <qdatetime.h>
#include <hbgroupbox.h>
-#include <hbapplication.h>
#include <hbradiobuttonlist.h>
#include <hbnotificationdialog.h>
+#include <hbtranslator.h>
// User includes
#include <CalenLauncher>
@@ -209,6 +209,7 @@
mEditRange(ThisAndAll),
mOriginalEntry(NULL),
mEditedEntry(NULL),
+ mTranslator(new HbTranslator("caleneditor")),
mNewEntry(true),
mDescriptionItemAdded(false),
mIsChild(false),
@@ -219,6 +220,7 @@
// First get the q-pointer.
q_ptr = static_cast<CalenEditor *> (parent);
mMainWindow = NULL;
+ mTranslator->loadCommon();
if (!agendaUtil) {
mAgendaUtil = new AgendaUtil(this);
@@ -227,15 +229,6 @@
mAgendaUtil = agendaUtil;
mOwnsAgendaUtil = false;
}
-
- // Load the translation file and install the editor specific translator
- mTranslator = new QTranslator;
- QString lang = QLocale::system().name();
- QString path = "Z:/resource/qt/translations/";
- mTranslator->load("caleneditor_en_GB", ":/translations");
- // TODO: Load the appropriate .qm file based on locale
- //bool loaded = mTranslator->load("caleneditor_" + lang, path);
- HbApplication::instance()->installTranslator(mTranslator);
}
/*!
@@ -243,6 +236,10 @@
*/
CalenEditorPrivate::~CalenEditorPrivate()
{
+ if(mOwnsAgendaUtil) {
+ delete mAgendaUtil;
+ mAgendaUtil = NULL;
+ }
if (mOriginalEntry) {
delete mOriginalEntry;
mOriginalEntry = NULL;
@@ -251,12 +248,27 @@
delete mEditedEntry;
mEditedEntry = NULL;
}
+ if(mEditorDocLoader) {
+ delete mEditorDocLoader;
+ mEditorDocLoader = NULL;
+ }
+ if(mReminderField) {
+ delete mReminderField;
+ mReminderField = NULL;
+ }
+ if(mRepeatField) {
+ delete mRepeatField;
+ mRepeatField = NULL;
+ }
+ if(mDataHandler) {
+ delete mDataHandler;
+ mDataHandler = NULL;
+ }
if (mCalenEditorModel) {
delete mCalenEditorModel;
mCalenEditorModel = NULL;
}
// Remove the translator
- HbApplication::instance()->removeTranslator(mTranslator);
if (mTranslator) {
delete mTranslator;
mTranslator = 0;
@@ -300,6 +312,9 @@
{
mNewEntry = false;
AgendaEntry entry = mAgendaUtil->fetchById(id);
+ if(entry.isNull()) {
+ return;
+ }
edit(entry, launchCalendar);
}
@@ -320,8 +335,10 @@
entry.setType(AgendaEntry::TypeAppoinment);
}
break;
- case CalenEditor::TypeUnKnown:
default:
+ // What ever be the type of entry, currently editor supports only to
+ // open the entries of TypeAppoinment
+ entry.setType(AgendaEntry::TypeAppoinment);
break;
}
mLaunchCalendar = launchCalendar;
@@ -343,8 +360,10 @@
entry.setType(AgendaEntry::TypeAppoinment);
}
break;
- case CalenEditor::TypeUnKnown:
default:
+ // What ever be the type of entry, currently editor supports only to
+ // open the entries of TypeAppoinment
+ entry.setType(AgendaEntry::TypeAppoinment);
break;
}
mNewEntryDateTime = entry.startTime();
@@ -524,8 +543,16 @@
SLOT(showDeleteConfirmationQuery()));
if (!mNewEntry) {
- //TODO: Add the text id based on the entry type Anniversary or meeting
- headingWidget->setHeading(hbTrId("txt_calendar_subhead_event"));
+ AgendaEntry::Type entryType = mEditedEntry->type();
+ if( entryType == AgendaEntry::TypeAppoinment) {
+ headingWidget->setHeading(hbTrId("txt_calendar_subhead_meeting"));
+ }else if(entryType == AgendaEntry::TypeEvent) {
+ //TODO: Add the text id once available
+ headingWidget->setHeading(hbTrId("All-day event"));
+ }else if (entryType == AgendaEntry::TypeTodo) {
+ headingWidget->setHeading(hbTrId("txt_calendar_subhead_to_do"));
+ }
+
}
initModel();
@@ -930,8 +957,15 @@
connect(mViewLocationItem, SIGNAL(locationTextChanged(const QString)),
this, SLOT(handleLocationChange(const QString)));
+
+ connect(mViewLocationItem, SIGNAL(locationTextChanged(const QString, const double, const double)),
+ this, SLOT(handleLocationChange(const QString, const double, const double)));
- mViewLocationItem->populateLocation(mEditedEntry->location());
+ mViewLocationItem->populateLocation(mEditedEntry->location());
+
+ connect(mViewLocationItem, SIGNAL(locationEditingFinished()),
+ this, SLOT(handleLocationEditingFinished()));
+
}
/*!
Save the changed start time of the event.
@@ -1155,7 +1189,9 @@
void CalenEditorPrivate::handleSubjectChange(const QString subject)
{
mEditedEntry->setSummary(subject);
- addDiscardAction();
+ if(!mNewEntry ){
+ addDiscardAction();
+ }
}
/*!
@@ -1218,7 +1254,10 @@
mReminderField->setReminderChoices();
updateReminderChoices();
}
- addDiscardAction();
+
+ if(!mNewEntry){
+ addDiscardAction();
+ }
}
/*!
@@ -1228,9 +1267,75 @@
void CalenEditorPrivate::handleLocationChange(const QString location)
{
mEditedEntry->setLocation(location);
+ if(!mNewEntry){
+ addDiscardAction();
+ }
+}
+
+
+/*!
+ Triggered when the location editor is being edited.
+ \param subject Contains the string displayed in the subject item.
+ */
+void CalenEditorPrivate::handleLocationChange(const QString location,
+ const double /*geoLatitude*/, const double /*geoLongitude*/)
+{
+ mEditedEntry->setLocation(location);
+ mEditedEntry->clearGeoValue();
addDiscardAction();
}
+/*!
+ * Handles the completion of location editing
+ */
+void CalenEditorPrivate::handleLocationEditingFinished()
+{
+ if ( !mOriginalEntry->location().isEmpty() )
+ {
+ AgendaGeoValue entryGeoValue =mAgendaUtil->fetchById(mEditedEntry->id()).geoValue();
+ if ( !entryGeoValue.isNull() && (mEditedEntry->location()!=mOriginalEntry->location()) )
+ {
+
+ mEditedEntry->setGeoValue(entryGeoValue);
+ HbMessageBox* confirmationQuery = new HbMessageBox(HbMessageBox::MessageTypeQuestion);
+
+ confirmationQuery->setDismissPolicy(HbDialog::NoDismiss);
+ confirmationQuery->setTimeout(HbDialog::NoTimeout);
+ confirmationQuery->setIconVisible(true);
+
+ QString displayText;
+ displayText = displayText.append("Location changed. Keep existing location on Map?");
+
+ confirmationQuery->setText(displayText);
+
+ // Remove the default actions.
+ QList<QAction *> defaultActions = confirmationQuery->actions();
+ for (int index=0;index<defaultActions.count();index++)
+ {
+ confirmationQuery->removeAction(defaultActions[index]);
+ }
+
+ defaultActions.clear();
+
+ confirmationQuery->addAction(new HbAction("Yes"));
+ confirmationQuery->addAction(new HbAction("No"));
+ confirmationQuery->open(this, SLOT(selectEditingFinishedAction(HbAction*)));
+ }
+ }
+}
+
+/*!
+ * Handles the editing finished action.
+ */
+void CalenEditorPrivate::selectEditingFinishedAction(HbAction* action)
+{
+ HbMessageBox* dlg = static_cast<HbMessageBox*>(sender());
+
+ if (action == dlg->actions().at(1))
+ {
+ mEditedEntry->clearGeoValue();
+ }
+}
/*!
Triggered when the description editor is being edited.
@@ -1239,7 +1344,9 @@
void CalenEditorPrivate::handleDescriptionChange(const QString description)
{
mEditedEntry->setDescription(description);
- addDiscardAction();
+ if(!mNewEntry){
+ addDiscardAction();
+ }
}
/*!
@@ -1258,7 +1365,7 @@
if (mLaunchCalendar) {
CalenLauncher* launcher = new CalenLauncher(this);
QDateTime startTime = mEditedEntry->startTime();
- launcher->launchCalendarApp(CalenLauncher::DayView, startTime);
+ launcher->launchCalendarApp(CalenLauncher::AgendaView, startTime);
// connect to the error signal
connect(launcher, SIGNAL(calendarLaunchFailed(int)), this,
@@ -1413,8 +1520,12 @@
if (mIsChild && (mEditRange == ThisOnly)) {
// Add the entry
mAgendaUtil->updateEntry(*mEditedEntry, true);
- // TODO: Add the text id based on meeting or anniversary
- HbNotificationDialog::launchDialog(hbTrId("Event updated"));
+ // TODO: Add the text id once available
+ if(mEditedEntry->type() == AgendaEntry::TypeAppoinment) {
+ HbNotificationDialog::launchDialog(hbTrId("Meeting updated"));
+ }else if(mEditedEntry->type() == AgendaEntry::TypeEvent) {
+ HbNotificationDialog::launchDialog(hbTrId("All day event updated"));
+ }
emit q_ptr->entrySaved();
return true;
} else if ((mEditRange == ThisOnly)) {
@@ -1441,11 +1552,19 @@
}
}
if (mNewEntry) {
- // TODO: Add the text id based on meeting or anniversary
- HbNotificationDialog::launchDialog(hbTrId("New Event saved"));
+ // TODO: Add the text id once available
+ if(mEditedEntry->type() == AgendaEntry::TypeAppoinment) {
+ HbNotificationDialog::launchDialog(hbTrId("New meeting saved"));
+ } else if(mEditedEntry->type() == AgendaEntry::TypeEvent) {
+ HbNotificationDialog::launchDialog(hbTrId("New all-day saved"));
+ }
} else {
- // TODO: Add the text id based on meeting or anniversary
- HbNotificationDialog::launchDialog(hbTrId("Event updated"));
+ // TODO: Add the text id once available
+ if(mEditedEntry->type() == AgendaEntry::TypeAppoinment) {
+ HbNotificationDialog::launchDialog(hbTrId("Meeting updated"));
+ } else if(mEditedEntry->type() == AgendaEntry::TypeEvent) {
+ HbNotificationDialog::launchDialog(hbTrId("All day event updated"));
+ }
}
emit q_ptr->entrySaved();
} else if (error) {
@@ -1520,8 +1639,8 @@
// Clone the entry to AllDayEntry, Delete old entry from Database
mAgendaUtil->cloneEntry(*mEditedEntry, AgendaEntry::TypeEvent);
- mAgendaUtil->deleteEntry(mEditedEntry->id());
-
+ // For later reference for the notification popup
+ mEditedEntry->setType(AgendaEntry::TypeEvent);
return true;
} else if (mAllDayCheckBoxItem->contentWidgetData("checkState")
!= Qt::Checked) {
@@ -1529,7 +1648,8 @@
// Editing existing AllDayentry, and Alldat Box is Not-Checked
// Clone the entry to MeetingEntry, Delete old entry from Database
mAgendaUtil->cloneEntry(*mEditedEntry, AgendaEntry::TypeAppoinment);
- mAgendaUtil->deleteEntry(mEditedEntry->id());
+ // For later reference for the notification popup
+ mEditedEntry->setType(AgendaEntry::TypeAppoinment);
return true;
}
// Check if the duration of the meeting is matching the all-day criteria
@@ -1549,7 +1669,8 @@
// Clone the entry to AllDayEntry, Delete old entry from Database
mEditedEntry->setStartAndEndTime(tempSartTime, tempEndTime);
mAgendaUtil->cloneEntry(*mEditedEntry, AgendaEntry::TypeEvent);
- mAgendaUtil->deleteEntry(mEditedEntry->id());
+ // For later reference for the notification popup
+ mEditedEntry->setType(AgendaEntry::TypeEvent);
return true;
}
}
--- a/calendarui/caleneditor/src/caleneditorcustomitem.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/caleneditor/src/caleneditorcustomitem.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -55,7 +55,13 @@
\param parent The parent object.
*/
CalenEditorCustomItem::CalenEditorCustomItem(QGraphicsItem *parent)
-:HbDataFormViewItem(parent)
+:HbDataFormViewItem(parent),
+ mPushButtonTime(NULL),
+ mPushButtonDate(NULL),
+ mRepeatUntilWidget(NULL),
+ mReminderTimeWidget(NULL),
+ mDatePicker(NULL),
+ mTimePicker(NULL)
{
mMinDate = CalenDateUtils::minTime().date();
mMaxDate = CalenDateUtils::maxTime().date();
@@ -155,6 +161,10 @@
SLOT(launchLocationPicker()));
connect(mLocationLineEdit, SIGNAL(textChanged(const QString)),
this, SLOT(handleLocationTextChange(const QString)));
+
+ connect(mLocationLineEdit, SIGNAL(editingFinished()),
+ this, SLOT(handleEditingFinished()));
+
return widgetLocation;
}
@@ -213,7 +223,7 @@
locationString.append(',');
}
locationString.append(selectedLocation.mCountry);
- emit locationTextChanged(locationString);
+ emit locationTextChanged(locationString, selectedLocation.mLatitude, selectedLocation.mLongitude);
mLocationLineEdit->setText(locationString );
}
}
@@ -284,6 +294,14 @@
}
/*!
+ Handles the location editing finished
+ */
+void CalenEditorCustomItem::handleEditingFinished()
+{
+ emit locationEditingFinished();
+}
+
+/*!
Launches the date picker
*/
void CalenEditorCustomItem::handleDate()
@@ -309,12 +327,12 @@
mDatePicker = new HbDateTimePicker(mDate, popUp);
mDatePicker->setMinimumDate(mMinDate);
mDatePicker->setMaximumDate(mMaxDate);
-
+ mDatePicker->setDate(mDate);
popUp->setContentWidget(mDatePicker);
- HbAction *okAction = new HbAction(hbTrId("txt_common_button_ok"));
+ HbAction *okAction = new HbAction(hbTrId("txt_common_button_ok"), popUp);
popUp->addAction(okAction);
connect(okAction, SIGNAL(triggered()), this, SLOT(saveDate()));
- popUp->addAction(new HbAction(hbTrId("txt_common_button_cancel")));
+ popUp->addAction(new HbAction(hbTrId("txt_common_button_cancel"), popUp));
popUp->open();
}
@@ -351,7 +369,7 @@
mTimePicker->setTime(mTime);
popUp->setContentWidget(mTimePicker);
- HbAction *okAction = new HbAction(hbTrId("txt_common_button_ok"));
+ HbAction *okAction = new HbAction(hbTrId("txt_common_button_ok"), popUp);
popUp->addAction(okAction);
connect(okAction, SIGNAL(triggered()), this, SLOT(saveTime()));
popUp->addAction(new HbAction(hbTrId("txt_common_button_cancel"), popUp));
--- a/calendarui/caleneditor/src/caleneditorreminderfield.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/caleneditor/src/caleneditorreminderfield.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -69,7 +69,9 @@
*/
CalenEditorReminderField::~CalenEditorReminderField()
{
- // Nothing Yet
+ if(mReminderHash.count()) {
+ mReminderHash.clear();
+ }
}
/*!
@@ -187,10 +189,10 @@
}
}
QStringList reminderChoicesForAllDay;
- reminderChoicesForAllDay << hbTrId("off")
- << hbTrId("On event day")
- << hbTrId("1 day before")
- << hbTrId("2 days before");
+ reminderChoicesForAllDay << hbTrId("txt_calendar_setlabel_reminder_val_off")
+ << hbTrId("txt_calendar_setlabel_reminder_val_on_event_day")
+ << hbTrId("txt_calendar_setlabel_reminder_val_1_day_before")
+ << hbTrId("txt_calendar_setlabel_reminder_val_2_days_before");
mReminderItem->setContentWidgetData(QString("items"),
reminderChoicesForAllDay);
QTime referenceTime(0, 0, 0);
@@ -288,7 +290,9 @@
}
// Set the reminder to the entry.
mCalenEditor->editedEntry()->setAlarm(reminder);
- mCalenEditor->addDiscardAction();
+ if(!mCalenEditor->isNewEntry()) {
+ mCalenEditor->addDiscardAction();
+ }
}
/*!
@@ -400,7 +404,7 @@
mCustomReminderTimeItem = mCalenEditorModel->insertDataFormItem(
index,
itemType,
- QString(hbTrId("Reminder Time")),
+ QString(hbTrId("txt_calendar_setlabel_reminder_time")),
mCalenEditorModel->invisibleRootItem());
if (currentReminderIndex() != 1){
mReminderTimeForAllDay.setHMS(18,0,0,0);
@@ -433,13 +437,13 @@
{
mReminderTimeAdded = false;
if (mCustomReminderTimeItem) {
- QModelIndex reminderIndex =
- mCalenEditorModel->indexFromItem(mCustomReminderTimeItem);
- mCalenEditorModel->removeItem(
- mCalenEditorModel->index(
- reminderIndex.row(), 0));
- mCustomReminderTimeItem = NULL;
- }
+ QModelIndex reminderIndex =
+ mCalenEditorModel->indexFromItem(mCustomReminderTimeItem);
+ mCalenEditorModel->removeItem(
+ mCalenEditorModel->index(
+ reminderIndex.row(), 0));
+ mCustomReminderTimeItem = NULL;
+ }
}
/*!
--- a/calendarui/caleneditor/src/caleneditorrepeatfield.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/caleneditor/src/caleneditorrepeatfield.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -33,6 +33,9 @@
#include "caleneditorrepeatfield.h"
#include "caleneditorcustomitem.h"
+// Constants
+const int userRole = Qt::UserRole + 100;
+
/*!
\class CalenEditorRepeatField
*/
@@ -71,8 +74,7 @@
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_workdays")
<< hbTrId("txt_calendar_setlabel_repeat_val_weekly")
<< hbTrId("txt_calendar_setlabel_repeat_val_fortnightly")
<< hbTrId("txt_calendar_setlabel_repeat_val_monthly")
@@ -126,16 +128,16 @@
// 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(RepeatOnce, RepeatOnce, userRole);
+ mRepeatComboBox->setItemData(RepeatDaily, RepeatDaily, userRole);
mRepeatComboBox->setItemData(RepeatWorkdays,
- RepeatWorkdays, Qt::UserRole+100);
- mRepeatComboBox->setItemData(RepeatWeekly, RepeatWeekly, Qt::UserRole+100);
+ RepeatWorkdays, userRole);
+ mRepeatComboBox->setItemData(RepeatWeekly, RepeatWeekly, userRole);
mRepeatComboBox->setItemData(RepeatBiWeekly,
- RepeatBiWeekly, Qt::UserRole+100);
+ RepeatBiWeekly, userRole);
mRepeatComboBox->setItemData(RepeatMonthly,
- RepeatMonthly, Qt::UserRole+100);
- mRepeatComboBox->setItemData(RepeatYearly, RepeatYearly, Qt::UserRole+100);
+ RepeatMonthly, userRole);
+ mRepeatComboBox->setItemData(RepeatYearly, RepeatYearly, userRole);
if (mCalenEditor->editedEntry()->isRepeating()) {
switch (mCalenEditor->editedEntry()->repeatRule().type()) {
@@ -197,9 +199,9 @@
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();
+ // Get the user role we have set for this index
+ QVariant role = mRepeatComboBox->itemData(index, userRole);
+ int value = role.toInt();
switch (value) {
case 1: {
if (!mRepeatUntilItemAdded) {
@@ -296,7 +298,9 @@
}
break;
}
- mCalenEditor->addDiscardAction();
+ if(!mCalenEditor->isNewEntry()) {
+ mCalenEditor->addDiscardAction();
+ }
mCalenEditor->updateReminderChoices();
}
@@ -446,8 +450,7 @@
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_workdays")
<< hbTrId("txt_calendar_setlabel_repeat_val_weekly")
<< hbTrId("txt_calendar_setlabel_repeat_val_fortnightly")
<< hbTrId("txt_calendar_setlabel_repeat_val_monthly")
@@ -456,19 +459,19 @@
// 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(RepeatOnce, RepeatOnce, userRole);
mRepeatComboBox->setItemData(RepeatDaily, RepeatDaily,
- Qt::UserRole + 100);
+ userRole);
mRepeatComboBox->setItemData(RepeatWorkdays,
- RepeatWorkdays, Qt::UserRole+100);
+ RepeatWorkdays, userRole);
mRepeatComboBox->setItemData(RepeatWeekly, RepeatWeekly,
- Qt::UserRole + 100);
+ userRole);
mRepeatComboBox->setItemData(RepeatBiWeekly, RepeatBiWeekly,
- Qt::UserRole + 100);
+ userRole);
mRepeatComboBox->setItemData(RepeatMonthly, RepeatMonthly,
- Qt::UserRole + 100);
+ userRole);
mRepeatComboBox->setItemData(RepeatYearly, RepeatYearly,
- Qt::UserRole + 100);
+ userRole);
int totalCount = mRepeatComboBox->count();
--- a/calendarui/calenlauncher/inc/calenlauncher.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/calenlauncher/inc/calenlauncher.h Tue Jul 06 14:14:56 2010 +0300
@@ -29,7 +29,7 @@
public:
enum CalenView{
MonthView = 0,
- DayView
+ AgendaView
};
CalenLauncher(QObject* parent = 0);
~CalenLauncher();
--- a/calendarui/commonutils/bwins/calencommonutilsu.def Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/commonutils/bwins/calencommonutilsu.def Tue Jul 06 14:14:56 2010 +0300
@@ -1,23 +1,20 @@
EXPORTS
- ?isNullTime@CalenDateUtils@@SA_NAAVQDateTime@@@Z @ 1 NONAME ; bool CalenDateUtils::isNullTime(class QDateTime &)
- ?roundToPreviousHour@CalenDateUtils@@SAHABH@Z @ 2 NONAME ; int CalenDateUtils::roundToPreviousHour(int const &)
- ?onSameMonth@CalenDateUtils@@SA_NABVQDateTime@@0@Z @ 3 NONAME ; bool CalenDateUtils::onSameMonth(class QDateTime const &, class QDateTime const &)
- ?timeOfDay@CalenDateUtils@@SAHABVQDateTime@@@Z @ 4 NONAME ; int CalenDateUtils::timeOfDay(class QDateTime const &)
- ?minTime@CalenDateUtils@@SA?AVQDateTime@@XZ @ 5 NONAME ; class QDateTime CalenDateUtils::minTime(void)
- ?isOnToday@CalenDateUtils@@SA_NABVQDateTime@@@Z @ 6 NONAME ; bool CalenDateUtils::isOnToday(class QDateTime const &)
- ?displayTimeOnDay@CalenDateUtils@@SA?AVQDateTime@@ABV2@0@Z @ 7 NONAME ; class QDateTime CalenDateUtils::displayTimeOnDay(class QDateTime const &, class QDateTime const &)
- ?endsAtStartOfDayL@CalenAgendaUtils@@SA_NAAVAgendaEntry@@ABVQDateTime@@@Z @ 8 NONAME ; bool CalenAgendaUtils::endsAtStartOfDayL(class AgendaEntry &, class QDateTime const &)
- ?removeEntriesEndingAtMidnightL@CalenAgendaUtils@@SAXAAV?$QList@VAgendaEntry@@@@ABVQDateTime@@@Z @ 9 NONAME ; void CalenAgendaUtils::removeEntriesEndingAtMidnightL(class QList<class AgendaEntry> &, class QDateTime const &)
- ?roundToPreviousHour@CalenDateUtils@@SA?AVQDateTime@@ABV2@@Z @ 10 NONAME ; class QDateTime CalenDateUtils::roundToPreviousHour(class QDateTime const &)
- ?pastOf@CalenDateUtils@@SA?AVQDateTime@@ABV2@H@Z @ 11 NONAME ; class QDateTime CalenDateUtils::pastOf(class QDateTime const &, int)
- ?maxTime@CalenDateUtils@@SA?AVQDateTime@@XZ @ 12 NONAME ; class QDateTime CalenDateUtils::maxTime(void)
- ?timeRangesIntersect@CalenDateUtils@@SA_NABVQDateTime@@000@Z @ 13 NONAME ; bool CalenDateUtils::timeRangesIntersect(class QDateTime const &, class QDateTime const &, class QDateTime const &, class QDateTime const &)
- ?limitToValidTime@CalenDateUtils@@SA?AVQDateTime@@ABV2@@Z @ 14 NONAME ; class QDateTime CalenDateUtils::limitToValidTime(class QDateTime const &)
- ?today@CalenDateUtils@@SA?AVQDateTime@@XZ @ 15 NONAME ; class QDateTime CalenDateUtils::today(void)
- ?isValidDay@CalenDateUtils@@SA_NABVQDateTime@@@Z @ 16 NONAME ; bool CalenDateUtils::isValidDay(class QDateTime const &)
- ?beginningOfDay@CalenDateUtils@@SA?AVQDateTime@@ABV2@@Z @ 17 NONAME ; class QDateTime CalenDateUtils::beginningOfDay(class QDateTime const &)
- ?onSameDay@CalenDateUtils@@SA_NABVQDateTime@@0@Z @ 18 NONAME ; bool CalenDateUtils::onSameDay(class QDateTime const &, class QDateTime const &)
- ?defaultTime@CalenDateUtils@@SA?AVQDateTime@@ABV2@@Z @ 19 NONAME ; class QDateTime CalenDateUtils::defaultTime(class QDateTime const &)
- ?futureOf@CalenDateUtils@@SA?AVQDateTime@@ABV2@H@Z @ 20 NONAME ; class QDateTime CalenDateUtils::futureOf(class QDateTime const &, int)
- ?now@CalenDateUtils@@SA?AVQDateTime@@XZ @ 21 NONAME ; class QDateTime CalenDateUtils::now(void)
+ ?roundToPreviousHour@CalenDateUtils@@SAHABH@Z @ 1 NONAME ; int CalenDateUtils::roundToPreviousHour(int const &)
+ ?onSameMonth@CalenDateUtils@@SA_NABVQDateTime@@0@Z @ 2 NONAME ; bool CalenDateUtils::onSameMonth(class QDateTime const &, class QDateTime const &)
+ ?timeOfDay@CalenDateUtils@@SAHABVQDateTime@@@Z @ 3 NONAME ; int CalenDateUtils::timeOfDay(class QDateTime const &)
+ ?minTime@CalenDateUtils@@SA?AVQDateTime@@XZ @ 4 NONAME ; class QDateTime CalenDateUtils::minTime(void)
+ ?isOnToday@CalenDateUtils@@SA_NABVQDateTime@@@Z @ 5 NONAME ; bool CalenDateUtils::isOnToday(class QDateTime const &)
+ ?displayTimeOnDay@CalenDateUtils@@SA?AVQDateTime@@ABV2@0@Z @ 6 NONAME ; class QDateTime CalenDateUtils::displayTimeOnDay(class QDateTime const &, class QDateTime const &)
+ ?endsAtStartOfDay@CalenAgendaUtils@@SA_NAAVAgendaEntry@@ABVQDateTime@@@Z @ 7 NONAME ; bool CalenAgendaUtils::endsAtStartOfDay(class AgendaEntry &, class QDateTime const &)
+ ?roundToPreviousHour@CalenDateUtils@@SA?AVQDateTime@@ABV2@@Z @ 8 NONAME ; class QDateTime CalenDateUtils::roundToPreviousHour(class QDateTime const &)
+ ?maxTime@CalenDateUtils@@SA?AVQDateTime@@XZ @ 9 NONAME ; class QDateTime CalenDateUtils::maxTime(void)
+ ?timeRangesIntersect@CalenDateUtils@@SA_NABVQDateTime@@000@Z @ 10 NONAME ; bool CalenDateUtils::timeRangesIntersect(class QDateTime const &, class QDateTime const &, class QDateTime const &, class QDateTime const &)
+ ?limitToValidTime@CalenDateUtils@@SA?AVQDateTime@@ABV2@@Z @ 11 NONAME ; class QDateTime CalenDateUtils::limitToValidTime(class QDateTime const &)
+ ?today@CalenDateUtils@@SA?AVQDateTime@@XZ @ 12 NONAME ; class QDateTime CalenDateUtils::today(void)
+ ?isValidDay@CalenDateUtils@@SA_NABVQDateTime@@@Z @ 13 NONAME ; bool CalenDateUtils::isValidDay(class QDateTime const &)
+ ?beginningOfDay@CalenDateUtils@@SA?AVQDateTime@@ABV2@@Z @ 14 NONAME ; class QDateTime CalenDateUtils::beginningOfDay(class QDateTime const &)
+ ?onSameDay@CalenDateUtils@@SA_NABVQDateTime@@0@Z @ 15 NONAME ; bool CalenDateUtils::onSameDay(class QDateTime const &, class QDateTime const &)
+ ?defaultTime@CalenDateUtils@@SA?AVQDateTime@@ABV2@@Z @ 16 NONAME ; class QDateTime CalenDateUtils::defaultTime(class QDateTime const &)
+ ?futureOf@CalenDateUtils@@SA?AVQDateTime@@ABV2@H@Z @ 17 NONAME ; class QDateTime CalenDateUtils::futureOf(class QDateTime const &, int)
+ ?now@CalenDateUtils@@SA?AVQDateTime@@XZ @ 18 NONAME ; class QDateTime CalenDateUtils::now(void)
--- a/calendarui/commonutils/eabi/calencommonutilsu.def Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/commonutils/eabi/calencommonutilsu.def Tue Jul 06 14:14:56 2010 +0300
@@ -1,23 +1,20 @@
EXPORTS
- _ZN14CalenDateUtils10isNullTimeER9QDateTime @ 1 NONAME
- _ZN14CalenDateUtils10isValidDayERK9QDateTime @ 2 NONAME
- _ZN14CalenDateUtils11defaultTimeERK9QDateTime @ 3 NONAME
- _ZN14CalenDateUtils11onSameMonthERK9QDateTimeS2_ @ 4 NONAME
- _ZN14CalenDateUtils14beginningOfDayERK9QDateTime @ 5 NONAME
- _ZN14CalenDateUtils16displayTimeOnDayERK9QDateTimeS2_ @ 6 NONAME
- _ZN14CalenDateUtils16limitToValidTimeERK9QDateTime @ 7 NONAME
- _ZN14CalenDateUtils19roundToPreviousHourERK9QDateTime @ 8 NONAME
- _ZN14CalenDateUtils19roundToPreviousHourERKi @ 9 NONAME
- _ZN14CalenDateUtils19timeRangesIntersectERK9QDateTimeS2_S2_S2_ @ 10 NONAME
- _ZN14CalenDateUtils3nowEv @ 11 NONAME
- _ZN14CalenDateUtils5todayEv @ 12 NONAME
- _ZN14CalenDateUtils6pastOfERK9QDateTimei @ 13 NONAME
- _ZN14CalenDateUtils7maxTimeEv @ 14 NONAME
- _ZN14CalenDateUtils7minTimeEv @ 15 NONAME
- _ZN14CalenDateUtils8futureOfERK9QDateTimei @ 16 NONAME
- _ZN14CalenDateUtils9isOnTodayERK9QDateTime @ 17 NONAME
- _ZN14CalenDateUtils9onSameDayERK9QDateTimeS2_ @ 18 NONAME
- _ZN14CalenDateUtils9timeOfDayERK9QDateTime @ 19 NONAME
- _ZN16CalenAgendaUtils17endsAtStartOfDayLER11AgendaEntryRK9QDateTime @ 20 NONAME
- _ZN16CalenAgendaUtils30removeEntriesEndingAtMidnightLER5QListI11AgendaEntryERK9QDateTime @ 21 NONAME
+ _ZN14CalenDateUtils10isValidDayERK9QDateTime @ 1 NONAME
+ _ZN14CalenDateUtils11defaultTimeERK9QDateTime @ 2 NONAME
+ _ZN14CalenDateUtils11onSameMonthERK9QDateTimeS2_ @ 3 NONAME
+ _ZN14CalenDateUtils14beginningOfDayERK9QDateTime @ 4 NONAME
+ _ZN14CalenDateUtils16displayTimeOnDayERK9QDateTimeS2_ @ 5 NONAME
+ _ZN14CalenDateUtils16limitToValidTimeERK9QDateTime @ 6 NONAME
+ _ZN14CalenDateUtils19roundToPreviousHourERK9QDateTime @ 7 NONAME
+ _ZN14CalenDateUtils19roundToPreviousHourERKi @ 8 NONAME
+ _ZN14CalenDateUtils19timeRangesIntersectERK9QDateTimeS2_S2_S2_ @ 9 NONAME
+ _ZN14CalenDateUtils3nowEv @ 10 NONAME
+ _ZN14CalenDateUtils5todayEv @ 11 NONAME
+ _ZN14CalenDateUtils7maxTimeEv @ 12 NONAME
+ _ZN14CalenDateUtils7minTimeEv @ 13 NONAME
+ _ZN14CalenDateUtils8futureOfERK9QDateTimei @ 14 NONAME
+ _ZN14CalenDateUtils9isOnTodayERK9QDateTime @ 15 NONAME
+ _ZN14CalenDateUtils9onSameDayERK9QDateTimeS2_ @ 16 NONAME
+ _ZN14CalenDateUtils9timeOfDayERK9QDateTime @ 17 NONAME
+ _ZN16CalenAgendaUtils16endsAtStartOfDayER11AgendaEntryRK9QDateTime @ 18 NONAME
--- a/calendarui/commonutils/inc/calenagendautils.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/commonutils/inc/calenagendautils.h Tue Jul 06 14:14:56 2010 +0300
@@ -43,12 +43,6 @@
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
@@ -56,7 +50,7 @@
* @returns ETrue, if entry ends at starting midnight of day, but starts before that
* EFalse, otherwise
**/
- static bool endsAtStartOfDayL( AgendaEntry& entry,
+ static bool endsAtStartOfDay( AgendaEntry& entry,
const QDateTime& day );
};
--- a/calendarui/commonutils/inc/calendateutils.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/commonutils/inc/calendateutils.h Tue Jul 06 14:14:56 2010 +0300
@@ -62,12 +62,6 @@
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
@@ -125,8 +119,6 @@
*/
static QDateTime defaultTime( const QDateTime& date );
- static QDateTime pastOf(const QDateTime& dateTime, int numOfDays);
-
static QDateTime futureOf(const QDateTime& dateTime, int numOfDays);
--- a/calendarui/commonutils/src/calenagendautils.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/commonutils/src/calenagendautils.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -30,43 +30,12 @@
// ============================ CalenAgendaUtils ==============================
// -----------------------------------------------------------------------------
-// CalenAgendaUtils::RemoveEntriesStartingAtMidnight
+// CalenAgendaUtils::EndsAtStartOfDay
// ?implementation_description
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
- void CalenAgendaUtils::removeEntriesEndingAtMidnightL( QList<AgendaEntry>& list,
- const QDateTime& day )
- {
- TRACE_ENTRY_POINT;
-
- // Remove events starting before aDay and ending at midnight
- TInt i( 0 );
-
- while( i < list.count() )
- {
- AgendaEntry& entry = list[i];
-
- if( endsAtStartOfDayL( entry, day ) )
- {
- list.removeAt( i );
- }
- else
- {
- ++i;
- }
- }
-
- TRACE_EXIT_POINT;
- }
-
-// -----------------------------------------------------------------------------
-// CalenAgendaUtils::EndsAtStartOfDayL
-// ?implementation_description
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
- bool CalenAgendaUtils::endsAtStartOfDayL( AgendaEntry& entry,
+ bool CalenAgendaUtils::endsAtStartOfDay( AgendaEntry& entry,
const QDateTime& day )
{
TRACE_ENTRY_POINT;
--- a/calendarui/commonutils/src/calendateutils.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/commonutils/src/calendateutils.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -120,17 +120,6 @@
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
- bool CalenDateUtils::isNullTime( QDateTime& time )
- {
- return( time.isNull() );
- }
-
-// -----------------------------------------------------------------------------
-// ?classname::?member_function
-// ?implementation_description
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
QDateTime CalenDateUtils::limitToValidTime( const QDateTime& time )
{
QDateTime valid = time;
@@ -169,7 +158,7 @@
//
int CalenDateUtils::timeOfDay( const QDateTime& dateTime )
{
- QDateTime midnight = CalenDateUtils::beginningOfDay( dateTime );
+ QDateTime midnight = beginningOfDay( dateTime );
int resultInSec = midnight.secsTo(dateTime);
return (resultInSec/60);
@@ -201,15 +190,7 @@
//
QDateTime CalenDateUtils::now()
{
- TTime currentTime;
- currentTime.HomeTime();
- TDateTime curDateTime = currentTime.DateTime();
- QDateTime ret;
- ret.setDate(QDate(curDateTime.Year(), curDateTime.Month() + 1, curDateTime.Day() + 1));
- ret.setTime(QTime(curDateTime.Hour(), curDateTime.Minute(), curDateTime.Second(), curDateTime.MicroSecond()));
- // TODO: need to use QDateTime::currentDateTime() from QT4.6 onwards
- //return QDateTime::currentDateTime();
- return ret;
+ return QDateTime::currentDateTime();
}
// -----------------------------------------------------------------------------
@@ -250,44 +231,6 @@
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
- QDateTime CalenDateUtils::pastOf(const QDateTime& dateTime, int numOfDays)
- {
- QDateTime result;
- int dayNumber = dateTime.date().day();
- int numOfDaysInMonth = dayNumber;
- int month = dateTime.date().month();
- int year = dateTime.date().year();
- int buff = numOfDays;
- QDate date(year, month, dayNumber);
- while(buff > numOfDaysInMonth)
- {
- if(month == 1) {
- // If January,
- month = 12; // December
- year--;
- }
- else {
- month--;
- }
- // Create the qdate with these details
- date.setDate(year, month, 1);
- // check to see if it goes beyond the next month also
- buff = buff - numOfDaysInMonth;
- numOfDaysInMonth = date.daysInMonth();
- }
-
- // Substract buff days from end of the month
- int day = numOfDaysInMonth - buff;
- date.setYMD(date.year(), date.month(), day);
- result.setDate(date);
- result.setTime(dateTime.time());
- return result;
- }
-
- // -----------------------------------------------------------------------------
- // (other items were commented in a header).
- // -----------------------------------------------------------------------------
- //
QDateTime CalenDateUtils::futureOf(const QDateTime& dateTime, int numOfDays)
{
QDateTime result;
--- a/calendarui/controller/bwins/calencontrolleru.def Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/controller/bwins/calencontrolleru.def Tue Jul 06 14:14:56 2010 +0300
@@ -1,39 +1,40 @@
EXPORTS
?trUtf8@CCalenController@@SA?AVQString@@PBD0H@Z @ 1 NONAME ; class QString CCalenController::trUtf8(char const *, char const *, int)
?checkMultipleCreation@CCalenController@@AAEXXZ @ 2 NONAME ; void CCalenController::checkMultipleCreation(void)
- ?handleServiceManagerSlot@CCalenController@@QAEXHABVQDateTime@@@Z @ 3 NONAME ; void CCalenController::handleServiceManagerSlot(int, class QDateTime const &)
- ?staticMetaObject@CCalenController@@2UQMetaObject@@B @ 4 NONAME ; struct QMetaObject const CCalenController::staticMetaObject
- ?qt_metacall@CCalenController@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 5 NONAME ; int CCalenController::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacast@CCalenController@@UAEPAXPBD@Z @ 6 NONAME ; void * CCalenController::qt_metacast(char const *)
- ?BroadcastNotification@CCalenController@@QAEXW4TCalenNotification@@@Z @ 7 NONAME ; void CCalenController::BroadcastNotification(enum TCalenNotification)
- ?CancelNotifications@CCalenController@@QAEXPAVMCalenNotificationHandler@@@Z @ 8 NONAME ; void CCalenController::CancelNotifications(class MCalenNotificationHandler *)
- ?eventFilter@CCalenController@@UAE_NPAVQObject@@PAVQEvent@@@Z @ 9 NONAME ; bool CCalenController::eventFilter(class QObject *, class QEvent *)
- ?tr@CCalenController@@SA?AVQString@@PBD0@Z @ 10 NONAME ; class QString CCalenController::tr(char const *, char const *)
- ?getStaticMetaObject@CCalenController@@SAABUQMetaObject@@XZ @ 11 NONAME ; struct QMetaObject const & CCalenController::getStaticMetaObject(void)
- ?CustomisationManager@CCalenController@@QAEAAVCCalenCustomisationManager@@XZ @ 12 NONAME ; class CCalenCustomisationManager & CCalenController::CustomisationManager(void)
- ?IssueCommandL@CCalenController@@QAEHH@Z @ 13 NONAME ; int CCalenController::IssueCommandL(int)
- ?tr@CCalenController@@SA?AVQString@@PBD0H@Z @ 14 NONAME ; class QString CCalenController::tr(char const *, char const *, int)
- ?Services@CCalenController@@QAEAAVMCalenServices@@XZ @ 15 NONAME ; class MCalenServices & CCalenController::Services(void)
- ?OfferMenu@CCalenController@@QAEXPAVHbMenu@@@Z @ 16 NONAME ; void CCalenController::OfferMenu(class HbMenu *)
- ?ReleaseCustomisations@CCalenController@@QAEXXZ @ 17 NONAME ; void CCalenController::ReleaseCustomisations(void)
- ?SetDefaultContext@CCalenController@@AAEXXZ @ 18 NONAME ; void CCalenController::SetDefaultContext(void)
- ??_ECCalenController@@UAE@I@Z @ 19 NONAME ; CCalenController::~CCalenController(unsigned int)
- ?getFirstView@CCalenController@@QAEHXZ @ 20 NONAME ; int CCalenController::getFirstView(void)
- ?metaObject@CCalenController@@UBEPBUQMetaObject@@XZ @ 21 NONAME ; struct QMetaObject const * CCalenController::metaObject(void) const
- ?Infobar@CCalenController@@QAEPAVHbWidget@@XZ @ 22 NONAME ; class HbWidget * CCalenController::Infobar(void)
- ?ViewManager@CCalenController@@QAEAAVCalenViewManager@@XZ @ 23 NONAME ; class CalenViewManager & CCalenController::ViewManager(void)
- ?context@CCalenController@@QAEAAVMCalenContext@@XZ @ 24 NONAME ; class MCalenContext & CCalenController::context(void)
- ?agendaInterface@CCalenController@@QAEPAVAgendaUtil@@XZ @ 25 NONAME ; class AgendaUtil * CCalenController::agendaInterface(void)
- ?MainWindow@CCalenController@@QAEAAVHbMainWindow@@XZ @ 26 NONAME ; class HbMainWindow & CCalenController::MainWindow(void)
- ?Notifier@CCalenController@@QAEAAVCalenNotifier@@XZ @ 27 NONAME ; class CalenNotifier & CCalenController::Notifier(void)
- ?InstanceL@CCalenController@@SAPAV1@XZ @ 28 NONAME ; class CCalenController * CCalenController::InstanceL(void)
- ??1CCalenController@@UAE@XZ @ 29 NONAME ; CCalenController::~CCalenController(void)
- ?InfobarTextL@CCalenController@@QAEPAVQString@@XZ @ 30 NONAME ; class QString * CCalenController::InfobarTextL(void)
- ?Release@CCalenController@@QAEXXZ @ 31 NONAME ; void CCalenController::Release(void)
- ?trUtf8@CCalenController@@SA?AVQString@@PBD0@Z @ 32 NONAME ; class QString CCalenController::trUtf8(char const *, char const *)
- ?RegisterForNotificationsL@CCalenController@@QAEXPAVMCalenNotificationHandler@@W4TCalenNotification@@@Z @ 33 NONAME ; void CCalenController::RegisterForNotificationsL(class MCalenNotificationHandler *, enum TCalenNotification)
- ??0CCalenController@@QAE@XZ @ 34 NONAME ; CCalenController::CCalenController(void)
- ?GetCommandHandlerL@CCalenController@@QAEPAVMCalenCommandHandler@@H@Z @ 35 NONAME ; class MCalenCommandHandler * CCalenController::GetCommandHandlerL(int)
- ?RegisterForNotificationsL@CCalenController@@QAEXPAVMCalenNotificationHandler@@AAV?$RArray@W4TCalenNotification@@@@@Z @ 36 NONAME ; void CCalenController::RegisterForNotificationsL(class MCalenNotificationHandler *, class RArray<enum TCalenNotification> &)
- ?NewServicesL@CCalenController@@UAEPAVMCalenServices@@XZ @ 37 NONAME ; class MCalenServices * CCalenController::NewServicesL(void)
+ ??0CCalenController@@QAE@XZ @ 3 NONAME ; CCalenController::CCalenController(void)
+ ?handleServiceManagerSlot@CCalenController@@QAEXHABVQDateTime@@@Z @ 4 NONAME ; void CCalenController::handleServiceManagerSlot(int, class QDateTime const &)
+ ?staticMetaObject@CCalenController@@2UQMetaObject@@B @ 5 NONAME ; struct QMetaObject const CCalenController::staticMetaObject
+ ?qt_metacall@CCalenController@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 6 NONAME ; int CCalenController::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacast@CCalenController@@UAEPAXPBD@Z @ 7 NONAME ; void * CCalenController::qt_metacast(char const *)
+ ?BroadcastNotification@CCalenController@@QAEXW4TCalenNotification@@@Z @ 8 NONAME ; void CCalenController::BroadcastNotification(enum TCalenNotification)
+ ?CancelNotifications@CCalenController@@QAEXPAVMCalenNotificationHandler@@@Z @ 9 NONAME ; void CCalenController::CancelNotifications(class MCalenNotificationHandler *)
+ ?eventFilter@CCalenController@@UAE_NPAVQObject@@PAVQEvent@@@Z @ 10 NONAME ; bool CCalenController::eventFilter(class QObject *, class QEvent *)
+ ?tr@CCalenController@@SA?AVQString@@PBD0@Z @ 11 NONAME ; class QString CCalenController::tr(char const *, char const *)
+ ?getStaticMetaObject@CCalenController@@SAABUQMetaObject@@XZ @ 12 NONAME ; struct QMetaObject const & CCalenController::getStaticMetaObject(void)
+ ?CustomisationManager@CCalenController@@QAEAAVCCalenCustomisationManager@@XZ @ 13 NONAME ; class CCalenCustomisationManager & CCalenController::CustomisationManager(void)
+ ?IssueCommandL@CCalenController@@QAEHH@Z @ 14 NONAME ; int CCalenController::IssueCommandL(int)
+ ?tr@CCalenController@@SA?AVQString@@PBD0H@Z @ 15 NONAME ; class QString CCalenController::tr(char const *, char const *, int)
+ ?Services@CCalenController@@QAEAAVMCalenServices@@XZ @ 16 NONAME ; class MCalenServices & CCalenController::Services(void)
+ ?OfferMenu@CCalenController@@QAEXPAVHbMenu@@@Z @ 17 NONAME ; void CCalenController::OfferMenu(class HbMenu *)
+ ?ReleaseCustomisations@CCalenController@@QAEXXZ @ 18 NONAME ; void CCalenController::ReleaseCustomisations(void)
+ ?SetDefaultContext@CCalenController@@AAEXXZ @ 19 NONAME ; void CCalenController::SetDefaultContext(void)
+ ??_ECCalenController@@UAE@I@Z @ 20 NONAME ; CCalenController::~CCalenController(unsigned int)
+ ?getFirstView@CCalenController@@QAEHXZ @ 21 NONAME ; int CCalenController::getFirstView(void)
+ ?metaObject@CCalenController@@UBEPBUQMetaObject@@XZ @ 22 NONAME ; struct QMetaObject const * CCalenController::metaObject(void) const
+ ?Infobar@CCalenController@@QAEPAVHbWidget@@XZ @ 23 NONAME ; class HbWidget * CCalenController::Infobar(void)
+ ?ViewManager@CCalenController@@QAEAAVCalenViewManager@@XZ @ 24 NONAME ; class CalenViewManager & CCalenController::ViewManager(void)
+ ?context@CCalenController@@QAEAAVMCalenContext@@XZ @ 25 NONAME ; class MCalenContext & CCalenController::context(void)
+ ?agendaInterface@CCalenController@@QAEPAVAgendaUtil@@XZ @ 26 NONAME ; class AgendaUtil * CCalenController::agendaInterface(void)
+ ?constructController@CCalenController@@QAEXXZ @ 27 NONAME ; void CCalenController::constructController(void)
+ ?MainWindow@CCalenController@@QAEAAVHbMainWindow@@XZ @ 28 NONAME ; class HbMainWindow & CCalenController::MainWindow(void)
+ ?Notifier@CCalenController@@QAEAAVCalenNotifier@@XZ @ 29 NONAME ; class CalenNotifier & CCalenController::Notifier(void)
+ ?InstanceL@CCalenController@@SAPAV1@XZ @ 30 NONAME ; class CCalenController * CCalenController::InstanceL(void)
+ ??1CCalenController@@UAE@XZ @ 31 NONAME ; CCalenController::~CCalenController(void)
+ ?InfobarTextL@CCalenController@@QAEPAVQString@@XZ @ 32 NONAME ; class QString * CCalenController::InfobarTextL(void)
+ ?Release@CCalenController@@QAEXXZ @ 33 NONAME ; void CCalenController::Release(void)
+ ?trUtf8@CCalenController@@SA?AVQString@@PBD0@Z @ 34 NONAME ; class QString CCalenController::trUtf8(char const *, char const *)
+ ?RegisterForNotificationsL@CCalenController@@QAEXPAVMCalenNotificationHandler@@W4TCalenNotification@@@Z @ 35 NONAME ; void CCalenController::RegisterForNotificationsL(class MCalenNotificationHandler *, enum TCalenNotification)
+ ?GetCommandHandlerL@CCalenController@@QAEPAVMCalenCommandHandler@@H@Z @ 36 NONAME ; class MCalenCommandHandler * CCalenController::GetCommandHandlerL(int)
+ ?RegisterForNotificationsL@CCalenController@@QAEXPAVMCalenNotificationHandler@@AAV?$RArray@W4TCalenNotification@@@@@Z @ 37 NONAME ; void CCalenController::RegisterForNotificationsL(class MCalenNotificationHandler *, class RArray<enum TCalenNotification> &)
+ ?NewServicesL@CCalenController@@UAEPAVMCalenServices@@XZ @ 38 NONAME ; class MCalenServices * CCalenController::NewServicesL(void)
--- a/calendarui/controller/controller.pro Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/controller/controller.pro Tue Jul 06 14:14:56 2010 +0300
@@ -23,6 +23,7 @@
INCLUDEPATH += ./inc \
../inc \
../views/inc \
+ ../views/dayview/inc \
../globaldata/inc
CONFIG += hb
--- a/calendarui/controller/data/calendar.qrc Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/controller/data/calendar.qrc Tue Jul 06 14:14:56 2010 +0300
@@ -1,9 +1,6 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/xml">
- <file alias="calendayview.docml">xml/calendayview.docml</file>
+ <file alias="calenagendaview.docml">xml/calenagendaview.docml</file>
<file alias="calenmonthview.docml">xml/calenmonthview.docml</file>
</qresource>
- <qresource prefix="/translations" >
- <file alias="calendar_en_GB">calendar_en_GB.qm</file>
- </qresource>
</RCC>
Binary file calendarui/controller/data/calendar_en_GB.qm has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/controller/data/xml/calenagendaview.docml Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="0.9">
+ <object name="newEventAction" type="HbAction">
+ <string locid="txt_calendar_opt_new_event" name="text"/>
+ </object>
+ <object name="todayAction" type="HbAction">
+ <string locid="txt_calendar_opt_go_to_today" name="text"/>
+ </object>
+ <object name="goToDateAction" type="HbAction">
+ <string locid="txt_calendar_opt_go_to_date" name="text"/>
+ </object>
+ <object name="switchToDayViewAction" type="HbAction">
+ <string locid="txt_calendar_opt_switch_to_day_view" name="text"/>
+ </object>
+ <object name="settingsAction" type="HbAction">
+ <string locid="txt_calendar_opt_settings" name="text"/>
+ </object>
+ <widget name="agendaView" type="HbView">
+ <widget name="agendaViewWidget" role="HbView:widget" type="HbWidget">
+ <widget name="headingRegionalPluginWidget" type="HbWidget">
+ <widget name="headingWidget" type="HbGroupBox">
+ <string name="heading" value=""/>
+ <real name="z" value="1"/>
+ <sizehint type="PREFERRED" width="53.43284un"/>
+ <bool name="collapsable" value="FALSE"/>
+ </widget>
+ <layout orientation="Vertical" spacing="0un" type="linear">
+ <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+ <linearitem itemname="headingWidget"/>
+ </layout>
+ </widget>
+ <widget name="noEventsLabel" type="HbLabel">
+ <real name="z" value="2"/>
+ <string locid="txt_calendar_empty_list_no_entries" name="plainText"/>
+ <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+ <enums name="textWrapping" value="TextWordWrap"/>
+ <fontspec name="fontSpec" role="Undefined" textheight="var(hb-param-text-height-primary)"/>
+ </widget>
+ <widget name="eventsList" type="HbListView">
+ <widget name="listItemPrototype" role="HbListView:prototype" type="HbListViewItem"/>
+ <real name="z" value="2"/>
+ <sizehint height="47.7612un" type="PREFERRED" width="35.8209un"/>
+ </widget>
+ <layout type="anchor">
+ <anchoritem dst="headingRegionalPluginWidget" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+ <anchoritem dst="headingRegionalPluginWidget" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+ <anchoritem dst="headingRegionalPluginWidget" dstEdge="RIGHT" spacing="-0un" src="" srcEdge="RIGHT"/>
+ </layout>
+ </widget>
+ <widget name="viewMenu" role="HbView:menu" type="HbMenu"/>
+ <widget name="viewMenu" role="HbView:menu" type="HbMenu">
+ <ref object="newEventAction" role="HbMenu:addAction"/>
+ <ref object="todayAction" role="HbMenu:addAction"/>
+ <ref object="goToDateAction" role="HbMenu:addAction"/>
+ <ref object="switchToDayViewAction" role="HbMenu:addAction"/>
+ <ref object="settingsAction" role="HbMenu:addAction"/>
+ </widget>
+ <string locid="txt_calendar_title_calendar" name="title"/>
+ </widget>
+ <section name="emptyList">
+ <widget name="agendaViewWidget" role="HbView:widget" type="HbWidget">
+ <layout type="anchor">
+ <anchoritem dst="headingRegionalPluginWidget" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+ <anchoritem dst="headingRegionalPluginWidget" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+ <anchoritem dst="headingRegionalPluginWidget" dstEdge="RIGHT" spacing="-0un" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="noEventsLabel" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
+ <anchoritem dst="noEventsLabel" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-left)" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="noEventsLabel" dstEdge="TOP" spacing="38un" src="" srcEdge="TOP"/>
+ </layout>
+ </widget>
+ </section>
+ <section name="nonEmptyList">
+ <widget name="agendaViewWidget" role="HbView:widget" type="HbWidget">
+ <layout type="anchor">
+ <anchoritem dst="headingRegionalPluginWidget" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+ <anchoritem dst="headingRegionalPluginWidget" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+ <anchoritem dst="headingRegionalPluginWidget" dstEdge="RIGHT" spacing="-0un" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="eventsList" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+ <anchoritem dst="eventsList" dstEdge="TOP" spacing="0un" src="headingRegionalPluginWidget" srcEdge="BOTTOM"/>
+ <anchoritem dst="eventsList" dstEdge="RIGHT" spacing="-0un" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="eventsList" dstEdge="BOTTOM" spacing="-0un" src="" srcEdge="BOTTOM"/>
+ </layout>
+ </widget>
+ </section>
+ <section name="emptyLandscape">
+ <widget name="agendaViewWidget" role="HbView:widget" type="HbWidget">
+ <layout type="anchor">
+ <anchoritem dst="headingRegionalPluginWidget" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+ <anchoritem dst="headingRegionalPluginWidget" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+ <anchoritem dst="headingRegionalPluginWidget" dstEdge="RIGHT" spacing="-0un" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="noEventsLabel" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
+ <anchoritem dst="noEventsLabel" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-left)" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="noEventsLabel" dstEdge="TOP" spacing="21.8806un" src="" srcEdge="TOP"/>
+ </layout>
+ </widget>
+ </section>
+ <metadata activeUIState="emptyListState" display="QHD portrait" unit="un">
+ <uistate name="Common ui state" sections="#common"/>
+ <uistate name="emptyListState" sections="#common emptyList"/>
+ <uistate name="nonEmptyListState" sections="#common nonEmptyList"/>
+ <uistate name="emptyListLandscapeState" sections="#common emptyList emptyLandscape"/>
+ <dummydata objectName="eventsList" section="nonEmptyList" value="0"/>
+ </metadata>
+</hbdocument>
--- a/calendarui/controller/data/xml/calendayview.docml Wed Jun 23 18:11:28 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="0.9">
- <object name="newEventAction" type="HbAction">
- <string locid="txt_calendar_opt_new_event" name="text"/>
- </object>
- <object name="goToDateAction" type="HbAction">
- <string locid="txt_calendar_opt_go_to_date" name="text"/>
- </object>
- <object name="settingsAction" type="HbAction">
- <string locid="txt_calendar_opt_settings" name="text"/>
- </object>
- <object name="todayAction" type="HbAction">
- <string locid="txt_calendar_opt_go_to_today" name="text"/>
- </object>
- <widget name="dayView" type="HbView">
- <widget name="dayViewWidget" role="HbView:widget" type="HbWidget">
- <widget name="headingRegionalPluginWidget" type="HbWidget">
- <widget name="headingWidget" type="HbGroupBox">
- <string name="heading" value=""/>
- <real name="z" value="1"/>
- <sizehint type="PREFERRED" width="53.43284un"/>
- <bool name="collapsable" value="FALSE"/>
- </widget>
- <layout orientation="Vertical" spacing="0un" type="linear">
- <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
- <linearitem itemname="headingWidget"/>
- </layout>
- </widget>
- <widget name="noEventsLabel" type="HbLabel">
- <real name="z" value="2"/>
- <string locid="txt_calendar_empty_list_no_entries" name="plainText"/>
- <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
- <enums name="textWrapping" value="TextWordWrap"/>
- <fontspec name="fontSpec" role="Undefined" textheight="var(hb-param-text-height-primary)"/>
- </widget>
- <widget name="eventsList" type="HbListView">
- <widget name="listItemPrototype" role="HbListView:prototype" type="HbListViewItem"/>
- <real name="z" value="2"/>
- <sizehint height="47.7612un" type="PREFERRED" width="35.8209un"/>
- </widget>
- <layout type="anchor">
- <anchoritem dst="headingRegionalPluginWidget" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
- <anchoritem dst="headingRegionalPluginWidget" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
- <anchoritem dst="headingRegionalPluginWidget" dstEdge="RIGHT" spacing="-0un" src="" srcEdge="RIGHT"/>
- </layout>
- </widget>
- <widget name="viewMenu" role="HbView:menu" type="HbMenu"/>
- <widget name="viewMenu" role="HbView:menu" type="HbMenu">
- <ref object="newEventAction" role="HbMenu:addAction"/>
- <ref object="todayAction" role="HbMenu:addAction"/>
- <ref object="goToDateAction" role="HbMenu:addAction"/>
- <ref object="settingsAction" role="HbMenu:addAction"/>
- </widget>
- <string locid="txt_calendar_title_calendar" name="title"/>
- </widget>
- <section name="emptyList">
- <widget name="dayViewWidget" role="HbView:widget" type="HbWidget">
- <layout type="anchor">
- <anchoritem dst="headingRegionalPluginWidget" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
- <anchoritem dst="headingRegionalPluginWidget" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
- <anchoritem dst="headingRegionalPluginWidget" dstEdge="RIGHT" spacing="-0un" src="" srcEdge="RIGHT"/>
- <anchoritem dst="noEventsLabel" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
- <anchoritem dst="noEventsLabel" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-left)" src="" srcEdge="RIGHT"/>
- <anchoritem dst="noEventsLabel" dstEdge="TOP" spacing="38un" src="" srcEdge="TOP"/>
- </layout>
- </widget>
- </section>
- <section name="nonEmptyList">
- <widget name="dayViewWidget" role="HbView:widget" type="HbWidget">
- <layout type="anchor">
- <anchoritem dst="headingRegionalPluginWidget" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
- <anchoritem dst="headingRegionalPluginWidget" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
- <anchoritem dst="headingRegionalPluginWidget" dstEdge="RIGHT" spacing="-0un" src="" srcEdge="RIGHT"/>
- <anchoritem dst="eventsList" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
- <anchoritem dst="eventsList" dstEdge="TOP" spacing="0un" src="headingRegionalPluginWidget" srcEdge="BOTTOM"/>
- <anchoritem dst="eventsList" dstEdge="RIGHT" spacing="-0un" src="" srcEdge="RIGHT"/>
- <anchoritem dst="eventsList" dstEdge="BOTTOM" spacing="-0un" src="" srcEdge="BOTTOM"/>
- </layout>
- </widget>
- </section>
- <section name="emptyLandscape">
- <widget name="dayViewWidget" role="HbView:widget" type="HbWidget">
- <layout type="anchor">
- <anchoritem dst="headingRegionalPluginWidget" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
- <anchoritem dst="headingRegionalPluginWidget" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
- <anchoritem dst="headingRegionalPluginWidget" dstEdge="RIGHT" spacing="-0un" src="" srcEdge="RIGHT"/>
- <anchoritem dst="noEventsLabel" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
- <anchoritem dst="noEventsLabel" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-left)" src="" srcEdge="RIGHT"/>
- <anchoritem dst="noEventsLabel" dstEdge="TOP" spacing="21.8806un" src="" srcEdge="TOP"/>
- </layout>
- </widget>
- </section>
- <metadata activeUIState="emptyListState" display="QHD portrait" unit="un">
- <uistate name="Common ui state" sections="#common"/>
- <uistate name="emptyListState" sections="#common emptyList"/>
- <uistate name="nonEmptyListState" sections="#common nonEmptyList"/>
- <uistate name="emptyListLandscapeState" sections="#common emptyList emptyLandscape"/>
- <dummydata objectName="eventsList" section="nonEmptyList" value="0"/>
- </metadata>
-</hbdocument>
--- a/calendarui/controller/eabi/calencontrolleru.def Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/controller/eabi/calencontrolleru.def Tue Jul 06 14:14:56 2010 +0300
@@ -13,28 +13,29 @@
_ZN16CCalenController17SetDefaultContextEv @ 12 NONAME
_ZN16CCalenController18GetCommandHandlerLEi @ 13 NONAME
_ZN16CCalenController19CancelNotificationsEP25MCalenNotificationHandler @ 14 NONAME
- _ZN16CCalenController19getStaticMetaObjectEv @ 15 NONAME
- _ZN16CCalenController20CustomisationManagerEv @ 16 NONAME
- _ZN16CCalenController21BroadcastNotificationE18TCalenNotification @ 17 NONAME
- _ZN16CCalenController21ReleaseCustomisationsEv @ 18 NONAME
- _ZN16CCalenController21checkMultipleCreationEv @ 19 NONAME
- _ZN16CCalenController24handleServiceManagerSlotEiRK9QDateTime @ 20 NONAME
- _ZN16CCalenController25RegisterForNotificationsLEP25MCalenNotificationHandler18TCalenNotification @ 21 NONAME
- _ZN16CCalenController25RegisterForNotificationsLEP25MCalenNotificationHandlerR6RArrayI18TCalenNotificationE @ 22 NONAME
- _ZN16CCalenController7InfobarEv @ 23 NONAME
- _ZN16CCalenController7ReleaseEv @ 24 NONAME
- _ZN16CCalenController7contextEv @ 25 NONAME
- _ZN16CCalenController8NotifierEv @ 26 NONAME
- _ZN16CCalenController8ServicesEv @ 27 NONAME
- _ZN16CCalenController9InstanceLEv @ 28 NONAME
- _ZN16CCalenController9OfferMenuEP6HbMenu @ 29 NONAME
- _ZN16CCalenControllerC1Ev @ 30 NONAME
- _ZN16CCalenControllerC2Ev @ 31 NONAME
- _ZN16CCalenControllerD0Ev @ 32 NONAME
- _ZN16CCalenControllerD1Ev @ 33 NONAME
- _ZN16CCalenControllerD2Ev @ 34 NONAME
- _ZNK16CCalenController10metaObjectEv @ 35 NONAME
- _ZTI16CCalenController @ 36 NONAME
- _ZTV16CCalenController @ 37 NONAME
- _ZThn8_N16CCalenController12NewServicesLEv @ 38 NONAME
+ _ZN16CCalenController19constructControllerEv @ 15 NONAME
+ _ZN16CCalenController19getStaticMetaObjectEv @ 16 NONAME
+ _ZN16CCalenController20CustomisationManagerEv @ 17 NONAME
+ _ZN16CCalenController21BroadcastNotificationE18TCalenNotification @ 18 NONAME
+ _ZN16CCalenController21ReleaseCustomisationsEv @ 19 NONAME
+ _ZN16CCalenController21checkMultipleCreationEv @ 20 NONAME
+ _ZN16CCalenController24handleServiceManagerSlotEiRK9QDateTime @ 21 NONAME
+ _ZN16CCalenController25RegisterForNotificationsLEP25MCalenNotificationHandler18TCalenNotification @ 22 NONAME
+ _ZN16CCalenController25RegisterForNotificationsLEP25MCalenNotificationHandlerR6RArrayI18TCalenNotificationE @ 23 NONAME
+ _ZN16CCalenController7InfobarEv @ 24 NONAME
+ _ZN16CCalenController7ReleaseEv @ 25 NONAME
+ _ZN16CCalenController7contextEv @ 26 NONAME
+ _ZN16CCalenController8NotifierEv @ 27 NONAME
+ _ZN16CCalenController8ServicesEv @ 28 NONAME
+ _ZN16CCalenController9InstanceLEv @ 29 NONAME
+ _ZN16CCalenController9OfferMenuEP6HbMenu @ 30 NONAME
+ _ZN16CCalenControllerC1Ev @ 31 NONAME
+ _ZN16CCalenControllerC2Ev @ 32 NONAME
+ _ZN16CCalenControllerD0Ev @ 33 NONAME
+ _ZN16CCalenControllerD1Ev @ 34 NONAME
+ _ZN16CCalenControllerD2Ev @ 35 NONAME
+ _ZNK16CCalenController10metaObjectEv @ 36 NONAME
+ _ZTI16CCalenController @ 37 NONAME
+ _ZTV16CCalenController @ 38 NONAME
+ _ZThn8_N16CCalenController12NewServicesLEv @ 39 NONAME
--- a/calendarui/controller/inc/calencontroller.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/controller/inc/calencontroller.h Tue Jul 06 14:14:56 2010 +0300
@@ -70,6 +70,11 @@
CCalenController();
/**
+ * Second phase contruction for controller
+ */
+ void constructController();
+
+ /**
* Constructs CCalenController with existing CAknViewAppUi. If the
* controller has been previously initialized with the same CAknViewAppUi,
* the existing instance will be returned.
@@ -237,7 +242,6 @@
CalenContextImpl* mContext;
AgendaUtil *mAgendaUtil; // Agenda interface provider
CalenServicesImpl* iServices; // Services.
- HbMainWindow* iMainWindow;
CalenNotifier* iNotifier; // Broadcasts calendar events
CCalenStateMachine* iStateMachine;
CCalenActionUi* iActionUi; // Default internal command handling
--- a/calendarui/controller/inc/calendeleteui.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/controller/inc/calendeleteui.h Tue Jul 06 14:14:56 2010 +0300
@@ -181,11 +181,6 @@
void showDeleteQuery(const TDeleteConfirmationType type,
const int count = 0);
- /**
- * Deletes the entries before the selected date
- */
- void getSelectedDateAndDelete();
-
private: // own methods
/**
* C++ constructor
@@ -239,6 +234,8 @@
QDateTime iStartTime;
QDateTime iEndTime;
HbDateTimePicker *mDatePicker;
+ HbAction *mDeleteAction;
+ HbAction *mCancelAction;
// Confirmation note id is stored here. Note is shown when asynchronous
// delete completes.
int iConfirmationNoteId;
--- a/calendarui/controller/inc/calenstatetable.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/controller/inc/calenstatetable.h Tue Jul 06 14:14:56 2010 +0300
@@ -113,10 +113,10 @@
/* ECalenMonthView */
{ EIdle , EIdle, KCalenNoNotification },
- /* ECalenWeekView */
+ /* ECalenDayView */
{ EIdle , EIdle, KCalenNoNotification },
- /* ECalenDayView */
+ /* ECalenAgendaView */
{ EIdle , EIdle, KCalenNoNotification },
/* ECalenForwardsToDayView */
--- a/calendarui/controller/inc/calenviewmanager.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/controller/inc/calenviewmanager.h Tue Jul 06 14:14:56 2010 +0300
@@ -28,10 +28,10 @@
#include "hb_calencommands.hrh"
#include "calencommandhandler.h"
-
+class CalenNativeView;
class CCalenController;
class CalenMonthView;
-class CalenDayView;
+class CalenAgendaView;
class AgendaEventViewer;
class CalenLandscapeDayView;
class CalenSettingsView;
@@ -97,7 +97,7 @@
void showPrevDay();
- void removeDayViews();
+ void removePreviousView();
void constructOtherViews();
@@ -119,7 +119,7 @@
/**
* Loads day view frm the docml
*/
- void loadDayView();
+ void loadAgendaView();
/**
* Activates the default view, as retrieved from settings.
*/
@@ -140,7 +140,7 @@
* to provide illusion of swiping to next or prev
* day
*/
- void loadAlternateDayView();
+ void loadAlternateAgendaView();
private slots:
void handleMainViewReady();
@@ -151,19 +151,21 @@
void handleDeletingCompleted();
void handleInstanceViewCreation(int status);
void handleEntryViewCreation(int status);
+ void handleDayViewReady();
private: // Data
CCalenController &mController;
CalenMonthView *mCalenMonthView;
- CalenDayView *mCalenDayView;
+ CalenAgendaView *mCalenAgendaView;
AgendaEventViewer *mCalenEventViewer;
CalenLandscapeDayView *mCalenLandscapeDayView;
CalenSettingsView *mSettingsView;
- CalenDocLoader *mDayViewDocLoader;
+ CalenDocLoader *mAgendaViewDocLoader;
CalenDocLoader *mMonthViewDocLoader;
- CalenDayView *mCalenDayViewAlt;
- CalenDocLoader *mDayViewAltDocLoader;
+ CalenAgendaView *mCalenAgendaViewAlt;
+ CalenDocLoader *mAgendaViewAltDocLoader;
+ CalenNativeView *mCalenDayView;
int mCurrentViewId;
int mPreviousViewsId;
--- a/calendarui/controller/src/calenbackgroundstate.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/controller/src/calenbackgroundstate.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -100,6 +100,7 @@
switch( cmd )
{
+ case ECalenAgendaView:
case ECalenDayView:
SetCurrentState(aStateMachine,CCalenStateMachine::ECalenIdleState);
cmdUsed = ETrue;
--- a/calendarui/controller/src/calencontroller.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/controller/src/calencontroller.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -65,72 +65,83 @@
iNextServicesCommandBase = KCustomCommandRangeStart;
iRefCount = 0;
-
- // Store the pointer in tls, also avoid multiple creations
- checkMultipleCreation();
-
- // Get an instance of AgendaUtil interface class
- // This will take care of
- mAgendaUtil = new AgendaUtil();
-
- iStateMachine = CCalenStateMachine::NewL( *this );
-
- // Create the notifier.
- iNotifier = new( ELeave )CalenNotifier( *iStateMachine );
-
- // Construct the context
- mContext = new CalenContextImpl(iNotifier);
+ mAgendaUtil = 0;
- // Set the default context.Once will start use of calencmdlinelauncher,
- // Then need to remove this function
- SetDefaultContext();
-
- RArray<TCalenNotification> notificationArray;
- // Complete construction of the notifier and register the
- // global data for notifications
- iNotifier->ConstructL();
-
- // Create the services
- iServices = CalenServicesImpl::NewL();
- // Create the customisation manager, and register for
- // notifications
- iCustomisationManager = CCalenCustomisationManager::NewL( *this,
- *iServices );
- // Create the view manager, and register for notifications
+ TRACE_EXIT_POINT;
+}
+
+// ----------------------------------------------------------------------------
+// CCalenController::constuctController
+// Construct the controller completely
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void CCalenController::constructController()
+{
+ // Store the pointer in tls, also avoid multiple creations
+ checkMultipleCreation();
+
+ // Get an instance of AgendaUtil interface class
+ // This will take care of
+ mAgendaUtil = new AgendaUtil();
+
+ iStateMachine = CCalenStateMachine::NewL( *this );
+
+ // Create the notifier.
+ iNotifier = new( ELeave )CalenNotifier( *iStateMachine );
+
+ // Construct the context
+ mContext = new CalenContextImpl(iNotifier);
+
+ // Set the default context.Once will start use of calencmdlinelauncher,
+ // Then need to remove this function
+ SetDefaultContext();
+
+ RArray<TCalenNotification> notificationArray;
+ // Complete construction of the notifier and register the
+ // global data for notifications
+ iNotifier->ConstructL();
+
+ // Create the services
+ iServices = CalenServicesImpl::NewL();
+ // Create the customisation manager, and register for
+ // notifications
+ iCustomisationManager = CCalenCustomisationManager::NewL( *this,
+ *iServices );
+ // Create the view manager, and register for notifications
iViewManager = new CalenViewManager(*this);
-
+
iViewManager->SecondPhaseConstruction();
-
+
hbInstance->allMainWindows().first()->show();
-
- // Create the action uis.
- iActionUi = CCalenActionUi::NewL( *this );
-
- notificationArray.Append(ECalenNotifySettingsChanged);
- notificationArray.Append(ECalenNotifyCheckPluginUnloading);
- notificationArray.Append(ECalenNotifyEComRegistryChanged);
- notificationArray.Append(ECalenNotifySystemLanguageChanged);
-
- RegisterForNotificationsL( iCustomisationManager,notificationArray);
- notificationArray.Reset();
-
- notificationArray.Append(ECalenNotifyViewPopulationComplete);
- notificationArray.Append(ECalenNotifyExternalDatabaseChanged);
- notificationArray.Append(ECalenNotifyMultipleEntriesDeleted);
- notificationArray.Append(ECalenNotifyDialogClosed);
- notificationArray.Append(ECalenNotifyEntrySaved);
- notificationArray.Append(ECalenNotifyEntryDeleted);
- notificationArray.Append(ECalenNotifyInstanceDeleted);
- notificationArray.Append(ECalenNotifySystemLocaleChanged);
- notificationArray.Append(ECalenNotifySystemLanguageChanged);
- notificationArray.Append(ECalenNotifySystemTimeChanged);
- notificationArray.Append(ECalenNotifyEntryClosed);
- notificationArray.Append(ECalenNotifySettingsClosed);
-
- RegisterForNotificationsL( iViewManager, notificationArray );
- notificationArray.Reset();
- notificationArray.Close();
- TRACE_EXIT_POINT;
+
+ // Create the action uis.
+ iActionUi = CCalenActionUi::NewL( *this );
+
+ notificationArray.Append(ECalenNotifySettingsChanged);
+ notificationArray.Append(ECalenNotifyCheckPluginUnloading);
+ notificationArray.Append(ECalenNotifyEComRegistryChanged);
+ notificationArray.Append(ECalenNotifySystemLanguageChanged);
+
+ RegisterForNotificationsL( iCustomisationManager,notificationArray);
+ notificationArray.Reset();
+
+ notificationArray.Append(ECalenNotifyViewPopulationComplete);
+ notificationArray.Append(ECalenNotifyExternalDatabaseChanged);
+ notificationArray.Append(ECalenNotifyMultipleEntriesDeleted);
+ notificationArray.Append(ECalenNotifyDialogClosed);
+ notificationArray.Append(ECalenNotifyEntrySaved);
+ notificationArray.Append(ECalenNotifyEntryDeleted);
+ notificationArray.Append(ECalenNotifyInstanceDeleted);
+ notificationArray.Append(ECalenNotifySystemLocaleChanged);
+ notificationArray.Append(ECalenNotifySystemLanguageChanged);
+ notificationArray.Append(ECalenNotifySystemTimeChanged);
+ notificationArray.Append(ECalenNotifyEntryClosed);
+ notificationArray.Append(ECalenNotifySettingsClosed);
+
+ RegisterForNotificationsL( iViewManager, notificationArray );
+ notificationArray.Reset();
+ notificationArray.Close();
}
void CCalenController::checkMultipleCreation()
@@ -250,23 +261,25 @@
iServices->Release();
}
+ if( mContext )
+ {
+ delete mContext;
+ mContext = NULL;
+ }
+ // iActionUi has to be deleted before iNotifier
+ // as the unregistering of the notifications has to be done
+ if( iActionUi )
+ {
+ delete iActionUi;
+ iActionUi = NULL;
+ }
+
if( iNotifier )
{
delete iNotifier;
iNotifier = NULL;
}
-
- if(mContext) {
- delete mContext;
- mContext = NULL;
- }
-
- if( iActionUi )
- {
- delete iActionUi;
- iActionUi = NULL;
- }
-
+
if( iViewManager )
{
delete iViewManager;
@@ -278,7 +291,11 @@
delete iCustomisationManager;
iCustomisationManager = NULL;
}
-
+
+ if (mAgendaUtil) {
+ delete mAgendaUtil;
+ mAgendaUtil = 0;
+ }
Dll::SetTls( NULL );
@@ -533,7 +550,7 @@
{
TRACE_ENTRY_POINT;
QDateTime focusTime = mContext->defaultCalTimeForViewsL();
- mContext->setFocusDateAndTimeL(focusTime,KCalenDayViewUidValue );
+ mContext->setFocusDateAndTime(focusTime);
TRACE_EXIT_POINT;
}
@@ -588,13 +605,10 @@
if (iIsFromServiceFrmWrk) {
// Set the context properly
- mContext->setFocusDateAndTimeL(dateTime,KCalenMonthViewUidValue);
+ mContext->setFocusDateAndTime(dateTime);
// launch the appropriate view
iViewManager->constructAndActivateView(view);
- // Construct other views
- iViewManager->constructOtherViews();
-
} else { // Calendar was in backgroung but now its being brought to foreground
// If current state is editing state or printing state
// or deleting state or sending state, then dont do anything as
@@ -607,7 +621,7 @@
// simply return - we dont have anything to do
} else {
// Set the context properly
- mContext->setFocusDateAndTimeL(dateTime,KCalenMonthViewUidValue);
+ mContext->setFocusDateAndTime(dateTime);
IssueCommandL(view);
}
}
--- a/calendarui/controller/src/calendeleteui.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/controller/src/calendeleteui.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -298,29 +298,25 @@
// Fetch the entry
AgendaEntry entry = iController.Services().agendaInterface()->fetchById(
iController.context().instanceId().mEntryLocalUid);
-
- // Check if the entry is a To-Do
- if (AgendaEntry::TypeTodo == entry.type()) {
- if(!entry.isNull()) {
- showDeleteQuery(entry.type() == AgendaEntry::TypeTodo ?
- EDeleteToDo :
- EDeleteEntry );
+ // Check if the entry is a To-Do
+ if (AgendaEntry::TypeTodo == entry.type()) {
+ showDeleteQuery(EDeleteToDo);
+ } else {
+ // Show the repeat entry delete query for repeating entries except Anniversary
+ // Even though the anniversary is repeating
+ // all the instances will be deleted
+ if ((entry.isRepeating() || !entry.recurrenceId().isNull())
+ && (AgendaEntry::TypeAnniversary != entry.type())) {
+ // Show a confirmation note whether the user
+ // wants to delete the single instance or all of them
+ showRepeatingEntryDeleteQuery();
+ } else {
+ // If the entry is not a repeating entry,
+ // delete it directly
+ // Save the entry for later reference in the slot
+ showDeleteQuery(EDeleteEntry);
+ }
}
- }
- else {
- if (entry.isRepeating() || !entry.recurrenceId().isNull()) {
- // Show a confirmation note whether the user
- // wants to delete the single instance or all of them
- showRepeatingEntryDeleteQuery();
- } else {
- // If the entry is not a repeating entry,
- // delete it directly
- // Save the entry for later reference in the slot
- showDeleteQuery(entry.type() == AgendaEntry::TypeTodo ?
- EDeleteToDo :
- EDeleteEntry );
- }
- }
}
TRACE_EXIT_POINT;
}
@@ -333,7 +329,9 @@
//
void CalenDeleteUi::DeleteAllEntriesL()
{
- ASSERT( !iIsDeleting );
+ if(iIsDeleting) {
+ return;
+ }
showDeleteQuery(EDeleteAll );
}
@@ -347,8 +345,9 @@
void CalenDeleteUi::DeleteEntriesBeforeDateL()
{
TRACE_ENTRY_POINT;
- ASSERT( !iIsDeleting );
-
+ if(iIsDeleting) {
+ return;
+ }
// launch the datepicker
dateQuery();
TRACE_EXIT_POINT;
@@ -380,9 +379,11 @@
mDatePicker->setDate(currentDate);
popUp->setContentWidget(mDatePicker);
-
- popUp->addAction(new HbAction(hbTrId("txt_calendar_button_dialog_delete")));
- popUp->addAction(new HbAction(hbTrId("txt_common_button_cancel"),popUp));
+ mDeleteAction = new HbAction(
+ hbTrId("txt_calendar_button_dialog_delete"), popUp);
+ popUp->addAction(mDeleteAction);
+ mCancelAction = new HbAction(hbTrId("txt_common_button_cancel"),popUp);
+ popUp->addAction(mCancelAction);
// Show the popup
popUp->open(this, SLOT(handleDateQuery(HbAction*)));
}
@@ -395,11 +396,38 @@
//
void CalenDeleteUi::handleDateQuery(HbAction* action)
{
- if(action->text() == hbTrId("txt_calendar_button_dialog_delete")) {
- getSelectedDateAndDelete();
+ if(action == mDeleteAction) {
+ // User selected the date before which all the entries has to be deleted
+ QDate selectedDate(mDatePicker->date());
+ // Check if the date is within the range.
+ if(selectedDate.isValid()) {
+ QTime time(0,0,0,0);
+ QDateTime dateTime;
+ dateTime.setDate(selectedDate);
+ dateTime.setTime(time);
+ // Do delete only if inputted day is after beginning of range
+ if(dateTime > AgendaUtil::minTime()) {
+ // Two pass delete:
+ // 1. pass
+ // To prevent destroying entries starting and ending midnight
+ // subtract one second and do delete on that range.
+ dateTime = dateTime.addSecs(-1);
+ dateTime = ( dateTime > AgendaUtil::minTime()?
+ dateTime : AgendaUtil::minTime());
+
+ HandleDeleteMultipleEventsL( AgendaUtil::minTime(),
+ dateTime, 1);
+ }else {
+ iController.BroadcastNotification(ECalenNotifyDeleteFailed);
+ }
+ }
}else {
+ // User pressed cancel
handleDeleteCancel();
}
+ // Reset the member variables
+ mDeleteAction = NULL;
+ mCancelAction = NULL;
}
// ----------------------------------------------------------------------------
// CalenDeleteUi::showRepeatingEntryDeleteQuery
@@ -457,62 +485,33 @@
iController.BroadcastNotification(ECalenNotifyDeleteFailed);
}
-// ----------------------------------------------------------------------------
-// CalenDeleteUi::getSelectedDateAndDelete
-// Deletes the entries before the selected date
-// (other items were commented in a header).
-// ----------------------------------------------------------------------------
-//
-void CalenDeleteUi::getSelectedDateAndDelete()
+void CalenDeleteUi::handleRepeatedEntryDelete(int index)
{
- QDate selectedDate(mDatePicker->date());
+ // Fetch the entry
+ // Find all possible instances
+ AgendaEntry instance = CalenActionUiUtils::findPossibleInstanceL(
+ iController.context().instanceId(),
+ iController.Services().agendaInterface());
- // Check if the date is within the range.
- if(selectedDate.isValid()) {
- QTime time(0,0,0,0);
- QDateTime dateTime;
- dateTime.setDate(selectedDate);
- dateTime.setTime(time);
- // Do delete only if inputted day is after beginning of range
- if(dateTime > AgendaUtil::minTime()) {
- // Two pass delete:
- // 1. pass
- // To prevent destroying entries starting and ending midnight
- // subtract one second and do delete on that range.
- dateTime = dateTime.addSecs(-1);
- dateTime = ( dateTime > AgendaUtil::minTime()? dateTime : AgendaUtil::minTime());
-
- HandleDeleteMultipleEventsL( AgendaUtil::minTime(), dateTime,1 );
- }else {
- iController.BroadcastNotification(ECalenNotifyDeleteFailed);
+ if (!instance.isNull()) {
+ connect(iController.Services().agendaInterface(),
+ SIGNAL(entryDeleted(ulong)),
+ this, SLOT(entryDeleted(ulong)));
+ switch(index) {
+ case 0:
+ // User wants to delete only this occurence
+ iController.Services().agendaInterface()->deleteRepeatedEntry(
+ instance, AgendaUtil::ThisOnly);
+ break;
+ case 1:
+ // User wants to delete all the occurences
+ iController.Services().agendaInterface()->deleteRepeatedEntry(
+ instance, AgendaUtil::ThisAndAll);
+ break;
}
}
}
-void CalenDeleteUi::handleRepeatedEntryDelete(int index)
-{
- // Fetch the entry
- // Find all possible instances
- AgendaEntry instance = CalenActionUiUtils::findPossibleInstanceL(
- iController.context().instanceId(),
- iController.Services().agendaInterface());
-
- if (!instance.isNull()) {
- connect(iController.Services().agendaInterface(), SIGNAL(entryDeleted(ulong)),
- this, SLOT(entryDeleted(ulong)));
- switch(index) {
- case 0:
- // User wants to delete only this occurence
- iController.Services().agendaInterface()->deleteRepeatedEntry(instance, AgendaUtil::ThisOnly);
- break;
- case 1:
- // User wants to delete all the occurences
- iController.Services().agendaInterface()->deleteRepeatedEntry(instance, AgendaUtil::ThisAndAll);
- break;
- }
- }
-}
-
// ----------------------------------------------------------------------------
// CalenDeleteUi::showDeleteQuery
// Launches the popup for deleting the instance/instances
@@ -533,8 +532,7 @@
{
case EDeleteEntry:
{
- // TODO: Add the text id
- text.append("Delete entry?");
+ text.append(hbTrId("txt_calendar_info_delete_meeting"));
break;
}
case EDeleteToDo:
@@ -564,9 +562,11 @@
{
popup->removeAction(list[i]);
}
- popup->addAction(new HbAction(hbTrId("txt_calendar_button_delete"), popup));
- popup->addAction(new HbAction(
- hbTrId("txt_calendar_button_cancel"), popup));
+ mDeleteAction = new HbAction(
+ hbTrId("txt_calendar_button_dialog_delete"), popup);
+ popup->addAction(mDeleteAction);
+ mCancelAction = new HbAction(hbTrId("txt_calendar_button_cancel"), popup);
+ popup->addAction(mCancelAction);
popup->open(this, SLOT(handleDeletion(HbAction*)));
}
@@ -580,19 +580,19 @@
{
TCalenNotification notification = ECalenNotifyDeleteFailed;
- if(action->text() == hbTrId("txt_calendar_button_delete")) {
+ if(action == mDeleteAction) {
switch (mDeleteCommand) {
case ECalenDeleteCurrentEntry:
{
- // Get the entry
- AgendaEntry entry =
- iController.Services().agendaInterface()->fetchById(
- iController.context().instanceId().mEntryLocalUid);
+ // Get the entry id
+ ulong id = iController.context().instanceId().mEntryLocalUid;
+ connect(iController.Services().agendaInterface(),
+ SIGNAL(entryDeleted(ulong)),
+ this, SLOT(entryDeleted(ulong)));
// Delete the entry if the delete button is been pressed
- iController.Services().agendaInterface()->deleteEntry(entry.id());
- notification = ECalenNotifyEntryDeleted;
+ iController.Services().agendaInterface()->deleteEntry(id);
}
break;
@@ -603,15 +603,18 @@
CalenActionUiUtils::findPossibleInstanceL(
iController.context().instanceId(),
iController.Services().agendaInterface() );
- QDateTime recId = instance.recurrenceId().toUTC();
- const bool child = recId.isNull();
-
- if( !child || mRecurrenceRange == AgendaUtil::ThisOnly
- || mRecurrenceRange == AgendaUtil::ThisAndAll) {
- iController.Services().agendaInterface()->deleteRepeatedEntry(
- instance, mRecurrenceRange );
+ if(!instance.isNull()) {
+ QDateTime recId = instance.recurrenceId().toUTC();
+ const bool child = recId.isNull();
+ connect(iController.Services().agendaInterface(),
+ SIGNAL(entryDeleted(ulong)),
+ this, SLOT(entryDeleted(ulong)));
+ if( !child || mRecurrenceRange == AgendaUtil::ThisOnly
+ || mRecurrenceRange == AgendaUtil::ThisAndAll) {
+ iController.Services().agendaInterface()->deleteRepeatedEntry(
+ instance, mRecurrenceRange );
+ }
}
- notification = ECalenNotifyEntryDeleted;
}
break;
@@ -619,7 +622,6 @@
{
HandleDeleteMultipleEventsL( AgendaUtil::minTime(),
AgendaUtil::maxTime(),1 );
- notification = ECalenNotifyEntryDeleted;
}
break;
@@ -632,6 +634,10 @@
// ECalenNotifyDeleteFailed as default.
// Notify the status
iController.BroadcastNotification(notification);
+
+ // Reset the member variables
+ mDeleteAction = NULL;
+ mCancelAction = NULL;
}
void CalenDeleteUi::entryDeleted(ulong id)
@@ -654,9 +660,10 @@
int aConfNoteId )
{
TRACE_ENTRY_POINT;
-
- ASSERT( !iIsDeleting );
+ if(iIsDeleting) {
+ return;
+ }
iConfirmationNoteId = aConfNoteId;
DeleteDayRangeL( aFirstDay, aLastDay );
@@ -754,7 +761,7 @@
// for CCalEntry type.
// First check that if _instance_ ends at midnight, but starts earlier
- if( CalenAgendaUtils::endsAtStartOfDayL( entry, aMidnight ) )
+ if( CalenAgendaUtils::endsAtStartOfDay( entry, aMidnight ) )
{
// Second, check that _entry's_ endtime is exactly the midnight
// This prevents us from destroying repeating entries, that has one
@@ -831,8 +838,7 @@
if( !aHasRepeatType && ( child || repeating ) &&
( aInstance.type() != AgendaEntry::TypeAnniversary ) ) {
- //doDelete = CalenActionUiUtils::ShowRepeatTypeQueryL( aRepeatType,
- // CalenActionUiUtils::EDelete );
+ showRepeatingEntryDeleteQuery();
}
else
{
--- a/calendarui/controller/src/calendocloader.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/controller/src/calendocloader.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -18,8 +18,8 @@
// User includes
#include "calendocloader.h"
-#include "calendayview.h"
-#include "calendayviewwidget.h"
+#include "calenagendaview.h"
+#include "calenagendaviewwidget.h"
#include "calenmonthview.h"
#include "calenmonthgrid.h"
#include "calenpreviewpane.h"
@@ -63,14 +63,14 @@
const QString &name)
{
MCalenServices &services = mController.Services();
- if (name == QString(CALEN_DAYVIEW)) {
- QObject *calenDayView = new CalenDayView(services);
- calenDayView->setObjectName(name);
- return calenDayView;
- } else if (name == QString(CALEN_DAYVIEW_WIDGET)) {
- QObject *calenDayViewWidget = new CalenDayViewWidget(services, this);
- calenDayViewWidget->setObjectName(name);
- return calenDayViewWidget;
+ if (name == QString(CALEN_AGENDAVIEW)) {
+ QObject *calenAgendaView = new CalenAgendaView(services);
+ calenAgendaView->setObjectName(name);
+ return calenAgendaView;
+ } else if (name == QString(CALEN_AGENDAVIEW_WIDGET)) {
+ QObject *calenAgendaViewWidget = new CalenAgendaViewWidget(services, this);
+ calenAgendaViewWidget->setObjectName(name);
+ return calenAgendaViewWidget;
} else if (name == QString(CALEN_MONTHVIEW)) { // For Month View
QObject *calenMonthView = new CalenMonthView(services);
calenMonthView->setObjectName(name);
--- a/calendarui/controller/src/caleneditui.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/controller/src/caleneditui.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -56,7 +56,7 @@
CCalenEditUi::~CCalenEditUi()
{
TRACE_ENTRY_POINT;
-
+ iController.CancelNotifications(this);
TRACE_EXIT_POINT;
}
@@ -102,7 +102,7 @@
TInt command = aCommand.Command();
MCalenContext& context = iController.Services().Context();
AgendaEntry editedEntry;
- QDateTime newEntryDateTime = iController.context().focusDateAndTimeL();
+ QDateTime newEntryDateTime = iController.context().focusDateAndTime();
// Check if it is not on same day and set the default time and date accordingly.
bool isSameDay = CalenDateUtils::isOnToday(newEntryDateTime);
@@ -122,15 +122,17 @@
context.instanceId().mEntryLocalUid );
// For repeating entry, we need to update proper start time here
// from the context
- if (editedEntry.isRepeating()) {
- // Get the instancde time frm the context
- QDateTime instanceTime = context.focusDateAndTimeL();
- editedEntry.setStartAndEndTime(instanceTime, editedEntry.endTime());
+ if(!editedEntry.isNull()) {
+ if (editedEntry.isRepeating()) {
+ // Get the instancde time frm the context
+ QDateTime instanceTime = context.focusDateAndTime();
+ editedEntry.setStartAndEndTime(instanceTime, editedEntry.endTime());
+ }
+ iEditor= new CalenEditor(iController.Services().agendaInterface());
+ iEditor->edit(editedEntry, false);
+ connect(iEditor, SIGNAL(entrySaved()), this, SLOT(handleEntrySaved()));
+ connect(iEditor, SIGNAL(dialogClosed()), this, SLOT(handleDialogClosed()));
}
- iEditor= new CalenEditor(iController.Services().agendaInterface());
- iEditor->edit(editedEntry, false);
- connect(iEditor, SIGNAL(entrySaved()), this, SLOT(handleEntrySaved()));
- connect(iEditor, SIGNAL(dialogClosed()), this, SLOT(handleDialogClosed()));
break;
default:
// Controller decided this class was the place to handle this
--- a/calendarui/controller/src/calenidlestate.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/controller/src/calenidlestate.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -96,8 +96,8 @@
switch( cmd )
{
case ECalenMonthView:
- case ECalenWeekView:
case ECalenDayView:
+ case ECalenAgendaView:
case ECalenStartActiveStep:
{
// set previous state to idle
--- a/calendarui/controller/src/calensettingsstate.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/controller/src/calensettingsstate.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -103,8 +103,8 @@
}
break;
case ECalenMonthView:
+ case ECalenAgendaView:
case ECalenDayView:
- case ECalenLandscapeDayView:
case ECalenStartActiveStep:
{
// set previous state to idle
--- a/calendarui/controller/src/calenstatemachine.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/controller/src/calenstatemachine.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -156,12 +156,8 @@
{
TRACE_ENTRY_POINT;
- TRAPD(error,iStates[iCurrentState]->HandleNotificationL( aNotification, *this));
- if(error!=KErrNone)
- {
- // do avoid warning
- }
-
+ TRAP_IGNORE(iStates[iCurrentState]->HandleNotificationL( aNotification, *this));
+
TRACE_EXIT_POINT;
}
--- a/calendarui/controller/src/calenviewmanager.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/controller/src/calenviewmanager.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -17,7 +17,6 @@
//system includes
-#include <QDebug>
#include <hbmainwindow.h>
#include <hbinstance.h>
#include <hbapplication.h> // hbapplication
@@ -29,7 +28,7 @@
#include "hb_calencommands.hrh"
#include "calenservicesimpl.h"
#include "calenmonthview.h"
-#include "calendayview.h"
+#include "calenagendaview.h"
#include "calenmonthview.h"
#include "agendaeventviewer.h"
#include "calennotificationhandler.h"
@@ -39,6 +38,7 @@
#include "calendocloader.h"
#include "calendarui_debug.h"
#include "calencommon.h"
+#include "calendayview.h"
// ----------------------------------------------------------------------------
// CalenViewManager::CalenViewManager
@@ -54,12 +54,13 @@
// Following block intializes member variables
mCalenEventViewer = NULL;
mMonthViewDocLoader = NULL;
- mDayViewDocLoader = NULL;
- mDayViewAltDocLoader = NULL;
+ mAgendaViewDocLoader = NULL;
+ mAgendaViewAltDocLoader = NULL;
+ mCalenAgendaView = NULL;
+ mCalenMonthView = NULL;
+ mCalenAgendaViewAlt = NULL;
+ mSettingsView = NULL;
mCalenDayView = NULL;
- mCalenMonthView = NULL;
- mCalenDayViewAlt = NULL;
- mSettingsView = NULL;
// Connect to instance view and entry view creation signals from agenda
// interface
@@ -103,9 +104,9 @@
{
loadMonthView(); // Load month view
}
- else if (ECalenDayView == viewId) // Check if Activity was stored for day view
+ else if (ECalenAgendaView == viewId) // Check if Activity was stored for agenda view
{
- loadDayView(); // Load day view
+ loadAgendaView(); // Load agenda view
}
ActivateDefaultViewL(viewId);
@@ -119,10 +120,10 @@
mController.MainWindow().addView(mCalenMonthView); // Add month view to main window
mController.MainWindow().setCurrentView(mCalenMonthView); // Set month view as current view
}
- else if (ECalenDayView == viewId) // Check if Activity was stored for day view
+ else if (ECalenAgendaView == viewId) // Check if Activity was stored for agenda view
{
- mController.MainWindow().addView(mCalenDayView); // Add day view to main window
- mController.MainWindow().setCurrentView(mCalenDayView); // Set day view as current view
+ mController.MainWindow().addView(mCalenAgendaView); // Add agenda view to main window
+ mController.MainWindow().setCurrentView(mCalenAgendaView); // Set agenda view as current view
}
} else if (isFromServiceFrmWrk/*Hb::ActivationReasonService == activityReason*/) {
// Dont load any views until our remote slot gets called in
@@ -161,13 +162,13 @@
delete mSettingsView;
mSettingsView = 0;
}
- if (mDayViewDocLoader) {
- delete mDayViewDocLoader;
- mDayViewDocLoader = 0;
+ if (mAgendaViewDocLoader) {
+ delete mAgendaViewDocLoader;
+ mAgendaViewDocLoader = 0;
}
- if (mDayViewAltDocLoader) {
- delete mDayViewAltDocLoader;
- mDayViewAltDocLoader = 0;
+ if (mAgendaViewAltDocLoader) {
+ delete mAgendaViewAltDocLoader;
+ mAgendaViewAltDocLoader = 0;
}
if (mMonthViewDocLoader) {
delete mMonthViewDocLoader;
@@ -200,13 +201,13 @@
// Add month view to mainwindow.
mController.MainWindow().addView(mCalenMonthView);
mController.MainWindow().setCurrentView(mCalenMonthView);
- } else if (view == ECalenDayView) {
- mFirstView = ECalenDayView;
- loadDayView();
- ActivateDefaultViewL(ECalenDayView);
- // Add day view to mainwindow.
- mController.MainWindow().addView(mCalenDayView);
- mController.MainWindow().setCurrentView(mCalenDayView);
+ } else if (view == ECalenAgendaView) {
+ mFirstView = ECalenAgendaView;
+ loadAgendaView();
+ ActivateDefaultViewL(ECalenAgendaView);
+ // Add agenda view to mainwindow.
+ mController.MainWindow().addView(mCalenAgendaView);
+ mController.MainWindow().setCurrentView(mCalenAgendaView);
}
TRACE_EXIT_POINT;
}
@@ -247,37 +248,38 @@
}
// ----------------------------------------------------------------------------
-// CalenViewManager::loadDayView
-// Loads the day view frm the docml
+// CalenViewManager::loadAgendaView
+// Loads the agenda view frm the docml
// (other items were commented in a header).
// ----------------------------------------------------------------------------
//
-void CalenViewManager::loadDayView()
+void CalenViewManager::loadAgendaView()
{
bool loadSuccess = false;
- // Create the day view docloader object.
- mDayViewDocLoader = new CalenDocLoader(mController);
+ // Create the agenda view docloader object.
+ mAgendaViewDocLoader = new CalenDocLoader(mController);
// Load default section
- mDayViewDocLoader->load(CALEN_DAYVIEW_XML_FILE, &loadSuccess);
+ mAgendaViewDocLoader->load(CALEN_AGENDAVIEW_XML_FILE, &loadSuccess);
if (!loadSuccess) {
qFatal("calenviewmanager.cpp : Unable to load XML");
}
- // Get the calenday view from the loader
- mCalenDayView = static_cast<CalenDayView *> (mDayViewDocLoader->findWidget(CALEN_DAYVIEW));
- if (!mCalenDayView) {
- qFatal("calenviewmanager.cpp : Unable to find day view");
+ // Get the calenagenda view from the loader
+ mCalenAgendaView = static_cast<CalenAgendaView *> (mAgendaViewDocLoader->findWidget(CALEN_AGENDAVIEW));
+ if (!mCalenAgendaView) {
+ qFatal("calenviewmanager.cpp : Unable to find agenda view");
}
- // Setup the day view
- mCalenDayView->setupView(mDayViewDocLoader);
+ // Setup the agenda view
+ mCalenAgendaView->setupView(mAgendaViewDocLoader);
// The following code is done to provide swipe support
- // in day view. Idea is to create two views and keep
+ // in agenda view. Idea is to create two views and keep
// switiching between these two using view switch effects
// to provide an illusion of flow to the user
- loadAlternateDayView();
+ loadAlternateAgendaView();
+
}
// ----------------------------------------------------------------------------
@@ -296,6 +298,10 @@
// Construct other views
constructOtherViews();
+ // Install the event filter for the controller once the view is ready
+ // so that system language/locale changes can be handled
+ //hbInstance->allMainWindows().first()->installEventFilter(&mController);
+
// disconnect the view ready signal as we dont need it anymore
disconnect(&mController.MainWindow(), SIGNAL(viewReady()),
this, SLOT(handleMainViewReady()));
@@ -312,21 +318,25 @@
// Load all other views except mFirstView
// NOTE: Right now, since Calendar has only two views, month view
- // and day view, when client launches day view, then there is no need
+ // and agenda view, when client launches agenda view, then there is no need
// to construct the month view as per UI REQ., but tomorrow if new views
- // come after day view, then we need to construct those views if they are
+ // come after agenda view, then we need to construct those views if they are
// native views. Right now, there is a event viewer but its not a native
- // view. Hence, if day view is launched, dont construct month view
- if (mFirstView != ECalenDayView) // check if day view is not already loaded
+ // view. Hence, if agenda view is launched, dont construct month view
+ if (mFirstView != ECalenAgendaView) // check if agenda view is not already loaded
{
// Load all other views
- loadDayView();
+ loadAgendaView();
+
+ if (!mCalenDayView) {
+ mCalenDayView = new CalenDayView(mController.Services());
+ }
}
- else //day view was launched as first view
+ else //agenda view was launched as first view
{
// No implementation yet. UI specs not clear
// to be commented in with some more code once UI specs is frozen
- // for day view launching as first view after it was saved as activity
+ // for agenda view launching as first view after it was saved as activity
// when it was launched from month view
// loadMonthView();
// mCalenMonthView->doLazyLoading();
@@ -355,35 +365,35 @@
void CalenViewManager::showNextDay()
{
// Set the context for the next day
- QDateTime currentDay = mController.Services().Context().focusDateAndTimeL();
+ QDateTime currentDay = mController.Services().Context().focusDateAndTime();
currentDay = currentDay.addDays(1);
- mController.Services().Context().setFocusDateL(currentDay, ECalenDayView);
- mCurrentViewId = ECalenDayView;
+ mController.Services().Context().setFocusDate(currentDay);
+ mCurrentViewId = ECalenAgendaView;
// Check which is the currently activated view
- if (mController.MainWindow().currentView() == mCalenDayView) {
- mCalenDayView->disconnectAboutToQuitEvent(); // disconnect mCalenDayView to get aboutToQuit Events
- HbEffect::add(mCalenDayView,
+ if (mController.MainWindow().currentView() == mCalenAgendaView) {
+ mCalenAgendaView->disconnectAboutToQuitEvent(); // disconnect mCalenAgendaView to get aboutToQuit Events
+ HbEffect::add(mCalenAgendaView,
":/fxml/view_hide",
"hide");
- HbEffect::add(mCalenDayViewAlt,
+ HbEffect::add(mCalenAgendaViewAlt,
":/fxml/view_show",
"show");
- // Set the other day view as the current view
+ // Set the other agenda view as the current view
// and animate to provide illusion of swipe
// It would also connect for aboutToQuit events
- mCalenDayViewAlt->doPopulation();
- mController.MainWindow().setCurrentView(mCalenDayViewAlt, true, Hb::ViewSwitchUseNormalAnim);
+ mCalenAgendaViewAlt->doPopulation();
+ mController.MainWindow().setCurrentView(mCalenAgendaViewAlt, true, Hb::ViewSwitchUseNormalAnim);
} else {
- mCalenDayViewAlt->disconnectAboutToQuitEvent(); // disconnect mCalenDayViewAlt to get aboutToQuit Events
- HbEffect::add(mCalenDayViewAlt,
+ mCalenAgendaViewAlt->disconnectAboutToQuitEvent(); // disconnect mCalenAgendaViewAlt to get aboutToQuit Events
+ HbEffect::add(mCalenAgendaViewAlt,
":/fxml/view_hide",
"hide");
- HbEffect::add(mCalenDayView,
+ HbEffect::add(mCalenAgendaView,
":/fxml/view_show",
"show");
// It would also connect for aboutToQuit events
- mCalenDayView->doPopulation();
- mController.MainWindow().setCurrentView(mCalenDayView, true, Hb::ViewSwitchUseNormalAnim);
+ mCalenAgendaView->doPopulation();
+ mController.MainWindow().setCurrentView(mCalenAgendaView, true, Hb::ViewSwitchUseNormalAnim);
}
}
@@ -394,46 +404,55 @@
//
void CalenViewManager::showPrevDay()
{
- QDateTime currentDay = mController.Services().Context().focusDateAndTimeL();
+ QDateTime currentDay = mController.Services().Context().focusDateAndTime();
currentDay = currentDay.addDays(-1);
- mController.Services().Context().setFocusDateL(currentDay, ECalenDayView);
- mCurrentViewId = ECalenDayView;
- if (mController.MainWindow().currentView() == mCalenDayView) {
- mCalenDayView->disconnectAboutToQuitEvent(); // disconnect mCalenDayView to get aboutToQuit Events
- HbEffect::add(mCalenDayView,
+ mController.Services().Context().setFocusDate(currentDay);
+ mCurrentViewId = ECalenAgendaView;
+ if (mController.MainWindow().currentView() == mCalenAgendaView) {
+ mCalenAgendaView->disconnectAboutToQuitEvent(); // disconnect mCalenAgendaView to get aboutToQuit Events
+ HbEffect::add(mCalenAgendaView,
":/fxml/view_hide_back",
"hide");
- HbEffect::add(mCalenDayViewAlt,
+ HbEffect::add(mCalenAgendaViewAlt,
":/fxml/view_show_back",
"show");
// It would also connect for aboutToQuit events
- mCalenDayViewAlt->doPopulation();
- mController.MainWindow().setCurrentView(mCalenDayViewAlt, true, Hb::ViewSwitchUseNormalAnim);
+ mCalenAgendaViewAlt->doPopulation();
+ mController.MainWindow().setCurrentView(mCalenAgendaViewAlt, true, Hb::ViewSwitchUseNormalAnim);
} else {
- mCalenDayViewAlt->disconnectAboutToQuitEvent(); // disconnect mCalenDayViewAlt to get aboutToQuit Events
- HbEffect::add(mCalenDayViewAlt,
+ mCalenAgendaViewAlt->disconnectAboutToQuitEvent(); // disconnect mCalenAgendaViewAlt to get aboutToQuit Events
+ HbEffect::add(mCalenAgendaViewAlt,
":/fxml/view_hide_back",
"hide");
- HbEffect::add(mCalenDayView,
+ HbEffect::add(mCalenAgendaView,
":/fxml/view_show_back",
"show");
// It would also connect for aboutToQuit events
- mCalenDayView->doPopulation();
- mController.MainWindow().setCurrentView(mCalenDayView, true, Hb::ViewSwitchUseNormalAnim);
+ mCalenAgendaView->doPopulation();
+ mController.MainWindow().setCurrentView(mCalenAgendaView, true, Hb::ViewSwitchUseNormalAnim);
}
}
// ----------------------------------------------------------------------------
-// CalenViewManager::removeDayViews
-// other items were commented in a header
+// CalenViewManager::removePreviousView
+// Remove the previous view from main window
// ----------------------------------------------------------------------------
//
-void CalenViewManager::removeDayViews()
+void CalenViewManager::removePreviousView()
{
- mCalenDayView->clearListModel();
- mCalenDayViewAlt->clearListModel();
- mController.MainWindow().removeView(mCalenDayView);
- mController.MainWindow().removeView(mCalenDayViewAlt);
+ if (ECalenAgendaView == mCurrentViewId) {
+ mCalenAgendaView->clearListModel();
+ mCalenAgendaViewAlt->clearListModel();
+ mController.MainWindow().removeView(mCalenAgendaView);
+ mController.MainWindow().removeView(mCalenAgendaViewAlt);
+ } else if (ECalenDayView == mCurrentViewId) {
+ mController.MainWindow().removeView(mCalenDayView);
+ } else {
+ if (ECalenMonthView == mCurrentViewId) {
+ mController.MainWindow().removeView(mCalenMonthView);
+ }
+ }
+
}
// ----------------------------------------------------------------------------
@@ -448,8 +467,8 @@
mCurrentViewId = defaultView;
if (ECalenMonthView == defaultView) {
mCalenMonthView->doPopulation();
- } else if (ECalenDayView == defaultView) {
- mCalenDayView->doPopulation();
+ } else if (ECalenAgendaView == defaultView) {
+ mCalenAgendaView->doPopulation();
}
TRACE_EXIT_POINT;
}
@@ -477,43 +496,40 @@
mCalenMonthView->doPopulation();
mController.MainWindow().setCurrentView(mCalenMonthView);
break;
- case ECalenDayView:
- if (mController.MainWindow().currentView() == mCalenDayView) {
+ case ECalenAgendaView:
+ if (mController.MainWindow().currentView() == mCalenAgendaView) {
// This happens when settings view or event viewer is opened
// from the agenda view. Simply repopulate the view
- if (mCalenDayView) {
- // Remove month view from mainwindow.
- mController.MainWindow().removeView(mCalenMonthView); // what if month view is never loaded
- mCalenDayView->doPopulation();
- mController.MainWindow().setCurrentView(mCalenDayView);
+ if (mCalenAgendaView) {
+ mCalenAgendaView->doPopulation();
+ mController.MainWindow().setCurrentView(mCalenAgendaView);
}
- } else if (mController.MainWindow().currentView() == mCalenDayViewAlt){
+ } else if (mController.MainWindow().currentView() == mCalenAgendaViewAlt){
// This happens when settings view or event viewer is opened
// from the agenda view. Simply repopulate the view
- if (mCalenDayViewAlt) {
- mCalenDayViewAlt->doPopulation();
- mController.MainWindow().setCurrentView(mCalenDayViewAlt);
+ if (mCalenAgendaViewAlt) {
+ mCalenAgendaViewAlt->doPopulation();
+ mController.MainWindow().setCurrentView(mCalenAgendaViewAlt);
}
} 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
+ // This is called whenever the agenda view is opened from the month
+ // view. Since the agenda view is not added to the mainwindow,
+ // add the agenda views to mainwindow and set any one of them as
// current view
- if (mCalenDayView) {
- mCalenDayView->doPopulation();
- mController.MainWindow().addView(mCalenDayView);
- mController.MainWindow().setCurrentView(mCalenDayView);
- mController.MainWindow().addView(mCalenDayViewAlt);
+ if (mCalenAgendaView) {
+ mCalenAgendaView->doPopulation();
+ mController.MainWindow().addView(mCalenAgendaView);
+ mController.MainWindow().setCurrentView(mCalenAgendaView);
+ mController.MainWindow().addView(mCalenAgendaViewAlt);
}
}
break;
case ECalenShowSettings:
- {
mSettingsView->refreshView();
- }
break;
- case ECalenLandscapeDayView:
- // For later implementation
+ case ECalenDayView:
+ mCalenDayView->doPopulation();
+ mController.MainWindow().setCurrentView(mCalenDayView);
break;
}
TRACE_EXIT_POINT;
@@ -531,15 +547,15 @@
if (mCalenMonthView) {
mCalenMonthView->captureScreenshot(true);
}
- else if (mCalenDayView) {
- mCalenDayView->captureScreenshot(true);
+ else if (mCalenAgendaView) {
+ mCalenAgendaView->captureScreenshot(true);
}
MCalenContext& context = mController.Services().Context();
AgendaEntry viewEntry= mController.Services().agendaInterface()->fetchById(
context.instanceId().mEntryLocalUid );
if (viewEntry.isRepeating()
&& viewEntry.type() != AgendaEntry::TypeTodo) {
- QDateTime startDateTime = context.focusDateAndTimeL();
+ QDateTime startDateTime = context.focusDateAndTime();
viewEntry.setStartAndEndTime(startDateTime,
startDateTime.addSecs(viewEntry.durationInSecs()));
}
@@ -562,30 +578,30 @@
}
// ----------------------------------------------------------------------------
-// CalenViewManager::loadAlternateDayView
+// CalenViewManager::loadAlternateAgendaView
// other items were commented in a header
// ----------------------------------------------------------------------------
//
-void CalenViewManager::loadAlternateDayView()
+void CalenViewManager::loadAlternateAgendaView()
{
bool loadSuccess = false;
- // Create the day view docloader object.
- mDayViewAltDocLoader = new CalenDocLoader(mController);
+ // Create the agenda view docloader object.
+ mAgendaViewAltDocLoader = new CalenDocLoader(mController);
// Load default section
- mDayViewAltDocLoader->load(CALEN_DAYVIEW_XML_FILE, &loadSuccess);
+ mAgendaViewAltDocLoader->load(CALEN_AGENDAVIEW_XML_FILE, &loadSuccess);
if (!loadSuccess) {
qFatal("calenviewmanager.cpp : Unable to load XML");
}
- // Get the calenday view from the loader
- mCalenDayViewAlt = static_cast<CalenDayView *> (mDayViewAltDocLoader->findWidget(CALEN_DAYVIEW));
- if (!mCalenDayViewAlt) {
- qFatal("calenviewmanager.cpp : Unable to find alternate day view");
+ // Get the calenagenda view from the loader
+ mCalenAgendaViewAlt = static_cast<CalenAgendaView *> (mAgendaViewAltDocLoader->findWidget(CALEN_AGENDAVIEW));
+ if (!mCalenAgendaViewAlt) {
+ qFatal("calenviewmanager.cpp : Unable to find alternate agenda view");
}
- // Setup the day view
- mCalenDayViewAlt->setupView(mDayViewAltDocLoader);
+ // Setup the agenda view
+ mCalenAgendaViewAlt->setupView(mAgendaViewAltDocLoader);
}
// ----------------------------------------------------------------------------
@@ -601,23 +617,33 @@
switch (command.Command()) {
case ECalenMonthView:
- removeDayViews();
- // Add month view to mainwindow.
+ // First remove the previous native view before
+ // we set the mCurrentViewId with the current view
+ removePreviousView();
+ // Add month view to mainwindow.
mController.MainWindow().addView(mCalenMonthView);
mCurrentViewId = ECalenMonthView;
activateCurrentView();
break;
+ case ECalenAgendaView:
+ // First remove the previous native view before
+ // we set the mCurrentViewId with the current view
+ removePreviousView();
+ mCurrentViewId = ECalenAgendaView;
+ activateCurrentView();
+ break;
case ECalenDayView:
- mCurrentViewId = ECalenDayView;
- activateCurrentView();
+ {
+ // First add new view and use QueuedConnection to assure that
+ // view is ready before setting it as the current view
+ mController.MainWindow().addView(mCalenDayView);
+ QMetaObject::invokeMethod(this, "handleDayViewReady",
+ Qt::QueuedConnection);
+ }
break;
case ECalenEventView:
launchEventView();
break;
- case ECalenLandscapeDayView:
- mCurrentViewId = ECalenLandscapeDayView;
- activateCurrentView();
- break;
case ECalenStartActiveStep:
activateCurrentView();
break;
@@ -662,11 +688,11 @@
mCurrentViewId = mPreviousViewsId ;
mController.Services().IssueCommandL(ECalenStartActiveStep);
- // invalidate captured screenshots as either day view is activated now
+ // invalidate captured screenshots as either agenda view is activated now
if (mCalenMonthView) {
mCalenMonthView->captureScreenshot();
- } else if (mCalenDayView) {
- mCalenDayView->captureScreenshot();
+ } else if (mCalenAgendaView) {
+ mCalenAgendaView->captureScreenshot();
}
}
@@ -696,23 +722,20 @@
//
void CalenViewManager::handleViewingCompleted(const QDate date)
{
- qDebug() <<"calendar: CalenViewManager::handleEditingCompleted -->";
// Cleanup.
mCalenEventViewer->deleteLater();
if (!date.isNull() && date.isValid()) {
- mController.Services().Context().setFocusDateL(QDateTime(date),
- ECalenDayView);
+ mController.Services().Context().setFocusDate(QDateTime(date));
}
mController.Services().IssueNotificationL(ECalenNotifyEntryClosed);
- // invalidate captured screenshots as either day view is activated now
+ // invalidate captured screenshots as either agenda view is activated now
if (mCalenMonthView) {
mCalenMonthView->captureScreenshot();
- } else if (mCalenDayView) {
- mCalenDayView->captureScreenshot();
+ } else if (mCalenAgendaView) {
+ mCalenAgendaView->captureScreenshot();
}
- qDebug() <<"calendar: CalenViewManager::handleEditingCompleted <--";
}
// ----------------------------------------------------------------------------
@@ -723,11 +746,9 @@
//
void CalenViewManager::handleEditingStarted()
{
- qDebug() <<"calendar: CalenViewManager::handleEditingStarted -->";
mController.IssueCommandL(ECalenEditEntryFromViewer);
- qDebug() <<"calendar: CalenViewManager::handleEditingStarted <--";
}
// ----------------------------------------------------------------------------
@@ -738,11 +759,9 @@
//
void CalenViewManager::handleEditingCompleted()
{
- qDebug() <<"calendar: CalenViewManager::handleEditingStarted -->";
mController.Services().IssueNotificationL(ECalenNotifyEditorClosedFromViewer);
- qDebug() <<"calendar: CalenViewManager::handleEditingStarted <--";
}
// ----------------------------------------------------------------------------
@@ -753,11 +772,9 @@
//
void CalenViewManager::handleDeletingStarted()
{
- qDebug() <<"calendar: CalenViewManager::handleEditingStarted -->";
mController.IssueCommandL(ECalenDeleteEntryFromViewer);
- qDebug() <<"calendar: CalenViewManager::handleEditingStarted <--";
}
// ----------------------------------------------------------------------------
@@ -768,19 +785,17 @@
//
void CalenViewManager::handleDeletingCompleted()
{
- qDebug() <<"calendar: CalenViewManager::handleEditingStarted -->";
mController.Services().IssueNotificationL(ECalenNotifyEntryDeleted);
- // invalidate captured screenshots as either month view or day view is activated now
+ // invalidate captured screenshots as either month view or agenda view is activated now
if (mCalenMonthView) {
mCalenMonthView->captureScreenshot();
- } else if (mCalenDayView) {
- mCalenDayView->captureScreenshot();
+ } else if (mCalenAgendaView) {
+ mCalenAgendaView->captureScreenshot();
}
- qDebug() <<"calendar: CalenViewManager::handleEditingStarted <--";
}
// ----------------------------------------------------------------------------
@@ -802,8 +817,8 @@
if (mCalenMonthView) {
mCalenMonthView->fetchEntriesAndUpdateModel();
}
- else if (mCalenDayView) {
- mCalenDayView->doPopulation();
+ else if (mCalenAgendaView) {
+ mCalenAgendaView->doPopulation();
}
}
@@ -818,6 +833,24 @@
// Nothing Yet
Q_UNUSED(status);
}
+
+// ----------------------------------------------------------------------------
+// CalenViewManager::handleDayViewReady
+// Launches day view when it is added to MainWindow and ready to be displayed
+// ----------------------------------------------------------------------------
+//
+void CalenViewManager::handleDayViewReady()
+{
+ // Removes current view
+ // Notice: removing view should be done after new view is set as current to
+ // avoid situation that there is no current view in application
+ removePreviousView();
+
+ // Sets and activates day view
+ mCurrentViewId = ECalenDayView;
+ activateCurrentView();
+}
+
// ----------------------------------------------------------------------------
// CalenViewManager::launchSettingsView
// Launches settings view
@@ -825,7 +858,7 @@
// ----------------------------------------------------------------------------
//
void CalenViewManager::launchSettingsView()
- {
+{
mPreviousViewsId = mCurrentViewId ;
mCurrentViewId = ECalenShowSettings;
mSettingsView->initializeForm();
@@ -834,9 +867,9 @@
// capture cureent view in case app closed/quits from settings view
if (mCalenMonthView){
mCalenMonthView->captureScreenshot(true);
- } else if(mCalenDayView){
- mCalenDayView->captureScreenshot(true);
+ } else if(mCalenAgendaView){
+ mCalenAgendaView->captureScreenshot(true);
}
- }
+}
// End of file --Don't remove this.
--- a/calendarui/customisationmanager/src/calencustomisationmanager.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/customisationmanager/src/calencustomisationmanager.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -509,17 +509,19 @@
// Get a new services object from global data
MCalenServices* services = iServicesFactory.NewServicesL();
-
+ CleanupStack::PushL( services );
// Creates the plugin and transfers ownership of the services
// object to the plugin.
CCalenCustomisation* plugin =
CCalenCustomisation::CreateImplementationL( aPluginUid, services );
-
- CleanupStack::PushL( plugin );
+ CleanupStack::PushL( plugin );
// the plugin array takes ownership of the plugin
AddPluginL( plugin, aPluginUid );
+
+ // Cleanup
CleanupStack::Pop( plugin );
+ CleanupStack::Pop( services );
TRACE_EXIT_POINT;
--- a/calendarui/globaldata/inc/calencontext.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/globaldata/inc/calencontext.h Tue Jul 06 14:14:56 2010 +0300
@@ -54,10 +54,8 @@
/**
* Sets the date and time currently focused.
* @param aFocusTime The new focus date and time.
- * @param aViewId The view id of the currently active view.
*/
- virtual void setFocusDateAndTimeL( const QDateTime& focusDateTime,
- const int& viewId ) = 0;
+ virtual void setFocusDateAndTime( const QDateTime& focusDateTime) = 0;
/**
* Sets the date currently focused. When retrieving the focus
@@ -65,29 +63,23 @@
* will be set to the default of view. When retrieving the focus
* time only, it will be set to -1.
* @param aFocusDate The new focus date and time.
- * @param aViewId The view id of the currently active view.
*/
- virtual void setFocusDateL( const QDateTime& focusDateTime,
- const int& viewId ) = 0;
+ virtual void setFocusDate( const QDateTime& focusDateTime) = 0;
/**
* Sets the id of the instance currently focused.
* @param aInstanceId the id of the focused instance.
- * @param aViewId The view id of the currently active view.
*/
- virtual void setInstanceIdL( const TCalenInstanceId& instanceId,
- const int& viewId ) = 0;
+ virtual void setInstanceId( const TCalenInstanceId& instanceId ) = 0;
/**
* Sets the time and instance currently focused.
* @param aFocusTime The new focus time. If no time is focused, set
* the Utc time of this object to be Time::NullTTime.
* @param aInstanceId the id of the focused instance.
- * @param aViewId The view id of the currently active view.
*/
- virtual void setFocusDateAndTimeAndInstanceL( const QDateTime& focusDateTime,
- const TCalenInstanceId& aInstanceId,
- const int& viewId ) = 0;
+ virtual void setFocusDateAndTimeAndInstance( const QDateTime& focusDateTime,
+ const TCalenInstanceId& aInstanceId ) = 0;
// Getters
/**
@@ -95,7 +87,8 @@
* @return The currently focused date and time. When no time is
* focused, the default time on the current date will be returned.
*/
- virtual QDateTime focusDateAndTimeL() const = 0;
+ virtual QDateTime focusDateAndTime() const = 0;
+
/**
* Gets the time currently focused.
@@ -111,13 +104,6 @@
*/
virtual TCalenInstanceId instanceId() const = 0;
- /**
- * Gets the id of the currently active view.
- * @return The view id of the currently active view.
- */
- virtual int viewId() const = 0;
-
-
public: // For Mutliple Context Support
/**
@@ -154,23 +140,6 @@
*/
virtual int mutlipleContextIdsCount() = 0;
- /**
- * Sets the user selected landmark
- * @param aLandMark Landmark object
- */
- //virtual void SetLandMark(CPosLandmark* aLandMark) = 0;
-
- /**
- * Returns the user selected landmark
- * @return Landmark object
- */
- //virtual CPosLandmark* GetLandMark() = 0;
-
- /**
- * Resets the landmark
- */
- //virtual void ResetLandMark() = 0;
-
};
#endif // CALENCONTEXT_H
--- a/calendarui/globaldata/inc/calencontextimpl.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/globaldata/inc/calencontextimpl.h Tue Jul 06 14:14:56 2010 +0300
@@ -72,10 +72,8 @@
/**
* Sets the date and time currently focused.
* @param aFocusTime The new focus date and time.
- * @param aViewId The view id of the currently active view.
*/
- void setFocusDateAndTimeL( const QDateTime& focusDateTime,
- const int& viewId );
+ void setFocusDateAndTime( const QDateTime& focusDateTime);
/**
* Sets the date currently focused. When retrieving the focus
@@ -83,29 +81,23 @@
* will be set to the default of view. When retrieving the focus
* time only, it will be set to -1.
* @param aFocusDate The new focus date and time.
- * @param aViewId The view id of the currently active view.
*/
- void setFocusDateL( const QDateTime& focusDateTime,
- const int& viewId );
+ void setFocusDate( const QDateTime& focusDateTime );
/**
* Sets the id of the instance currently focused.
* @param aInstanceId the id of the focused instance.
- * @param aViewId The view id of the currently active view.
*/
- void setInstanceIdL( const TCalenInstanceId& instanceId,
- const int& viewId );
+ void setInstanceId( const TCalenInstanceId& instanceId );
/**
* Sets the time and instance currently focused.
* @param aFocusTime The new focus time. If no time is focused, set
* the Utc time of this object to be Time::NullTTime.
* @param aInstanceId the id of the focused instance.
- * @param aViewId The view id of the currently active view.
*/
- void setFocusDateAndTimeAndInstanceL( const QDateTime& focusDateTime,
- const TCalenInstanceId& aInstanceId,
- const int& viewId );
+ void setFocusDateAndTimeAndInstance( const QDateTime& focusDateTime,
+ const TCalenInstanceId& aInstanceId);
// Getters
/**
@@ -113,7 +105,7 @@
* @return The currently focused date and time. When no time is
* focused, the default time on the current date will be returned.
*/
- QDateTime focusDateAndTimeL() const;
+ QDateTime focusDateAndTime() const;
/**
* Gets the time currently focused.
@@ -129,12 +121,6 @@
*/
TCalenInstanceId instanceId() const;
- /**
- * Gets the id of the currently active view.
- * @return The view id of the currently active view.
- */
- int viewId() const;
-
public: // Multiple Context support
--- a/calendarui/globaldata/src/calencontextimpl.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/globaldata/src/calencontextimpl.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -72,8 +72,12 @@
// ----------------------------------------------------------------------------
//
EXPORT_C CalenContextImpl::~CalenContextImpl()
- {
- }
+ {
+ if(mMutlipleContextIds.count())
+ {
+ mMutlipleContextIds.clear();
+ }
+ }
// ----------------------------------------------------------------------------
// CalenContextImpl::DefaultTimeForViews
@@ -111,23 +115,21 @@
// (other items were commented in a header).
// ----------------------------------------------------------------------------
//
-void CalenContextImpl::setFocusDateAndTimeL( const QDateTime& focusDateTime,
- const int& viewId )
+void CalenContextImpl::setFocusDateAndTime( const QDateTime& focusDateTime)
{
+ mFocusDate = focusDateTime;
+ mFocusTime = focusDateTime.time().minute() + 1;
+
+ if( mFocusTime < 0 )
+ mFocusTime = 0;
+ mInstanceId = TCalenInstanceId::nullInstanceId();
+
// If this fails you're using a context that was constructed yourself.
// Use the accessor from the global data instead, or don't try to set
// anything on this context.
- ASSERT( mObserver );
-
- mFocusDate = focusDateTime;
- mFocusTime = focusDateTime.time().minute() + 1;
-
- ASSERT( mFocusTime >= 0 );
- mInstanceId = TCalenInstanceId::nullInstanceId();
- mViewId = viewId;
-
- mObserver->ContextChanged();
+ if(mObserver)
+ mObserver->ContextChanged();
}
// ----------------------------------------------------------------------------
@@ -136,20 +138,17 @@
// (other items were commented in a header).
// ----------------------------------------------------------------------------
//
-void CalenContextImpl::setFocusDateL( const QDateTime& focusDateTime,
- const int& viewId )
+void CalenContextImpl::setFocusDate( const QDateTime& focusDateTime)
{
+ mFocusDate = focusDateTime;
+ mFocusTime = -1;
+ mInstanceId = TCalenInstanceId::nullInstanceId();
+
// If this fails you're using a context that was constructed yourself.
// Use the accessor from the global data instead, or don't try to set
// anything on this context.
- ASSERT( mObserver );
-
- mFocusDate = focusDateTime;
- mFocusTime = -1;
- mInstanceId = TCalenInstanceId::nullInstanceId();
- mViewId = viewId;
-
- mObserver->ContextChanged();
+ if(mObserver)
+ mObserver->ContextChanged();
}
// ----------------------------------------------------------------------------
@@ -158,22 +157,19 @@
// (other items were commented in a header).
// ----------------------------------------------------------------------------
//
-void CalenContextImpl::setInstanceIdL( const TCalenInstanceId& aInstanceId,
- const int& viewId )
+void CalenContextImpl::setInstanceId( const TCalenInstanceId& aInstanceId )
{
+ // Set the null date and time
+ mFocusDate = QDateTime();
+ mFocusTime = -1;
+ mInstanceId = aInstanceId;
+
// If this fails you're using a context that was constructed yourself.
// Use the accessor from the global data instead, or don't try to set
// anything on this context.
- ASSERT( mObserver );
-
- // Set the null date and time
- mFocusDate = QDateTime();
- mFocusTime = -1;
- mInstanceId = aInstanceId;
- mViewId = viewId;
-
- mObserver->ContextChanged();
+ if(mObserver)
+ mObserver->ContextChanged();
}
// -----------------------------------------------------------------------------
@@ -182,23 +178,20 @@
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
-void CalenContextImpl::setFocusDateAndTimeAndInstanceL( const QDateTime& focusDateTime,
- const TCalenInstanceId& instanceId,
- const int& viewId )
+void CalenContextImpl::setFocusDateAndTimeAndInstance( const QDateTime& focusDateTime,
+ const TCalenInstanceId& instanceId )
{
+ mFocusDate = focusDateTime;
+ mFocusTime = focusDateTime.time().minute() + 1;
+ if( mFocusTime < 0 )
+ mFocusTime = 0;
+ mInstanceId = instanceId;
// If this fails you're using a context that was constructed yourself.
// Use the accessor from the global data instead, or don't try to set
// anything on this context.
- ASSERT( mObserver );
-
- mFocusDate = focusDateTime;
- mFocusTime = focusDateTime.time().minute() + 1;
- ASSERT( mFocusTime >= 0 );
- mInstanceId = instanceId;
- mViewId = viewId;
-
- mObserver->ContextChanged();
+ if(mObserver)
+ mObserver->ContextChanged();
}
// -----------------------------------------------------------------------------
@@ -207,7 +200,7 @@
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
-QDateTime CalenContextImpl::focusDateAndTimeL() const
+QDateTime CalenContextImpl::focusDateAndTime() const
{
QDateTime ret;
@@ -250,19 +243,6 @@
}
// -----------------------------------------------------------------------------
-// CalenContextImpl::ViewId
-// Returns the view id
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-int CalenContextImpl::viewId() const
- {
- TRACE_ENTRY_POINT;
- TRACE_EXIT_POINT;
- return mViewId;
- }
-
-// -----------------------------------------------------------------------------
// CalenContextImpl::SetMutlipleContextIds
// Set multiple context ids
// (other items were commented in a header).
--- a/calendarui/inc/CalenUid.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/inc/CalenUid.h Tue Jul 06 14:14:56 2010 +0300
@@ -24,7 +24,7 @@
// UIDS of the S60 Calendar native views
const TInt KCalenMonthViewUidValue = 0x00000000 ;
-const TInt KCalenDayViewUidValue = 0x00000002;
+const TInt KCalenAgendaViewUidValue = 0x00000002;
const TInt KCalenEventViewUidValue = 0x00000003;
const TInt KCalenLandscapeDayViewUidValue = 0x00000004;
const TInt KCalenTodoEditorViewUidValue = 0x00000005;
@@ -32,7 +32,7 @@
const TUid KUidCalenMonthView = { KCalenMonthViewUidValue };
-const TUid KUidCalenDayView = { KCalenDayViewUidValue };
+const TUid KUidCalenAgendaView = { KCalenAgendaViewUidValue };
const TUid KCalenTodoEditorView = { KCalenTodoEditorViewUidValue };
const TUid KUidCalenEventView = { KCalenEventViewUidValue };
const TUid KUidCalenLandscapeDayView = { KCalenLandscapeDayViewUidValue };
--- a/calendarui/inc/calenagendautils.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/inc/calenagendautils.h Tue Jul 06 14:14:56 2010 +0300
@@ -43,12 +43,6 @@
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
@@ -56,7 +50,7 @@
* @returns ETrue, if entry ends at starting midnight of day, but starts before that
* EFalse, otherwise
**/
- static bool endsAtStartOfDayL( AgendaEntry& entry,
+ static bool endsAtStartOfDay( AgendaEntry& entry,
const QDateTime& day );
};
--- a/calendarui/inc/calencommandhandler.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/inc/calencommandhandler.h Tue Jul 06 14:14:56 2010 +0300
@@ -39,7 +39,6 @@
int iCommand;
QDateTime iFocusDateAndTime;
TCalenInstanceId iInstanceId;
- int iViewId;
};
inline TCalenCommand::TCalenCommand()
@@ -50,9 +49,8 @@
MCalenContext& aContext)
{
iCommand = aCommand;
- iFocusDateAndTime = aContext.focusDateAndTimeL();
+ iFocusDateAndTime = aContext.focusDateAndTime();
iInstanceId = aContext.instanceId();
- iViewId = aContext.viewId();
}
inline TInt TCalenCommand::Command() const
@@ -62,9 +60,8 @@
inline void TCalenCommand::GetContextL( MCalenContext& aContext ) const
{
- aContext.setFocusDateAndTimeAndInstanceL( iFocusDateAndTime,
- iInstanceId,
- iViewId );
+ aContext.setFocusDateAndTimeAndInstance( iFocusDateAndTime,
+ iInstanceId );
}
--- a/calendarui/inc/calencommon.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/inc/calencommon.h Tue Jul 06 14:14:56 2010 +0300
@@ -19,16 +19,17 @@
#ifndef CALENCOMMON_H
#define CALENCOMMON_H
-#define CALEN_DAYVIEW_XML_FILE ":/xml/calendayview.docml"
-#define CALEN_DAYVIEW "dayView"
-#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_SETTINGS "settingsAction"
+#define CALEN_AGENDAVIEW_XML_FILE ":/xml/calenagendaview.docml"
+#define CALEN_AGENDAVIEW "agendaView"
+#define CALEN_AGENDAVIEW_WIDGET "agendaViewWidget"
+#define CALEN_AGENDAVIEW_LISTWIDGET "eventsList"
+#define CALEN_AGENDAVIEW_HEADING "headingWidget"
+#define CALEN_AGENDAVIEW_HEADING_REGIONALPLUGIN_WIDGET "headingRegionalPluginWidget"
+#define CALEN_AGENDAVIEW_MENU_NEW_EVENT "newEventAction"
+#define CALEN_AGENDAVIEW_MENU_GO_TO_TODAY "todayAction"
+#define CALEN_AGENDAVIEW_MENU_GO_TO_DATE "goToDateAction"
+#define CALEN_AGENDAVIEW_MENU_SWITCH_TO_DAYVIEW "switchToDayViewAction"
+#define CALEN_AGENDAVIEW_MENU_SETTINGS "settingsAction"
#define CALEN_PORTRAIT "portrait"
#define CALEN_LANDSCAPE "landscape"
#define CALEN_MONTHVIEW_XML_FILE ":/xml/calenmonthview.docml"
--- a/calendarui/inc/calendateutils.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/inc/calendateutils.h Tue Jul 06 14:14:56 2010 +0300
@@ -62,12 +62,6 @@
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
@@ -125,8 +119,6 @@
*/
static QDateTime defaultTime( const QDateTime& date );
- static QDateTime pastOf(const QDateTime& dateTime, int numOfDays);
-
static QDateTime futureOf(const QDateTime& dateTime, int numOfDays);
--- a/calendarui/inc/hb_calencommands.hrh Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/inc/hb_calencommands.hrh Tue Jul 06 14:14:56 2010 +0300
@@ -38,8 +38,8 @@
{
ECalenMonthView = ECalenViewCommandBase,
ECalenWeekView,
+ ECalenAgendaView,
ECalenDayView,
- ECalenLandscapeDayView,
ECalenTodoEditor,
ECalenTodoEditorDone,
ECalenForwardsToDayView,
--- a/calendarui/regionalplugins/calenregionalutil/src/calenextrarowformatter.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/regionalplugins/calenregionalutil/src/calenextrarowformatter.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -24,6 +24,9 @@
#include "calendarui_debug.h"
#include "CalenExtraRowFormatter.h"
+// Constants
+const TInt KZero( 0 );
+
// -----------------------------------------------------------------------------
// CollapseDuplicatesL
// -----------------------------------------------------------------------------
@@ -33,7 +36,7 @@
TRACE_ENTRY_POINT;
const TInt sublen = aSub.Length();
- if (aStr.Length() == 0 || sublen == 0)
+ if (aStr.Length() == KZero || sublen == KZero || aPos < KZero || (aPos >aStr.Length()))
{
return;
}
@@ -41,14 +44,14 @@
TPtrC remaining = aStr.Mid( aPos );
TInt fstInRemaining = remaining.Find( aSub );
- if ( fstInRemaining >= 0 )
+ if ( fstInRemaining >= KZero )
{
TInt restPos = fstInRemaining + sublen;
TPtrC rest = remaining.Mid( restPos );
TInt sndInRest = rest.Find( aSub );
// 1) two substrings found in sequence
- if (sndInRest == 0)
+ if (sndInRest == KZero)
{
// replace second substring with empty string
TInt fst = aPos + fstInRemaining;
@@ -58,7 +61,7 @@
CollapseDuplicatesL( aStr, fst, aSub );
}
// 2) substring found later in string
- else if (sndInRest > 0)
+ else if (sndInRest > KZero)
{
// continue collapsing from this second substring
TInt snd = aPos + restPos + sndInRest;
@@ -89,15 +92,15 @@
// Trailing
const TInt sublen = aSub.Length();
- if ( aStr.Right( sublen ).Find( aSub ) == 0 )
+ if ( aStr.Right( sublen ).Find( aSub ) == KZero )
{
aStr.Replace( aStr.Length() - sublen, sublen, KNullDesC );
}
// Leading
- if ( aStr.Left( sublen ).Find( aSub ) == 0 )
+ if ( aStr.Left( sublen ).Find( aSub ) == KZero )
{
- aStr.Replace( 0, sublen, KNullDesC );
+ aStr.Replace( KZero, sublen, KNullDesC );
}
TRACE_EXIT_POINT;
@@ -162,7 +165,7 @@
TRACE_ENTRY_POINT;
- if ( aPrioritizedFields.Count() == 0)
+ if ( aPrioritizedFields.Count() == KZero)
{
iText = KNullDesC;
@@ -182,7 +185,7 @@
// ASSERT that all prioritized fields can be found from subLabels
for ( TInt i=0; i < aPrioritizedFields.Count(); i++)
{
- ASSERT( subLabels.Find( aPrioritizedFields[i] ) >= 0 );
+ ASSERT( subLabels.Find( aPrioritizedFields[i] ) >= KZero );
}
// Initialize substring array
--- a/calendarui/regionalplugins/calenregionalutil/src/calenlunarinfo.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/regionalplugins/calenregionalutil/src/calenlunarinfo.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -24,7 +24,7 @@
// TCalenLunarInfo::HasFestival
// -----------------------------------------------------------------------------
//
-TBool TCalenLunarInfo::HasFestival()
+EXPORT_C TBool TCalenLunarInfo::HasFestival()
{
TRACE_ENTRY_POINT;
@@ -36,7 +36,7 @@
// TCalenLunarInfo::HasSolarTerm
// -----------------------------------------------------------------------------
//
-TBool TCalenLunarInfo::HasSolarTerm()
+EXPORT_C TBool TCalenLunarInfo::HasSolarTerm()
{
TRACE_ENTRY_POINT;
--- a/calendarui/regionalplugins/calenregionalutil/src/calensolarterms.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/regionalplugins/calenregionalutil/src/calensolarterms.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -47,7 +47,7 @@
//
// ---------------------------------------------------------------------------
//
-CCalenSolarTerms* CCalenSolarTerms::NewL(RFs& aFs)
+EXPORT_C CCalenSolarTerms* CCalenSolarTerms::NewL(RFs& aFs)
{
TRACE_ENTRY_POINT;
@@ -65,7 +65,7 @@
//
// ---------------------------------------------------------------------------
//
-CCalenSolarTerms::~CCalenSolarTerms()
+EXPORT_C CCalenSolarTerms::~CCalenSolarTerms()
{
TRACE_ENTRY_POINT;
TRACE_EXIT_POINT;
@@ -76,7 +76,7 @@
//
// ---------------------------------------------------------------------------
//
-TInt CCalenSolarTerms::CheckSolarTermDateL( const TDateTime& aDate )
+EXPORT_C TInt CCalenSolarTerms::CheckSolarTermDateL( const TDateTime& aDate )
{
TRACE_ENTRY_POINT;
@@ -180,12 +180,11 @@
if (iCachedYear != year)
{
RFile file;
- RFs& fs = iFs;
- TFindFile ffile(fs);
+ TFindFile ffile(iFs);
User::LeaveIfError(ffile.FindByDir(KSolarTermsFile, KSolarTermsPath));
// User::LeaveIfError(ffile.FindByPath(KSolarTermsFile, KSolarTermsPath));
- User::LeaveIfError(file.Open(fs,
+ User::LeaveIfError(file.Open(iFs,
ffile.File(), EFileRead));
CleanupClosePushL(file);
--- a/calendarui/regionalplugins/lunarchinese/inc/CalenLunarChinesePlugin.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/regionalplugins/lunarchinese/inc/CalenLunarChinesePlugin.h Tue Jul 06 14:14:56 2010 +0300
@@ -34,7 +34,7 @@
//FORWARD DECLARE
class QString;
-class QTranslator;
+class HbTranslator;
class HbWidget;
class HbMenu;
@@ -112,7 +112,7 @@
HBufC* iInfoBarText;
TInt iStart;
TInt iEnd;
- QTranslator* iTranslator;
+ HbTranslator* iTranslator;
};
#endif //__CALENLUNARCHINESEPLUGIN_H__
--- a/calendarui/regionalplugins/lunarchinese/lunarchinese.pro Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/regionalplugins/lunarchinese/lunarchinese.pro Tue Jul 06 14:14:56 2010 +0300
@@ -88,6 +88,7 @@
MMP_RULES -= "OPTION_REPLACE ARMCC --export_all_vtbl -D__QT_NOEFFECTMACRO_DONOTUSE"
}
-
+# TODO: uncomment below line once ts file is released to platform
+#TRANSLATIONS += calenregional.ts
# End of file --Don't remove this.
\ No newline at end of file
--- a/calendarui/regionalplugins/lunarchinese/src/CalenLunarChinesePlugin.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/regionalplugins/lunarchinese/src/CalenLunarChinesePlugin.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -18,13 +18,12 @@
#include <QString>
#include <QStringList>
-#include <QTranslator>
#include <HbAction>
#include <HbView>
#include <HbMenu>
#include <HbMessageBox>
#include <HbLabel>
-#include <HbApplication>
+#include <HbTranslator>
#include <eikenv.h>
#include <data_caging_path_literals.hrh>
@@ -102,11 +101,13 @@
}
delete iInfoProvider;
+ iInfoProvider = NULL;
delete iLocalizer;
+ iLocalizer = NULL;
delete iLocInfo;
+ iLocInfo = NULL;
// Remove the translator for plugin
- HbApplication::instance()->removeTranslator(iTranslator);
if (iTranslator) {
delete iTranslator;
iTranslator = 0;
@@ -125,13 +126,7 @@
iServices->GetCommandRange( iStart, iEnd );
// Install the translator before the CCalenLunarLocalizer is constructed
- iTranslator = new QTranslator;
- QString lang = QLocale::system().name();
- QString path = "Z:/resource/qt/translations/";
- bool loaded = iTranslator->load("calenregional_en_GB", ":/translations");
- // TODO: Load the appropriate .qm file based on locale
- //bool loaded = iTranslator->load("calenregional_" + lang, path);
- HbApplication::instance()->installTranslator(iTranslator);
+ iTranslator = new HbTranslator("calenregional");
iLocalizer = CCalenLunarLocalizer::NewL();
@@ -269,7 +264,7 @@
void CCalenLunarChinesePlugin::UpdateLocalizerInfoL()
{
TRACE_ENTRY_POINT;
- QDateTime focusDateTime= iServices->Context().focusDateAndTimeL();
+ QDateTime focusDateTime= iServices->Context().focusDateAndTime();
TDateTime tempDateTime(
focusDateTime.date().year(),
static_cast<TMonth>(focusDateTime.date().month() - 1),
--- a/calendarui/settings/inc/calensettings.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/settings/inc/calensettings.h Tue Jul 06 14:14:56 2010 +0300
@@ -19,6 +19,7 @@
#define CALENSETTINGS_H
#include <QObject>
+#include <QHash>
class QPersistentModelIndex;
class QModelIndex;
@@ -75,13 +76,11 @@
HbDataFormModelItem* mShowRegionalInfoItem;
HbDataFormModelItem* mShowWeekStartOnInfoItem;
HbComboBox* mStartOfWeekItem;
+ QHash<int, int> mAlarmSnoozeTimeHash;
XQSettingsManager *mSettingsManager;
XQSettingsKey *mAlarmSnoozeCenrepKey;
XQSettingsKey *mWeekNumberCenrepKey;
XQSettingsKey *mShowRegionalInfoKey;
- uint mAlarmSnoozeTime;
- uint mShowWeekNumber;
- uint mShowRegionalInfo;
int mStartOfWeek;
bool mWeekNumberItemAdded;
bool mRegionalpluginActive;
--- a/calendarui/settings/src/calensettings.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/settings/src/calensettings.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -29,17 +29,25 @@
#include "calenservices.h"
#include "calendarprivatecrkeys.h"
+// Constants
+const int KValueZero( 0 );
+const int KValueOne( 1 );
+
+
CalenSettings::CalenSettings(MCalenServices& services, HbDataForm *form, QObject *parent)
:QObject(parent),
mServices(services),
mSettingsForm(form),
- mSettingsModel(0),
+ mSettingsModel(NULL),
+ mAlarmSnoozeTimeItem(NULL),
+ mShowWeekNumberItem(NULL),
mShowRegionalInfoItem(NULL),
mShowWeekStartOnInfoItem(NULL),
+ mStartOfWeekItem(NULL),
mWeekNumberItemAdded(false),
mRegionalpluginActive(false)
{
- mSettingsManager = new XQSettingsManager(this);
+ mSettingsManager = new XQSettingsManager(this);
mAlarmSnoozeCenrepKey = new XQSettingsKey(
XQSettingsKey::TargetCentralRepository,
KCRUidCalendar, KCalendarSnoozeTime);
@@ -49,23 +57,33 @@
mShowRegionalInfoKey = new XQSettingsKey(
XQSettingsKey::TargetCentralRepository,
KCRUidCalendar, KCalendarShowRegionalInfo);
-
- // Read the initial values from the cenrep
- QVariant value = mSettingsManager->readItemValue(*mAlarmSnoozeCenrepKey);
- mAlarmSnoozeTime = value.toUInt();
-
- value = mSettingsManager->readItemValue(*mWeekNumberCenrepKey);
- mShowWeekNumber = value.toUInt();
-
- value = mSettingsManager->readItemValue(*mShowRegionalInfoKey);
- mShowRegionalInfo = value.toUInt();
}
+/*!
+ Destructor
+ */
CalenSettings::~CalenSettings()
{
- // Nothing yet.
+ if (mSettingsManager) {
+ delete mSettingsManager;
+ }
+ // Delete the cenrep keys
+ delete mAlarmSnoozeCenrepKey;
+ delete mWeekNumberCenrepKey;
+ delete mShowRegionalInfoKey;
+
+ if (mSettingsModel) {
+ delete mSettingsModel;
+ }
+ if (mAlarmSnoozeTimeHash.count()) {
+ // Clear the contents
+ mAlarmSnoozeTimeHash.clear();
+ }
}
+/*!
+ Creates the settings model
+ */
void CalenSettings::createModel()
{
// Remove the model.
@@ -76,24 +94,30 @@
}
// Create a model and set it.
- mSettingsModel = new HbDataFormModel();
+ mSettingsModel = new HbDataFormModel(mSettingsForm);
// Create the alarm snooze choices
QStringList alarmSnoozeChoices;
alarmSnoozeChoices << hbTrId(
- "txt_calendar_setlabel_alarm_snooze_time_val_5_minu")
- << hbTrId("txt_calendar_setlabel_alarm_snooze_time_val_10_min")
- << hbTrId("txt_calendar_setlabel_alarm_snooze_time_val_15_min")
- << hbTrId("txt_calendar_setlabel_alarm_snooze_time_val_30_min");
+ "txt_calendar_setlabel_reminder_snooze_time_val_5_m")
+ << hbTrId("txt_calendar_setlabel_reminder_snooze_time_val_10")
+ << hbTrId("txt_calendar_setlabel_reminder_snooze_time_val_15")
+ << hbTrId("txt_calendar_setlabel_reminder_snooze_time_val_30");
+ // Build the hash map for the alarm snooze time.
+ // The values are five, ten, fifteen and thirty minutes
+ mAlarmSnoozeTimeHash[0] = 5;
+ mAlarmSnoozeTimeHash[1] = 10;
+ mAlarmSnoozeTimeHash[2] = 15;
+ mAlarmSnoozeTimeHash[3] = 30;
// Append Alarm Snooze Time Setting item
mAlarmSnoozeTimeItem = new HbDataFormModelItem();
mAlarmSnoozeTimeItem->setType(HbDataFormModelItem::ComboBoxItem);
mAlarmSnoozeTimeItem->setData(HbDataFormModelItem::LabelRole,
- QString(hbTrId("txt_calendar_setlabel_alarm_snooze_time")));
+ QString(hbTrId("txt_calendar_setlabel_reminder_snooze_time")));
mAlarmSnoozeTimeItem->setContentWidgetData(QString("items"),
- alarmSnoozeChoices);
+ alarmSnoozeChoices);
mAlarmSnoozeTimeItem->setContentWidgetData(QString("currentIndex"), 0);
mSettingsForm->addConnection(mAlarmSnoozeTimeItem,
SIGNAL(currentIndexChanged(int)),
@@ -103,309 +127,256 @@
// Create the weekday list based on start of week.
QStringList weekdaysList;
weekdaysList
- << QString("Monday")//hbTrId("txt_clk_setlabel_val_monday")//@TODO set to proper localization strings once available
- << QString("Tuesday")//hbTrId("txt_clk_setlabel_val_tuesday")
- << QString("Wednesday")//hbTrId("txt_clk_setlabel_val_wednesday")
- << QString("Thursday")//hbTrId("txt_clk_setlabel_val_thursday")
- << QString("Friday")//hbTrId("txt_clk_setlabel_val_friday")
- << QString("Saturday")//hbTrId("txt_clk_setlabel_val_saturday")
- << QString("Sunday");//hbTrId("txt_clk_setlabel_val_sunday");
+ << hbTrId("txt_calendar_setlabel_week_starts_on_val_monday")
+ << hbTrId("txt_calendar_setlabel_week_starts_on_val_tuesday")
+ << hbTrId("txt_calendar_setlabel_week_starts_on_val_wednesday")
+ << hbTrId("txt_calendar_setlabel_week_starts_on_val_thursday")
+ << hbTrId("txt_calendar_setlabel_week_starts_on_val_friday")
+ << hbTrId("txt_calendar_setlabel_week_starts_on_val_saturday")
+ << hbTrId("txt_calendar_setlabel_week_starts_on_val_sunday");
// Start of week item.
- mShowWeekStartOnInfoItem = mSettingsModel->appendDataFormItem(HbDataFormModelItem::ComboBoxItem,QString("Week Starts On"));
- // hbTrId("txt_clock_setlabel_week_starts_on"));//@TODO set to proper localization strings once available
+ mShowWeekStartOnInfoItem = mSettingsModel->appendDataFormItem(
+ HbDataFormModelItem::ComboBoxItem,
+ hbTrId("txt_calendar_setlabel_week_starts_on"));
+
// Get start of week from the locale.
HbExtendedLocale locale = HbExtendedLocale::system();
mStartOfWeek = locale.startOfWeek();
mShowWeekStartOnInfoItem->setContentWidgetData("items", weekdaysList);
mShowWeekStartOnInfoItem->setContentWidgetData("currentIndex", mStartOfWeek);
- mSettingsForm->addConnection(mShowWeekStartOnInfoItem, SIGNAL(currentIndexChanged(int)),
- this, SLOT(setStartDayOfWeek(int)));
- //add show week number item in the model
+ mSettingsForm->addConnection(mShowWeekStartOnInfoItem,
+ SIGNAL(currentIndexChanged(int)),
+ this, SLOT(setStartDayOfWeek(int)));
+ // Add the show week number item in the model
+ addWeekNumberItem();
- addWeekNumberItem();
- mSettingsModel->appendDataFormItem(mShowWeekNumberItem);
-
- if(isPluginEnabled()) {
+ if (isPluginEnabled()) {
addRegionalInfoItem();
}
}
-
+
+/*!
+ Adds the regional info item to the model
+ */
void CalenSettings::addRegionalInfoItem()
{
mRegionalpluginActive = true;
- // Regional info is the second item in the model
- int index = mSettingsModel->indexFromItem(mAlarmSnoozeTimeItem).row() + 1;
-
- mShowRegionalInfoItem = mSettingsModel->insertDataFormItem(
- index ,
- HbDataFormModelItem::ToggleValueItem,
- QString(hbTrId("txt_calendar_setlabel_show_lunar_calendar")),
- mSettingsModel->invisibleRootItem());
+ mShowRegionalInfoItem = new HbDataFormModelItem();
+ mShowRegionalInfoItem->setType(HbDataFormModelItem::ToggleValueItem);
+ mShowRegionalInfoItem->setData(HbDataFormModelItem::LabelRole,
+ QString(hbTrId("txt_calendar_setlabel_show_lunar_calendar")));
// For HbPushButton type properties -- to be used for toggle value item
mShowRegionalInfoItem->setContentWidgetData(QString("text"),
- QString(hbTrId("txt_calendar_button_no")));
+ QString(hbTrId("txt_calendar_button_no")));
mShowRegionalInfoItem->setContentWidgetData(QString("additionalText"),
- QString(hbTrId("txt_calendar_button_yes")));
+ QString(hbTrId("txt_calendar_button_yes")));
mSettingsForm->addConnection(mShowRegionalInfoItem, SIGNAL(clicked()),
- this, SLOT(handleRegionalInfoChange()));
-
+ this, SLOT(handleRegionalInfoChange()));
+ mSettingsModel->appendDataFormItem(mShowRegionalInfoItem);
}
+/*!
+ Removes the regional info item from the model
+ */
void CalenSettings::removeRegionalInfoItem()
{
mSettingsForm->removeConnection(mShowRegionalInfoItem, SIGNAL(clicked()),
this, SLOT(handleRegionalInfoChange()));
- mSettingsModel->removeItem(mShowRegionalInfoItem);
- mRegionalpluginActive = false;
+ mSettingsModel->removeItem(mShowRegionalInfoItem);
+ mRegionalpluginActive = false;
}
+/*!
+ Handles the alarm snooze time change
+ */
void CalenSettings::handleAlarmSnoozeTimeChange(int index)
{
-switch(index)
- {
- case 0:
- {
- mSettingsManager->writeItemValue(*mAlarmSnoozeCenrepKey, 5);
- }
- break;
- case 1:
- {
- mSettingsManager->writeItemValue(*mAlarmSnoozeCenrepKey, 10);
- }
- break;
- case 2:
- {
- mSettingsManager->writeItemValue(*mAlarmSnoozeCenrepKey, 15);
- }
- break;
- case 3:
- {
- mSettingsManager->writeItemValue(*mAlarmSnoozeCenrepKey, 30);
- }
- break;
- default:
- break;
- }
- QVariant value = mSettingsManager->readItemValue(*mAlarmSnoozeCenrepKey);
- uint time = value.toUInt();
+ if(mAlarmSnoozeTimeHash.value(index) > KValueZero) {
+ mSettingsManager->writeItemValue(*mAlarmSnoozeCenrepKey, mAlarmSnoozeTimeHash[index]);
+ }
}
+/*!
+ Handles the week number change
+ */
void CalenSettings::handleWeekNumberChange()
{
QVariant data = mShowWeekNumberItem->contentWidgetData(QString("text"));
QString value = data.toString();
- if(!value.compare(hbTrId("txt_calendar_button_no")))
- {
+ if (!value.compare(hbTrId("txt_calendar_button_no"))) {
// User has made it OFF.
- mShowWeekNumber = 0;
- mSettingsManager->writeItemValue(*mWeekNumberCenrepKey, 0);
+ mSettingsManager->writeItemValue(*mWeekNumberCenrepKey, KValueZero);
+ } else if (!value.compare(hbTrId("txt_calendar_button_yes"))) {
+ // User has made it ON.
+ mSettingsManager->writeItemValue(*mWeekNumberCenrepKey, KValueOne);
}
- else if(!value.compare(hbTrId("txt_calendar_button_yes")))
- {
+}
+
+/*!
+ Handles the regional info option change
+ */
+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
+ mSettingsManager->writeItemValue(*mShowRegionalInfoKey, KValueZero);
+ } else if (!value.compare(hbTrId("txt_calendar_button_yes"))) {
// User has made it ON.
- mShowWeekNumber = 1;
- mSettingsManager->writeItemValue(*mWeekNumberCenrepKey, 1);
+ mSettingsManager->writeItemValue(*mShowRegionalInfoKey, KValueOne);
}
}
-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);
- }
-}
-
+/*!
+ Populates the settings model
+ */
void CalenSettings::populateSettingList()
{
- // Read the values from cenrep
- // Read the initial values from the cenrep
- QVariant value = mSettingsManager->readItemValue(*mAlarmSnoozeCenrepKey);
- mAlarmSnoozeTime = value.toUInt();
-
- value = mSettingsManager->readItemValue(*mWeekNumberCenrepKey);
- mShowWeekNumber = value.toUInt();
-
- // set the value to the form
- int choiceIndex = 0;
- switch(mAlarmSnoozeTime)
- {
- case 5:
- choiceIndex = 0;
- break;
- case 10:
- choiceIndex = 1;
- break;
- case 15:
- choiceIndex = 2;
- break;
- case 30:
- choiceIndex = 3;
- break;
- default:
- choiceIndex = 0;
- break;
- }
- mAlarmSnoozeTimeItem->setContentWidgetData(QString("currentIndex"),
- choiceIndex);
-
+ // Read the values from cenrep
+ // Read the initial values from the cenrep
+ QVariant value = mSettingsManager->readItemValue(*mAlarmSnoozeCenrepKey);
+ uint alarmSnoozeTime = value.toUInt();
+
+ // Get the value from the hash and set the value to the form
+ int choiceIndex = mAlarmSnoozeTimeHash.key(alarmSnoozeTime);
+ mAlarmSnoozeTimeItem->setContentWidgetData(QString("currentIndex"),
+ choiceIndex);
// Get start of week from the locale.
- HbExtendedLocale locale = HbExtendedLocale::system();
- mStartOfWeek = locale.startOfWeek();
-
-
- mShowWeekStartOnInfoItem->setContentWidgetData("currentIndex", mStartOfWeek);
- //update the show week number option
- updateShowWeekItem();
- // Check the the regional info plugin is loaded now or not
- if(isPluginEnabled()) {
- // If the plugin was already there just populate the item
- // else add the regional info item and then populate
- if(mRegionalpluginActive) {
- populateRegionalInfo();
- }else {
- addRegionalInfoItem();
- populateRegionalInfo();
- }
- }else {
- // If the plugin is removed now and if it was loaded before
- // remove the item
- if(mRegionalpluginActive) {
- removeRegionalInfoItem();
- }
- }
- mSettingsForm->setModel(mSettingsModel);
+ HbExtendedLocale locale = HbExtendedLocale::system();
+ mStartOfWeek = locale.startOfWeek();
+
+ mShowWeekStartOnInfoItem->setContentWidgetData("currentIndex", mStartOfWeek);
+ //update the show week number option
+ updateShowWeekItem();
+ // Check the the regional info plugin is loaded now or not
+ if (isPluginEnabled()) {
+ // If the plugin was already there just populate the item
+ // else add the regional info item and then populate
+ if (mRegionalpluginActive) {
+ populateRegionalInfo();
+ }else {
+ addRegionalInfoItem();
+ populateRegionalInfo();
+ }
+ }else {
+ // If the plugin is removed now and if it was loaded before
+ // remove the item
+ if (mRegionalpluginActive) {
+ removeRegionalInfoItem();
+ }
+ }
+ mSettingsForm->setModel(mSettingsModel);
}
+/*!
+ Populates the regional info item
+ */
void CalenSettings::populateRegionalInfo()
{
- QVariant 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")));
- }
-
-}
+ QVariant value = mSettingsManager->readItemValue(*mShowRegionalInfoKey);
+ uint showRegionalInfo = value.toUInt();
-void CalenSettings::addWeekNumberItem()
-{
- mWeekNumberItemAdded = true;
- // Append Show Week Number settings item
- mShowWeekNumberItem = new HbDataFormModelItem();
- mShowWeekNumberItem->setType(HbDataFormModelItem::ToggleValueItem);
- QStringList values;
- values << hbTrId("txt_calendar_button_no")
- << hbTrId("txt_calendar_button_yes");
- mShowWeekNumberItem->setData(HbDataFormModelItem::LabelRole,
- QString(hbTrId("txt_calendar_setlabel_show_week_numbers")));
-
-
- // For HbPushButton type properties -- to be used for toggle value item
- if(mShowWeekNumber)
- {
- mShowWeekNumberItem->setContentWidgetData(QString("text"),
- QString(hbTrId("txt_calendar_button_yes")));
- mShowWeekNumberItem->setContentWidgetData(QString("additionalText"),
- QString(hbTrId("txt_calendar_button_no")));
- }
- else
- {
- mShowWeekNumberItem->setContentWidgetData(QString("text"),
- QString(hbTrId("txt_calendar_button_no")));
- mShowWeekNumberItem->setContentWidgetData(QString("additionalText"),
- QString(hbTrId("txt_calendar_button_yes")));
- }
-
- mSettingsForm->addConnection(mShowWeekNumberItem, SIGNAL(clicked()),
- this, SLOT(handleWeekNumberChange()));
+ if (showRegionalInfo) {
+ 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")));
+ }
}
/*!
- Returns true if plugin is loaded
+ Adds the week number item in the model
+ */
+void CalenSettings::addWeekNumberItem()
+{
+ mWeekNumberItemAdded = true;
+ // Append Show Week Number settings item
+ mShowWeekNumberItem = new HbDataFormModelItem();
+ mShowWeekNumberItem->setType(HbDataFormModelItem::ToggleValueItem);
+
+ QStringList values;
+ values << hbTrId("txt_calendar_button_no")
+ << hbTrId("txt_calendar_button_yes");
+ mShowWeekNumberItem->setData(HbDataFormModelItem::LabelRole,
+ QString(hbTrId("txt_calendar_setlabel_show_week_numbers")));
+
+ mSettingsModel->appendDataFormItem(mShowWeekNumberItem);
+ mSettingsForm->addConnection(mShowWeekNumberItem, SIGNAL(clicked()),
+ this, SLOT(handleWeekNumberChange()));
+}
+
+/*!
+ Returns true if the regional plugin is loaded
*/
bool CalenSettings::isPluginEnabled()
{
- QString *pluginInfo = mServices.InfobarTextL();
- if (!pluginInfo) {
- return false;
- } else {
- return true;
- }
+ QString *pluginInfo = mServices.InfobarTextL();
+ if (!pluginInfo) {
+ return false;
+ } else {
+ return true;
+ }
}
-// ---------------------------------------------------------
-// CalenSettings::setStartDayOfWeek
-// sets the start day of the week to the locale
-// calls when user select week day
-// ---------------------------------------------------------
-//
+
+/*!
+ Sets the start day of the week to the locale
+ Is called when user selects week day
+ */
void CalenSettings::setStartDayOfWeek(const int index)
- {
- TLocale locale;
- TDay day = (TDay)index;
- //set the start day of the week to locale
- locale.SetStartOfWeek(day);
- locale.Set();
- updateShowWeekItem();
- }
+{
+ TLocale locale;
+ TDay day = (TDay)index;
+ //set the start day of the week to locale
+ locale.SetStartOfWeek(day);
+ locale.Set();
+ updateShowWeekItem();
+}
-// ---------------------------------------------------------
-// CalenSettings::updateShowWeekItem
-// update the show week number option
-// ---------------------------------------------------------
-//
+/*!
+ Updates the show week number option
+ */
void CalenSettings::updateShowWeekItem()
- {
- // Get start of week from the locale.
- HbExtendedLocale locale = HbExtendedLocale::system();
- mStartOfWeek = locale.startOfWeek();
- mShowWeekStartOnInfoItem->setContentWidgetData("currentIndex", mStartOfWeek);
- //if start day is not Monday
- //set the show week number option dimmed ,
- //else set to proper status
- if(mStartOfWeek != HbExtendedLocale::Monday)
- {
- mShowWeekNumberItem->setContentWidgetData(QString("text"),
- QString(hbTrId("txt_calendar_button_no")));
- mShowWeekNumberItem->setContentWidgetData(QString("additionalText"),
- QString(hbTrId("txt_calendar_button_yes")));
- mShowWeekNumberItem->setEnabled(false);
- }
- else
- {
- if(mShowWeekNumber)
- {
- mShowWeekNumberItem->setContentWidgetData(QString("text"),
- QString(hbTrId("txt_calendar_button_yes")));
- mShowWeekNumberItem->setContentWidgetData(QString("additionalText"),
- QString(hbTrId("txt_calendar_button_no")));
- }
- else
- {
- mShowWeekNumberItem->setContentWidgetData(QString("text"),
- QString(hbTrId("txt_calendar_button_no")));
- mShowWeekNumberItem->setContentWidgetData(QString("additionalText"),
- QString(hbTrId("txt_calendar_button_yes")));
- }
- mShowWeekNumberItem->setEnabled(true);
- }
- }
+{
+ // Get start of week from the locale.
+ HbExtendedLocale locale = HbExtendedLocale::system();
+ mStartOfWeek = locale.startOfWeek();
+ mShowWeekStartOnInfoItem->setContentWidgetData("currentIndex", mStartOfWeek);
+
+ // Read the value form cenrep
+ QVariant value = mSettingsManager->readItemValue(*mWeekNumberCenrepKey);
+ uint showWeekNumber = value.toUInt();
+
+ //if start day is not Monday
+ //set the show week number option dimmed ,
+ //else set to proper status
+ if(mStartOfWeek != HbExtendedLocale::Monday) {
+ mShowWeekNumberItem->setContentWidgetData(QString("text"),
+ QString(hbTrId("txt_calendar_button_no")));
+ mShowWeekNumberItem->setContentWidgetData(QString("additionalText"),
+ QString(hbTrId("txt_calendar_button_yes")));
+ mShowWeekNumberItem->setEnabled(false);
+ } else {
+ if(showWeekNumber) {
+ mShowWeekNumberItem->setContentWidgetData(QString("text"),
+ QString(hbTrId("txt_calendar_button_yes")));
+ mShowWeekNumberItem->setContentWidgetData(QString("additionalText"),
+ QString(hbTrId("txt_calendar_button_no")));
+ } else {
+ mShowWeekNumberItem->setContentWidgetData(QString("text"),
+ QString(hbTrId("txt_calendar_button_no")));
+ mShowWeekNumberItem->setContentWidgetData(QString("additionalText"),
+ QString(hbTrId("txt_calendar_button_yes")));
+ }
+ mShowWeekNumberItem->setEnabled(true);
+ }
+}
// End of file
--- a/calendarui/sis/calendar.pkg Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/sis/calendar.pkg Tue Jul 06 14:14:56 2010 +0300
@@ -29,6 +29,7 @@
;Calendar engine part
"/epoc32/release/armv5/urel/AgnVersit2.dll" - "!:/sys/bin/AgnVersit2.dll"
"/epoc32/release/armv5/urel/CalenImp.dll" - "!:/sys/bin/CalenImp.dll"
+"/epoc32/release/armv5/urel/CalenInterimUtils2.dll" - "!:/sys/bin/CalenInterimUtils2.dll"
"/epoc32/release/armv5/urel/Versit2.dll" - "!:/sys/bin/Versit2.dll"
"/epoc32/data/z/resource/agnversit2strings.rsc" - "!:/resource/agnversit2strings.rsc"
"/epoc32/data/z/resource/plugins/AGNVERSIT2.rsc" - "!:/resource/plugins/AGNVERSIT2.rsc"
@@ -40,11 +41,14 @@
"/epoc32/release/armv5/urel/calendar.exe" - "!:/sys/bin/calendar.exe"
"/epoc32/data/Z/private/10003a3f/import/apps/calendar_reg.rsc" - "!:/private/10003a3f/import/apps/calendar_reg.rsc"
-"/epoc32/data/z/resource/apps/calendar.rsc" - "!:/resource/apps/calendar.rsc"
-"/epoc32/data/z/resource/qt/translations/calendar_en.qm" - "!:/resource/qt/translations/calendar_en.qm"
+"/epoc32/data/z/resource/apps/calendar.r01" - "!:/resource/apps/calendar.rsc"
+"/epoc32/data/z/resource/qt/translations/calendar_en.qm" - "!:/resource/qt/translations/calendar.qm"
+"/epoc32/release/armv5/urel/calenviewerservice.exe" - "!:/sys/bin/calenviewerservice.exe"
+"/epoc32/data/Z/private/10003a3f/import/apps/calenviewerservice_reg.rsc" - "!:/private/10003a3f/import/apps/calenviewerservice_reg.rsc"
+"/epoc32/data/z/resource/apps/calenviewerservice.rsc" - "!:/resource/apps/calenviewerservice.rsc"
-"/epoc32/release/armv5/urel/calenviews.dll" - "!:/sys/bin/calenviews.dll"
+"/epoc32/release/armv5/urel/calenviews.dll" - "!:/sys/bin/calenviews.dll"
"/epoc32/release/armv5/urel/calensettings.dll" - "!:/sys/bin/calensettings.dll"
"/epoc32/release/armv5/urel/calenglobaldata.dll" - "!:/sys/bin/calenglobaldata.dll"
"/epoc32/release/armv5/urel/calencustomisationmanager.dll" - "!:/sys/bin/calencustomisationmanager.dll"
--- a/calendarui/tsrc/tsrc.pro Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/tsrc/tsrc.pro Tue Jul 06 14:14:56 2010 +0300
@@ -19,7 +19,9 @@
TEMPLATE = subdirs
SUBDIRS += unittest_calenviewerservice \
- unittest_calencommonutils
+ unittest_calencommonutils \
+ ../views/dayview/tsrc \
+
CONFIG += ordered
# End of file --Don't remove this
--- a/calendarui/tsrc/unittest_calencommonutils/inc/test_calenagendautils.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/tsrc/unittest_calencommonutils/inc/test_calenagendautils.h Tue Jul 06 14:14:56 2010 +0300
@@ -30,6 +30,8 @@
private slots:
void init();
void cleanup();
+
+ void test_endsAtStartOfDay();
private:
--- a/calendarui/tsrc/unittest_calencommonutils/inc/test_calendateutils.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/tsrc/unittest_calencommonutils/inc/test_calendateutils.h Tue Jul 06 14:14:56 2010 +0300
@@ -37,7 +37,6 @@
void test_displayTimeOnDay();
void test_timeRangesIntersect();
void test_isValidDay();
- void test_isNullTime();
void test_limitToValidTime();
void test_maxTime();
void test_minTime();
@@ -48,7 +47,6 @@
void test_today();
void test_isOnToday();
void test_defaultTime();
- void test_pastOf();
void test_futureOf();
};
--- a/calendarui/tsrc/unittest_calencommonutils/src/test_calenagendautils.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/tsrc/unittest_calencommonutils/src/test_calenagendautils.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -16,7 +16,9 @@
*/
#include <QtTest/QtTest>
+#include <agendaentry.h>
+#include "calenagendautils.h"
#include "test_calenagendautils.h"
/*!
@@ -51,4 +53,40 @@
// No implementation yet
}
+/*!
+ This function is to test the api of CalenDateUtils::endsAtStartOfDayL.
+ */
+void TestCalenAgendaUtils::test_endsAtStartOfDay()
+{
+ AgendaEntry entry;
+ entry.setSummary("summary");
+ entry.setStartAndEndTime(QDateTime(QDate(2010, 5, 1), QTime(12, 30)),
+ QDateTime(QDate(2010, 5, 6), QTime(2, 59)));
+ bool outPut = CalenAgendaUtils::endsAtStartOfDay(
+ entry,
+ QDateTime(QDate(2010, 5, 6)));
+ QVERIFY(!outPut);
+
+ entry.setStartAndEndTime(QDateTime(QDate(2010, 5, 1), QTime(1, 35)),
+ QDateTime(QDate(2010, 5, 6), QTime(23, 59)));
+ outPut = CalenAgendaUtils::endsAtStartOfDay(
+ entry,
+ QDateTime(QDate(2010, 5, 6)));
+ QVERIFY(!outPut);
+
+ entry.setStartAndEndTime(QDateTime(QDate(2010, 5, 1), QTime(2, 30)),
+ QDateTime(QDate(2010, 5, 5), QTime(23, 59, 59, 999)));
+ outPut = CalenAgendaUtils::endsAtStartOfDay(
+ entry,
+ QDateTime(QDate(2010, 5, 6)));
+ QVERIFY(!outPut);
+
+ entry.setStartAndEndTime(QDateTime(QDate(2010, 5, 1), QTime(1, 35)),
+ QDateTime(QDate(2010, 5, 6)));
+ outPut = CalenAgendaUtils::endsAtStartOfDay(
+ entry,
+ QDateTime(QDate(2010, 5, 6)));
+ QVERIFY(outPut);
+
+}
// End of file --Don't remove this.
--- a/calendarui/tsrc/unittest_calencommonutils/src/test_calendateutils.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/tsrc/unittest_calencommonutils/src/test_calendateutils.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -208,26 +208,6 @@
}
/*!
- This function is to test the api of CalenDateUtils::isNullTime.
- */
-void TestCalenDateUtils::test_isNullTime()
-{
- QDateTime dateTime(QDate(1899,12,28));
-
- QVERIFY(!CalenDateUtils::isNullTime(dateTime));
-
- dateTime = QDateTime(QDate(0,0,0));
- QVERIFY(!CalenDateUtils::isNullTime(dateTime));
-
- dateTime = QDateTime();
- QVERIFY(CalenDateUtils::isNullTime(dateTime));
-
- dateTime = QDateTime(QDate(2100,2,31));
- QVERIFY(!CalenDateUtils::isNullTime(dateTime));
-
-}
-
-/*!
This function is to test the api of CalenDateUtils::limitToValidTime.
*/
void TestCalenDateUtils::test_limitToValidTime()
@@ -400,17 +380,6 @@
}
/*!
- This function is to test the api of CalenDateUtils::pastOf.
- */
-void TestCalenDateUtils::test_pastOf()
-{
- QDateTime dateTime = QDateTime(QDate(2009, 11, 26));
- QDateTime expectedOutput = QDateTime(QDate(2009, 10, 30));
- QDateTime actualOutput = CalenDateUtils::pastOf(dateTime, 27);
- QCOMPARE(actualOutput, expectedOutput);
-}
-
-/*!
This function is to test the api of CalenDateUtils::futureOf.
*/
void TestCalenDateUtils::test_futureOf()
--- a/calendarui/tsrc/unittest_calencommonutils/unittest_calencommonutils.pro Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/tsrc/unittest_calencommonutils/unittest_calencommonutils.pro Tue Jul 06 14:14:56 2010 +0300
@@ -38,11 +38,11 @@
symbian : {
TARGET.CAPABILITY = ALL -TCB
- TARGET.UID3 = 0x200315A5
+ TARGET.UID3 = 0x200315AE
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
- LIBS += -lcalencommonutils
-
+ LIBS += -lcalencommonutils \
+ -lagendainterface
BLD_INF_RULES.prj_testexports += \
"./rom/unittest_calencommonutils.iby CORE_APP_LAYER_IBY_EXPORT_PATH(unittest_calencommonutils.iby)"
}
--- a/calendarui/views/bwins/calenviewsu.def Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/views/bwins/calenviewsu.def Tue Jul 06 14:14:56 2010 +0300
@@ -9,150 +9,154 @@
??1CalenPreviewPane@@UAE@XZ @ 8 NONAME ; CalenPreviewPane::~CalenPreviewPane(void)
?mousePressEvent@CalenMonthGrid@@EAEXPAVQGraphicsSceneMouseEvent@@@Z @ 9 NONAME ; void CalenMonthGrid::mousePressEvent(class QGraphicsSceneMouseEvent *)
?completePopulation@CalenMonthView@@AAEXXZ @ 10 NONAME ; void CalenMonthView::completePopulation(void)
- ?handleAppendingRows@CalenMonthGrid@@AAEXAAV?$QList@VCalenMonthData@@@@@Z @ 11 NONAME ; void CalenMonthGrid::handleAppendingRows(class QList<class CalenMonthData> &)
- ?handleChangeOrientation@CalenMonthView@@AAEXXZ @ 12 NONAME ; void CalenMonthView::handleChangeOrientation(void)
- ?staticMetaObject@CalenSettingsView@@2UQMetaObject@@B @ 13 NONAME ; struct QMetaObject const CalenSettingsView::staticMetaObject
- ?getStaticMetaObject@CalenSettingsView@@SAABUQMetaObject@@XZ @ 14 NONAME ; struct QMetaObject const & CalenSettingsView::getStaticMetaObject(void)
- ?updateMonthDataArrayWithActiveDates@CalenMonthView@@AAEXXZ @ 15 NONAME ; void CalenMonthView::updateMonthDataArrayWithActiveDates(void)
- ?scrollingFinished@CalenMonthGrid@@QAEXXZ @ 16 NONAME ; void CalenMonthGrid::scrollingFinished(void)
- ?setCurrentIdex@CalenMonthGrid@@QAEXH@Z @ 17 NONAME ; void CalenMonthGrid::setCurrentIdex(int)
- ??_ECalenMonthGrid@@UAE@I@Z @ 18 NONAME ; CalenMonthGrid::~CalenMonthGrid(unsigned int)
- ?trUtf8@CalenPreviewPane@@SA?AVQString@@PBD0@Z @ 19 NONAME ; class QString CalenPreviewPane::trUtf8(char const *, char const *)
- ?trUtf8@CalenMonthGrid@@SA?AVQString@@PBD0@Z @ 20 NONAME ; class QString CalenMonthGrid::trUtf8(char const *, char const *)
- ?populatePrevMonth@CalenMonthView@@QAEXXZ @ 21 NONAME ; void CalenMonthView::populatePrevMonth(void)
- ?qt_metacall@CalenSettingsView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 22 NONAME ; int CalenSettingsView::qt_metacall(enum QMetaObject::Call, int, void * *)
- ??1CalenPluginLabel@@UAE@XZ @ 23 NONAME ; CalenPluginLabel::~CalenPluginLabel(void)
- ?handleLeftEffectCompleted@CalenMonthView@@AAEXABUEffectStatus@HbEffect@@@Z @ 24 NONAME ; void CalenMonthView::handleLeftEffectCompleted(struct HbEffect::EffectStatus const &)
- ?getStaticMetaObject@CalenMonthGrid@@SAABUQMetaObject@@XZ @ 25 NONAME ; struct QMetaObject const & CalenMonthGrid::getStaticMetaObject(void)
- ?trUtf8@CalenSettingsView@@SA?AVQString@@PBD0H@Z @ 26 NONAME ; class QString CalenSettingsView::trUtf8(char const *, char const *, int)
- ?qt_metacast@CalenMonthView@@UAEPAXPBD@Z @ 27 NONAME ; void * CalenMonthView::qt_metacast(char const *)
- ?staticMetaObject@CalenMonthView@@2UQMetaObject@@B @ 28 NONAME ; struct QMetaObject const CalenMonthView::staticMetaObject
- ?setupView@CalenMonthView@@QAEXPAVCalenDocLoader@@@Z @ 29 NONAME ; void CalenMonthView::setupView(class CalenDocLoader *)
- ?metaObject@CalenMonthGrid@@UBEPBUQMetaObject@@XZ @ 30 NONAME ; struct QMetaObject const * CalenMonthGrid::metaObject(void) const
- ?startAutoScroll@CalenPreviewPane@@QAEXXZ @ 31 NONAME ; void CalenPreviewPane::startAutoScroll(void)
- ?doLazyLoading@CalenMonthView@@QAEXXZ @ 32 NONAME ; void CalenMonthView::doLazyLoading(void)
- ?setView@CalenMonthGrid@@QAEXPAVCalenMonthView@@@Z @ 33 NONAME ; void CalenMonthGrid::setView(class CalenMonthView *)
- ?HandleNotification@CalenDayView@@UAEXW4TCalenNotification@@@Z @ 34 NONAME ; void CalenDayView::HandleNotification(enum TCalenNotification)
- ??1CalenSettingsView@@UAE@XZ @ 35 NONAME ; CalenSettingsView::~CalenSettingsView(void)
- ?Date@CalenPreviewPane@@QAE?AVQDateTime@@XZ @ 36 NONAME ; class QDateTime CalenPreviewPane::Date(void)
- ?tr@CalenPreviewPane@@SA?AVQString@@PBD0H@Z @ 37 NONAME ; class QString CalenPreviewPane::tr(char const *, char const *, int)
- ?metaObject@CalenMonthView@@UBEPBUQMetaObject@@XZ @ 38 NONAME ; struct QMetaObject const * CalenMonthView::metaObject(void) const
- ??0CalenPreviewPane@@QAE@AAVMCalenServices@@PAVQGraphicsItem@@@Z @ 39 NONAME ; CalenPreviewPane::CalenPreviewPane(class MCalenServices &, class QGraphicsItem *)
- ?rowsInPrevMonth@CalenMonthView@@QAEHXZ @ 40 NONAME ; int CalenMonthView::rowsInPrevMonth(void)
- ?handlePrependingRows@CalenMonthGrid@@AAEXAAV?$QList@VCalenMonthData@@@@@Z @ 41 NONAME ; void CalenMonthGrid::handlePrependingRows(class QList<class CalenMonthData> &)
- ?metaObject@CalenPreviewPane@@UBEPBUQMetaObject@@XZ @ 42 NONAME ; struct QMetaObject const * CalenPreviewPane::metaObject(void) const
- ?gestureEvent@CalenMonthGrid@@MAEXPAVQGestureEvent@@@Z @ 43 NONAME ; void CalenMonthGrid::gestureEvent(class QGestureEvent *)
- ??0CalenDayView@@QAE@AAVMCalenServices@@@Z @ 44 NONAME ; CalenDayView::CalenDayView(class MCalenServices &)
- ?populateNextMonth@CalenMonthView@@QAEXXZ @ 45 NONAME ; void CalenMonthView::populateNextMonth(void)
- ?handleRightEffectCompleted@CalenMonthView@@AAEXABUEffectStatus@HbEffect@@@Z @ 46 NONAME ; void CalenMonthView::handleRightEffectCompleted(struct HbEffect::EffectStatus const &)
- ?qt_metacast@CalenMonthGrid@@UAEPAXPBD@Z @ 47 NONAME ; void * CalenMonthGrid::qt_metacast(char const *)
- ?firstDayOfGrid@CalenMonthView@@QAE?AVQDateTime@@XZ @ 48 NONAME ; class QDateTime CalenMonthView::firstDayOfGrid(void)
- ?rowsInFutMonth@CalenMonthView@@QAEHXZ @ 49 NONAME ; int CalenMonthView::rowsInFutMonth(void)
- ?getCurrGridIndex@CalenMonthView@@QAEHXZ @ 50 NONAME ; int CalenMonthView::getCurrGridIndex(void)
- ?launchDayView@CalenMonthView@@QAEXXZ @ 51 NONAME ; void CalenMonthView::launchDayView(void)
- ??1CalenDayViewWidget@@UAE@XZ @ 52 NONAME ; CalenDayViewWidget::~CalenDayViewWidget(void)
- ?gestureEvent@CalenPreviewPane@@MAEXPAVQGestureEvent@@@Z @ 53 NONAME ; void CalenPreviewPane::gestureEvent(class QGestureEvent *)
- ??0CalenDayViewWidget@@QAE@AAVMCalenServices@@PAVCalenDocLoader@@@Z @ 54 NONAME ; CalenDayViewWidget::CalenDayViewWidget(class MCalenServices &, class CalenDocLoader *)
- ?prependRows@CalenMonthGrid@@QAEXXZ @ 55 NONAME ; void CalenMonthGrid::prependRows(void)
- ?orientationChanged@CalenMonthGrid@@MAEXW4Orientation@Qt@@@Z @ 56 NONAME ; void CalenMonthGrid::orientationChanged(enum Qt::Orientation)
- ?qt_metacall@CalenPreviewPane@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 57 NONAME ; int CalenPreviewPane::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?trUtf8@CalenPreviewPane@@SA?AVQString@@PBD0H@Z @ 58 NONAME ; class QString CalenPreviewPane::trUtf8(char const *, char const *, int)
- ??1CalenThickLinesDrawer@@UAE@XZ @ 59 NONAME ; CalenThickLinesDrawer::~CalenThickLinesDrawer(void)
- ?setView@CalenPreviewPane@@QAEXPAVCalenMonthView@@@Z @ 60 NONAME ; void CalenPreviewPane::setView(class CalenMonthView *)
- ??_ECalenMonthView@@UAE@I@Z @ 61 NONAME ; CalenMonthView::~CalenMonthView(unsigned int)
- ?changeOrientation@CalenMonthView@@UAEXW4Orientation@Qt@@@Z @ 62 NONAME ; void CalenMonthView::changeOrientation(enum Qt::Orientation)
- ?populatePreviewPane@CalenMonthView@@QAEXAAVQDateTime@@@Z @ 63 NONAME ; void CalenMonthView::populatePreviewPane(class QDateTime &)
- ??0CalenSettingsView@@QAE@AAVMCalenServices@@PAVQGraphicsItem@@@Z @ 64 NONAME ; CalenSettingsView::CalenSettingsView(class MCalenServices &, class QGraphicsItem *)
- ?updateModelWithPrevMonth@CalenMonthView@@QAEXXZ @ 65 NONAME ; void CalenMonthView::updateModelWithPrevMonth(void)
- ?stopScrolling@CalenPreviewPane@@QAEXXZ @ 66 NONAME ; void CalenPreviewPane::stopScrolling(void)
- ?refreshView@CalenSettingsView@@QAEXXZ @ 67 NONAME ; void CalenSettingsView::refreshView(void)
- ?addBackgroundFrame@CalenMonthView@@AAEXXZ @ 68 NONAME ; void CalenMonthView::addBackgroundFrame(void)
- ?createGrid@CalenMonthView@@AAEXXZ @ 69 NONAME ; void CalenMonthView::createGrid(void)
- ?tr@CalenPreviewPane@@SA?AVQString@@PBD0@Z @ 70 NONAME ; class QString CalenPreviewPane::tr(char const *, char const *)
- ?getStaticMetaObject@CalenPreviewPane@@SAABUQMetaObject@@XZ @ 71 NONAME ; struct QMetaObject const & CalenPreviewPane::getStaticMetaObject(void)
- ?launchPreviousView@CalenSettingsView@@AAEXXZ @ 72 NONAME ; void CalenSettingsView::launchPreviousView(void)
- ?setCurrGridIndex@CalenMonthView@@QAEXH@Z @ 73 NONAME ; void CalenMonthView::setCurrGridIndex(int)
- ?setDateToLabel@CalenMonthView@@AAEXXZ @ 74 NONAME ; void CalenMonthView::setDateToLabel(void)
- ?addWeekNumbers@CalenMonthView@@AAEXXZ @ 75 NONAME ; void CalenMonthView::addWeekNumbers(void)
- ?downGesture@CalenMonthGrid@@AAEXXZ @ 76 NONAME ; void CalenMonthGrid::downGesture(void)
- ?qt_metacall@CalenThickLinesDrawer@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 77 NONAME ; int CalenThickLinesDrawer::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?setupView@CalenDayView@@QAEXPAVCalenDocLoader@@@Z @ 78 NONAME ; void CalenDayView::setupView(class CalenDocLoader *)
- ?upGesture@CalenMonthGrid@@AAEXXZ @ 79 NONAME ; void CalenMonthGrid::upGesture(void)
- ??1CalenMonthView@@UAE@XZ @ 80 NONAME ; CalenMonthView::~CalenMonthView(void)
- ?dateFromContext@CalenMonthView@@AAE?AVQDateTime@@ABVMCalenContext@@@Z @ 81 NONAME ; class QDateTime CalenMonthView::dateFromContext(class MCalenContext const &)
- ?staticMetaObject@CalenMonthGrid@@2UQMetaObject@@B @ 82 NONAME ; struct QMetaObject const CalenMonthGrid::staticMetaObject
- ?trUtf8@CalenMonthGrid@@SA?AVQString@@PBD0H@Z @ 83 NONAME ; class QString CalenMonthGrid::trUtf8(char const *, char const *, int)
- ?paint@CalenThickLinesDrawer@@EAEXPAVQPainter@@PBVQStyleOptionGraphicsItem@@PAVQWidget@@@Z @ 84 NONAME ; void CalenThickLinesDrawer::paint(class QPainter *, class QStyleOptionGraphicsItem const *, class QWidget *)
- ?initializeForm@CalenSettingsView@@QAEXXZ @ 85 NONAME ; void CalenSettingsView::initializeForm(void)
- ?handlePanGestureFinished@CalenMonthGrid@@AAEXXZ @ 86 NONAME ; void CalenMonthGrid::handlePanGestureFinished(void)
- ?tr@CalenMonthGrid@@SA?AVQString@@PBD0H@Z @ 87 NONAME ; class QString CalenMonthGrid::tr(char const *, char const *, int)
- ?goToToday@CalenMonthView@@AAEXXZ @ 88 NONAME ; void CalenMonthView::goToToday(void)
- ?trUtf8@CalenThickLinesDrawer@@SA?AVQString@@PBD0H@Z @ 89 NONAME ; class QString CalenThickLinesDrawer::trUtf8(char const *, char const *, int)
- ?onContextChanged@CalenMonthView@@EAEXXZ @ 90 NONAME ; void CalenMonthView::onContextChanged(void)
- ?qt_metacast@CalenPreviewPane@@UAEPAXPBD@Z @ 91 NONAME ; void * CalenPreviewPane::qt_metacast(char const *)
- ?docLoader@CalenDayView@@QAEPAVCalenDocLoader@@XZ @ 92 NONAME ; class CalenDocLoader * CalenDayView::docLoader(void)
- ?getCurrentIndex@CalenMonthGrid@@QAEHXZ @ 93 NONAME ; int CalenMonthGrid::getCurrentIndex(void)
- ?tr@CalenSettingsView@@SA?AVQString@@PBD0H@Z @ 94 NONAME ; class QString CalenSettingsView::tr(char const *, char const *, int)
- ?removeWeekNumbers@CalenMonthView@@AAEXXZ @ 95 NONAME ; void CalenMonthView::removeWeekNumbers(void)
- ?trUtf8@CalenMonthView@@SA?AVQString@@PBD0H@Z @ 96 NONAME ; class QString CalenMonthView::trUtf8(char const *, char const *, int)
- ??0CalenMonthView@@QAE@AAVMCalenServices@@@Z @ 97 NONAME ; CalenMonthView::CalenMonthView(class MCalenServices &)
- ?getStaticMetaObject@CalenThickLinesDrawer@@SAABUQMetaObject@@XZ @ 98 NONAME ; struct QMetaObject const & CalenThickLinesDrawer::getStaticMetaObject(void)
- ?setNoEntriesLabel@CalenPreviewPane@@QAEXPAVHbLabel@@@Z @ 99 NONAME ; void CalenPreviewPane::setNoEntriesLabel(class HbLabel *)
- ?clearListModel@CalenDayView@@QAEXXZ @ 100 NONAME ; void CalenDayView::clearListModel(void)
+ ??0CalenAgendaViewWidget@@QAE@AAVMCalenServices@@PAVCalenDocLoader@@@Z @ 11 NONAME ; CalenAgendaViewWidget::CalenAgendaViewWidget(class MCalenServices &, class CalenDocLoader *)
+ ?handleAppendingRows@CalenMonthGrid@@AAEXAAV?$QList@VCalenMonthData@@@@@Z @ 12 NONAME ; void CalenMonthGrid::handleAppendingRows(class QList<class CalenMonthData> &)
+ ?handleChangeOrientation@CalenMonthView@@AAEXXZ @ 13 NONAME ; void CalenMonthView::handleChangeOrientation(void)
+ ?staticMetaObject@CalenSettingsView@@2UQMetaObject@@B @ 14 NONAME ; struct QMetaObject const CalenSettingsView::staticMetaObject
+ ?docLoader@CalenAgendaView@@QAEPAVCalenDocLoader@@XZ @ 15 NONAME ; class CalenDocLoader * CalenAgendaView::docLoader(void)
+ ?getStaticMetaObject@CalenSettingsView@@SAABUQMetaObject@@XZ @ 16 NONAME ; struct QMetaObject const & CalenSettingsView::getStaticMetaObject(void)
+ ?updateMonthDataArrayWithActiveDates@CalenMonthView@@AAEXXZ @ 17 NONAME ; void CalenMonthView::updateMonthDataArrayWithActiveDates(void)
+ ?scrollingFinished@CalenMonthGrid@@QAEXXZ @ 18 NONAME ; void CalenMonthGrid::scrollingFinished(void)
+ ?setCurrentIdex@CalenMonthGrid@@QAEXH@Z @ 19 NONAME ; void CalenMonthGrid::setCurrentIdex(int)
+ ?setupView@CalenAgendaView@@QAEXPAVCalenDocLoader@@@Z @ 20 NONAME ; void CalenAgendaView::setupView(class CalenDocLoader *)
+ ??_ECalenMonthGrid@@UAE@I@Z @ 21 NONAME ; CalenMonthGrid::~CalenMonthGrid(unsigned int)
+ ?trUtf8@CalenPreviewPane@@SA?AVQString@@PBD0@Z @ 22 NONAME ; class QString CalenPreviewPane::trUtf8(char const *, char const *)
+ ?trUtf8@CalenMonthGrid@@SA?AVQString@@PBD0@Z @ 23 NONAME ; class QString CalenMonthGrid::trUtf8(char const *, char const *)
+ ?populatePrevMonth@CalenMonthView@@QAEXXZ @ 24 NONAME ; void CalenMonthView::populatePrevMonth(void)
+ ?qt_metacall@CalenSettingsView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 25 NONAME ; int CalenSettingsView::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ??1CalenPluginLabel@@UAE@XZ @ 26 NONAME ; CalenPluginLabel::~CalenPluginLabel(void)
+ ?handleLeftEffectCompleted@CalenMonthView@@AAEXABUEffectStatus@HbEffect@@@Z @ 27 NONAME ; void CalenMonthView::handleLeftEffectCompleted(struct HbEffect::EffectStatus const &)
+ ?getStaticMetaObject@CalenMonthGrid@@SAABUQMetaObject@@XZ @ 28 NONAME ; struct QMetaObject const & CalenMonthGrid::getStaticMetaObject(void)
+ ?trUtf8@CalenSettingsView@@SA?AVQString@@PBD0H@Z @ 29 NONAME ; class QString CalenSettingsView::trUtf8(char const *, char const *, int)
+ ?qt_metacast@CalenMonthView@@UAEPAXPBD@Z @ 30 NONAME ; void * CalenMonthView::qt_metacast(char const *)
+ ?staticMetaObject@CalenMonthView@@2UQMetaObject@@B @ 31 NONAME ; struct QMetaObject const CalenMonthView::staticMetaObject
+ ?setupView@CalenMonthView@@QAEXPAVCalenDocLoader@@@Z @ 32 NONAME ; void CalenMonthView::setupView(class CalenDocLoader *)
+ ?metaObject@CalenMonthGrid@@UBEPBUQMetaObject@@XZ @ 33 NONAME ; struct QMetaObject const * CalenMonthGrid::metaObject(void) const
+ ?startAutoScroll@CalenPreviewPane@@QAEXXZ @ 34 NONAME ; void CalenPreviewPane::startAutoScroll(void)
+ ?doLazyLoading@CalenMonthView@@QAEXXZ @ 35 NONAME ; void CalenMonthView::doLazyLoading(void)
+ ?setView@CalenMonthGrid@@QAEXPAVCalenMonthView@@@Z @ 36 NONAME ; void CalenMonthGrid::setView(class CalenMonthView *)
+ ??1CalenSettingsView@@UAE@XZ @ 37 NONAME ; CalenSettingsView::~CalenSettingsView(void)
+ ?Date@CalenPreviewPane@@QAE?AVQDateTime@@XZ @ 38 NONAME ; class QDateTime CalenPreviewPane::Date(void)
+ ?tr@CalenPreviewPane@@SA?AVQString@@PBD0H@Z @ 39 NONAME ; class QString CalenPreviewPane::tr(char const *, char const *, int)
+ ?metaObject@CalenMonthView@@UBEPBUQMetaObject@@XZ @ 40 NONAME ; struct QMetaObject const * CalenMonthView::metaObject(void) const
+ ??0CalenPreviewPane@@QAE@AAVMCalenServices@@PAVQGraphicsItem@@@Z @ 41 NONAME ; CalenPreviewPane::CalenPreviewPane(class MCalenServices &, class QGraphicsItem *)
+ ?rowsInPrevMonth@CalenMonthView@@QAEHXZ @ 42 NONAME ; int CalenMonthView::rowsInPrevMonth(void)
+ ?handlePrependingRows@CalenMonthGrid@@AAEXAAV?$QList@VCalenMonthData@@@@@Z @ 43 NONAME ; void CalenMonthGrid::handlePrependingRows(class QList<class CalenMonthData> &)
+ ?metaObject@CalenPreviewPane@@UBEPBUQMetaObject@@XZ @ 44 NONAME ; struct QMetaObject const * CalenPreviewPane::metaObject(void) const
+ ?clearListModel@CalenAgendaView@@QAEXXZ @ 45 NONAME ; void CalenAgendaView::clearListModel(void)
+ ?gestureEvent@CalenMonthGrid@@MAEXPAVQGestureEvent@@@Z @ 46 NONAME ; void CalenMonthGrid::gestureEvent(class QGestureEvent *)
+ ??0CalenDayView@@QAE@AAVMCalenServices@@@Z @ 47 NONAME ; CalenDayView::CalenDayView(class MCalenServices &)
+ ?populateNextMonth@CalenMonthView@@QAEXXZ @ 48 NONAME ; void CalenMonthView::populateNextMonth(void)
+ ?handleRightEffectCompleted@CalenMonthView@@AAEXABUEffectStatus@HbEffect@@@Z @ 49 NONAME ; void CalenMonthView::handleRightEffectCompleted(struct HbEffect::EffectStatus const &)
+ ?qt_metacast@CalenMonthGrid@@UAEPAXPBD@Z @ 50 NONAME ; void * CalenMonthGrid::qt_metacast(char const *)
+ ?firstDayOfGrid@CalenMonthView@@QAE?AVQDateTime@@XZ @ 51 NONAME ; class QDateTime CalenMonthView::firstDayOfGrid(void)
+ ?rowsInFutMonth@CalenMonthView@@QAEHXZ @ 52 NONAME ; int CalenMonthView::rowsInFutMonth(void)
+ ?launchDayView@CalenMonthView@@QAEXXZ @ 53 NONAME ; void CalenMonthView::launchDayView(void)
+ ?getCurrGridIndex@CalenMonthView@@QAEHXZ @ 54 NONAME ; int CalenMonthView::getCurrGridIndex(void)
+ ?gestureEvent@CalenPreviewPane@@MAEXPAVQGestureEvent@@@Z @ 55 NONAME ; void CalenPreviewPane::gestureEvent(class QGestureEvent *)
+ ?prependRows@CalenMonthGrid@@QAEXXZ @ 56 NONAME ; void CalenMonthGrid::prependRows(void)
+ ?orientationChanged@CalenMonthGrid@@MAEXW4Orientation@Qt@@@Z @ 57 NONAME ; void CalenMonthGrid::orientationChanged(enum Qt::Orientation)
+ ?qt_metacall@CalenPreviewPane@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 58 NONAME ; int CalenPreviewPane::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?trUtf8@CalenPreviewPane@@SA?AVQString@@PBD0H@Z @ 59 NONAME ; class QString CalenPreviewPane::trUtf8(char const *, char const *, int)
+ ??1CalenThickLinesDrawer@@UAE@XZ @ 60 NONAME ; CalenThickLinesDrawer::~CalenThickLinesDrawer(void)
+ ?setView@CalenPreviewPane@@QAEXPAVCalenMonthView@@@Z @ 61 NONAME ; void CalenPreviewPane::setView(class CalenMonthView *)
+ ??_ECalenMonthView@@UAE@I@Z @ 62 NONAME ; CalenMonthView::~CalenMonthView(unsigned int)
+ ??1CalenAgendaView@@UAE@XZ @ 63 NONAME ; CalenAgendaView::~CalenAgendaView(void)
+ ?populatePreviewPane@CalenMonthView@@QAEXAAVQDateTime@@@Z @ 64 NONAME ; void CalenMonthView::populatePreviewPane(class QDateTime &)
+ ??0CalenSettingsView@@QAE@AAVMCalenServices@@PAVQGraphicsItem@@@Z @ 65 NONAME ; CalenSettingsView::CalenSettingsView(class MCalenServices &, class QGraphicsItem *)
+ ??0CalenAgendaView@@QAE@AAVMCalenServices@@@Z @ 66 NONAME ; CalenAgendaView::CalenAgendaView(class MCalenServices &)
+ ?updateModelWithPrevMonth@CalenMonthView@@QAEXXZ @ 67 NONAME ; void CalenMonthView::updateModelWithPrevMonth(void)
+ ?stopScrolling@CalenPreviewPane@@QAEXXZ @ 68 NONAME ; void CalenPreviewPane::stopScrolling(void)
+ ?refreshView@CalenSettingsView@@QAEXXZ @ 69 NONAME ; void CalenSettingsView::refreshView(void)
+ ?addBackgroundFrame@CalenMonthView@@AAEXXZ @ 70 NONAME ; void CalenMonthView::addBackgroundFrame(void)
+ ?createGrid@CalenMonthView@@AAEXXZ @ 71 NONAME ; void CalenMonthView::createGrid(void)
+ ?tr@CalenPreviewPane@@SA?AVQString@@PBD0@Z @ 72 NONAME ; class QString CalenPreviewPane::tr(char const *, char const *)
+ ?getStaticMetaObject@CalenPreviewPane@@SAABUQMetaObject@@XZ @ 73 NONAME ; struct QMetaObject const & CalenPreviewPane::getStaticMetaObject(void)
+ ?launchPreviousView@CalenSettingsView@@AAEXXZ @ 74 NONAME ; void CalenSettingsView::launchPreviousView(void)
+ ?setCurrGridIndex@CalenMonthView@@QAEXH@Z @ 75 NONAME ; void CalenMonthView::setCurrGridIndex(int)
+ ?setDateToLabel@CalenMonthView@@AAEXXZ @ 76 NONAME ; void CalenMonthView::setDateToLabel(void)
+ ?addWeekNumbers@CalenMonthView@@AAEXXZ @ 77 NONAME ; void CalenMonthView::addWeekNumbers(void)
+ ?downGesture@CalenMonthGrid@@AAEXXZ @ 78 NONAME ; void CalenMonthGrid::downGesture(void)
+ ?qt_metacall@CalenThickLinesDrawer@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 79 NONAME ; int CalenThickLinesDrawer::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?setupView@CalenDayView@@QAEXPAVCalenDocLoader@@@Z @ 80 NONAME ; void CalenDayView::setupView(class CalenDocLoader *)
+ ?upGesture@CalenMonthGrid@@AAEXXZ @ 81 NONAME ; void CalenMonthGrid::upGesture(void)
+ ??1CalenMonthView@@UAE@XZ @ 82 NONAME ; CalenMonthView::~CalenMonthView(void)
+ ?dateFromContext@CalenMonthView@@AAE?AVQDateTime@@ABVMCalenContext@@@Z @ 83 NONAME ; class QDateTime CalenMonthView::dateFromContext(class MCalenContext const &)
+ ?staticMetaObject@CalenMonthGrid@@2UQMetaObject@@B @ 84 NONAME ; struct QMetaObject const CalenMonthGrid::staticMetaObject
+ ?trUtf8@CalenMonthGrid@@SA?AVQString@@PBD0H@Z @ 85 NONAME ; class QString CalenMonthGrid::trUtf8(char const *, char const *, int)
+ ?paint@CalenThickLinesDrawer@@EAEXPAVQPainter@@PBVQStyleOptionGraphicsItem@@PAVQWidget@@@Z @ 86 NONAME ; void CalenThickLinesDrawer::paint(class QPainter *, class QStyleOptionGraphicsItem const *, class QWidget *)
+ ?initializeForm@CalenSettingsView@@QAEXXZ @ 87 NONAME ; void CalenSettingsView::initializeForm(void)
+ ?tr@CalenMonthGrid@@SA?AVQString@@PBD0H@Z @ 88 NONAME ; class QString CalenMonthGrid::tr(char const *, char const *, int)
+ ?handlePanGestureFinished@CalenMonthGrid@@AAEXXZ @ 89 NONAME ; void CalenMonthGrid::handlePanGestureFinished(void)
+ ?goToToday@CalenMonthView@@AAEXXZ @ 90 NONAME ; void CalenMonthView::goToToday(void)
+ ?trUtf8@CalenThickLinesDrawer@@SA?AVQString@@PBD0H@Z @ 91 NONAME ; class QString CalenThickLinesDrawer::trUtf8(char const *, char const *, int)
+ ?onContextChanged@CalenMonthView@@EAEXXZ @ 92 NONAME ; void CalenMonthView::onContextChanged(void)
+ ?qt_metacast@CalenPreviewPane@@UAEPAXPBD@Z @ 93 NONAME ; void * CalenPreviewPane::qt_metacast(char const *)
+ ?getCurrentIndex@CalenMonthGrid@@QAEHXZ @ 94 NONAME ; int CalenMonthGrid::getCurrentIndex(void)
+ ?tr@CalenSettingsView@@SA?AVQString@@PBD0H@Z @ 95 NONAME ; class QString CalenSettingsView::tr(char const *, char const *, int)
+ ?removeWeekNumbers@CalenMonthView@@AAEXXZ @ 96 NONAME ; void CalenMonthView::removeWeekNumbers(void)
+ ?trUtf8@CalenMonthView@@SA?AVQString@@PBD0H@Z @ 97 NONAME ; class QString CalenMonthView::trUtf8(char const *, char const *, int)
+ ??0CalenMonthView@@QAE@AAVMCalenServices@@@Z @ 98 NONAME ; CalenMonthView::CalenMonthView(class MCalenServices &)
+ ?getStaticMetaObject@CalenThickLinesDrawer@@SAABUQMetaObject@@XZ @ 99 NONAME ; struct QMetaObject const & CalenThickLinesDrawer::getStaticMetaObject(void)
+ ?setNoEntriesLabel@CalenPreviewPane@@QAEXPAVHbLabel@@@Z @ 100 NONAME ; void CalenPreviewPane::setNoEntriesLabel(class HbLabel *)
??0CalenThickLinesDrawer@@QAE@W4WidgetType@CalendarNamespace@@PAVQGraphicsItem@@@Z @ 101 NONAME ; CalenThickLinesDrawer::CalenThickLinesDrawer(enum CalendarNamespace::WidgetType, class QGraphicsItem *)
?onLocaleChanged@CalenMonthView@@UAEXH@Z @ 102 NONAME ; void CalenMonthView::onLocaleChanged(int)
?doPopulation@CalenMonthView@@UAEXXZ @ 103 NONAME ; void CalenMonthView::doPopulation(void)
?tr@CalenMonthView@@SA?AVQString@@PBD0H@Z @ 104 NONAME ; class QString CalenMonthView::tr(char const *, char const *, int)
- ?GetInstanceListL@CalenPreviewPane@@AAEXXZ @ 105 NONAME ; void CalenPreviewPane::GetInstanceListL(void)
- ?getInstanceList@CalenMonthView@@AAEXAAV?$QList@VQDate@@@@VQDateTime@@1@Z @ 106 NONAME ; void CalenMonthView::getInstanceList(class QList<class QDate> &, class QDateTime, class QDateTime)
- ?tr@CalenMonthView@@SA?AVQString@@PBD0@Z @ 107 NONAME ; class QString CalenMonthView::tr(char const *, char const *)
- ??0CalenMonthGrid@@QAE@PAVQGraphicsItem@@@Z @ 108 NONAME ; CalenMonthGrid::CalenMonthGrid(class QGraphicsItem *)
- ?refreshViewOnGoToDate@CalenMonthView@@EAEXXZ @ 109 NONAME ; void CalenMonthView::refreshViewOnGoToDate(void)
- ?appendRows@CalenMonthGrid@@QAEXXZ @ 110 NONAME ; void CalenMonthGrid::appendRows(void)
- ?tr@CalenThickLinesDrawer@@SA?AVQString@@PBD0H@Z @ 111 NONAME ; class QString CalenThickLinesDrawer::tr(char const *, char const *, int)
- ??0CalenPluginLabel@@QAE@AAVMCalenServices@@PAVQGraphicsItem@@@Z @ 112 NONAME ; CalenPluginLabel::CalenPluginLabel(class MCalenServices &, class QGraphicsItem *)
- ?mouseReleaseEvent@CalenMonthGrid@@EAEXPAVQGraphicsSceneMouseEvent@@@Z @ 113 NONAME ; void CalenMonthGrid::mouseReleaseEvent(class QGraphicsSceneMouseEvent *)
- ?updateMonthGridWithInActiveMonths@CalenMonthGrid@@QAEXAAV?$QList@VCalenMonthData@@@@@Z @ 114 NONAME ; void CalenMonthGrid::updateMonthGridWithInActiveMonths(class QList<class CalenMonthData> &)
- ?getCurrentDay@CalenMonthView@@QAE?AVQDateTime@@XZ @ 115 NONAME ; class QDateTime CalenMonthView::getCurrentDay(void)
- ?staticMetaObject@CalenPreviewPane@@2UQMetaObject@@B @ 116 NONAME ; struct QMetaObject const CalenPreviewPane::staticMetaObject
- ?tr@CalenSettingsView@@SA?AVQString@@PBD0@Z @ 117 NONAME ; class QString CalenSettingsView::tr(char const *, char const *)
- ?onTwoSecondsTimeout@CalenPreviewPane@@QAEXXZ @ 118 NONAME ; void CalenPreviewPane::onTwoSecondsTimeout(void)
- ?tr@CalenThickLinesDrawer@@SA?AVQString@@PBD0@Z @ 119 NONAME ; class QString CalenThickLinesDrawer::tr(char const *, char const *)
- ?staticMetaObject@CalenThickLinesDrawer@@2UQMetaObject@@B @ 120 NONAME ; struct QMetaObject const CalenThickLinesDrawer::staticMetaObject
- ?populateWithInstanceView@CalenMonthView@@AAEXXZ @ 121 NONAME ; void CalenMonthView::populateWithInstanceView(void)
- ?trUtf8@CalenThickLinesDrawer@@SA?AVQString@@PBD0@Z @ 122 NONAME ; class QString CalenThickLinesDrawer::trUtf8(char const *, char const *)
- ?populateLabel@CalenPreviewPane@@QAEXVQDateTime@@@Z @ 123 NONAME ; void CalenPreviewPane::populateLabel(class QDateTime)
- ?doPopulation@CalenDayView@@UAEXXZ @ 124 NONAME ; void CalenDayView::doPopulation(void)
- ??1CalenDayView@@UAE@XZ @ 125 NONAME ; CalenDayView::~CalenDayView(void)
- ?updateModelWithFutureMonth@CalenMonthView@@QAEXXZ @ 126 NONAME ; void CalenMonthView::updateModelWithFutureMonth(void)
- ?monthDataList@CalenMonthView@@QAE?AV?$QList@VCalenMonthData@@@@XZ @ 127 NONAME ; class QList<class CalenMonthData> CalenMonthView::monthDataList(void)
- ?updateMonthGridModel@CalenMonthGrid@@QAEXAAV?$QList@VCalenMonthData@@@@H_N@Z @ 128 NONAME ; void CalenMonthGrid::updateMonthGridModel(class QList<class CalenMonthData> &, int, bool)
- ??1CalenMonthGrid@@UAE@XZ @ 129 NONAME ; CalenMonthGrid::~CalenMonthGrid(void)
- ?metaObject@CalenThickLinesDrawer@@UBEPBUQMetaObject@@XZ @ 130 NONAME ; struct QMetaObject const * CalenThickLinesDrawer::metaObject(void) const
- ?updateWeekNumGridModel@CalenMonthView@@AAEXXZ @ 131 NONAME ; void CalenMonthView::updateWeekNumGridModel(void)
- ?qt_metacast@CalenThickLinesDrawer@@UAEPAXPBD@Z @ 132 NONAME ; void * CalenThickLinesDrawer::qt_metacast(char const *)
- ?prepareForPopulation@CalenMonthView@@AAEXXZ @ 133 NONAME ; void CalenMonthView::prepareForPopulation(void)
- ?handlePreviewPaneGesture@CalenMonthView@@QAEX_N@Z @ 134 NONAME ; void CalenMonthView::handlePreviewPaneGesture(bool)
- ?updateDayLabel@CalenMonthView@@AAEXXZ @ 135 NONAME ; void CalenMonthView::updateDayLabel(void)
- ?setActiveDates@CalenMonthGrid@@AAEXVQDate@@@Z @ 136 NONAME ; void CalenMonthGrid::setActiveDates(class QDate)
- ?trUtf8@CalenMonthView@@SA?AVQString@@PBD0@Z @ 137 NONAME ; class QString CalenMonthView::trUtf8(char const *, char const *)
- ?setContextForActiveDay@CalenMonthView@@QAEXH@Z @ 138 NONAME ; void CalenMonthView::setContextForActiveDay(int)
- ?trUtf8@CalenSettingsView@@SA?AVQString@@PBD0@Z @ 139 NONAME ; class QString CalenSettingsView::trUtf8(char const *, char const *)
- ??_ECalenSettingsView@@UAE@I@Z @ 140 NONAME ; CalenSettingsView::~CalenSettingsView(unsigned int)
- ??_ECalenThickLinesDrawer@@UAE@I@Z @ 141 NONAME ; CalenThickLinesDrawer::~CalenThickLinesDrawer(unsigned int)
- ?metaObject@CalenSettingsView@@UBEPBUQMetaObject@@XZ @ 142 NONAME ; struct QMetaObject const * CalenSettingsView::metaObject(void) const
- ?getStaticMetaObject@CalenMonthView@@SAABUQMetaObject@@XZ @ 143 NONAME ; struct QMetaObject const & CalenMonthView::getStaticMetaObject(void)
- ?paint@CalenMonthGrid@@EAEXPAVQPainter@@PBVQStyleOptionGraphicsItem@@PAVQWidget@@@Z @ 144 NONAME ; void CalenMonthGrid::paint(class QPainter *, class QStyleOptionGraphicsItem const *, class QWidget *)
- ?qt_metacast@CalenSettingsView@@UAEPAXPBD@Z @ 145 NONAME ; void * CalenSettingsView::qt_metacast(char const *)
- ?tr@CalenMonthGrid@@SA?AVQString@@PBD0@Z @ 146 NONAME ; class QString CalenMonthGrid::tr(char const *, char const *)
- ?qt_metacall@CalenMonthView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 147 NONAME ; int CalenMonthView::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?setActiveDay@CalenMonthView@@AAEXVQDateTime@@@Z @ 148 NONAME ; void CalenMonthView::setActiveDay(class QDateTime)
- ?itemActivated@CalenMonthGrid@@QAEXABVQModelIndex@@@Z @ 149 NONAME ; void CalenMonthGrid::itemActivated(class QModelIndex const &)
- ?qt_metacall@CalenMonthGrid@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 150 NONAME ; int CalenMonthGrid::qt_metacall(enum QMetaObject::Call, int, void * *)
- ??_ECalenPreviewPane@@UAE@I@Z @ 151 NONAME ; CalenPreviewPane::~CalenPreviewPane(unsigned int)
- ?createEditor@CalenMonthView@@AAEXXZ @ 152 NONAME ; void CalenMonthView::createEditor(void)
- ?getActiveDay@CalenMonthView@@QAE?AVQDateTime@@XZ @ 153 NONAME ; class QDateTime CalenMonthView::getActiveDay(void)
- ?addRemoveActionsInMenu@CalenMonthView@@AAEXXZ @ 154 NONAME ; void CalenMonthView::addRemoveActionsInMenu(void)
- ?disconnectAboutToQuitEvent@CalenDayView@@QAEXXZ @ 155 NONAME ; void CalenDayView::disconnectAboutToQuitEvent(void)
- ?captureScreenshot@CalenNativeView@@QAEX_N@Z @ 156 NONAME ; void CalenNativeView::captureScreenshot(bool)
+ ?captureScreenshot@CalenNativeView@@QAEX_N@Z @ 105 NONAME ; void CalenNativeView::captureScreenshot(bool)
+ ?GetInstanceListL@CalenPreviewPane@@AAEXXZ @ 106 NONAME ; void CalenPreviewPane::GetInstanceListL(void)
+ ?getInstanceList@CalenMonthView@@AAEXAAV?$QList@VQDate@@@@VQDateTime@@1@Z @ 107 NONAME ; void CalenMonthView::getInstanceList(class QList<class QDate> &, class QDateTime, class QDateTime)
+ ?tr@CalenMonthView@@SA?AVQString@@PBD0@Z @ 108 NONAME ; class QString CalenMonthView::tr(char const *, char const *)
+ ??0CalenMonthGrid@@QAE@PAVQGraphicsItem@@@Z @ 109 NONAME ; CalenMonthGrid::CalenMonthGrid(class QGraphicsItem *)
+ ?refreshViewOnGoToDate@CalenMonthView@@EAEXXZ @ 110 NONAME ; void CalenMonthView::refreshViewOnGoToDate(void)
+ ?appendRows@CalenMonthGrid@@QAEXXZ @ 111 NONAME ; void CalenMonthGrid::appendRows(void)
+ ?HandleNotification@CalenAgendaView@@UAEXW4TCalenNotification@@@Z @ 112 NONAME ; void CalenAgendaView::HandleNotification(enum TCalenNotification)
+ ?tr@CalenThickLinesDrawer@@SA?AVQString@@PBD0H@Z @ 113 NONAME ; class QString CalenThickLinesDrawer::tr(char const *, char const *, int)
+ ??0CalenPluginLabel@@QAE@AAVMCalenServices@@PAVQGraphicsItem@@@Z @ 114 NONAME ; CalenPluginLabel::CalenPluginLabel(class MCalenServices &, class QGraphicsItem *)
+ ?mouseReleaseEvent@CalenMonthGrid@@EAEXPAVQGraphicsSceneMouseEvent@@@Z @ 115 NONAME ; void CalenMonthGrid::mouseReleaseEvent(class QGraphicsSceneMouseEvent *)
+ ?updateMonthGridWithInActiveMonths@CalenMonthGrid@@QAEXAAV?$QList@VCalenMonthData@@@@@Z @ 116 NONAME ; void CalenMonthGrid::updateMonthGridWithInActiveMonths(class QList<class CalenMonthData> &)
+ ?getCurrentDay@CalenMonthView@@QAE?AVQDateTime@@XZ @ 117 NONAME ; class QDateTime CalenMonthView::getCurrentDay(void)
+ ?staticMetaObject@CalenPreviewPane@@2UQMetaObject@@B @ 118 NONAME ; struct QMetaObject const CalenPreviewPane::staticMetaObject
+ ?doPopulation@CalenAgendaView@@UAEXXZ @ 119 NONAME ; void CalenAgendaView::doPopulation(void)
+ ?tr@CalenSettingsView@@SA?AVQString@@PBD0@Z @ 120 NONAME ; class QString CalenSettingsView::tr(char const *, char const *)
+ ?onTwoSecondsTimeout@CalenPreviewPane@@QAEXXZ @ 121 NONAME ; void CalenPreviewPane::onTwoSecondsTimeout(void)
+ ?tr@CalenThickLinesDrawer@@SA?AVQString@@PBD0@Z @ 122 NONAME ; class QString CalenThickLinesDrawer::tr(char const *, char const *)
+ ?staticMetaObject@CalenThickLinesDrawer@@2UQMetaObject@@B @ 123 NONAME ; struct QMetaObject const CalenThickLinesDrawer::staticMetaObject
+ ?populateWithInstanceView@CalenMonthView@@AAEXXZ @ 124 NONAME ; void CalenMonthView::populateWithInstanceView(void)
+ ?trUtf8@CalenThickLinesDrawer@@SA?AVQString@@PBD0@Z @ 125 NONAME ; class QString CalenThickLinesDrawer::trUtf8(char const *, char const *)
+ ??1CalenAgendaViewWidget@@UAE@XZ @ 126 NONAME ; CalenAgendaViewWidget::~CalenAgendaViewWidget(void)
+ ?populateLabel@CalenPreviewPane@@QAEXVQDateTime@@@Z @ 127 NONAME ; void CalenPreviewPane::populateLabel(class QDateTime)
+ ?doPopulation@CalenDayView@@UAEXXZ @ 128 NONAME ; void CalenDayView::doPopulation(void)
+ ??1CalenDayView@@UAE@XZ @ 129 NONAME ; CalenDayView::~CalenDayView(void)
+ ?updateModelWithFutureMonth@CalenMonthView@@QAEXXZ @ 130 NONAME ; void CalenMonthView::updateModelWithFutureMonth(void)
+ ?monthDataList@CalenMonthView@@QAE?AV?$QList@VCalenMonthData@@@@XZ @ 131 NONAME ; class QList<class CalenMonthData> CalenMonthView::monthDataList(void)
+ ?updateMonthGridModel@CalenMonthGrid@@QAEXAAV?$QList@VCalenMonthData@@@@H_N@Z @ 132 NONAME ; void CalenMonthGrid::updateMonthGridModel(class QList<class CalenMonthData> &, int, bool)
+ ??1CalenMonthGrid@@UAE@XZ @ 133 NONAME ; CalenMonthGrid::~CalenMonthGrid(void)
+ ?metaObject@CalenThickLinesDrawer@@UBEPBUQMetaObject@@XZ @ 134 NONAME ; struct QMetaObject const * CalenThickLinesDrawer::metaObject(void) const
+ ?updateWeekNumGridModel@CalenMonthView@@AAEXXZ @ 135 NONAME ; void CalenMonthView::updateWeekNumGridModel(void)
+ ?qt_metacast@CalenThickLinesDrawer@@UAEPAXPBD@Z @ 136 NONAME ; void * CalenThickLinesDrawer::qt_metacast(char const *)
+ ?prepareForPopulation@CalenMonthView@@AAEXXZ @ 137 NONAME ; void CalenMonthView::prepareForPopulation(void)
+ ?handlePreviewPaneGesture@CalenMonthView@@QAEX_N@Z @ 138 NONAME ; void CalenMonthView::handlePreviewPaneGesture(bool)
+ ?updateDayLabel@CalenMonthView@@AAEXXZ @ 139 NONAME ; void CalenMonthView::updateDayLabel(void)
+ ?setActiveDates@CalenMonthGrid@@AAEXVQDate@@@Z @ 140 NONAME ; void CalenMonthGrid::setActiveDates(class QDate)
+ ?trUtf8@CalenMonthView@@SA?AVQString@@PBD0@Z @ 141 NONAME ; class QString CalenMonthView::trUtf8(char const *, char const *)
+ ?setContextForActiveDay@CalenMonthView@@QAEXH@Z @ 142 NONAME ; void CalenMonthView::setContextForActiveDay(int)
+ ?trUtf8@CalenSettingsView@@SA?AVQString@@PBD0@Z @ 143 NONAME ; class QString CalenSettingsView::trUtf8(char const *, char const *)
+ ??_ECalenSettingsView@@UAE@I@Z @ 144 NONAME ; CalenSettingsView::~CalenSettingsView(unsigned int)
+ ??_ECalenThickLinesDrawer@@UAE@I@Z @ 145 NONAME ; CalenThickLinesDrawer::~CalenThickLinesDrawer(unsigned int)
+ ?metaObject@CalenSettingsView@@UBEPBUQMetaObject@@XZ @ 146 NONAME ; struct QMetaObject const * CalenSettingsView::metaObject(void) const
+ ?getStaticMetaObject@CalenMonthView@@SAABUQMetaObject@@XZ @ 147 NONAME ; struct QMetaObject const & CalenMonthView::getStaticMetaObject(void)
+ ?changeOrientation@CalenMonthView@@EAEXW4Orientation@Qt@@@Z @ 148 NONAME ; void CalenMonthView::changeOrientation(enum Qt::Orientation)
+ ?paint@CalenMonthGrid@@EAEXPAVQPainter@@PBVQStyleOptionGraphicsItem@@PAVQWidget@@@Z @ 149 NONAME ; void CalenMonthGrid::paint(class QPainter *, class QStyleOptionGraphicsItem const *, class QWidget *)
+ ?tr@CalenMonthGrid@@SA?AVQString@@PBD0@Z @ 150 NONAME ; class QString CalenMonthGrid::tr(char const *, char const *)
+ ?qt_metacast@CalenSettingsView@@UAEPAXPBD@Z @ 151 NONAME ; void * CalenSettingsView::qt_metacast(char const *)
+ ?qt_metacall@CalenMonthView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 152 NONAME ; int CalenMonthView::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?disconnectAboutToQuitEvent@CalenAgendaView@@QAEXXZ @ 153 NONAME ; void CalenAgendaView::disconnectAboutToQuitEvent(void)
+ ?setActiveDay@CalenMonthView@@AAEXVQDateTime@@@Z @ 154 NONAME ; void CalenMonthView::setActiveDay(class QDateTime)
+ ?itemActivated@CalenMonthGrid@@QAEXABVQModelIndex@@@Z @ 155 NONAME ; void CalenMonthGrid::itemActivated(class QModelIndex const &)
+ ?qt_metacall@CalenMonthGrid@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 156 NONAME ; int CalenMonthGrid::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?createEditor@CalenMonthView@@AAEXXZ @ 157 NONAME ; void CalenMonthView::createEditor(void)
+ ??_ECalenPreviewPane@@UAE@I@Z @ 158 NONAME ; CalenPreviewPane::~CalenPreviewPane(unsigned int)
+ ?getActiveDay@CalenMonthView@@QAE?AVQDateTime@@XZ @ 159 NONAME ; class QDateTime CalenMonthView::getActiveDay(void)
+ ?addRemoveActionsInMenu@CalenMonthView@@AAEXXZ @ 160 NONAME ; void CalenMonthView::addRemoveActionsInMenu(void)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/dayview.pri Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,60 @@
+# 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: Project definition include file for Day View
+
+# Input
+
+# Enables panning-effect when swiching between days
+# Uncomment to enable
+#DEFINES += CALENDAYVIEW_PANNING_ENABLED
+
+INCLUDEPATH += ./dayview/inc \
+ $${EPOCROOT}sf/mw/hb/include/hbwidgets/private
+
+DEPENDPATH += ./dayview/inc \
+ ./dayview/src
+
+HEADERS += calendayview.h \
+ calendaycommonheaders.h \
+ calendayutils.h \
+ calendaycontentscrollarea.h \
+ calendayhourscrollarea.h \
+ calendaycontentwidget.h \
+ calendaymodelmanager.h \
+ calendaymodel.h \
+ calendayitemview.h \
+ calendaycontainer.h \
+ calendayinfo.h \
+ calendayitem.h \
+ calendayhourelement.h \
+ calendaystatusstrip.h \
+ calendayeventspane.h
+
+SOURCES += calendayview.cpp \
+ calendayutils.cpp \
+ calendaycontentscrollarea.cpp \
+ calendayhourscrollarea.cpp \
+ calendaycontentwidget.cpp \
+ calendaymodelmanager.cpp \
+ calendaymodel.cpp \
+ calendayitemview.cpp \
+ calendaycontainer.cpp \
+ calendayinfo.cpp \
+ calendayitem.cpp \
+ calendayhourelement.cpp \
+ calendaystatusstrip.cpp \
+ calendayeventspane.cpp
+
+RESOURCES += dayview/resources/calendaywidgets.qrc
+
+# End of file --Don't remove this.
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/inc/calendaycommonheaders.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,67 @@
+/*
+* 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: CalenDay commons.
+*
+*/
+
+#ifndef CALENDAYCOMMONHEADERS_H_
+#define CALENDAYCOMMONHEADERS_H_
+
+// Constants
+
+/*!
+ Default timeout for scrolling between days [ms]
+ */
+const int KCalenScrollDaysTimeout = 600;
+
+/*!
+ Value [%] defines how long (depending on content area width) should horizontal
+ pan gesture be to change day to previous/next.
+ If the gesture is shorter - current view is not changed.
+ */
+const int KCalenHScrollMoveParam = 30; //!< Percentage
+
+/*!
+ Value [degree] defines the max. angle of swipe gesture which should change day.
+ */
+const qreal KCalenSwipeAngle = 30;
+
+
+// Enumerations
+
+/*!
+ \enum CalenPanDirection
+ \brief Enumeration identifies pan gesture directions.
+ */
+enum CalenPanDirection
+{
+ ECalenPanNotSet = 0,
+ ECalenPanVertical,
+ ECalenPanHorizontal
+};
+
+/*!
+ \enum CalenScrollDirection
+ \brief Enumeration identifies horizontal scroll directions of scroll area.
+
+ ECalenScrollNoDayChange means that move does not change the current day.
+ */
+enum CalenScrollDirection
+{
+ ECalenScrollNoDayChange = 0,
+ ECalenScrollToNext,
+ ECalenScrollToPrev
+};
+
+#endif /* CALENDAYCOMMONHEADERS_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/inc/calendaycontainer.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,191 @@
+/*
+* 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: Day view control of calendar
+*
+*/
+
+#ifndef CALENDAYCONTAINER_H
+#define CALENDAYCONTAINER_H
+
+//System includes
+#include <QDateTime>
+
+#include "../../../../../mw/hb/src/hbwidgets/itemviews/hbabstractitemcontainer_p.h"
+
+//User includes
+
+//Forward declarations
+class CalenDayInfo;
+class TouchEventAbsorber;
+
+class CalenDayContainer : public HbAbstractItemContainer
+{
+ Q_OBJECT
+
+public:
+
+ /**
+ * Constructor.
+ */
+ CalenDayContainer(QGraphicsItem *parent = 0);
+
+ /**
+ * Destructor.
+ */
+ ~CalenDayContainer();
+
+ /**
+ *
+ */
+ void itemAdded (int index, HbAbstractViewItem *item, bool animate);
+
+ /**
+ *
+ */
+ void itemRemoved (HbAbstractViewItem *item, bool animate);
+
+ /**
+ *
+ */
+ void reset();
+
+ /**
+ *
+ */
+ void viewResized (const QSizeF &size);
+
+ /**
+ * Sets day's info structer to the container.
+ *
+ * @param dayInfo Day info.
+ */
+ void setDayInfo( CalenDayInfo* dayInfo );
+
+public slots:
+
+ /**
+ * Slot handles layout switch.
+ * @param orientation Current device orientation
+ */
+ void orientationChanged(Qt::Orientation orientation);
+
+protected:
+
+ /**
+ *
+ */
+ HbAbstractViewItem * createDefaultPrototype() const;
+
+ /**
+ *
+ */
+ void setItemModelIndex(HbAbstractViewItem *item, const QModelIndex &index);
+
+ /**
+ * Updates geometry of a timed event.
+ */
+ void updateTimedEventGeometry(HbAbstractViewItem *item,
+ const QModelIndex &index);
+
+ /**
+ * Updates geometry of a all-day events
+ */
+ void updateAllDayEventGeometry(HbAbstractViewItem *item,
+ const QModelIndex &index);
+
+ /**
+ * Structure with event layout values.
+ *
+ * eventAreaX X value for event area start.
+ * eventAreaWidth The width of event area.
+ * eventMargin Margins between the multiple events.
+ * slotHeight Half hour slot's height.
+ * unitInPixels no. of pixels in 1un
+ */
+
+ struct LayoutValues {
+ LayoutValues()
+ :eventAreaX(0),
+ eventAreaWidth(0),
+ eventMargin(0),
+ slotHeight(0),
+ unitInPixels(0),
+ maxColumns(0)
+ {}
+
+ qreal eventAreaX;
+ qreal eventAreaWidth;
+ qreal eventMargin;
+ qreal slotHeight;
+ qreal unitInPixels;
+ int maxColumns;
+ };
+
+ /**
+ * Gets event layout values.
+ *
+ * @param layoutValues structure to be filled with layout data
+ */
+ void getTimedEventLayoutValues(LayoutValues& layoutValues);
+
+
+ /**
+ * creates absorbers which prevent touching to small items
+ * (according to UI spec items smaller than ... are untouchable)
+ */
+ void createTouchEventAbsorbers();
+
+ /**
+ *
+ */
+ TouchEventAbsorber* crateAbsorberBetweenSlots(int startSlot, int endSlot);
+
+private:
+
+ bool mGeometryUpdated;
+
+ QDateTime mDateTime;
+
+ /**
+ * Day event info.
+ * Not own.
+ */
+ CalenDayInfo* mInfo;
+
+ LayoutValues mLayoutValues;
+ QList<TouchEventAbsorber*> mAbsorbers;
+};
+
+
+
+class TouchEventAbsorber : public HbWidget
+ {
+ Q_OBJECT
+ public:
+ TouchEventAbsorber(QGraphicsItem *parent=0);
+ ~TouchEventAbsorber();
+
+ protected:
+ void gestureEvent(QGestureEvent *event);
+
+#ifdef _DEBUG
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
+ QWidget *widget);
+#endif
+
+ };
+
+#endif // CALENDAYCONTAINER_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/inc/calendaycontentscrollarea.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,80 @@
+/*
+ * 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: CalenDayContentScrollArea class definition.
+ *
+ */
+
+#ifndef CALENDAYCONTENTSCROLLAREA_H_
+#define CALENDAYCONTENTSCROLLAREA_H_
+
+// System includes
+#include <hbscrollarea.h>
+
+// User includes
+#include "calendaycommonheaders.h"
+
+// Class declaration
+class CalenDayContentScrollArea : public HbScrollArea
+{
+Q_OBJECT
+
+public:
+ CalenDayContentScrollArea(QGraphicsItem *parent = 0);
+ virtual ~CalenDayContentScrollArea();
+
+signals:
+ void scrollAreaMoveStarted(CalenScrollDirection scrollTo);
+ void scrollAreaMoveFinished(CalenScrollDirection scrollTo);
+
+public slots:
+ void scrollToMiddleWidget();
+
+protected:
+ bool scrollByAmount(const QPointF &delta);
+
+ void gestureEvent(QGestureEvent *event);
+ bool eventFilter(QObject *obj, QEvent *event);
+ bool event(QEvent *e);
+
+private: // private functions
+ void checkPanDirection(QPanGesture *panGesture);
+ void moveTo(const QPointF &newPosition, int time = 0);
+
+private slots:
+ void moveFinished();
+ void orientationChanged(Qt::Orientation orientation);
+
+private: // data
+ QPointF mStartPosition; //!< Start position of movement
+
+ qreal mContentWidth; //!< Content width
+
+ Qt::Orientation mOrientation; //!< Stores current orientation
+
+ /*!
+ \brief Pan gesture direction indicator
+
+ Member is used when switching widgets by panning gesture is enabled.
+ */
+ CalenPanDirection mPanDayDirection;
+
+ bool mIsMoving; //!< Indicates if moving of scroll area is in progress
+
+ /*!
+ \brief Scroll area horizontal move direction
+ */
+ CalenScrollDirection mMoveDirection;
+};
+
+#endif /* CALENDAYCONTENTSCROLLAREA_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/inc/calendaycontentwidget.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,75 @@
+/*
+ * 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: CalenDayContentWidget class definition.
+ *
+ */
+
+#ifndef CALENDAYCONTENTWIDGET_H_
+#define CALENDAYCONTENTWIDGET_H_
+
+// System includes
+#include <hbwidget.h>
+
+// User includes
+#include "calendaycommonheaders.h"
+
+// Forward declarations
+class QGraphicsLinearLayout;
+class CalenDayModelManager;
+
+
+class CalenDayContentWidget : public HbWidget
+{
+Q_OBJECT
+
+public:
+ /*!
+ \enum CalenWidgetPosition
+ \brief Enumeration identifies widget position if queue.
+ */
+ enum CalenWidgetPosition
+ {
+ ECalenLastWidget = 0,
+ ECalenFirstWidget
+ };
+
+public:
+ CalenDayContentWidget(CalenDayModelManager &modelManager,
+ QGraphicsItem *parent = 0);
+ ~CalenDayContentWidget();
+
+ void add(HbWidget* item, CalenWidgetPosition where = ECalenLastWidget);
+ HbWidget* take(CalenWidgetPosition which);
+ void remove(CalenWidgetPosition which);
+
+signals:
+ void widgetsRelayoutFinished(CalenScrollDirection scrollTo);
+ void scrollPositionChanged(const QPointF &newPos);
+
+public slots:
+ void relayoutWidgets(CalenScrollDirection scrollTo);
+ void widgetScrolled(const QPointF &newPos);
+
+private:
+ void initializeViews(QGraphicsItem *parent);
+
+private:
+ QGraphicsLinearLayout* mLayout; //!< Linear layout for day views
+
+ QList<HbWidget*> mWidgets; //!< List of widget instances
+
+ CalenDayModelManager &mModelManager; //!< Reference to model manager
+};
+
+#endif /* CALENDAYCONTENTWIDGET_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/inc/calendayeventspane.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,44 @@
+/*
+* 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: Day view control of calendar
+*
+*/
+
+#ifndef CALENDAYEVENTSPANE_H_
+#define CALENDAYEVENTSPANE_H_
+
+// System includes
+#include <QPen>
+#include <HbWidget>
+
+class CalenDayEventsPane : public HbWidget
+{
+public:
+ CalenDayEventsPane(HbWidget *parent=0);
+ virtual ~CalenDayEventsPane();
+
+ void drawTopLine(bool drawTopLine = false);
+
+protected:
+ void paint(QPainter * painter, const QStyleOptionGraphicsItem * option,
+ QWidget * widget);
+
+private:
+ QColor mHourLineColor;
+ qreal mUnitInPixels;
+ QPen mCustomDashedPen;
+ bool mDrawTopLine; //!< Flag indicates if top line should be drawn
+};
+
+#endif /* CALENDAYEVENTSPANE_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/inc/calendayhourelement.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,61 @@
+/*
+* 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: Day view control of calendar
+*
+*/
+
+#ifndef CALENDAYHOURELEMENT_H
+#define CALENDAYHOURELEMENT_H
+
+//System includes
+#include <QTime>
+#include <QPen>
+#include <hbwidget.h>
+
+//User includes
+
+
+//Forward declarations
+class CalenDayHourScrollArea;
+
+class CalenDayHourElement : public HbWidget
+{
+ Q_OBJECT
+
+public:
+
+ /**
+ * Constructor.
+ */
+ CalenDayHourElement(const QTime &time, QGraphicsItem *parent=0);
+
+ /**
+ * Destructor.
+ */
+ virtual ~CalenDayHourElement();
+
+ /**
+ *
+ */
+ void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget);
+
+private:
+
+ CalenDayHourScrollArea *mContainer;
+ QTime mHour;
+ QColor mHourLineColor;
+ qreal mUnitInPixels;
+};
+
+#endif // CALENDAYHOURELEMENT_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/inc/calendayhourscrollarea.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,52 @@
+/*
+ * 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: CalenDayHourScrollArea class definition.
+ *
+ */
+
+#ifndef CALENDAYHOURSCROLLAREA_H_
+#define CALENDAYHOURSCROLLAREA_H_
+
+// System includes
+#include <hbscrollarea.h>
+#include <QDateTime>
+
+// User includes
+#include "calendaycommonheaders.h"
+
+//forward declarations
+class CalenDayHourElement;
+
+// Class declaration
+class CalenDayHourScrollArea : public HbScrollArea
+{
+Q_OBJECT
+
+public:
+ CalenDayHourScrollArea(QGraphicsItem *parent = 0);
+ virtual ~CalenDayHourScrollArea();
+ void setDateTime(const QDateTime &dateTime);
+ QDateTime dateTime() const;
+
+ void scrollToHour(int hour);
+
+public slots:
+ void scrollVertically(const QPointF &newPosition);
+
+private:
+ QDateTime mDateTime;
+ QList<CalenDayHourElement*> mHourElements;
+};
+
+#endif /* CALENDAYHOURSCROLLAREA_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/inc/calendayinfo.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,759 @@
+/*
+* Copyright (c) 2007-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: Storage class for day and week views.
+*
+*/
+
+#ifndef CALENDAYINFO_H
+#define CALENDAYINFO_H
+
+// INCLUDES
+#include <e32std.h>
+#include <QList>
+#include <QDateTime>
+#include <QAbstractItemModel>
+
+#include <calinstance.h>
+#include "caleninstanceid.h"
+
+
+//
+/** Scrolling directions **/
+enum TScrollDirection
+ {
+ EScrollUp,
+ EScrollDown,
+ EScrollLeft,
+ EScrollRight
+ };
+
+//Constants
+const int KFSCalMaxDescriptionLength = 100;
+const int KFSCalStartingHour = 8;
+const int KFSCalSlotsInHour = 2;
+
+/**
+ * An interval containing a start and end slot.
+ * The start slot belongs to the interval, the end slot
+ * is the first slot outside of the interval. If the end slot
+ * is before or at the same slot as the start slot, the interval
+ * is considered empty.
+ */
+class CalenSlotInterval
+ {
+public:
+ /**
+ * Check if this interval overlaps the second interval.
+ */
+ bool Overlaps( const CalenSlotInterval& aInterval ) const;
+
+ /**
+ * Add aOffset to all slot coordinates later than aPos
+ */
+ void AddOffset( int aOffset, int aPos );
+
+ /**
+ * Set this interval to be the minimum interval
+ * containing both this original interval and aInterval.
+ */
+ void Union( const CalenSlotInterval& aInterval );
+
+ /**
+ * Check if aInterval lies directly next to this interval.
+ */
+ bool Adjacent( const CalenSlotInterval& aInterval ) const;
+
+ /**
+ * Check if this interval is empty.
+ */
+ bool IsEmpty() const;
+
+ /**
+ * Set this interval to be the area contained in both
+ * this interval and to aInterval.
+ */
+ void Intersect( const CalenSlotInterval& aInterval );
+
+ /**
+ * Remove aInterval from this interval. If aInterval lies
+ * within this interval, the result is two separate intervals.
+ * This object contains one of them, aSecondPart contains the other one.
+ * If the result is just one single interval, this interval contains that
+ * and aSecondPart is set to an empty interval.
+ */
+ void Subtract( const CalenSlotInterval& aInterval, CalenSlotInterval& aSecondPart );
+
+ /**
+ * Check if this interval starts later than aInterval.
+ */
+ bool operator>( const CalenSlotInterval& aInterval ) const;
+
+ /**
+ * The starting slot of the interval. This is the first slot
+ * that belongs to the interval.
+ */
+ int iStartSlot;
+
+ /**
+ * The ending slot of the interval. This is the first slot
+ * that doesn't belong to the interval.
+ */
+ int iEndSlot;
+ };
+
+
+/**
+ * Class for storing a calendar instance and the range it occupies.
+ */
+struct CalenTimedEventInfo : public CalenSlotInterval
+ {
+public:
+ /**
+ * The id of the calendar instance
+ */
+ TCalenInstanceId iId;
+
+ /**
+ * Status of the entry, needed for setting the displayed color later
+ */
+ AgendaEntry::Status iStatus;
+
+ /**
+ * Replication status of the entry, needed for setting the displayed color
+ * later.
+ */
+// AgendaEntry::TReplicationStatus iReplicationStatus;
+ };
+
+/**
+ * Class for storing general time intervals and their associated
+ * status (needed for displaying the interval).
+ */
+struct CalenEventInterval : public CalenSlotInterval
+ {
+public:
+ /**
+ * The status of this interval, if it represents only one calendar
+ * instance.
+ */
+ AgendaEntry::Status iStatus;
+
+ /**
+ * The replication status of this interval, if it represents only one
+ * calendar instance.
+ */
+// AgendaEntry::TReplicationStatus iReplicationStatus;
+
+ /**
+ * A flag saying that this interval represents a conflict between two or
+ * more calendar instances.
+ */
+ bool iOverlap;
+ };
+
+
+
+/**
+ * A class containing a sequence of non-overlapping events,
+ * visualised as a column.
+ */
+class CalenTimeColumn : public CalenSlotInterval
+ {
+public:
+
+ /**
+ * Explicitly frees the memory used by the event array.
+ */
+ void Close();
+
+ /**
+ * Add a new event to this column. Events must be added sequentially,
+ * and must not overlap earlier events in this column.
+ */
+ void AddEvent( const CalenTimedEventInfo& aEvent );
+
+ /**
+ * Check if a new event can be added to this column.
+ */
+ bool CanFitEvent( const CalenTimedEventInfo& aEvent );
+
+ /**
+ * Check if this column contains an event with the id aId.
+ */
+ bool ContainsEvent( const TCalenInstanceId& aId );
+
+ /**
+ * Add aOffset to all slot coordinates later than aPos
+ */
+ void AddOffset( int aOffset, int aPos );
+
+ /**
+ * Event array.
+ */
+ QList<CalenTimedEventInfo> iEventArray;
+ };
+
+
+/**
+ * A class containing one or more columns with events,
+ * where every event overlaps at least one event in some other
+ * column. (Otherwise that event should be added to a separate region.)
+ */
+class CalenTimeRegion : public CalenSlotInterval
+ {
+public:
+
+ /**
+ * Explicitly frees the memory used by data structures.
+ */
+ void Close();
+
+ /**
+ * Check if the given interval overlaps with this region.
+ */
+ bool Overlaps( const CalenSlotInterval& aInterval ) const;
+
+ /**
+ * Add an event to this region. Events must be added sequentially,
+ * and must overlap this region (unless it's the first event of the region).
+ */
+ void AddEvent( const CalenTimedEventInfo& aEvent );
+
+ /**
+ * Add aOffset to all slot coordinates later than aPos
+ */
+ void AddOffset( int aOffset, int aPos );
+
+private:
+
+ /**
+ * Add the event to the bookkeeping of overlapping/nonoverlapping
+ * intervals.
+ */
+ void AddInterval( const CalenTimedEventInfo& aEvent );
+
+public:
+
+ QList<CalenTimeColumn> iColumns;
+ QList<CalenEventInterval> iIntervals;
+ };
+
+
+/**
+ * A container struct, used by the clients of the slot info storage,
+ * to provide data in.
+ */
+struct SCalenApptInfo
+ {
+ QModelIndex iIndex;
+ QDateTime iStartTime;
+ QDateTime iEndTime;
+ bool iAllDay;
+ TCalenInstanceId iId;
+ AgendaEntry::Status iStatus;
+// AgendaEntry::TReplicationStatus iReplicationStatus;
+ TBufC<KFSCalMaxDescriptionLength> iSummary;
+ TUint32 iColor;
+ };
+
+
+/**
+ * Storage class for storing all calendar instances within one day. This
+ * class organises the data according to the way it will be needed in the
+ * day and week view.
+ */
+class CalenDayInfo
+ {
+public:
+
+ enum TSlotsInHour
+ {
+ EOne = 1,
+ ETwo,
+ EThree,
+ EFour
+ };
+
+public: // Constructors and destructor
+
+ /**
+ * C++ default constructor.
+ */
+ CalenDayInfo( TSlotsInHour aSlotsInHour );
+
+ /**
+ * Destructor
+ */
+ virtual ~CalenDayInfo();
+
+
+public: // New functions
+
+ /**
+ * Reset the storage, remove all data and set the state back to normal.
+ */
+ void Reset();
+
+ /**
+ * Add a timed event. All timed events must be added in increasing
+ * order (sorted by starting time).
+ */
+ void InsertTimedEvent( const SCalenApptInfo& aItemInfo );
+
+ /**
+ * Add an untimed event.
+ */
+// void InsertUntimedEventL( const CCalInstance& aInstance );
+
+ /**
+ * Add an untimed event. (Nonleaving version, useful for testing.)
+ */
+ void InsertUntimedEvent( AgendaEntry::Type aType,
+ const TCalenInstanceId& aId );
+ /**
+ * Add an allday event.
+ */
+ void InsertAlldayEvent( const SCalenApptInfo& aItemInfo );
+
+ /**
+ * Is the given event allday event
+ * @param aStart time to be checked
+ * @param aEnd time to be checked
+ * @return true if this is allday event, false otherwise
+ */
+ static bool IsAlldayEvent( QDateTime aStart, QDateTime aEnd );
+
+ /**
+ * Is the given event allday event
+ * @param aInstance Instance to be checked
+ * @return true if this is allday event, false otherwise
+ */
+// static bool IsAlldayEvent( const CCalInstance& aInstance );
+
+ /**
+ * Return the slot number where this class would insert the
+ * untimed events if nothing else is specified.
+ */
+ int SuggestedUntimedSlotPos();
+
+ /**
+ * Return how many untimed slots is needed for this day.
+ */
+ int NeededUntimedSlotCount();
+
+ /**
+ * Update the indexing to take the current amount of untimed slots
+ * into account. This must be called after all untimed events
+ * have been added.
+ *
+ * @param aSlot the slot where the untimed events are to be added.
+ * If negative, uses the default, otherwise aSlot must
+ * be less than or equal to the default position as
+ * returned by SuggestedUntimedSlotPos().
+ * @param aUntimedCount the number of slots to insert for untimed events. If
+ * aSlot is specified, this must be larger or equal
+ * to NeededUntimedSlotCount().
+ */
+ int UpdateUntimedPos( int aSlot = -1, int aUntimedCount = 0 );
+
+ /**
+ * Return the first slot containing a non-allday event.
+ * If this class doesn't contain any data, returns KErrNotFound.
+ */
+ int FirstOccupiedSlot();
+
+ /**
+ * Return the last slot containing a non-allday event.
+ * If this class doesn't contain any data, returns KErrNotFound.
+ */
+ int LastOccupiedSlot();
+
+ int EarliestEndSlot();
+ int LastStartSlot();
+
+
+ /**
+ * Convert a starting time into a slot index.
+ */
+ int SlotIndexForStartTime( QDateTime aStartTime );
+
+ /**
+ * Convert an ending time into a slot index.
+ */
+ int SlotIndexForEndTime( QDateTime aStartTime );
+
+ /**
+ * Get information about where the item aItemInfo
+ * should be displayed. The parameters are filled
+ * on return.
+ *
+ * @param aStartSlot the first slot of the event
+ * @param aEndSlot the first slot after the event
+ * @param aColumnIndex the column in which this event is located
+ * @param aColumns the total number of columns in the region
+ * this event belongs to
+ */
+ void GetLocation( const SCalenApptInfo& aItemInfo,
+ int& aStartSlot,
+ int& aEndSlot,
+ int& aColumnIndex,
+ int& aColumns );
+
+ /**
+ * Get the number of allday events
+ */
+ int AlldayCount();
+
+ /**
+ * Get the number of todo events
+ */
+ int TodoCount();
+
+ /**
+ * Check if a slot is the first slot of an hour.
+ */
+ bool IsHourStartSlot( const int& aSlotIndex ) const;
+
+ /**
+ * Check if a slot is an extra slot (for untimed events).
+ */
+ bool IsExtraSlot( const int& aSlotIndex ) const;
+
+ /**
+ * Convert a slot index into a hour
+ */
+ int HourFromSlotIndex( const int& aSlotIndex ) const;
+
+ /**
+ * Convert a hour into a slot index.
+ */
+ int SlotIndexFromHour( int aHour );
+
+ /**
+ * Rounds the slot number up (towards earlier hours) to an even hour
+ */
+ int RoundHourUp( int aSlot );
+
+ /**
+ * Rounds the slot number down (towards later hours) to an even hour
+ */
+ int RoundHourDown( int aSlot );
+
+ /**
+ * Get the starting slot of the current selection
+ */
+ void GetSelectedSlot( int& aSlot, int& aRegion, int& aColumnIndex, int& aColumns );
+
+ /**
+ * Try to move the selection in the given direction
+ *
+ * @return true if able to move the selection, false if
+ * unable to move (indicating that the selection should move
+ * to the next/previous day).
+ */
+ bool MoveSelection( TScrollDirection aDirection );
+
+ /**
+ * Move the selected slot within the currently selected event.
+ */
+ void MoveSelectionInEvent( TScrollDirection aDirection );
+
+ /**
+ * Make sure the selected slot within the currently selected event is valid.
+ */
+ void UpdateSelectionInEvent();
+
+ /**
+ * Check if any event currently is selected.
+ */
+ bool IsEventSelected() const;
+
+ /**
+ * Check if the current selection actually denotes
+ * more than one event (the todo event slot is selected,
+ * containing more than one todo).
+ */
+ bool IsMultipleEventsSelected() const;
+
+ /**
+ * Check if an allday event currently is selected.
+ */
+ bool IsAlldayEventSelected() const;
+
+ /**
+ * Get the instance id of the currently selected event.
+ */
+ TCalenInstanceId SelectedEvent();
+
+ /**
+ * Update the state to make the given calendar instance selected
+ *
+ * @return KErrNotFound if the instance isn't found, KErrNone otherwise.
+ */
+ int SelectEvent( const TCalenInstanceId& aId );
+
+ /**
+ * Get the instance id of an untimed event. Maximally one
+ * todo event is counted into this, i.e. aIndex = 1 never returns
+ * a todo event even though there are more than one.
+ */
+ TCalenInstanceId UntimedEvent( int aIndex );
+
+ /**
+ * Get info about an allday event.
+ */
+ const CalenTimedEventInfo& AlldayEvent( int aIndex );
+
+ /**
+ * Move the selection to the given slot, possibly selecting
+ * an event.
+ */
+ void SelectSlot( int aSlot );
+
+ /**
+ * Return the list of regions.
+ */
+ const QList<CalenTimeRegion>& RegionList() const;
+
+ /**
+ * Get the list of event intervals (for use in week view and ribbon).
+ */
+ void GetEventIntervals( QList<CalenEventInterval>& aArray ) const;
+
+ /**
+ * Return the interval which is selected currently.
+ */
+ CalenSlotInterval SelectedInterval();
+
+ /**
+ * Sets selection within a region
+ *
+ * @param aRegion Region index.
+ * @param aColumn Column index.
+ * @param aSlot Slot number (has to be aligned to full hour).
+ */
+ bool SetSelectionInRegion( int aRegion, int aColumn, int aSlot );
+
+private:
+
+ enum TMoveDirection
+ {
+ EMoveDirectionUp = -1,
+ EMoveDirectionDown = 1
+ };
+
+ /**
+ * See if any region overlaps the given interval. Regions are searched
+ * in the direction specified by aDirection, e.g. if aDirection < 0,
+ * this returns the last overlapping region, if aDirection > 0, returns
+ * the first overlapping instead.
+ *
+ * @return the index of the found overlapping region, or -1 if no
+ * matching region was found.
+ */
+ int FindRegion( const CalenSlotInterval& aInterval, int aDirection );
+
+ /**
+ * See if any event overlaps the given interval within the current column.
+ * Events are searched in the direction specified by aDirection,
+ * e.g. if aDirection < 0, this returns the last overlapping event,
+ * if aDirection > 0, returns the first overlapping instead.
+ *
+ * @return the index within the column of the overlapping event, or -1 if no
+ * matching event was found.
+ */
+ int FindEvent( const CalenSlotInterval& aInterval, int aDirection );
+
+ /**
+ * Update the selection state by selecting the first event which ends at
+ * the end of the current region.
+ */
+ void EnterRegionFromBelow();
+
+ /**
+ * Update the selection state by selecting the first event which starts
+ * at the start of the current region.
+ */
+ void EnterRegionFromAbove();
+
+ /**
+ * Try to move the selection in the given direction, when an
+ * empty area is selected.
+ *
+ * @return true if able to move the selection, false if
+ * unable to move (indicating that the selection should move
+ * to the next/previous day).
+ */
+ bool MoveInEmptyArea( TScrollDirection aDirection );
+
+ /**
+ * Try to move the selection in the given direction, when the
+ * selection is in a region.
+ *
+ * @return true if able to move the selection, false if
+ * unable to move (indicating that the selection should move
+ * to the next/previous day).
+ */
+ bool MoveInRegion( TScrollDirection aDirection );
+
+ /**
+ * Try to move the selection in the given direction, when an
+ * allday event is selected
+ *
+ * @return true if able to move the selection, false if
+ * unable to move (indicating that the selection should move
+ * to the next/previous day).
+ */
+ bool MoveInAlldayEvent( TScrollDirection aDirection );
+
+ /**
+ * Update the selection state by moving from one ordinary event column
+ * to another, in the given direction
+ */
+ void MoveBetweenColumns( TScrollDirection aDirection );
+
+ /**
+ * Update the selection state by moving in the given direction
+ */
+ void MoveInColumn( int aDirection );
+
+ /**
+ * The selection should be moved out of the current region (in the given
+ * direction), update the selection state according to what there is
+ * outside of the region.
+ */
+ void MoveOutFromRegion( int aDirection );
+
+ /**
+ * Set the selected slot within the current event according to the selection
+ * direction.
+ */
+ void SetSelectionInEvent( int aDirection );
+
+ /**
+ * Determines how large area to scan for new events/regions when moving in the
+ * given direction.
+ *
+ * I.e., if moving upwards, returns the whole interval from the start of aInterval
+ * up to the next slot which can be focused as an empty slot. If aInterval doesn't
+ * start on an even hour, the returned interval is from the start of the first whole
+ * hour before the interval, to the start of aInterval.
+ *
+ * If moving downwards, returns the whole interval from the end of aInterval to the
+ * end of the next whole hour after the interval.
+ *
+ */
+ CalenSlotInterval NextFocusArea( const CalenSlotInterval& aInterval, int aDirection );
+
+ /**
+ * Return the next slot to focus if moving in the given direction from the interval
+ * and focusing an empty slot.
+ */
+ int NextEmptyFocusSlot( const CalenSlotInterval& aInterval, int aDirection );
+
+ /**
+ * Return the interval which the current selection state represents, if
+ * an empty area is selected.
+ */
+ CalenSlotInterval EmptySelectionInterval();
+
+ /**
+ * Backup the whole selection state.
+ */
+ void StoreOrigSelection();
+
+ /**
+ * Check if the current selection state is valid, if not, reset it
+ * to the backed up copy
+ * @return true if selection state is valid, false if not.
+ */
+ bool ValidateSelection();
+
+private: // New data
+
+ QList<CalenTimeRegion> iRegionList;
+ QList<TCalenInstanceId> iUntimedEvents;
+ QList<TCalenInstanceId> iTodoEvents;
+ QList<CalenTimedEventInfo> iAlldayEvents;
+
+ int iLastStartSlot;
+ int iEarliestEndSlot;
+ /**
+ * The total number of untimed slots.
+ */
+ int iUntimedSlotCount;
+ /**
+ * The slot index of the first untimed slot.
+ */
+ int iFirstUntimedSlot;
+ /**
+ * The number of empty untimed slots.
+ */
+ int iEmptyUntimedSlots;
+ /**
+ * The number of slots per hour.
+ */
+ TSlotsInHour iSlotsInHour;
+
+ /**
+ * Chooses which allday event is selected. If none currently is selected,
+ * this is negative. This variable overrides the rest selection variables.
+ * If this points to an allday event, the other variables are ignored,
+ * except iSelectedSlot which is used for returning to the original place
+ * if moving back to the ordinary events.
+ */
+ int iSelectedAlldayEvent;
+
+ /**
+ * Chooses which region currently is selected. If none currently is selected,
+ * this is negative. If this points to a region, iSelectedColumn and
+ * iSelectedColumnEventIndex are taken into account.
+ */
+ int iSelectedRegion;
+
+ /**
+ * Chooses which column is selected within the currently selected region.
+ * If this is equal to the number of columns, the last, implicit, empty column
+ * is selected.
+ */
+ int iSelectedColumn;
+ /**
+ * Chooses which event is selected within the currently selected column. If
+ * none is selected, this is negative.
+ */
+ int iSelectedColumnEventIndex;
+ /**
+ * Chooses which slot in the day currently is in focus. This must always point
+ * to a valid slot. If an event is selected within a column, it points to an
+ * slot within that event. If no event is selected, it points to the start
+ * of the currently selected empty time region (which is iSlotsInHour slots long).
+ * If an allday event is selected, this points to the last selected slot in the
+ * ordinary day area.
+ */
+ int iSelectedSlot;
+
+ // copies of the current selection state, to be used for reverting to the original
+ // state if the selection is moved to an invalid position
+ int iOrigSelectedAlldayEvent;
+ int iOrigSelectedRegion;
+ int iOrigSelectedColumn;
+ int iOrigSelectedSlot;
+ int iOrigSelectedColumnEventIndex;
+
+ };
+
+#endif // CALENDAYINFO_H
+
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/inc/calendayitem.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,62 @@
+/*
+* 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: Day view control of calendar
+*
+*/
+
+#ifndef CALENDAYITEM_H
+#define CALENDAYITEM_H
+
+//System includes
+#include <hbabstractviewitem.h>
+#include <hbtextitem.h>
+#include <hbframeitem.h>
+
+//Forward declarations
+class AgendaEntry;
+class CalenDayStatusStrip;
+
+
+class CalenDayItem : public HbAbstractViewItem
+{
+ Q_OBJECT
+ Q_PROPERTY( bool eventDescription READ hasEventDescription )
+ Q_PROPERTY( bool backgroundFrame READ hasBackgroundFrame )
+
+public:
+ CalenDayItem();
+ virtual ~CalenDayItem();
+ HbAbstractViewItem * createItem();
+ void updateChildItems();
+ bool hasEventDescription() const { return mEventDesc->isVisible();}
+ bool hasBackgroundFrame() const { return mBg->isVisible();}
+
+protected:
+ void resizeEvent(QGraphicsSceneResizeEvent *event);
+
+private:
+ CalenDayItem(const CalenDayItem &source);
+ void setDescription(const AgendaEntry &entry, bool allDayEvent);
+ void setStatusStrip(const AgendaEntry &entry, bool allDayEvent);
+
+ bool mUpdated;
+ HbFrameItem *mBg;
+ HbTextItem *mEventDesc;
+ CalenDayStatusStrip *mColorStripe;
+ qreal mEventDescMinWidth;
+ qreal mFrameMinWidth;
+
+};
+
+#endif // CALENDAYITEM_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/inc/calendayitemview.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,184 @@
+/*
+* 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: Day view control of calendar
+*
+*/
+
+#ifndef CALENDAYITEMVIEW_H
+#define CALENDAYITEMVIEW_H
+
+//System includes
+#include <hbabstractitemview.h>
+#include <hbmenu.h>
+
+//User includes
+
+//Forward declarations
+class CalenDayInfo;
+class CalenDayContainer;
+class MCalenServices;
+
+class CalenDayItemView : public HbAbstractItemView
+{
+ Q_OBJECT
+
+public:
+ enum CalendarPanDirection {
+ CalendarPanNotSet,
+ CalendarPanVertical,
+ CalendarPanHorizontal
+ };
+
+ enum CalendaRecycleDays {
+ CalendarNoRecycle,
+ CalendarBackwardRecycle,
+ CalendarForwardRecycle
+ };
+
+ /**
+ * Constructor.
+ */
+ CalenDayItemView(MCalenServices &services, HbModelIterator* iterator, QGraphicsItem *parent);
+
+ /**
+ * Destructor.
+ */
+ ~CalenDayItemView();
+
+ /**
+ *
+ */
+ void scrollTo(const QModelIndex &index, HbAbstractItemView::ScrollHint hint = EnsureVisible);
+
+public slots:
+
+ /**
+ *
+ */
+ virtual void reset();
+
+ /**
+ * Handles signal that is emitted when reset() is called, before the model's
+ * internal state (e.g. persistent model indexes) has been invalidated.
+ */
+ void modelAboutToBeReset();
+
+ /**
+ * Handles signal that is emitted when reset() is called, after the model's
+ * internal state (e.g. persistent model indexes) has been invalidated.
+ */
+ void modelReset();
+
+ /**
+ *
+ */
+ void scrollVertically(const QPointF &newPosition);
+
+private slots:
+
+ /**
+ * This function is called when a touch down event is received within Abstract view item that is representing index.
+ */
+ void itemPressed(const QPointF &position);
+
+ /**
+ * This function is called when a touch release event is received within Abstract view item that is representing index.
+ */
+ void itemReleased(const QPointF &position);
+
+ /**
+ * This function is called when the item specified by index is activated by the user.
+ */
+ void itemActivated(const QPointF &position);
+
+ /**
+ * This function is called when long press event is received within Abstract view item viewItem.
+ *
+ * @param item The item.
+ * @param coords is scene position where the long press event happened
+ */
+ void itemLongPressed(HbAbstractViewItem*, QPointF);
+
+ /**
+ * Slot which is called whenever the orientation of the device changes
+ * @param orientation Current device orientation
+ */
+ void orientationChanged(Qt::Orientation orientation);
+
+ /**
+ * Opens currently selected model item.
+ */
+ void openSelectedItem();
+
+ /**
+ * Edits currently selected model item.
+ */
+ void editSelectedItem();
+
+ /**
+ * Deletes currently selected model item.
+ */
+ void deleteSelectedItem();
+
+private:
+
+ /**
+ * Connects item view's slots.
+ */
+ void setupSlots();
+
+ /**
+ * Creates Context menu.
+ */
+ void setupContextMenu();
+
+ /**
+ * Sets context to currently selected model item and issues calendar command.
+ *
+ * @param command Calendar command.
+ */
+ bool issueCommandOnSelectedItem( int command );
+
+ /**
+ * Clears current selection in Selection Model.
+ */
+ void clearSelectionInModel();
+
+private:
+
+ /**
+ * Calendar services. Not owned.
+ */
+ MCalenServices &mServices;
+
+ /**
+ * Item container.
+ */
+ CalenDayContainer* mContainer;
+
+ /**
+ * Day event info.
+ * Own.
+ */
+ CalenDayInfo* mInfo;
+
+ /**
+ * context menu
+ */
+ HbMenu* mContextMenu;
+};
+
+#endif // CALENDAYITEMVIEW_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/inc/calendaymodel.h Tue Jul 06 14:14:56 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: Single day item view model
+*
+*/
+
+#ifndef CALENDAYMODEL_H
+#define CALENDAYMODEL_H
+
+//System includes
+#include <QAbstractItemModel>
+#include <QVariant>
+#include <QDateTime>
+
+#include <agendaentry.h>
+
+//User includes
+
+//Forward declarations
+class MCalenServices;
+
+//Constantss
+const int CalenDayEntry = Qt::UserRole + 1;
+
+Q_DECLARE_METATYPE(AgendaEntry)
+
+class CalenDayModel : public QAbstractListModel
+{
+ Q_OBJECT
+public:
+ CalenDayModel(const QDateTime &date, MCalenServices &services,
+ QObject *parent = 0);
+
+ // from QAbstractListModel
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ QVariant data(const QModelIndex &index, int role) const;
+
+ void refreshModel(const QDateTime &date);
+
+ QDateTime modelDate() const;
+
+
+private:
+ void loadAndStoreInstances(const QDateTime& date);
+
+private:
+ MCalenServices &mServices;
+ QVariantList mEntryList;
+ QDateTime mDateTime;
+};
+
+#endif //CALENDAYMODEL_H
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/inc/calendaymodelmanager.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,69 @@
+/*
+* 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: Model manager holds models for three day views
+*
+*/
+#ifndef CALENDAYMODELMANAGER_H
+#define CALENDAYMODELMANAGER_H
+
+#include <QObject>
+#include <QMap>
+#include <QDateTime>
+
+#include "calendaycommonheaders.h"
+
+class QAbstractItemModel;
+class MCalenServices;
+class CalenDayModel;
+
+class CalenDayModelManager : public QObject
+{
+ Q_OBJECT
+
+public:
+ enum ModelDay {
+ PreviousDay = 0,
+ CurrentDay = 1,
+ NextDay = 2,
+ NumberOfDays
+ };
+
+public:
+ CalenDayModelManager(MCalenServices &services, bool emptyModels,
+ QObject *parent = 0);
+ ~CalenDayModelManager();
+
+ QAbstractItemModel &getModel(CalenDayModelManager::ModelDay day);
+
+ void refreshAllModels();
+ void refreshSingleModel(CalenDayModelManager::ModelDay day);
+ MCalenServices &getServices() {
+ return mServices;
+ }
+
+public slots:
+ void viewsScrollingFinished(CalenScrollDirection scrollTo);
+
+private:
+ void createAllModels();
+ void moveBackward();
+ void moveForeward();
+
+private:
+ QMap<ModelDay, CalenDayModel*> mModels;
+ MCalenServices &mServices;
+ QDateTime mCurrentDayTime;
+};
+
+#endif//CALENDAYMODELMANAGER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/inc/calendaystatusstrip.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,94 @@
+/*
+ * 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: Day view control of calendar
+ *
+ */
+
+
+#ifndef CALENDAYSTATUSSTRIP_H
+#define CALENDAYSTATUSSTRIP_H
+
+#include <QTime>
+#include <HbWidget>
+
+class CalenDayStatusStrip : public HbWidget
+{
+ Q_OBJECT
+ Q_ENUMS(DrawingStyle)
+public:
+ /*!
+ \brief It specifiy how status Strip should be drawed.
+
+ OnlyFrame -- draw not filled rectangle
+ StripWithLines -- draw filled rectangle with transparent diagonal lines
+ Filled -- draw filled rectangle
+ */
+ enum DrawingStyle
+ {
+ OnlyFrame,
+ StripWithLines,
+ Filled
+ };
+
+
+ CalenDayStatusStrip(HbWidget *parent = 0);
+ ~CalenDayStatusStrip();
+
+ qreal range() const;
+
+ QColor color() const;
+
+ CalenDayStatusStrip::DrawingStyle drawingStyle() const;
+
+ QPair<QTime,QTime> startEndTime() const;
+
+ void setRange(qreal mRange);
+
+ void setColor(QColor mStripColor);
+
+ void setDrawingStyle(CalenDayStatusStrip::DrawingStyle mDrawingStyle);
+
+ void setStartEndTime(const QTime &startTime, const QTime &endTime);
+
+
+protected:
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
+ QWidget *widget = 0);
+
+ QPolygonF diagonalLine(QPointF startPoint, qreal dx, qreal dy);
+
+
+ QPair<QTime,QTime> calculateStartEndPostion(
+ const QTime &startTime,
+ const QTime &endTime
+ );
+
+ qreal calculateMinuteHeight(const QTime &start, const QTime &end);
+
+private:
+ qreal mRange; //!<Distanse beatween lines
+ QColor mColor;//!<Color of status stripe
+ CalenDayStatusStrip::DrawingStyle mDrawingStyle;//!<Specify style of drawing
+ /*!
+ Orginal start and end time of event
+ */
+ QPair<QTime,QTime> mStartEndEventTime;
+
+ static const qreal mMinute;//!<It keep info how much seconds are in minute
+ static const qreal mMinimumTime;//!<It keep info about minimum timeline in minutes
+};
+
+Q_DECLARE_METATYPE(CalenDayStatusStrip::DrawingStyle)
+
+#endif // CALENDAYSTATUSSTRIP_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/inc/calendayutils.h Tue Jul 06 14:14:56 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: CalenDayUtils utility class header.
+*
+*/
+
+#ifndef CALENDAYUTILS_H_
+#define CALENDAYUTILS_H_
+
+// Forward declarations
+class HbMainWindow;
+class QDateTime;
+class AgendaEntry;
+
+class CalenDayUtils
+{
+public:
+ static CalenDayUtils *instance();
+ ~CalenDayUtils();
+
+ qreal screenWidth() const;
+ qreal hourElementWidth() const;
+ qreal hourElementHeight() const;
+ qreal contentWidth() const;
+
+ Qt::Orientation orientation() const;
+
+ HbMainWindow* mainWindow();
+
+ bool isHorizontalSwipe(qreal angle) const;
+
+ /**
+ * Get event's start/end time fromm agenda entry.
+ * Start/end time are validated to be within the current day (the case of
+ * multi-day events)
+ * @param start [out] valid start time
+ * @param end [out] valid end time
+ * @param entry [in] agenda entry asociated with the event.
+ * @param currentDate [in] current date
+ */
+ void getEventValidStartEndTime( QDateTime& start, QDateTime& end,
+ AgendaEntry& entry, QDateTime& currentDate );
+
+protected:
+ CalenDayUtils();
+
+private:
+ qreal calculateHourElementWidth() const;
+ qreal calculateHourElementHeight() const;
+
+private: // data
+
+ static CalenDayUtils* mInstance;
+
+ HbMainWindow* mMainWindow; //!< Pointer to main window
+
+ qreal mHourElementWidth; //!< The width of hour element
+ qreal mHourElementHeight; //!< The height of hour element
+};
+
+#endif /* CALENDAYUTILS_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/inc/calendayview.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,204 @@
+/*
+* 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: CalenDayView class definition.
+*
+*/
+
+#ifndef CALEDAYVIEW_H
+#define CALEDAYVIEW_H
+
+// System includes
+#include <QDateTime>
+#include <xqsettingskey.h>
+
+// User includes
+#include "calennativeview.h"
+#include "calendaycommonheaders.h"
+#include "hb_calencommands.hrh" // command ids
+
+// Forward declarations
+class QGraphicsLinearLayout;
+class XQSettingsManager;
+class QVariant;
+class HbGroupBox;
+class AgendaEntry;
+class CalenDocLoader;
+class CalenDayContentScrollArea;
+class CalenDayContentWidget;
+class CalenDayHourScrollArea;
+class CalenDayModelManager;
+
+
+// Constants
+
+
+#ifdef CALENVIEWS_DLL
+#define CALENDAYVIEW_EXPORT Q_DECL_EXPORT
+#else
+#define CALENDAYVIEW_EXPORT Q_DECL_IMPORT
+#endif
+
+class CalenDayView : public CalenNativeView
+{
+ Q_OBJECT
+
+public:
+
+ /**
+ * Constructor.
+ *
+ * @param services Calendar services.
+ */
+ CALENDAYVIEW_EXPORT CalenDayView( MCalenServices &services );
+
+ /**
+ * Destructor.
+ */
+ CALENDAYVIEW_EXPORT virtual ~CalenDayView();
+
+public:
+
+//From CalenNativeView
+
+ /**
+ * Handles locale change.
+ *
+ * @param reason Change reason.
+ */
+ virtual void onLocaleChanged(int reason);
+
+//From CalenView
+
+ /**
+ * Handles view (re)population.
+ *
+ */
+ CALENDAYVIEW_EXPORT virtual void doPopulation();
+
+ /**
+ * Informs the organizer that the view's population is complete.
+ */
+ virtual void populationComplete();
+
+//From MCalenNotificationHandler
+
+ /**
+ * The function handles calendar notifications.
+ */
+ virtual void HandleNotification( const TCalenNotification notification );
+
+public:
+ //API
+
+ /**
+ * Sets up the view accroding to the 'xml'
+ *
+ * @param docLoader Loaded document.
+ */
+ CALENDAYVIEW_EXPORT void setupView(CalenDocLoader* docLoader);
+
+private slots:
+
+ /**
+ * Handles 'back' functionality;
+ */
+ void onBack();
+
+ /**
+ * Updates selected date member and context
+ */
+ void dayChangeStarted(CalenScrollDirection direction);
+
+ /**
+ * Refreshes the model
+ */
+ void dayChanged(CalenScrollDirection direction);
+
+ /**
+ * Sets new date as heading text. Triggerd after fadeOut effect.
+ */
+ void setHeadingText(const HbEffect::EffectStatus &status);
+
+ /**
+ * Handles actions from menu
+ */
+ void runNewMeeting();
+ void runGoToToday();
+ void runChangeToAgendaView();
+ void runLunarData();
+
+ void showRegionalInformation(const HbEffect::EffectStatus &status);
+ void showRegionalInformationFadeIn();
+ void showHideRegionalInformationChanged(const XQSettingsKey& key, const QVariant& var);
+
+public slots:
+ void changeView(TCalenCommandId viewId);
+private:
+ /**
+ *
+ */
+ void getCurrentDate();
+
+ /**
+ * setup menu for the view
+ */
+ void setupMenu();
+
+ /**
+ * Connects view's slots.
+ */
+ void setupSlots();
+
+ /**
+ * Scrolls content to correct position after view repopulation
+ */
+ void setupViewport();
+
+private: // members related to view management and gesture handling
+
+ CalenDayContentScrollArea* mContentScrollArea; //!< Scroll area for content (events)
+
+ CalenDayContentWidget* mContentWidget; //!< Content widget
+
+ CalenDayHourScrollArea* mHourScrollArea; //!< Scroll area for hour elements
+
+ CalenDayModelManager* mModelManager;
+
+ QGraphicsLinearLayout* mVLayout;
+
+
+private:
+
+ XQSettingsManager* mSettingsManager;
+ XQSettingsKey mRegionalInfo;
+ MCalenServices &mServices;
+
+ /**
+ * Current date/time.
+ */
+ QDateTime mDate;
+
+ HbGroupBox *mHeadingLabel;
+
+ HbGroupBox *mRegionalInfoGroupBox;
+ /*!
+ * \brief It keep pointer to go to Today action from menu.
+ */
+ HbAction *mGoToTodayMenuAction;
+};
+
+
+#endif // CALEDAYVIEW_H
+
+//End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/resources/calendayhourelement.css Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,28 @@
+CalenDayHourElement{
+ layout: customCalendarLayout;
+}
+
+CalenDayHourElement::time {
+ color: var(qtc_cal_view_text);
+
+ fixed-width: 8.04un;
+ font-variant: secondary;
+ text-height: var(hb-param-text-height-secondary);
+
+ text-align: right;
+}
+
+CalenDayHourElement::ampm {
+ color: var(qtc_cal_view_text);
+
+ fixed-width: 8.04un;
+ font-variant: secondary;
+ text-height: var(hb-param-text-height-secondary);
+
+ text-align: right;
+}
+
+CalenDayHourElement::bottomSpacer{
+ pref-height: 3un;
+ size-policy-vertical: expanding;
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/resources/calendayhourelement.widgetml Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,14 @@
+<hbwidget version="0.1" type="CalenDayHourElement">
+
+ <layout name="customCalendarLayout" type="mesh">
+ <meshitem src="time" srcEdge="TOP" dst="" dstEdge="TOP" spacing="-var(hb-param-margin-gene-middle-vertical)"/>
+ <meshitem src="time" srcEdge="BOTTOM" dst="ampm" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)"/>
+ <meshitem src="time" srcEdge="LEFT" dst="" dstEdge="LEFT" spacing="-var(hb-param-margin-gene-middle-horizontal)"/>
+ <meshitem src="time" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-middle-horizontal)"/>
+
+ <meshitem src="ampm" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" spacing="0un" spacer="bottomSpacer"/>
+ <meshitem src="ampm" srcEdge="LEFT" dst="" dstEdge="LEFT" spacing="-var(hb-param-margin-gene-middle-horizontal)"/>
+ <meshitem src="ampm" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-middle-horizontal)"/>
+ </layout>
+
+</hbwidget>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/resources/calendayitem.css Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,30 @@
+CalenDayItem{
+ layout: noIconLayout;
+}
+
+CalenDayItem[!eventDescription][!backgroundFrame]{
+ layout: noIconNoTextNoBkgLayout;
+}
+
+CalenDayItem[!eventDescription][backgroundFrame]{
+ layout: noIconNoTextLayout;
+}
+
+CalenDayItem::eventDescription {
+ color: var(qtc_cal_meeting_text);
+ font-variant: secondary;
+ text-height: var(hb-param-text-height-secondary);
+ text-align: center center;
+ text-line-count-min: 1;
+ size-policy-vertical: expanding;
+}
+
+CalenDayItem::colorStripe {
+ pref-width: 1.5un;
+ size-policy-horizontal: fixed;
+}
+
+CalenDayItem::spacerItem{
+ pref-width: 1.5un;
+ size-policy-horizontal: expanding;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/resources/calendayitem.widgetml Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,37 @@
+<hbwidget version="0.1" type="CalenDayItem">
+ <!-- layout for timed and all-day event bubble -->
+ <layout name="noIconLayout" type="mesh">
+ <meshitem src="backgroundFrame" srcEdge="TOP" dst="" dstEdge="TOP" />
+ <meshitem src="backgroundFrame" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
+ <meshitem src="backgroundFrame" srcEdge="LEFT" dst="" dstEdge="LEFT" />
+ <meshitem src="backgroundFrame" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
+
+ <meshitem src="colorStripe" srcEdge="TOP" dst="" dstEdge="TOP" />
+ <meshitem src="colorStripe" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
+ <meshitem src="colorStripe" srcEdge="LEFT" dst="" dstEdge="LEFT" spacing="-var(hb-param-margin-gene-middle-horizontal)"/>
+ <meshitem src="colorStripe" srcEdge="RIGHT" dst="eventDescription" dstEdge="LEFT" spacing="var(hb-param-margin-gene-middle-horizontal)"/>
+
+ <meshitem src="eventDescription" srcEdge="TOP" dst="" dstEdge="TOP" spacing="-var(hb-param-margin-gene-middle-vertical)" />
+ <meshitem src="eventDescription" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" spacing="var(hb-param-margin-gene-middle-vertical)" />
+ <meshitem src="eventDescription" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-right)"/>
+ </layout>
+
+ <layout name="noIconNoTextLayout" type="mesh">
+ <meshitem src="backgroundFrame" srcEdge="TOP" dst="" dstEdge="TOP" />
+ <meshitem src="backgroundFrame" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
+ <meshitem src="backgroundFrame" srcEdge="LEFT" dst="" dstEdge="LEFT"/>
+ <meshitem src="backgroundFrame" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
+
+ <meshitem src="colorStripe" srcEdge="TOP" dst="" dstEdge="TOP" />
+ <meshitem src="colorStripe" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
+ <meshitem src="colorStripe" srcEdge="LEFT" dst="" dstEdge="LEFT" spacing="-var(hb-param-margin-gene-middle-horizontal)"/>
+ <meshitem src="colorStripe" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacer="spacerItem"/>
+ </layout>
+
+ <layout name="noIconNoTextNoBkgLayout" type="mesh">
+ <meshitem src="colorStripe" srcEdge="TOP" dst="" dstEdge="TOP" />
+ <meshitem src="colorStripe" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
+ <meshitem src="colorStripe" srcEdge="LEFT" dst="" dstEdge="LEFT"/>
+ <meshitem src="colorStripe" srcEdge="RIGHT" dst="" dstEdge="RIGHT"/>
+ </layout>
+</hbwidget>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/resources/calendaywidgets.qrc Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,10 @@
+<RCC>
+ <qresource prefix="/" >
+ <file>calendayhourelement.css</file>
+ <file>calendayhourelement.widgetml</file>
+ <file>calendayitem.css</file>
+ <file>calendayitem.widgetml</file>
+ <file>fade_out.fxml</file>
+ <file>fade_in.fxml</file>
+ </qresource>
+</RCC>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/resources/fade_in.fxml Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,10 @@
+<layers>
+ <visual>
+ <param name="opacity" type="anim">
+ <duration>0.2</duration>
+ <style>linear</style>
+ <keyframe at="0.0">0.0</keyframe>
+ <keyframe at="1.0">1.0</keyframe>
+ </param>
+ </visual>
+</layers>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/resources/fade_out.fxml Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,10 @@
+<layers>
+ <visual>
+ <param name="opacity" type="anim">
+ <duration>0.2</duration>
+ <style>linear</style>
+ <keyframe at="0.0">1.0</keyframe>
+ <keyframe at="1.0">0.0</keyframe>
+ </param>
+ </visual>
+</layers>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/src/calendaycontainer.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,531 @@
+/*
+* 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: Day view control of calendar
+*
+*/
+
+//System includes
+#include <QTime>
+#include <QGraphicsLinearLayout>
+#include <QGesture>
+
+#ifdef _DEBUG
+ #include <QPainter>
+#endif
+
+#include <hbabstractitemview.h>
+#include <hbtextitem.h>
+#include <hbmodeliterator.h>
+#include <hbinstance.h>
+
+//User includes
+#include "calendaycontainer.h"
+#include "calendayutils.h"
+#include "calendayeventspane.h"
+#include "calendayitem.h"
+#include "calendaymodel.h"
+#include "calendayinfo.h"
+#include "calendayview.h"
+
+// -----------------------------------------------------------------------------
+// CalenDayContainer()
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CalenDayContainer::CalenDayContainer(QGraphicsItem *parent) :
+ HbAbstractItemContainer(parent), mGeometryUpdated(false), mInfo(0)
+{
+ getTimedEventLayoutValues(mLayoutValues);
+
+ // Get the height of element
+ qreal paneHeight = CalenDayUtils::instance()->hourElementHeight();
+
+ QGraphicsLinearLayout* timeLinesLayout = new QGraphicsLinearLayout(
+ Qt::Vertical, this);
+ for (int i = 0; i < 24; i++) {
+ CalenDayEventsPane* element = new CalenDayEventsPane(this);
+ element->setPreferredHeight(paneHeight);
+ element->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ // Draw top line at midnight
+ if (i == 0) {
+ element->drawTopLine(true);
+ }
+ timeLinesLayout->addItem(element);
+ }
+ timeLinesLayout->setContentsMargins(0.0, 0.0, 0.0, 0.0);
+ timeLinesLayout->setSpacing(0.0);
+
+ setLayout(timeLinesLayout);
+}
+
+// -----------------------------------------------------------------------------
+// ~CalenDayContainer()
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CalenDayContainer::~CalenDayContainer()
+{
+}
+
+// -----------------------------------------------------------------------------
+// itemAdded()
+//
+// -----------------------------------------------------------------------------
+//
+void CalenDayContainer::itemAdded( int index, HbAbstractViewItem *item,
+ bool animate )
+{
+ Q_UNUSED( index )
+ Q_UNUSED( item )
+ Q_UNUSED( animate )
+}
+
+// -----------------------------------------------------------------------------
+// reset()
+//
+// -----------------------------------------------------------------------------
+//
+void CalenDayContainer::reset()
+{
+ // remove absorbers if exist
+ if (mAbsorbers.count())
+ {
+ qDeleteAll(mAbsorbers);
+ mAbsorbers.clear();
+ }
+
+ // shrink event area when all-day events available after reset
+ getTimedEventLayoutValues(mLayoutValues);
+
+ // position need to be maintained while changing model
+ QPointF position(pos());
+ HbAbstractItemContainer::reset();
+ setPos( position );
+}
+
+// -----------------------------------------------------------------------------
+// itemRemoved()
+//
+// -----------------------------------------------------------------------------
+//
+void CalenDayContainer::itemRemoved( HbAbstractViewItem *item, bool animate )
+{
+ Q_UNUSED( item )
+ Q_UNUSED( animate )
+}
+
+// -----------------------------------------------------------------------------
+// viewResized()
+//
+// -----------------------------------------------------------------------------
+//
+void CalenDayContainer::viewResized (const QSizeF &size)
+{
+ resize(size);
+ if (!mGeometryUpdated) {
+ mGeometryUpdated = true;
+ updateGeometry();
+ }
+}
+
+// -----------------------------------------------------------------------------
+// createDefaultPrototype()
+//
+// -----------------------------------------------------------------------------
+//
+HbAbstractViewItem * CalenDayContainer::createDefaultPrototype() const
+{
+ CalenDayItem *calendarViewItem = new CalenDayItem;
+ return calendarViewItem;
+}
+
+// -----------------------------------------------------------------------------
+// setItemModelIndex()
+//
+// -----------------------------------------------------------------------------
+//
+void CalenDayContainer::setItemModelIndex(HbAbstractViewItem *item,
+ const QModelIndex &index)
+{
+ QVariant variant = index.data( CalenDayEntry );
+ AgendaEntry entry = variant.value<AgendaEntry>();
+
+ if (entry.isTimedEntry()) {
+ updateTimedEventGeometry( item, index );
+ item->setParentItem(this);
+ }
+ else if( entry.type() == AgendaEntry::TypeEvent ){
+ updateAllDayEventGeometry( item, index );
+ item->setParentItem(this);
+ }
+ else {
+ item->setVisible(false);
+ }
+
+ // last item
+ if (index.row() == index.model()->rowCount() - 1) {
+ createTouchEventAbsorbers();
+ }
+
+ HbAbstractItemContainer::setItemModelIndex(item, index);
+}
+
+// -----------------------------------------------------------------------------
+// updateTimedEventGeometry()
+// Updates geometry of a timed event.
+// -----------------------------------------------------------------------------
+//
+void CalenDayContainer::updateTimedEventGeometry(HbAbstractViewItem *item,
+ const QModelIndex &index)
+{
+//safety check
+ if ( !mInfo ) {
+ return;
+ }
+
+ QVariant variant = index.data( CalenDayEntry );
+ AgendaEntry entry = variant.value<AgendaEntry>();
+
+//1. get 'virtual' event position from DayInfo
+//TODO: k.g.: Day Info should store model index instead of keeping redundant data
+ SCalenApptInfo apptInfo;
+ apptInfo.iIndex = index;
+
+ QDateTime start;
+ QDateTime end;
+ QDateTime currentDate;
+ currentDate = static_cast<const CalenDayModel*>(index.model())->modelDate();
+ CalenDayUtils::instance()->getEventValidStartEndTime( start, end, entry,
+ currentDate );
+ apptInfo.iStartTime = start;
+ apptInfo.iEndTime = end;
+
+ TCalenInstanceId id = TCalenInstanceId::nullInstanceId();
+ id.mEntryLocalUid = index.row(); //index.row() - temporary ID
+ id.mInstanceTime = apptInfo.iStartTime;
+ apptInfo.iId = id;
+ apptInfo.iAllDay = 0;
+ apptInfo.iColor = 0xffff;
+
+ int startSlot, endSlot, columnIdx, columns;
+ mInfo->GetLocation( apptInfo, startSlot, endSlot, columnIdx, columns );
+
+
+//2. set timed event's geometry
+ qreal eventStartX(mLayoutValues.eventAreaX );
+ qreal eventStartY(0.0);
+ qreal eventWidth(mLayoutValues.eventAreaWidth);
+ qreal eventHeight(0.0);
+
+ //event's startY/height
+ eventStartY = startSlot * mLayoutValues.slotHeight;
+ eventHeight = (endSlot - startSlot) * mLayoutValues.slotHeight;
+
+ //event's startX/width
+ eventWidth /= columns;
+
+ //In case when eventWidth will be smaller then 3.0un we need to
+ //make spacings between events smaller.
+ //Check whether it's possible to shring them so the bubbles
+ //width can stay at 3.0un (time stripe + frame margins).
+ qreal minWidth = 3.0 * mLayoutValues.unitInPixels;
+ if(eventWidth - mLayoutValues.eventMargin < minWidth){
+
+ //Calculate new margin value
+ //from totalMarginSpace we need to subtract
+ //mLayoutValues.eventMargin because first margin is always 1.5un
+ qreal totalMarginSpace = mLayoutValues.eventAreaWidth - minWidth * columns - mLayoutValues.eventMargin;
+ qreal newMarginValue = totalMarginSpace / (columns - 1);
+
+ //check if we managed to pack all the events into space we have
+ if(newMarginValue > 0){
+
+ eventWidth = minWidth;
+ }
+ else{
+ //there's not enough space
+ //new minWidth it's 1.5un (time stripe only)
+ minWidth = 1.5 * mLayoutValues.unitInPixels;
+ totalMarginSpace = mLayoutValues.eventAreaWidth - minWidth * columns - mLayoutValues.eventMargin;
+ newMarginValue = totalMarginSpace / (columns - 1);
+ eventWidth = minWidth;
+ }
+
+ //First column margin should be always 1.5un (mLayoutValues.eventMargin)
+ eventStartX += columnIdx * (eventWidth + newMarginValue) + mLayoutValues.eventMargin;
+ }
+ else{
+ //add margins between the event
+ eventStartX += columnIdx * eventWidth + mLayoutValues.eventMargin;
+ eventWidth -= mLayoutValues.eventMargin;
+ }
+
+ QRectF eventGeometry( eventStartX, eventStartY, eventWidth, eventHeight );
+ item->setGeometry(eventGeometry);}
+
+
+// -----------------------------------------------------------------------------
+// updateAllDayEventGeometry()
+// Updates geometry of a timed event.
+// -----------------------------------------------------------------------------
+//
+void CalenDayContainer::updateAllDayEventGeometry(HbAbstractViewItem *item,
+ const QModelIndex &index)
+{
+ //safety check
+ if ( !mInfo ) {
+ return;
+ }
+
+ QVariant variant = index.data( CalenDayEntry );
+ AgendaEntry entry = variant.value<AgendaEntry>();
+
+ //1. get 'virtual' event position from DayInfo
+ //TODO: k.g.: Day Info should store model index instead of keeping redundant data
+ SCalenApptInfo apptInfo;
+ apptInfo.iIndex = index;
+
+
+ QDateTime start;
+ QDateTime end;
+ QDateTime currentDate;
+ currentDate = static_cast<const CalenDayModel*>(index.model())->modelDate();
+ CalenDayUtils::instance()->getEventValidStartEndTime( start, end, entry,
+ currentDate );
+ apptInfo.iStartTime = start;
+ apptInfo.iEndTime = end;
+
+ TCalenInstanceId id = TCalenInstanceId::nullInstanceId();
+ id.mEntryLocalUid = index.row(); //index.row() - temporary ID
+ id.mInstanceTime = apptInfo.iStartTime;
+ apptInfo.iId = id;
+ apptInfo.iAllDay = true;
+ apptInfo.iColor = 0xffff;
+
+ int startSlot, endSlot, columnIdx, columns;
+ mInfo->GetLocation( apptInfo, startSlot, endSlot, columnIdx, columns );
+
+ //2. set timed event's geometry
+ qreal eventStartX(0.0);
+ qreal eventStartY(0.0);
+ qreal eventWidth(mLayoutValues.eventAreaX);
+ qreal eventHeight = (endSlot - startSlot) * mLayoutValues.slotHeight;
+
+
+ //event's startX/width
+ if ( columns > 1 ) {
+ eventWidth /= columns;
+ eventStartX += columnIdx * eventWidth + mLayoutValues.eventMargin;
+ //add margins between the event
+ eventWidth -= mLayoutValues.eventMargin;
+ } else {
+ eventStartX += mLayoutValues.eventMargin;
+ eventWidth -= mLayoutValues.eventMargin;
+ }
+
+ QRectF eventGeometry( eventStartX, eventStartY, eventWidth, eventHeight );
+ item->setGeometry(eventGeometry);
+
+}
+
+
+// -----------------------------------------------------------------------------
+// movingBackwards()
+//
+// -----------------------------------------------------------------------------
+//
+void CalenDayContainer::getTimedEventLayoutValues(LayoutValues& layoutValues)
+{
+ // get the width of content area
+ qreal contentWidth = CalenDayUtils::instance()->contentWidth();
+//1.time column width -> eventAreaX[out]
+ HbStyle style;
+ HbDeviceProfile deviceProfile;
+ layoutValues.unitInPixels = deviceProfile.unitValue();
+
+ if ( mInfo && mInfo->AlldayCount())
+ { // 9.5 -> all-day area width
+ layoutValues.eventAreaX = 9.5 * layoutValues.unitInPixels;
+ }
+ else
+ {
+ layoutValues.eventAreaX = 0;
+ }
+
+//2. event area width -> eventAreaWidth[out]
+ qreal emptyRightColumnWidth(0.0);
+ emptyRightColumnWidth = 6.0 * layoutValues.unitInPixels; //pix (according to UI spec)
+ layoutValues.eventAreaWidth = contentWidth - emptyRightColumnWidth - layoutValues.eventAreaX ;
+//3. margins between the overlapping events -> eventMargin[out]
+ layoutValues.eventMargin = 1.5 * layoutValues.unitInPixels;
+//4. half-hour slot'h height -> slotHeight[out]
+ //curent slot height corresponds to half an hour
+ layoutValues.slotHeight =
+ CalenDayUtils::instance()->hourElementHeight() / 2;
+
+ // 8.2 un (min. touchable event) from layout guide
+ layoutValues.maxColumns = layoutValues.eventAreaWidth / (8.2 * layoutValues.unitInPixels);
+}
+
+// -----------------------------------------------------------------------------
+// setDayInfo()
+// Sets day's info structer to the container.
+// -----------------------------------------------------------------------------
+//
+void CalenDayContainer::setDayInfo( CalenDayInfo* dayInfo )
+{
+ mInfo = dayInfo;
+}
+
+// -----------------------------------------------------------------------------
+// orientationChanged()
+// Slot handles layout switch.
+// -----------------------------------------------------------------------------
+//
+void CalenDayContainer::orientationChanged(Qt::Orientation orientation)
+{
+ getTimedEventLayoutValues(mLayoutValues);
+
+ Q_UNUSED( orientation )
+ QList<HbAbstractViewItem *> items = this->items();
+ int count(items.count());
+ for (int i = 0; i < count; i++) {
+ QModelIndex modelIndex = items[i]->modelIndex();
+ if (modelIndex.isValid()) {
+ QVariant variant = modelIndex.data(CalenDayEntry);
+ AgendaEntry entry = variant.value<AgendaEntry> ();
+ if (entry.isTimedEntry()) {
+ updateTimedEventGeometry(items[i], modelIndex);
+ }
+ }
+ }
+
+ createTouchEventAbsorbers();
+}
+
+// -----------------------------------------------------------------------------
+// createTouchEventAbsorbers()
+// Creates absorbers which prevent touching to small items
+// -----------------------------------------------------------------------------
+//
+void CalenDayContainer::createTouchEventAbsorbers()
+{
+ // remove absorbers if exist
+ if (mAbsorbers.count())
+ {
+ qDeleteAll(mAbsorbers);
+ mAbsorbers.clear();
+ }
+
+ const QList<CalenTimeRegion>& regionList = mInfo->RegionList();
+
+ for(int i=0; i < regionList.count(); i++)
+ {
+ if(regionList[i].iColumns.count() > mLayoutValues.maxColumns )
+ {
+ TouchEventAbsorber* absorber =
+ crateAbsorberBetweenSlots(regionList[i].iStartSlot, regionList[i].iEndSlot);
+
+ mAbsorbers.append(absorber);
+ }
+ }
+
+}
+
+// -----------------------------------------------------------------------------
+// crateAbsorberBetweenSlots()
+// Creates single absorber in given location
+// -----------------------------------------------------------------------------
+//
+TouchEventAbsorber *CalenDayContainer::crateAbsorberBetweenSlots
+ (int startSlot, int endSlot)
+{
+ TouchEventAbsorber *absorber = new TouchEventAbsorber(this);
+ absorber->setZValue(1000);
+ absorber->setVisible(true);
+
+ absorber->setGeometry( mLayoutValues.eventAreaX, // x
+ startSlot * mLayoutValues.slotHeight, // y
+ mLayoutValues.eventAreaWidth, // w
+ (endSlot-startSlot) * mLayoutValues.slotHeight ); // h
+
+ return absorber;
+}
+
+
+// -----------------------------------------------------------------------------
+// TouchEventAbsorber::gestureEvent()
+// Handles tap event on overlapping area (currently it leads to Agenda View -
+// as described in UI spec)
+// -----------------------------------------------------------------------------
+//
+void TouchEventAbsorber::gestureEvent(QGestureEvent *event)
+{
+ QTapGesture *tapGesture = qobject_cast<QTapGesture*> (event->gesture(
+ Qt::TapGesture));
+
+ if (tapGesture && tapGesture->state() == Qt::GestureFinished)
+ {
+ CalenDayView* dayView = static_cast<CalenDayView*>
+ (CalenDayUtils::instance()->mainWindow()->currentView());
+
+ dayView->changeView(ECalenAgendaView);
+ }
+}
+
+// -----------------------------------------------------------------------------
+// TouchEventAbsorber()
+// default ctor
+// -----------------------------------------------------------------------------
+//
+TouchEventAbsorber::TouchEventAbsorber(QGraphicsItem *parent) : HbWidget(parent)
+{
+#ifdef _DEBUG
+ setFlag(QGraphicsItem::ItemHasNoContents, false);
+#endif
+ grabGesture(Qt::TapGesture);
+}
+
+// -----------------------------------------------------------------------------
+// TouchEventAbsorber()
+// default dtor
+// -----------------------------------------------------------------------------
+//
+TouchEventAbsorber::~TouchEventAbsorber()
+{
+
+}
+
+// -----------------------------------------------------------------------------
+// TouchEventAbsorber::paint()
+// used for debugging purposes to see absorbers areas
+// -----------------------------------------------------------------------------
+//
+#ifdef _DEBUG
+void TouchEventAbsorber::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
+ QWidget *widget)
+{
+ Q_UNUSED(option)
+ Q_UNUSED(widget)
+
+ painter->save();
+ QPen pen;
+ pen.setWidth(2);
+ pen.setColor(Qt::red);
+ painter->setPen(pen);
+ painter->drawRect(boundingRect());
+ painter->restore();
+}
+#endif
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/src/calendaycontentscrollarea.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,412 @@
+/*
+ * 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: CalenDayContentScrollArea implementation.
+ *
+ */
+
+// System includes
+#include <QGraphicsLinearLayout>
+#include <QGesture>
+
+#include <hbinstance.h>
+#include <hbswipegesture.h>
+
+// User includes
+#include "calendaycontentscrollarea.h"
+#include "calendayutils.h"
+
+/*!
+ \class CalenDayContentScrollArea
+ \brief Scrollable container class for content widgets.
+
+ It handles horizontal scrolling and swipe or pan gestures.
+ */
+
+/*!
+ \brief Constructor
+
+ Configures scroll area settings and resets internal stares of widget.
+ Gets the width of device.
+
+ \param parent The parent of scroll area widget
+ */
+CalenDayContentScrollArea::CalenDayContentScrollArea(QGraphicsItem *parent) :
+ HbScrollArea(parent), mPanDayDirection(ECalenPanNotSet), mIsMoving(false),
+ mMoveDirection(ECalenScrollNoDayChange)
+{
+ // Set scroll settings
+ setScrollDirections(Qt::Horizontal);
+ setClampingStyle(StrictClamping);
+ setHorizontalScrollBarPolicy(HbScrollArea::ScrollBarAlwaysOff);
+
+#ifdef CALENDAYVIEW_PANNING_ENABLED
+ grabGesture(Qt::PanGesture);
+ ungrabGesture(Qt::SwipeGesture);
+#else
+ grabGesture(Qt::SwipeGesture);
+ ungrabGesture(Qt::PanGesture);
+#endif
+
+ // Get the width of content area and orientation of screen
+ mContentWidth = CalenDayUtils::instance()->contentWidth();
+ mOrientation = CalenDayUtils::instance()->orientation();
+
+ // Connect to main window's orientationChanged SIGNAL to handle orientation
+ // switching
+ connect(CalenDayUtils::instance()->mainWindow(),
+ SIGNAL(orientationChanged(Qt::Orientation)), this,
+ SLOT(orientationChanged(Qt::Orientation)));
+}
+
+/*!
+ \brief Destructor
+ */
+CalenDayContentScrollArea::~CalenDayContentScrollArea()
+{
+}
+
+/*!
+ \brief Scrolls to middle widget.
+
+ Scrolling to middle widget is done if needed.
+ Resets internal pan direction flag.
+ */
+void CalenDayContentScrollArea::scrollToMiddleWidget()
+{
+ QPointF currentPosition = contentWidget()->pos();
+ QPointF destPosition = QPointF(mContentWidth, currentPosition.y());
+
+ // Scroll only when x position is wrong
+ if (currentPosition.x() != destPosition.x()) {
+ scrollContentsTo(QPointF(mContentWidth, currentPosition.y()), 0);
+ }
+
+ // Reset pan direction flag and scrolling flag
+ mPanDayDirection = ECalenPanNotSet;
+}
+
+/*!
+ \brief Scrolls the view by the amount indicated by "delta".
+
+ Checks the direction of pan gesture and promotes leading direction.
+
+ \param delta Move offset
+ \return Returns TRUE if the view was able to scroll, FALSE otherwise
+ */
+bool CalenDayContentScrollArea::scrollByAmount(const QPointF &delta)
+{
+ QPointF newDelta(delta);
+ if (mPanDayDirection == ECalenPanVertical) {
+ newDelta.setX(0);
+ }
+ else
+ if (mPanDayDirection == ECalenPanHorizontal) {
+ newDelta.setY(0);
+ }
+ else {
+ // Pan direction not set
+ }
+
+ return HbScrollArea::scrollByAmount(newDelta);
+}
+
+/*!
+ \brief Handles pan gesture event (horizontal) or swipe gesture.
+
+ Ignores vertical pan gestures.
+
+ \param event Gesture event to be handled
+ */
+void CalenDayContentScrollArea::gestureEvent(QGestureEvent *event)
+{
+#ifdef CALENDAYVIEW_PANNING_ENABLED
+ // Process a pan gesture event
+ if (QPanGesture *panGesture = qobject_cast<QPanGesture*> (event->gesture(
+ Qt::PanGesture))) {
+
+ // Checks pan gesture direction
+ checkPanDirection(panGesture);
+
+ // Put the gesture forward before working with finished gesture
+ HbScrollArea::gestureEvent(event);
+
+ // If gesture is finished move the scroll area to next or previous
+ // widget or resume to gesture start point
+ if (panGesture->state() == Qt::GestureFinished) {
+ // Pan direction should be reseted when scrolling ends
+
+ // Gets the offset of pan gesture.
+ QPointF offset = panGesture->offset();
+
+ // Note: in horizontal orientation x should is treaten as Y, y as X.
+ QPointF movement;
+ if (mOrientation == Qt::Vertical) {
+ movement = offset;
+ }
+ else {
+ movement.setX(offset.y());
+ movement.setY(offset.x());
+ }
+
+ // Gesture was long enough for place movement
+ if (qAbs(movement.x()) > (KCalenHScrollMoveParam * mContentWidth / 100)) {
+ if (movement.x() < 0) {
+ mMoveDirection = ECalenScrollToNext;
+ moveTo(QPointF((-mStartPosition.x() + mContentWidth),
+ -mStartPosition.y()), KCalenScrollDaysTimeout);
+ }
+ else {
+ mMoveDirection = ECalenScrollToPrev;
+ moveTo(QPointF(-mStartPosition.x() - mContentWidth,
+ -mStartPosition.y()), KCalenScrollDaysTimeout);
+ }
+ }
+ // Gesture was short one, reset to gesture start point
+ else {
+ qreal startPos = mStartPosition.x();
+ bool isNegative = false;
+ if (startPos < 0) {
+ isNegative = true;
+ }
+ startPos = qAbs(startPos);
+ qreal normalizeValue = mContentWidth / 2;
+
+ while (startPos > normalizeValue) {
+ normalizeValue += mContentWidth;
+ }
+
+ if (isNegative) {
+ mStartPosition.setX(-(normalizeValue - (mContentWidth / 2)));
+ }
+ else {
+ mStartPosition.setX(normalizeValue - (mContentWidth / 2));
+ }
+
+ mMoveDirection = ECalenScrollNoDayChange;
+ moveTo(-mStartPosition, KCalenScrollDaysTimeout);
+ }
+ }
+ }
+ else {
+ HbScrollArea::gestureEvent(event);
+ }
+#else
+ // Let the content scroll area ignore pan gestures
+ if (QPanGesture *panGesture = qobject_cast<QPanGesture *> (event->gesture(
+ Qt::PanGesture))) {
+ // do nothing with pan gesture
+ }
+
+ if (HbSwipeGesture *swipeGesture =
+ qobject_cast<HbSwipeGesture *> (event->gesture(Qt::SwipeGesture))) {
+ if (swipeGesture->state() == Qt::GestureStarted) {
+ mStartPosition = contentWidget()->pos();
+
+ qreal swipeAngle = swipeGesture->sceneSwipeAngle();
+ if (CalenDayUtils::instance()->isHorizontalSwipe(swipeAngle)) {
+ if (QSwipeGesture::Left ==
+ swipeGesture->sceneHorizontalDirection()) {
+ mMoveDirection = ECalenScrollToNext;
+ moveTo(QPointF((-mStartPosition.x() + mContentWidth),
+ -mStartPosition.y()), KCalenScrollDaysTimeout);
+ }
+ else if (QSwipeGesture::Right ==
+ swipeGesture->sceneHorizontalDirection()) {
+ mMoveDirection = ECalenScrollToPrev;
+ moveTo(QPointF(-mStartPosition.x() - mContentWidth,
+ -mStartPosition.y()), KCalenScrollDaysTimeout);
+ }
+ }
+ }
+ }
+#endif
+}
+
+/*!
+ \brief Filters pan gesture events.
+
+ Filters events if this object has been installed as an event filter for
+ the watched object. Handles horizontal pan gestures (ignores vertical).
+ When moving scroll area all gesture events are blocked.
+
+ \param obj Watched object
+ \param event Event to be filtered
+ \return Returns TRUE if event was handled. FALSE otherwise.
+ */
+bool CalenDayContentScrollArea::eventFilter(QObject *obj, QEvent *event)
+{
+ Q_UNUSED(obj);
+
+ bool handled = false;
+
+ // Check if we get a gesture event
+ if (event->type() == QEvent::Gesture) {
+
+ // Blocks handling of gesture events if scrolling started by
+ // pan gesture is in progress
+ if (mIsMoving) {
+ handled = true;
+ }
+ else {
+ QGestureEvent* gesture = static_cast<QGestureEvent*> (event);
+
+ // Check if we get a pan gesture
+ QPanGesture *panGesture = qobject_cast<QPanGesture*> (
+ gesture->gesture(Qt::PanGesture));
+ if (panGesture) {
+ checkPanDirection(panGesture);
+ if (mPanDayDirection == ECalenPanHorizontal) {
+ gestureEvent(gesture);
+ handled = true;
+ }
+ }
+ }
+ }
+
+ return handled;
+}
+
+/*!
+ \brief Overriden event handler.
+
+ Handles events:
+ - gesture/focus events blocked when horizontal scrolling is in progress
+ - layout request event - scrolls to middle widget if current position is wrong
+
+ \param e Event to be handled
+ \return Returns TRUE if event was handled. FALSE otherwise.
+ */
+bool CalenDayContentScrollArea::event(QEvent *e)
+{
+ bool result = false;
+
+ // Blocks base class handler for certain events if scrolling started
+ // by pan gesture is in progress
+ if (mIsMoving && (e->type() == QEvent::Gesture || e->type()
+ == QEvent::GestureOverride || e->type() == QEvent::FocusOut
+ || e->type() == QEvent::FocusIn)) {
+ result = true;
+ }
+ if (!result) {
+ // Call base class handler
+ result = HbScrollArea::event(e);
+
+ // Scroll to middle widget when layout request
+ if (e->type() == QEvent::LayoutRequest) {
+ scrollToMiddleWidget();
+ }
+ }
+
+ return result;
+}
+
+/*!
+ \brief Checks the direction of pan gesture.
+
+ Changes the scrolling style according to movement direction,
+ stores the orientation of the pan gesture.
+ Function is used when switching widgets by panning gesture is enabled.
+
+ \param panGesture Pan gesture event
+ */
+void CalenDayContentScrollArea::checkPanDirection(QPanGesture *panGesture)
+{
+ // Gets the offset of pan gesture.
+ QPointF offset = panGesture->offset();
+
+ // Note: in horizontal orientation x should is treaten as Y, y as X.
+ QPointF movement;
+ if (mOrientation == Qt::Vertical) {
+ movement = offset;
+ }
+ else {
+ movement.setX(offset.y());
+ movement.setY(offset.x());
+ }
+
+ // If gesture is started check leading movement direction
+ if (panGesture->state() == Qt::GestureStarted) {
+ if (qAbs(movement.x()) < qAbs(movement.y())) {
+ mPanDayDirection = ECalenPanVertical;
+ }
+ else {
+ mStartPosition = contentWidget()->pos();
+ mPanDayDirection = ECalenPanHorizontal;
+ }
+ }
+}
+
+/*!
+ \brief Scrolls the contents to the newPosition in a given time.
+
+ Sets the flag to indicate that scrolling is in progress. Use this function
+ for scrolling with timeout > 0 to block gesture and focus events during
+ scroll area movement.
+
+ \param newPosition Destination position
+ \param time Time of scroll movement
+ */
+void CalenDayContentScrollArea::moveTo(const QPointF &newPosition, int time)
+{
+ // Connect to scrollingEnded SIGNAL to get feedback when scrolling ends
+ connect(this, SIGNAL(scrollingEnded()), this, SLOT(moveFinished()));
+
+ // Scroll the content to new position and set isMoving flag
+ scrollContentsTo(newPosition, time);
+ mIsMoving = true;
+
+ // Emit signal that moving has just started
+ if (mMoveDirection != ECalenScrollNoDayChange) {
+ emit scrollAreaMoveStarted(mMoveDirection);
+ }
+}
+
+/*!
+ \brief Slot which is called when moving of scroll area is finished.
+
+ Resets internal isMoving flag.
+ */
+void CalenDayContentScrollArea::moveFinished()
+{
+ // Disconnect from signal, move is finished now
+ disconnect(this, SIGNAL(scrollingEnded()), this, SLOT(moveFinished()));
+ mIsMoving = false;
+
+ // Emit signal that moving has just finished and reset direction
+ if (mMoveDirection != ECalenScrollNoDayChange) {
+ emit scrollAreaMoveFinished(mMoveDirection);
+ mMoveDirection = ECalenScrollNoDayChange;
+ }
+}
+
+/*!
+ \brief Slot which is called whenever the orientation of the device changes.
+
+ Stores screen width and orientation in private members.
+
+ \param orientation Current device orientation
+ */
+void CalenDayContentScrollArea::orientationChanged(Qt::Orientation orientation)
+{
+ // Update the width of content area
+ mContentWidth = CalenDayUtils::instance()->contentWidth();
+ mOrientation = orientation;
+
+ // Reset flag related to moving
+ mPanDayDirection = ECalenPanNotSet;
+ mMoveDirection = ECalenScrollNoDayChange;
+ mIsMoving = false;
+}
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/src/calendaycontentwidget.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,243 @@
+/*
+ * 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: CalenDayContentWidget implementation.
+ *
+ */
+
+// System includes
+#include <QGraphicsLinearLayout>
+#include <hbmodeliterator.h>
+
+// User includes
+#include "calendaymodelmanager.h"
+#include "calendaycontentwidget.h"
+#include "calendayitemview.h"
+#include "calendaycontentscrollarea.h"
+
+/*!
+ \class CalenDayContentWidget
+ \brief Content widget is a container class for horizontal layouted widgets.
+ */
+
+/*!
+ \brief Constructor
+
+ \param parent The parent of central widget
+ */
+CalenDayContentWidget::CalenDayContentWidget(
+ CalenDayModelManager &modelManager,
+ QGraphicsItem *parent) :
+ HbWidget(parent), mLayout(NULL), mModelManager(modelManager)
+{
+ mWidgets.clear();
+ initializeViews(parent);
+}
+
+/*!
+ \brief Destructor
+ */
+CalenDayContentWidget::~CalenDayContentWidget()
+{
+ // Just clear widget list - parent object will destroy its children
+ mWidgets.clear();
+}
+
+/*!
+ \brief Adds the widget to central widget and layouts it horizontally.
+
+ Ownership of item is passed to CalenDayContentWidget.
+
+ \param item Widget to be added
+ \param where Place where widget should be added (as first/last item)
+ */
+void CalenDayContentWidget::add(HbWidget* item, CalenWidgetPosition where)
+{
+ // Create linear, horizontal layout if not exist
+ if (!mLayout) {
+ mLayout = new QGraphicsLinearLayout(Qt::Horizontal, NULL);
+ mLayout->setContentsMargins(0.0, 0.0, 0.0, 0.0);
+ mLayout->setSpacing(0.0);
+ }
+
+ switch (where) {
+ case ECalenFirstWidget: {
+ mLayout->insertItem(0, item);
+ mWidgets.insert(0, item);
+ break;
+ }
+ case ECalenLastWidget:
+ default: {
+ mLayout->addItem(item);
+ mWidgets.append(item);
+ }
+ }
+
+ // If layout has no parent - apply it to central widget
+ if (mLayout && !mLayout->parentLayoutItem()) {
+ setLayout(mLayout);
+ }
+}
+
+/*!
+ \brief Takes the widget and removes it from central widget.
+
+ Ownership of item is passed to caller.
+
+ \param which Indicates which widget should be taken (first/last)
+ \return Pointer to HbWidget or NULL if widget was not found
+ */
+HbWidget* CalenDayContentWidget::take(CalenWidgetPosition which)
+{
+ Q_ASSERT(mLayout);
+
+ HbWidget* itemToTake = NULL;
+ switch (which) {
+ case ECalenFirstWidget: {
+ itemToTake = mWidgets.takeFirst();
+ break;
+ }
+ case ECalenLastWidget:
+ default: {
+ itemToTake = mWidgets.takeLast();
+ }
+ }
+
+ if (itemToTake) {
+ mLayout->removeItem(itemToTake);
+ }
+
+ return itemToTake;
+}
+
+/*!
+ \brief Removed the widget from central widget.
+
+ Widget is removed and deleted.
+
+ \param which Indicates which widget should be removed (first/last)
+ */
+void CalenDayContentWidget::remove(CalenWidgetPosition which)
+{
+ Q_ASSERT(mLayout);
+
+ HbWidget* itemToRemove = NULL;
+ switch (which) {
+ case ECalenFirstWidget: {
+ itemToRemove = mWidgets.takeFirst();
+ break;
+ }
+ case ECalenLastWidget:
+ default: {
+ itemToRemove = mWidgets.takeLast();
+ }
+ }
+
+ if (itemToRemove) {
+ mLayout->removeItem(itemToRemove);
+ delete itemToRemove;
+ }
+}
+
+/*!
+ \brief Performs relayout of widgets when it is needed.
+
+ Relayout is done depending on last scroll move:
+ - if widget was scrolled to next: first widget is taken and added as last
+ - if widget was scrolled to prev: last widget is taken and inserted as first
+
+ Emits widgetsRelayoutFinished SIGNAL when relayout is over.
+
+ \param scrollTo Direction of last movement
+ */
+void CalenDayContentWidget::relayoutWidgets(CalenScrollDirection scrollTo)
+{
+ HbWidget* widget = NULL;
+ switch (scrollTo) {
+ case ECalenScrollToNext: {
+ widget = take(ECalenFirstWidget);
+ add(widget, ECalenLastWidget);
+ break;
+ }
+ case ECalenScrollToPrev:
+ default: {
+ widget = take(ECalenLastWidget);
+ add(widget, ECalenFirstWidget);
+ }
+ }
+ emit widgetsRelayoutFinished(scrollTo);
+}
+
+/*!
+ \brief SLOT handles simultanous vertical scrolling of owned widgets.
+
+ \param newPos New scroll position
+ */
+void CalenDayContentWidget::widgetScrolled(const QPointF &newPos)
+{
+ for (int i = 0; i < mWidgets.count(); i++) {
+ CalenDayItemView *view =
+ static_cast<CalenDayItemView *> (mWidgets[i]);
+ view->scrollVertically(newPos);
+ }
+ emit scrollPositionChanged(newPos);
+}
+
+/*!
+ \brief Initializes content widgets and adds them to layout.
+
+ \param parent Parent object
+ */
+void CalenDayContentWidget::initializeViews(QGraphicsItem *parent)
+{
+ // Create item views
+ HbModelIterator *iterator(0);
+
+ iterator = new HbModelIterator(&mModelManager.getModel(
+ CalenDayModelManager::PreviousDay));
+ CalenDayItemView *prevItemView = new CalenDayItemView(
+ mModelManager.getServices(), iterator, 0);
+
+ iterator = new HbModelIterator(&mModelManager.getModel(
+ CalenDayModelManager::CurrentDay));
+ CalenDayItemView *currItemView = new CalenDayItemView(
+ mModelManager.getServices(), iterator, 0);
+
+ iterator = new HbModelIterator(&mModelManager.getModel(
+ CalenDayModelManager::NextDay));
+ CalenDayItemView *nextItemView = new CalenDayItemView(
+ mModelManager.getServices(), iterator, 0);
+
+ // Connecting views with widgetScrolled SLOT
+ // to support simultanous vertical scrolling
+ connect(prevItemView, SIGNAL(scrollPositionChanged(const QPointF&)), this,
+ SLOT(widgetScrolled(const QPointF&)));
+ connect(currItemView, SIGNAL(scrollPositionChanged(const QPointF&)), this,
+ SLOT(widgetScrolled(const QPointF&)));
+ connect(nextItemView, SIGNAL(scrollPositionChanged(const QPointF&)), this,
+ SLOT(widgetScrolled(const QPointF&)));
+
+ // Install event filters to receive events necessary for gesture handling
+ CalenDayContentScrollArea* scrollArea =
+ static_cast<CalenDayContentScrollArea*> (parent);
+ prevItemView->installEventFilter(scrollArea);
+ currItemView->installEventFilter(scrollArea);
+ nextItemView->installEventFilter(scrollArea);
+
+ // Add views to layout
+ add(prevItemView);
+ add(currItemView);
+ add(nextItemView);
+}
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/src/calendayeventspane.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,108 @@
+/*
+* 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: Day view control of calendar
+*
+*/
+// System includes
+#include <QPainter>
+#include <hbcolorscheme.h>
+
+// User includes
+#include "CalenDayEventsPane.h"
+
+/*!
+ \class CalenDayEventsPane
+ \brief Events pane draws timelines in content view.
+ */
+
+/*!
+ \brief Constructor
+
+ \param parent The parent of widget
+ */
+CalenDayEventsPane::CalenDayEventsPane(HbWidget *parent) : HbWidget(parent),
+ mDrawTopLine(false)
+{
+ // Necessary when widget implements own paint method
+ setFlag(QGraphicsItem::ItemHasNoContents, false);
+
+ HbDeviceProfile deviceProfile;
+ mUnitInPixels = deviceProfile.unitValue();
+ mHourLineColor = HbColorScheme::color("qtc_cal_day_hour_lines");
+
+ // Set custom dashed pen
+ mCustomDashedPen.setWidth(0.15);
+ QVector<qreal> dashes;
+ dashes << 5 << 5;
+ mCustomDashedPen.setDashPattern(dashes);
+ mCustomDashedPen.setCapStyle(Qt::FlatCap);
+ mCustomDashedPen.setColor(mHourLineColor);
+}
+
+/*!
+ \brief Destructor
+ */
+CalenDayEventsPane::~CalenDayEventsPane()
+{
+}
+
+/*!
+ \brief Shows/hides a line at top of event pane.
+
+ \param drawTopLine Flag to be set if top line should be drawn.
+ */
+void CalenDayEventsPane::drawTopLine(bool drawTopLine)
+{
+ mDrawTopLine = drawTopLine;
+}
+
+/*!
+ \brief Paints the item with given painter.
+
+ \param painter
+ \param option
+ \param widget
+ */
+void CalenDayEventsPane::paint(QPainter *painter,
+ const QStyleOptionGraphicsItem *option, QWidget *widget)
+{
+ Q_UNUSED(widget)
+
+ QRectF drawArea = option->rect;
+
+ const qreal hourLineThickness = 0.15; //un (according to UI spec)
+
+ painter->save();
+
+ // Draw full hour line
+ QPen linePen = QPen(mHourLineColor, hourLineThickness * mUnitInPixels);
+ painter->setPen(linePen);
+ QLineF fullHourLine(drawArea.bottomLeft(), drawArea.bottomRight());
+ painter->drawLine(fullHourLine);
+
+ // Draw extra line on top if needed
+ if (mDrawTopLine) {
+ fullHourLine = QLineF(drawArea.topLeft(), drawArea.topRight());
+ painter->drawLine(fullHourLine);
+ }
+
+ // Draw half hour line
+ painter->setPen(mCustomDashedPen);
+ qreal halfHourYPos = drawArea.height() / 2;
+ QLineF halfHourLine(drawArea.left(), halfHourYPos, drawArea.right(), halfHourYPos);
+ painter->drawLine(halfHourLine);
+
+ painter->restore();
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/src/calendayhourelement.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,143 @@
+/*
+* 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: Day view control of calendar
+*
+*/
+
+//System includes
+#include <QGraphicsLinearLayout>
+#include <QPainter>
+#include <hbtextitem.h>
+#include <hbstyle.h>
+#include <hbcolorscheme.h>
+#include <hbfontspec.h>
+#include <hbextendedlocale.h>
+
+//User includes
+#include "calendayhourelement.h"
+#include "calendaycontainer.h"
+#include "calendayhourscrollarea.h"
+
+// Constants
+
+/*!
+ \brief CalenDayHourElement()
+ Constructor
+*/
+CalenDayHourElement::CalenDayHourElement(const QTime &time, QGraphicsItem *parent) :
+ HbWidget(parent), mHour(time)
+{
+ // Necessary when widget implements own paint method
+ setFlag(QGraphicsItem::ItemHasNoContents, false);
+
+ HbDeviceProfile deviceProfile;
+ mUnitInPixels = deviceProfile.unitValue();
+
+ mHourLineColor = HbColorScheme::color("qtc_cal_day_hour_lines");
+
+ //Create text items
+ HbExtendedLocale systemLocale = HbExtendedLocale::system();
+
+ //Get current time format and (if there's a need) separate time from am/pm text
+ QChar timeSeparator = ' ';
+ QStringList timeTextList = systemLocale.format(time, r_qtn_time_usual_with_zero).split(
+ timeSeparator);
+
+ //prepend 0 if needed to achieve format - 01:00
+ QString timeString = timeTextList[0];
+ if (timeString.length() < 5) {
+ timeString.prepend('0');
+ }
+
+ QString ampmString = "";
+ if (timeTextList.count() > 1) {
+ ampmString = timeTextList[1].toLower();
+ }
+
+ HbTextItem* timeTextItem = new HbTextItem(timeString, this);
+ HbTextItem* ampmTextItem = new HbTextItem(ampmString, this);
+
+ HbStyle::setItemName(timeTextItem, QLatin1String("time"));
+ HbStyle::setItemName(ampmTextItem, QLatin1String("ampm"));
+
+ mContainer = static_cast<CalenDayHourScrollArea*> (parent);
+
+}
+
+/*!
+ \brief CalenDayHourElement()
+ Destructor
+*/
+CalenDayHourElement::~CalenDayHourElement()
+{
+
+}
+
+/*!
+ \brief CalenDayHourElement()
+ paint
+*/
+void CalenDayHourElement::paint(
+ QPainter * painter,
+ const QStyleOptionGraphicsItem * option,
+ QWidget * widget)
+{
+ Q_UNUSED(widget);
+
+ QRectF drawArea = option->rect;
+
+ const qreal hourLineThickness = 0.15; //un (according to UI spec)
+ const qreal timeLineThickness = 0.75; //un (according to UI spec)
+
+ painter->save();
+
+ //Draw full hour line
+ QPen linePen = QPen(mHourLineColor, hourLineThickness * mUnitInPixels);
+ painter->setPen(linePen);
+ QLineF fullHourLine(drawArea.bottomLeft(), drawArea.bottomRight());
+
+ painter->drawLine(fullHourLine);
+
+ //Draw extra line on top for midnight
+ if (mHour.hour() == 0) {
+ fullHourLine = QLineF(drawArea.topLeft(), drawArea.topRight());
+ painter->drawLine(fullHourLine);
+ }
+
+ QDateTime currentDateTime = QDateTime::currentDateTime();
+
+ //Draw the time line in theme color
+ if (mContainer) {
+ QDateTime containersDateTime = mContainer->dateTime();
+
+ if (currentDateTime.date() == containersDateTime.date() && currentDateTime.time().hour()
+ == mHour.hour()) {
+
+ qreal currentTimeY = drawArea.height() * currentDateTime.time().minute() / 60;
+
+ QColor color = HbColorScheme::color("qtc_cal_month_current_day");
+
+ painter->setPen(QPen(color, timeLineThickness * mUnitInPixels, Qt::SolidLine,
+ Qt::FlatCap));
+ QLineF currentTimeline(drawArea.left(), drawArea.top() + currentTimeY, drawArea.right(), drawArea.top()
+ + currentTimeY);
+ painter->drawLine(currentTimeline);
+
+ }
+ }
+
+ painter->restore();
+}
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/src/calendayhourscrollarea.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,147 @@
+/*
+ * 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: CalenDayHourScrollArea implementation.
+ *
+ */
+
+// System includes
+#include <QGraphicsLinearLayout>
+
+// User includes
+#include "calendayhourscrollarea.h"
+#include "calendayhourelement.h"
+#include "calendayutils.h"
+
+/*!
+ \class CalenDayHourScrollArea
+ \brief Scrollable container class for hour elements.
+
+ It handles vertical scrolling.
+ */
+
+/*!
+ \brief Constructor
+
+ Configures scroll area settings and resets internal stares of widget.
+ Gets the width of device.
+
+ \param parent The parent of scroll area widget
+ */
+CalenDayHourScrollArea::CalenDayHourScrollArea(QGraphicsItem *parent) :
+ HbScrollArea(parent),
+ mDateTime(QDateTime())
+{
+ // Set scroll settings
+ setScrollDirections(Qt::Vertical);
+ setScrollingStyle(HbScrollArea::PanWithFollowOn);
+ setVerticalScrollBarPolicy(HbScrollArea::ScrollBarAlwaysOff);
+ grabGesture(Qt::PanGesture, Qt::ReceivePartialGestures);
+
+ // Get height and width of hour elements and set fixed size policy
+ qreal hourElementHeight = CalenDayUtils::instance()->hourElementHeight();
+ qreal hourElementWidth = CalenDayUtils::instance()->hourElementWidth();
+
+ // Create widget for hour elements
+ HbWidget *hourWidget = new HbWidget();
+
+ // Create and insert hour elements into vertical layout
+ QGraphicsLinearLayout* hourLayout = new QGraphicsLinearLayout(Qt::Vertical,
+ NULL);
+ for (int i = 0; i < 24; i++) {
+ CalenDayHourElement* element = new CalenDayHourElement(QTime(i, 0),
+ this);
+ element->setPreferredWidth(hourElementWidth);
+ element->setPreferredHeight(hourElementHeight);
+ element->setSizePolicy(QSizePolicy(QSizePolicy::Fixed,
+ QSizePolicy::Fixed));
+ hourLayout->addItem(element);
+
+ mHourElements.append(element);
+ }
+
+ hourLayout->setContentsMargins(0.0, 0.0, 0.0, 0.0);
+ hourLayout->setSpacing(0.0);
+
+ // Fix the size of scroll area
+ setMinimumWidth(hourElementWidth);
+ setMaximumWidth(hourElementWidth);
+
+ // Apply hour layout for new widget and set content widget to scroll area
+ hourWidget->setLayout(hourLayout);
+ setContentWidget(hourWidget);
+}
+
+/*!
+ \brief Destructor
+ */
+CalenDayHourScrollArea::~CalenDayHourScrollArea()
+{
+}
+
+/*!
+ \brief SLOT scrolls the view vertically to new position.
+
+ \param newPosition New position
+ */
+void CalenDayHourScrollArea::scrollVertically(const QPointF &newPosition)
+{
+ QPointF currentPos = contentWidget()->pos();
+ if (abs(newPosition.y()) != abs(currentPos.y())) {
+ currentPos.setY(newPosition.y());
+ scrollContentsTo(currentPos, 0);
+ }
+}
+
+/*!
+ \brief Sets date and time for this container.
+
+ \param dateTime new date and time
+ */
+void CalenDayHourScrollArea::setDateTime(const QDateTime &dateTime)
+{
+ mDateTime = dateTime;
+}
+/*!
+ \brief Returns date and time assigned to current view.
+*/
+QDateTime CalenDayHourScrollArea::dateTime() const
+{
+ return mDateTime;
+}
+
+/*!
+ \brief Scroll view to given hour.
+
+ \param An hour In 24 hour format (0 - 23)
+*/
+void CalenDayHourScrollArea::scrollToHour(int hour)
+{
+ CalenDayHourElement *hourElement = mHourElements.at(hour);
+ QRectF hourElementRect = hourElement->rect();
+ hourElementRect = hourElement->mapRectToParent(hourElementRect);
+ QPointF newPos = hourElementRect.topLeft();
+
+ //Ensure that we won't scroll out of bound
+ CalenDayHourElement *lastElement = mHourElements.last();
+ qreal bottomEdge = lastElement->mapRectToParent(lastElement->rect()).bottom();
+ qreal viewHeight = rect().height();
+
+ if(bottomEdge - newPos.y() < viewHeight){
+ newPos.setY(bottomEdge - viewHeight);
+ }
+
+ scrollContentsTo(newPos);
+}
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/src/calendayinfo.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,2362 @@
+/*
+* Copyright (c) 2007-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: Storage class for day and week views.
+*
+*/
+
+
+// INCLUDES
+#include "calendayinfo.h"
+#include "calenagendautils.h"
+#include "calenconstants.h"
+#include "calendateutils.h"
+
+namespace
+{
+const int KUntimedDefaultSlot(16);
+}
+
+/*!
+ \brief CalenDayInfo::CalenDayInfo
+*/
+CalenDayInfo::CalenDayInfo(TSlotsInHour aSlotsInHour) :
+ iFirstUntimedSlot(KUntimedDefaultSlot), iSlotsInHour(aSlotsInHour)
+{
+ iSelectedSlot = KFSCalStartingHour * iSlotsInHour;
+ iSelectedRegion = KErrNotFound;
+ iSelectedColumn = 0;
+ iSelectedAlldayEvent = KErrNotFound;
+ iEarliestEndSlot = KErrNotFound;
+ iLastStartSlot = KErrNotFound;
+}
+
+/*!
+ \brief Destructor
+*/
+CalenDayInfo::~CalenDayInfo()
+{
+ for (int i = 0; i < iRegionList.count(); i++) {
+ iRegionList[i].Close();
+ }
+ iRegionList.clear();
+ iUntimedEvents.clear();//Close();
+ iTodoEvents.clear();//Close();
+ iAlldayEvents.clear();//Close();
+}
+
+/*!
+ \brief CalenDayInfo::Reset
+*/
+void CalenDayInfo::Reset()
+{
+ for (int i = 0; i < iRegionList.count(); i++) {
+ iRegionList[i].Close();
+ }
+ iRegionList.clear();//Reset();
+ iUntimedEvents.clear();//Reset();
+ iTodoEvents.clear();//Reset();
+ iAlldayEvents.clear();//Reset();
+
+ iUntimedSlotCount = 0;
+ iFirstUntimedSlot = KFSCalStartingHour * iSlotsInHour;
+
+ iSelectedSlot = KFSCalStartingHour * iSlotsInHour;
+ iSelectedRegion = KErrNotFound;
+ iSelectedColumn = 0;
+ iSelectedAlldayEvent = KErrNotFound;
+ iEarliestEndSlot = KErrNotFound;
+ iLastStartSlot = KErrNotFound;
+}
+
+/*!
+ \brief CalenDayInfo::InsertTimedEvent
+*/
+void CalenDayInfo::InsertTimedEvent(const SCalenApptInfo& aItemInfo)
+{
+
+ int startIndex = SlotIndexForStartTime(aItemInfo.iStartTime);
+ int endIndex = SlotIndexForEndTime(aItemInfo.iEndTime);
+ if (endIndex == startIndex) {
+ endIndex++;
+ }
+ if (iRegionList.count() > 0) {
+ // the timed events must be added in order
+ ASSERT( startIndex >= iLastStartSlot );
+ }
+
+ CalenTimedEventInfo info;
+ info.iStartSlot = startIndex;
+ info.iEndSlot = endIndex;
+ info.iId = aItemInfo.iId;
+ info.iStatus = aItemInfo.iStatus;
+ // info.iReplicationStatus = aItemInfo.iReplicationStatus;
+ iLastStartSlot = startIndex;
+ if (iEarliestEndSlot == KErrNotFound || endIndex < iEarliestEndSlot) {
+ iEarliestEndSlot = endIndex;
+ }
+
+ bool added(false);
+ if (iRegionList.count() > 0) {
+ // Since events are added in order, the event either overlaps the
+ // last region or doesn't overlap any region at all
+ CalenTimeRegion& region = iRegionList[iRegionList.count() - 1];
+ if (region.Overlaps(info)) {
+ region.AddEvent(info);
+ added = true;
+ }
+ }
+
+ if (!added) {
+ // If it didn't overlap the last region, add a new region for this event.
+ iRegionList.append(CalenTimeRegion());
+ CalenTimeRegion& region = iRegionList[iRegionList.count() - 1];
+ region.AddEvent(info);
+
+ // Do rounding of the region ends
+ if (iRegionList.count() >= 2) {
+ // Check if the previous region end time can be rounded down
+ CalenTimeRegion& prevRegion = iRegionList[iRegionList.count() - 2];
+ int end = RoundHourDown(prevRegion.iEndSlot);
+ if (end <= region.iStartSlot) {
+ prevRegion.iEndSlot = end;
+ }
+ // Check if the start time of the new region can be rounded up
+ int start = RoundHourUp(region.iStartSlot);
+ if (start >= prevRegion.iEndSlot) {
+ region.iStartSlot = start;
+ }
+ }
+ else {
+ // No previous region, round the start time up
+ region.iStartSlot = RoundHourUp(region.iStartSlot);
+ }
+ }
+}
+
+/*!
+ \brief CalenDayInfo::InsertAlldayEvent
+*/
+void CalenDayInfo::InsertAlldayEvent(const SCalenApptInfo& aItemInfo)
+{
+ CalenTimedEventInfo info;
+ info.iStartSlot = 0;
+ info.iEndSlot = iSlotsInHour * KCalenHoursInDay + iUntimedSlotCount;
+ info.iId = aItemInfo.iId;
+ info.iStatus = aItemInfo.iStatus;
+ // info.iReplicationStatus = aItemInfo.iReplicationStatus;
+
+ iAlldayEvents.append(info);
+}
+
+/*!
+ \brief CalenDayInfo::IsAllDayEvent
+*/
+bool CalenDayInfo::IsAlldayEvent(QDateTime aStart, QDateTime aEnd)
+{
+ bool isAllDay(false);
+
+ if (!CalenDateUtils::onSameDay(aStart, aEnd)) {
+ QDateTime startMidnight = CalenDateUtils::beginningOfDay(aStart);
+ QDateTime endMidnight = CalenDateUtils::beginningOfDay(aEnd);
+
+ if ((aStart == startMidnight) && (aEnd == endMidnight)) {
+ isAllDay = true;
+ }
+ }
+ return isAllDay;
+}
+
+/*!
+ \brief CalenDayInfo::IsAllDayEvent
+ Allday event is an event starting and ending at midnight,
+ with a duration of n*24h.
+*/
+/*
+bool CalenDayInfo::IsAlldayEvent(const CCalInstance& aInstance)
+{
+ bool isAllDay(false);
+
+ // If getting the start or end time fails, return false.
+ QDateTime start;
+ QDateTime end;
+ TRAPD( error,
+ {
+ start = aInstance.StartTimeL().TimeLocalL();
+ end = aInstance.EndTimeL().TimeLocalL();
+ });
+
+ if (error == KErrNone && !CalenDateUtils::onSameDay(start, end)) {
+ QDateTime startMidnight = CalenDateUtils::beginningOfDay(start);
+ QDateTime endMidnight = CalenDateUtils::beginningOfDay(end);
+
+ if ((start == startMidnight) && (end == endMidnight)) {
+ isAllDay = true;
+ }
+ }
+
+ if (error != KErrNone) {
+ CEikonEnv::Static()->HandleError(error);//codescanner::eikonenvstatic
+ }
+
+ return isAllDay;
+}
+*/
+
+/*!
+ \brief CalenDayInfo::AlldayCount
+*/
+int CalenDayInfo::AlldayCount()
+{
+ return iAlldayEvents.count();
+}
+
+/*!
+ \brief CalenDayInfo::TodoCount
+*/
+int CalenDayInfo::TodoCount()
+{
+ return iTodoEvents.count();
+}
+
+/*!
+ \brief CalenDayInfo::GetLocation
+*/
+void CalenDayInfo::GetLocation(
+ const SCalenApptInfo& aItemInfo,
+ int& aStartSlot,
+ int& aEndSlot,
+ int& aColumnIndex,
+ int& aColumns)
+{
+ int startIndex = SlotIndexForStartTime(aItemInfo.iStartTime);
+ int endIndex = SlotIndexForEndTime(aItemInfo.iEndTime);
+ if (endIndex == startIndex) {
+ endIndex++;
+ }
+
+ aStartSlot = startIndex;
+ aEndSlot = endIndex;
+
+ CalenSlotInterval interval;
+ interval.iStartSlot = startIndex;
+ interval.iEndSlot = endIndex;
+
+ bool found(false);
+ // Scan through all allday events and see if it matches any of them
+ for (int i = 0; i < iAlldayEvents.count() && !found; i++) {
+ if (aItemInfo.iId == iAlldayEvents[i].iId) {
+ aColumns = iAlldayEvents.count();
+ aColumnIndex = i;
+ found = true;
+ }
+ }
+
+ // Scan through all regions and see if the event overlaps any region.
+ // If it overlaps a region, the event must be in that region.
+ for (int i = 0; i < iRegionList.count() && !found; i++) {
+ CalenTimeRegion& region = iRegionList[i];
+ if (region.Overlaps(interval)) {
+ // Scan through all columns and look for the event
+ aColumns = region.iColumns.count();
+ for (int j = 0; j < aColumns && !found; j++) {
+ if (region.iColumns[j].ContainsEvent(aItemInfo.iId)) {
+ aColumnIndex = j;
+ found = true;
+ }
+ }
+ // the event should be in this region if it overlaps the region
+ ASSERT( found );
+ }
+ }
+ // the event should have been found somewhere
+ ASSERT( found );
+}
+
+/*!
+ \brief CalenDayInfo::GetSelectedSlot
+*/
+void CalenDayInfo::GetSelectedSlot(int& aSlot, int& aRegion, int& aColumnIndex, int& aColumns)
+{
+
+ aSlot = iSelectedSlot;
+ aColumnIndex = iSelectedColumn;
+ if (iSelectedRegion >= 0) {
+ aColumns = iRegionList[iSelectedRegion].iColumns.count();
+ aRegion = iSelectedRegion;
+ }
+ else {
+ aColumns = 0;
+ aRegion = KErrNotFound;
+ }
+}
+
+/*!
+ \brief CalenDayInfo::FindRegion
+*/
+int CalenDayInfo::FindRegion(const CalenSlotInterval& aInterval, int aDirection)
+{
+ // Setup the start and end region indices for iterating
+ int start, end;
+ if (aDirection > 0) {
+ start = 0;
+ end = iRegionList.count();
+ }
+ else {
+ start = iRegionList.count() - 1;
+ end = -1;
+ }
+
+ int region = KErrNotFound;
+
+ // Iterate over the regions, in the order given, looking for a region
+ // overlapping this interval
+ for (int i = start; i != end && region < 0; i += aDirection) {
+ if (iRegionList[i].Overlaps(aInterval)) {
+ region = i;
+ }
+ }
+ return region;
+}
+
+/*!
+ \brief Find an event within the given interval of the current column,
+ searching in the given direction.
+*/
+int CalenDayInfo::FindEvent(const CalenSlotInterval& aInterval, int aDirection)
+{
+ ASSERT( iSelectedRegion >= 0 && iSelectedRegion < iRegionList.count() );
+
+ CalenTimeRegion& region = iRegionList[iSelectedRegion];
+ int index = KErrNotFound;
+
+ if (iSelectedColumn < region.iColumns.count()) {
+ CalenTimeColumn& column = region.iColumns[iSelectedColumn];
+ int start, end;
+ if (aDirection > 0) {
+ start = 0;
+ end = column.iEventArray.count();
+ }
+ else {
+ start = column.iEventArray.count() - 1;
+ end = -1;
+ }
+
+ // Iterate over the events in the chosen column in the order given,
+ // looking for an event overlapping this interval
+ for (int i = start; i != end && index < 0; i += aDirection) {
+ if (column.iEventArray[i].Overlaps(aInterval)) {
+ index = i;
+ }
+ }
+ }
+ return index;
+}
+
+/*!
+ \brief CalenDayInfo::IsEventSelected
+*/
+bool CalenDayInfo::IsEventSelected() const
+{
+ bool selected(false);
+ if (iSelectedAlldayEvent >= 0) {
+ selected = true;
+ }
+ else
+ if (iSelectedRegion >= 0 && iSelectedColumn < iRegionList[iSelectedRegion].iColumns.count()
+ && iSelectedColumnEventIndex >= 0) {
+ selected = true;
+ }
+ else
+ if (IsExtraSlot(iSelectedSlot) && iSelectedSlot - iFirstUntimedSlot
+ >= iEmptyUntimedSlots) {
+ selected = true;
+ }
+ else {
+ // if no event is selected, the selection slot must be a hour starting slot or an extra slot
+ ASSERT( IsHourStartSlot( iSelectedSlot ) || IsExtraSlot( iSelectedSlot ) );
+ selected = false;
+ }
+ return selected;
+}
+
+/*!
+ \brief CalenDayInfo::IsMultipleEventsSelected
+*/
+bool CalenDayInfo::IsMultipleEventsSelected() const
+{
+ bool isMultiple(false);
+ if (iSelectedAlldayEvent >= 0) {
+ // If an allday event is selected, disregard the value of
+ // iSelectedSlot
+ isMultiple = false;
+ }
+ else
+ if (IsExtraSlot(iSelectedSlot)) {
+ int index = iSelectedSlot - iFirstUntimedSlot - iEmptyUntimedSlots;
+ isMultiple = (index == 0) && iTodoEvents.count() > 1;
+ }
+ return isMultiple;
+}
+
+/*!
+ \brief CalenDayInfo::IsAlldayEventSelected
+*/
+bool CalenDayInfo::IsAlldayEventSelected() const
+{
+ bool selected(false);
+ if (iSelectedAlldayEvent >= 0) {
+ ASSERT( iSelectedAlldayEvent < iAlldayEvents.count() );
+ selected = true;
+ }
+ return selected;
+}
+
+/*!
+ \brief CalenDayInfo::UntimedEvent
+*/
+TCalenInstanceId CalenDayInfo::UntimedEvent(int aIndex)
+{
+ TCalenInstanceId id;
+ if (iTodoEvents.count() > 0 && aIndex == 0) {
+ id = iTodoEvents[0];
+ }
+ else {
+ // If we have one or more todo items, the first slot is used for them
+ // (but not more than one slot)
+ if (iTodoEvents.count() > 0) {
+ aIndex--;
+ }
+
+ if (aIndex >= 0 && aIndex < iUntimedEvents.count()) {
+ id = iUntimedEvents[aIndex];
+ }
+ else {
+ // should not happen
+ User::Invariant();
+ }
+ }
+
+ return id;
+}
+
+/*!
+ \brief CalenDayInfo::AlldayEvent
+*/
+const CalenTimedEventInfo& CalenDayInfo::AlldayEvent(int aIndex)
+{
+ ASSERT( aIndex >= 0 && aIndex < iAlldayEvents.count() );
+ return iAlldayEvents[aIndex];
+}
+
+/*!
+ \brief CalenDayInfo::SelectedEvent
+*/
+TCalenInstanceId CalenDayInfo::SelectedEvent()
+{
+ TCalenInstanceId id;
+ if (iSelectedAlldayEvent >= 0) {
+ ASSERT( iSelectedAlldayEvent < iAlldayEvents.count() );
+ id = iAlldayEvents[iSelectedAlldayEvent].iId;
+ }
+ else
+ if (iSelectedRegion >= 0) {
+ ASSERT( iSelectedRegion < iRegionList.count() );
+
+ CalenTimeRegion& region = iRegionList[iSelectedRegion];
+ if (iSelectedColumn < region.iColumns.count()) {
+ CalenTimeColumn& column = region.iColumns[iSelectedColumn];
+ if (iSelectedColumnEventIndex >= 0 && iSelectedColumnEventIndex
+ < column.iEventArray.count()) {
+ CalenTimedEventInfo& info = column.iEventArray[iSelectedColumnEventIndex];
+ id = info.iId;
+ }
+ else {
+ // should not happen, no event selected in the column
+ User::Invariant();
+ }
+ }
+ else {
+ // should not happen, the empty column was selected
+ User::Invariant();
+ }
+ }
+ else
+ if (IsExtraSlot(iSelectedSlot)) {
+ int index = iSelectedSlot - iFirstUntimedSlot - iEmptyUntimedSlots;
+ id = UntimedEvent(index);
+ }
+ else {
+ // should not happen
+ User::Invariant();
+ }
+
+ return id;
+}
+
+/*!
+ \brief CalenDayInfo::SelectEvent
+ Return KErrNotFound if not found, otherwise KErrNone
+*/
+int CalenDayInfo::SelectEvent(const TCalenInstanceId& aId)
+{
+ // Id can be of allday event, untimed event or other events
+
+ // Look for this event id in all event data structures and set
+ // the state accordingly if it was found
+
+ for (int i(0); i < iAlldayEvents.count(); i++) {
+ TCalenInstanceId id = iAlldayEvents[i].iId;
+ if (id == aId) {
+ iSelectedAlldayEvent = i;
+ iSelectedRegion = KErrNotFound;
+ return KErrNone;
+ }
+ }
+
+ for (int i(0); i < iTodoEvents.count(); i++) {
+ TCalenInstanceId id = iTodoEvents[i];
+ if (id == aId) {
+ iSelectedAlldayEvent = KErrNotFound;
+ iSelectedRegion = KErrNotFound;
+ iSelectedSlot = iFirstUntimedSlot + iEmptyUntimedSlots;
+ return KErrNone;
+ }
+ }
+
+ for (int i(0); i < iUntimedEvents.count(); i++) {
+ TCalenInstanceId id = iUntimedEvents[i];
+ if (id == aId) {
+ iSelectedAlldayEvent = KErrNotFound;
+ iSelectedRegion = KErrNotFound;
+ iSelectedSlot = iFirstUntimedSlot + iEmptyUntimedSlots + i;
+ if (iTodoEvents.count() > 0) {
+ iSelectedSlot++;
+ }
+ return KErrNone;
+ }
+ }
+
+ for (int i(0); i < iRegionList.count(); i++) {
+ CalenTimeRegion& region = iRegionList[i];
+ for (int col(0); col < region.iColumns.count(); col++) {
+ for (int ind(0); ind < region.iColumns[col].iEventArray.count(); ind++) {
+ if (region.iColumns[col].iEventArray[ind].iId == aId) {
+ iSelectedAlldayEvent = KErrNotFound;
+ iSelectedRegion = i;
+ iSelectedColumn = col;
+ iSelectedColumnEventIndex = ind;
+ SetSelectionInEvent(EMoveDirectionDown);
+ return KErrNone;
+ }
+ }
+ }
+ }
+
+ return KErrNotFound;
+}
+
+/*!
+ \brief CalenDayInfo::EnterRegionFromBelow
+*/
+void CalenDayInfo::EnterRegionFromBelow()
+{
+ ASSERT( iSelectedRegion >= 0 && iSelectedRegion < iRegionList.count() );
+ iSelectedColumn = KErrNotFound;
+ CalenTimeRegion& region = iRegionList[iSelectedRegion];
+ int latestEnd = region.iStartSlot;
+ // Look for the column with the latest end
+ for (int i = 0; i < region.iColumns.count(); i++) {
+ CalenTimeColumn& column = region.iColumns[i];
+ ASSERT( column.iEventArray.count()> 0 );
+ if (column.iEndSlot > latestEnd) {
+ // found a column with an event touching the end of the region
+ latestEnd = column.iEndSlot;
+ iSelectedColumn = i;
+ iSelectedColumnEventIndex = column.iEventArray.count() - 1;
+ SetSelectionInEvent(EMoveDirectionUp);
+ }
+ }
+ ASSERT( iSelectedColumn >= 0 );
+}
+
+/*!
+ \brief CalenDayInfo::EnterRegionFromAbove
+*/
+void CalenDayInfo::EnterRegionFromAbove()
+{
+ ASSERT( iSelectedRegion >= 0 && iSelectedRegion < iRegionList.count() );
+ iSelectedColumn = KErrNotFound;
+ CalenTimeRegion& region = iRegionList[iSelectedRegion];
+ int earliestStart = region.iEndSlot;
+ // Look for the column with the earliest start
+ for (int i = 0; i < region.iColumns.count(); i++) {
+ CalenTimeColumn& column = region.iColumns[i];
+ ASSERT( column.iEventArray.count()> 0 );
+ if (column.iStartSlot < earliestStart) {
+ // found a column with an event
+ earliestStart = column.iStartSlot;
+ iSelectedColumn = i;
+ iSelectedColumnEventIndex = 0;
+ SetSelectionInEvent(EMoveDirectionDown);
+ }
+ }
+ ASSERT( iSelectedColumn >= 0 );
+}
+
+/*!
+ \brief CalenDayInfo::NextFocusArea
+ Determines how large area to scan for new events/regions when moving in
+ the given direction. If no events are found in this area, focus an
+ empty slot instead
+*/
+CalenSlotInterval CalenDayInfo::NextFocusArea(const CalenSlotInterval& aInterval, int aDirection)
+{
+ // NOTE: the comments are written with the visual layout in mind.
+ // upwards == up in the display, towards earlier times
+ // downwards == down in the display, towards later times
+ CalenSlotInterval target;
+ target.iEndSlot = 0;
+ target.iStartSlot = 0;
+
+ if (IsExtraSlot(aInterval.iStartSlot)) {
+ // Special case logic for moving within the extra slots.
+
+ // The index within the extra slot area
+ int extraIndex = aInterval.iStartSlot - iFirstUntimedSlot;
+ // Generally, move just one slot at a time in this area
+ int newIndex = extraIndex + aDirection;
+
+ if (newIndex < iEmptyUntimedSlots) {
+ // Moved upwards past the first slot, return
+ // the whole last hour before the untimed slot area
+ target.iEndSlot = iFirstUntimedSlot;
+ target.iStartSlot = target.iEndSlot - iSlotsInHour;
+ }
+ else
+ if (newIndex >= iUntimedSlotCount) {
+ // Moved downwards past the last untimed slot, return
+ // the whole first hour after the untimed slot area
+ target.iStartSlot = iFirstUntimedSlot + iUntimedSlotCount;
+ target.iEndSlot = target.iStartSlot + iSlotsInHour;
+ }
+ else {
+ // Moved normally within the untimed slot area
+ target.iStartSlot = aInterval.iStartSlot + aDirection;
+ target.iEndSlot = target.iStartSlot + 1;
+ }
+ return target;
+ }
+
+ // Helper interval for the whole untimed area
+ CalenSlotInterval untimedInterval;
+ untimedInterval.iStartSlot = iFirstUntimedSlot;
+ untimedInterval.iEndSlot = untimedInterval.iStartSlot + iUntimedSlotCount;
+
+ if (aDirection < 0) {
+ // Moving upwards
+ // Create a target interval of one hour upwards
+ target.iEndSlot = aInterval.iStartSlot;
+ target.iStartSlot = aInterval.iStartSlot - iSlotsInHour;
+
+ if (iUntimedSlotCount > 0 && untimedInterval.Overlaps(target)) {
+ // The target interval overlaps the untimed area
+ if (iUntimedSlotCount > iEmptyUntimedSlots) {
+ // Make the interval start at the last untimed slot
+ target.iStartSlot = untimedInterval.iEndSlot - 1;
+ }
+ else {
+ // Untimed area containing no actual events.
+ // Include one whole hour before the untimed area.
+ target.iStartSlot = iFirstUntimedSlot - iSlotsInHour;
+ }
+ return target;
+ }
+
+ // Round the start slot upwards to an even hour
+ target.iStartSlot = RoundHourUp(target.iStartSlot);
+ }
+ else {
+ // Moving downwards
+ // Create a target interval of one hour downwards
+ target.iStartSlot = aInterval.iEndSlot;
+ target.iEndSlot = aInterval.iEndSlot + iSlotsInHour;
+
+ if (iUntimedSlotCount > 0 && untimedInterval.Overlaps(target)) {
+ // The target interval overlaps the untimed area
+
+ // Assumption: There can't be any regions before the untimed area
+ if (iUntimedSlotCount > iEmptyUntimedSlots) {
+ // Make the interval end at the first untimed slot containing
+ // an event
+ target.iStartSlot = untimedInterval.iStartSlot + iEmptyUntimedSlots;
+ target.iEndSlot = target.iStartSlot + 1;
+ }
+ else {
+ // Untimed area containing no actual events.
+ // Include one whole hour after the untimed area.
+ target.iStartSlot = untimedInterval.iStartSlot + iUntimedSlotCount;
+ target.iEndSlot = target.iStartSlot + iSlotsInHour;
+ }
+ return target;
+ }
+
+ target.iEndSlot = RoundHourDown(target.iEndSlot);
+ }
+
+ return target;
+}
+
+/*!
+ \brief CalenDayInfo::NextEmptyFocusSlot
+ If no events are found in an empty area scanned, focus this slot instead
+*/
+int CalenDayInfo::NextEmptyFocusSlot(const CalenSlotInterval& aInterval, int aDirection)
+{
+ // NOTE: the comments are written with the visual layout in mind.
+ // upwards == up in the display, towards earlier times
+ // downwards == down in the display, towards later times
+
+ int target(0);
+
+ // If the next focus area logic says we should go to an untimed slot,
+ // skip the rest of this method
+ CalenSlotInterval testInterval = NextFocusArea(aInterval, aDirection);
+ if (IsExtraSlot(testInterval.iStartSlot)) {
+ target = testInterval.iStartSlot;
+ }
+ else {
+ if (aDirection < 0) {
+ // Moving upwards, target slot is the start of the area returned by
+ // NextFocusArea. This always is an even hour.
+ target = testInterval.iStartSlot;
+ ASSERT( IsHourStartSlot( target ) );
+ }
+ else {
+ target = testInterval.iStartSlot;
+ if (!IsHourStartSlot(target)) {
+ // If the interval doesn't start on an even hour, round downwards.
+ target = RoundHourDown(target);
+ }
+ }
+ }
+
+ return target;
+}
+
+/*!
+ \brief CalenDayInfo::EmptySelectionInterval
+ Create an interval representation of the current focus area
+*/
+CalenSlotInterval CalenDayInfo::EmptySelectionInterval()
+{
+ CalenSlotInterval target;
+ target.iEndSlot = 0;
+ target.iStartSlot = 0;
+
+ if (IsExtraSlot(iSelectedSlot)) {
+ // Return an interval consisting of one single slot
+ target.iStartSlot = iSelectedSlot;
+ target.iEndSlot = target.iStartSlot + 1;
+ }
+ else {
+ // Round the start slot to an even hour if it isn't.
+ // NOTE: This actually updates the selection state!
+ // Only call this method if no event actually is selected.
+ if (!IsHourStartSlot(iSelectedSlot)) {
+ iSelectedSlot = RoundHourUp(iSelectedSlot);
+ }
+ target.iStartSlot = iSelectedSlot;
+ target.iEndSlot = iSelectedSlot + iSlotsInHour;
+ }
+
+ return target;
+}
+
+/*!
+ \brief CalenDayInfo::SelectedInterval
+*/
+CalenSlotInterval CalenDayInfo::SelectedInterval()
+{
+ CalenSlotInterval selection;
+ selection.iStartSlot = selection.iEndSlot = 0;
+
+ if (iSelectedAlldayEvent >= 0) {
+ selection.iStartSlot = 0;
+ selection.iEndSlot = iSlotsInHour * KCalenHoursInDay + iUntimedSlotCount;
+ }
+ else
+ if (iSelectedRegion >= 0) {
+
+ CalenTimeRegion& region = iRegionList[iSelectedRegion];
+ if (iSelectedColumn < region.iColumns.count()) {
+ CalenTimeColumn& column = region.iColumns[iSelectedColumn];
+ if (iSelectedColumnEventIndex >= 0 && iSelectedColumnEventIndex
+ < column.iEventArray.count()) {
+ CalenTimedEventInfo& info = column.iEventArray[iSelectedColumnEventIndex];
+ // gets only the CalenSlotInterval part from the CalenTimedEventInfo struct
+ selection = info;
+ }
+ }
+ }
+
+ if (selection.IsEmpty()) {
+ // No selection was set in the cases above, no event is selected, thus
+ // use the empty area selection interval instead.
+ selection = EmptySelectionInterval();
+ }
+ return selection;
+}
+
+/*!
+ \brief CalenDayInfo::SetSelectionInRegion
+ Sets selection within a region
+*/
+bool CalenDayInfo::SetSelectionInRegion(int aRegion, int aColumn, int aSlot)
+{
+ bool selected(false);
+ StoreOrigSelection();
+ //validate given values
+ if (aRegion >= 0 && aRegion < iRegionList.count()) {//ASSERT( iSelectedRegion >= 0 && iSelectedRegion < iRegionList.count() );
+ CalenSlotInterval interval;
+ //TODO: round aSlot hour to full hour down????
+ interval.iStartSlot = aSlot;
+ interval.iEndSlot = interval.iStartSlot + 1;
+
+ CalenTimeRegion& region = iRegionList[aRegion];
+ if (region.Overlaps(interval)) {
+ if (aColumn >= 0 && aColumn < region.iColumns.count()) {
+ bool eventFound(false);
+ CalenTimeColumn& column = region.iColumns[aColumn];
+ if (column.Overlaps(interval)) {
+ ASSERT( column.iEventArray.count()> 0 );
+ for (int i = 0; i < column.iEventArray.count(); i++) {
+ CalenTimedEventInfo& event = column.iEventArray[i];
+ if (event.Overlaps(interval)) {
+ iSelectedColumnEventIndex = i;
+
+ iSelectedAlldayEvent = KErrNotFound;
+ iSelectedRegion = aRegion;
+ iSelectedColumn = aColumn;
+ iSelectedSlot = aSlot;
+ selected = true;
+ eventFound = true;
+ break;
+ }
+
+ }
+ }
+
+ if (!eventFound) {
+ iSelectedAlldayEvent = KErrNotFound;
+ iSelectedRegion = aRegion;
+ iSelectedColumn = aColumn;
+ iSelectedSlot = aSlot;
+ iSelectedColumnEventIndex = KErrNotFound;
+ selected = true;
+ }
+ }
+ else
+ if (aColumn == iRegionList[aRegion].iColumns.count()) {//empty selection on right selected
+ iSelectedAlldayEvent = KErrNotFound;
+ iSelectedRegion = aRegion;
+ iSelectedColumn = aColumn;
+ iSelectedSlot = aSlot;
+ iSelectedColumnEventIndex = KErrNotFound;
+ selected = true;
+ }
+ }
+ }
+
+ return selected;
+}
+
+/*!
+ \brief CalenDayInfo::MoveOutFromRegion
+*/
+void CalenDayInfo::MoveOutFromRegion(int aDirection)
+{
+ CalenTimeRegion& region = iRegionList[iSelectedRegion];
+ CalenSlotInterval targetInterval = NextFocusArea(region, aDirection);
+ int next = iSelectedRegion + aDirection;
+ // Check what the next region would be and if we should move into that
+ // or into an empty area
+ if (next >= 0 && next < iRegionList.count()) {
+ if (iRegionList[next].Overlaps(targetInterval)) {
+ iSelectedRegion = next;
+ if (aDirection < 0) {
+ EnterRegionFromBelow();
+ }
+ else {
+ EnterRegionFromAbove();
+ }
+ }
+ else {
+ iSelectedRegion = KErrNotFound;
+ iSelectedSlot = NextEmptyFocusSlot(region, aDirection);
+ }
+ }
+ else {
+ iSelectedRegion = KErrNotFound;
+ iSelectedSlot = NextEmptyFocusSlot(region, aDirection);
+ }
+}
+
+/*!
+ \brief CalenDayInfo::MoveInColumn
+*/
+void CalenDayInfo::MoveInColumn(int aDirection)
+{
+ CalenTimeRegion& region = iRegionList[iSelectedRegion];
+ if (iSelectedColumn < region.iColumns.count()) {
+ CalenTimeColumn& column = region.iColumns[iSelectedColumn];
+ if (iSelectedColumnEventIndex >= 0) {
+ // We currently have an event in a column selected
+ CalenSlotInterval curInterval = column.iEventArray[iSelectedColumnEventIndex];
+ CalenSlotInterval targetInterval = NextFocusArea(curInterval, aDirection);
+
+ int next = iSelectedColumnEventIndex + aDirection;
+ // Check if the target interval overlaps the next event in this column
+ if (next >= 0 && next < column.iEventArray.count()) {
+ if (column.iEventArray[next].Overlaps(targetInterval)) {
+ iSelectedColumnEventIndex = next;
+ SetSelectionInEvent(aDirection);
+ }
+ else {
+ iSelectedColumnEventIndex = KErrNotFound;
+ iSelectedSlot = NextEmptyFocusSlot(curInterval, aDirection);
+ }
+ }
+ else {
+ // There's no next event in this column, focus an empty area instead.
+ iSelectedColumnEventIndex = KErrNotFound;
+ iSelectedSlot = NextEmptyFocusSlot(curInterval, aDirection);
+ }
+ }
+ else {
+ // No event selected in the current column, find the target interval
+ // and check if there's any event there
+ CalenSlotInterval curInterval = EmptySelectionInterval();
+ CalenSlotInterval targetInterval = NextFocusArea(curInterval, aDirection);
+ iSelectedColumnEventIndex = FindEvent(targetInterval, aDirection);
+ if (iSelectedColumnEventIndex >= 0) {
+ SetSelectionInEvent(aDirection);
+ }
+ else {
+ iSelectedSlot = NextEmptyFocusSlot(curInterval, aDirection);
+ }
+ }
+
+ // If the new selection lies outside of the region, move out from the region.
+ CalenSlotInterval selection = SelectedInterval();
+ if (selection.iStartSlot < region.iStartSlot || selection.iEndSlot > region.iEndSlot) {
+ MoveOutFromRegion(aDirection);
+ }
+
+ }
+ else {
+ // The empty column was selected, just move up/down in that column
+ iSelectedSlot = NextEmptyFocusSlot(EmptySelectionInterval(), aDirection);
+
+ // When moving in the empty column, move out from the region only if
+ // the selection moved completely out from the region.
+ CalenSlotInterval selection = SelectedInterval();
+ if (!selection.Overlaps(region)) {
+ // The target selection is completely outside of the current region
+ int next = iSelectedRegion + aDirection;
+ if (next >= 0 && next < iRegionList.count() && iRegionList[next].Overlaps(selection)) {
+ // The target selection overlaps the next region, move into that,
+ // stay within the rightmost empty column
+ iSelectedRegion = next;
+ iSelectedColumn = iRegionList[next].iColumns.count();
+ iSelectedColumnEventIndex = KErrNotFound;
+ }
+ else {
+ // Move out from the current region
+ iSelectedRegion = KErrNotFound;
+ iSelectedColumn = KErrNotFound;
+ iSelectedColumnEventIndex = KErrNotFound;
+ // iSelectedSlot was update above, keep the same value
+ }
+ }
+
+ }
+
+}
+
+/*!
+ \brief CalenDayInfo::MoveInAlldayEvent
+*/
+bool CalenDayInfo::MoveInAlldayEvent(TScrollDirection aDirection)
+{
+ ASSERT( iSelectedAlldayEvent >= 0 );
+ bool moved(true);
+ switch (aDirection) {
+ case EScrollUp: {
+ // don't do anything
+ }
+ break;
+ case EScrollDown: {
+ // don't do anything
+ }
+ break;
+ case EScrollLeft: {
+ if (iSelectedAlldayEvent > 0) {
+ // there are more allday events to the left, select next
+ iSelectedAlldayEvent--;
+ }
+ else {
+ // move to previous day
+ moved = false;
+ }
+ }
+ break;
+ case EScrollRight: {
+ if (iSelectedAlldayEvent < iAlldayEvents.count() - 1) {
+ // there are more allday events to the right, select next
+ iSelectedAlldayEvent++;
+ }
+ else {
+ iSelectedAlldayEvent = KErrNotFound;
+ // find a region to select
+ if (iSelectedRegion >= 0) {
+ // keep using the old selection state
+ }
+ else {
+ // find a new suitable selection
+
+ // if iSelectedSlot was moved to the empty untimed slot area,
+ // move it down to a real slot
+
+ if (iSelectedSlot >= iFirstUntimedSlot && iSelectedSlot < iFirstUntimedSlot
+ + iEmptyUntimedSlots) {
+ iSelectedSlot = iFirstUntimedSlot + iEmptyUntimedSlots;
+ }
+
+ CalenSlotInterval interval = EmptySelectionInterval();
+
+ iSelectedRegion = FindRegion(interval, EMoveDirectionDown);
+ int firstRegion = iSelectedRegion;
+ bool found(false);
+ // Iterate over all regions overlapping this interval, see
+ // if any of them has events in this column
+ while (iSelectedRegion >= 0 && iSelectedRegion < iRegionList.count()
+ && iRegionList[iSelectedRegion].Overlaps(interval) && !found) {
+
+ ASSERT( iSelectedRegion < iRegionList.count() );
+ CalenTimeRegion& region = iRegionList[iSelectedRegion];
+
+ ASSERT( region.iColumns.count()> 0 );
+ iSelectedColumn = 0;
+ CalenTimeColumn& column = region.iColumns[iSelectedColumn];
+
+ iSelectedColumnEventIndex = FindEvent(interval, EMoveDirectionDown);
+ if (iSelectedColumnEventIndex >= 0) {
+ ASSERT( iSelectedColumnEventIndex < column.iEventArray.count() );
+ // Keep using the old selected slot also here, just
+ // update it to make sure it's within the actual event
+ UpdateSelectionInEvent();
+ found = true;
+ }
+ else {
+ // Check the next region
+ iSelectedRegion++;
+ }
+ }
+
+ if (!found) {
+ iSelectedRegion = firstRegion;
+ iSelectedColumn = 0;
+ iSelectedSlot = interval.iStartSlot;
+ }
+
+ }
+ }
+ }
+ break;
+ default:
+ // Do nothing
+ break;
+ }
+
+ return moved;
+}
+
+/*!
+ \brief CalenDayInfo::MoveBetweenColumns
+*/
+void CalenDayInfo::MoveBetweenColumns(TScrollDirection aDirection)
+{
+ // Moving to another column
+ CalenSlotInterval selection = SelectedInterval();
+ if (IsEventSelected()) {
+ // If moving from an event, just use the selected
+ // slot pos within the event, not the whole event
+ // interval.
+ selection.iStartSlot = iSelectedSlot;
+ selection.iEndSlot = selection.iStartSlot + iSlotsInHour;
+ // Crop the selection to be within the event
+ selection.Intersect(SelectedInterval());
+ }
+
+ switch (aDirection) {
+ case EScrollLeft: {
+ iSelectedColumn--;
+ break;
+ }
+ case EScrollRight: {
+ iSelectedColumn++;
+ break;
+ }
+ default:
+ // Do nothing
+ break;
+ }
+
+ // First try finding events exactly in the selection area
+ iSelectedColumnEventIndex = FindEvent(selection, EMoveDirectionDown);
+ if (iSelectedColumnEventIndex >= 0) {
+ // An event was found in the given interval
+ // Keep using the old selection position, just update it to make
+ // sure it's within the event
+ UpdateSelectionInEvent();
+ }
+ else {
+ // No event found in the interval
+
+ // Expand the interval to even hour endings
+ selection.iStartSlot = RoundHourUp(selection.iStartSlot);
+ selection.iEndSlot = RoundHourDown(selection.iEndSlot);
+ CalenTimeRegion& region = iRegionList[iSelectedRegion];
+ // Crop the selection to the current region
+ selection.Intersect(region);
+
+ // Try again with the possibly larger interval
+ iSelectedColumnEventIndex = FindEvent(selection, EMoveDirectionDown);
+ if (iSelectedColumnEventIndex >= 0) {
+ // An event was found in the given interval
+ // Keep using the old selection position, just update it to make
+ // sure it's within the event
+ UpdateSelectionInEvent();
+ }
+ else {
+ // Still no events found. Select an empty interval if possible.
+
+ if (!IsHourStartSlot(selection.iStartSlot)) {
+ // The starting slot isn't a hour start slot. Rounding directly
+ // would move the interval outside of the region. See if we can
+ // round the starting slot down instead and still be within
+ // the region.
+ int start = RoundHourDown(selection.iStartSlot);
+ if (start + iSlotsInHour <= region.iEndSlot) {
+ // Ok, an empty selection fits within the region.
+ iSelectedSlot = start;
+ }
+ }
+ else
+ if (!IsHourStartSlot(selection.iEndSlot)) {
+ // The ending slot isn't a hour start slot. Rounding directly
+ // could move the interval outside of the region. See if we can
+ // round the upwards instead and still be within
+ // the region.
+ int start = RoundHourUp(selection.iEndSlot - iSlotsInHour);
+ if (start >= region.iStartSlot) {
+ // Ok, an empty selection fits within the region.
+ iSelectedSlot = start;
+ }
+ }
+
+ // Make sure the selected interval really is a valid
+ // empty interval selection (this forces rounding if needed)
+ selection = EmptySelectionInterval();
+
+ // Check the final target interval once more.
+ iSelectedColumnEventIndex = FindEvent(selection, EMoveDirectionDown);
+ if (iSelectedColumnEventIndex >= 0) {
+ // An event was found in the given interval
+ UpdateSelectionInEvent();
+ }
+ else {
+ // No even found, use the empty selection
+
+ // If not within the region, move out
+ if (selection.iStartSlot < region.iStartSlot) {
+ MoveOutFromRegion(EMoveDirectionUp);
+ }
+ else
+ if (selection.iEndSlot > region.iEndSlot) {
+ MoveOutFromRegion(EMoveDirectionDown);
+ }
+ }
+ }
+
+ }
+
+}
+
+/*!
+ \brief CalenDayInfo::MoveInRegion
+*/
+bool CalenDayInfo::MoveInRegion(TScrollDirection aDirection)
+{
+ ASSERT( iSelectedAlldayEvent < 0 && iSelectedRegion >= 0 );
+ bool moved(true);
+ switch (aDirection) {
+ case EScrollUp: {
+ MoveInColumn(EMoveDirectionUp);
+ }
+ break;
+ case EScrollDown: {
+ MoveInColumn(EMoveDirectionDown);
+ }
+ break;
+
+ case EScrollLeft: {
+ ASSERT( iSelectedRegion < iRegionList.count() );
+ CalenTimeRegion& region = iRegionList[iSelectedRegion];
+ ASSERT( iSelectedColumn >= 0 && iSelectedColumn <= region.iColumns.count() );
+ if (iSelectedColumn == 0) {
+ if (iAlldayEvents.count() > 0) {
+ // remember the last selection state
+ iSelectedAlldayEvent = iAlldayEvents.count() - 1;
+ }
+ else {
+ // move to previous day
+ moved = false;
+ }
+ }
+ else {
+ MoveBetweenColumns(aDirection);
+ }
+ }
+ break;
+
+ case EScrollRight: {
+ ASSERT( iSelectedRegion < iRegionList.count() );
+ CalenTimeRegion& region = iRegionList[iSelectedRegion];
+ if (iSelectedColumn < region.iColumns.count() - 1) {
+ MoveBetweenColumns(aDirection);
+ }
+ else
+ if (iSelectedColumn == region.iColumns.count() - 1) {
+ // In the last column, moving to the empty column
+ iSelectedColumn++;
+ iSelectedColumnEventIndex = KErrNotFound;
+
+ // Round the selection to an empty interval
+ EmptySelectionInterval();
+ }
+ else {
+ // in the last, empty column
+ // move to next day
+ moved = false;
+ }
+ }
+ break;
+
+ default:
+ // Do nothing
+ break;
+ }
+
+ return moved;
+}
+
+/*!
+ \brief CalenDayInfo::MoveInEmptyArea
+*/
+bool CalenDayInfo::MoveInEmptyArea(TScrollDirection aDirection)
+{
+ ASSERT( iSelectedAlldayEvent < 0 && iSelectedRegion < 0 );
+ bool moved(true);
+ switch (aDirection) {
+ case EScrollUp: {
+ CalenSlotInterval curInterval = EmptySelectionInterval();
+ CalenSlotInterval targetInterval = NextFocusArea(curInterval, EMoveDirectionUp);
+ iSelectedRegion = FindRegion(targetInterval, EMoveDirectionUp);
+ if (iSelectedRegion >= 0) {
+ EnterRegionFromBelow();
+ }
+ else {
+ iSelectedSlot = NextEmptyFocusSlot(curInterval, EMoveDirectionUp);
+ }
+
+ }
+ break;
+ case EScrollDown: {
+ CalenSlotInterval curInterval = EmptySelectionInterval();
+ CalenSlotInterval targetInterval = NextFocusArea(curInterval, EMoveDirectionDown);
+ iSelectedRegion = FindRegion(targetInterval, EMoveDirectionDown);
+ if (iSelectedRegion >= 0) {
+ EnterRegionFromAbove();
+ }
+ else {
+ iSelectedSlot = NextEmptyFocusSlot(curInterval, EMoveDirectionDown);
+ }
+ }
+ break;
+ case EScrollLeft: {
+ if (iAlldayEvents.count() > 0) {
+ iSelectedAlldayEvent = iAlldayEvents.count() - 1;
+ }
+ else {
+ // move to previous day
+ moved = false;
+ }
+ }
+ break;
+ case EScrollRight: {
+ // move to next day
+ moved = false;
+ }
+ break;
+ default:
+ // Do nothing
+ break;
+ }
+
+ return moved;
+}
+
+/*!
+ \brief CalenDayInfo::MoveSelection
+*/
+bool CalenDayInfo::MoveSelection(TScrollDirection aDirection)
+{
+ bool moved(true);
+ StoreOrigSelection();
+ if (iSelectedAlldayEvent >= 0) {
+ // focused on an allday event
+ moved = MoveInAlldayEvent(aDirection);
+ }
+ else
+ if (iSelectedRegion >= 0) {
+ // focused on some event region
+ moved = MoveInRegion(aDirection);
+ }
+ else {
+ // focused on an empty, plain area
+ moved = MoveInEmptyArea(aDirection);
+ }
+ if (!ValidateSelection()) {
+ moved = false;
+ }
+ return moved;
+}
+
+/*!
+ \brief CalenDayInfo::MoveSelectionInEvent
+*/
+void CalenDayInfo::MoveSelectionInEvent(TScrollDirection aDirection)
+{
+ ASSERT( IsEventSelected() );
+
+ switch (aDirection) {
+ case EScrollUp: {
+ iSelectedSlot -= KFSCalSlotsInHour;
+ }
+ break;
+ case EScrollDown: {
+ iSelectedSlot += KFSCalSlotsInHour;
+ }
+ break;
+
+ default:
+ // Do nothing
+ break;
+ }
+
+ UpdateSelectionInEvent();
+
+ if (iSelectedAlldayEvent >= 0) {
+ // if an allday event is selected, invalidate
+ // the old region/event selection
+ iSelectedRegion = KErrNotFound;
+ }
+}
+
+/*!
+ \brief CalenDayInfo::UpdateSelectionInEvent
+*/
+void CalenDayInfo::UpdateSelectionInEvent()
+{
+ ASSERT( IsEventSelected() );
+ CalenSlotInterval event = SelectedInterval();
+
+ if (iSelectedSlot < event.iStartSlot) {
+ iSelectedSlot = event.iStartSlot;
+ }
+ if (iSelectedSlot >= event.iEndSlot) {
+ iSelectedSlot = event.iEndSlot - 1;
+ }
+
+}
+
+/*!
+ \brief CalenDayInfo::SetSelectionInEvent
+*/
+void CalenDayInfo::SetSelectionInEvent(int aDirection)
+{
+ CalenSlotInterval event = SelectedInterval();
+ if (aDirection > 0) {
+ iSelectedSlot = event.iStartSlot;
+ }
+ else {
+ iSelectedSlot = event.iEndSlot - 1;
+ }
+}
+
+/*!
+ \brief CalenDayInfo::StoreOrigSelection
+*/
+void CalenDayInfo::StoreOrigSelection()
+{
+ iOrigSelectedAlldayEvent = iSelectedAlldayEvent;
+ iOrigSelectedRegion = iSelectedRegion;
+ iOrigSelectedColumn = iSelectedColumn;
+ iOrigSelectedSlot = iSelectedSlot;
+ iOrigSelectedColumnEventIndex = iSelectedColumnEventIndex;
+}
+
+/*!
+ \brief CalenDayInfo::ValidateSelection
+*/
+bool CalenDayInfo::ValidateSelection()
+{
+ bool validate(true);
+ if (iSelectedSlot < 0 || iSelectedSlot >= iSlotsInHour * KCalenHoursInDay + iUntimedSlotCount) {
+ // tried to move outside of the day
+ // revert to the original coords
+ iSelectedAlldayEvent = iOrigSelectedAlldayEvent;
+ iSelectedRegion = iOrigSelectedRegion;
+ iSelectedColumn = iOrigSelectedColumn;
+ iSelectedSlot = iOrigSelectedSlot;
+ iSelectedColumnEventIndex = iOrigSelectedColumnEventIndex;
+ validate = false;
+ }
+ return validate;
+}
+
+/*!
+ \brief CalenDayInfo::SelectSlot
+*/
+void CalenDayInfo::SelectSlot(int aSlot)
+{
+ // Check for special case: empty untimed slot is selected
+ if (aSlot >= iFirstUntimedSlot && aSlot < iFirstUntimedSlot + iEmptyUntimedSlots) {
+ aSlot = iFirstUntimedSlot + iEmptyUntimedSlots;
+ }
+
+ iSelectedAlldayEvent = KErrNotFound;
+ iSelectedSlot = aSlot;
+ CalenSlotInterval interval = EmptySelectionInterval();
+ iSelectedRegion = FindRegion(interval, EMoveDirectionDown);
+ if (iSelectedRegion >= 0) {
+ CalenTimeRegion& region = iRegionList[iSelectedRegion];
+ int regCount(region.iColumns.count());
+ for (int i = 0; i < regCount; i++) {
+ CalenTimeColumn& column = region.iColumns[i];
+ int colCount(column.iEventArray.count());
+ for (int j = 0; j < colCount; j++) {
+ if (column.iEventArray[j].Overlaps(interval)) {
+ iSelectedColumn = i;
+ iSelectedColumnEventIndex = j;
+ iSelectedSlot = aSlot;
+ UpdateSelectionInEvent();
+ return;
+ }
+ }
+ }
+ // Regions can have empty areas where there aren't any events,
+ // due to rounding of the ends of the region to whole hours.
+ // A region cannot, however, have a empty complete whole hour.
+ // Therefore, this cannot occur.
+ User::Invariant();
+ }
+}
+
+/*!
+ \brief CalenDayInfo::RegionList
+*/
+const QList<CalenTimeRegion>& CalenDayInfo::RegionList() const
+{
+ return iRegionList;
+}
+
+/*!
+ \brief CalenDayInfo::GetEventIntervals
+*/
+void CalenDayInfo::GetEventIntervals(QList<CalenEventInterval>& aArray) const
+{
+ int regCount(iRegionList.count());
+ for (int i = 0; i < regCount; i++) {
+ const CalenTimeRegion& region = iRegionList[i];
+ for (int j = 0; j < region.iIntervals.count(); j++) {
+ aArray.append(region.iIntervals[j]);
+ }
+ }
+}
+
+/*!
+ \brief CalenDayInfo::InsertUntimedEventL
+*/
+/*
+void CalenDayInfo::InsertUntimedEventL(const CCalInstance& aInstance)
+{
+ if (CalenAgendaUtils::IsTimedEntryL(aInstance.Entry().EntryTypeL())) {
+ // timed entry added as untimed event
+ User::Invariant();
+ }
+
+ TCalenInstanceId id = TCalenInstanceId::CreateL(aInstance);
+ InsertUntimedEvent(aInstance.Entry().EntryTypeL(), id);
+}
+*/
+
+/*!
+ \brief CalenDayInfo::InsertUntimedEvent
+*/
+void CalenDayInfo::InsertUntimedEvent(AgendaEntry::Type aType, const TCalenInstanceId& aId)
+{
+ if (aType == AgendaEntry::TypeTodo) {
+ iTodoEvents.append(aId);
+ }
+ else {
+ iUntimedEvents.append(aId);
+ }
+}
+
+/*!
+ \brief CalenDayInfo::SuggestedUntimedSlotPos
+*/
+int CalenDayInfo::SuggestedUntimedSlotPos()
+{
+ int slot = KFSCalStartingHour * iSlotsInHour;
+ if (iRegionList.count() > 0) {
+ CalenTimeRegion& region = iRegionList[0];
+ if (region.iStartSlot < slot) {
+ slot = RoundHourUp(region.iStartSlot);
+ }
+ }
+ return slot;
+}
+
+/*!
+ \brief CalenDayInfo::NeededUntimedSlotCount
+*/
+int CalenDayInfo::NeededUntimedSlotCount()
+{
+ int count = iUntimedEvents.count();
+ if (iTodoEvents.count() > 0) {
+ count++;
+ }
+ return count;
+}
+
+/*!
+ \brief CalenDayInfo::NeededUntimedSlotCount
+*/
+int CalenDayInfo::UpdateUntimedPos(int aSlot, int aUntimedCount)
+{
+ int newValue = NeededUntimedSlotCount();
+
+ // If this method is called many times, first undo the previous modifications
+ int regCount(iRegionList.count());
+ for (int i = 0; i < regCount; i++) {
+ iRegionList[i].AddOffset(-iUntimedSlotCount, iFirstUntimedSlot);
+ }
+ if (iSelectedSlot >= iFirstUntimedSlot) {
+ iSelectedSlot -= iUntimedSlotCount;
+ }
+
+ // Reset the untimed slot count
+ iUntimedSlotCount = 0;
+
+ // Get the default values
+ iFirstUntimedSlot = SuggestedUntimedSlotPos();
+ iUntimedSlotCount = newValue;
+
+ // If parameters were given, use them instead of the defaults
+ if (aSlot >= 0) {
+ ASSERT( aSlot <= iFirstUntimedSlot );
+ ASSERT( iUntimedSlotCount <= aUntimedCount );
+
+ iFirstUntimedSlot = aSlot;
+ iUntimedSlotCount = aUntimedCount;
+ }
+
+ iEmptyUntimedSlots = iUntimedSlotCount - NeededUntimedSlotCount();
+
+ // Add the new offset to all regions and update the selected slot
+ regCount = iRegionList.count();
+ for (int i = 0; i < regCount; i++) {
+ iRegionList[i].AddOffset(iUntimedSlotCount, iFirstUntimedSlot);
+ }
+ if (iSelectedSlot >= iFirstUntimedSlot) {
+ iSelectedSlot += iUntimedSlotCount;
+ }
+ int eventCount(iAlldayEvents.count());
+ for (int i = 0; i < eventCount; i++) {
+ iAlldayEvents[i].iEndSlot = iSlotsInHour * KCalenHoursInDay + iUntimedSlotCount;
+ }
+
+ // Do rounding of the end of the last region. This should be done when no
+ // more events will be added, but there's no real harm if new events are
+ // added after this.
+ if (iRegionList.count() > 0) {
+ // Round the end of the last region down
+ CalenTimeRegion& lastRegion = iRegionList[iRegionList.count() - 1];
+ lastRegion.iEndSlot = RoundHourDown(lastRegion.iEndSlot);
+ }
+
+ return iFirstUntimedSlot;
+}
+
+/*!
+ \brief Returns the index of the first occupied slot
+*/
+int CalenDayInfo::FirstOccupiedSlot()
+{
+
+ int firstNonemptySlot(KErrNotFound);
+
+ if (iUntimedSlotCount > 0) {
+ firstNonemptySlot = iFirstUntimedSlot;
+ }
+ else {
+ if (iRegionList.count() > 0) {
+ CalenTimeRegion& region = iRegionList[0];
+ firstNonemptySlot = region.iStartSlot;
+ }
+ }
+
+ return firstNonemptySlot;
+}
+
+/*!
+ \brief Returns the index of the last occupied slot
+*/
+int CalenDayInfo::LastOccupiedSlot()
+{
+ int lastNonemptySlot(KErrNotFound);
+ if (iRegionList.count() > 0) {
+ int lastIndex = iRegionList.count() - 1;
+ CalenTimeRegion& region = iRegionList[lastIndex];
+ lastNonemptySlot = region.iEndSlot;
+ }
+ else {
+ if (iUntimedSlotCount > 0) {
+ lastNonemptySlot = iFirstUntimedSlot + iUntimedSlotCount - 1;
+ }
+ }
+ return lastNonemptySlot;
+}
+
+/*!
+ \brief Returns the index of the earliest end slot
+*/
+int CalenDayInfo::EarliestEndSlot()
+{
+ int earliestEndSlot(KErrNotFound);
+ int untimedEventCount = iUntimedSlotCount - iEmptyUntimedSlots;
+ if (untimedEventCount > 0) {
+ earliestEndSlot = iFirstUntimedSlot + iEmptyUntimedSlots;
+ // add 1, since end slot is actually the one that is right after..
+ earliestEndSlot++;
+ }
+ else {
+ if (iRegionList.count() > 0) {
+ earliestEndSlot = iEarliestEndSlot + iEmptyUntimedSlots;
+ }
+ }
+ return earliestEndSlot;
+}
+
+/*!
+ \brief Returns the index of the last start slot
+*/
+int CalenDayInfo::LastStartSlot()
+{
+ int lastStartSlot(KErrNotFound);
+
+ if (iRegionList.count() > 0) {
+ lastStartSlot = iLastStartSlot + iUntimedSlotCount;
+ }
+ else {
+ if (iUntimedSlotCount - iEmptyUntimedSlots > 0) {
+ lastStartSlot = iFirstUntimedSlot + iUntimedSlotCount - 1;
+ }
+ }
+ return lastStartSlot;
+}
+
+/*!
+ \brief Returns the index of a slot where this event should start drawing,
+ based on the start time
+*/
+int CalenDayInfo::SlotIndexForStartTime(QDateTime aStartTime)
+{
+ // For example, 1/2 hour accuracy (iSlotsInHour == 2):
+ // Start drawing with the previus half hour: 9:15 -> 9:00, 9:59-> 9:30.
+
+
+ // TDateTime dt = aStartTime.DateTime();
+ // int minutes = dt.Minute();
+ // int hours = dt.Hour();
+ int minutes = aStartTime.time().minute();//dt.Minute();
+ int hours = aStartTime.time().hour();//dt.Hour();
+
+ // calculate index based on the hour.
+ int slotIndex = hours * iSlotsInHour;
+
+ switch (iSlotsInHour) {
+ case EOne: // do nothing
+ break;
+ case ETwo: {
+ if (minutes >= 30) {
+ slotIndex++;
+ }
+ }
+ break;
+ case EThree: {
+ if (minutes >= 20) {
+ slotIndex++;
+ }
+ if (minutes >= 40) {
+ slotIndex++;
+ }
+ }
+ break;
+ case EFour: // followthrough
+ default: {
+ if (minutes >= 15) {
+ slotIndex++;
+ }
+ if (minutes >= 30) {
+ slotIndex++;
+ }
+ if (minutes >= 45) {
+ slotIndex++;
+ }
+
+ }
+ }
+
+ if (slotIndex >= iFirstUntimedSlot) {
+ slotIndex += iUntimedSlotCount;
+ }
+ return slotIndex;
+}
+
+/*!
+ \brief Returns the index of a slot where this event should end drawing,
+ based on the end time
+*/
+int CalenDayInfo::SlotIndexForEndTime(QDateTime aEndTime)
+{
+ // For example, 1/2 hour accuracy (iSlotsInHour == 2):
+ // End drawing with the next half hour: 9:10 -> 9:30, 9:59-> 10:00.
+
+ // TDateTime dt = aEndTime.DateTime();
+ // int minutes = dt.Minute();
+ // int hours = dt.Hour();
+ int minutes = aEndTime.time().minute();
+ int hours = aEndTime.time().hour();
+
+ // calculate index based on the hour.
+ int slotIndex = hours * iSlotsInHour;
+
+ switch (iSlotsInHour) {
+ case EOne: {
+ if (minutes > 0) {
+ slotIndex++;
+ }
+ }
+
+ break;
+ case ETwo: {
+ if (minutes > 0) {
+ slotIndex++;
+ }
+ if (minutes > 30) {
+ slotIndex++;
+ }
+ }
+ break;
+ case EThree: {
+ if (minutes > 0) {
+ slotIndex++;
+ }
+ if (minutes > 20) {
+ slotIndex++;
+ }
+ if (minutes > 40) {
+ slotIndex++;
+ }
+ }
+ break;
+ case EFour: // followthrough
+ default: {
+ if (minutes > 0) {
+ slotIndex++;
+ }
+
+ if (minutes > 15) {
+ slotIndex++;
+ }
+ if (minutes > 30) {
+ slotIndex++;
+ }
+ if (minutes > 45) {
+ slotIndex++;
+ }
+
+ }
+ }
+
+ if (slotIndex >= iFirstUntimedSlot) {
+ slotIndex += iUntimedSlotCount;
+ }
+
+ return slotIndex;
+
+}
+
+/*!
+ \brief CalenDayInfo::IsHourStartSlot
+*/
+bool CalenDayInfo::IsHourStartSlot(const int& aSlotIndex) const
+{
+ bool isHourStartSlot(false);
+ if (IsExtraSlot(aSlotIndex)) {
+ isHourStartSlot = false;
+ }
+ else {
+ int hourIndex(aSlotIndex);
+ if (aSlotIndex >= iFirstUntimedSlot + iUntimedSlotCount) {
+ hourIndex -= iUntimedSlotCount;
+ }
+ int hour = hourIndex / iSlotsInHour;
+ int startIndOfHour = hour * iSlotsInHour;
+ if (hourIndex - startIndOfHour > 0) {
+ isHourStartSlot = false;
+ }
+ else {
+ isHourStartSlot = true;
+ }
+ }
+ return isHourStartSlot;
+
+}
+
+/*!
+ \brief CalenDayInfo::IsExtraSlot
+*/
+bool CalenDayInfo::IsExtraSlot(const int& aSlotIndex) const
+{
+ return (aSlotIndex >= iFirstUntimedSlot) && (aSlotIndex < (iFirstUntimedSlot
+ + iUntimedSlotCount));
+}
+
+/*!
+ \brief CalenDayInfo::HourFromSlotIndex
+ Returns the corresponding hour, or KErrNone if index is not hour slot index
+*/
+int CalenDayInfo::HourFromSlotIndex(const int& aSlotInd) const
+{
+
+ int hour(KErrNotFound);
+
+ if (!IsExtraSlot(aSlotInd)) {
+
+ if (aSlotInd < 0) {
+ // round downwards, to the previous starting hour
+ // e.g. iSlotsInHour = 2, aSlotInd = -1, hour = -1,
+ // which by SlotIndexFromHour corresponds to slot -2
+ hour = (aSlotInd - iSlotsInHour + 1) / iSlotsInHour;
+ }
+ else
+ if (aSlotInd < iFirstUntimedSlot) {
+ hour = aSlotInd / iSlotsInHour;
+ }
+ else
+ if (aSlotInd >= iFirstUntimedSlot + iUntimedSlotCount) {
+ hour = (aSlotInd - iUntimedSlotCount) / iSlotsInHour;
+ }
+ }
+ return hour;
+}
+
+/*!
+ \brief CalenDayInfo::SlotIndexFromHour
+ Returns the corresponding hour, or KErrNone if index is not hour slot index
+*/
+int CalenDayInfo::SlotIndexFromHour(int aHour)
+{
+
+ int slotIndex(KErrNotFound);
+
+ if (aHour >= iFirstUntimedSlot / iSlotsInHour) {
+ slotIndex = aHour * iSlotsInHour + iUntimedSlotCount;
+ }
+ else {
+ slotIndex = aHour * iSlotsInHour;
+ }
+
+ return slotIndex;
+}
+
+/*!
+ \brief CalenDayInfo::RoundHourUp
+ Rounds the slot number up (towards earlier hours) to an even hour
+*/
+int CalenDayInfo::RoundHourUp(int aSlot)
+{
+ if (!IsExtraSlot(aSlot)) {
+ aSlot = SlotIndexFromHour(HourFromSlotIndex(aSlot));
+ }
+ return aSlot;
+}
+
+/*!
+ \brief CalenDayInfo::RoundHourDown
+ Rounds the slot number down (towards later hours) to an even hour
+*/
+int CalenDayInfo::RoundHourDown(int aSlot)
+{
+ if (!IsExtraSlot(aSlot) && !IsHourStartSlot(aSlot)) {
+ aSlot = SlotIndexFromHour(HourFromSlotIndex(aSlot + iSlotsInHour));
+ }
+ return aSlot;
+}
+
+/*!
+ \brief CalenSlotInterval::Overlaps
+*/
+bool CalenSlotInterval::Overlaps(const CalenSlotInterval& aInterval) const
+{
+ return aInterval.iStartSlot < iEndSlot && aInterval.iEndSlot > iStartSlot;
+}
+
+/*!
+ \brief CalenSlotInterval::AddOffset
+*/
+void CalenSlotInterval::AddOffset(int aOffset, int aPos)
+{
+ if (iStartSlot >= aPos) {
+ iStartSlot += aOffset;
+ }
+ if (iEndSlot >= aPos) {
+ iEndSlot += aOffset;
+ }
+}
+
+/*!
+ \brief CalenSlotInterval::Union
+*/
+void CalenSlotInterval::Union(const CalenSlotInterval& aInterval)
+{
+ if (!aInterval.IsEmpty()) {
+ iStartSlot = Min(iStartSlot, aInterval.iStartSlot);
+ iEndSlot = Max(iEndSlot, aInterval.iEndSlot);
+ }
+}
+
+/*!
+ \brief CalenSlotInterval::Adjacent
+*/
+bool CalenSlotInterval::Adjacent(const CalenSlotInterval& aInterval) const
+{
+ bool adjacent(false);
+ if (Overlaps(aInterval)) {
+ adjacent = true;
+ }
+ else {
+ adjacent = iStartSlot == aInterval.iEndSlot || iEndSlot == aInterval.iStartSlot;
+ }
+ return adjacent;
+}
+
+/*!
+ \brief CalenSlotInterval::IsEmpty
+*/
+bool CalenSlotInterval::IsEmpty() const
+{
+ return iStartSlot >= iEndSlot;
+}
+
+/*!
+ \brief CalenSlotInterval::Intersect
+*/
+void CalenSlotInterval::Intersect(const CalenSlotInterval& aInterval)
+{
+ if (aInterval.IsEmpty()) {
+ iEndSlot = iStartSlot;
+ }
+ else {
+ iStartSlot = Max(iStartSlot, aInterval.iStartSlot);
+ iEndSlot = Min(iEndSlot, aInterval.iEndSlot);
+ }
+}
+
+/*!
+ \brief CalenSlotInterval::Subtract
+*/
+void CalenSlotInterval::Subtract(const CalenSlotInterval& aInterval, CalenSlotInterval& aSecondPart)
+{
+ aSecondPart.iStartSlot = aSecondPart.iEndSlot = 0;
+ if (!aInterval.IsEmpty() && Overlaps(aInterval)) {
+ if (aInterval.iStartSlot <= iStartSlot) {
+ iStartSlot = aInterval.iEndSlot;
+ }
+ else
+ if (aInterval.iEndSlot >= iEndSlot) {
+ iEndSlot = aInterval.iStartSlot;
+ }
+ else {
+ aSecondPart.iStartSlot = aInterval.iEndSlot;
+ aSecondPart.iEndSlot = iEndSlot;
+ iEndSlot = aInterval.iStartSlot;
+ }
+ }
+}
+
+/*!
+ \brief CalenSlotInterval::operator>
+*/
+bool CalenSlotInterval::operator>(const CalenSlotInterval& aInterval) const
+{
+ return iStartSlot > aInterval.iStartSlot;
+}
+
+/*!
+ \brief CalenTimeColumn::Close
+*/
+void CalenTimeColumn::Close()
+{
+ iEventArray.clear();
+}
+
+/*!
+ \brief CalenTimeColumn::AddEvent
+*/
+void CalenTimeColumn::AddEvent(const CalenTimedEventInfo& aEvent)
+{
+ ASSERT( aEvent.iStartSlot < aEvent.iEndSlot );
+ ASSERT( CanFitEvent( aEvent ) );
+
+ if (iEventArray.count() == 0) {
+ iStartSlot = aEvent.iStartSlot;
+ }
+ iEndSlot = aEvent.iEndSlot;
+ iEventArray.append(aEvent);
+}
+
+/*!
+ \brief CalenTimeColumn::CanFitEvent
+*/
+bool CalenTimeColumn::CanFitEvent(const CalenTimedEventInfo& aEvent)
+{
+ return (aEvent.iStartSlot >= iEndSlot) || (iEventArray.count() == 0);
+}
+
+/*!
+ \brief CalenTimeColumn::ContainsEvent
+*/
+bool CalenTimeColumn::ContainsEvent(const TCalenInstanceId& aId)
+{
+ bool contains(false);
+ int eventCount(iEventArray.count());
+ for (int i = 0; i < eventCount && !contains; i++) {
+ if (iEventArray[i].iId == aId) {
+ contains = true;
+ }
+ }
+ return contains;
+}
+
+/*!
+ \brief CalenTimeColumn::AddOffset
+*/
+void CalenTimeColumn::AddOffset(int aOffset, int aPos)
+{
+ if (aOffset != 0) {
+ CalenSlotInterval::AddOffset(aOffset, aPos);
+ int eventCount(iEventArray.count());
+ for (int i = 0; i < eventCount; i++) {
+ iEventArray[i].AddOffset(aOffset, aPos);
+ }
+ }
+}
+
+/*!
+ \brief CalenTimeRegion::Close
+*/
+void CalenTimeRegion::Close()
+{
+ int colCount(iColumns.count());
+ for (int i = 0; i < colCount; i++) {
+ iColumns[i].Close();
+ }
+ iColumns.clear();
+ iIntervals.clear();
+}
+
+/*!
+ \brief CalenTimeRegion::Overlaps
+*/
+bool CalenTimeRegion::Overlaps(const CalenSlotInterval& aInterval) const
+{
+ // the base class implementation would be ok, but we might want the assertion here
+ ASSERT( iColumns.count()> 0 );
+ return CalenSlotInterval::Overlaps(aInterval);
+}
+
+/*!
+ \brief CalenTimeRegion::AddOffset
+*/
+void CalenTimeRegion::AddOffset(int aOffset, int aPos)
+{
+ if (aOffset != 0) {
+ CalenSlotInterval::AddOffset(aOffset, aPos);
+ int colCount(iColumns.count());
+ for (int i = 0; i < colCount; i++) {
+ iColumns[i].AddOffset(aOffset, aPos);
+ }
+ int intervalCount(iIntervals.count());
+ for (int i = 0; i < intervalCount; i++) {
+ iIntervals[i].AddOffset(aOffset, aPos);
+ }
+ }
+
+}
+
+/*!
+ \brief CalenTimeRegion::AddEvent
+*/
+void CalenTimeRegion::AddEvent(const CalenTimedEventInfo& aEvent)
+{
+ if (iColumns.count() == 0) {
+ // This is the first event added to this region
+ iStartSlot = aEvent.iStartSlot;
+ iEndSlot = aEvent.iEndSlot;
+ }
+ else {
+ // Check that the events actually are added in the correct order
+ ASSERT( aEvent.iStartSlot >= iStartSlot );
+ ASSERT( aEvent.iStartSlot < iEndSlot );
+
+ if (aEvent.iEndSlot > iEndSlot) {
+ iEndSlot = aEvent.iEndSlot;
+ }
+ }
+
+ AddInterval(aEvent);
+
+ // If the event fits in one of the existing columns, add it to that one
+ bool added(false);
+ int colCount(iColumns.count());
+ for (int i = 0; i < colCount && !added; i++) {
+ if (iColumns[i].CanFitEvent(aEvent)) {
+ iColumns[i].AddEvent(aEvent);
+ added = true;
+ }
+ }
+
+ if (!added) {
+ // otherwise create a new column for it
+ iColumns.append(CalenTimeColumn());
+ iColumns[iColumns.count() - 1].AddEvent(aEvent);
+ }
+}
+
+/*!
+ \brief CalenTimeRegion::AddInterval
+*/
+void CalenTimeRegion::AddInterval(const CalenTimedEventInfo& aEvent)
+{
+ /*
+ * Here are a few examples of different possible cases for this method.
+ * The first picture of each example shows the initial situation in the
+ * array, and the new event to be added. The transformations performed
+ * are shown with a few intermediate steps.
+ *
+ * nO = newOverlap, nE = newEvent
+ *
+ * Example one:
+ *
+ * ------------------
+ * | newEvent |
+ * --------------------------------
+ * ... | lastOverlap | tail |
+ * --------------------------
+ *
+ * --------------
+ * | newEvent |
+ * --------------------------------
+ * ... | lastOverlap | tail |
+ * --------------------------
+ *
+ * --------------
+ * | nO | nE |
+ * --------------------------------
+ * ... | lastOverlap | tail |
+ * --------------------------
+ *
+ * Result:
+ * --------------------------------
+ * ... | lastOverlap | nE |
+ * --------------------------------
+ *
+ *
+ * Example two:
+ * ------------------
+ * | newEvent |
+ * -------------------------------------------
+ * ... | lastOverlap | tail |
+ * -------------------------------
+ *
+ * ------------------
+ * | nO | newEvent |
+ * -------------------------------------------
+ * ... | lastOverlap | tail |
+ * -------------------------------
+ *
+ * Result:
+ * -------------------------------------------
+ * ... | lastOverlap | tail | nO | newEvent |
+ * -------------------------------------------
+ *
+ *
+ * Example three:
+ * --------------
+ * | newEvent |
+ * -----------------------------------------------------
+ * ... | lastOverlap | tail |
+ * -----------------------------------------------------
+ *
+ * --------------
+ * | newOverlap |
+ * -----------------------------------------------------
+ * ... | lastOverlap | tail |
+ * -----------------------------------------------------
+ *
+ * --------------
+ * | newOverlap |
+ * -----------------------------------------------------
+ * ... | lastOverlap | tail | | tailPart2 |
+ * -----------------------------------------------------
+ *
+ * Result:
+ * -----------------------------------------------------
+ * ... | lastOverlap | tail | newOverlap | tailPart2 |
+ * -----------------------------------------------------
+ */
+
+ // Fill out the new event
+ CalenEventInterval newEvent;
+ newEvent.iStartSlot = aEvent.iStartSlot;
+ newEvent.iEndSlot = aEvent.iEndSlot;
+ newEvent.iStatus = aEvent.iStatus;
+ // newEvent.iReplicationStatus = aEvent.iReplicationStatus;
+ newEvent.iOverlap = false;
+
+ // a pointer to the last interval which is an overlap interval
+ CalenEventInterval* lastOverlap = NULL;
+ // If nonempty, this is the last interval after the last overlap
+ CalenEventInterval tail;
+ tail.iStartSlot = tail.iEndSlot = 0;
+
+ // Find lastOverlap and tail.
+ if (iIntervals.count() >= 1) {
+ // lastInterval is a pointer to the last interval in the array
+ CalenEventInterval* lastInterval = &iIntervals[iIntervals.count() - 1];
+
+ // If this is an overlap interval, we haven't got any tail.
+ if (lastInterval->iOverlap) {
+ lastOverlap = lastInterval;
+ }
+ else {
+ tail = *lastInterval;
+ }
+
+ // If there's at least two intervals, and the last one wasn't an overlap,
+ // the second last one must be an overlap.
+ if (iIntervals.count() >= 2 && !lastOverlap) {
+ lastOverlap = &iIntervals[iIntervals.count() - 2];
+ ASSERT( lastOverlap->iOverlap );
+ }
+ }
+
+ // If we got a tail, remove it from the array (it will be readded
+ // at the end if needed)
+ if (!tail.IsEmpty()) {
+ iIntervals.removeAt(iIntervals.count() - 1);
+ }
+
+ CalenEventInterval empty;
+ if (lastOverlap) {
+ // Remove the part which already is marked as an overlap
+ // from the new event. The new event can't start before the
+ // last overlap starts since events are added in order, therefore
+ // the second subtraction result interval will remain empty.
+ newEvent.Subtract(*lastOverlap, empty);
+ ASSERT( empty.IsEmpty() );
+ }
+
+ // Create a new interval, representing the overlap between the old tail
+ // and the new event
+ CalenEventInterval newOverlap = newEvent;
+ newOverlap.iOverlap = true;
+ newOverlap.Intersect(tail);
+
+ CalenEventInterval tailPart2 = tail; // initialize iOverlap and iStatus from tail
+ // Remove the new overlap from the old tail, possibly creating two separate intervals.
+ tail.Subtract(newOverlap, tailPart2);
+
+ // If the subtraction only yielded one single interval, but it's
+ // after newOverlap, make tailPart2 contain that and make tail empty.
+ if (tail > newOverlap) {
+ tailPart2 = tail;
+ tail.iEndSlot = tail.iStartSlot;
+ }
+
+ // Remove the new overlap from the new event. Since we already removed the old
+ // overlap, this subtraction can't produce two intervals either.
+ newEvent.Subtract(newOverlap, empty);
+ ASSERT( empty.IsEmpty() );
+
+ // If the new overlap is adjacent to the old one, expand the old one
+ // and set the new overlap to be empty.
+ if (lastOverlap && newOverlap.Adjacent(*lastOverlap)) {
+ lastOverlap->Union(newOverlap);
+ newOverlap.iEndSlot = newOverlap.iStartSlot;
+ }
+
+ // Add all the new intervals, if they're non-empty.
+ if (!tail.IsEmpty()) {
+ iIntervals.append(tail);
+ }
+ if (!newOverlap.IsEmpty()) {
+ iIntervals.append(newOverlap);
+ }
+ if (!tailPart2.IsEmpty()) {
+ iIntervals.append(tailPart2);
+ }
+ if (!newEvent.IsEmpty()) {
+ iIntervals.append(newEvent);
+ }
+
+}
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/src/calendayitem.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,239 @@
+/*
+* 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: Event view item, exact size and position of event is set in
+* CalenDayContainer::setItemModelIndex based on event duration
+*
+*/
+
+//System includes
+#include <hbframeitem.h>
+#include <hbtextitem.h>
+#include <agendaentry.h>
+#include <hbstyle.h>
+#include <hbcolorscheme.h>
+
+
+//User inlcudes
+#include "calendayitem.h"
+#include "calendaystatusstrip.h"
+#include "calendaymodel.h"
+
+// -----------------------------------------------------------------------------
+// CalenDayItem()
+// Constructor.
+// -----------------------------------------------------------------------------
+//
+CalenDayItem::CalenDayItem():
+ mUpdated(false), mBg(0), mEventDesc(0), mColorStripe(0),
+ mEventDescMinWidth(0.0), mFrameMinWidth(0.0)
+{
+}
+
+// -----------------------------------------------------------------------------
+// CalenBCDayView()
+// Copy constructor.
+// -----------------------------------------------------------------------------
+//
+CalenDayItem::CalenDayItem(const CalenDayItem & source) :
+ HbAbstractViewItem(source), mUpdated(false), mBg(0), mEventDesc(0),
+ mColorStripe(0), mEventDescMinWidth(0.0), mFrameMinWidth(0.0)
+{
+ // TODO: "qtg_fr_btn_pressed" need to replaced with qtg_fr_cal_meeting_bg
+ // when available
+ mBg = new HbFrameItem("qtg_fr_btn_pressed", HbFrameDrawer::NinePieces, this);
+ mEventDesc = new HbTextItem(this);
+ // TODO: probably ElideLeft needed for mirrored layout
+ mEventDesc->setElideMode(Qt::ElideRight);
+ mEventDesc->setTextWrapping(Hb::TextWrapAnywhere);
+
+ mColorStripe = new CalenDayStatusStrip(this);
+
+ HbStyle::setItemName(mBg, QLatin1String("backgroundFrame"));
+ HbStyle::setItemName(mEventDesc, QLatin1String("eventDescription"));
+ HbStyle::setItemName(static_cast<QGraphicsItem *>(mColorStripe), QLatin1String("colorStripe"));
+
+ HbDeviceProfile deviceProfile;
+ HbStyle style;
+
+ qreal horizontalSpacing = 0.0;
+ qreal rightMargin = 0.0;
+
+ style.parameter(QString("hb-param-margin-gene-middle-horizontal"),
+ horizontalSpacing, deviceProfile);
+ style.parameter(QString("hb-param-margin-gene-right"),
+ rightMargin, deviceProfile);
+
+ qreal stripeWidth = 1.5 * deviceProfile.unitValue(); //1.5un according to UI spec
+
+ mFrameMinWidth = 2 * horizontalSpacing + stripeWidth; //smallest width for which background frame is displayed
+ mEventDescMinWidth = mFrameMinWidth + rightMargin;//smallest width for which text can be displayed
+
+ //Minimum width is assured by widgetml and css
+ //additionally called here to prevent minimum size hint caching inside effectiveSizeHint
+ setMinimumWidth(stripeWidth);
+}
+
+// -----------------------------------------------------------------------------
+// ~CalenDayItem()
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CalenDayItem::~CalenDayItem()
+{
+}
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+HbAbstractViewItem * CalenDayItem::createItem()
+{
+ CalenDayItem* newItem = new CalenDayItem(*this);
+ return newItem;
+}
+
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+void CalenDayItem::updateChildItems()
+{
+ // there is no need to update items after creation
+ if (!mUpdated)
+ {
+ AgendaEntry entry;
+ entry = modelIndex().data( CalenDayEntry ).value<AgendaEntry>();
+
+ bool isAllDayEvent = (entry.type() == AgendaEntry::TypeEvent)
+ && !entry.isTimedEntry();
+
+ setDescription(entry, isAllDayEvent);
+ setStatusStrip(entry, isAllDayEvent);
+
+ mUpdated = true;
+ }
+
+ //TODO: check if needed
+ //repolish();
+ //HbAbstractViewItem::updateChildItems();
+}
+
+
+// -----------------------------------------------------------------------------
+// setDescription()
+// -----------------------------------------------------------------------------
+//
+void CalenDayItem::setDescription(const AgendaEntry &entry, bool allDayEvent)
+{
+ QString description(entry.summary());
+ QString location(entry.location());
+
+
+ int separtorPos = 0;
+
+ if(!location.isEmpty()) {
+ if ( !description.isEmpty() ) {
+ separtorPos = description.count();
+ description.append(", ");
+ }
+
+ description.append(location);
+ }
+
+ if ( description.isEmpty() ) {
+ description.append(hbTrId("txt_calendar_dblist_unnamed"));
+ }
+
+ //Description of all day events has to be displayed vertically
+ if(allDayEvent){
+
+ QString verticalString;
+ for(int i=0; i<description.count(); i++){
+
+ verticalString.append(QString(description.at(i)) + "\n");
+ }
+
+ // remove "\n" before comma separator if exist
+ if (separtorPos)
+ {
+ verticalString.remove( 2*separtorPos-1, 1);
+ }
+ description = verticalString;
+ }
+
+ mEventDesc->setText(description);
+}
+
+/*!
+ \brief It set all needed things for status strip from Agenda Entry.
+
+ \param entry Status Strip is created from Agenda Entry
+ */
+void CalenDayItem::setStatusStrip(const AgendaEntry &entry, bool allDayEvent)
+{
+ QColor color = HbColorScheme::color("qtc_cal_month_current_day");
+ mColorStripe->setColor(color);
+
+ if (!allDayEvent) {
+ mColorStripe->setStartEndTime(entry.startTime().time(),
+ entry.endTime().time());
+ } else {
+ // This is workaround for displaying all-day events.
+ // Now for MS Outlook compability all-day events' start and end time is
+ // 00:00:00 and 00:00:00 next day respectively.
+ // To draw it correctly we need times like those visible for user in
+ // editor: 00:00:00 to 23:59:59 (the same day)
+ mColorStripe->setStartEndTime(entry.startTime().time(),
+ entry.endTime().time().addSecs(-1));
+ }
+
+ switch (entry.status()) {
+ case AgendaEntry::Confirmed:
+ mColorStripe->setDrawingStyle(CalenDayStatusStrip::Filled);
+ break;
+ case AgendaEntry::Tentative:
+ mColorStripe->setDrawingStyle(CalenDayStatusStrip::StripWithLines);
+ break;
+ case AgendaEntry::Cancelled:
+ mColorStripe->setDrawingStyle(CalenDayStatusStrip::OnlyFrame);
+ break;
+ default:
+ mColorStripe->setDrawingStyle(CalenDayStatusStrip::Filled);
+ break;
+ }
+}
+
+void CalenDayItem::resizeEvent(QGraphicsSceneResizeEvent *event)
+{
+ Q_UNUSED(event)
+
+ qreal width = rect().width();
+
+ if(width < mEventDescMinWidth){
+ mEventDesc->hide();
+ } else{
+ mEventDesc->show();
+ }
+
+ if(width < mFrameMinWidth){
+ mBg->hide();
+ } else{
+ mBg->show();
+ }
+
+ //Necessary to switch layout
+ repolish();
+}
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/src/calendayitemview.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,393 @@
+/*
+* 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: Day view control of calendar
+*
+*/
+
+//System includes
+#include <QGesture>
+#include <QGraphicsLinearLayout>
+#include <hbabstractviewitem.h>
+#include <hbinstance.h>
+#include <hbaction.h>
+
+//User includes
+#include "calendayitemview.h"
+#include "calendayutils.h"
+#include "calendaycontainer.h"
+#include "calendayinfo.h"
+#include "calendaymodel.h"
+#include "calenservices.h"
+#include "calencontext.h"
+#include "CalenUid.h"
+
+
+// -----------------------------------------------------------------------------
+// CalenDayItemView()
+// Constructor
+// -----------------------------------------------------------------------------
+//
+CalenDayItemView::CalenDayItemView( MCalenServices &services, HbModelIterator *iterator, QGraphicsItem *parent )
+: HbAbstractItemView(mContainer = new CalenDayContainer(), iterator, parent),
+ mServices( services )
+{
+ mInfo = new CalenDayInfo( CalenDayInfo::ETwo );
+ mContainer->setDayInfo( mInfo );
+
+ //setup Selection Model
+ QItemSelectionModel* selModel = new QItemSelectionModel(this->model());
+ if ( selModel ) {
+ setSelectionMode( HbAbstractItemView::SingleSelection );
+ setSelectionModel( selModel );
+ }
+
+ setScrollDirections(Qt::Vertical);
+ setScrollingStyle(HbScrollArea::PanWithFollowOn);
+ setVerticalScrollBarPolicy(HbScrollArea::ScrollBarAlwaysOff);
+
+ grabGesture(Qt::PanGesture);
+ ungrabGesture(Qt::SwipeGesture);
+
+ //TODO: KG: Animate item pressed?! HbAbstractItemView::TouchDown
+ setEnabledAnimations( HbAbstractItemView::None );
+
+ // Get the width of content and fix its size
+ qreal contentWidth = CalenDayUtils::instance()->contentWidth();
+ setMinimumWidth(contentWidth);
+ setMaximumWidth(contentWidth);
+
+ setupSlots();
+ setupContextMenu();
+}
+
+// -----------------------------------------------------------------------------
+// ~CalenDayItemView()
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CalenDayItemView::~CalenDayItemView()
+{
+ delete mInfo;
+}
+
+// -----------------------------------------------------------------------------
+// scrollTo()
+//
+// -----------------------------------------------------------------------------
+//
+void CalenDayItemView::scrollTo(const QModelIndex &index, HbAbstractItemView::ScrollHint hint)
+{
+ HbAbstractItemView::scrollTo(index, hint);
+}
+
+// -----------------------------------------------------------------------------
+// reset()
+//
+// -----------------------------------------------------------------------------
+//
+void CalenDayItemView::reset()
+{
+// CalenDayItemView::reset();
+}
+
+// -----------------------------------------------------------------------------
+// modelAboutToBeReset()
+// Handles signal that is emitted when reset() is called, before the model's
+// internal state (e.g. persistent model indexes) has been invalidated.
+// -----------------------------------------------------------------------------
+//
+void CalenDayItemView::modelAboutToBeReset()
+{
+
+}
+
+// -----------------------------------------------------------------------------
+// modelReset()
+// Handles signal that is emitted when reset() is called, after the model's
+// internal state (e.g. persistent model indexes) has been invalidated.
+// -----------------------------------------------------------------------------
+//
+void CalenDayItemView::modelReset()
+{
+ if ( !mInfo ) {
+ return;
+ }
+ //reset day info
+ mInfo->Reset();
+
+ CalenDayModel* model(0);
+ model = static_cast<CalenDayModel*>(this->model());
+ if ( !model ) {
+ return;
+ }
+ int rowCount = model->rowCount( );
+ SCalenApptInfo apptInfo;
+ for( int row = 0; row < rowCount; row++ ) {
+ QModelIndex idx = model->index( row, 0 );
+ QVariant variant = idx.data( CalenDayEntry );
+ AgendaEntry entry = variant.value<AgendaEntry>();
+ apptInfo.iIndex = idx;
+
+ QDateTime start;
+ QDateTime end;
+ QDateTime currDate( model->modelDate() );
+ CalenDayUtils::instance()->getEventValidStartEndTime( start, end,
+ entry, currDate );
+
+ apptInfo.iStartTime = start;
+ apptInfo.iEndTime = end;
+
+ TCalenInstanceId id = TCalenInstanceId::nullInstanceId();//index.row() - temporary ID
+ id.mEntryLocalUid = row;
+ id.mInstanceTime = apptInfo.iStartTime;
+ apptInfo.iId = id;
+ apptInfo.iColor = 0xffff;
+
+ if ( entry.isTimedEntry() )
+ {
+ apptInfo.iAllDay = false;
+ mInfo->InsertTimedEvent( apptInfo );
+ }
+ else if( entry.type() == AgendaEntry::TypeEvent) //all-day event
+ {
+ apptInfo.iAllDay = true;
+ mInfo->InsertAlldayEvent( apptInfo );
+ }
+ }
+
+ HbAbstractItemView::reset();
+}
+
+// -----------------------------------------------------------------------------
+// scrollVertically()
+//
+// -----------------------------------------------------------------------------
+//
+void CalenDayItemView::scrollVertically( const QPointF &newPosition )
+{
+ QPointF currentPos = contentWidget()->pos();
+ if (abs(newPosition.y()) != abs(currentPos.y())) {
+ currentPos.setY(newPosition.y());
+ scrollContentsTo(currentPos, 0);
+ }
+}
+
+// -----------------------------------------------------------------------------
+// itemPressed()
+// This function is called when a touch down event is received within Abstract view item that is representing index.
+// -----------------------------------------------------------------------------
+//
+void CalenDayItemView::itemPressed( const QPointF &position )
+{
+ Q_UNUSED( position )
+}
+
+// -----------------------------------------------------------------------------
+// itemReleased()
+// This function is called when a touch release event is received within Abstract view item that is representing index.
+// -----------------------------------------------------------------------------
+//
+void CalenDayItemView::itemReleased( const QPointF &position )
+{
+ Q_UNUSED( position )
+}
+
+// -----------------------------------------------------------------------------
+// itemActivated()
+// This function is called when the item specified by index is activated by the user.
+// -----------------------------------------------------------------------------
+//
+void CalenDayItemView::itemActivated( const QPointF &position )
+{
+ Q_UNUSED( position )
+ HbAbstractViewItem *item = qobject_cast<HbAbstractViewItem *>(sender());
+ QModelIndex index = item->modelIndex();
+ QItemSelectionModel* selModel( selectionModel() );
+ if ( index.isValid() && selModel) {
+ selModel->select( index, QItemSelectionModel::Current | QItemSelectionModel::Select );
+ openSelectedItem();
+ }
+}
+
+// -----------------------------------------------------------------------------
+// itemLongPressed()
+// This function is called when long press event is received within Abstract view item viewItem.
+// -----------------------------------------------------------------------------
+//
+void CalenDayItemView::itemLongPressed(HbAbstractViewItem* item, QPointF coords)
+{
+ QModelIndex index = item->modelIndex();
+ QItemSelectionModel* selModel( selectionModel() );
+ if ( index.isValid() && selModel && mContextMenu) {
+ selModel->select( index, QItemSelectionModel::Current | QItemSelectionModel::Select );
+ mContextMenu->setPreferredPos( coords, HbPopup::BottomRightCorner );
+ mContextMenu->open();
+ }
+}
+
+// -----------------------------------------------------------------------------
+// orientationChanged()
+// Slot which is called whenever the orientation of the device changes.
+// -----------------------------------------------------------------------------
+//
+void CalenDayItemView::orientationChanged( Qt::Orientation orientation )
+{
+ // Update the width of screen
+ qreal contentWidth = CalenDayUtils::instance()->contentWidth();
+ setMinimumWidth(contentWidth);
+ setMaximumWidth(contentWidth);
+ if( mContainer ) {
+ mContainer->orientationChanged( orientation );
+ }
+}
+
+// -----------------------------------------------------------------------------
+// openSelectedItem()
+// Opens currently selected model item.
+// -----------------------------------------------------------------------------
+//
+void CalenDayItemView::openSelectedItem()
+{
+ issueCommandOnSelectedItem( ECalenEventView );
+}
+
+// -----------------------------------------------------------------------------
+// editSelectedItem()
+// Edits currently selected model item.
+// -----------------------------------------------------------------------------
+//
+void CalenDayItemView::editSelectedItem()
+{
+ issueCommandOnSelectedItem( ECalenEditCurrentEntry );
+}
+
+// -----------------------------------------------------------------------------
+// deleteSelectedIten()
+// Deletes currently selected model item.
+// -----------------------------------------------------------------------------
+//
+void CalenDayItemView::deleteSelectedItem()
+{
+ issueCommandOnSelectedItem( ECalenDeleteCurrentEntry );
+}
+
+// -----------------------------------------------------------------------------
+// setupSlots()
+// Connects item view's slots.
+// -----------------------------------------------------------------------------
+//
+void CalenDayItemView::setupSlots()
+{
+ // Connect to main window's orientationChanged signal to handle orientation
+ // switching
+ QObject::connect(CalenDayUtils::instance()->mainWindow(),
+ SIGNAL(orientationChanged(Qt::Orientation)), this,
+ SLOT(orientationChanged(Qt::Orientation)));
+
+ // Connect with model signals
+ if (this->model()) {
+ QObject::connect(this->model(), SIGNAL(modelAboutToBeReset()), this,
+ SLOT(modelAboutToBeReset()));
+ QObject::connect(this->model(), SIGNAL(modelReset()), this,
+ SLOT(modelReset()));
+ }
+ if (mContainer) {
+ // Connect with base class to enable handling item press by model index
+ QObject::connect(mContainer, SIGNAL(itemCreated(HbAbstractViewItem *)),
+ this, SLOT(itemCreated(HbAbstractViewItem*)));
+ }
+ QObject::connect(this, SIGNAL(pressed(const QPointF&)), this,
+ SLOT(itemPressed(const QPointF&)));
+ QObject::connect(this, SIGNAL(released(const QPointF&)), this,
+ SLOT(itemReleased(const QPointF&)));
+ QObject::connect(this, SIGNAL(activated(const QPointF&)), this,
+ SLOT(const QPointF&));
+ QObject::connect(this, SIGNAL(longPressed(HbAbstractViewItem*, QPointF)),
+ this, SLOT(itemLongPressed(HbAbstractViewItem*, QPointF)));
+}
+
+// -----------------------------------------------------------------------------
+// setupSlots()
+// Creates Context menu.
+// -----------------------------------------------------------------------------
+//
+void CalenDayItemView::setupContextMenu()
+{
+ mContextMenu = new HbMenu();
+ HbAction *openAction = mContextMenu->addAction(hbTrId("txt_common_menu_open"));
+ if (openAction) {
+ connect(openAction, SIGNAL(triggered()), this, SLOT(openSelectedItem()));
+ }
+ HbAction *editAction = mContextMenu->addAction(hbTrId("txt_common_menu_edit"));
+ if (editAction) {
+ connect(editAction, SIGNAL(triggered()), this, SLOT(editSelectedItem()));
+ }
+ HbAction *deleteAction = mContextMenu->addAction(hbTrId("txt_common_menu_delete"));
+ if (deleteAction) {
+ connect(deleteAction, SIGNAL(triggered()), this,
+ SLOT(deleteSelectedItem()));
+ }
+}
+
+// -----------------------------------------------------------------------------
+// issueCommandOnSelectedItem()
+// Sets context to currently selected model item and issues calendar command.
+// -----------------------------------------------------------------------------
+//
+bool CalenDayItemView::issueCommandOnSelectedItem( int command )
+{
+ bool retVal(false);
+ QItemSelectionModel* selModel(selectionModel());
+ if (!selModel){
+ return retVal;
+ }
+ QModelIndex index( selModel->currentIndex() );
+ if( index.isValid() ) {
+ retVal = true;
+ QVariant variant = index.data( CalenDayEntry );
+ AgendaEntry entry = variant.value<AgendaEntry>();
+ QDateTime start;
+ QDateTime end;
+ CalenDayModel* model(0);
+ model = static_cast<CalenDayModel*>(this->model());
+ QDateTime currDate( model->modelDate() );
+ CalenDayUtils::instance()->getEventValidStartEndTime( start, end,
+ entry, currDate );
+ TRAPD(error,
+ mServices.Context().setFocusDateAndTimeAndInstance(start,
+ TCalenInstanceId::create(entry));
+ mServices.IssueCommandL( command );
+ );
+ if( error ) {
+ retVal = false;
+ }
+ clearSelectionInModel();
+ }
+ return retVal;
+}
+
+// -----------------------------------------------------------------------------
+// clearSelectionInModel()
+// Clears current selection in Selection Model.
+// -----------------------------------------------------------------------------
+//
+void CalenDayItemView::clearSelectionInModel()
+{
+ QItemSelectionModel* selModel(selectionModel());
+ if (selModel) {
+ selModel->clear();
+ }
+}
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/src/calendaymodel.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,113 @@
+/*
+* 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: Single day item view model
+*
+*/
+
+
+
+#include <calenservices.h>
+#include <agendautil.h>
+#include "calendaymodel.h"
+
+
+/*!
+ BC Day Model constructor
+ \a date defined day for which entries will be fetched \a services is handle to
+ organizer services \a parent
+ */
+CalenDayModel::CalenDayModel(const QDateTime &date, MCalenServices &services,
+ QObject *parent)
+ : QAbstractListModel(parent), mServices(services)
+{
+ if (date.isValid())
+ {
+ loadAndStoreInstances(date);
+ }
+}
+
+/*
+ \reimp
+ */
+int CalenDayModel::rowCount( const QModelIndex &parent ) const
+{
+ Q_UNUSED( parent )
+ return mEntryList.count();
+}
+
+/*
+ \reimp
+ */
+QVariant CalenDayModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid())
+ {
+ return QVariant();
+ }
+
+ if (index.row() >= mEntryList.count())
+ {
+ return QVariant();
+ }
+
+ if (role == CalenDayEntry)
+ {
+ return mEntryList.at(index.row());
+ }
+ else
+ {
+ return QVariant();
+ }
+}
+
+/*!
+ Resets model. Old events are removed. Evenets for given day are fetched.
+ \a date defined day for which entries will be fetched
+ */
+void CalenDayModel::refreshModel(const QDateTime &date)
+{
+ beginResetModel();
+ loadAndStoreInstances(date);
+ endResetModel();
+}
+
+
+/*!
+ Fetches entries via. organizer API and stores it in member container
+ */
+void CalenDayModel::loadAndStoreInstances(const QDateTime &date)
+{
+ mDateTime = date;
+ //Filter flags
+ AgendaUtil::FilterFlags filter = AgendaUtil::FilterFlags(
+ AgendaUtil::IncludeAppointments | AgendaUtil::IncludeEvents);
+ QList<AgendaEntry> list;
+ // Fetch the instance list from the agenda interface
+ list = mServices.agendaInterface()->createEntryIdListForDay(date, filter);
+
+ mEntryList.clear();
+
+ foreach(AgendaEntry entry, list)
+ {
+ mEntryList.append(QVariant::fromValue(entry));
+ }
+}
+
+/*!
+ Retruns date (day). Model holds events for this day.
+ */
+QDateTime CalenDayModel::modelDate() const
+{
+ return mDateTime;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/src/calendaymodelmanager.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,167 @@
+/*
+* 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: Model manager holds models for three day views
+*
+*/
+
+#include <calenservices.h>
+#include <calencontext.h>
+
+#include "calendaymodelmanager.h"
+#include "calendaymodel.h"
+
+/*!
+ BC Model Manager constructor. Model manager use calendar context to
+ populate models with proper events.
+ \a services is handle to organizer services \a emptyModels if true created models
+ are not populated with events \a parent
+ */
+CalenDayModelManager::CalenDayModelManager(MCalenServices &services, bool emptyModels,
+ QObject *parent)
+ : QObject(parent), mServices (services)
+{
+ if (emptyModels)
+ {
+ mCurrentDayTime = QDateTime();
+ }
+ else
+ {
+ mCurrentDayTime = mServices.Context().focusDateAndTime();
+ }
+ createAllModels();
+}
+
+CalenDayModelManager::~CalenDayModelManager()
+{
+ // not needed now
+}
+
+
+void CalenDayModelManager::viewsScrollingFinished(CalenScrollDirection scrollTo)
+ {
+ if (scrollTo == ECalenScrollToNext)
+ {
+ moveForeward();
+ }
+ else
+ {
+ moveBackward();
+ }
+ }
+
+
+/*!
+ Reorganize models after move to previous day.
+ */
+void CalenDayModelManager::moveBackward()
+{
+ mCurrentDayTime = mServices.Context().focusDateAndTime();
+
+ CalenDayModel* tmp = mModels[NextDay];
+ tmp->refreshModel( mCurrentDayTime.addDays(-1));
+
+ mModels[NextDay] = mModels[CurrentDay];
+ mModels[CurrentDay] = mModels[PreviousDay];
+ mModels[PreviousDay] = tmp;
+}
+
+/*!
+ Reorganize models after move to next day.
+ */
+void CalenDayModelManager::moveForeward()
+{
+ mCurrentDayTime = mServices.Context().focusDateAndTime();
+
+ CalenDayModel* tmp = mModels[PreviousDay];
+ tmp->refreshModel( mCurrentDayTime.addDays(1));
+
+ mModels[PreviousDay] = mModels[CurrentDay];
+ mModels[CurrentDay] = mModels[NextDay];
+ mModels[NextDay] = tmp;
+}
+
+/*!
+ Returns given model
+ /a day defines model, can be (PreviousDay, CurrentDay, NextDay) only.
+ */
+QAbstractItemModel &CalenDayModelManager::getModel(ModelDay day)
+{
+ return *(mModels[day]);
+}
+
+/*!
+ Creates all models objects durring construction.
+ */
+void CalenDayModelManager::createAllModels()
+{
+
+ mModels[CurrentDay] = new CalenDayModel(mCurrentDayTime, mServices, this);
+
+ QDateTime previousDayTime;
+ QDateTime nextDayTime;
+
+ if (mCurrentDayTime.isValid())
+ {
+ previousDayTime = mCurrentDayTime.addDays(-1);
+ nextDayTime = mCurrentDayTime.addDays(1);
+ }
+
+ mModels[PreviousDay] = new CalenDayModel(previousDayTime, mServices, this);
+ mModels[NextDay] = new CalenDayModel(nextDayTime, mServices, this);
+}
+
+
+/*!
+ Refetch data for all models. Context calendar is used to fill models
+ with correct events. Should be used for full (three days) repopulation.
+ */
+void CalenDayModelManager::refreshAllModels()
+ {
+ mCurrentDayTime = mServices.Context().focusDateAndTime();
+
+ mModels[PreviousDay]->refreshModel(mCurrentDayTime.addDays(-1));
+ mModels[CurrentDay]->refreshModel(mCurrentDayTime);
+ mModels[NextDay]->refreshModel(mCurrentDayTime.addDays(1));
+ }
+
+/*!
+ Refetch data given day model. Context calendar is used to fill model
+ with correct events.
+ /a day defines model, can be (PreviousDay, CurrentDay, NextDay) only.
+ */
+void CalenDayModelManager::refreshSingleModel(CalenDayModelManager::ModelDay day)
+ {
+ switch (day)
+ {
+ case PreviousDay:
+ {
+ mModels[PreviousDay]->refreshModel(mCurrentDayTime.addDays(-1));
+ }
+ break;
+ case CurrentDay:
+ {
+ mModels[CurrentDay]->refreshModel(mCurrentDayTime);
+ }
+ break;
+ case NextDay:
+ {
+ mModels[PreviousDay]->refreshModel(mCurrentDayTime.addDays(1));
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/src/calendaystatusstrip.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,290 @@
+/*
+ * 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: Day view control of calendar
+ *
+ */
+
+#include <QPainter>
+#include <QPen>
+
+#include "calendaystatusstrip.h"
+
+qreal const CalenDayStatusStrip::mMinute = 60;
+qreal const CalenDayStatusStrip::mMinimumTime = 5;
+
+/*!
+ Constructor
+ */
+CalenDayStatusStrip::CalenDayStatusStrip(HbWidget *parent)
+ : HbWidget(parent), mRange(2),
+ mDrawingStyle(CalenDayStatusStrip::Filled)
+{
+ setFlag(QGraphicsItem::ItemHasNoContents,false);
+
+}
+
+/*!
+ Destructor
+ */
+CalenDayStatusStrip::~CalenDayStatusStrip()
+{
+
+}
+
+/*!
+ \brief Return range beatween two filled lines in StripWithLines drawing
+ styles.
+
+ \sa CalenDayStatusStrip::DrawingStyle, setRange
+ */
+qreal CalenDayStatusStrip::range() const
+{
+ return mRange;
+}
+
+/*!
+ \brief Return color drawing
+
+ \sa setColor
+ */
+QColor CalenDayStatusStrip::color() const
+{
+ return mColor;
+}
+
+/*!
+ \brief Return style of drawing.
+
+ \sa CalenDayStatusStrip::DrawingStyle, setDrawingStyle
+ */
+CalenDayStatusStrip::DrawingStyle CalenDayStatusStrip::drawingStyle() const
+{
+ return mDrawingStyle;
+}
+
+/*!
+ \brief Return orginal start and entime fo event
+
+ \sa setStartEndTime
+ */
+QPair<QTime,QTime> CalenDayStatusStrip::startEndTime() const
+{
+ return mStartEndEventTime;
+}
+
+/*!
+ \brief It set range beatween two filled lines in StripWithLines drawing
+ styles.
+
+ \param range Range beatween two filled lines
+
+ \sa CalenDayStatusStrip::DrawingStyle, range
+ */
+void CalenDayStatusStrip::setRange(qreal range)
+{
+ mRange = range;
+}
+
+/*!
+ \brief It set color drawing
+
+ \param stripColor Color of drawing
+
+ \sa stripColor
+ */
+void CalenDayStatusStrip::setColor(QColor stripColor)
+{
+ mColor = stripColor;
+}
+
+/*!
+ \brief It set drawing style of strip
+
+ \param drawingStyle Style of strip drawing.
+
+ \sa CalenDayStatusStrip::DrawingStyle, drawingStyle
+ */
+void
+CalenDayStatusStrip::setDrawingStyle(CalenDayStatusStrip::DrawingStyle drawingStyle)
+{
+ mDrawingStyle = drawingStyle;
+}
+
+/*!
+ It set start and end time of event
+
+ \param startTime Start of event
+ \param endTime End of event
+ */
+void CalenDayStatusStrip::setStartEndTime(const QTime &startTime,
+ const QTime &endTime)
+{
+ mStartEndEventTime.first = startTime;
+ mStartEndEventTime.second = endTime;
+
+ //check if startEndEvent is longer than mMinimumTimeminutes;
+ if (mStartEndEventTime.first.secsTo(mStartEndEventTime.second) < mMinute * mMinimumTime) {
+ mStartEndEventTime.second = QTime(mStartEndEventTime.first.hour(),
+ mStartEndEventTime.first.minute() + mMinimumTime);
+ }
+}
+
+/*!
+ \brief Reimplemented function...
+
+ Reimplemented function to draw status strip.
+ It is based on CalenDayStatusStrip::DrawingStyle, range and color
+ */
+void CalenDayStatusStrip::paint(
+ QPainter *painter,
+ const QStyleOptionGraphicsItem *option,
+ QWidget *widget)
+{
+ Q_UNUSED(option);
+ Q_UNUSED(widget);
+
+ //calculate bubble start and end time of bubble
+ QPair<QTime, QTime> startEndEvent =
+ calculateStartEndPostion(mStartEndEventTime.first,
+ mStartEndEventTime.second
+ );
+ //calculate how big is Minute
+ qreal minuteHeight = calculateMinuteHeight(startEndEvent.first,
+ startEndEvent.second
+ );
+
+ painter->save();// saves the painter state.
+
+
+ //calculate how long is event in minutes
+ qreal eventMinutes =
+ mStartEndEventTime.first.secsTo(mStartEndEventTime.second) / mMinute;
+ //calculate height and width of status stripe
+ qreal dx = size().width() - 1;
+ qreal dy = eventMinutes * minuteHeight;
+
+ //calculate time from wehre it should be drawed
+ qreal startTime =
+ startEndEvent.first.secsTo(mStartEndEventTime.first) / mMinute;
+ //this is done because bubble can be drawed from half hour
+ startTime = startTime > 30 ? startTime - 30 : startTime;
+ //calculate status stripe height
+ qreal startTimeHeight = startTime * minuteHeight;
+
+ //set bounding rect of drawed area
+ QRectF bounding(boundingRect());
+ //set size smaller by 1px in each side
+ bounding.setRect(bounding.left() + 1, bounding.top() + startTimeHeight,
+ dx - 1, dy - 1
+ );
+
+ //set clip region
+ painter->setClipRect(bounding, Qt::IntersectClip);
+
+ //prepare brush and paint
+ QBrush brush(mColor);
+ painter->setBrush(brush);
+ QPen pen;
+ pen.setWidth(1);
+ pen.setBrush(brush);
+ pen.setCapStyle(Qt::RoundCap);
+ pen.setJoinStyle(Qt::RoundJoin);
+
+ painter->setPen(pen);
+ QPointF startPoint(0, dy + dx);
+
+ switch (mDrawingStyle) {
+ case StripWithLines:
+ for (int i = 0; startPoint.y() > 0; i++) {
+ painter->drawPolygon(diagonalLine(startPoint, dx, 3));
+ startPoint.setY(startPoint.y() - 6 - mRange);
+ }
+ case OnlyFrame:
+ painter->setBrush(Qt::NoBrush);
+ break;
+ }
+
+ //draw rectangle
+ painter->drawRect(bounding);
+
+ // restore the painter
+ painter->restore();
+}
+
+/*!
+ \brief It preapre points to draw filled polygon when StripWithLines style is
+ on.
+ */
+QPolygonF
+CalenDayStatusStrip::diagonalLine(QPointF startPoint, qreal dx, qreal dy)
+{
+ QPolygonF polygon;
+ polygon << QPointF(startPoint.x(), startPoint.y());
+ polygon << QPointF(startPoint.x(), startPoint.y() - dy);
+ polygon << QPointF(startPoint.x() + dx, startPoint.y() - 2 * dy);
+ polygon << QPointF(startPoint.x() + dx, startPoint.y() - dy);
+ return polygon;
+}
+
+/*!
+ Return time for position 0 and height in widget
+
+ \param startTime Start of event
+ \param endTime End of event
+ \return Draw region of bubble
+ */
+ QPair<QTime,QTime> CalenDayStatusStrip::calculateStartEndPostion(
+ const QTime &startTime,
+ const QTime &endTime
+ )
+{
+
+ QTime start;
+ QTime end;
+
+ if (startTime.minute() < 30) {
+ start = QTime(startTime.hour(), 0);
+ }
+ else {
+ start = QTime(startTime.hour(), 30);
+ }
+
+ if (endTime.minute() == 0) {
+ end = endTime;
+ }
+ else if (endTime.hour() == 23) {
+ end = QTime(endTime.hour(), 59);
+ }
+ else if (endTime.minute() <= 30) {
+ end = QTime(endTime.hour(), 30);
+ }
+ else {
+ end = QTime(endTime.hour() + 1, 0);
+ }
+
+ return QPair<QTime, QTime> (start, end);
+}
+
+/*!
+ Calculate height of one minute from widget height, and start/end time.
+ */
+qreal CalenDayStatusStrip::calculateMinuteHeight(const QTime &start,
+ const QTime &end)
+{
+ qreal min = start.secsTo(end) / mMinute;
+
+ qreal height = size().height();
+
+ return height / min;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/src/calendayutils.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,234 @@
+/*
+* 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: CalenDayUtils utility class implementation.
+*
+*/
+
+// System includes
+#include <hbdeviceprofile.h>
+#include <hbstyle.h>
+#include <hbinstance.h>
+#include <qdatetime.h>
+
+// User includes
+#include "calendayutils.h"
+#include "calendaycommonheaders.h"
+#include "agendaentry.h"
+#include "calendateutils.h"
+
+// Initialization of static member
+CalenDayUtils* CalenDayUtils::mInstance = 0;
+
+/*!
+ \class CalenDayUtils
+ \brief Singleton utility class.
+
+ Class cannot be used in console applications.
+
+ Provided functionalities (getters):
+ - screen width of device
+ - default width of hour element
+ - default height of hour element
+ - default width of content area
+ - current orientation of screen
+ - pointer to the main window of application
+ */
+
+/*!
+ \brief Returns the instance of CalenDayUtils class
+ */
+CalenDayUtils *CalenDayUtils::instance()
+{
+ if (!mInstance) {
+ mInstance = new CalenDayUtils();
+ }
+ return mInstance;
+}
+
+/*!
+ \brief Destructor
+ */
+CalenDayUtils::~CalenDayUtils()
+{
+
+}
+
+/*!
+ \brief screenWidth
+
+ \return Width of main window's screen
+ */
+qreal CalenDayUtils::screenWidth() const
+{
+ ASSERT(mMainWindow);
+
+ return mMainWindow->layoutRect().width();
+}
+
+/*!
+ \brief hourElementWidth
+
+ \return Width of hour element
+ */
+qreal CalenDayUtils::hourElementWidth() const
+{
+ return mHourElementWidth;
+}
+
+/*!
+ \brief hourElementHeight
+
+ \return Height of hour element
+ */
+qreal CalenDayUtils::hourElementHeight() const
+{
+ return mHourElementHeight;
+}
+
+/*!
+ \brief contentWidth
+
+ \return Width of content area
+ */
+qreal CalenDayUtils::contentWidth() const
+{
+ return (screenWidth() - mHourElementWidth);
+}
+
+/*!
+ \brief orientation
+
+ \return Orientation of main window
+ */
+Qt::Orientation CalenDayUtils::orientation() const
+{
+ ASSERT(mMainWindow);
+
+ return mMainWindow->orientation();
+}
+
+/*!
+ \brief mainWindow
+
+ \return Pointer to main window of application
+ */
+HbMainWindow* CalenDayUtils::mainWindow()
+{
+ ASSERT(mMainWindow);
+
+ return mMainWindow;
+}
+
+/*!
+ \brief isHorizontalSwipe
+
+ \return TRUE if horizontal swipe was recognized (angle in specific range)
+ */
+bool CalenDayUtils::isHorizontalSwipe(qreal angle) const
+{
+ bool isHSwipe = false;
+ if ((angle < KCalenSwipeAngle) ||
+ ((angle > 180 - KCalenSwipeAngle) && (angle < 180 + KCalenSwipeAngle)) ||
+ (angle > 360 - KCalenSwipeAngle)) {
+ isHSwipe = true;
+ }
+
+ return isHSwipe;
+}
+
+/*!
+ \brief getEventValidStartEndTime
+ \brief Get event's valid start/end time from agenda entry.
+ */
+void CalenDayUtils::getEventValidStartEndTime( QDateTime& start, QDateTime& end,
+ AgendaEntry& entry, QDateTime& currentDate )
+{
+ start = entry.startTime();
+ end = entry.endTime();
+
+ if ( !CalenDateUtils::onSameDay( start, currentDate ) ) {
+ start = CalenDateUtils::beginningOfDay( currentDate );
+ }
+
+ if ( !CalenDateUtils::onSameDay( end, currentDate ) ) {
+ QDateTime tommorrow( currentDate.addDays( 1 ));
+ end = CalenDateUtils::beginningOfDay( tommorrow ).addSecs( -60 );
+ }
+}
+
+/*!
+ \brief Constructor
+ */
+CalenDayUtils::CalenDayUtils() : mMainWindow(NULL)
+{
+ if (HbInstance::instance()->allMainWindows().count() > 0) {
+ mMainWindow = HbInstance::instance()->allMainWindows().first();
+ }
+ mHourElementWidth = calculateHourElementWidth();
+ mHourElementHeight = calculateHourElementHeight();
+}
+
+/*!
+ \brief Calculates the width of hour element according to UI spec.
+
+ \return Calculated width of hour element
+ */
+qreal CalenDayUtils::calculateHourElementWidth() const
+{
+ HbStyle style;
+ HbDeviceProfile deviceProfile;
+ qreal unitInPixels = deviceProfile.unitValue();
+
+ // Calculate element's preferred width
+ qreal prefWidth = 0.0;
+ qreal textWidth = 0.0;
+ qreal horizontalSpacing = 0.0;
+
+ textWidth = 8.04 * unitInPixels; // pix (according to UI spec)
+ style.parameter(QString("hb-param-margin-gene-middle-horizontal"),
+ horizontalSpacing, deviceProfile);
+ prefWidth = horizontalSpacing * 2 + textWidth;
+
+ return prefWidth;
+}
+
+/*!
+ \brief Calculates the height of hour element according to UI spec.
+
+ \return Calculated height of hour element
+ */
+qreal CalenDayUtils::calculateHourElementHeight() const
+{
+ HbStyle style;
+ HbDeviceProfile deviceProfile;
+
+ qreal unitInPixels = deviceProfile.unitValue();
+
+ // Calculate element's preferred height
+ qreal prefHeight = 0.0;
+ qreal textHeight = 0.0;
+ qreal verticalSpacing = 0.0;
+
+ qreal bottomSpacer = 3.0 * unitInPixels;
+ style.parameter(QString("hb-param-text-height-secondary"), textHeight,
+ deviceProfile);
+ style.parameter(QString("hb-param-margin-gene-middle-vertical"),
+ verticalSpacing, deviceProfile);
+
+ prefHeight = textHeight * 2; //time + ampm
+ prefHeight += verticalSpacing * 2;
+ prefHeight += bottomSpacer;
+
+ return prefHeight;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/src/calendayview.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,516 @@
+/*
+ * 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: CalenDayView class definition.
+ *
+ */
+
+//system includes
+#include <QDateTime>
+#include <QGraphicsLinearLayout>
+#include <xqsettingsmanager.h>
+#include <hbaction.h>
+#include <hbmenu.h>
+#include <hbmainwindow.h>
+#include <hbmodeliterator.h>
+#include <hbstyleloader.h>
+#include <hbgroupbox.h>
+#include <hbextendedlocale.h>
+#include <agendautil.h>
+//user includes
+#include "calendayview.h"
+#include "calencontext.h"
+#include "calenservices.h"
+#include "calendocloader.h"
+#include "calendateutils.h" //useful date/time utils
+#include "calendaycontentscrollarea.h"
+#include "calendaycontentwidget.h"
+#include "calendayhourscrollarea.h"
+#include "calendaymodelmanager.h"
+#include "CalenUid.h"
+#include "CalendarPrivateCRKeys.h"
+#include "calenpluginlabel.h"
+#include "calendaymodel.h"
+
+//constants
+
+// -----------------------------------------------------------------------------
+// CalenDayView()
+// Constructor.
+// -----------------------------------------------------------------------------
+//
+CalenDayView::CalenDayView(MCalenServices &services) :
+ CalenNativeView(services), mContentScrollArea(NULL), mContentWidget(NULL),
+ mHourScrollArea(NULL), mSettingsManager(NULL),
+ mRegionalInfo(XQSettingsKey::TargetCentralRepository, KCRUidCalendar,
+ KCalendarShowRegionalInfo),
+ mServices(services), mRegionalInfoGroupBox(NULL), mGoToTodayMenuAction(NULL)
+{
+ setupMenu();
+
+ // Create model manager
+ mModelManager = new CalenDayModelManager(mServices, true, this);
+
+ mVLayout = new QGraphicsLinearLayout(Qt::Vertical, NULL);
+ mVLayout->setContentsMargins(0.0, 0.0, 0.0, 0.0);
+ mVLayout->setSpacing(0.0);
+
+ // Create heading label and insert into layout
+ mHeadingLabel = new HbGroupBox();
+ HbEffect::add(mHeadingLabel, ":/fade_out.fxml", "fadeOut");
+ HbEffect::add(mHeadingLabel, ":/fade_in.fxml", "fadeIn");
+
+ mSettingsManager = new XQSettingsManager(this);
+
+ // Add day info
+ mVLayout->addItem(mHeadingLabel);
+
+ //show regional info if set so
+ showRegionalInformationFadeIn();
+ mSettingsManager->startMonitoring(mRegionalInfo);
+
+ // Put hour scroll area and content scroll area into horizontal layout
+ QGraphicsLinearLayout *hLayout = new QGraphicsLinearLayout(Qt::Horizontal, NULL);
+ hLayout->setContentsMargins(0.0, 0.0, 0.0, 0.0);
+ hLayout->setSpacing(0.0);
+
+ // Create scroll area for content (events)
+ mContentScrollArea = new CalenDayContentScrollArea(this);
+
+ // Create and apply central widget for scroll area
+ mContentWidget = new CalenDayContentWidget(*mModelManager, mContentScrollArea);
+ mContentScrollArea->setContentWidget(mContentWidget);
+
+ // Create scroll area for hour elements
+ mHourScrollArea = new CalenDayHourScrollArea(this);
+
+ hLayout->addItem(mHourScrollArea);
+ hLayout->addItem(mContentScrollArea);
+
+ mVLayout->addItem(hLayout);
+ setLayout(mVLayout);
+
+ setupSlots();
+
+ //setup Back functionality
+ if (ECalenDayView != mServices.getFirstView()) {
+ HbAction* action = new HbAction(Hb::BackNaviAction, this);
+ setNavigationAction(action);
+ // Connect to the signal triggered by clicking on back button.
+ connect(action, SIGNAL(triggered()), this, SLOT(onBack()));
+ }
+
+ HbStyleLoader::registerFilePath(":/calendayhourelement.css");
+ HbStyleLoader::registerFilePath(":/calendayhourelement.widgetml");
+ HbStyleLoader::registerFilePath(":/calendayitem.css");
+ HbStyleLoader::registerFilePath(":/calendayitem.widgetml");
+}
+
+// -----------------------------------------------------------------------------
+// ~CalenDayView()
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CalenDayView::~CalenDayView()
+{
+ mSettingsManager->stopMonitoring(mRegionalInfo);
+}
+
+// -----------------------------------------------------------------------------
+// onLocaleChanged()
+// Handles locale change.
+// -----------------------------------------------------------------------------
+//
+void CalenDayView::onLocaleChanged(int reason)
+{
+ Q_UNUSED( reason )
+}
+
+// -----------------------------------------------------------------------------
+// From CalenView
+// doPopulation()
+// Handles view (re)population.
+// -----------------------------------------------------------------------------
+//
+void CalenDayView::doPopulation()
+{
+ // Triggers fading effect for heading label
+ getCurrentDate();
+ HbEffect::start(mHeadingLabel, "fadeOut", this, "setHeadingText");
+
+ mModelManager->refreshAllModels();
+ //Set date and time for hour scroll area.
+ //It's later used by hour element to display timeline
+ mHourScrollArea->setDateTime(mDate);
+
+ //set in menu go to today visible
+ QDateTime currentDateTime = QDateTime::currentDateTime();
+ if (mGoToTodayMenuAction and currentDateTime.date() == mDate.date()) {
+ mGoToTodayMenuAction->setVisible(false);
+ }
+ else if(mGoToTodayMenuAction) {
+ mGoToTodayMenuAction->setVisible(true);
+ }
+
+ setupViewport();
+
+ populationComplete();
+}
+
+// -----------------------------------------------------------------------------
+// From CalenView
+// populationComplete()
+// Informs the organizer that the view's population is complete.
+// -----------------------------------------------------------------------------
+//
+void CalenDayView::populationComplete()
+{
+ CalenNativeView::populationComplete();
+}
+
+// -----------------------------------------------------------------------------
+// From MCalenNotificationHandler
+// HandleNotification()
+// The function handles calendar notifications.
+// -----------------------------------------------------------------------------
+//
+void CalenDayView::HandleNotification(const TCalenNotification notification)
+{
+ Q_UNUSED( notification )
+}
+
+// -----------------------------------------------------------------------------
+// setupView()
+// Sets up the view accroding to the 'xml'
+// -----------------------------------------------------------------------------
+//
+void CalenDayView::setupView(CalenDocLoader* docLoader)
+{
+ Q_UNUSED( docLoader )
+}
+
+//private slots
+
+// -----------------------------------------------------------------------------
+// onBack()
+// Handles 'back' functionality;
+// -----------------------------------------------------------------------------
+//
+void CalenDayView::onBack()
+{
+ TRAP_IGNORE(mServices.IssueCommandL(ECalenMonthView));
+}
+
+// -----------------------------------------------------------------------------
+// dayChange()
+// -----------------------------------------------------------------------------
+//
+void CalenDayView::dayChangeStarted(CalenScrollDirection direction)
+{
+ if (direction == ECalenScrollToNext) {
+ mDate = mDate.addDays(1);
+ }
+ else {
+ mDate = mDate.addDays(-1);
+ }
+
+ //set in menu go to today visible
+ QDateTime currentDateTime = QDateTime::currentDateTime();
+ if (mGoToTodayMenuAction and currentDateTime.date() == mDate.date()) {
+ mGoToTodayMenuAction->setVisible(false);
+ }
+ else if(mGoToTodayMenuAction) {
+ mGoToTodayMenuAction->setVisible(true);
+ }
+
+ // Triggers fading effect for heading label.
+ HbEffect::start(mHeadingLabel, "fadeOut", this, "setHeadingText");
+ HbEffect::start(mRegionalInfoGroupBox, "fadeOut", this, "showRegionalInformation");
+
+ mServices.Context().setFocusDate(mDate);
+}
+
+// -----------------------------------------------------------------------------
+// dayChanged()
+// -----------------------------------------------------------------------------
+//
+void CalenDayView::dayChanged(CalenScrollDirection direction)
+{
+ mModelManager->viewsScrollingFinished(direction);
+ mHourScrollArea->setDateTime(mDate);
+}
+
+// -----------------------------------------------------------------------------
+// getCurrentDate()
+// -----------------------------------------------------------------------------
+//
+void CalenDayView::getCurrentDate()
+{
+ mDate = CalenNativeView::mServices.Context().focusDateAndTime();
+}
+
+// -----------------------------------------------------------------------------
+// setupMenu()
+// -----------------------------------------------------------------------------
+//
+void CalenDayView::setupMenu()
+{
+ menu()->addAction(hbTrId("txt_calendar_opt_new_event"), this, SLOT(runNewMeeting()));
+ //get pointer to this position, because need to change visibility
+ mGoToTodayMenuAction = menu()->addAction(hbTrId("txt_calendar_opt_go_to_today"), this, SLOT(runGoToToday()));
+ menu()->addAction(hbTrId("txt_calendar_opt_go_to_date"), this, SLOT(goToDate()));
+ //TODO: Add id for this text
+ //"Switch to Agenda view"
+ menu()->addAction(hbTrId("txt_calendar_opt_switch_to_agenda_view"), this, SLOT(runChangeToAgendaView()));
+ //TODO: Add id for this text (lunar data)
+ //"Show lunar data"
+ if (pluginEnabled())
+ {
+ menu()->addAction(hbTrId("txt_calendar_opt_show_lunar_data"), this, SLOT(runLunarData()));
+ }
+ menu()->addAction(hbTrId("txt_calendar_opt_settings"), this, SLOT(launchSettingsView()));
+}
+
+/*!
+ \brief Ot change Day view to Agenda View
+ */
+void CalenDayView::runChangeToAgendaView()
+{
+ changeView(ECalenAgendaView);
+}
+
+/*!
+ \brief Shows lunar data in popup box
+ */
+void CalenDayView::runLunarData()
+{
+ TRAP_IGNORE(mServices.IssueCommandL(ECalenRegionalPluginTapEvent));
+}
+
+// -----------------------------------------------------------------------------
+// setupSlots()
+// -----------------------------------------------------------------------------
+//
+void CalenDayView::setupSlots()
+{
+ // Connecting other view-related signals/slots
+ connect(mContentScrollArea,
+ SIGNAL(scrollAreaMoveStarted(CalenScrollDirection)), this,
+ SLOT(dayChangeStarted(CalenScrollDirection)));
+
+ connect(mContentScrollArea,
+ SIGNAL(scrollAreaMoveFinished(CalenScrollDirection)), mContentWidget,
+ SLOT(relayoutWidgets(CalenScrollDirection)));
+
+ connect(mContentWidget, SIGNAL(
+ widgetsRelayoutFinished(CalenScrollDirection)), mContentScrollArea,
+ SLOT(scrollToMiddleWidget()));
+
+ connect(mContentWidget,
+ SIGNAL(widgetsRelayoutFinished(CalenScrollDirection)), this,
+ SLOT(dayChanged(CalenScrollDirection)));
+
+ connect(mContentWidget, SIGNAL(scrollPositionChanged(const QPointF &)),
+ mHourScrollArea, SLOT(scrollVertically(const QPointF &)));
+
+ connect(mHourScrollArea, SIGNAL(scrollPositionChanged(const QPointF &)),
+ mContentWidget, SLOT(widgetScrolled(const QPointF &)));
+
+ connect(mSettingsManager, SIGNAL(valueChanged(XQSettingsKey, QVariant)),
+ this, SLOT(showHideRegionalInformationChanged(XQSettingsKey, QVariant)));
+}
+
+// -----------------------------------------------------------------------------
+// runNewMeeting()
+// -----------------------------------------------------------------------------
+//
+void CalenDayView::runNewMeeting()
+{
+ QDateTime dateTime(mDate);
+ TRAP_IGNORE(
+ dateTime.setTime(mServices.Context().defaultCalTimeForViewsL().time());
+ mServices.Context().setFocusDateAndTime(dateTime);
+ mServices.IssueCommandL(ECalenNewMeeting)
+ );
+}
+
+// -----------------------------------------------------------------------------
+// runGoToToday()
+// -----------------------------------------------------------------------------
+//
+void CalenDayView::runGoToToday()
+{
+ mServices.Context().setFocusDateAndTime(CalenDateUtils::today());
+ TRAP_IGNORE(mServices.IssueCommandL(ECalenGotoToday));
+ refreshViewOnGoToDate();
+}
+
+
+// -----------------------------------------------------------------------------
+// changeView()
+// -----------------------------------------------------------------------------
+//
+void CalenDayView::changeView(TCalenCommandId viewId)
+{
+ TRAP_IGNORE(mServices.IssueCommandL(viewId));
+}
+
+// ----------------------------------------------------------------------------
+// CalenDayView::setHeadingText
+// Sets heading text according to date from model and locale.
+// It's connected to modelReset signal
+// ----------------------------------------------------------------------------
+//
+void CalenDayView::setHeadingText(const HbEffect::EffectStatus &status)
+{
+ Q_UNUSED(status)
+
+ // Format the date as per the device locale settings
+ HbExtendedLocale systemLocale = HbExtendedLocale::system();
+
+ // Get localised name of the day from locale
+ QString dayString = systemLocale.dayName(mDate.date().dayOfWeek());
+ // Append a single space
+ dayString.append(" ");
+ // Set the heading
+
+ // Append the date which is formatted as per the locale
+ mHeadingLabel->setHeading(hbTrId("txt_calendar_subhead_1_2").arg(dayString).arg(
+ systemLocale.format(mDate.date(), r_qtn_date_usual_with_zero)));
+
+ HbEffect::start(mHeadingLabel, "fadeIn");
+}
+
+// ----------------------------------------------------------------------------
+// CalenDayView::showHideRegionalInformation
+// To run effect on lunar data label
+// ----------------------------------------------------------------------------
+//
+void CalenDayView::showRegionalInformation(const HbEffect::EffectStatus &status)
+{
+ Q_UNUSED(status);
+ showRegionalInformationFadeIn();
+}
+
+// ----------------------------------------------------------------------------
+// CalenDayView::showRegionalInformationFadeIn
+// To run effect on lunar data label and change text according to date change
+// ----------------------------------------------------------------------------
+//
+void CalenDayView::showRegionalInformationFadeIn()
+ {
+ showHideRegionalInformationChanged(mRegionalInfo, 3);
+ HbEffect::start(mRegionalInfoGroupBox, "fadeIn");
+ }
+
+// ----------------------------------------------------------------------------
+// CalenDayView::showHideRegionalInformationChanged
+// To Show and hide regional plugin label depends upon settings
+// ----------------------------------------------------------------------------
+//
+void CalenDayView::showHideRegionalInformationChanged(const XQSettingsKey& key, const QVariant&)
+ {
+ if (key.key() == mRegionalInfo.key())
+ {
+ int showRegionalInfo =
+ mSettingsManager->readItemValue(mRegionalInfo).toUInt();
+
+ if (showRegionalInfo)
+ {
+ QString *pluginString = pluginText();
+ if (pluginString)
+ {
+ if (!mRegionalInfoGroupBox)
+ {
+ mRegionalInfoGroupBox = new HbGroupBox();
+ CalenPluginLabel *regionalInfo = new CalenPluginLabel(
+ mServices, this);
+ HbEffect::add(mRegionalInfoGroupBox, ":/fade_out.fxml",
+ "fadeOut");
+ HbEffect::add(mRegionalInfoGroupBox, ":/fade_in.fxml", "fadeIn");
+
+ // add margins to calenpluginlabel
+
+ HbStyle style;
+ HbDeviceProfile deviceProfile;
+ qreal marginLeft = 0.0;
+ qreal marginRight = 0.0;
+ qreal marginTop = 0.0;
+ qreal marginBottom = 0.0;
+ style.parameter(QString("hb-param-margin-gene-left"), marginLeft, deviceProfile);
+ style.parameter(QString("hb-param-margin-gene-right"), marginRight, deviceProfile);
+ style.parameter(QString("hb-param-margin-gene-top"), marginTop, deviceProfile);
+ style.parameter(QString("hb-param-margin-gene-bottom"), marginBottom, deviceProfile);
+
+ regionalInfo->setContentsMargins(1, 1, 1, 1);
+
+ // qreal width = mRegionalInfoGroupBox->size().width();
+ // qreal height = mRegionalInfoGroupBox->size().height() + marginTop + marginBottom;
+
+ // mRegionalInfoGroupBox->resize(width, height);
+
+ mRegionalInfoGroupBox->setContentWidget(regionalInfo);
+ }
+
+ if (pluginEnabled())
+ {
+ HbLabel *pluginInfoLabel = qobject_cast<HbLabel *> (
+ mRegionalInfoGroupBox->contentWidget());
+
+ pluginInfoLabel->setPlainText(*pluginString);
+
+ mVLayout->insertItem(1, mRegionalInfoGroupBox);
+ }
+ }
+ }
+ else
+ {
+
+ if (mRegionalInfoGroupBox)
+ {
+ mVLayout->removeItem(mRegionalInfoGroupBox);
+ delete mRegionalInfoGroupBox;
+ mRegionalInfoGroupBox = NULL;
+ }
+ }
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CalenDayView::setupViewport
+// Scrolls view according to current day and events
+// ----------------------------------------------------------------------------
+//
+void CalenDayView::setupViewport()
+{
+ QDateTime currentTime = QDateTime::currentDateTime();
+
+ //Filter flags (only timed events)
+ AgendaUtil::FilterFlags filter = AgendaUtil::FilterFlags(
+ AgendaUtil::IncludeAppointments );
+ QList<AgendaEntry> list;
+ // Fetch the instance list from the agenda interface
+ list = mServices.agendaInterface()->fetchEntriesInRange(currentTime, currentTime, filter);
+
+ // If we have event in current day and hour, scroll to this event
+ if(mDate.date() == currentTime.date() && !list.isEmpty()){
+ int hourToScrollTo(list.first().startTime().time().hour());
+ mHourScrollArea->scrollToHour(hourToScrollTo);
+ }
+ else{
+ //Scroll view to 7am
+ mHourScrollArea->scrollToHour(7);
+ }
+}
+
+//End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/tsrc.pro Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,26 @@
+#
+# 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:
+# This is the project specification file for calendayview test code
+#
+
+# include test components here
+
+TEMPLATE = subdirs
+
+SUBDIRS += unittests
+
+CONFIG += ordered
+
+# End of file --Don't remove this
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendaycontainer/calendayinfo.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,117 @@
+/*
+* Copyright (c) 2007-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: Mocked classes for testing CalenDayInfo class
+*
+*/
+
+#ifndef CALENDAYINFO_H
+#define CALENDAYINFO_H
+
+#include <calinstance.h>
+#include "caleninstanceid.h"
+
+const int KFSCalMaxDescriptionLength = 100;
+
+/*!
+ Mocked struct SCalenApptInfo
+ */
+struct SCalenApptInfo
+{
+ QModelIndex iIndex;
+ QDateTime iStartTime;
+ QDateTime iEndTime;
+ bool iAllDay;
+ TCalenInstanceId iId;
+ AgendaEntry::Status iStatus;
+ TBufC<KFSCalMaxDescriptionLength> iSummary;
+ TUint32 iColor;
+};
+
+/*!
+ Mocked class CalenTimeColumn
+ */
+class CalenTimeColumn
+{
+public:
+ CalenTimeColumn() {
+
+ }
+
+ ~CalenTimeColumn() {
+
+ }
+};
+
+/*!
+ Mocked class CalenTimeRegion
+ */
+class CalenTimeRegion
+{
+public:
+ CalenTimeRegion() {
+
+ }
+
+ ~CalenTimeRegion() {
+
+ }
+
+ QList<CalenTimeColumn> iColumns;
+
+ int iStartSlot;
+ int iEndSlot;
+};
+
+/*!
+ Mocked class CalenDayInfo
+ */
+class CalenDayInfo
+{
+public:
+ enum TSlotsInHour
+ {
+ EOne = 1, ETwo, EThree, EFour
+ };
+
+public:
+
+ CalenDayInfo(TSlotsInHour aSlotsInHour) {
+ Q_UNUSED(aSlotsInHour)
+ }
+ virtual ~CalenDayInfo();
+
+ void GetLocation( const SCalenApptInfo& aItemInfo, int& aStartSlot,
+ int& aEndSlot, int& aColumnIndex, int& aColumns ) {
+ Q_UNUSED(aItemInfo)
+ Q_UNUSED(aStartSlot)
+ Q_UNUSED(aEndSlot)
+ Q_UNUSED(aColumnIndex)
+ Q_UNUSED(aColumns)
+ }
+
+ int AlldayCount() {
+ return 0;
+ }
+
+ const QList<CalenTimeRegion>& RegionList() const {
+ return mList;
+ }
+
+public:
+ QList<CalenTimeRegion> mList;
+};
+
+#endif // CALENDAYINFO_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendaycontainer/calendayview.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,73 @@
+/*
+* 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: Mocked classes for testing CalenDayContainer class
+*
+*/
+
+#ifndef CALENSERVICES_H
+#define CALENSERVICES_H
+
+/*!
+ Mocked class MCalenServices
+ */
+class MCalenServices
+{
+public:
+ MCalenServices() {
+
+ }
+
+ ~MCalenServices() {
+
+ }
+};
+
+#endif // CALENSERVICES_H
+
+#ifndef CALEDAYVIEW_H
+#define CALEDAYVIEW_H
+
+#include <HbView>
+
+enum TCalenCommandId
+{
+ ECalenMonthView = 0,
+ ECalenWeekView,
+ ECalenAgendaView
+};
+
+/*!
+ Mocked class CalenDayView
+ */
+class CalenDayView : public HbView
+{
+public:
+
+ CalenDayView(MCalenServices &services) {
+ Q_UNUSED(services)
+ }
+
+ virtual ~CalenDayView() {
+
+ }
+
+ void changeView(TCalenCommandId viewId) {
+ Q_UNUSED(viewId)
+ }
+};
+
+#endif // CALEDAYVIEW_H
+
+//End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendaycontainer/caleninstanceid.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,44 @@
+/*
+* 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: Mocked classes for testing CalenDayContainer class
+*
+*/
+
+#ifndef CALENINSTANCEID_H
+#define CALENINSTANCEID_H
+
+/*!
+ Mocked class TCalenInstanceId
+ */
+class TCalenInstanceId
+{
+public:
+ TCalenInstanceId() {
+
+ }
+
+ static TCalenInstanceId nullInstanceId() {
+ return TCalenInstanceId();
+ }
+
+public: // data members
+ ulong mEntryLocalUid;
+ QDateTime mInstanceTime;
+ AgendaEntry::Type mType;
+ bool mInstanceViewed;
+};
+
+#endif // CALENINSTANCEID_H
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendaycontainer/hbinstance.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,98 @@
+/*
+* 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: Mocked classes for testing CalenDayUtils class
+*
+*/
+
+#ifndef HBMAINWINDOW_H
+#define HBMAINWINDOW_H
+
+#include <HbView>
+
+// Test variables
+extern QRectF gTestWindowRect;
+extern Qt::Orientation gTestOrientation;
+
+/*!
+ Mocked class HbMainWindow (simulating window in unittests)
+ */
+class HbMainWindow
+{
+public:
+ HbMainWindow() {
+ mView = new HbView();
+ }
+
+ ~HbMainWindow() {
+ if (mView) {
+ delete mView;
+ mView = 0;
+ }
+ }
+
+ QRectF layoutRect() const {
+ return gTestWindowRect;
+ }
+
+ Qt::Orientation orientation() const {
+ return gTestOrientation;
+ }
+
+ HbView *HbMainWindow::currentView() const {
+ return mView;
+ }
+
+ HbView *mView;
+};
+
+#endif // HBMAINWINDOW_H
+
+#ifndef HBINSTANCE_H
+#define HBINSTANCE_H
+
+#include <QList>
+
+/*!
+ Mocked class HbInstance (simulating hbinstance in unittests)
+ */
+class HbInstance
+{
+public:
+
+ static HbInstance *instance() {
+ return new HbInstance();
+ }
+
+ QList<HbMainWindow *> allMainWindows() const {
+ return mMainWindows;
+ }
+
+ HbInstance() {
+ HbMainWindow* window = new HbMainWindow();
+ mMainWindows.append(window);
+ }
+
+ ~HbInstance() {
+ for (int i = 0; i < mMainWindows.count(); i++) {
+ delete mMainWindows[i];
+ }
+ mMainWindows.clear();
+ }
+
+ QList<HbMainWindow *> mMainWindows;
+};
+
+#endif // HBINSTANCE_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendaycontainer/rom/unittest_calendaycontainer.iby Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2006-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: Image description file for test project
+*
+*/
+
+#ifndef UNITTEST_CALENDAYCONTAINER_IBY
+#define UNITTEST_CALENDAYCONTAINER_IBY
+
+S60_APP_EXE(unittest_calendaycontainer)
+S60_APP_RESOURCE(unittest_calendaycontainer)
+
+// Application registration file.
+data=DATAZ_\private\10003a3f\import\apps\unittest_calendaycontainer_reg.rsc \private\10003a3f\import\apps\unittest_calendaycontainer_reg.rsc
+
+
+#endif // UNITTEST_CALENDAYCONTAINER_IBY
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendaycontainer/unittest_calendaycontainer.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,115 @@
+/*
+ * 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: Test class for CalenDayContainerWidget
+ *
+ */
+#include <QtTest/QtTest>
+
+#include "calendaycontainer.h"
+
+// Test variables
+QRectF gTestWindowRect = QRectF(0, 0, 10, 20);
+Qt::Orientation gTestOrientation = Qt::Horizontal;
+
+class TestCalenDayContainer : public QObject
+{
+Q_OBJECT
+
+public:
+ TestCalenDayContainer();
+ virtual ~TestCalenDayContainer();
+
+private slots:
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+ void cleanup();
+
+ void testConstructors();
+
+private:
+ CalenDayContainer *mContainer;
+};
+
+/*!
+ Constructor
+ */
+TestCalenDayContainer::TestCalenDayContainer() :
+ mContainer(NULL)
+{
+
+}
+
+/*!
+ Destructor
+ */
+TestCalenDayContainer::~TestCalenDayContainer()
+{
+
+}
+
+/*!
+ Called before testcase
+ */
+void TestCalenDayContainer::initTestCase()
+{
+}
+
+/*!
+ Called after testcase
+ */
+void TestCalenDayContainer::cleanupTestCase()
+{
+
+}
+
+/*!
+ Called before every function
+ */
+void TestCalenDayContainer::init()
+{
+ mContainer = new CalenDayContainer();
+}
+
+/*!
+ Called after everyfunction
+ */
+void TestCalenDayContainer::cleanup()
+{
+ if (mContainer) {
+ delete mContainer;
+ mContainer = NULL;
+ }
+}
+
+/*!
+ Test function for constructors
+ 1. Test if container is not initialized
+ 2. Test if container is correcty created
+ */
+void TestCalenDayContainer::testConstructors()
+{
+ //1)
+ CalenDayContainer *testContainer = 0;
+ QVERIFY(!testContainer);
+
+ //2)
+ testContainer = new CalenDayContainer();
+ QVERIFY(testContainer);
+
+ delete testContainer;
+}
+
+QTEST_MAIN(TestCalenDayContainer);
+#include "unittest_calendaycontainer.moc"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendaycontainer/unittest_calendaycontainer.pro Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,71 @@
+#
+# 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: calendaycontentwidget test project file
+#
+
+TEMPLATE = app
+TARGET = unittest_calendaycontainer
+
+MOC_DIR = moc
+
+CONFIG += qtestlib
+CONFIG += symbian_test
+CONFIG += hb
+
+INCLUDEPATH += . \
+ ../../../inc/ \
+ ./../../../../inc/ \
+ ./../../../../../inc/
+
+DEPENDPATH += . \
+ ../../../inc/ \
+ ../../../src/ \
+ ./../../../../inc/ \
+ ./../../../../../inc/
+
+# Input
+HEADERS += calendaycontainer.h \
+ calendayutils.h \
+ calendayeventspane.h \
+ calendayitem.h \
+ calendaystatusstrip.h \
+ calendaymodel.h
+
+SOURCES += unittest_calendaycontainer.cpp \
+ calendaycontainer.cpp \
+ calendayutils.cpp \
+ calendayeventspane.cpp \
+ calendayitem.cpp \
+ calendaystatusstrip.cpp \
+ calendaymodel.cpp
+
+symbian : {
+ TARGET.CAPABILITY = CAP_APPLICATION
+ MMP_RULES += "USERINCLUDE ."
+
+ INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+
+ LIBS += -lagendainterface \
+ -lxqsettingsmanager
+
+ BLD_INF_RULES.prj_testexports += \
+ "./rom/unittest_calendaycontainer.iby CORE_APP_LAYER_IBY_EXPORT_PATH(unittest_calendaycontainer.iby)"
+
+ INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+
+ LIBS += -lagendainterface \
+ -lcalencommonutils
+}
+
+# End of file --Don't remove this.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendaycontentwidget/calendaycontentwidgetheaders.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,70 @@
+/*
+* 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: Mocked classes for testing CalenDayContentWidget class
+*
+*/
+
+#ifndef CALENSERVICES_H
+#define CALENSERVICES_H
+
+/*!
+ Mocked class MCalenServices
+ */
+class MCalenServices
+{
+public:
+ MCalenServices() {
+
+ }
+
+ ~MCalenServices() {
+
+ }
+};
+
+#endif // CALENSERVICES_H
+
+
+#ifndef CALENDAYITEMVIEW_H
+#define CALENDAYITEMVIEW_H
+
+#include <QGraphicsItem>
+#include <QPointF>
+#include <HbWidget>
+#include <HbModelIterator>
+
+/*!
+ Mocked class CalenDayItemView
+ */
+class CalenDayItemView : public HbWidget
+{
+ Q_OBJECT
+
+public:
+ CalenDayItemView(MCalenServices &services, HbModelIterator *iterator,
+ QGraphicsItem *parent) : HbWidget(parent) {
+ Q_UNUSED(services)
+ Q_UNUSED(iterator)
+ }
+
+ void scrollVertically(const QPointF &newPosition) {
+ Q_UNUSED(newPosition)
+ }
+
+signals:
+ void scrollPositionChanged(const QPointF&);
+};
+
+#endif // CALENDAYITEMVIEW_H
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendaycontentwidget/calendaymodelmanager.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,97 @@
+/*
+* 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: Mocked classes for testing CalenDayContentWidget class
+*
+*/
+
+
+#include "calendaycontentwidgetheaders.h"
+
+
+#ifndef CALENDAYMODELMANAGER_H
+#define CALENDAYMODELMANAGER_H
+
+#include <QAbstractListModel>
+
+/*!
+ Test class TestAbstractListModel
+ */
+class TestAbstractListModel : public QAbstractListModel
+{
+ Q_OBJECT
+
+public:
+ TestAbstractListModel() : QAbstractListModel() {
+ }
+
+ ~TestAbstractListModel() {
+ }
+
+ int rowCount(const QModelIndex &parent) const {
+ Q_UNUSED(parent);
+ return 0;
+ }
+
+ QVariant data(const QModelIndex &index, int role) const {
+ Q_UNUSED(index);
+ Q_UNUSED(role);
+ return QVariant(0);
+ }
+};
+
+/*!
+ Test class CalenDayModelManager
+ */
+class CalenDayModelManager : public QObject
+{
+public:
+ enum ModelDay {
+ PreviousDay = 0,
+ CurrentDay = 1,
+ NextDay = 2,
+ NumberOfDays
+ };
+
+ CalenDayModelManager() : QObject() {
+ mModel = new TestAbstractListModel();
+ mServices = new MCalenServices();
+ }
+
+ ~CalenDayModelManager() {
+ if (mModel) {
+ delete mModel;
+ mModel = NULL;
+ }
+
+ if (mServices) {
+ delete mServices;
+ mServices = NULL;
+ }
+ }
+
+ QAbstractItemModel &getModel(CalenDayModelManager::ModelDay day) {
+ Q_UNUSED(day)
+ return *mModel;
+ }
+
+ MCalenServices &getServices() {
+ return *mServices;
+ }
+
+public:
+ TestAbstractListModel *mModel;
+ MCalenServices *mServices;
+};
+
+#endif//CALENDAYMODELMANAGER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendaycontentwidget/rom/unittest_calendaycontentwidget.iby Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2006-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: Image description file for test project
+*
+*/
+
+#ifndef UNITTEST_CALENDAYCONTENTWIDGET_IBY
+#define UNITTEST_CALENDAYCONTENTWIDGET_IBY
+
+S60_APP_EXE(unittest_calendaycontentwidget)
+S60_APP_RESOURCE(unittest_calendaycontentwidget)
+
+// Application registration file.
+data=DATAZ_\private\10003a3f\import\apps\unittest_calendaycontentwidget_reg.rsc \private\10003a3f\import\apps\unittest_unittest_calendaycontentwidget_reg.rsc
+
+
+#endif // UNITTEST_CALENDAYCONTENTWIDGET_IBY
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendaycontentwidget/unittest_calendaycontentwidget.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,111 @@
+/*
+ * 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: Test class for CalenDayContentWidget
+ *
+ */
+#include <QGraphicsItem>
+#include <QtTest/QtTest>
+
+
+#include "calendaymodelmanager.h"
+#include "calendaycontentwidget.h"
+
+class TestCalenContentWidget : public QObject
+{
+Q_OBJECT
+
+public:
+ TestCalenContentWidget();
+ virtual ~TestCalenContentWidget();
+
+private slots:
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+ void cleanup();
+
+ void testConstructors();
+
+private:
+ CalenDayModelManager *mModelMgr;
+ CalenDayContentWidget *mContentWidget;
+};
+
+/*!
+ Constructor
+ */
+TestCalenContentWidget::TestCalenContentWidget() :
+ mModelMgr(NULL), mContentWidget(NULL)
+{
+
+}
+
+/*!
+ Destructor
+ */
+TestCalenContentWidget::~TestCalenContentWidget()
+{
+
+}
+
+/*!
+ Called before testcase
+ */
+void TestCalenContentWidget::initTestCase()
+{
+ mModelMgr = new CalenDayModelManager();
+}
+
+/*!
+ Called after testcase
+ */
+void TestCalenContentWidget::cleanupTestCase()
+{
+ if (mModelMgr) {
+ delete mModelMgr;
+ }
+}
+
+/*!
+ Called before every function
+ */
+void TestCalenContentWidget::init()
+{
+
+}
+
+/*!
+ Called after everyfunction
+ */
+void TestCalenContentWidget::cleanup()
+{
+ if (mContentWidget) {
+ delete mContentWidget;
+ mContentWidget = NULL;
+ }
+}
+
+/*!
+ Test class for constructors
+ 1. Test if content widget is correcty created
+ */
+void TestCalenContentWidget::testConstructors()
+{
+ QVERIFY(!mContentWidget);
+ mContentWidget = new CalenDayContentWidget(*mModelMgr);
+ QVERIFY(mContentWidget);
+}
+
+QTEST_MAIN(TestCalenContentWidget);
+#include "unittest_calendaycontentwidget.moc"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendaycontentwidget/unittest_calendaycontentwidget.pro Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,50 @@
+#
+# 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: calendaycontentwidget test project file
+#
+
+TEMPLATE = app
+TARGET = unittest_calendaycontentwidget
+
+MOC_DIR = moc
+
+CONFIG += qtestlib
+CONFIG += symbian_test
+CONFIG += hb
+
+INCLUDEPATH += . \
+ ../../../inc/ \
+
+DEPENDPATH += . \
+ ../../../inc/ \
+ ../../../src/
+
+# Input
+HEADERS += calendaymodelmanager.h \
+ calendaycontentwidgetheaders.h \
+ calendaycontentwidget.h
+
+
+SOURCES += unittest_calendaycontentwidget.cpp \
+ calendaycontentwidget.cpp
+
+symbian : {
+ TARGET.CAPABILITY = CAP_APPLICATION
+ MMP_RULES += "USERINCLUDE ."
+
+ BLD_INF_RULES.prj_testexports += \
+ "./rom/unittest_calendaycontentwidget.iby CORE_APP_LAYER_IBY_EXPORT_PATH(unittest_calendaycontentwidget.iby)"
+}
+
+# End of file --Don't remove this.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayeventspane/rom/unittest_calendayeventspane.iby Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2006-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: Image description file for test project
+*
+*/
+
+#ifndef UNITTEST_CALENDAYEVENTSPANE_IBY
+#define UNITTEST_CALENDAYEVENTSPANE_IBY
+
+S60_APP_EXE(unittest_calendayeventspane)
+S60_APP_RESOURCE(unittest_calendayeventspane)
+
+// Application registration file.
+data=DATAZ_\private\10003a3f\import\apps\unittest_calendayeventspane_reg.rsc \private\10003a3f\import\apps\unittest_calendayeventspane_reg.rsc
+
+
+#endif // UNITTEST_CALENDAYEVENTSPANE_IBY
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayeventspane/unittest_calendayeventspane.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,112 @@
+/*
+ * 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: Test class for CalenDayContentWidget
+ *
+ */
+#include <QGraphicsItem>
+#include <QtTest/QtTest>
+#include <QPen>
+
+#include "calendayeventspane.h"
+
+class TestCalenEventsPane : public QObject
+{
+Q_OBJECT
+
+public:
+ TestCalenEventsPane();
+ virtual ~TestCalenEventsPane();
+
+private slots:
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+ void cleanup();
+
+ void testConstructors();
+
+private:
+ CalenDayEventsPane *mEventsPane;
+};
+
+/*!
+ Constructor
+ */
+TestCalenEventsPane::TestCalenEventsPane() :
+ mEventsPane(NULL)
+{
+
+}
+
+/*!
+ Destructor
+ */
+TestCalenEventsPane::~TestCalenEventsPane()
+{
+
+}
+
+/*!
+ Called before testcase
+ */
+void TestCalenEventsPane::initTestCase()
+{
+}
+
+/*!
+ Called after testcase
+ */
+void TestCalenEventsPane::cleanupTestCase()
+{
+
+}
+
+/*!
+ Called before every function
+ */
+void TestCalenEventsPane::init()
+{
+ mEventsPane = new CalenDayEventsPane();
+}
+
+/*!
+ Called after everyfunction
+ */
+void TestCalenEventsPane::cleanup()
+{
+ if (mEventsPane) {
+ delete mEventsPane;
+ mEventsPane = NULL;
+ }
+}
+
+/*!
+ Test function for constructors
+ 1. Test if events pane is not initialized
+ 2. Test if events pane is correcty created
+ */
+void TestCalenEventsPane::testConstructors()
+{
+ //1)
+ CalenDayEventsPane *testEventsPane = 0;
+ QVERIFY(!testEventsPane);
+
+ //2)
+ testEventsPane = new CalenDayEventsPane();
+ QVERIFY(testEventsPane);
+ delete testEventsPane;
+}
+
+QTEST_MAIN(TestCalenEventsPane);
+#include "unittest_calendayeventspane.moc"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayeventspane/unittest_calendayeventspane.pro Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,48 @@
+#
+# 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: calendaycontentwidget test project file
+#
+
+TEMPLATE = app
+TARGET = unittest_calendayeventspane
+
+MOC_DIR = moc
+
+CONFIG += qtestlib
+CONFIG += symbian_test
+CONFIG += hb
+
+INCLUDEPATH += . \
+ ../../../inc/ \
+
+DEPENDPATH += . \
+ ../../../inc/ \
+ ../../../src/
+
+# Input
+HEADERS += calendayeventspane.h
+
+
+SOURCES += unittest_calendayeventspane.cpp \
+ calendayeventspane.cpp
+
+symbian : {
+ TARGET.CAPABILITY = CAP_APPLICATION
+ MMP_RULES += "USERINCLUDE ."
+
+ BLD_INF_RULES.prj_testexports += \
+ "./rom/unittest_calendayeventspane.iby CORE_APP_LAYER_IBY_EXPORT_PATH(unittest_calendayeventspane.iby)"
+}
+
+# End of file --Don't remove this.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayhourelement/rom/unittest_calendayhourelement.iby Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2006-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: Image description file for test project
+*
+*/
+
+#ifndef UNITTEST_CALENDAYHOURELEMENT_IBY
+#define UNITTEST_CALENDAYHOURELEMENT_IBY
+
+S60_APP_EXE(unittest_calendayhourelement)
+S60_APP_RESOURCE(unittest_calendayhourelement)
+
+// Application registration file.
+data=DATAZ_\private\10003a3f\import\apps\unittest_calendayhourelement_reg.rsc \private\10003a3f\import\apps\unittest_calendayhourelement_reg.rsc
+
+
+#endif // UNITTEST_CALENDAYHOURELEMENT_IBY
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayhourelement/unittest_calendayhourelement.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,113 @@
+/*
+ * 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: Test class for CalenDayContentWidget
+ *
+ */
+#include <QGraphicsItem>
+#include <QtTest/QtTest>
+
+#include "calendayhourelement.h"
+
+class TestCalenDayHourElement : public QObject
+{
+Q_OBJECT
+
+public:
+ TestCalenDayHourElement();
+ virtual ~TestCalenDayHourElement();
+
+private slots:
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+ void cleanup();
+
+ void testConstructors();
+
+private:
+ CalenDayHourElement *mHourElement;
+ QTime mTime;
+};
+
+/*!
+ Constructor
+ */
+TestCalenDayHourElement::TestCalenDayHourElement() :
+ mHourElement(NULL)
+{
+
+}
+
+/*!
+ Destructor
+ */
+TestCalenDayHourElement::~TestCalenDayHourElement()
+{
+
+}
+
+/*!
+ Called before testcase
+ */
+void TestCalenDayHourElement::initTestCase()
+{
+}
+
+/*!
+ Called after testcase
+ */
+void TestCalenDayHourElement::cleanupTestCase()
+{
+
+}
+
+/*!
+ Called before every function
+ */
+void TestCalenDayHourElement::init()
+{
+ mHourElement = new CalenDayHourElement(mTime);
+}
+
+/*!
+ Called after everyfunction
+ */
+void TestCalenDayHourElement::cleanup()
+{
+ if (mHourElement) {
+ delete mHourElement;
+ mHourElement = NULL;
+ }
+}
+
+/*!
+ Test function for constructors
+ 1. Test if content widget is not initialized
+ 2. Test if content widget is correcty created
+ */
+void TestCalenDayHourElement::testConstructors()
+{
+ //1)
+ CalenDayHourElement *testHourElement = 0;
+ QVERIFY(!testHourElement);
+
+ testHourElement = new CalenDayHourElement(mTime);
+
+ QVERIFY(testHourElement);
+
+ delete testHourElement;
+}
+
+QTEST_MAIN(TestCalenDayHourElement);
+#include "unittest_calendayhourelement.moc"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayhourelement/unittest_calendayhourelement.pro Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,50 @@
+#
+# 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: calendaycontentwidget test project file
+#
+
+TEMPLATE = app
+TARGET = unittest_calendayhourelement
+
+MOC_DIR = moc
+
+CONFIG += qtestlib
+CONFIG += symbian_test
+CONFIG += hb
+
+INCLUDEPATH += . \
+ ../../../inc/ \
+
+DEPENDPATH += . \
+ ../../../inc/ \
+ ../../../src/
+
+# Input
+HEADERS += calendayhourelement.h \
+ calendayhourscrollarea.h
+
+
+SOURCES += unittest_calendayhourelement.cpp \
+ calendayhourelement.cpp \
+ calendayhourscrollarea.cpp
+
+symbian : {
+ TARGET.CAPABILITY = CAP_APPLICATION
+ MMP_RULES += "USERINCLUDE ."
+
+ BLD_INF_RULES.prj_testexports += \
+ "./rom/unittest_calendayhourelement.iby CORE_APP_LAYER_IBY_EXPORT_PATH(unittest_calendayhourelement.iby)"
+}
+
+# End of file --Don't remove this.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayhourscrollarea/rom/unittest_calendayhourscrollarea.iby Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2006-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: Image description file for test project
+*
+*/
+
+#ifndef UNITTEST_CALENDAYHOURSCROLLAREA_IBY
+#define UNITTEST_CALENDAYHOURSCROLLAREA_IBY
+
+S60_APP_EXE(unittest_calendayhourscrollarea)
+S60_APP_RESOURCE(unittest_calendayhourscrollarea)
+
+// Application registration file.
+data=DATAZ_\private\10003a3f\import\apps\unittest_calendayhourscrollarea_reg.rsc \private\10003a3f\import\apps\unittest_calendayhourscrollarea_reg.rsc
+
+
+#endif // UNITTEST_CALENDAYHOURSCROLLAREA_IBY
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayhourscrollarea/unittest_calendayhourscrollarea.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,112 @@
+/*
+ * 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: Test class for CalenDayContentWidget
+ *
+ */
+#include <QGraphicsItem>
+#include <QtTest/QtTest>
+
+#include "calendayhourscrollarea.h"
+
+class TestCalenDayHourScrollArea : public QObject
+{
+Q_OBJECT
+
+public:
+ TestCalenDayHourScrollArea();
+ virtual ~TestCalenDayHourScrollArea();
+
+private slots:
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+ void cleanup();
+
+ void testConstructors();
+
+private:
+ CalenDayHourScrollArea *mHourScrollArea;
+};
+
+/*!
+ Constructor
+ */
+TestCalenDayHourScrollArea::TestCalenDayHourScrollArea() :
+ mHourScrollArea(NULL)
+{
+
+}
+
+/*!
+ Destructor
+ */
+TestCalenDayHourScrollArea::~TestCalenDayHourScrollArea()
+{
+
+}
+
+/*!
+ Called before testcase
+ */
+void TestCalenDayHourScrollArea::initTestCase()
+{
+}
+
+/*!
+ Called after testcase
+ */
+void TestCalenDayHourScrollArea::cleanupTestCase()
+{
+
+}
+
+/*!
+ Called before every function
+ */
+void TestCalenDayHourScrollArea::init()
+{
+ mHourScrollArea = new CalenDayHourScrollArea();
+}
+
+/*!
+ Called after everyfunction
+ */
+void TestCalenDayHourScrollArea::cleanup()
+{
+ if (mHourScrollArea) {
+ delete mHourScrollArea;
+ mHourScrollArea = NULL;
+ }
+}
+
+/*!
+ Test function for constructors
+ 1. Test if hour scroll area is not initialized
+ 2. Test if hour scroll area is correcty created
+ */
+void TestCalenDayHourScrollArea::testConstructors()
+{
+ //1)
+ CalenDayHourScrollArea *testHourScrollArea = 0;
+ QVERIFY(!testHourScrollArea);
+
+ testHourScrollArea = new CalenDayHourScrollArea();
+
+ QVERIFY(testHourScrollArea);
+
+ delete testHourScrollArea;
+}
+
+QTEST_MAIN(TestCalenDayHourScrollArea);
+#include "unittest_calendayhourscrollarea.moc"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayhourscrollarea/unittest_calendayhourscrollarea.pro Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,61 @@
+#
+# 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: calendaycontentwidget test project file
+#
+
+TEMPLATE = app
+TARGET = unittest_calendayhourscrollarea
+
+MOC_DIR = moc
+
+CONFIG += qtestlib
+CONFIG += symbian_test
+CONFIG += hb
+
+INCLUDEPATH += . \
+ ../../../inc/ \
+ ./../../../../inc/ \
+ ./../../../../../inc/
+
+DEPENDPATH += . \
+ ../../../inc/ \
+ ../../../src/ \
+ ./../../../../inc/ \
+ ./../../../../../inc/
+
+# Input
+HEADERS += calendayhourelement.h \
+ calendayhourscrollarea.h \
+ calendayutils.h
+
+
+SOURCES += unittest_calendayhourscrollarea.cpp \
+ calendayhourelement.cpp \
+ calendayhourscrollarea.cpp \
+ calendayutils.cpp
+
+symbian : {
+ TARGET.CAPABILITY = CAP_APPLICATION
+ MMP_RULES += "USERINCLUDE ."
+
+ BLD_INF_RULES.prj_testexports += \
+ "./rom/unittest_calendayhourscrollarea.iby CORE_APP_LAYER_IBY_EXPORT_PATH(unittest_calendayhourscrollarea.iby)"
+
+ INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+
+ LIBS += -lagendainterface \
+ -lcalencommonutils
+}
+
+# End of file --Don't remove this.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayinfo/rom/unittest_calendayinfo.iby Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2006-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: Image description file for test project
+*
+*/
+
+#ifndef UNITTEST_CALENDAYINFO_IBY
+#define UNITTEST_CALENDAYINFO_IBY
+
+S60_APP_EXE(unittest_calendayinfo)
+S60_APP_RESOURCE(unittest_calendayinfo)
+
+// Application registration file.
+data=DATAZ_\private\10003a3f\import\apps\unittest_calendayinfo_reg.rsc \private\10003a3f\import\apps\unittest_calendayinfo_reg.rsc
+
+
+#endif // UNITTEST_CALENDAYINFO_IBY
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayinfo/unittest_calendayinfo.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,116 @@
+/*
+ * 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: Test class for CalenDayContentWidget
+ *
+ */
+#include <QGraphicsItem>
+#include <QtTest/QtTest>
+
+
+#include <HbMainWindow>
+
+#include "calendayinfo.h"
+#include "calendaycommonheaders.h"
+
+class TestCalenDayInfo : public QObject
+{
+Q_OBJECT
+
+public:
+ TestCalenDayInfo();
+ virtual ~TestCalenDayInfo();
+
+private slots:
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+ void cleanup();
+
+ void testConstructors();
+
+private:
+ CalenDayInfo *mInfo;
+};
+
+/*!
+ Constructor
+ */
+TestCalenDayInfo::TestCalenDayInfo() :
+ mInfo(NULL)
+{
+
+}
+
+/*!
+ Destructor
+ */
+TestCalenDayInfo::~TestCalenDayInfo()
+{
+
+}
+
+/*!
+ Called before testcase
+ */
+void TestCalenDayInfo::initTestCase()
+{
+}
+
+/*!
+ Called after testcase
+ */
+void TestCalenDayInfo::cleanupTestCase()
+{
+
+}
+
+/*!
+ Called before every function
+ */
+void TestCalenDayInfo::init()
+{
+ mInfo = new CalenDayInfo(CalenDayInfo::ETwo);
+}
+
+/*!
+ Called after everyfunction
+ */
+void TestCalenDayInfo::cleanup()
+{
+ if (mInfo) {
+ delete mInfo;
+ mInfo = NULL;
+ }
+}
+
+/*!
+ Test function for constructors
+ 1. Test if CalenDayInfo is not initialized
+ 2. Test if CalenDayInfo is correcty created
+ */
+void TestCalenDayInfo::testConstructors()
+{
+ //1)
+ CalenDayInfo *testCalenDayInfo = 0;
+ QVERIFY(!testCalenDayInfo);
+
+ //2)
+ testCalenDayInfo = new CalenDayInfo(CalenDayInfo::ETwo);
+ QVERIFY(testCalenDayInfo);
+}
+
+
+QTEST_MAIN(TestCalenDayInfo);
+
+#include "unittest_calendayinfo.moc"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayinfo/unittest_calendayinfo.pro Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,61 @@
+#
+# 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: calendaycontentwidget test project file
+#
+
+TEMPLATE = app
+TARGET = unittest_calendayinfo
+
+MOC_DIR = moc
+
+CONFIG += qtestlib
+CONFIG += symbian_test
+CONFIG += hb
+
+INCLUDEPATH += . \
+ ../../inc/ \
+ ../../../inc/ \
+ ../../../../../inc/ \
+ ../../../../../commonutils/inc/
+
+DEPENDPATH += . \
+ ../../inc/ \
+ ../../../inc/ \
+ ../../../../../inc/ \
+ ../../../../../commonutils/inc/ \
+ ../../../src/
+
+# Input
+HEADERS += calendayinfo.h \
+ calinstance.h \
+ caleninstanceid.h \
+ calenagendautils.h \
+ calenconstants.h \
+ calendateutils.h
+
+
+SOURCES += unittest_calendayinfo.cpp \
+ calendayinfo.cpp
+
+symbian : {
+ TARGET.CAPABILITY = CAP_APPLICATION
+ MMP_RULES += "USERINCLUDE ."
+
+ INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+
+ BLD_INF_RULES.prj_testexports += \
+ "./rom/unittest_calendayinfo.iby CORE_APP_LAYER_IBY_EXPORT_PATH(unittest_calendayinfo.iby)"
+}
+
+# End of file --Don't remove this.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayitem/rom/unittest_calendayitem.iby Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2006-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: Image description file for test project
+*
+*/
+
+#ifndef UNITTEST_CALENDAYITEM_IBY
+#define UNITTEST_CALENDAYITEM_IBY
+
+S60_APP_EXE(unittest_calendayitem)
+S60_APP_RESOURCE(unittest_calendayitem)
+
+// Application registration file.
+data=DATAZ_\private\10003a3f\import\apps\unittest_calendayitem_reg.rsc \private\10003a3f\import\apps\unittest_calendayitem_reg.rsc
+
+
+#endif // UNITTEST_CALENDAYITEM_IBY
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayitem/unittest_calendayitem.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,126 @@
+/*
+ * 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: Test class for CalenDayContentWidget
+ *
+ */
+#include <QGraphicsItem>
+#include <QtTest/QtTest>
+
+
+#include "calendayitem.h"
+
+class TestCalenDayItem : public QObject
+{
+Q_OBJECT
+
+public:
+ TestCalenDayItem();
+ virtual ~TestCalenDayItem();
+
+private slots:
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+ void cleanup();
+
+ void testConstructors();
+ void testCreateItem();
+
+private:
+ CalenDayItem *mItem;
+};
+
+/*!
+ Constructor
+ */
+TestCalenDayItem::TestCalenDayItem() :
+ mItem(NULL)
+{
+
+}
+
+/*!
+ Destructor
+ */
+TestCalenDayItem::~TestCalenDayItem()
+{
+
+}
+
+/*!
+ Called before testcase
+ */
+void TestCalenDayItem::initTestCase()
+{
+}
+
+/*!
+ Called after testcase
+ */
+void TestCalenDayItem::cleanupTestCase()
+{
+
+}
+
+/*!
+ Called before every function
+ */
+void TestCalenDayItem::init()
+{
+ mItem = new CalenDayItem();
+}
+
+/*!
+ Called after everyfunction
+ */
+void TestCalenDayItem::cleanup()
+{
+ if (mItem) {
+ delete mItem;
+ mItem = NULL;
+ }
+}
+
+/*!
+ Test function for constructors
+ 1. Test if content widget is not initialized
+ 2. Test if content widget is correcty created
+ */
+void TestCalenDayItem::testConstructors()
+{
+ //1)
+ CalenDayItem *testItem = 0;
+ QVERIFY(!testItem);
+
+ //2)
+ testItem = new CalenDayItem();
+ QVERIFY(testItem);
+ delete testItem;
+}
+
+/*!
+ Test function for creating new abstract items.
+ 1. Test if item is created
+ 2. Test if is the same as orginal.
+ */
+void TestCalenDayItem::testCreateItem()
+{
+ HbAbstractViewItem *testItem = mItem->createItem();
+ QVERIFY(testItem);
+
+ delete testItem;
+}
+
+QTEST_MAIN(TestCalenDayItem);
+#include "unittest_calendayitem.moc"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayitem/unittest_calendayitem.pro Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,55 @@
+#
+# 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: calendaycontentwidget test project file
+#
+
+TEMPLATE = app
+TARGET = unittest_calendayitem
+
+MOC_DIR = moc
+
+CONFIG += qtestlib
+CONFIG += symbian_test
+CONFIG += hb
+
+INCLUDEPATH += . \
+ ../../../inc/ \
+ ../../../../inc/
+
+DEPENDPATH += . \
+ ../../../inc/ \
+ ../../../src/
+
+# Input
+HEADERS += calendayitem.h \
+ calendaystatusstrip.h
+
+
+SOURCES += unittest_calendayitem.cpp \
+ calendayitem.cpp \
+ calendaystatusstrip.cpp
+
+symbian : {
+ TARGET.CAPABILITY = CAP_APPLICATION
+ MMP_RULES += "USERINCLUDE ."
+
+ INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+
+ LIBS += -lagendainterface
+
+ BLD_INF_RULES.prj_testexports += \
+ "./rom/unittest_calendayitem.iby CORE_APP_LAYER_IBY_EXPORT_PATH(unittest_calendayitem.iby)"
+}
+
+# End of file --Don't remove this.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayitemview/calencontext.h Tue Jul 06 14:14:56 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:
+*
+*/
+
+#ifndef CALENCONTEXT_H
+#define CALENCONTEXT_H
+
+#include <QDateTime>
+#include "calendayinfo.h"
+
+class MCalenContext
+{
+ public:
+ MCalenContext() {}
+
+ void setFocusDateAndTimeAndInstance( const QDateTime& focusDateTime,
+ const TCalenInstanceId& aInstanceId )
+ {
+ Q_UNUSED(focusDateTime);
+ Q_UNUSED(aInstanceId);
+ }
+
+};
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayitemview/calendaycontainer.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,211 @@
+/*
+ * 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 CALENDAYCONTAINER_H
+#define CALENDAYCONTAINER_H
+
+//System includes
+#include <QDateTime>
+
+#include "../../../../../mw/hb/src/hbwidgets/itemviews/hbabstractitemcontainer_p.h"
+
+//User includes
+
+//Forward declarations
+#include "calendayinfo.h"
+
+class CalenDayContainer : public HbAbstractItemContainer
+{
+ Q_OBJECT
+
+public:
+
+ /**
+ * Constructor.
+ */
+ CalenDayContainer(QGraphicsItem *parent = 0)
+ {
+ Q_UNUSED(parent);
+ }
+
+ /**
+ * Destructor.
+ */
+ ~CalenDayContainer(){}
+
+ /**
+ *
+ */
+ void itemAdded (int index, HbAbstractViewItem *item, bool animate)
+ {
+ Q_UNUSED(index);
+ Q_UNUSED(item);
+ Q_UNUSED(animate);
+ }
+
+ /**
+ *
+ */
+ void itemRemoved (HbAbstractViewItem *item, bool animate)
+ {
+ Q_UNUSED(item);
+ Q_UNUSED(animate);
+ }
+
+ /**
+ *
+ */
+ //void reset();
+
+ /**
+ *
+ */
+ void viewResized (const QSizeF &size)
+ {
+ Q_UNUSED(size);
+ }
+
+ /**
+ * Sets day's info structer to the container.
+ *
+ * @param dayInfo Day info.
+ */
+ void setDayInfo( CalenDayInfo* dayInfo )
+ {
+ Q_UNUSED(dayInfo);
+ }
+
+public slots:
+
+ /**
+ * Slot handles layout switch.
+ * @param orientation Current device orientation
+ */
+ void orientationChanged(Qt::Orientation orientation)
+ {
+ Q_UNUSED(orientation);
+ }
+
+protected:
+
+ /**
+ *
+ */
+ HbAbstractViewItem * createDefaultPrototype() const{ return 0;}
+
+ /**
+ *
+ */
+ // void setItemModelIndex(HbAbstractViewItem *item, const QModelIndex &index);
+
+ /**
+ * Updates geometry of a timed event.
+ */
+ // void updateTimedEventGeometry(HbAbstractViewItem *item,
+ // const QModelIndex &index);
+
+ /**
+ * Updates geometry of a all-day events
+ */
+ // void updateAllDayEventGeometry(HbAbstractViewItem *item,
+ // const QModelIndex &index);
+
+ /**
+ * Structure with event layout values.
+ *
+ * eventAreaX X value for event area start.
+ * eventAreaWidth The width of event area.
+ * eventMargin Margins between the multiple events.
+ * slotHeight Half hour slot's height.
+ * unitInPixels no. of pixels in 1un
+ */
+
+ /*struct LayoutValues {
+ LayoutValues()
+ :eventAreaX(0),
+ eventAreaWidth(0),
+ eventMargin(0),
+ slotHeight(0),
+ unitInPixels(0),
+ maxColumns(0)
+ {}
+
+ qreal eventAreaX;
+ qreal eventAreaWidth;
+ qreal eventMargin;
+ qreal slotHeight;
+ qreal unitInPixels;
+ int maxColumns;
+ };
+ */
+ /**
+ * Gets event layout values.
+ *
+ * @param layoutValues structure to be filled with layout data
+ */
+ //void getTimedEventLayoutValues(LayoutValues& layoutValues);
+
+
+ /**
+ * creates absorbers which prevent touching to small items
+ * (according to UI spec items smaller than ... are untouchable)
+ */
+ //void createTouchEventAbsorbers();
+
+ /**
+ *
+ */
+ //TouchEventAbsorber* crateAbsorberBetweenSlots(int startSlot, int endSlot);
+
+private:
+
+ //bool mGeometryUpdated;
+
+ //QDateTime mDateTime;
+
+ /**
+ * Day event info.
+ * Not own.
+ */
+ //CalenDayInfo* mInfo;
+
+ // LayoutValues mLayoutValues;
+ //QList<TouchEventAbsorber*> mAbsorbers;
+};
+
+
+
+class TouchEventAbsorber : public HbWidget
+ {
+ Q_OBJECT
+ public:
+ TouchEventAbsorber(QGraphicsItem *parent=0);
+ ~TouchEventAbsorber();
+
+ protected:
+ void gestureEvent(QGestureEvent *event);
+
+#ifdef _DEBUG
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
+ QWidget *widget);
+#endif
+
+ };
+
+#endif // CALENDAYCONTAINER_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayitemview/calendayinfo.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,214 @@
+/*
+ * 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 CALENDAYINFO_H
+#define CALENDAYINFO_H
+
+#include <QtGlobal>
+#include "caleninstanceid.h"
+#include <QtGui>
+
+//from hb_calencommands.hrh
+
+enum TCalenCommandId
+ {
+ ECalenMonthView,
+ ECalenWeekView,
+ ECalenAgendaView,
+ ECalenDayView,
+ ECalenTodoEditor,
+ ECalenTodoEditorDone,
+ ECalenForwardsToDayView,
+ ECalenNextView,
+ ECalenPrevView,
+ ECalenSwitchView,
+ ECalenShowToolbar,
+ ECalenHideToolbar,
+ ECalenUpdateToolbar,
+ ECalenHidePreview,
+ ECalenShowPreview,
+ ECalenStartActiveStep,
+ ECalenGotoToday,
+ ECalenGotoDate,
+ ECalenEventView,
+ ECalenCmdPromptThenEdit,
+ ECalenFasterAppExit,
+ ECalenShowNextDay,
+ ECalenShowPrevDay,
+ ECalenNewMeeting,
+ ECalenNewAnniv,
+ ECalenNewDayNote,
+ ECalenNewReminder,
+ ECalenNewMeetingRequest,
+ ECalenNewEntry,
+ ECalenEditCurrentEntry,
+ ECalenEditSeries,
+ ECalenEditOccurrence,
+ ECalenEditEntryFromViewer,
+ ECalenViewCurrentEntry,
+ ECalenNotifyFocusChange,
+ ECalenCompleteTodo,
+ ECalenRestoreTodo,
+ ECalenSend,
+ ECalenDeleteCurrentEntry,
+ ECalenDeleteEntryWithoutQuery,
+ ECalenDeleteSeries,
+ ECalenDeleteCurrentOccurrence,
+ ECalenDeleteAllEntries,
+ ECalenDeleteEntriesBeforeDate,
+ ECalenCancelDelete,
+ ECalenDeleteEntryFromViewer,
+ ECalenShowSettings,
+ ECalenGetLocation,
+ ECalenShowLocation,
+ ECalenGetLocationAndSave,
+ ECalenMissedAlarmsView,
+ ECalenMissedEventView,
+ ECalenCmdClear,
+ ECalenCmdClearAll,
+ ECalenCmdGotoCalendar,
+ ECalenMissedAlarmsViewFromIdle,
+ ECalenMissedEventViewFromIdle,
+ ECalenLastCommand,
+ ECalenRegionalPluginTapEvent
+ };
+
+//////////////////end of hb_calencommands.hrh
+
+struct SCalenApptInfo
+ {
+ QModelIndex iIndex;
+ QDateTime iStartTime;
+ QDateTime iEndTime;
+ bool iAllDay;
+ TCalenInstanceId iId;
+// AgendaEntry::Status iStatus;
+// AgendaEntry::TReplicationStatus iReplicationStatus;
+ // TBufC<KFSCalMaxDescriptionLength> iSummary;
+ TUint32 iColor;
+ };
+
+class CalenDayInfo
+{
+public:
+
+ enum TSlotsInHour
+ {
+ EOne = 1,
+ ETwo,
+ EThree,
+ EFour
+ };
+
+public: // Constructors and destructor
+
+ /**
+ * C++ default constructor.
+ */
+ CalenDayInfo( TSlotsInHour aSlotsInHour ) {Q_UNUSED(aSlotsInHour);}
+
+public:
+
+ void Reset() {}
+
+ void InsertTimedEvent( const SCalenApptInfo& aItemInfo ) {Q_UNUSED(aItemInfo);}
+
+ //void InsertUntimedEvent( AgendaEntry::Type aType,
+ // const TCalenInstanceId& aId );
+
+ void InsertAlldayEvent( const SCalenApptInfo& aItemInfo ){Q_UNUSED(aItemInfo);}
+
+ //static bool IsAlldayEvent( QDateTime aStart, QDateTime aEnd );
+
+
+ //int SuggestedUntimedSlotPos();
+
+ //int NeededUntimedSlotCount();
+
+ //int UpdateUntimedPos( int aSlot = -1, int aUntimedCount = 0 );
+
+ //int FirstOccupiedSlot();
+
+ //int LastOccupiedSlot();
+
+ //int EarliestEndSlot();
+ //int LastStartSlot();
+
+
+ //int SlotIndexForStartTime( QDateTime aStartTime );
+
+ //int SlotIndexForEndTime( QDateTime aStartTime );
+
+ //void GetLocation( const SCalenApptInfo& aItemInfo,
+ // int& aStartSlot,
+ // int& aEndSlot,
+ // int& aColumnIndex,
+ // int& aColumns );
+
+ //int AlldayCount();
+
+ //int TodoCount();
+
+ //bool IsHourStartSlot( const int& aSlotIndex ) const;
+
+ //bool IsExtraSlot( const int& aSlotIndex ) const;
+
+ //int HourFromSlotIndex( const int& aSlotIndex ) const;
+
+ //int SlotIndexFromHour( int aHour );
+
+ //int RoundHourUp( int aSlot );
+
+ //int RoundHourDown( int aSlot );
+
+ //void GetSelectedSlot( int& aSlot, int& aRegion, int& aColumnIndex, int& aColumns );
+
+ //bool MoveSelection( TScrollDirection aDirection );
+
+ //void MoveSelectionInEvent( TScrollDirection aDirection );
+
+ //void UpdateSelectionInEvent();
+
+ //bool IsEventSelected() const;
+
+ // bool IsMultipleEventsSelected() const;
+
+ //bool IsAlldayEventSelected() const;
+
+ //TCalenInstanceId SelectedEvent();
+
+ //int SelectEvent( const TCalenInstanceId& aId );
+
+ //TCalenInstanceId UntimedEvent( int aIndex );
+
+ //const CalenTimedEventInfo& AlldayEvent( int aIndex );
+
+ //void SelectSlot( int aSlot );
+
+
+ //const QList<CalenTimeRegion>& RegionList() const;
+
+
+ //void GetEventIntervals( QList<CalenEventInterval>& aArray ) const;
+
+
+ // CalenSlotInterval SelectedInterval();
+
+ // bool SetSelectionInRegion( int aRegion, int aColumn, int aSlot );
+};
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayitemview/calendaymodel.h Tue Jul 06 14:14:56 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: Single day item view model
+*
+*/
+
+#ifndef CALENDAYMODEL_H
+#define CALENDAYMODEL_H
+
+//System includes
+#include <QAbstractItemModel>
+#include <QVariant>
+#include <QDateTime>
+
+#include <agendaentry.h>
+
+//User includes
+
+//Forward declarations
+class MCalenServices;
+
+//Constantss
+const int CalenDayEntry = Qt::UserRole + 1;
+
+Q_DECLARE_METATYPE(AgendaEntry)
+class CalenDayModel : public QAbstractListModel
+{
+ Q_OBJECT
+public:
+ CalenDayModel(const QDateTime &date, MCalenServices &services,
+ QObject *parent = 0)
+ {
+ Q_UNUSED(date)
+ Q_UNUSED(parent)
+ Q_UNUSED(date)
+ };
+
+ // from QAbstractListModel
+ int rowCount(const QModelIndex &parent = QModelIndex()) const
+ {
+ return 0;
+ }
+ QVariant data(const QModelIndex &index, int role) const
+ {
+ Q_UNUSED(index)
+ Q_UNUSED(role)
+ return QVariant();
+ }
+
+ void refreshModel(const QDateTime &date)
+ {
+ Q_UNUSED(date)
+ };
+
+ QDateTime modelDate() const
+ {return QDateTime();}
+
+};
+
+#endif //CALENDAYMODEL_H
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayitemview/calenservices.h Tue Jul 06 14:14:56 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:
+ *
+ */
+
+#ifndef CALENSERVICES_H
+#define CALENSERVICES_H
+
+#include "calencontext.h"
+
+/*!
+ Mocked class MCalenServices
+ */
+class MCalenServices
+{
+public:
+ MCalenServices() {
+
+ }
+
+ ~MCalenServices() {
+
+ }
+
+ MCalenContext Context() {return MCalenContext();}
+
+ bool IssueCommandL( quint32 aCommand ) {Q_UNUSED(aCommand); return true;}
+};
+
+#endif // CALENSERVICES_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayitemview/hbinstance.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,96 @@
+/*
+* 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: Mocked classes for testing CalenDayUtils class
+*
+*/
+
+#ifndef HBMAINWINDOW_H
+#define HBMAINWINDOW_H
+
+#include <QObject>
+#include <QtGlobal>
+#include <QRectF>
+
+// Test variables
+extern QRectF gTestWindowRect;
+extern Qt::Orientation gTestOrientation;
+
+
+
+/*!
+ Mocked class HbMainWindow (simulating window in unittests)
+ */
+class HbMainWindow
+: public QObject
+{
+ Q_OBJECT
+public:
+ HbMainWindow(QObject *parent = 0) : QObject(parent){
+ Q_UNUSED(parent);
+ }
+
+ ~HbMainWindow() {
+ }
+
+ QRectF layoutRect() const {
+ return gTestWindowRect;
+ }
+
+ Qt::Orientation orientation() const {
+ return gTestOrientation;
+ }
+signals:
+ void orientationChanged(Qt::Orientation);
+};
+
+#endif // HBMAINWINDOW_H
+
+#ifndef HBINSTANCE_H
+#define HBINSTANCE_H
+
+#include <QList>
+
+/*!
+ Mocked class HbInstance (simulating hbinstance in unittests)
+ */
+class HbInstance
+{
+public:
+
+ static HbInstance *instance() {
+ return new HbInstance();
+ }
+
+ QList<HbMainWindow *> allMainWindows() const {
+ return mMainWindows;
+ }
+
+ HbInstance() {
+ HbMainWindow* window = new HbMainWindow();
+ mMainWindows.append(window);
+ }
+
+ ~HbInstance() {
+ for (int i = 0; i < mMainWindows.count(); i++) {
+ delete mMainWindows[i];
+ }
+ mMainWindows.clear();
+ }
+
+ QList<HbMainWindow *> mMainWindows;
+};
+
+#endif // HBINSTANCE_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayitemview/rom/unittest_calendayitemview.iby Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2006-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: Image description file for test project
+*
+*/
+
+#ifndef UNITTEST_CALENDAYITEMVIEW_IBY
+#define UNITTEST_CALENDAYITEMVIEW_IBY
+
+S60_APP_EXE(unittest_calendayitemview)
+S60_APP_RESOURCE(unittest_calendayitemview)
+
+// Application registration file.
+data=DATAZ_\private\10003a3f\import\apps\unittest_calendayitemview_reg.rsc \private\10003a3f\import\apps\unittest_calendayitemview_reg.rsc
+
+
+#endif // UNITTEST_CALENDAYITEMVIEW_IBY
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayitemview/unittest_calendayitemview.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,114 @@
+/*
+ * 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:
+ *
+ */
+#include <QGraphicsItem>
+#include <hbmodeliterator.h>
+#include <QtTest/QtTest>
+
+#include "calenservices.h"
+#include "calendayitemview.h"
+
+// Test variables
+QRectF gTestWindowRect = QRectF(0, 0, 10, 20);
+Qt::Orientation gTestOrientation = Qt::Horizontal;
+
+class TestCalenItemView : public QObject
+{
+Q_OBJECT
+
+public:
+ TestCalenItemView();
+ virtual ~TestCalenItemView();
+
+private slots:
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+ void cleanup();
+
+ void testConstructors();
+private:
+ MCalenServices mMCalenServices;
+
+};
+
+/*!
+ Constructor
+ */
+TestCalenItemView::TestCalenItemView()
+{
+
+}
+
+/*!
+ Destructor
+ */
+TestCalenItemView::~TestCalenItemView()
+{
+
+}
+
+/*!
+ Called before testcase
+ */
+void TestCalenItemView::initTestCase()
+{
+}
+
+/*!
+ Called after testcase
+ */
+void TestCalenItemView::cleanupTestCase()
+{
+
+}
+
+/*!
+ Called before every function
+ */
+void TestCalenItemView::init()
+{
+
+}
+
+/*!
+ Called after everyfunction
+ */
+void TestCalenItemView::cleanup()
+{
+
+}
+
+/*!
+ Test function for constructors
+ 1. Test if content widget is not initialized
+ 2. Test if content widget is correcty created
+ */
+void TestCalenItemView::testConstructors()
+{
+ //1)
+ CalenDayItemView *testItemView = 0;
+ QVERIFY(!testItemView);
+
+ //2)
+ HbModelIterator *iterator = new HbModelIterator();
+ testItemView = new CalenDayItemView(mMCalenServices,iterator,0);
+ QVERIFY(testItemView);
+ delete testItemView;
+}
+
+QTEST_MAIN(TestCalenItemView);
+#include "unittest_calendayitemview.moc"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayitemview/unittest_calendayitemview.pro Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,68 @@
+#
+# 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: calendaycontentwidget test project file
+#
+
+TEMPLATE = app
+TARGET = unittest_calendayitemview
+
+MOC_DIR = moc
+
+CONFIG += qtestlib
+CONFIG += symbian_test
+CONFIG += hb
+
+INCLUDEPATH += . \
+ ../../../inc/ \
+ ../../../src/ \
+ ./../../../../inc/ \
+ ./../../../../../inc/
+
+DEPENDPATH += . \
+ ../../../inc/ \
+ ../../../src/ \
+ ./../../../../inc/ \
+ ./../../../../../inc/
+
+# Input
+HEADERS += calencontext.h \
+ calendayinfo.h \
+ calenservices.h \
+ CalenUid.h \
+ calendayitemview.h \
+ caleninstanceid.h \
+ calendaycontainer.h \
+ calendayutils.h \
+ hbinstance.h \
+ calendaymodel.h
+
+
+SOURCES += unittest_calendayitemview.cpp \
+ calendayitemview.cpp \
+ calendayutils.cpp
+
+symbian : {
+ TARGET.CAPABILITY = CAP_APPLICATION
+ MMP_RULES += "USERINCLUDE ."
+
+ INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+
+ LIBS += -lagendainterface \
+ -lcalencommonutils
+
+ BLD_INF_RULES.prj_testexports += \
+ "./rom/unittest_calendayitemview.iby CORE_APP_LAYER_IBY_EXPORT_PATH(unittest_calendayitemview.iby)"
+}
+
+# End of file --Don't remove this.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendaymodel/calenservices.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,86 @@
+/*
+* 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: Mocked classes for testing CalenDayModel class
+*
+*/
+
+#ifndef AGENDAUTIL_H
+#define AGENDAUTIL_H
+
+#include <agendaentry.h>
+
+/*!
+ Mocked class AgendaUtil
+ */
+class AgendaUtil
+{
+public:
+ enum FilterFlags {
+ IncludeAppointments = 0x01,
+ IncludeReminders = 0x02,
+ IncludeEvents = 0x03
+ };
+
+public:
+ AgendaUtil() {
+
+ }
+
+ ~AgendaUtil() {
+
+ }
+
+ QList<AgendaEntry> createEntryIdListForDay(const QDateTime &date,AgendaUtil::FilterFlags filter)
+ {
+ QList<AgendaEntry> agenda;
+ AgendaEntry entry;
+ agenda << entry;
+ return agenda;
+ }
+};
+
+#endif // AGENDAUTIL_H
+
+#ifndef CALENSERVICES_H
+#define CALENSERVICES_H
+
+/*!
+ Mocked class MCalenServices
+ */
+class MCalenServices
+{
+public:
+ MCalenServices() : mAgendaUtil(NULL) {
+ mAgendaUtil = new AgendaUtil();
+ }
+
+ ~MCalenServices() {
+ if (mAgendaUtil) {
+ delete mAgendaUtil;
+ mAgendaUtil = NULL;
+ }
+ }
+
+ AgendaUtil* agendaInterface() {
+ return mAgendaUtil;
+ }
+
+public:
+ AgendaUtil* mAgendaUtil;
+};
+
+#endif // CALENSERVICES_H
+
+// End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendaymodel/rom/unittest_calendaymodel.iby Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2006-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: Image description file for test project
+*
+*/
+
+#ifndef UNITTEST_CALENDAYMODEL_IBY
+#define UNITTEST_CALENDAYMODEL_IBY
+
+S60_APP_EXE(unittest_calendaymodel)
+S60_APP_RESOURCE(unittest_calendaymodel)
+
+// Application registration file.
+data=DATAZ_\private\10003a3f\import\apps\unittest_calendaymodel_reg.rsc \private\10003a3f\import\apps\unittest_calendaymodel_reg.rsc
+
+
+#endif // UNITTEST_CALENDAYMODEL_IBY
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendaymodel/unittest_calendaymodel.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,118 @@
+/*
+ * 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: Test class for CalenDayModel
+ *
+ */
+#include <QtTest/QtTest>
+
+#include "calendaymodel.h"
+#include "calenservices.h"
+
+class TestCalenDayModel : public QObject
+{
+Q_OBJECT
+
+public:
+ TestCalenDayModel();
+ virtual ~TestCalenDayModel();
+
+private slots:
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+ void cleanup();
+
+ void testConstructors();
+
+private:
+ QDateTime mDateTime;
+ MCalenServices *mServices;
+ CalenDayModel *mModel;
+};
+
+/*!
+ Constructor
+ */
+TestCalenDayModel::TestCalenDayModel() :
+ mServices(NULL), mModel(NULL)
+{
+
+}
+
+/*!
+ Destructor
+ */
+TestCalenDayModel::~TestCalenDayModel()
+{
+
+}
+
+/*!
+ Called before testcase
+ */
+void TestCalenDayModel::initTestCase()
+{
+ mDateTime = QDateTime::currentDateTime();
+ mServices = new MCalenServices();
+}
+
+/*!
+ Called after testcase
+ */
+void TestCalenDayModel::cleanupTestCase()
+{
+ if (mServices) {
+ delete mServices;
+ }
+}
+
+/*!
+ Called before every function
+ */
+void TestCalenDayModel::init()
+{
+ mModel = new CalenDayModel(mDateTime, *mServices);
+}
+
+/*!
+ Called after everyfunction
+ */
+void TestCalenDayModel::cleanup()
+{
+ if (mModel) {
+ delete mModel;
+ mModel = NULL;
+ }
+}
+
+/*!
+ Test function for constructors
+ 1. Test if model is not initialized
+ 2. Test if model is correcty created
+ */
+void TestCalenDayModel::testConstructors()
+{
+ //1)
+ CalenDayModel *testModel = 0;
+ QVERIFY(!testModel);
+
+ //2)
+ testModel = new CalenDayModel(mDateTime, *mServices);
+ QVERIFY(testModel);
+
+ delete testModel;
+}
+
+QTEST_MAIN(TestCalenDayModel);
+#include "unittest_calendaymodel.moc"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendaymodel/unittest_calendaymodel.pro Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,51 @@
+#
+# 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: CalenDayModel test project file
+#
+
+TEMPLATE = app
+TARGET = unittest_calendaymodel
+
+MOC_DIR = moc
+
+CONFIG += qtestlib
+CONFIG += symbian_test
+CONFIG += hb
+
+INCLUDEPATH += . \
+ ../../../inc/ \
+ ../../../../inc/
+
+DEPENDPATH += . \
+ ../../../inc/ \
+ ../../../src/
+
+# Input
+HEADERS += calendaymodel.h
+
+SOURCES += unittest_calendaymodel.cpp \
+ calendaymodel.cpp
+
+symbian : {
+ TARGET.CAPABILITY = CAP_APPLICATION
+ MMP_RULES += "USERINCLUDE ."
+
+ INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+ LIBS += -lagendainterface
+
+ BLD_INF_RULES.prj_testexports += \
+ "./rom/unittest_calendaymodel.iby CORE_APP_LAYER_IBY_EXPORT_PATH(unittest_calendaymodel.iby)"
+}
+
+# End of file --Don't remove this.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendaymodelmanager/calencontext.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,46 @@
+/*
+* 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 context, info on what's currently focused
+*
+*/
+
+
+#ifndef CALENCONTEXT_H
+#define CALENCONTEXT_H
+#include <QDateTime>
+
+// FORWARD DECLARATIONS
+class TCalenInstanceId;
+class QDateTime;
+
+// INCLUDES
+
+// CLASS DEFINITIONS
+/**
+ * The controller handles events from the rest of Calendar and delegates
+ * them to the appropriate place (i.e. the action ui classes).
+ */
+class MCalenContext
+ {
+public :
+ QDateTime focusDateAndTime()
+ {
+ return QDateTime(QDate(2000, 10, 10));
+ }
+
+ };
+
+#endif // CALENCONTEXT_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendaymodelmanager/calendaymodel.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,70 @@
+/*
+* 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: Single day item view model
+*
+*/
+
+#ifndef CALENDAYMODEL_H
+#define CALENDAYMODEL_H
+
+//System includes
+#include <QAbstractItemModel>
+#include <QVariant>
+#include <QDateTime>
+
+#include <agendaentry.h>
+
+//User includes
+
+//Forward declarations
+class MCalenServices;
+
+//Constantss
+const int CalenDayEntry = Qt::UserRole + 1;
+
+Q_DECLARE_METATYPE(AgendaEntry)
+
+class CalenDayModel : public QAbstractListModel
+{
+ Q_OBJECT
+public:
+ CalenDayModel(const QDateTime &date, MCalenServices &services,
+ QObject *parent = 0){
+ Q_UNUSED(date);
+ Q_UNUSED(services);
+ Q_UNUSED(parent);
+ }
+
+ // from QAbstractListModel
+ int rowCount(const QModelIndex &parent = QModelIndex()) const{
+ Q_UNUSED(parent);
+ return 0;
+ }
+ QVariant data(const QModelIndex &index, int role) const{
+ Q_UNUSED(index);
+ Q_UNUSED(role);
+ return 0;
+ }
+
+ void refreshModel(const QDateTime &date){
+ Q_UNUSED(date);
+ }
+
+ QDateTime modelDate(){
+ return QDateTime(QDate(2000, 10, 10));
+ }
+};
+
+#endif //CALENDAYMODEL_H
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendaymodelmanager/calenservices.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,33 @@
+/*
+ * calenservices.h
+ *
+ * Created on: Jun 21, 2010
+ * Author: zabinpio
+ */
+
+#ifndef CALENSERVICES_H_
+#define CALENSERVICES_H_
+
+#include "calencontext.h"
+
+/*!
+ Mocked class MCalenServices
+ */
+class MCalenServices
+{
+public:
+ MCalenServices() {
+
+ }
+
+ MCalenContext& Context(){
+ return mContext;
+ }
+
+ ~MCalenServices() {
+
+ }
+
+ MCalenContext mContext;
+};
+#endif /* CALENSERVICES_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendaymodelmanager/rom/unittest_calendaymodelmanager.iby Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2006-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: Image description file for test project
+*
+*/
+
+#ifndef UNITTEST_CALENDAYMODELMANAGER_IBY
+#define UNITTEST_CALENDAYMODELMANAGER_IBY
+
+S60_APP_EXE(unittest_calendaymodelmanager)
+S60_APP_RESOURCE(unittest_calendaymodelmanager)
+
+// Application registration file.
+data=DATAZ_\private\10003a3f\import\apps\unittest_calendaymodelmanager_reg.rsc \private\10003a3f\import\apps\unittest_calendaymodelmanager_reg.rsc
+
+
+#endif //UNITTEST_CALENDAYMODELMANAGER_IBY
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendaymodelmanager/unittest_calendaymodelmanager.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,119 @@
+/*
+ * 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: Test class for CalenDayContainerWidget
+ *
+ */
+#include <QtTest/QtTest>
+
+#include "calenservices.h"
+#include "calendaymodelmanager.h"
+
+class TestCalenDayModelManager : public QObject
+{
+Q_OBJECT
+
+public:
+ TestCalenDayModelManager();
+ virtual ~TestCalenDayModelManager();
+
+private slots:
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+ void cleanup();
+
+ void testConstructors();
+
+private:
+ CalenDayModelManager *mManager;
+};
+
+/*!
+ Constructor
+ */
+TestCalenDayModelManager::TestCalenDayModelManager() :
+mManager(NULL)
+{
+
+}
+
+/*!
+ Destructor
+ */
+TestCalenDayModelManager::~TestCalenDayModelManager()
+{
+
+}
+
+/*!
+ Called before testcase
+ */
+void TestCalenDayModelManager::initTestCase()
+{
+}
+
+/*!
+ Called after testcase
+ */
+void TestCalenDayModelManager::cleanupTestCase()
+{
+
+}
+
+/*!
+ Called before every function
+ */
+void TestCalenDayModelManager::init()
+{
+ //mManager = new CalenDayModelManager();
+}
+
+/*!
+ Called after everyfunction
+ */
+void TestCalenDayModelManager::cleanup()
+{
+ // if (mManager) {
+ // delete mManager;
+ // mManager = NULL;
+ // }
+}
+
+/*!
+ Test function for constructors
+ 1. Test if container is not initialized
+ 2. Test if container is correcty created
+ */
+void TestCalenDayModelManager::testConstructors()
+{
+ //1)
+ MCalenServices services;
+
+ CalenDayModelManager *testManager = 0;
+ CalenDayModelManager *testManager2 = 0;
+ QVERIFY(!testManager);
+ QVERIFY(!testManager2);
+
+ //2)
+ testManager = new CalenDayModelManager(services, false, 0);
+ testManager2 = new CalenDayModelManager(services, true, 0);
+ QVERIFY(testManager);
+ QVERIFY(testManager2);
+
+ delete testManager;
+ delete testManager2;
+}
+
+QTEST_MAIN(TestCalenDayModelManager);
+#include "unittest_calendaymodelmanager.moc"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendaymodelmanager/unittest_calendaymodelmanager.pro Tue Jul 06 14:14:56 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: calendaycontentwidget test project file
+TEMPLATE = app
+TARGET = unittest_calendaymodelmanager
+MOC_DIR = moc
+CONFIG += qtestlib
+CONFIG += symbian_test
+CONFIG += hb
+INCLUDEPATH += . \
+ ../../../inc/
+DEPENDPATH += . \
+ ../../../inc/ \
+ ../../../src/
+
+# Input
+HEADERS += calencontext.h \
+ calendaymodel.h \
+ calenservices.h \
+ calendaymodelmanager.h
+
+SOURCES += calendaymodelmanager.cpp \
+ unittest_calendaymodelmanager.cpp
+
+symbian: {
+ TARGET.CAPABILITY = CAP_APPLICATION
+ MMP_RULES += "USERINCLUDE ."
+ INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+ BLD_INF_RULES.prj_testexports += \
+ "./rom/unittest_calendaymodelmanager.iby CORE_APP_LAYER_IBY_EXPORT_PATH(unittest_calendaymodelmanager.iby)"
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendaystatusstrip/calendaystatusstriptest.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,37 @@
+/*
+ * 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: Class needed by testing to have acces to private data memebers
+ *
+ */
+
+
+#ifndef CALENDAYSTATUSSTRIPTEST_H
+#define CALENDAYSTATUSSTRIPTEST_H
+
+#include "calenDaystatusstrip.h"
+
+class CalenDayStatusStripTest : public CalenDayStatusStrip
+{
+
+ Q_OBJECT
+public:
+ CalenDayStatusStripTest(HbWidget *parent = 0)
+ : CalenDayStatusStrip(parent)
+ {
+
+ }
+ friend class TestCalenStatusStrip;
+};
+
+#endif // CALENDAYSTATUSSTRIPTEST_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendaystatusstrip/rom/unittest_calendaystatusstrip.iby Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2006-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: Image description file for test project
+*
+*/
+
+#ifndef UNITTEST_CALENDAYSTATUSSTRIP_IBY
+#define UNITTEST_CALENDAYSTATUSSTRIP_IBY
+
+S60_APP_EXE(unittest_calendaystatusstrip)
+S60_APP_RESOURCE(unittest_calendaystatusstrip)
+
+// Application registration file.
+data=DATAZ_\private\10003a3f\import\apps\unittest_calendaystatusstrip_reg.rsc \private\10003a3f\import\apps\unittest_calendaystatusstrip_reg.rsc
+
+
+#endif // UNITTEST_CALENDAYSTATUSSTRIP_IBY
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendaystatusstrip/unittest_calendaystatusstrip.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,368 @@
+/*
+ * 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: Test class for CalenDayContentWidget
+ *
+ */
+
+#include <QtTest/QtTest>
+#include <QGraphicsItem>
+
+#include "calendaystatusstriptest.h"
+
+#include <QPainter>
+#include <QImage>
+#include <QPair>
+
+const qreal WIDGET_WIDTH = 50;
+const qreal WIDGET_HEIGHT = 150;
+
+class TestCalenStatusStrip : public QObject
+{
+Q_OBJECT
+
+public:
+ TestCalenStatusStrip();
+ virtual ~TestCalenStatusStrip();
+
+private slots:
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+ void cleanup();
+
+ void testConstructors();
+ void testSetGetColor();
+ void testSetGetRange();
+ void testSetGetDrawingStyle_data();
+ void testSetGetDrawingStyle();
+ void testStartEndTime();
+ void testCreatingDiagonalLine();
+ void testCalculateStartEndTimePosition_data();
+ void testCalculateStartEndTimePosition();
+ void testCalculateMinuteHegiht();
+ void testPaint();
+
+private:
+ CalenDayStatusStripTest *mStatusStrip;
+};
+
+
+
+
+/*!
+ Constructor
+ */
+TestCalenStatusStrip::TestCalenStatusStrip() :
+ mStatusStrip(NULL)
+{
+
+}
+
+/*!
+ Destructor
+ */
+TestCalenStatusStrip::~TestCalenStatusStrip()
+{
+
+}
+
+/*!
+ Called before testcase
+ */
+void TestCalenStatusStrip::initTestCase()
+{
+}
+
+/*!
+ Called after testcase
+ */
+void TestCalenStatusStrip::cleanupTestCase()
+{
+
+}
+
+/*!
+ Called before every function
+ */
+void TestCalenStatusStrip::init()
+{
+ mStatusStrip = new CalenDayStatusStripTest();
+}
+
+/*!
+ Called after everyfunction
+ */
+void TestCalenStatusStrip::cleanup()
+{
+ if (mStatusStrip) {
+ delete mStatusStrip;
+ mStatusStrip = NULL;
+ }
+}
+
+/*!
+ Test function for constructors
+ 1. Test if content widget is not initialized
+ 2. Test if content widget is correcty created
+ */
+void TestCalenStatusStrip::testConstructors()
+{
+ //1)
+ CalenDayStatusStrip *testStatusStrip = 0;
+ QVERIFY(!testStatusStrip);
+
+ //2)
+ testStatusStrip = new CalenDayStatusStrip();
+ QVERIFY(testStatusStrip);
+ delete testStatusStrip;
+}
+
+/*!
+ Test function for geting and setting color
+ 1. Test setting red color
+ 2. Test change color to blue
+ */
+void TestCalenStatusStrip::testSetGetColor()
+{
+ //1)
+ mStatusStrip->setColor(QColor(Qt::red));
+ QColor testColor = mStatusStrip->color();
+ QCOMPARE(QColor(Qt::red),testColor);
+
+ //2)
+ mStatusStrip->setColor(QColor(Qt::blue));
+ testColor = mStatusStrip->color();
+ QCOMPARE(QColor(Qt::blue),testColor);
+}
+
+/*!
+ Test function for geting and setting range
+ 1. Test setting 5px range
+ 2. Test change range to 1px
+ */
+void TestCalenStatusStrip::testSetGetRange()
+{
+ //1)
+ mStatusStrip->setRange(5);
+ QCOMPARE((qreal)5,mStatusStrip->range());
+
+ //2)
+ mStatusStrip->setRange(1);
+ QCOMPARE((qreal)1,mStatusStrip->range());
+}
+
+/*!
+ Preapre data for \sa testSetGetDrawingStyle
+ Add new enum \sa CalenDayStatusStrip::DrawingStyle
+ 1)OnlyFrame
+ 2)StripWithLines
+ 3)Filled
+ */
+void TestCalenStatusStrip::testSetGetDrawingStyle_data()
+{
+ QTest::addColumn<CalenDayStatusStrip::DrawingStyle>("testedValue");
+ QTest::addColumn<CalenDayStatusStrip::DrawingStyle>("testValue");
+
+ QTest::newRow("OnlyFrame") << CalenDayStatusStrip::OnlyFrame
+ << CalenDayStatusStrip::OnlyFrame;
+ QTest::newRow("StripWithLines") << CalenDayStatusStrip::StripWithLines
+ << CalenDayStatusStrip::StripWithLines;
+ QTest::newRow("Filled") << CalenDayStatusStrip::Filled
+ << CalenDayStatusStrip::Filled;
+}
+
+/*!
+ Test settting and getting drawing style on preapred data
+
+ \sa testSetGetDrawingStyle_data
+ */
+void TestCalenStatusStrip::testSetGetDrawingStyle()
+{
+ //get data to test
+ QFETCH(CalenDayStatusStrip::DrawingStyle, testedValue);
+ QFETCH(CalenDayStatusStrip::DrawingStyle, testValue);
+
+ //set data
+ mStatusStrip->setDrawingStyle(testedValue);
+
+ //check data
+ QCOMPARE(mStatusStrip->drawingStyle(),testValue);
+}
+
+/*!
+ Test setting and getting start and end time of event
+ 1)Set end and start of event
+ 2)Change values
+ */
+void TestCalenStatusStrip::testStartEndTime()
+{
+ QPair<QTime, QTime> startEndTime;
+ startEndTime.first = QTime(12,12,12);
+ startEndTime.second = QTime(15,15,15);
+
+ mStatusStrip->setStartEndTime(startEndTime.first,startEndTime.second);
+
+ QCOMPARE(mStatusStrip->startEndTime().first,startEndTime.first);
+ QCOMPARE(mStatusStrip->startEndTime().second,startEndTime.second);
+
+ startEndTime.first = QTime(1,1,1);
+ startEndTime.second = QTime(5,5,5);
+
+ mStatusStrip->setStartEndTime(startEndTime.first,startEndTime.second);
+
+ QCOMPARE(mStatusStrip->startEndTime().first,startEndTime.first);
+ QCOMPARE(mStatusStrip->startEndTime().second,startEndTime.second);
+}
+
+/*!
+ Test creating polygon to draw diagonal line on widget
+ */
+void TestCalenStatusStrip::testCreatingDiagonalLine()
+{
+ qreal dx = 10;
+ qreal dy = 1;
+ QPointF point(0,60);
+ QVector<QPointF> points;
+
+ points << QPointF(0,60);
+ points << QPointF(0,59);
+ points << QPointF(10,58);
+ points << QPointF(10,59);
+
+ QPolygonF testValue(points);
+ QPolygonF testedValue = mStatusStrip->diagonalLine(point,dx,dy);
+
+ QCOMPARE(testedValue,testValue);
+}
+
+/*!
+ Prepare data for \sa testCalculateStartEndTimePosition
+ Add new start and end time of event.
+ 1)Full time start and end
+ 2)Exactly 30min time start and end
+ 3)More than 30min time start and end
+ 4)time start > 30m and end > 23h30m
+ */
+void TestCalenStatusStrip::testCalculateStartEndTimePosition_data()
+{
+ QTest::addColumn<QTime>("testedStartValue");
+ QTest::addColumn<QTime>("testedEndValue");
+ QTest::addColumn<QTime>("testStartValue");
+ QTest::addColumn<QTime>("testEndValue");
+
+ QTest::newRow("Full time start and end") << QTime(10,00,00)
+ << QTime(11,00,00)
+ << QTime(10,00,00)
+ << QTime(11,00,00);
+ QTest::newRow("Exactly 30min time start and end") << QTime(10,30,00)
+ << QTime(11,30,00)
+ << QTime(10,30,00)
+ << QTime(11,30,00);
+ QTest::newRow("More than 30min time start and end") << QTime(10,40,00)
+ << QTime(12,35,00)
+ << QTime(10,30,00)
+ << QTime(13,00,00);
+ QTest::newRow("time start > 30m and end > 23h30m") << QTime(20,35,00)
+ << QTime(23,35,00)
+ << QTime(20,30,00)
+ << QTime(23,59,00);
+}
+
+/*!
+ Test calculating start and end time drawing of event bubble on prepared data
+ \sa testCalculateStartEndTimePosition_data
+ */
+void TestCalenStatusStrip::testCalculateStartEndTimePosition()
+{
+ //get prepared data
+ QFETCH(QTime, testedStartValue);
+ QFETCH(QTime, testedEndValue);
+ QFETCH(QTime, testStartValue);
+ QFETCH(QTime, testEndValue);
+
+ //run function
+ QPair<QTime,QTime> testStartEndValue
+ = mStatusStrip->calculateStartEndPostion(testedStartValue,
+ testedEndValue);
+ //check data
+ QCOMPARE(testStartEndValue.first,testStartValue);
+ QCOMPARE(testStartEndValue.second,testEndValue);
+}
+
+/*!
+ Test calculating minute height based on widget height and given time.
+ 1)Calculate on given time
+ 2)Change time of event
+ */
+void TestCalenStatusStrip::testCalculateMinuteHegiht()
+{
+ qreal testedValue;
+ qreal testValue;
+ mStatusStrip->resize(WIDGET_WIDTH,WIDGET_HEIGHT);
+
+ //1)
+ testedValue = mStatusStrip->calculateMinuteHeight(QTime(10,00,0),
+ QTime(11,00,0));
+ testValue = WIDGET_HEIGHT / (qreal)60;
+ QCOMPARE(testedValue,testValue);
+
+ //2)
+ testedValue = mStatusStrip->calculateMinuteHeight(QTime(10,00,0),
+ QTime(11,30,0));
+ testValue = WIDGET_HEIGHT / (qreal)90;
+ QCOMPARE(testedValue,testValue);
+}
+
+
+/*!
+ Test drawing widget.
+
+ If there is no SAVE_IMAGES macro defined it will only run this function.
+ If there is macro defined and c:\unittest folder created then image will be
+ created so user can see if it draw in good way.
+ */
+void TestCalenStatusStrip::testPaint()
+{
+ //preapre data needed to draw on widget
+ mStatusStrip->setColor(QColor(Qt::red));
+ QPair<QTime, QTime> startEndTime;
+ startEndTime.first = QTime(10,20,0);
+ startEndTime.second = QTime(15,10,00);
+
+ //set event time
+ mStatusStrip->setStartEndTime(startEndTime.first,startEndTime.second);
+
+ //resize widget to be bigger than (0,0)
+ mStatusStrip->resize(WIDGET_WIDTH,WIDGET_HEIGHT);
+ QSize size = mStatusStrip->size().toSize();
+
+ //create image that will simulate widget where painting should be done
+ QImage img(size,QImage::Format_RGB32);
+ //create painter which will be used to paint
+ QPainter painter(&img);
+ //fill image with white color to have better filings with look of "paper"
+ painter.fillRect(0,0,size.width(),size.height(),QColor(Qt::white));
+ //run paint
+ mStatusStrip->paint(&painter,0);
+
+#ifdef SAVE_IMAGES
+ //save drawed image
+ img.save("c:/unittest/TestCalenStatusStrip_testPaint.jpg");
+
+#endif
+
+}
+
+QTEST_MAIN(TestCalenStatusStrip);
+#include "unittest_calendaystatusstrip.moc"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendaystatusstrip/unittest_calendaystatusstrip.pro Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,53 @@
+#
+# 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: calendaycontentwidget test project file
+#
+
+TEMPLATE = app
+TARGET = unittest_calendaystatusstrip
+
+#uncoment it if want to get images from test where it is posible.
+#it need folder in c:/unittest path
+#DEFINES += SAVE_IMAGES
+
+MOC_DIR = moc
+
+CONFIG += qtestlib
+CONFIG += symbian_test
+CONFIG += hb
+
+INCLUDEPATH += . \
+ ../../../inc/ \
+
+DEPENDPATH += . \
+ ../../../inc/ \
+ ../../../src/
+
+# Input
+HEADERS += calendaystatusstrip.h \
+ calendaystatusstriptest.h
+
+
+SOURCES += unittest_calendaystatusstrip.cpp \
+ calendaystatusstrip.cpp
+
+symbian : {
+ TARGET.CAPABILITY = CAP_APPLICATION
+ MMP_RULES += "USERINCLUDE ."
+
+ BLD_INF_RULES.prj_testexports += \
+ "./rom/unittest_calendaystatusstrip.iby CORE_APP_LAYER_IBY_EXPORT_PATH(unittest_calendaystatusstrip.iby)"
+}
+
+# End of file --Don't remove this.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayutils/hbinstance.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,85 @@
+/*
+* 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: Mocked classes for testing CalenDayUtils class
+*
+*/
+
+#ifndef HBMAINWINDOW_H
+#define HBMAINWINDOW_H
+
+// Test variables
+extern QRectF gTestWindowRect;
+extern Qt::Orientation gTestOrientation;
+
+/*!
+ Mocked class HbMainWindow (simulating window in unittests)
+ */
+class HbMainWindow
+{
+public:
+ HbMainWindow() {
+ }
+
+ ~HbMainWindow() {
+ }
+
+ QRectF layoutRect() const {
+ return gTestWindowRect;
+ }
+
+ Qt::Orientation orientation() const {
+ return gTestOrientation;
+ }
+};
+
+#endif // HBMAINWINDOW_H
+
+#ifndef HBINSTANCE_H
+#define HBINSTANCE_H
+
+#include <QList>
+
+/*!
+ Mocked class HbInstance (simulating hbinstance in unittests)
+ */
+class HbInstance
+{
+public:
+
+ static HbInstance *instance() {
+ return new HbInstance();
+ }
+
+ QList<HbMainWindow *> allMainWindows() const {
+ return mMainWindows;
+ }
+
+ HbInstance() {
+ HbMainWindow* window = new HbMainWindow();
+ mMainWindows.append(window);
+ }
+
+ ~HbInstance() {
+ for (int i = 0; i < mMainWindows.count(); i++) {
+ delete mMainWindows[i];
+ }
+ mMainWindows.clear();
+ }
+
+ QList<HbMainWindow *> mMainWindows;
+};
+
+#endif // HBINSTANCE_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayutils/rom/unittest_calendayutils.iby Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2006-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: Image description file for test project
+*
+*/
+
+#ifndef UNITTEST_CALENDAYUTILS_IBY
+#define UNITTEST_CALENDAYUTILS_IBY
+
+S60_APP_EXE(unittest_calendayutils)
+S60_APP_RESOURCE(unittest_calendayutils)
+
+// Application registration file.
+data=DATAZ_\private\10003a3f\import\apps\unittest_calendayutils_reg.rsc \private\10003a3f\import\apps\unittest_calendayutils_reg.rsc
+
+
+#endif // UNITTEST_CALENDAYUTILS_IBY
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayutils/unittest_calendayutils.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,144 @@
+/*
+ * 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: Test class for CalenDayContentWidget
+ *
+ */
+#include <QGraphicsItem>
+#include <QtTest/QtTest>
+
+#include "calendayutils.h"
+#include "calendaycommonheaders.h"
+
+// Test variables
+QRectF gTestWindowRect = QRectF(0, 0, 10, 20);
+Qt::Orientation gTestOrientation = Qt::Horizontal;
+
+class TestCalenDayUtils : public QObject
+{
+Q_OBJECT
+
+public:
+ TestCalenDayUtils();
+ virtual ~TestCalenDayUtils();
+
+private slots:
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+ void cleanup();
+
+ void testConstructors();
+ void testHorizontalSwipe();
+ void testOrientation();
+
+private:
+ CalenDayUtils *mUtils;
+};
+
+/*!
+ Constructor
+ */
+TestCalenDayUtils::TestCalenDayUtils() :
+ mUtils(NULL)
+{
+
+}
+
+/*!
+ Destructor
+ */
+TestCalenDayUtils::~TestCalenDayUtils()
+{
+
+}
+
+/*!
+ Called before testcase
+ */
+void TestCalenDayUtils::initTestCase()
+{
+}
+
+/*!
+ Called after testcase
+ */
+void TestCalenDayUtils::cleanupTestCase()
+{
+
+}
+
+/*!
+ Called before every function
+ */
+void TestCalenDayUtils::init()
+{
+}
+
+/*!
+ Called after everyfunction
+ */
+void TestCalenDayUtils::cleanup()
+{
+}
+
+/*!
+ Test function for constructors
+ 1. Test if content widget is not initialized
+ 2. Test if content widget is correcty created
+ */
+void TestCalenDayUtils::testConstructors()
+{
+ //1)
+ CalenDayUtils *testUtils = 0;
+ QVERIFY(!testUtils);
+
+ //2)
+ testUtils = CalenDayUtils::instance();
+ QVERIFY(testUtils);
+}
+
+/*!
+ Test function for checking if swipe is horizontal or not
+ 1)test Horizontal swipe
+ 2)test no horizontal swipe
+ */
+void TestCalenDayUtils::testHorizontalSwipe()
+{
+ //1)
+ QCOMPARE(CalenDayUtils::instance()->isHorizontalSwipe(KCalenSwipeAngle-5),
+ true);
+
+ //2)
+ QCOMPARE(CalenDayUtils::instance()->isHorizontalSwipe(KCalenSwipeAngle+5),
+ false);
+}
+
+/*!
+ Test function for getting main window's orientation
+ 1)test if horizontal orientation is returned
+ 2)test if vertical orientation is returned
+ */
+void TestCalenDayUtils::testOrientation()
+{
+ //1)
+ gTestOrientation = Qt::Horizontal;
+ QCOMPARE(CalenDayUtils::instance()->orientation(), Qt::Horizontal);
+
+ //2)
+ gTestOrientation = Qt::Vertical;
+ QCOMPARE(CalenDayUtils::instance()->orientation(), Qt::Vertical);
+}
+
+QTEST_MAIN(TestCalenDayUtils);
+#include "unittest_calendayutils.moc"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayutils/unittest_calendayutils.pro Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,58 @@
+#
+# 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: calendaycontentwidget test project file
+#
+
+TEMPLATE = app
+TARGET = unittest_calendayutils
+
+MOC_DIR = moc
+
+CONFIG += qtestlib
+CONFIG += symbian_test
+CONFIG += hb
+
+INCLUDEPATH += . \
+ ../../../inc/ \
+ ./../../../../inc/ \
+ ./../../../../../inc/
+
+DEPENDPATH += . \
+ ../../../inc/ \
+ ../../../src/ \
+ ./../../../../inc/ \
+ ./../../../../../inc/
+
+# Input
+HEADERS += calendayutils.h \
+ calendaycommonheaders.h
+
+
+SOURCES += unittest_calendayutils.cpp \
+ calendayutils.cpp
+
+symbian : {
+ TARGET.CAPABILITY = CAP_APPLICATION
+ MMP_RULES += "USERINCLUDE ."
+
+ BLD_INF_RULES.prj_testexports += \
+ "./rom/unittest_calendayutils.iby CORE_APP_LAYER_IBY_EXPORT_PATH(unittest_calendayutils.iby)"
+
+ INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+
+ LIBS += -lagendainterface \
+ -lcalencommonutils
+}
+
+# End of file --Don't remove this.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayview/CalenUid.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,45 @@
+/*
+* Copyright (c) 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: UIDS used by the S60 Calendar
+*
+*/
+
+
+#ifndef CALENUID_H
+#define CALENUID_H
+
+// UID of the S60 Calendar application
+const TUid KUidCalendar = { 0x10005901 };
+
+// UIDS of the S60 Calendar native views
+const TInt KCalenMonthViewUidValue = 0x00000000 ;
+const TInt KCalenAgendaViewUidValue = 0x00000002;
+const TInt KCalenEventViewUidValue = 0x00000003;
+const TInt KCalenLandscapeDayViewUidValue = 0x00000004;
+const TInt KCalenTodoEditorViewUidValue = 0x00000005;
+const TInt KCalenSettingsViewUidValue = 0x00000006;
+
+
+const TUid KUidCalenMonthView = { KCalenMonthViewUidValue };
+const TUid KUidCalenAgendaView = { KCalenAgendaViewUidValue };
+const TUid KCalenTodoEditorView = { KCalenTodoEditorViewUidValue };
+const TUid KUidCalenEventView = { KCalenEventViewUidValue };
+const TUid KUidCalenLandscapeDayView = { KCalenLandscapeDayViewUidValue };
+const TUid KUidCalenSettingsView = { KCalenSettingsViewUidValue };
+
+const TUid KCalenChineseImplUid = {0x2002EA3D};
+
+#endif // CALENUID_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayview/CalendarPrivateCRKeys.h Tue Jul 06 14:14:56 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: The file contains the uid of keys used by application.
+*
+*
+*/
+
+#ifndef CALENDARPRIVATECRKEYS_H
+#define CALENDARPRIVATECRKEYS_H
+
+#include <calendardomaincrkeys.h>
+
+/**
+* Defines whether week number must be shown in month view of the calendar.
+* Default value: 0
+**/
+const long int KCalendarShowWeekNum = 0x00000000;
+
+/**
+* Defines whether regional information must be shown in the Calendar.
+* Default value: 1
+*/
+const long int KCalendarShowRegionalInfo = 0x00000002;
+
+#endif // CALENDARPRIVATECRKEYS_H
+
+// End of file --Don't remove this.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayview/calencontext.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,59 @@
+/*
+ * 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 context, info on what's currently focused
+ *
+ */
+
+#ifndef CALENCONTEXT_H
+#define CALENCONTEXT_H
+#include <QDateTime>
+
+// FORWARD DECLARATIONS
+class TCalenInstanceId;
+class QDateTime;
+
+// INCLUDES
+
+// CLASS DEFINITIONS
+/**
+ * The controller handles events from the rest of Calendar and delegates
+ * them to the appropriate place (i.e. the action ui classes).
+ */
+class MCalenContext
+ {
+public:
+ QDateTime focusDateAndTime()
+ {
+ return QDateTime(QDate(2000, 10, 10));
+ }
+
+ void setFocusDate(const QDateTime& focusDateTime)
+ {
+ Q_UNUSED(focusDateTime);
+ }
+
+ void setFocusDateAndTime(const QDateTime& focusDateTime)
+ {
+ Q_UNUSED(focusDateTime);
+ }
+
+ QDateTime defaultCalTimeForViewsL()
+ {
+ return QDateTime(QDate(2000, 10, 10));
+ }
+
+ };
+
+#endif // CALENCONTEXT_H
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayview/calendateutils.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,188 @@
+/*
+ * 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 CalenDateUtils
+ {
+public:
+ static bool onSameDay(const QDateTime& x, const QDateTime& y)
+ {
+ Q_UNUSED(x);Q_UNUSED(y);
+ return false;
+ }
+ static bool onSameMonth(const QDateTime& x, const QDateTime& y)
+ {
+ Q_UNUSED(x);Q_UNUSED(y);
+ return false;
+ }
+ static QDateTime beginningOfDay(const QDateTime& startTime)
+ {
+ Q_UNUSED(startTime);
+ return QDateTime();
+ }
+ static QDateTime displayTimeOnDay(const QDateTime& startTime,
+ const QDateTime& day)
+ {
+ Q_UNUSED(startTime);Q_UNUSED(day);
+ return QDateTime();
+ }
+
+ static bool timeRangesIntersect(const QDateTime& xStart,
+ const QDateTime& xEnd, const QDateTime& yStart,
+ const QDateTime& yEnd)
+ {
+ Q_UNUSED(xStart);Q_UNUSED(xEnd);Q_UNUSED(yStart);Q_UNUSED(yEnd);
+ return false;
+ }
+
+ /**
+ * 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)
+ {
+ Q_UNUSED(time);
+ return false;
+ }
+
+ /**
+ * 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)
+ {
+ Q_UNUSED(time);
+ return QDateTime();
+ }
+
+ /**
+ * Return maximum allowed time. (31.
+ */
+ static QDateTime maxTime()
+ {
+ return QDateTime();
+ }
+
+ /**
+ * Return minimum allowed time.
+ */
+ static QDateTime minTime()
+ {
+ return QDateTime();
+ }
+
+ /**
+ * 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)
+ {
+ Q_UNUSED(dateTime);
+ return 0;
+ }
+
+ /**
+ * 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)
+ {
+ Q_UNUSED(dateTime);
+ return QDateTime();
+ }
+
+ /**
+ * Round QDateTimeIntervalMinutes to previous full hour, e.g. RoundToPreviousHour( 130 min ) = 120 min
+ */
+ static int roundToPreviousHour(const int& minutes)
+ {
+ Q_UNUSED(minutes);
+ return 0;
+ }
+
+ /**
+ * @return current time.
+ */
+ static QDateTime now()
+ {
+ return QDateTime();
+ }
+
+ /**
+ * @return today with time component set to 00:00.
+ */
+ static QDateTime today()
+ {
+ return QDateTime();
+ }
+
+ /**
+ * @return ETrue if given aTime is on today, EFalse otherwise
+ */
+ static bool isOnToday(const QDateTime& time)
+ {
+ Q_UNUSED(time);
+ return false;
+ }
+
+ /*
+ * 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)
+ {
+ Q_UNUSED(date);
+ return QDateTime();
+ }
+
+ static QDateTime futureOf(const QDateTime& dateTime, int numOfDays)
+ {
+ Q_UNUSED(dateTime);Q_UNUSED(numOfDays);
+ return QDateTime();
+ }
+ };
+
+#endif // __CALENDATEUTILS_H__
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayview/calendaycontentscrollarea.h Tue Jul 06 14:14:56 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: CalenDayContentScrollArea class definition.
+ *
+ */
+
+#ifndef CALENDAYCONTENTSCROLLAREA_H_
+#define CALENDAYCONTENTSCROLLAREA_H_
+
+// System includes
+#include <hbscrollarea.h>
+
+#include "calendaycommonheaders.h"
+
+// Class declaration
+class CalenDayContentScrollArea : public HbScrollArea
+ {
+Q_OBJECT
+
+public:
+ CalenDayContentScrollArea(QGraphicsItem *parent = 0)
+ {
+ Q_UNUSED(parent);
+ }
+ virtual ~CalenDayContentScrollArea()
+ {
+ }
+
+ signals:
+ void scrollAreaMoveStarted(CalenScrollDirection scrollTo);
+ void scrollAreaMoveFinished(CalenScrollDirection scrollTo);
+
+public slots:
+ void scrollToMiddleWidget()
+ {
+ }
+
+protected:
+ bool scrollByAmount(const QPointF &delta)
+ {
+ Q_UNUSED(delta);
+ return false;
+ }
+
+ void gestureEvent(QGestureEvent *event)
+ {
+ Q_UNUSED(event);
+ }
+ bool eventFilter(QObject *obj, QEvent *event)
+ {
+ Q_UNUSED(obj);Q_UNUSED(event);
+ return false;
+ }
+ bool event(QEvent *e)
+ {
+ Q_UNUSED(e);
+ return false;
+ }
+ };
+
+#endif /* CALENDAYCONTENTSCROLLAREA_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayview/calendaycontentwidget.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,86 @@
+/*
+ * 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: CalenDayContentWidget class definition.
+ *
+ */
+
+#ifndef CALENDAYCONTENTWIDGET_H_
+#define CALENDAYCONTENTWIDGET_H_
+
+// System includes
+#include <hbwidget.h>
+
+// User includes
+#include "calendaycommonheaders.h"
+
+// Forward declarations
+class QGraphicsLinearLayout;
+class CalenDayModelManager;
+
+class CalenDayContentWidget : public HbWidget
+ {
+Q_OBJECT
+
+public:
+ /*!
+ \enum CalenWidgetPosition
+ \brief Enumeration identifies widget position if queue.
+ */
+ enum CalenWidgetPosition
+ {
+ ECalenLastWidget = 0, ECalenFirstWidget
+ };
+
+public:
+ CalenDayContentWidget(CalenDayModelManager &modelManager,
+ QGraphicsItem *parent = 0)
+ {
+ Q_UNUSED(parent);
+ Q_UNUSED(modelManager);
+ }
+ ~CalenDayContentWidget()
+ {
+ }
+
+ void add(HbWidget* item, CalenWidgetPosition where = ECalenLastWidget)
+ {
+ Q_UNUSED(item);
+ Q_UNUSED(where);
+ }
+ HbWidget* take(CalenWidgetPosition which)
+ {
+ Q_UNUSED(which);
+ return 0;
+ }
+ void remove(CalenWidgetPosition which)
+ {
+ Q_UNUSED(which);
+ }
+
+ signals:
+ void widgetsRelayoutFinished(CalenScrollDirection scrollTo);
+ void scrollPositionChanged(const QPointF &newPos);
+
+public slots:
+ void relayoutWidgets(CalenScrollDirection scrollTo)
+ {
+ Q_UNUSED(scrollTo);
+ }
+ void widgetScrolled(const QPointF &newPos)
+ {
+ Q_UNUSED(newPos);
+ }
+ };
+
+#endif /* CALENDAYCONTENTWIDGET_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayview/calendayhourscrollarea.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,63 @@
+/*
+ * 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: CalenDayHourScrollArea class definition.
+ *
+ */
+
+#ifndef CALENDAYHOURSCROLLAREA_H_
+#define CALENDAYHOURSCROLLAREA_H_
+
+// System includes
+#include <hbscrollarea.h>
+#include <QDateTime>
+
+// User includes
+#include "calendaycommonheaders.h"
+
+// Class declaration
+class CalenDayHourScrollArea : public HbScrollArea
+ {
+Q_OBJECT
+
+public:
+ CalenDayHourScrollArea(QGraphicsItem *parent = 0)
+ {
+ Q_UNUSED(parent);
+ }
+ virtual ~CalenDayHourScrollArea()
+ {
+ }
+ void setDateTime(const QDateTime &dateTime)
+ {
+ Q_UNUSED(dateTime);
+ }
+ QDateTime dateTime()
+ {
+ return QDateTime();
+ }
+
+ void scrollToHour(int hour)
+ {
+ Q_UNUSED(hour);
+ }
+
+public slots:
+ void scrollVertically(const QPointF &newPosition)
+ {
+ Q_UNUSED(newPosition);
+ }
+
+ };
+
+#endif /* CALENDAYHOURSCROLLAREA_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayview/calendaymodelmanager.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,120 @@
+/*
+ * 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: Model manager holds models for three day views
+ *
+ */
+#ifndef CALENDAYMODELMANAGER_H
+#define CALENDAYMODELMANAGER_H
+
+#include <QObject>
+#include <QMap>
+#include <QDateTime>
+
+#include "calendaycommonheaders.h"
+#include <QAbstractListModel>
+class QAbstractItemModel;
+class MCalenServices;
+class CalenDayModel;
+
+/*!
+ Test class TestAbstractListModel
+ */
+class TestAbstractListModel : public QAbstractListModel
+{
+ Q_OBJECT
+
+public:
+ TestAbstractListModel() : QAbstractListModel() {
+ }
+
+ ~TestAbstractListModel() {
+ }
+
+ int rowCount(const QModelIndex &parent) const {
+ Q_UNUSED(parent);
+ return 0;
+ }
+
+ QVariant data(const QModelIndex &index, int role) const {
+ Q_UNUSED(index);
+ Q_UNUSED(role);
+ return QVariant(0);
+ }
+};
+
+class CalenDayModelManager : public QObject
+ {
+Q_OBJECT
+
+public:
+ enum ModelDay
+ {
+ PreviousDay = 0, CurrentDay = 1, NextDay = 2, NumberOfDays
+ };
+
+public:
+ CalenDayModelManager(MCalenServices &services, bool emptyModels, QObject *parent = 0) :
+ mServices(services)
+ {
+ Q_UNUSED(emptyModels);
+ Q_UNUSED(parent);
+ }
+ ~CalenDayModelManager()
+ {
+ }
+
+ QAbstractItemModel &getModel(CalenDayModelManager::ModelDay day)
+ {
+ Q_UNUSED(day);
+ model = new TestAbstractListModel();
+ return *model;
+ }
+
+ void refreshAllModels()
+ {
+ }
+ void refreshSingleModel(CalenDayModelManager::ModelDay day)
+ {
+ Q_UNUSED(day);
+ }
+ MCalenServices &getServices()
+ {
+ return mServices;
+ }
+
+public slots:
+ void viewsScrollingFinished(CalenScrollDirection scrollTo)
+ {
+ Q_UNUSED(scrollTo);
+ }
+
+private:
+ void createAllModels()
+ {
+ }
+ void moveBackward()
+ {
+ }
+ void moveForeward()
+ {
+ }
+
+private:
+ QMap<ModelDay, CalenDayModel*> mModels;
+ MCalenServices &mServices;
+ QDateTime mCurrentDayTime;
+ TestAbstractListModel* model;
+ };
+
+#endif//CALENDAYMODELMANAGER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayview/calendayutils.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,70 @@
+/*
+ * 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: CalenDayUtils utility class header.
+ *
+ */
+
+#ifndef CALENDAYUTILS_H_
+#define CALENDAYUTILS_H_
+
+class CalenDayUtils
+ {
+public:
+ static CalenDayUtils *instance()
+ {
+ }
+ ~CalenDayUtils()
+ {
+ }
+
+ qreal screenWidth()
+ {
+ return 0;
+ }
+ qreal hourElementWidth()
+ {
+ return 0;
+ }
+ qreal hourElementHeight()
+ {
+ return 0;
+ }
+ qreal contentWidth()
+ {
+ return 0;
+ }
+
+ Qt::Orientation orientation()
+ {
+ return 1;
+ }
+
+ HbMainWindow* mainWindow()
+ {
+ return 0;
+ }
+
+ bool isHorizontalSwipe(qreal angle)
+ {
+ Q_UNUSED(angle);
+ return false;
+ }
+
+protected:
+ CalenDayUtils()
+ {
+ }
+ };
+
+#endif /* CALENDAYUTILS_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayview/calendocloader.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,52 @@
+/*
+* 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: Class declaration for CalenDocLoader.
+ *
+*/
+
+
+#ifndef CALENDOCLOADER_H
+#define CALENDOCLOADER_H
+
+// system includes
+#include <hbdocumentloader.h>
+
+// forward declaration
+class CCalenController;
+
+// Class declaration
+/**
+ * @class CalenDocLoader
+ * @brief The loader class for application
+ * Inherits from HbDocumentLoader.
+ */
+class CalenDocLoader : public HbDocumentLoader
+{
+public:
+
+ CalenDocLoader(CCalenController &controller) : mController(controller){}
+ ~CalenDocLoader(){}
+
+protected:
+
+ virtual QObject *createObject(const QString &type, const QString &name){Q_UNUSED(type); Q_UNUSED(name); return 0;}
+
+private:
+
+ CCalenController &mController;
+};
+
+#endif // CALENDOCLOADER_H
+
+// End of file --Don't remove this.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayview/calennativeview.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,92 @@
+/*
+* 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: This class is the base class of all Calendar views.
+ *
+*/
+
+
+#ifndef CALENNATIVEVIEW_H
+#define CALENNATIVEVIEW_H
+
+#ifdef CALENVIEWS_DLL
+#define CALENNATIVEVIEW_EXPORT Q_DECL_EXPORT
+#else
+#define CALENNATIVEVIEW_EXPORT Q_DECL_IMPORT
+#endif
+
+// System includes
+#include <hblabel.h>
+#include <hblistwidget.h>
+#include <hbabstractviewitem.h>
+
+// User includes
+#include "calennotificationhandler.h" // MCalenNotificationHandler
+#include "calenview.h"
+
+const int WORKAROUND_TO_LIMIT_MAX_SPEED=8000;
+
+class MCalenServices;
+class HbDateTimePicker;
+
+class CalenNativeView : public CalenView,
+ public MCalenNotificationHandler
+ {
+ Q_OBJECT
+
+ public: // Constructors and destructor
+ /**
+ * Destructor.
+ */
+ virtual ~CalenNativeView(){}
+ virtual void populationComplete(){}
+ TBool pluginEnabled(){return EFalse;}
+ virtual void refreshViewOnGoToDate(){}
+ QString *pluginText() {QString* str = new QString("string"); return str;}
+ /**
+ * captureScreenshot captures the current screenshot
+ */
+ CALENNATIVEVIEW_EXPORT void captureScreenshot(bool captureScreenShot = false) {Q_UNUSED(captureScreenShot);}
+
+ protected: // New functions
+ CalenNativeView( MCalenServices& services ) : mServices(services){}
+
+ void HandleNotification( const TCalenNotification notification ){Q_UNUSED(notification);}
+ virtual void onLocaleChanged(int reason) {Q_UNUSED(reason);}
+ virtual void onContextChanged() {}
+
+ protected slots:
+
+ void goToDate(){}
+ void goToSelectedDate(){}
+ void deleteBeforeDate(){}
+ void deleteAllEntries(){}
+ void launchSettingsView(){}
+ virtual void changeOrientation(Qt::Orientation orientation){Q_UNUSED(orientation);}
+ /**
+ * saveActivity saves the current view as an activity
+ *
+ */
+ void saveActivity(){}
+
+ protected:
+
+ MCalenServices &mServices; // not owned.
+ int mActivityId; // Recent Activity ID, currently it holdes wither of ECalenMonthView or ECalenAgendaView
+ QVariantHash mScreenShotMetadata; // Screenshot
+
+ };
+
+#endif // CALENNATIVEVIEW_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayview/calennotificationhandler.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,83 @@
+/*
+* 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: Notification interface for S60 Calendar customizations
+*
+*/
+
+#ifndef CALENNOTIFICATIONHANDLER_H
+#define CALENNOTIFICATIONHANDLER_H
+
+enum TCalenNotification
+ {
+ ECalenNotifyAll = 0, // Receive all notifications
+ ECalenNotifyEntryInstanceViewCreated,
+ ECalenNotifyEntryInstanceViewCreationFailed,
+ ECalenNotifyContextChanged,
+ ECalenNotifyExternalDatabaseChanged,
+ ECalenNotifyEntrySaved,
+ ECalenNotifyEntryDeleted,
+ ECalenNotifyMultipleEntriesDeleted,
+ ECalenNotifyInstanceSaved,
+ ECalenNotifyInstanceDeleted,
+ ECalenNotifySystemTimeChanged,
+ ECalenNotifySystemLocaleChanged,
+ ECalenNotifySystemLanguageChanged,
+ ECalenNotifyLostAlarms,
+ ECalenNotifyCmdLineLaunch,
+ ECalenNotifyAvkonViewSwitchLaunch,
+ ECalenNotifySettingsChanged,
+ ECalenNotifyViewCreationStarted,
+ ECalenNotifyDialogClosed,
+ ECalenNotifyCommandFailed,
+ ECalenNotifyDeleteFailed,
+ ECalenNotifyEntryClosed,
+ ECalenNotifySettingsClosed,
+ ECalenNotifySettingsCRepKeyChanged,
+ ECalenNotifyPluginEnabledDisabled,
+ ECalenNotifyEComRegistryChanged,
+ ECalenNotifyResourceChanged,
+ ECalenNotifyViewPopulationComplete,
+ ECalenNotifyAppForegrounded,
+ ECalenNotifyAppBackgrounded,
+ ECalenNotifyMarkedEntryDeleted,
+ ECalenNotifyCheckPluginUnloading,
+ ECalenNotifyEntrySent,
+ ECalenNotifyCancelDelete,
+ ECalenNotifyDayViewClosed,
+ ECalenNotifyMapClosed,
+ ECalenNotifyCancelMapLaunch,
+ ECalenNotifyMissedAlarmViewClosed,
+ ECalenNotifyMissedEventViewClosed,
+ ECalenNotifyEditorClosedFromViewer,
+ /*ECalenNotifyUserDefined1,
+ ECalenNotifyUserDefined2,*/
+ ECalenNotifyThaiPluginEnabled,
+ ECalenNotifyThaiPluginDisabled,
+ ECalenNotifyUserDefined3,
+ ECalenNotifyUserDefined4,
+ ECalenNotifyLast
+ };
+
+/**
+ * Class for handling calendar notifications.
+ */
+class MCalenNotificationHandler
+ {
+ public: // New functions
+ virtual void HandleNotification( const TCalenNotification aNotification ) = 0;
+ };
+
+#endif // CALENNOTIFICATIONHANDLER_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayview/calenpluginlabel.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,43 @@
+/*
+* 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:
+ Q_DECL_EXPORT CalenPluginLabel(MCalenServices &services, QGraphicsItem *parent = 0) : mServices(services){Q_UNUSED(parent);}
+ Q_DECL_EXPORT ~CalenPluginLabel(){}
+
+protected:
+ void gestureEvent(QGestureEvent *event){Q_UNUSED(event);}
+
+
+private:
+ MCalenServices &mServices;
+};
+
+#endif /* CALENPLUGINLABEL_H */
+
+// End of file --Don't remove this.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayview/calenservices.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,39 @@
+/*
+ * calenservices.h
+ *
+ * Created on: Jun 21, 2010
+ * Author: zabinpio
+ */
+
+#ifndef CALENSERVICES_H_
+#define CALENSERVICES_H_
+
+#include "calencontext.h"
+
+/*!
+ Mocked class MCalenServices
+ */
+class AgendaUtil;
+
+class MCalenServices
+{
+public:
+ MCalenServices() {
+
+ }
+
+ MCalenContext& Context(){
+ return mContext;
+ }
+
+ int getFirstView(){ return 0;}
+ TBool IssueCommandL( TInt aCommand ){ Q_UNUSED(aCommand); return EFalse;}
+ AgendaUtil* agendaInterface() {return 0;}
+
+ ~MCalenServices() {
+
+ }
+
+ MCalenContext mContext;
+};
+#endif /* CALENSERVICES_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayview/calenview.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,49 @@
+/*
+* 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: Baseclass for creating customised views
+ *
+*/
+
+#ifndef CALENVIEW_H
+#define CALENVIEW_H
+
+// INCLUDES
+#include <hbview.h>
+
+
+/**
+ * CCalenView is the base class for
+ * creating customised calendar views.
+ */
+class CalenView : public HbView
+ {
+ public: // Enumerations
+ enum TNextPopulationStep
+ {
+ EKeepGoing,
+ EWaitForInstanceView,
+ EWaitForEntryView,
+ EDone
+ };
+
+ public: // New functions
+
+ virtual TNextPopulationStep ActiveStepL(){return EDone;}
+ virtual void CancelPopulation(){}
+
+ };
+
+#endif // CALENVIEW_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayview/hb_calencommands.hrh Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,102 @@
+/*
+* 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 controller commands
+*
+*/
+
+
+#ifndef HB_CALENCOMMANDS_HRH
+#define HB_CALENCOMMANDS_HRH
+
+
+// 1000 commands for each action ui.
+// We start from 10000 because otherwise we might overlap other command ranges,
+// e.g. Avkon == 3000.
+
+enum TCalenCommandBase
+ {
+ ECalenViewCommandBase = 20000,
+ ECalenEditCommandBase = 20100,
+ ECalenDeleteCommandBase = 20200,
+ ECalenSettingsCommandBase = 20300,
+ ECalenMapCommandBase = 20400,
+ ECalenMissedAlarmCommandBase = 20500
+ };
+
+enum TCalenCommandId
+ {
+ ECalenMonthView = ECalenViewCommandBase,
+ ECalenWeekView,
+ ECalenAgendaView,
+ ECalenDayView,
+ ECalenTodoEditor,
+ ECalenTodoEditorDone,
+ ECalenForwardsToDayView,
+ ECalenNextView,
+ ECalenPrevView,
+ ECalenSwitchView,
+ ECalenShowToolbar,
+ ECalenHideToolbar,
+ ECalenUpdateToolbar,
+ ECalenHidePreview,
+ ECalenShowPreview,
+ ECalenStartActiveStep,
+ ECalenGotoToday,
+ ECalenGotoDate,
+ ECalenEventView,
+ ECalenCmdPromptThenEdit,
+ ECalenFasterAppExit,
+ ECalenShowNextDay,
+ ECalenShowPrevDay,
+ ECalenNewMeeting = ECalenEditCommandBase,
+ ECalenNewAnniv,
+ ECalenNewDayNote,
+ ECalenNewReminder,
+ ECalenNewMeetingRequest,
+ ECalenNewEntry,
+ ECalenEditCurrentEntry,
+ ECalenEditSeries,
+ ECalenEditOccurrence,
+ ECalenEditEntryFromViewer,
+ ECalenViewCurrentEntry,
+ ECalenNotifyFocusChange,
+ ECalenCompleteTodo,
+ ECalenRestoreTodo,
+ ECalenSend,
+ ECalenDeleteCurrentEntry = ECalenDeleteCommandBase,
+ ECalenDeleteEntryWithoutQuery,
+ ECalenDeleteSeries,
+ ECalenDeleteCurrentOccurrence,
+ ECalenDeleteAllEntries,
+ ECalenDeleteEntriesBeforeDate,
+ ECalenCancelDelete,
+ ECalenDeleteEntryFromViewer,
+ ECalenShowSettings = ECalenSettingsCommandBase,
+ ECalenGetLocation = ECalenMapCommandBase,
+ ECalenShowLocation,
+ ECalenGetLocationAndSave,
+ ECalenMissedAlarmsView = ECalenMissedAlarmCommandBase,
+ ECalenMissedEventView,
+ ECalenCmdClear,
+ ECalenCmdClearAll,
+ ECalenCmdGotoCalendar,
+ ECalenMissedAlarmsViewFromIdle,
+ ECalenMissedEventViewFromIdle,
+ ECalenLastCommand,
+ ECalenRegionalPluginTapEvent
+ };
+
+#endif // HB_CALENCOMMANDS_HRH
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayview/hbeffect.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,183 @@
+/****************************************************************************
+ **
+ ** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
+ ** All rights reserved.
+ ** Contact: Nokia Corporation (developer.feedback@nokia.com)
+ **
+ ** This file is part of the HbCore module of the UI Extensions for Mobile.
+ **
+ ** GNU Lesser General Public License Usage
+ ** This file may be used under the terms of the GNU Lesser General Public
+ ** License version 2.1 as published by the Free Software Foundation and
+ ** appearing in the file LICENSE.LGPL included in the packaging of this file.
+ ** Please review the following information to ensure the GNU Lesser General
+ ** Public License version 2.1 requirements will be met:
+ ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+ **
+ ** In addition, as a special exception, Nokia gives you certain additional
+ ** rights. These rights are described in the Nokia Qt LGPL Exception
+ ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+ **
+ ** If you have questions regarding the use of this file, please contact
+ ** Nokia at developer.feedback@nokia.com.
+ **
+ ****************************************************************************/
+
+#ifndef HBEFFECT_H
+#define HBEFFECT_H
+
+#include <hbglobal.h>
+#include <hbnamespace.h>
+#include <QRectF>
+#include <QStringList>
+
+QT_BEGIN_NAMESPACE
+class QGraphicsItem;
+class QVariant;
+QT_END_NAMESPACE
+
+class HbEffect
+ {
+
+public:
+
+ struct EffectStatus
+ {
+ QGraphicsItem *item;
+ QString effectEvent;
+ Hb::EffectEvent reason;
+ QVariant userData;
+ };
+
+ static bool start(QGraphicsItem *item, const QString &itemType,
+ const QString &effectEvent, QObject *receiver = 0,
+ const char *member = 0, const QVariant &userData = QVariant(),
+ const QRectF &extRect = QRectF())
+ {
+ Q_UNUSED(item);
+ Q_UNUSED(itemType);
+ Q_UNUSED(effectEvent);
+ Q_UNUSED(receiver);
+ Q_UNUSED(member);
+ Q_UNUSED(userData);
+ Q_UNUSED(extRect);
+ return false;
+ }
+
+ static bool start(QGraphicsItem *item, const QString &effectEvent,
+ QObject *receiver = 0, const char *member = 0,
+ const QVariant &userData = QVariant(), const QRectF &extRect =
+ QRectF())
+ {
+ Q_UNUSED(item);
+ Q_UNUSED(effectEvent);
+ Q_UNUSED(receiver);
+ Q_UNUSED(member);
+ Q_UNUSED(userData);
+ Q_UNUSED(extRect);
+ return false;
+ }
+
+ static bool start(const QList<QGraphicsItem *> &items,
+ const QString &itemType, const QString &effectEvent,
+ QObject *receiver = 0, const char *member = 0,
+ const QVariant &userData = QVariant())
+ {
+ Q_UNUSED(items);
+ Q_UNUSED(itemType);
+ Q_UNUSED(effectEvent);
+ Q_UNUSED(receiver);
+ Q_UNUSED(member);
+ Q_UNUSED(userData);
+ return false;
+ }
+
+ static bool effectRunning(QGraphicsItem *item, const QString &effectEvent =
+ QString())
+ {
+ Q_UNUSED(item);
+ Q_UNUSED(effectEvent);
+ return false;
+ }
+
+ static bool cancel(QGraphicsItem *item, const QString &effectEvent =
+ QString(), bool clearEffect = false, bool sendCallback = true,
+ bool itemIsValid = true)
+ {
+ Q_UNUSED(item);
+ Q_UNUSED(effectEvent);
+ Q_UNUSED(clearEffect);
+ Q_UNUSED(sendCallback);
+ Q_UNUSED(itemIsValid);
+ return false;
+ }
+
+ static bool add(const QString &itemType, const QString &filePath,
+ const QString &effectEvent = QString())
+ {
+ Q_UNUSED(itemType);
+ Q_UNUSED(filePath);
+ Q_UNUSED(effectEvent);
+ return false;
+ }
+ static bool add(const QStringList &itemType, const QStringList &filePath,
+ const QStringList &effectEvent = QStringList())
+ {
+ Q_UNUSED(itemType);
+ Q_UNUSED(filePath);
+ Q_UNUSED(effectEvent);
+ return false;
+ }
+
+ static bool add(QGraphicsItem *item, const QString &filePath,
+ const QString &effectEvent = QString())
+ {
+ Q_UNUSED(item);
+ Q_UNUSED(filePath);
+ Q_UNUSED(effectEvent);
+ return false;
+ }
+ static bool add(QGraphicsItem *item, const QStringList &filePath,
+ const QStringList &effectEvent = QStringList())
+ {
+ Q_UNUSED(item);
+ Q_UNUSED(filePath);
+ Q_UNUSED(effectEvent);
+ return false;
+ }
+
+ static bool remove(const QString &itemType, const QString &filePath,
+ const QString &effectEvent = QString())
+ {
+ Q_UNUSED(itemType);
+ Q_UNUSED(filePath);
+ Q_UNUSED(effectEvent);
+ return false;
+ }
+ static bool remove(QGraphicsItem *item, const QString &filePath,
+ const QString &effectEvent = QString())
+ {
+ Q_UNUSED(item);
+ Q_UNUSED(filePath);
+ Q_UNUSED(effectEvent);
+ return false;
+ }
+ static bool remove(QGraphicsItem *item)
+ {
+ Q_UNUSED(item);
+ return false;
+ }
+
+ static void enable(QGraphicsItem *item)
+ {
+ Q_UNUSED(item);
+ }
+ static void disable(QGraphicsItem *item)
+ {
+ Q_UNUSED(item);
+ }
+ };
+
+Q_DECLARE_METATYPE(HbEffect::EffectStatus)
+
+#endif // HBEFFECT_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayview/rom/unittest_calendayview.iby Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2006-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: Image description file for test project
+*
+*/
+
+#ifndef UNITTEST_CALENDAYITEM_IBY
+#define UNITTEST_CALENDAYITEM_IBY
+
+S60_APP_EXE(unittest_calendayitem)
+S60_APP_RESOURCE(unittest_calendayitem)
+
+// Application registration file.
+data=DATAZ_\private\10003a3f\import\apps\unittest_calendayview_reg.rsc \private\10003a3f\import\apps\unittest_calendayview_reg.rsc
+
+
+#endif // UNITTEST_CALENDAYITEM_IBY
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayview/unittest_calendayview.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,129 @@
+/*
+ * 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: Test class for CalenDayContainerWidget
+ *
+ */
+#include <QtTest/QtTest>
+
+#include "calenservices.h"
+#include "calendateutils.h"
+#include "calendaymodelmanager.h"
+#include "calendayview.h"
+
+class TestCalenDayView : public QObject
+{
+Q_OBJECT
+
+public:
+ TestCalenDayView();
+ virtual ~TestCalenDayView();
+
+private slots:
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+ void cleanup();
+
+ void testConstructors();
+
+private:
+ CalenDayView *mView;
+};
+
+/*!
+ Constructor
+ */
+TestCalenDayView::TestCalenDayView() :
+ mView(NULL)
+{
+
+}
+
+/*!
+ Destructor
+ */
+TestCalenDayView::~TestCalenDayView()
+{
+
+}
+
+/*!
+ Called before testcase
+ */
+void TestCalenDayView::initTestCase()
+{
+}
+
+/*!
+ Called after testcase
+ */
+void TestCalenDayView::cleanupTestCase()
+{
+
+}
+
+/*!
+ Called before every function
+ */
+void TestCalenDayView::init()
+{
+
+}
+
+/*!
+ Called after everyfunction
+ */
+void TestCalenDayView::cleanup()
+{
+
+}
+
+void TestCalenDayView::testConstructors()
+{
+ MCalenServices services;
+ //1)
+ CalenDayView *testView = 0;
+ QVERIFY(!testView);
+
+ //2)
+ testView = new CalenDayView(services);
+ QVERIFY(testView);
+
+ delete testView;
+}
+
+int main(int argc, char ** argv)
+
+{
+
+argc++;
+
+argc++;
+
+char * argvNew[3];
+
+argvNew[0]= argv[0];
+
+argvNew[1]= const_cast<char*>("-o");
+
+argvNew[2]= const_cast<char*>("c:\\unittest\\TestCalenDayView.txt");//set place where //output chould be
+
+QApplication app(argc, argvNew);
+
+TestCalenDayView testFile;//file with class containing unit tests
+
+QTest::qExec(&testFile,argc,argvNew);
+
+}
+#include "unittest_calendayview.moc"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittest_calendayview/unittest_calendayview.pro Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,67 @@
+#
+# 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: calendaycontentwidget test project file
+#
+
+TEMPLATE = app
+TARGET = unittest_calendayview
+
+MOC_DIR = moc
+
+CONFIG += qtestlib
+CONFIG += symbian_test
+CONFIG += hb
+
+INCLUDEPATH += . \
+ ../../../inc/ \
+
+DEPENDPATH += . \
+ ../../../inc/ \
+ ../../../src/ \
+
+# Input
+HEADERS += hbeffect.h \
+ calendateutils.h \
+ calenservices.h \
+ calencontext.h \
+ calennotificationhandler.h \
+ calenview.h \
+ calennativeview.h \
+ hb_calencommands.hrh \
+ calendocloader.h \
+ calendarcrkeys.h \
+ calenuid.h \
+ calenpluginlabel.h \
+ calendaymodelmanager.h \
+ calendaycontentwidget.h \
+ calendaycontentscrollarea.h \
+ calendayhourscrollarea.h \
+ calendayutils.h \
+ calendateutils.h \
+ calendayview.h
+
+SOURCES += unittest_calendayview.cpp \
+ calendayview.cpp
+
+symbian : {
+ TARGET.CAPABILITY = CAP_APPLICATION
+ MMP_RULES += "USERINCLUDE ."
+
+ INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+
+ LIBS += -lagendainterface \
+ -lxqsettingsmanager
+}
+
+# End of file --Don't remove this.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/dayview/tsrc/unittests/unittests.pro Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,35 @@
+#
+# 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: calendayview project file for all unittests
+#
+
+TEMPLATE = subdirs
+
+SUBDIRS = unittest_calendaycontentwidget \
+ unittest_calendaystatusstrip \
+ unittest_calendayutils \
+ unittest_calendayitem \
+ unittest_calendayhourelement \
+ unittest_calendayhourscrollarea \
+ unittest_calendayeventspane \
+ unittest_calendayinfo \
+ unittest_calendaycontainer \
+ unittest_calendaymodel \
+ unittest_calendayitemview \
+ unittest_calendaymodelmanager \
+ unittest_calendayview
+
+CONFIG += symbian_test
+
+# End of file --Don't remove this.
\ No newline at end of file
--- a/calendarui/views/eabi/calenviewsu.def Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/views/eabi/calenviewsu.def Tue Jul 06 14:14:56 2010 +0300
@@ -1,204 +1,215 @@
EXPORTS
_ZN12CalenDayView12doPopulationEv @ 1 NONAME
- _ZN12CalenDayView14clearListModelEv @ 2 NONAME
- _ZN12CalenDayView18HandleNotificationE18TCalenNotification @ 3 NONAME
- _ZN12CalenDayView9docLoaderEv @ 4 NONAME
- _ZN12CalenDayView9setupViewEP14CalenDocLoader @ 5 NONAME
- _ZN12CalenDayViewC1ER14MCalenServices @ 6 NONAME
- _ZN12CalenDayViewC2ER14MCalenServices @ 7 NONAME
- _ZN12CalenDayViewD0Ev @ 8 NONAME
- _ZN12CalenDayViewD1Ev @ 9 NONAME
- _ZN12CalenDayViewD2Ev @ 10 NONAME
- _ZN14CalenMonthGrid10appendRowsEv @ 11 NONAME
- _ZN14CalenMonthGrid11downGestureEv @ 12 NONAME
- _ZN14CalenMonthGrid11prependRowsEv @ 13 NONAME
- _ZN14CalenMonthGrid11qt_metacallEN11QMetaObject4CallEiPPv @ 14 NONAME
- _ZN14CalenMonthGrid11qt_metacastEPKc @ 15 NONAME
- _ZN14CalenMonthGrid12gestureEventEP13QGestureEvent @ 16 NONAME
- _ZN14CalenMonthGrid13itemActivatedERK11QModelIndex @ 17 NONAME
- _ZN14CalenMonthGrid14setActiveDatesE5QDate @ 18 NONAME
- _ZN14CalenMonthGrid14setCurrentIdexEi @ 19 NONAME
- _ZN14CalenMonthGrid15getCurrentIndexEv @ 20 NONAME
- _ZN14CalenMonthGrid15mousePressEventEP24QGraphicsSceneMouseEvent @ 21 NONAME
- _ZN14CalenMonthGrid16staticMetaObjectE @ 22 NONAME DATA 16
- _ZN14CalenMonthGrid17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 23 NONAME
- _ZN14CalenMonthGrid17scrollingFinishedEv @ 24 NONAME
- _ZN14CalenMonthGrid18orientationChangedEN2Qt11OrientationE @ 25 NONAME
- _ZN14CalenMonthGrid19getStaticMetaObjectEv @ 26 NONAME
- _ZN14CalenMonthGrid19handleAppendingRowsER5QListI14CalenMonthDataE @ 27 NONAME
- _ZN14CalenMonthGrid19setFocusToProperDayEv @ 28 NONAME
- _ZN14CalenMonthGrid20handlePrependingRowsER5QListI14CalenMonthDataE @ 29 NONAME
- _ZN14CalenMonthGrid20updateMonthGridModelER5QListI14CalenMonthDataEib @ 30 NONAME
- _ZN14CalenMonthGrid24handlePanGestureFinishedEv @ 31 NONAME
- _ZN14CalenMonthGrid33updateMonthGridWithInActiveMonthsER5QListI14CalenMonthDataE @ 32 NONAME
- _ZN14CalenMonthGrid34updateMonthGridWithEventIndicatorsER5QListI14CalenMonthDataE @ 33 NONAME
- _ZN14CalenMonthGrid5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 34 NONAME
- _ZN14CalenMonthGrid7setViewEP14CalenMonthView @ 35 NONAME
- _ZN14CalenMonthGrid9upGestureEv @ 36 NONAME
- _ZN14CalenMonthGridC1EP13QGraphicsItem @ 37 NONAME
- _ZN14CalenMonthGridC2EP13QGraphicsItem @ 38 NONAME
- _ZN14CalenMonthGridD0Ev @ 39 NONAME
- _ZN14CalenMonthGridD1Ev @ 40 NONAME
- _ZN14CalenMonthGridD2Ev @ 41 NONAME
- _ZN14CalenMonthView10createGridEv @ 42 NONAME
- _ZN14CalenMonthView11qt_metacallEN11QMetaObject4CallEiPPv @ 43 NONAME
- _ZN14CalenMonthView11qt_metacastEPKc @ 44 NONAME
- _ZN14CalenMonthView12createEditorEv @ 45 NONAME
- _ZN14CalenMonthView12doPopulationEv @ 46 NONAME
- _ZN14CalenMonthView12getActiveDayEv @ 47 NONAME
- _ZN14CalenMonthView12setActiveDayE9QDateTime @ 48 NONAME
- _ZN14CalenMonthView13doLazyLoadingEv @ 49 NONAME
- _ZN14CalenMonthView13getCurrentDayEv @ 50 NONAME
- _ZN14CalenMonthView13launchDayViewEv @ 51 NONAME
- _ZN14CalenMonthView13monthDataListEv @ 52 NONAME
- _ZN14CalenMonthView14addWeekNumbersEv @ 53 NONAME
- _ZN14CalenMonthView14firstDayOfGridEv @ 54 NONAME
- _ZN14CalenMonthView14rowsInFutMonthEv @ 55 NONAME
- _ZN14CalenMonthView14setDateToLabelEv @ 56 NONAME
- _ZN14CalenMonthView14updateDayLabelEv @ 57 NONAME
- _ZN14CalenMonthView15dateFromContextERK13MCalenContext @ 58 NONAME
- _ZN14CalenMonthView15getInstanceListER5QListI5QDateE9QDateTimeS4_ @ 59 NONAME
- _ZN14CalenMonthView15onLocaleChangedEi @ 60 NONAME
- _ZN14CalenMonthView15rowsInPrevMonthEv @ 61 NONAME
- _ZN14CalenMonthView16getCurrGridIndexEv @ 62 NONAME
- _ZN14CalenMonthView16onContextChangedEv @ 63 NONAME
- _ZN14CalenMonthView16setCurrGridIndexEi @ 64 NONAME
- _ZN14CalenMonthView16staticMetaObjectE @ 65 NONAME DATA 16
- _ZN14CalenMonthView17changeOrientationEN2Qt11OrientationE @ 66 NONAME
- _ZN14CalenMonthView17populateNextMonthEv @ 67 NONAME
- _ZN14CalenMonthView17populatePrevMonthEv @ 68 NONAME
- _ZN14CalenMonthView17removeWeekNumbersEv @ 69 NONAME
- _ZN14CalenMonthView18addBackgroundFrameEv @ 70 NONAME
- _ZN14CalenMonthView18completePopulationEv @ 71 NONAME
- _ZN14CalenMonthView19getStaticMetaObjectEv @ 72 NONAME
- _ZN14CalenMonthView19populatePreviewPaneER9QDateTime @ 73 NONAME
- _ZN14CalenMonthView20prepareForPopulationEv @ 74 NONAME
- _ZN14CalenMonthView21refreshViewOnGoToDateEv @ 75 NONAME
- _ZN14CalenMonthView22addRemoveActionsInMenuEv @ 76 NONAME
- _ZN14CalenMonthView22setContextForActiveDayEi @ 77 NONAME
- _ZN14CalenMonthView22updateWeekNumGridModelEv @ 78 NONAME
- _ZN14CalenMonthView23handleChangeOrientationEv @ 79 NONAME
- _ZN14CalenMonthView23handleGridItemActivatedEv @ 80 NONAME
- _ZN14CalenMonthView24handlePreviewPaneGestureEb @ 81 NONAME
- _ZN14CalenMonthView24populateWithInstanceViewEv @ 82 NONAME
- _ZN14CalenMonthView24updateModelWithPrevMonthEv @ 83 NONAME
- _ZN14CalenMonthView25handleLeftEffectCompletedERKN8HbEffect12EffectStatusE @ 84 NONAME
- _ZN14CalenMonthView26fetchEntriesAndUpdateModelEv @ 85 NONAME
- _ZN14CalenMonthView26handleRightEffectCompletedERKN8HbEffect12EffectStatusE @ 86 NONAME
- _ZN14CalenMonthView26updateModelWithFutureMonthEv @ 87 NONAME
- _ZN14CalenMonthView27showHideRegionalInformationEv @ 88 NONAME
- _ZN14CalenMonthView35updateMonthDataArrayWithActiveDatesEv @ 89 NONAME
- _ZN14CalenMonthView7setDateEv @ 90 NONAME
- _ZN14CalenMonthView9goToTodayEv @ 91 NONAME
- _ZN14CalenMonthView9setupViewEP14CalenDocLoader @ 92 NONAME
- _ZN14CalenMonthViewC1ER14MCalenServices @ 93 NONAME
- _ZN14CalenMonthViewC2ER14MCalenServices @ 94 NONAME
- _ZN14CalenMonthViewD0Ev @ 95 NONAME
- _ZN14CalenMonthViewD1Ev @ 96 NONAME
- _ZN14CalenMonthViewD2Ev @ 97 NONAME
- _ZN16CalenPluginLabelC1ER14MCalenServicesP13QGraphicsItem @ 98 NONAME
- _ZN16CalenPluginLabelC2ER14MCalenServicesP13QGraphicsItem @ 99 NONAME
- _ZN16CalenPluginLabelD0Ev @ 100 NONAME
- _ZN16CalenPluginLabelD1Ev @ 101 NONAME
- _ZN16CalenPluginLabelD2Ev @ 102 NONAME
- _ZN16CalenPreviewPane11qt_metacallEN11QMetaObject4CallEiPPv @ 103 NONAME
- _ZN16CalenPreviewPane11qt_metacastEPKc @ 104 NONAME
- _ZN16CalenPreviewPane12gestureEventEP13QGestureEvent @ 105 NONAME
- _ZN16CalenPreviewPane13populateLabelE9QDateTime @ 106 NONAME
- _ZN16CalenPreviewPane13stopScrollingEv @ 107 NONAME
- _ZN16CalenPreviewPane15startAutoScrollEv @ 108 NONAME
- _ZN16CalenPreviewPane16GetInstanceListLEv @ 109 NONAME
- _ZN16CalenPreviewPane16staticMetaObjectE @ 110 NONAME DATA 16
- _ZN16CalenPreviewPane17scrollingFinishedEv @ 111 NONAME
- _ZN16CalenPreviewPane17setNoEntriesLabelEP7HbLabel @ 112 NONAME
- _ZN16CalenPreviewPane19getStaticMetaObjectEv @ 113 NONAME
- _ZN16CalenPreviewPane19onTwoSecondsTimeoutEv @ 114 NONAME
- _ZN16CalenPreviewPane4DateEv @ 115 NONAME
- _ZN16CalenPreviewPane7setViewEP14CalenMonthView @ 116 NONAME
- _ZN16CalenPreviewPaneC1ER14MCalenServicesP13QGraphicsItem @ 117 NONAME
- _ZN16CalenPreviewPaneC2ER14MCalenServicesP13QGraphicsItem @ 118 NONAME
- _ZN16CalenPreviewPaneD0Ev @ 119 NONAME
- _ZN16CalenPreviewPaneD1Ev @ 120 NONAME
- _ZN16CalenPreviewPaneD2Ev @ 121 NONAME
- _ZN17CalenSettingsView11qt_metacallEN11QMetaObject4CallEiPPv @ 122 NONAME
- _ZN17CalenSettingsView11qt_metacastEPKc @ 123 NONAME
- _ZN17CalenSettingsView11refreshViewEv @ 124 NONAME
- _ZN17CalenSettingsView14initializeFormEv @ 125 NONAME
- _ZN17CalenSettingsView16staticMetaObjectE @ 126 NONAME DATA 16
- _ZN17CalenSettingsView18launchPreviousViewEv @ 127 NONAME
- _ZN17CalenSettingsView19getStaticMetaObjectEv @ 128 NONAME
- _ZN17CalenSettingsViewC1ER14MCalenServicesP13QGraphicsItem @ 129 NONAME
- _ZN17CalenSettingsViewC2ER14MCalenServicesP13QGraphicsItem @ 130 NONAME
- _ZN17CalenSettingsViewD0Ev @ 131 NONAME
- _ZN17CalenSettingsViewD1Ev @ 132 NONAME
- _ZN17CalenSettingsViewD2Ev @ 133 NONAME
- _ZN18CalenDayViewWidgetC1ER14MCalenServicesP14CalenDocLoader @ 134 NONAME
- _ZN18CalenDayViewWidgetC2ER14MCalenServicesP14CalenDocLoader @ 135 NONAME
- _ZN18CalenDayViewWidgetD0Ev @ 136 NONAME
- _ZN18CalenDayViewWidgetD1Ev @ 137 NONAME
- _ZN18CalenDayViewWidgetD2Ev @ 138 NONAME
- _ZN21CalenThickLinesDrawer11qt_metacallEN11QMetaObject4CallEiPPv @ 139 NONAME
- _ZN21CalenThickLinesDrawer11qt_metacastEPKc @ 140 NONAME
- _ZN21CalenThickLinesDrawer16staticMetaObjectE @ 141 NONAME DATA 16
- _ZN21CalenThickLinesDrawer19getStaticMetaObjectEv @ 142 NONAME
- _ZN21CalenThickLinesDrawer5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 143 NONAME
- _ZN21CalenThickLinesDrawerC1EN17CalendarNamespace10WidgetTypeEP13QGraphicsItem @ 144 NONAME
- _ZN21CalenThickLinesDrawerC2EN17CalendarNamespace10WidgetTypeEP13QGraphicsItem @ 145 NONAME
- _ZN21CalenThickLinesDrawerD0Ev @ 146 NONAME
- _ZN21CalenThickLinesDrawerD1Ev @ 147 NONAME
- _ZN21CalenThickLinesDrawerD2Ev @ 148 NONAME
- _ZNK14CalenMonthGrid10metaObjectEv @ 149 NONAME
- _ZNK14CalenMonthView10metaObjectEv @ 150 NONAME
- _ZNK16CalenPreviewPane10metaObjectEv @ 151 NONAME
- _ZNK17CalenSettingsView10metaObjectEv @ 152 NONAME
- _ZNK21CalenThickLinesDrawer10metaObjectEv @ 153 NONAME
- _ZTI14CalenMonthGrid @ 154 NONAME
- _ZTI14CalenMonthView @ 155 NONAME
- _ZTI16CalenPreviewPane @ 156 NONAME
- _ZTI17CalenSettingsView @ 157 NONAME
- _ZTI21CalenThickLinesDrawer @ 158 NONAME
- _ZTV14CalenMonthGrid @ 159 NONAME
- _ZTV14CalenMonthView @ 160 NONAME
- _ZTV16CalenPreviewPane @ 161 NONAME
- _ZTV17CalenSettingsView @ 162 NONAME
- _ZTV21CalenThickLinesDrawer @ 163 NONAME
- _ZThn16_N12CalenDayViewD0Ev @ 164 NONAME
- _ZThn16_N12CalenDayViewD1Ev @ 165 NONAME
- _ZThn16_N14CalenMonthGridD0Ev @ 166 NONAME
- _ZThn16_N14CalenMonthGridD1Ev @ 167 NONAME
- _ZThn16_N14CalenMonthViewD0Ev @ 168 NONAME
- _ZThn16_N14CalenMonthViewD1Ev @ 169 NONAME
- _ZThn16_N16CalenPluginLabelD0Ev @ 170 NONAME
- _ZThn16_N16CalenPluginLabelD1Ev @ 171 NONAME
- _ZThn16_N16CalenPreviewPaneD0Ev @ 172 NONAME
- _ZThn16_N16CalenPreviewPaneD1Ev @ 173 NONAME
- _ZThn16_N17CalenSettingsViewD0Ev @ 174 NONAME
- _ZThn16_N17CalenSettingsViewD1Ev @ 175 NONAME
- _ZThn16_N18CalenDayViewWidgetD0Ev @ 176 NONAME
- _ZThn16_N18CalenDayViewWidgetD1Ev @ 177 NONAME
- _ZThn16_N21CalenThickLinesDrawerD0Ev @ 178 NONAME
- _ZThn16_N21CalenThickLinesDrawerD1Ev @ 179 NONAME
- _ZThn28_N12CalenDayView18HandleNotificationE18TCalenNotification @ 180 NONAME
- _ZThn8_N12CalenDayViewD0Ev @ 181 NONAME
- _ZThn8_N12CalenDayViewD1Ev @ 182 NONAME
- _ZThn8_N14CalenMonthGrid15mousePressEventEP24QGraphicsSceneMouseEvent @ 183 NONAME
- _ZThn8_N14CalenMonthGrid17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 184 NONAME
- _ZThn8_N14CalenMonthGrid5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 185 NONAME
- _ZThn8_N14CalenMonthGridD0Ev @ 186 NONAME
- _ZThn8_N14CalenMonthGridD1Ev @ 187 NONAME
- _ZThn8_N14CalenMonthViewD0Ev @ 188 NONAME
- _ZThn8_N14CalenMonthViewD1Ev @ 189 NONAME
- _ZThn8_N16CalenPluginLabelD0Ev @ 190 NONAME
- _ZThn8_N16CalenPluginLabelD1Ev @ 191 NONAME
- _ZThn8_N16CalenPreviewPaneD0Ev @ 192 NONAME
- _ZThn8_N16CalenPreviewPaneD1Ev @ 193 NONAME
- _ZThn8_N17CalenSettingsViewD0Ev @ 194 NONAME
- _ZThn8_N17CalenSettingsViewD1Ev @ 195 NONAME
- _ZThn8_N18CalenDayViewWidgetD0Ev @ 196 NONAME
- _ZThn8_N18CalenDayViewWidgetD1Ev @ 197 NONAME
- _ZThn8_N21CalenThickLinesDrawer5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 198 NONAME
- _ZThn8_N21CalenThickLinesDrawerD0Ev @ 199 NONAME
- _ZThn8_N21CalenThickLinesDrawerD1Ev @ 200 NONAME
- _ZN12CalenDayView26disconnectAboutToQuitEventEv @ 201 NONAME
- _ZN15CalenNativeView17captureScreenshotEb @ 202 NONAME
+ _ZN12CalenDayView9setupViewEP14CalenDocLoader @ 2 NONAME
+ _ZN12CalenDayViewC1ER14MCalenServices @ 3 NONAME
+ _ZN12CalenDayViewC2ER14MCalenServices @ 4 NONAME
+ _ZN12CalenDayViewD0Ev @ 5 NONAME
+ _ZN12CalenDayViewD1Ev @ 6 NONAME
+ _ZN12CalenDayViewD2Ev @ 7 NONAME
+ _ZN14CalenMonthGrid10appendRowsEv @ 8 NONAME
+ _ZN14CalenMonthGrid11downGestureEv @ 9 NONAME
+ _ZN14CalenMonthGrid11prependRowsEv @ 10 NONAME
+ _ZN14CalenMonthGrid11qt_metacallEN11QMetaObject4CallEiPPv @ 11 NONAME
+ _ZN14CalenMonthGrid11qt_metacastEPKc @ 12 NONAME
+ _ZN14CalenMonthGrid12gestureEventEP13QGestureEvent @ 13 NONAME
+ _ZN14CalenMonthGrid13itemActivatedERK11QModelIndex @ 14 NONAME
+ _ZN14CalenMonthGrid14setActiveDatesE5QDate @ 15 NONAME
+ _ZN14CalenMonthGrid14setCurrentIdexEi @ 16 NONAME
+ _ZN14CalenMonthGrid15getCurrentIndexEv @ 17 NONAME
+ _ZN14CalenMonthGrid15mousePressEventEP24QGraphicsSceneMouseEvent @ 18 NONAME
+ _ZN14CalenMonthGrid16staticMetaObjectE @ 19 NONAME DATA 16
+ _ZN14CalenMonthGrid17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 20 NONAME
+ _ZN14CalenMonthGrid17scrollingFinishedEv @ 21 NONAME
+ _ZN14CalenMonthGrid18orientationChangedEN2Qt11OrientationE @ 22 NONAME
+ _ZN14CalenMonthGrid19getStaticMetaObjectEv @ 23 NONAME
+ _ZN14CalenMonthGrid19handleAppendingRowsER5QListI14CalenMonthDataE @ 24 NONAME
+ _ZN14CalenMonthGrid19setFocusToProperDayEv @ 25 NONAME
+ _ZN14CalenMonthGrid20handlePrependingRowsER5QListI14CalenMonthDataE @ 26 NONAME
+ _ZN14CalenMonthGrid20updateMonthGridModelER5QListI14CalenMonthDataEib @ 27 NONAME
+ _ZN14CalenMonthGrid24handlePanGestureFinishedEv @ 28 NONAME
+ _ZN14CalenMonthGrid33updateMonthGridWithInActiveMonthsER5QListI14CalenMonthDataE @ 29 NONAME
+ _ZN14CalenMonthGrid34updateMonthGridWithEventIndicatorsER5QListI14CalenMonthDataE @ 30 NONAME
+ _ZN14CalenMonthGrid5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 31 NONAME
+ _ZN14CalenMonthGrid7setViewEP14CalenMonthView @ 32 NONAME
+ _ZN14CalenMonthGrid9upGestureEv @ 33 NONAME
+ _ZN14CalenMonthGridC1EP13QGraphicsItem @ 34 NONAME
+ _ZN14CalenMonthGridC2EP13QGraphicsItem @ 35 NONAME
+ _ZN14CalenMonthGridD0Ev @ 36 NONAME
+ _ZN14CalenMonthGridD1Ev @ 37 NONAME
+ _ZN14CalenMonthGridD2Ev @ 38 NONAME
+ _ZN14CalenMonthView10createGridEv @ 39 NONAME
+ _ZN14CalenMonthView11qt_metacallEN11QMetaObject4CallEiPPv @ 40 NONAME
+ _ZN14CalenMonthView11qt_metacastEPKc @ 41 NONAME
+ _ZN14CalenMonthView12createEditorEv @ 42 NONAME
+ _ZN14CalenMonthView12doPopulationEv @ 43 NONAME
+ _ZN14CalenMonthView12getActiveDayEv @ 44 NONAME
+ _ZN14CalenMonthView12setActiveDayE9QDateTime @ 45 NONAME
+ _ZN14CalenMonthView13doLazyLoadingEv @ 46 NONAME
+ _ZN14CalenMonthView13getCurrentDayEv @ 47 NONAME
+ _ZN14CalenMonthView13launchDayViewEv @ 48 NONAME
+ _ZN14CalenMonthView13monthDataListEv @ 49 NONAME
+ _ZN14CalenMonthView14addWeekNumbersEv @ 50 NONAME
+ _ZN14CalenMonthView14firstDayOfGridEv @ 51 NONAME
+ _ZN14CalenMonthView14rowsInFutMonthEv @ 52 NONAME
+ _ZN14CalenMonthView14setDateToLabelEv @ 53 NONAME
+ _ZN14CalenMonthView14updateDayLabelEv @ 54 NONAME
+ _ZN14CalenMonthView15dateFromContextERK13MCalenContext @ 55 NONAME
+ _ZN14CalenMonthView15getInstanceListER5QListI5QDateE9QDateTimeS4_ @ 56 NONAME
+ _ZN14CalenMonthView15onLocaleChangedEi @ 57 NONAME
+ _ZN14CalenMonthView15rowsInPrevMonthEv @ 58 NONAME
+ _ZN14CalenMonthView16getCurrGridIndexEv @ 59 NONAME
+ _ZN14CalenMonthView16onContextChangedEv @ 60 NONAME
+ _ZN14CalenMonthView16setCurrGridIndexEi @ 61 NONAME
+ _ZN14CalenMonthView16staticMetaObjectE @ 62 NONAME DATA 16
+ _ZN14CalenMonthView17changeOrientationEN2Qt11OrientationE @ 63 NONAME
+ _ZN14CalenMonthView17populateNextMonthEv @ 64 NONAME
+ _ZN14CalenMonthView17populatePrevMonthEv @ 65 NONAME
+ _ZN14CalenMonthView17removeWeekNumbersEv @ 66 NONAME
+ _ZN14CalenMonthView18addBackgroundFrameEv @ 67 NONAME
+ _ZN14CalenMonthView18completePopulationEv @ 68 NONAME
+ _ZN14CalenMonthView19getStaticMetaObjectEv @ 69 NONAME
+ _ZN14CalenMonthView19populatePreviewPaneER9QDateTime @ 70 NONAME
+ _ZN14CalenMonthView20prepareForPopulationEv @ 71 NONAME
+ _ZN14CalenMonthView21refreshViewOnGoToDateEv @ 72 NONAME
+ _ZN14CalenMonthView22addRemoveActionsInMenuEv @ 73 NONAME
+ _ZN14CalenMonthView22setContextForActiveDayEi @ 74 NONAME
+ _ZN14CalenMonthView22updateWeekNumGridModelEv @ 75 NONAME
+ _ZN14CalenMonthView23handleChangeOrientationEv @ 76 NONAME
+ _ZN14CalenMonthView23handleGridItemActivatedEv @ 77 NONAME
+ _ZN14CalenMonthView24handlePreviewPaneGestureEb @ 78 NONAME
+ _ZN14CalenMonthView24populateWithInstanceViewEv @ 79 NONAME
+ _ZN14CalenMonthView24updateModelWithPrevMonthEv @ 80 NONAME
+ _ZN14CalenMonthView25handleLeftEffectCompletedERKN8HbEffect12EffectStatusE @ 81 NONAME
+ _ZN14CalenMonthView26fetchEntriesAndUpdateModelEv @ 82 NONAME
+ _ZN14CalenMonthView26handleRightEffectCompletedERKN8HbEffect12EffectStatusE @ 83 NONAME
+ _ZN14CalenMonthView26updateModelWithFutureMonthEv @ 84 NONAME
+ _ZN14CalenMonthView27showHideRegionalInformationEv @ 85 NONAME
+ _ZN14CalenMonthView35updateMonthDataArrayWithActiveDatesEv @ 86 NONAME
+ _ZN14CalenMonthView7setDateEv @ 87 NONAME
+ _ZN14CalenMonthView9goToTodayEv @ 88 NONAME
+ _ZN14CalenMonthView9setupViewEP14CalenDocLoader @ 89 NONAME
+ _ZN14CalenMonthViewC1ER14MCalenServices @ 90 NONAME
+ _ZN14CalenMonthViewC2ER14MCalenServices @ 91 NONAME
+ _ZN14CalenMonthViewD0Ev @ 92 NONAME
+ _ZN14CalenMonthViewD1Ev @ 93 NONAME
+ _ZN14CalenMonthViewD2Ev @ 94 NONAME
+ _ZN15CalenAgendaView12doPopulationEv @ 95 NONAME
+ _ZN15CalenAgendaView14clearListModelEv @ 96 NONAME
+ _ZN15CalenAgendaView18HandleNotificationE18TCalenNotification @ 97 NONAME
+ _ZN15CalenAgendaView26disconnectAboutToQuitEventEv @ 98 NONAME
+ _ZN15CalenAgendaView9docLoaderEv @ 99 NONAME
+ _ZN15CalenAgendaView9setupViewEP14CalenDocLoader @ 100 NONAME
+ _ZN15CalenAgendaViewC1ER14MCalenServices @ 101 NONAME
+ _ZN15CalenAgendaViewC2ER14MCalenServices @ 102 NONAME
+ _ZN15CalenAgendaViewD0Ev @ 103 NONAME
+ _ZN15CalenAgendaViewD1Ev @ 104 NONAME
+ _ZN15CalenAgendaViewD2Ev @ 105 NONAME
+ _ZN15CalenNativeView17captureScreenshotEb @ 106 NONAME
+ _ZN16CalenPluginLabelC1ER14MCalenServicesP13QGraphicsItem @ 107 NONAME
+ _ZN16CalenPluginLabelC2ER14MCalenServicesP13QGraphicsItem @ 108 NONAME
+ _ZN16CalenPluginLabelD0Ev @ 109 NONAME
+ _ZN16CalenPluginLabelD1Ev @ 110 NONAME
+ _ZN16CalenPluginLabelD2Ev @ 111 NONAME
+ _ZN16CalenPreviewPane11qt_metacallEN11QMetaObject4CallEiPPv @ 112 NONAME
+ _ZN16CalenPreviewPane11qt_metacastEPKc @ 113 NONAME
+ _ZN16CalenPreviewPane12gestureEventEP13QGestureEvent @ 114 NONAME
+ _ZN16CalenPreviewPane13populateLabelE9QDateTime @ 115 NONAME
+ _ZN16CalenPreviewPane13stopScrollingEv @ 116 NONAME
+ _ZN16CalenPreviewPane15startAutoScrollEv @ 117 NONAME
+ _ZN16CalenPreviewPane16GetInstanceListLEv @ 118 NONAME
+ _ZN16CalenPreviewPane16staticMetaObjectE @ 119 NONAME DATA 16
+ _ZN16CalenPreviewPane17scrollingFinishedEv @ 120 NONAME
+ _ZN16CalenPreviewPane17setNoEntriesLabelEP7HbLabel @ 121 NONAME
+ _ZN16CalenPreviewPane19getStaticMetaObjectEv @ 122 NONAME
+ _ZN16CalenPreviewPane19onTwoSecondsTimeoutEv @ 123 NONAME
+ _ZN16CalenPreviewPane4DateEv @ 124 NONAME
+ _ZN16CalenPreviewPane7setViewEP14CalenMonthView @ 125 NONAME
+ _ZN16CalenPreviewPaneC1ER14MCalenServicesP13QGraphicsItem @ 126 NONAME
+ _ZN16CalenPreviewPaneC2ER14MCalenServicesP13QGraphicsItem @ 127 NONAME
+ _ZN16CalenPreviewPaneD0Ev @ 128 NONAME
+ _ZN16CalenPreviewPaneD1Ev @ 129 NONAME
+ _ZN16CalenPreviewPaneD2Ev @ 130 NONAME
+ _ZN17CalenSettingsView11qt_metacallEN11QMetaObject4CallEiPPv @ 131 NONAME
+ _ZN17CalenSettingsView11qt_metacastEPKc @ 132 NONAME
+ _ZN17CalenSettingsView11refreshViewEv @ 133 NONAME
+ _ZN17CalenSettingsView14initializeFormEv @ 134 NONAME
+ _ZN17CalenSettingsView16staticMetaObjectE @ 135 NONAME DATA 16
+ _ZN17CalenSettingsView18launchPreviousViewEv @ 136 NONAME
+ _ZN17CalenSettingsView19getStaticMetaObjectEv @ 137 NONAME
+ _ZN17CalenSettingsViewC1ER14MCalenServicesP13QGraphicsItem @ 138 NONAME
+ _ZN17CalenSettingsViewC2ER14MCalenServicesP13QGraphicsItem @ 139 NONAME
+ _ZN17CalenSettingsViewD0Ev @ 140 NONAME
+ _ZN17CalenSettingsViewD1Ev @ 141 NONAME
+ _ZN17CalenSettingsViewD2Ev @ 142 NONAME
+ _ZN21CalenAgendaViewWidgetC1ER14MCalenServicesP14CalenDocLoader @ 143 NONAME
+ _ZN21CalenAgendaViewWidgetC2ER14MCalenServicesP14CalenDocLoader @ 144 NONAME
+ _ZN21CalenAgendaViewWidgetD0Ev @ 145 NONAME
+ _ZN21CalenAgendaViewWidgetD1Ev @ 146 NONAME
+ _ZN21CalenAgendaViewWidgetD2Ev @ 147 NONAME
+ _ZN21CalenThickLinesDrawer11qt_metacallEN11QMetaObject4CallEiPPv @ 148 NONAME
+ _ZN21CalenThickLinesDrawer11qt_metacastEPKc @ 149 NONAME
+ _ZN21CalenThickLinesDrawer16staticMetaObjectE @ 150 NONAME DATA 16
+ _ZN21CalenThickLinesDrawer19getStaticMetaObjectEv @ 151 NONAME
+ _ZN21CalenThickLinesDrawer5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 152 NONAME
+ _ZN21CalenThickLinesDrawerC1EN17CalendarNamespace10WidgetTypeEP13QGraphicsItem @ 153 NONAME
+ _ZN21CalenThickLinesDrawerC2EN17CalendarNamespace10WidgetTypeEP13QGraphicsItem @ 154 NONAME
+ _ZN21CalenThickLinesDrawerD0Ev @ 155 NONAME
+ _ZN21CalenThickLinesDrawerD1Ev @ 156 NONAME
+ _ZN21CalenThickLinesDrawerD2Ev @ 157 NONAME
+ _ZNK14CalenMonthGrid10metaObjectEv @ 158 NONAME
+ _ZNK14CalenMonthView10metaObjectEv @ 159 NONAME
+ _ZNK16CalenPreviewPane10metaObjectEv @ 160 NONAME
+ _ZNK17CalenSettingsView10metaObjectEv @ 161 NONAME
+ _ZNK21CalenThickLinesDrawer10metaObjectEv @ 162 NONAME
+ _ZTI14CalenMonthGrid @ 163 NONAME
+ _ZTI14CalenMonthView @ 164 NONAME
+ _ZTI16CalenPreviewPane @ 165 NONAME
+ _ZTI17CalenSettingsView @ 166 NONAME
+ _ZTI21CalenThickLinesDrawer @ 167 NONAME
+ _ZTV14CalenMonthGrid @ 168 NONAME
+ _ZTV14CalenMonthView @ 169 NONAME
+ _ZTV16CalenPreviewPane @ 170 NONAME
+ _ZTV17CalenSettingsView @ 171 NONAME
+ _ZTV21CalenThickLinesDrawer @ 172 NONAME
+ _ZThn16_N12CalenDayViewD0Ev @ 173 NONAME
+ _ZThn16_N12CalenDayViewD1Ev @ 174 NONAME
+ _ZThn16_N14CalenMonthGridD0Ev @ 175 NONAME
+ _ZThn16_N14CalenMonthGridD1Ev @ 176 NONAME
+ _ZThn16_N14CalenMonthViewD0Ev @ 177 NONAME
+ _ZThn16_N14CalenMonthViewD1Ev @ 178 NONAME
+ _ZThn16_N15CalenAgendaViewD0Ev @ 179 NONAME
+ _ZThn16_N15CalenAgendaViewD1Ev @ 180 NONAME
+ _ZThn16_N16CalenPluginLabelD0Ev @ 181 NONAME
+ _ZThn16_N16CalenPluginLabelD1Ev @ 182 NONAME
+ _ZThn16_N16CalenPreviewPaneD0Ev @ 183 NONAME
+ _ZThn16_N16CalenPreviewPaneD1Ev @ 184 NONAME
+ _ZThn16_N17CalenSettingsViewD0Ev @ 185 NONAME
+ _ZThn16_N17CalenSettingsViewD1Ev @ 186 NONAME
+ _ZThn16_N21CalenAgendaViewWidgetD0Ev @ 187 NONAME
+ _ZThn16_N21CalenAgendaViewWidgetD1Ev @ 188 NONAME
+ _ZThn16_N21CalenThickLinesDrawerD0Ev @ 189 NONAME
+ _ZThn16_N21CalenThickLinesDrawerD1Ev @ 190 NONAME
+ _ZThn28_N15CalenAgendaView18HandleNotificationE18TCalenNotification @ 191 NONAME
+ _ZThn8_N12CalenDayViewD0Ev @ 192 NONAME
+ _ZThn8_N12CalenDayViewD1Ev @ 193 NONAME
+ _ZThn8_N14CalenMonthGrid15mousePressEventEP24QGraphicsSceneMouseEvent @ 194 NONAME
+ _ZThn8_N14CalenMonthGrid17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 195 NONAME
+ _ZThn8_N14CalenMonthGrid5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 196 NONAME
+ _ZThn8_N14CalenMonthGridD0Ev @ 197 NONAME
+ _ZThn8_N14CalenMonthGridD1Ev @ 198 NONAME
+ _ZThn8_N14CalenMonthViewD0Ev @ 199 NONAME
+ _ZThn8_N14CalenMonthViewD1Ev @ 200 NONAME
+ _ZThn8_N15CalenAgendaViewD0Ev @ 201 NONAME
+ _ZThn8_N15CalenAgendaViewD1Ev @ 202 NONAME
+ _ZThn8_N16CalenPluginLabelD0Ev @ 203 NONAME
+ _ZThn8_N16CalenPluginLabelD1Ev @ 204 NONAME
+ _ZThn8_N16CalenPreviewPaneD0Ev @ 205 NONAME
+ _ZThn8_N16CalenPreviewPaneD1Ev @ 206 NONAME
+ _ZThn8_N17CalenSettingsViewD0Ev @ 207 NONAME
+ _ZThn8_N17CalenSettingsViewD1Ev @ 208 NONAME
+ _ZThn8_N21CalenAgendaViewWidgetD0Ev @ 209 NONAME
+ _ZThn8_N21CalenAgendaViewWidgetD1Ev @ 210 NONAME
+ _ZThn8_N21CalenThickLinesDrawer5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 211 NONAME
+ _ZThn8_N21CalenThickLinesDrawerD0Ev @ 212 NONAME
+ _ZThn8_N21CalenThickLinesDrawerD1Ev @ 213 NONAME
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/inc/calenagendaview.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,189 @@
+/*
+* 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 the agenda view
+*
+*/
+
+#ifndef CALENAGENDAVIEW_H
+#define CALENAGENDAVIEW_H
+
+// System includes
+#include <QDateTime>
+
+// User includes
+#include "calennativeview.h"
+
+// Forward declarations
+class QGraphicsSceneMouseEvent;
+class CalenAgendaViewWidget;
+class CalenDocLoader;
+
+#ifdef CALENVIEWS_DLL
+#define CALENAGENDAVIEW_EXPORT Q_DECL_EXPORT
+#else
+#define CALENAGENDAVIEW_EXPORT Q_DECL_IMPORT
+#endif
+
+/**
+ * @class CalenAgendaView
+ * @brief Class declaration for the agenda view
+ * which shows the list of events &/ to-do's (if any)
+ * for any given day in the calendar. User can do other
+ * basic operations like creating, viewing or deleting
+ * an event
+ */
+class CalenAgendaView : public CalenNativeView
+ {
+ Q_OBJECT
+
+public:
+ /**
+ * @brief Constructor
+ * @param services A reference to the MCalenServices object
+ */
+ CALENAGENDAVIEW_EXPORT CalenAgendaView(MCalenServices &services);
+
+ /**
+ * @brief Default C++ constructor
+ */
+ CALENAGENDAVIEW_EXPORT virtual ~CalenAgendaView();
+
+ /**
+ * @brief Initializes the view after its creation
+ * Must be called only after the view and its children are constructed
+ * @param docLoader Pointer to the document loader object which has
+ * loaded this view from the .docml file
+ */
+ CALENAGENDAVIEW_EXPORT void setupView(CalenDocLoader *docLoader);
+
+ /**
+ * @brief Activates the current view. Sets this view as the current
+ * view of the application's main window. Must be called only after
+ * the view has been constructed and initialized
+ */
+ CALENAGENDAVIEW_EXPORT virtual void doPopulation();
+
+ /**
+ * @brief Callback function for any notifications that has been
+ * subscribed by this view
+ * @param notification The event for which notification is being sent
+ */
+ CALENAGENDAVIEW_EXPORT void HandleNotification(const TCalenNotification notification);
+
+ /**
+ * @brief Getter function for the document loader. Called from the content
+ * widget in order get its children
+ */
+ CALENAGENDAVIEW_EXPORT CalenDocLoader* docLoader();
+
+ /**
+ * @brief clears the list model from the view
+ */
+ CALENAGENDAVIEW_EXPORT void clearListModel();
+
+ /**
+ * disconnectAboutToQuitEvent disconnects for the aboutToQuit events
+ *
+ */
+ CALENAGENDAVIEW_EXPORT void disconnectAboutToQuitEvent();
+
+ /*
+ * @brief Refreshes the view with the date set in the context
+ */
+ void refreshViewOnGoToDate();
+
+protected:
+ void gestureEvent(QGestureEvent *event);
+
+private:
+
+ /**
+ * @brief Connects to all the toolbar and menu actions associated
+ * with this view
+ */
+ void setupActions();
+
+ /**
+ * @brief Callback function for listening to locale changes like
+ * time format, date format etc
+ */
+ void onLocaleChanged(int reason);
+
+private slots:
+
+ /**
+ * @brief Slot which is called whenever the orientation of the device changes
+ * @param orientation The current device orientation
+ */
+ void orientationChanged(Qt::Orientation orientation);
+
+ /**
+ * @brief Slot which launches back the month view
+ */
+ void launchMonthView();
+
+ /**
+ * @brief Slot which launches the day view
+ */
+ void launchDayView();
+
+private:
+
+ /**
+ * @var mDate
+ * @brief The date for which this view is being shown
+ */
+ QDateTime mDate;
+
+ /**
+ * @var mSoftKeyAction
+ * TODO: This may not be required going ahead
+ */
+ HbAction *mSoftKeyAction;
+
+ /**
+ * @var mAgendaViewWidget
+ * @brief The pointer to the content widget of this view
+ */
+ CalenAgendaViewWidget *mAgendaViewWidget;
+
+ /**
+ * @var mDocLoader
+ * @brief Pointer to the document loader which has loaded
+ * this view
+ */
+ CalenDocLoader *mDocLoader;
+
+ /**
+ * @var mGoToTodayAction
+ * Action which provides "Go to today" functionality
+ */
+ HbAction *mGoToTodayAction;
+
+ /**
+ * @var mSwitchToDayViewAction
+ * Action which provides "Switch to day view" functionality
+ */
+ HbAction *mSwitchToDayViewAction;
+
+ // TODO: Remove these after gestures are available
+ QPointF mTapPoint;
+ bool mActionTaken;
+ bool mIsAboutToQuitEventConnected; // bool to check if agenda view is registered to get aboutToQuit signals
+
+};
+
+#endif /* CALENAGENDAVIEW_H */
+
+// End of file --Don't remove this.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/inc/calenagendaviewwidget.h Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,362 @@
+/*
+* 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: CalenAgendaViewWidget class definition.
+*
+*/
+
+#ifndef CALENAGENDAVIEWWIDGET_H
+#define CALENAGENDAVIEWWIDGET_H
+
+// System includes
+#include <QGraphicsLinearLayout>
+#include <QDateTime>
+#include <QPointer>
+#include <hbwidget.h>
+
+// User includes
+
+// Forward declarations
+class QStandardItemModel;
+class QGraphicsSceneMouseEvent; // TODO: Remove this after gestures are supported
+class HbAbstractViewItem;
+class HbGroupBox;
+class HbListView;
+class QPluginLoader;
+class HbLabel;
+class HbAction;
+class HbDateTimePicker;
+class XQSettingsManager;
+class MCalenServices;
+class CalenAgendaView;
+class AgendaEntry;
+class CalenDocLoader;
+class CalenEventListViewItem;
+class NotesEditor;
+
+/**
+ * @class CalenAgendaViewWidget
+ * @brief The content widget for the agenda view.
+ * It is responsible for showing all the events &/ to-do's
+ * (if any) for a particular day selected by the user
+ */
+class CalenAgendaViewWidget : public HbWidget
+ {
+ Q_OBJECT
+
+public:
+
+ /**
+ * @brief Constructor
+ * @param services The reference to the MCalenServices object
+ * @param docLoader The document loader object
+ */
+ IMPORT_C CalenAgendaViewWidget(MCalenServices &services,
+ CalenDocLoader *docLoader);
+
+ /**
+ * @brief Default C++ destructor
+ */
+ IMPORT_C ~CalenAgendaViewWidget();
+
+ /**
+ * @brief Initializes the widget to show all the events/to-do's
+ * for the selected day
+ * @param view Pointer to the view to which this is the content
+ */
+ void setupWidget(CalenAgendaView *view);
+
+ /**
+ * @brief Prepares the widget to be shown.
+ * Initializes the widget with the day's events and other details
+ */
+ void showWidget();
+
+ /**
+ * @brief Called from the view whenever the orientation of the
+ * device changes
+ */
+ void orientationChanged(Qt::Orientation);
+
+ /**
+ * @brief Callback function to handle system locale change
+ */
+ void handleLocaleChange();
+
+ /**
+ * @brief clears the list model from the view
+ */
+ void clearListModel();
+
+private:
+
+ /**
+ * @brief Sets the context based on the item selected by the user
+ * @param entry The entry using which the context is deduced
+ */
+ void setContextFromHighlight(AgendaEntry entry);
+
+ /**
+ * @brief Initializes the child widgets of this widget
+ */
+ void initChildWidgets();
+
+ /**
+ * @brief Populates the list with the events for the current day.
+ * Does nothing if the day has no events. To be called whenever
+ * the view has to be refreshed
+ */
+ void populateListWidget();
+
+ /**
+ * @brief Gets the instance list for day
+ */
+ void getInstanceList();
+
+ /**
+ * @brief Sets the heading text to show the date for which this
+ * widget is being shown
+ */
+ void setHeadingText();
+
+ /**
+ * @brief Creates and adds an item to the list at position index
+ * @param index The position in the list when the item is added
+ * @param entry The entry whose details must be shown in the item
+ */
+ void createListItem(int index, AgendaEntry entry);
+
+ /**
+ * @brief Creates and add a list item for the event
+ * @param index The position in the list when the item is added
+ * @param entry The entry whose details must be shown in the item
+ */
+ void addTimedEventToList(int index, AgendaEntry entry);
+
+ /**
+ * @brief Creates and add a list item for the event which is non timed
+ * @param index The position in the list when the item is added
+ * @param entry The entry whose details must be shown in the item
+ */
+ void addNonTimedEventToList(int index, AgendaEntry entry);
+
+ /**
+ * @brief Sets strecthing to list items showing non-timed events
+ */
+ void handleListItemStretching(Qt::Orientation orientation);
+
+ /**
+ * @brief Returns the index in the list to which scrolling must
+ * happen. For ex: After creating a new event, the list must scroll
+ * to the newly created event
+ */
+ int getIndexToScrollTo();
+
+ /**
+ * @brief To Show and hide regional plugin label depends upon settings
+ */
+
+ void showHideRegionalInformation();
+
+
+
+private slots:
+
+ /**
+ * @brief Opens the editor to create a new entry
+ */
+ void createNewEvent();
+
+ /**
+ * @brief Opens the entry at position index in the list for
+ * editing in the editor. Does nothing if the index is invalid
+ */
+ void editEntry();
+
+ /**
+ * @brief Opens the entry at position index in the list for
+ * viewing in the viewer. Does nothing if the index is invalid
+ */
+ void viewEntry();
+
+ /**
+ * @brief Deletes the entry at position index in the list.
+ * Does nothing if the list is empty
+ */
+ void deleteEntry();
+
+ /**
+ * @brief Marks a to-do as done
+ */
+ void markAsDone();
+
+ /**
+ * @brief Handles long press on a particular item. Presents a
+ * context menu with various operations that the user can
+ * perform
+ * @param ite, The index item which is being long pressed
+ * @param coords The (x, y) co-ordinates where the long tap has
+ * occured
+ */
+ void itemLongPressed(HbAbstractViewItem *item, const QPointF &coords);
+
+ /**
+ * @brief Handles user selection on a particular item of a
+ * particular event in the list. Default action is to view it
+ * @param index Index of the item which was selected
+ */
+ void itemActivated(const QModelIndex &index);
+
+ /**
+ * @brief Called whenever a editing a to-do is completed
+ * @param status Inidcates if the editing was successful or not
+ */
+ void noteEditingCompleted(bool status);
+
+ /**
+ * @brief Callback function for navigating to today's agenda
+ * This option must be available only if the view is showing
+ * events for some day other than the current day
+ */
+ void goToToday();
+
+ /**
+ * @brief This slot connected to aboutToClose()signal of contextmenu
+ * To reset the flag of mLongTapEventFlag
+ */
+ void contextMenuClosed();
+
+ /**
+ * @brief Called when contextMenu item is triggered
+ */
+ void contextManuTriggered(HbAction *action);
+
+private:
+ /**
+ * @var mDate
+ * @brief Stores the date for which this widget is being shown
+ */
+ QDateTime mDate;
+
+ /**
+ * @var mInstanceArray
+ * @brief Holds the list of instances for the day
+ */
+ QList<AgendaEntry> mInstanceArray;
+
+ /**
+ * @var mHeadingLabel
+ * @brief The heading widget which shows the date
+ */
+ HbGroupBox *mHeadingLabel;
+
+ /**
+ * @var mEventsList
+ * @brief The list view which shows the list of events
+ */
+ HbListView *mEventsList;
+
+ /**
+ * @var mServices
+ * @brief The reference to the MCalenServices object
+ */
+ MCalenServices &mServices;
+
+ /**
+ * @var mView
+ * @brief The pointer to the view
+ */
+ CalenAgendaView *mView;
+
+ /**
+ * @var mDocLoader
+ * @brief The pointer to the document loader which has
+ * loaded this widget
+ */
+ CalenDocLoader *mDocLoader;
+
+ /**
+ * @var mListViewPrototype
+ * @brief Acts as the item prototype for list view.
+ * Allows providing own layout for list items
+ */
+ CalenEventListViewItem *mListViewPrototype;
+
+ /**
+ * @var mEmptyListLabel
+ * @brief The pointer to the empty view label
+ */
+ HbLabel *mEmptyListLabel;
+
+ /**
+ * @var mListModel
+ * @brief The event list model
+ */
+ QStandardItemModel *mListModel;
+
+ /**
+ * @var mSelectedIndex
+ * @brief Stores the index of the item being acted upon
+ * Since there is no focus, it becomes necessary to store the
+ * index of the item on which user is performing some action
+ */
+ int mSelectedIndex;
+
+ /**
+ * @var NotesEditorPluginLoader
+ * @brief Pointer to the notes editor plugin loader
+ */
+ QPointer<QPluginLoader> mNotesEditorPluginLoader;
+
+ /**
+ * @var mDatePicker
+ * @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;
+
+ /**
+ * @var mLongTapeventFlag
+ * @brief Set flag true if contextmenu is opened
+ */
+ bool mLongTapEventFlag;
+
+ /**
+ * @var mNotesPluginLoaded
+ * @brief Holds notes editor plugin load info.
+ */
+ bool mNotesPluginLoaded;
+
+};
+
+#endif //CALENAGENDAVIEWWIDGET_H
+
+// End of file --Don't remove this.
--- a/calendarui/views/inc/calendayview.h Wed Jun 23 18:11:28 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,178 +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: Class declaration for the day/agenda view
-*
-*/
-
-#ifndef CALENDAYVIEW_H
-#define CALENDAYVIEW_H
-
-// System includes
-#include <QDateTime>
-
-// User includes
-#include "calennativeview.h"
-
-// Forward declarations
-class QGraphicsSceneMouseEvent;
-class CalenDayViewWidget;
-class CalenDocLoader;
-
-#ifdef CALENVIEWS_DLL
-#define CALENDAYVIEW_EXPORT Q_DECL_EXPORT
-#else
-#define CALENDAYVIEW_EXPORT Q_DECL_IMPORT
-#endif
-
-/**
- * @class CalenDayView
- * @brief Class declaration for the day/agenda view
- * which shows the list of events &/ to-do's (if any)
- * for any given day in the calendar. User can do other
- * basic operations like creating, viewing or deleting
- * an event
- */
-class CalenDayView : public CalenNativeView
- {
- Q_OBJECT
-
-public:
- /**
- * @brief Constructor
- * @param services A reference to the MCalenServices object
- */
- CALENDAYVIEW_EXPORT CalenDayView(MCalenServices &services);
-
- /**
- * @brief Default C++ constructor
- */
- CALENDAYVIEW_EXPORT virtual ~CalenDayView();
-
- /**
- * @brief Initializes the view after its creation
- * Must be called only after the view and its children are constructed
- * @param docLoader Pointer to the document loader object which has
- * loaded this view from the .docml file
- */
- CALENDAYVIEW_EXPORT void setupView(CalenDocLoader *docLoader);
-
- /**
- * @brief Activates the current view. Sets this view as the current
- * view of the application's main window. Must be called only after
- * the view has been constructed and initialized
- */
- CALENDAYVIEW_EXPORT virtual void doPopulation();
-
- /**
- * @brief Callback function for any notifications that has been
- * subscribed by this view
- * @param notification The event for which notification is being sent
- */
- CALENDAYVIEW_EXPORT void HandleNotification(const TCalenNotification notification);
-
- /**
- * @brief Getter function for the document loader. Called from the content
- * widget in order get its children
- */
- CALENDAYVIEW_EXPORT CalenDocLoader* docLoader();
-
- /**
- * @brief clears the list model from the view
- */
- CALENDAYVIEW_EXPORT void clearListModel();
-
- /**
- * disconnectAboutToQuitEvent disconnects for the aboutToQuit events
- *
- */
- CALENDAYVIEW_EXPORT void disconnectAboutToQuitEvent();
-
- /*
- * @brief Refreshes the view with the date set in the context
- */
- void refreshViewOnGoToDate();
-
-protected:
- void gestureEvent(QGestureEvent *event);
-
-private:
-
- /**
- * @brief Connects to all the toolbar and menu actions associated
- * with this view
- */
- void setupActions();
-
- /**
- * @brief Callback function for listening to locale changes like
- * time format, date format etc
- */
- void onLocaleChanged(int reason);
-
-private slots:
-
- /**
- * @brief Slot which is called whenever the orientation of the device changes
- * @param orientation The current device orientation
- */
- void orientationChanged(Qt::Orientation orientation);
-
- /**
- * @brief Slot which launches back the month view
- */
- void launchMonthView();
-
-private:
-
- /**
- * @var mDate
- * @brief The date for which this view is being shown
- */
- QDateTime mDate;
-
- /**
- * @var mSoftKeyAction
- * TODO: This may not be required going ahead
- */
- HbAction *mSoftKeyAction;
-
- /**
- * @var mDayViewWidget
- * @brief The pointer to the content widget of this view
- */
- CalenDayViewWidget *mDayViewWidget;
-
- /**
- * @var mDocLoader
- * @brief Pointer to the document loader which has loaded
- * this view
- */
- CalenDocLoader *mDocLoader;
-
- /**
- * @var mGoToTodayAction
- * Action which provides "Go to today" functionality
- */
- HbAction *mGoToTodayAction;
-
- // TODO: Remove these after gestures are available
- QPointF mTapPoint;
- bool mActionTaken;
- bool mIsAboutToQuitEventConnected; // bool to check if day view is registered to get aboutToQuit signals
-
-};
-
-#endif /* CALENDAYVIEW_H */
-
-// End of file --Don't remove this.
--- a/calendarui/views/inc/calendayviewwidget.h Wed Jun 23 18:11:28 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,360 +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: CalenDayViewWidget class definition.
-*
-*/
-
-#ifndef CALENDAYVIEWWIDGET_H
-#define CALENDAYVIEWWIDGET_H
-
-// System includes
-#include <QGraphicsLinearLayout>
-#include <QDateTime>
-#include <QPointer>
-#include <hbwidget.h>
-
-// User includes
-
-// Forward declarations
-class QStandardItemModel;
-class QGraphicsSceneMouseEvent; // TODO: Remove this after gestures are supported
-class HbAbstractViewItem;
-class HbGroupBox;
-class HbListView;
-class QPluginLoader;
-class HbLabel;
-class HbAction;
-class HbDateTimePicker;
-class XQSettingsManager;
-class MCalenServices;
-class CalenDayView;
-class AgendaEntry;
-class CalenDocLoader;
-class CalenEventListViewItem;
-class NotesEditor;
-
-/**
- * @class CalenDayViewWidget
- * @brief The content widget for the day/agenda view.
- * It is responsible for showing all the events &/ to-do's
- * (if any) for a particular day selected by the user
- */
-class CalenDayViewWidget : public HbWidget
- {
- Q_OBJECT
-
-public:
-
- /**
- * @brief Constructor
- * @param services The reference to the MCalenServices object
- * @param docLoader The document loader object
- */
- IMPORT_C CalenDayViewWidget(MCalenServices &services,
- CalenDocLoader *docLoader);
-
- /**
- * @brief Default C++ destructor
- */
- IMPORT_C ~CalenDayViewWidget();
-
- /**
- * @brief Initializes the widget to show all the events/to-do's
- * for the selected day
- * @param view Pointer to the view to which this is the content
- */
- void setupWidget(CalenDayView *view);
-
- /**
- * @brief Prepares the widget to be shown.
- * Initializes the widget with the day's events and other details
- */
- void showWidget();
-
- /**
- * @brief Called from the view whenever the orientation of the
- * device changes
- */
- void orientationChanged(Qt::Orientation);
-
- /**
- * @brief Callback function to handle system locale change
- */
- void handleLocaleChange();
-
- /**
- * @brief clears the list model from the view
- */
- void clearListModel();
-
-private:
-
- /**
- * @brief Sets the context based on the item selected by the user
- * @param entry The entry using which the context is deduced
- */
- void setContextFromHighlight(AgendaEntry entry);
-
- /**
- * @brief Initializes the child widgets of this widget
- */
- void initChildWidgets();
-
- /**
- * @brief Populates the list with the events for the current day.
- * Does nothing if the day has no events. To be called whenever
- * the view has to be refreshed
- */
- void populateListWidget();
-
- /**
- * @brief Gets the instance list for day
- */
- void getInstanceList();
-
- /**
- * @brief Sets the heading text to show the date for which this
- * widget is being shown
- */
- void setHeadingText();
-
- /**
- * @brief Creates and adds an item to the list at position index
- * @param index The position in the list when the item is added
- * @param entry The entry whose details must be shown in the item
- */
- void createListItem(int index, AgendaEntry entry);
-
- /**
- * @brief Creates and add a list item for the event
- * @param index The position in the list when the item is added
- * @param entry The entry whose details must be shown in the item
- */
- void addTimedEventToList(int index, AgendaEntry entry);
-
- /**
- * @brief Creates and add a list item for the event which is non timed
- * @param index The position in the list when the item is added
- * @param entry The entry whose details must be shown in the item
- */
- void addNonTimedEventToList(int index, AgendaEntry entry);
-
- /**
- * @brief Sets strecthing to list items showing non-timed events
- */
- void handleListItemStretching(Qt::Orientation orientation);
-
- /**
- * @brief Returns the index in the list to which scrolling must
- * happen. For ex: After creating a new event, the list must scroll
- * to the newly created event
- */
- int getIndexToScrollTo();
-
- /**
- * @brief To Show and hide regional plugin label depends upon settings
- */
-
- void showHideRegionalInformation();
-
-private slots:
-
- /**
- * @brief Opens the editor to create a new entry
- */
- void createNewEvent();
-
- /**
- * @brief Opens the entry at position index in the list for
- * editing in the editor. Does nothing if the index is invalid
- */
- void editEntry();
-
- /**
- * @brief Opens the entry at position index in the list for
- * viewing in the viewer. Does nothing if the index is invalid
- */
- void viewEntry();
-
- /**
- * @brief Deletes the entry at position index in the list.
- * Does nothing if the list is empty
- */
- void deleteEntry();
-
- /**
- * @brief Marks a to-do as done
- */
- void markAsDone();
-
- /**
- * @brief Handles long press on a particular item. Presents a
- * context menu with various operations that the user can
- * perform
- * @param ite, The index item which is being long pressed
- * @param coords The (x, y) co-ordinates where the long tap has
- * occured
- */
- void itemLongPressed(HbAbstractViewItem *item, const QPointF &coords);
-
- /**
- * @brief Handles user selection on a particular item of a
- * particular event in the list. Default action is to view it
- * @param index Index of the item which was selected
- */
- void itemActivated(const QModelIndex &index);
-
- /**
- * @brief Called whenever a editing a to-do is completed
- * @param status Inidcates if the editing was successful or not
- */
- void noteEditingCompleted(bool status);
-
- /**
- * @brief Callback function for navigating to today's agenda
- * This option must be available only if the view is showing
- * events for some day other than the current day
- */
- void goToToday();
-
- /**
- * @brief This slot connected to aboutToClose()signal of contextmenu
- * To reset the flag of mLongTapEventFlag
- */
- void contextMenuClosed();
-
- /**
- * @brief Called when contextMenu item is triggered
- */
- void contextManuTriggered(HbAction *action);
-
-private:
- /**
- * @var mDate
- * @brief Stores the date for which this widget is being shown
- */
- QDateTime mDate;
-
- /**
- * @var mInstanceArray
- * @brief Holds the list of instances for the day
- */
- QList<AgendaEntry> mInstanceArray;
-
- /**
- * @var mHeadingLabel
- * @brief The heading widget which shows the date
- */
- HbGroupBox *mHeadingLabel;
-
- /**
- * @var mEventsList
- * @brief The list view which shows the list of events
- */
- HbListView *mEventsList;
-
- /**
- * @var mServices
- * @brief The reference to the MCalenServices object
- */
- MCalenServices &mServices;
-
- /**
- * @var mView
- * @brief The pointer to the view
- */
- CalenDayView *mView;
-
- /**
- * @var mDocLoader
- * @brief The pointer to the document loader which has
- * loaded this widget
- */
- CalenDocLoader *mDocLoader;
-
- /**
- * @var mListViewPrototype
- * @brief Acts as the item prototype for list view.
- * Allows providing own layout for list items
- */
- CalenEventListViewItem *mListViewPrototype;
-
- /**
- * @var mEmptyListLabel
- * @brief The pointer to the empty view label
- */
- HbLabel *mEmptyListLabel;
-
- /**
- * @var mListModel
- * @brief The event list model
- */
- QStandardItemModel *mListModel;
-
- /**
- * @var mSelectedIndex
- * @brief Stores the index of the item being acted upon
- * Since there is no focus, it becomes necessary to store the
- * index of the item on which user is performing some action
- */
- int mSelectedIndex;
-
- /**
- * @var NotesEditorPluginLoader
- * @brief Pointer to the notes editor plugin loader
- */
- QPointer<QPluginLoader> mNotesEditorPluginLoader;
-
- /**
- * @var mDatePicker
- * @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;
-
- /**
- * @var mLongTapeventFlag
- * @brief Set flag true if contextmenu is opened
- */
- bool mLongTapEventFlag;
-
- /**
- * @var mNotesPluginLoaded
- * @brief Holds notes editor plugin load info.
- */
- bool mNotesPluginLoaded;
-
-};
-
-#endif //CALENDAYVIEWWIDGET_H
-
-// End of file --Don't remove this.
--- a/calendarui/views/inc/calenmonthview.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/views/inc/calenmonthview.h Tue Jul 06 14:14:56 2010 +0300
@@ -85,6 +85,7 @@
void handlePreviewPaneGesture(bool rightGesture);
QDateTime firstDayOfGrid();
void fetchEntriesAndUpdateModel();
+ void launchDayView();
private:
void createGrid();
@@ -114,9 +115,6 @@
void handleLeftEffectCompleted(const HbEffect::EffectStatus &status);
void handleRightEffectCompleted(const HbEffect::EffectStatus &status);
void addRemoveActionsInMenu();
-
-public slots:
- void launchDayView();
void changeOrientation(Qt::Orientation orientation);
private:
--- a/calendarui/views/inc/calennativeview.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/views/inc/calennativeview.h Tue Jul 06 14:14:56 2010 +0300
@@ -55,7 +55,6 @@
QString *pluginText();
/**
* captureScreenshot captures the current screenshot
- * \param viewId of the view for which screenshot is to be taken
*/
CALENNATIVEVIEW_EXPORT void captureScreenshot(bool captureScreenShot = false);
@@ -76,7 +75,6 @@
virtual void changeOrientation(Qt::Orientation orientation);
/**
* saveActivity saves the current view as an activity
- * \params viewId view Id to be saved as an activity
*
*/
void saveActivity();
@@ -84,7 +82,7 @@
protected:
MCalenServices &mServices; // not owned.
- int mActivityId; // Recent Activity ID, currently it holdes wither of ECalenMonthView or ECalenDayView
+ int mActivityId; // Recent Activity ID, currently it holdes wither of ECalenMonthView or ECalenAgendaView
QVariantHash mScreenShotMetadata; // Screenshot
private:
HbDateTimePicker *mDatePicker;
--- a/calendarui/views/inc/calenpluginlabel.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/views/inc/calenpluginlabel.h Tue Jul 06 14:14:56 2010 +0300
@@ -27,8 +27,8 @@
Q_OBJECT
public:
- Q_DECL_EXPORT CalenPluginLabel(MCalenServices &services, QGraphicsItem *parent = 0);
- Q_DECL_EXPORT ~CalenPluginLabel();
+ IMPORT_C CalenPluginLabel(MCalenServices &services, QGraphicsItem *parent = 0);
+ IMPORT_C ~CalenPluginLabel();
protected:
void gestureEvent(QGestureEvent *event);
--- a/calendarui/views/inc/calensettingsview.h Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/views/inc/calensettingsview.h Tue Jul 06 14:14:56 2010 +0300
@@ -50,14 +50,14 @@
void launchPreviousView();
private:
- /**
- * @var mSoftKeyAction
- * @brief Holder for soft key action
- */
- HbAction *mSoftKeyAction;
+ MCalenServices &mServices;
HbDataForm *mCalenSettingsForm;
CalenSettings *mCalenSettings;
- MCalenServices &mServices;
+ /**
+ * @var mSoftKeyAction
+ * @brief Holder for soft key action
+ */
+ HbAction *mSoftKeyAction;
};
#endif // DTSETTINGVIEW_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/src/calenagendaview.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,347 @@
+/*
+* 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: CalenAgendaView implementation.
+*
+*/
+
+// System includes
+#include <QGraphicsSceneEvent>
+#include <hbmainwindow.h>
+#include <hbaction.h>
+#include <hbpangesture.h>
+#include <hbswipegesture.h>
+#include <hbapplication.h> // hbapplication
+#include <hbactivitymanager.h> // Activity Manager
+
+// User includes
+#include "calenagendaview.h"
+#include "calendocloader.h"
+#include "calenagendaviewwidget.h"
+#include "calenservices.h"
+#include "calencommon.h"
+#include "calencontext.h"
+#include "calendateutils.h"
+#include "calenconstants.h"
+
+// ----------------------------------------------------------------------------
+// CalenAgendaView::CalenAgendaView
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+CalenAgendaView::CalenAgendaView(MCalenServices &services):
+CalenNativeView(services),
+mSoftKeyAction(NULL),
+mGoToTodayAction(NULL),
+mSwitchToDayViewAction(NULL),
+mActionTaken(false),
+mIsAboutToQuitEventConnected(false)
+{
+ // No implementation yet
+ grabGesture(Qt::SwipeGesture);
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaView::~CalenAgendaView
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+CalenAgendaView::~CalenAgendaView()
+{
+ // No implementation yet
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaView::setupView
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaView::setupView(CalenDocLoader *docLoader)
+{
+ if (!docLoader) {
+ // Nothing can be done. Simply return
+ return;
+ }
+ // Store the document loader for reference later
+ mDocLoader = docLoader;
+
+ // Listen to orientation change events
+ connect(&(mServices.MainWindow()), SIGNAL(orientationChanged(Qt::Orientation)),
+ this, SLOT(orientationChanged(Qt::Orientation)));
+
+ // Get the pointer to the content widget
+ mAgendaViewWidget = qobject_cast<CalenAgendaViewWidget*>(mDocLoader->findWidget(CALEN_AGENDAVIEW_WIDGET));
+ if (!mAgendaViewWidget) {
+ qFatal("calenagendaview.cpp : Unable to find the content widget");
+ }
+ mAgendaViewWidget->setupWidget(this);
+
+ // Initialize all the menu and toolbar actions
+ setupActions();
+ // get a poitner to activity manager
+ HbActivityManager* activityManager = qobject_cast<HbApplication*>(qApp)->activityManager();
+
+ // clean up any previous versions of this activity, if any, i.e. activityName, from the activity manager.
+ // Ignore return value, first boot would always return False. bool declared
+ // only for debugging purpose.
+ bool ok = activityManager->removeActivity(activityName);
+
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaView::doPopulation
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaView::doPopulation()
+ {
+ // The content widget has not been constructed. Don't do anything
+ if (!mAgendaViewWidget) {
+ return;
+ }
+ // Get the day for which this view is being shown from the context
+ mDate = mServices.Context().focusDateAndTime();
+
+ // 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);
+ }
+ }
+
+ // Set self as the current view
+ // mServices.MainWindow().setCurrentView(this);
+
+ // Dont override the soft key behavior if day view is the first view
+ if (ECalenAgendaView != mServices.getFirstView()) {
+ mSoftKeyAction = new HbAction(Hb::BackNaviAction);
+ setNavigationAction(mSoftKeyAction);
+ // Connect to the signal triggered by clicking on back button.
+ connect(mSoftKeyAction, SIGNAL(triggered()), this,
+ SLOT(launchMonthView()));
+ if (mSwitchToDayViewAction) {
+ mSwitchToDayViewAction->setVisible(true);
+ }
+ } else {
+ if (mSwitchToDayViewAction) {
+ mSwitchToDayViewAction->setVisible(false);
+ }
+ }
+ // Initialize the content widget
+ mAgendaViewWidget->showWidget();
+
+ //set Current Activity as day view
+ mActivityId = ECalenAgendaView;
+
+ // connect to receive a call back on Day View exit. Call back would result in saveActivity
+ // to be called in Native View
+ if (!mIsAboutToQuitEventConnected) // check if already not connected
+ {
+ connect(qobject_cast<HbApplication*>(qApp), SIGNAL(aboutToQuit()), this, SLOT(saveActivity()));
+ mIsAboutToQuitEventConnected = true;
+ }
+
+
+ // Population is complete, issue a notification
+ populationComplete();
+ }
+
+/*!
+ Funtion to refresh the current view upon selecting a date
+ from GoToDate popup
+ */
+void CalenAgendaView::refreshViewOnGoToDate()
+{
+ // Get the day for which this view is being shown from the context
+ mDate = mServices.Context().focusDateAndTime();
+
+ // 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
+ mAgendaViewWidget->showWidget();
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaView::HandleNotification
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaView::HandleNotification(const TCalenNotification notification)
+{
+ Q_UNUSED(notification)
+ // No implementation yet
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaView::docLoader
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+CalenDocLoader* CalenAgendaView::docLoader()
+{
+ return mDocLoader;
+}
+
+/*
+ Function to listen for gestures
+*/
+void CalenAgendaView::gestureEvent(QGestureEvent *event)
+{
+ if(HbSwipeGesture *gesture = qobject_cast<HbSwipeGesture *>(event->gesture(Qt::SwipeGesture))) {
+ if (gesture->state() == Qt::GestureStarted) {
+ if(QSwipeGesture::Left == gesture->sceneHorizontalDirection()) {
+ mServices.IssueCommandL(ECalenShowNextDay);
+ event->accept(Qt::SwipeGesture);
+ } else if(QSwipeGesture::Right == gesture->sceneHorizontalDirection()) {
+ mServices.IssueCommandL(ECalenShowPrevDay);
+ event->accept(Qt::SwipeGesture);
+ }
+ }
+ }
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaView::createToolBar
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaView::setupActions()
+{
+ // Get the actions associated with this view
+ HbAction *newEventAction = qobject_cast<HbAction *>
+ (mDocLoader->findObject(CALEN_AGENDAVIEW_MENU_NEW_EVENT));
+ if (!newEventAction) {
+ qFatal("calenagendaview.cpp : Unable to find new event action");
+ }
+ // Connect to the signal triggered by new event action
+ connect(newEventAction, SIGNAL(triggered()), mAgendaViewWidget, SLOT(createNewEvent()));
+
+ mGoToTodayAction = qobject_cast<HbAction *>
+ (mDocLoader->findObject(CALEN_AGENDAVIEW_MENU_GO_TO_TODAY));
+ if (!mGoToTodayAction) {
+ qFatal("calenagendaview.cpp : Unable to find go to today action");
+ }
+ // Connect to the signal triggered by go to Today action
+ connect(mGoToTodayAction, SIGNAL(triggered()), mAgendaViewWidget, SLOT(goToToday()));
+
+ HbAction *goToDateAction = qobject_cast<HbAction *>
+ (mDocLoader->findObject(CALEN_AGENDAVIEW_MENU_GO_TO_DATE));
+ if (!goToDateAction) {
+ qFatal("calenagendaview.cpp : Unable to find go to date action");
+ }
+ // Connect to the signal triggered by go to Date action
+ connect(goToDateAction, SIGNAL(triggered()), this, SLOT(goToDate()));
+
+ mSwitchToDayViewAction = qobject_cast<HbAction *>
+ (mDocLoader->findObject(CALEN_AGENDAVIEW_MENU_SWITCH_TO_DAYVIEW));
+ if (!mSwitchToDayViewAction) {
+ qFatal("calenagendaview.cpp : Unable to find go to date action");
+ }
+ // Connect to the signal triggered by switch to dayview action
+ connect(mSwitchToDayViewAction, SIGNAL(triggered()), this, SLOT(launchDayView()));
+
+ HbAction *settingsAction = qobject_cast<HbAction *>
+ (mDocLoader->findObject(CALEN_AGENDAVIEW_MENU_SETTINGS));
+ if (!settingsAction) {
+ qFatal("calenagendaview.cpp : Unable to find settings action");
+ }
+ // Connect to the signal triggered by settings action
+ connect(settingsAction, SIGNAL(triggered()), this, SLOT(launchSettingsView()));
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaView::onLocaleChanged
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaView::onLocaleChanged(int reason)
+{
+ Q_UNUSED(reason)
+ // Notify the content widget about the change
+ if(mAgendaViewWidget) {
+ mAgendaViewWidget->handleLocaleChange();
+ }
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaView::orientationChanged
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaView::orientationChanged(Qt::Orientation orientation)
+{
+ // Notify the content widget about the change
+ if (mAgendaViewWidget) {
+ mAgendaViewWidget->orientationChanged(orientation);
+ }
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaView::launchMonthView
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaView::launchMonthView()
+{
+ // Issue the command to launch the month view
+ mServices.IssueCommandL(ECalenMonthView);
+ // month view launched now, disconnect to get the call backs for saveActivity
+ // on aboutToQuit signal
+ disconnectAboutToQuitEvent();
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaView::launchDayView
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaView::launchDayView()
+{
+ // Issue the command to launch the day view
+ mServices.IssueCommandL(ECalenDayView);
+}
+
+// ----------------------------------------------------------------------------
+// clears the list model
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaView::clearListModel()
+ {
+ // day view is removed from the list disconnect for aboutToQuit events
+ disconnectAboutToQuitEvent();
+ mAgendaViewWidget->clearListModel();
+ }
+
+// ----------------------------------------------------------------------------
+// disconnectAboutToQuitEvent disconnects for the aboutToQuit events
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaView::disconnectAboutToQuitEvent()
+ {
+ if (mIsAboutToQuitEventConnected)
+ {
+ disconnect(qobject_cast<HbApplication*>(qApp), SIGNAL(aboutToQuit()), this, SLOT(saveActivity()));
+ mIsAboutToQuitEventConnected = false;
+ }
+ }
+
+// End of file --Don't remove this.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/views/src/calenagendaviewwidget.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,1142 @@
+/*
+* 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: CalenAgendaViewWidget implementation
+*
+*/
+
+// System includes
+#include <QStandardItemModel>
+#include <QGraphicsSceneEvent>
+#include <QDir>
+#include <QPluginLoader>
+#include <hbi18ndef.h>
+#include <hbextendedlocale.h>
+#include <hbgroupbox.h>
+#include <hbmenu.h>
+#include <hbaction.h>
+#include <hbmainwindow.h>
+#include <hbstyleloader.h>
+#include <hbdatetimepicker.h>
+#include <hbdialog.h>
+#include <xqsettingsmanager.h>
+#include <agendautil.h>
+#include <NotesEditorInterface>
+
+// User includes
+#include "calenagendaviewwidget.h"
+#include "calencommon.h"
+#include "calenagendaview.h"
+#include "calendocloader.h"
+#include "calenservices.h"
+#include "calencontext.h"
+#include "calendateutils.h"
+#include "CalenUid.h"
+#include "caleneventlistviewitem.h"
+#include "calenpluginlabel.h"
+#include "calendarprivatecrkeys.h"
+
+// Constants
+const QString singleSpace(" ");
+const QString doubleSpace(" ");
+const QString space(" ");
+const QString singleHyphen("-");
+const QString customLayout("custom");
+const char *stretchLayout("stretchItem");
+const QString toDoIcon("qtg_small_todo");
+const QString reminderIcon("qtg_mono_alarm");
+const QString locationIcon("qtg_mono_location");
+const QString repeatIcon("qtg_mono_repeat");
+// TODO: Replace with actual image name once its available
+//const QString allDayIcon("qtg_small_allday");
+const QString allDayIcon(":/qgn_indi_cdr_meeting_layer0.svg");
+const QString exceptionIcon("qtg_mono_repeat_exception");
+const int singleColumn(1);
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::CalenAgendaViewWidget
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+EXPORT_C CalenAgendaViewWidget::CalenAgendaViewWidget(MCalenServices &services,
+ CalenDocLoader *docLoader) :
+mServices(services),
+mDocLoader(docLoader),
+mRegionalInfoGroupBox(NULL),
+mLongTapEventFlag(false),
+mNotesPluginLoaded(false)
+{
+ // Construct the list view prototype
+ mListViewPrototype = new CalenEventListViewItem(this);
+
+ // Create the list model
+ mListModel = new QStandardItemModel(this);
+
+ // 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);
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::~CalenAgendaViewWidget
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+EXPORT_C CalenAgendaViewWidget::~CalenAgendaViewWidget()
+{
+ // Unload notes editor if loaded.
+ if (mNotesEditorPluginLoader) {
+ mNotesEditorPluginLoader->unload();
+ delete mNotesEditorPluginLoader;
+ mNotesEditorPluginLoader = 0;
+ }
+
+ if (mListViewPrototype) {
+ delete mListViewPrototype;
+ mListViewPrototype = NULL;
+ }
+ if (mListModel) {
+ // Do not delete the model since its owned by the view
+ mListModel->clear();
+ }
+ if (mSettingsManager) {
+ delete mSettingsManager;
+ mSettingsManager = NULL;
+ }
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::setupWidget
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaViewWidget::setupWidget(CalenAgendaView *view)
+{
+ // Store the view for future reference
+ mView = view;
+
+ if (!mDocLoader) {
+ // Nothing much can be done. Simply return
+ return;
+ }
+
+ // Initialize the child widgets
+ initChildWidgets();
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::showWidget
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaViewWidget::showWidget()
+{
+ // Get the date for which this view has been launched
+ mDate = mServices.Context().focusDateAndTime();
+
+ // Set the heading text
+ setHeadingText();
+
+ // 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()) {
+ // There are no entries for the day
+ // Load and show the empty list section
+ bool loadSuccess = false;
+
+ // Hide the list which shows the events
+ mEventsList->hide();
+
+ // Show the empty list text
+ mEmptyListLabel->show();
+
+ // Get the current device orientation
+ int orientation = mServices.MainWindow().orientation();
+ if (Qt::Vertical == orientation) {
+ mDocLoader->load(CALEN_AGENDAVIEW_XML_FILE, "emptyList", &loadSuccess);
+ } else {
+ mDocLoader->load(CALEN_AGENDAVIEW_XML_FILE, "emptyLandscape", &loadSuccess);
+ }
+ if (!loadSuccess) {
+ qFatal("calenagendaviewwidget.cpp : Unable to load empty list section");
+ }
+ } else {
+ // Hide the empty view label
+ mEmptyListLabel->hide();
+
+ // Show the events list
+ mEventsList->show();
+
+ // There are one or more events. Load the non-empty section
+ bool loadSuccess = false;
+ mDocLoader->load(CALEN_AGENDAVIEW_XML_FILE, "nonEmptyList", &loadSuccess);
+ if (!loadSuccess) {
+ qFatal("calenagendaviewwidget.cpp : Unable to load non-empty list section");
+ }
+ // Now populate the list with the events
+ populateListWidget();
+ }
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::orientationChanged
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaViewWidget::orientationChanged(Qt::Orientation orientation)
+{
+ // Load the appropriate section based on the number of events for the day
+ if (0 == mInstanceArray.count()) {
+ // There are no entries for the day
+ // Load and show the empty list section
+ bool loadSuccess = false;
+
+ // Hide the list which shows the events
+ mEventsList->hide();
+
+ // Show the empty list text
+ mEmptyListLabel->show();
+
+ if (Qt::Vertical == orientation) {
+ mDocLoader->load(CALEN_AGENDAVIEW_XML_FILE, "emptyList", &loadSuccess);
+ } else {
+ mDocLoader->load(CALEN_AGENDAVIEW_XML_FILE, "emptyLandscape", &loadSuccess);
+ }
+ if (!loadSuccess) {
+ qFatal("calenagendaviewwidget.cpp : Unable to load empty list section");
+ }
+ } else {
+ // Hide the empty view label
+ mEmptyListLabel->hide();
+
+ // Show the events list
+ mEventsList->show();
+
+ // There are one or more events. Load the non-empty section
+ bool loadSuccess = false;
+ mDocLoader->load(CALEN_AGENDAVIEW_XML_FILE, "nonEmptyList", &loadSuccess);
+ if (!loadSuccess) {
+ qFatal("calenagendaviewwidget.cpp : Unable to load non-empty list section");
+ }
+ handleListItemStretching(orientation);
+ }
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::handleLocaleChange
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaViewWidget::handleLocaleChange()
+{
+
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::setContextFromHighlight
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaViewWidget::setContextFromHighlight(AgendaEntry entry)
+{
+ if (entry.isTimedEntry()) {
+ // Timed entry.
+ QDateTime start = entry.startTime();
+ // start.setDate(mDate.date());
+ mServices.Context().setFocusDateAndTimeAndInstance(start,
+ TCalenInstanceId::create(entry));
+ } else {
+ // Untimed entry.
+ if (CalenDateUtils::onSameDay(TCalenInstanceId::create(entry).mInstanceTime,
+ mDate)) {
+ mServices.Context().setInstanceId(TCalenInstanceId::create(entry));
+ } else {
+ // Multi-day untimed note (either multi-day day note or weird todo).
+ // Focus on the instance and set the focus time to the highlighted day.
+ mServices.Context().setFocusDateAndTimeAndInstance(mDate,
+ TCalenInstanceId::create(entry));
+ }
+ }
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::initChildWidgets
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaViewWidget::initChildWidgets()
+{
+ // Get the pointer to the events list
+ mEventsList = static_cast<HbListView*> (mDocLoader->findWidget(CALEN_AGENDAVIEW_LISTWIDGET));
+ if (!mEventsList) {
+ qFatal("calenagendaviewwidget.cpp : Unable to find the events list");
+ }
+ // NOTE: Layout name MUST be same as the name mentioned in the css
+ mEventsList->setLayoutName(customLayout);
+
+ // TODO : remove this line after gestures are available
+ mEventsList->installEventFilter(mView);
+
+ // Connect to the long press and activation signals
+ connect(mEventsList, SIGNAL(longPressed(HbAbstractViewItem*, const QPointF&)),
+ this, SLOT(itemLongPressed(HbAbstractViewItem*, const QPointF&)));
+ connect(mEventsList, SIGNAL(activated(const QModelIndex&)), this,
+ SLOT(itemActivated(const QModelIndex&)));
+
+ // Get the pointer to label from the loader.
+ mHeadingLabel = qobject_cast<HbGroupBox*> (mDocLoader->findWidget(CALEN_AGENDAVIEW_HEADING));
+ if (!mHeadingLabel) {
+ qFatal("calenagendaviewwidget.cpp : Unable to find heading widget");
+ }
+
+ // Get the pointer to the empty view label
+ mEmptyListLabel = qobject_cast<HbLabel*> (mDocLoader->findWidget("noEventsLabel"));
+ if (!mEmptyListLabel) {
+ qFatal("calenagendaviewwidget.cpp : Unable to find empty list label");
+ }
+ HbWidget *headingPluginWidget =
+ qobject_cast<HbWidget*> (mDocLoader->findWidget(CALEN_AGENDAVIEW_HEADING_REGIONALPLUGIN_WIDGET));
+
+ mRegionalPluginLayout = static_cast<QGraphicsLinearLayout*>(headingPluginWidget->layout());
+
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::populateListWidget
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaViewWidget::populateListWidget()
+{
+ // Recycle the list items so that only needed rows
+ // are added or removed
+ if (mInstanceArray.count() == 0) {
+ // Reset the list
+ mEventsList->reset();
+ // Clear the model to ensure it does not have any old items
+ mListModel->clear();
+ return;
+ } else if (mInstanceArray.count() > mListModel->rowCount()) {
+ // There are more events than the number of items
+ // in the list. Add more rows
+ mListModel->insertRows(0, mInstanceArray.count() - mListModel->rowCount());
+ } else if (mInstanceArray.count() < mListModel->rowCount()) {
+ // There are less number of events than the number
+ // of items in the list. Remove the extra rows
+ mListModel->removeRows(0, mListModel->rowCount() - mInstanceArray.count());
+ }
+ mListModel->setColumnCount(singleColumn);
+
+ // Add all the events to the list
+ for (int index = 0; index < mInstanceArray.count(); index++) {
+ // Get each of the entry details
+ AgendaEntry entry = mInstanceArray[index];
+ // Create a list item for each entry
+ createListItem(index, entry);
+ }
+ // Add the item on to the list widget
+ mEventsList->setModel(mListModel, mListViewPrototype);
+
+ // Now get the item to scroll to
+ int scrollToIndex = getIndexToScrollTo();
+ if (mListModel->rowCount() > 0) {
+ // Scroll to the index only if index is valid
+ mEventsList->scrollTo(mListModel->index(scrollToIndex, 0));
+ }
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::getInstanceList
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaViewWidget::getInstanceList()
+{
+ // Clear the previous instance list
+ mInstanceArray.clear();
+
+ // Check if the date is valid
+ if (!CalenDateUtils::isValidDay(mDate)) {
+ mDate = CalenDateUtils::today();
+ }
+
+ // Set the filter flags to fetch all relevant entries
+ AgendaUtil::FilterFlags filter = AgendaUtil::FilterFlags(AgendaUtil::IncludeAnniversaries |
+ AgendaUtil::IncludeAppointments |
+ AgendaUtil::IncludeEvents |
+ AgendaUtil::IncludeReminders |
+ AgendaUtil::IncludeIncompletedTodos);
+
+ // Fetch the instance list from the agenda interface
+ mInstanceArray = mServices.agendaInterface()->createEntryIdListForDay(mDate, filter);
+
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::setDateToLabel
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaViewWidget::setHeadingText()
+ {
+ // Format the date as per the device locale settings
+ HbExtendedLocale systemLocale = HbExtendedLocale::system();
+
+ // Get localised name of the day from locale
+ QString dayString = systemLocale.dayName(mDate.date().dayOfWeek());
+ // Append a single space
+ dayString.append(singleSpace);
+ // Set the heading
+ // Append the date which is formatted as per the locale
+ mHeadingLabel->setHeading(hbTrId(
+ "txt_calendar_subhead_1_2").arg(dayString).arg(
+ systemLocale.format(mDate.date(), r_qtn_date_usual_with_zero)));
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::createListItem
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaViewWidget::createListItem(int index, AgendaEntry entry)
+{
+ if (index < 0 || entry.isNull()) {
+ // Not a valid index or entry. Dont do anything
+ return;
+ }
+ // Check if the entry is a timed entry
+ // TODO: Right now, only appointment/meeting type is being handled
+ // Handle other timed entry types like reminder etc
+ if (entry.isTimedEntry()) {
+ // Get the text and icon data for the entry
+ addTimedEventToList(index, entry);
+ } else {
+ addNonTimedEventToList(index, entry);
+ }
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::addTimedEventToList
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaViewWidget::addTimedEventToList(int index, AgendaEntry entry)
+{
+ // Create text and icon list to set to the model
+ QVariantList textData;
+ QVariantList iconData;
+ bool twoLines = false;
+
+ /**
+ * IMPORTANT NOTE: All the text and icon items must be
+ * inserted into the variant list in a specific order.
+ * If not, chaos will set it!!!
+ * On a more serious note, the mesh layout depends on the
+ * fact that the icons and text data will be added in a
+ * particular order. If one of the items go missing, the
+ * layout might get messed up. Also in case a particular item
+ * is not required to be added in the middle of the list, an
+ * empty QVariant must be added to indicate to the list view
+ * that the item must be removed from the layout.
+ * Do not mess with the order in case you are not sure what
+ * you are exactly doing.
+ */
+
+ // The first icon to show to-do or all day should not be shown
+ // Append empty data to the icons list
+ iconData << QVariant();
+
+ // Check if alarm is enabled for the entry
+ if (entry.alarm().isNull()) {
+ // Insert a blank icon. Else the next icon
+ // will get replaced in this icon's position
+ iconData << QVariant();
+ } else {
+ iconData << HbIcon(reminderIcon);
+ }
+
+ // Check if the entry is recurring
+ if (entry.isRepeating()) {
+ iconData << HbIcon(repeatIcon);
+ } else if (!entry.recurrenceId().isNull()) {
+ // This is an exceptional entry
+ iconData << HbIcon(exceptionIcon);
+ } else {
+ // Insert a blank icon. Else the next icon
+ // will get replaced in this icon's position
+ iconData << QVariant();
+ }
+
+ HbExtendedLocale locale = HbExtendedLocale::system();
+ // 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
+ 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
+ // would wrap to two lines
+ twoLines = true;
+ // Append '-' to indicate an end time is present
+ eventTime.append(singleHyphen);
+ } else {
+ // To align the subject properly if the start and endtime are same
+ eventTime.append(doubleSpace);
+ }
+
+ // Add the event time to the text list
+ // This MUST be the first item to be added to the list
+ textData << eventTime;
+
+ // Get the entry subject
+ QString subject = entry.summary();
+ if (subject.isEmpty() || subject.isNull()) {
+ // No subject. Add "(No subject)" text
+ subject.append(hbTrId("txt_calendar_dblist_unnamed"));
+ }
+ // Add the subject to the text list
+ // This MUST be the second item in the list
+ textData << subject;
+
+ // Check if the entry has location
+ // TODO: This must change to check for geo-location
+ // This MUST be the third item in the list
+ if (entry.location().isEmpty()) {
+ // Insert a blank icon. Else the next icon
+ // will get replaced in this icon's position
+ iconData << QVariant();
+ if (twoLines) {
+ /**
+ * NOTE: If the primary text is wrapping to two
+ * lines, then the location must be set as blank
+ * since the bottom of the list item is anchored to
+ * the bottom of the secondary text. Else the bottom
+ * of the list will overlap on the primary text
+ */
+ textData << singleSpace;
+ } else {
+ /**
+ * Else, set the secondary text to empty to indicate
+ * to the list view to remove the item itself and
+ * shrink its size to a single line size
+ */
+ textData << QVariant();
+ }
+ } else {
+ // TODO: Location icon must be shown
+ // only if valid geo-coordinates are present
+ if (!entry.geoValue().isNull()){
+ iconData << HbIcon(locationIcon);
+ }
+ else {
+ iconData << HbIcon();
+ }
+ textData << entry.location();
+ }
+ // Add the end time to the list item
+ if (eventStartTime < eventEndTime) {
+ QString endtime = locale.format(eventEndTime, r_qtn_time_usual_with_zero);
+ endtime.append(singleSpace);
+ textData << endtime;
+ }else {
+ textData<<QString(space);
+ }
+ // Get the list model index and set the text and icon data
+ QModelIndex listIndex = mListModel->index(index, 0);
+ mListModel->setData(listIndex, textData, Qt::DisplayRole);
+ mListModel->setData(listIndex, iconData, Qt::DecorationRole);
+
+ // Disable item stretching by removing the dynamic property
+ HbListViewItem *listViewItem = static_cast<HbListViewItem*>
+ (mEventsList->itemByIndex(mListModel->index(index, 0)));
+ if (listViewItem) {
+ listViewItem->setProperty(stretchLayout, false);
+ }
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::addNonTimedEventToList
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaViewWidget::addNonTimedEventToList(int index, AgendaEntry entry)
+{
+ QVariantList textData;
+ QVariantList iconData;
+
+ /**
+ * IMPORTANT NOTE: All the text and icon items must be
+ * inserted into the variant list in a specific order.
+ * If not, chaos will set it!!!
+ * On a more serious note, the mesh layout depends on the
+ * fact that the icons and text data will be added in a
+ * particular order. If one of the items go missing, the
+ * layout might get messed up. Also in case a particular item
+ * is not required to be added in the middle of the list, an
+ * empty QVariant must be added to indicate to the list view
+ * that the item must be removed from the layout.
+ * Do not mess with the order in case you are not sure what
+ * you are exactly doing.
+ */
+
+ // The first column text has to be empty
+ textData << QVariant();
+
+ // Get the entry subject
+ QString subject = entry.summary();
+ if (subject.isEmpty() || subject.isNull()) {
+ // No subject. Add "(No subject)" text
+ subject.append(hbTrId("txt_calendar_dblist_unnamed"));
+ }
+ // Add the subject to the text list
+ // This MUST be the second item in the list
+ textData << subject;
+
+ // Get the entry type
+ AgendaEntry::Type entryType = entry.type();
+
+ if (entryType == AgendaEntry::TypeAnniversary) {
+ // Nothing to do as of now as anniversary events
+ // cannot be created
+ // TODO: To be handled in case of sync
+ } else if (entryType == AgendaEntry::TypeEvent) {
+ // This is an all day event
+ // Append the all-day icon
+ iconData << HbIcon(allDayIcon);
+
+ // Check if alarm is enabled for the entry
+ if (entry.alarm().isNull()) {
+ // Insert a blank icon. Else next text item will get shifted to left
+ iconData << HbIcon();
+ } else {
+ // if entry is not repeating in place of reminder icon put a blank
+ // icon and move reminder icon to the place of repeating icon
+ if (!entry.isRepeating()) {
+ iconData << HbIcon();
+ }
+ iconData << HbIcon(reminderIcon);
+ }
+
+ // Check if the entry is recurring
+ if (entry.isRepeating()) {
+ iconData << HbIcon(repeatIcon);
+ } else {
+ // put the blank icon only when both reminder and repeating icons
+ // are not there
+ if (entry.alarm().isNull()) {
+ iconData << HbIcon();
+ }
+ }
+
+ // Append the location
+ if (!entry.location().isEmpty()) {
+ textData << entry.location();
+ // TODO: Location icon must be shown
+ // only if valid geo-coordinates are present
+ if (!entry.geoValue().isNull()){
+ iconData << HbIcon(locationIcon);
+ }else {
+ iconData << HbIcon();
+ }
+ } else {
+ textData << QVariant();
+ }
+ // The fourth text item has to be empty
+ textData << QVariant();
+
+ } else if (entryType == AgendaEntry::TypeTodo) {
+ // Append the to-do icon
+ iconData << HbIcon(toDoIcon);
+
+ // Get the due date
+ QDateTime dueDate = entry.endTime();
+
+ // Append the date first
+ QString dueDateString(hbTrId("txt_calendar_dblist_val_due_on_1"));
+ QString dueText;
+ dueText.setNum(dueDate.date().day());
+ dueText.append(singleSpace);
+
+ // Append the month name next
+ HbExtendedLocale locale = HbExtendedLocale::system();
+ QString month = locale.monthName(dueDate.date().month());
+ dueText.append(month);
+ dueText.append(singleSpace);
+
+ // Append the year
+ QString year;
+ year.setNum(dueDate.date().year());
+ dueText.append(year);
+
+ textData << dueDateString.arg(dueText);
+
+ // The fourth text item has to be empty
+ textData << QVariant();
+
+ // Check if alarm is enabled for the entry
+ if (entry.alarm().isNull()) {
+ // Insert a blank icon. Else next text item will get shifted to left
+ iconData << HbIcon();
+ } else {
+ // if entry is not repeating in place of reminder icon put a blank
+ // icon and move reminder icon to the place of repeating icon
+ if (!entry.isRepeating()) {
+ iconData << HbIcon();
+ }
+ iconData << HbIcon(reminderIcon);
+ }
+
+ // Check if the entry is recurring
+ if (entry.isRepeating()) {
+ iconData << HbIcon(repeatIcon);
+ } else {
+ // Insert the blank icon only when both reminder and repeating icons
+ // are not there
+ if (entry.alarm().isNull()) {
+ iconData << HbIcon();
+ }
+ }
+ }
+
+ // Get the list model index and set the text and icon data
+ QModelIndex listIndex = mListModel->index(index, 0);
+ mListModel->setData(listIndex, textData, Qt::DisplayRole);
+ mListModel->setData(listIndex, iconData, Qt::DecorationRole);
+
+ // Enable item stretching by adding the dynamic property
+ HbListViewItem *listViewItem = static_cast<HbListViewItem*>
+ (mEventsList->itemByIndex(mListModel->index(index, 0)));
+ Qt::Orientation orientation = mServices.MainWindow().orientation();
+ // Apply stretch only for landscape orientation
+ if (listViewItem) {
+ if (Qt::Horizontal == orientation) {
+ listViewItem->setProperty(stretchLayout, true);
+ } else {
+ listViewItem->setProperty(stretchLayout, false);
+ }
+ }
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::handleListItemStretching
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaViewWidget::handleListItemStretching(Qt::Orientation orientation)
+{
+ if (mInstanceArray.count() == 0) {
+ // Nothing much to do. Simply return
+ return;
+ }
+ for(int index = 0; index < mInstanceArray.count() ; index ++) {
+ AgendaEntry entry = mInstanceArray[index];
+ if (!entry.isNull()) {
+ AgendaEntry::Type eventType = entry.type();
+ switch(eventType) {
+ // Apply the stretching to only to-do's,
+ // anniversary and all-day event types
+ case AgendaEntry::TypeTodo:
+ case AgendaEntry::TypeEvent:
+ case AgendaEntry::TypeAnniversary:
+ {
+ // Get the list view item corresponding to the index
+ HbListViewItem *listItem = static_cast<HbListViewItem*>
+ (mEventsList->itemByIndex(mListModel->index(index, 0)));
+ if (listItem) {
+ if (orientation == Qt::Horizontal) {
+ // Set a dynamic property to indicate that this list item
+ // must be stretched in landscape.
+ // NOTE: Property name MUST match the name specified in
+ // css file, else wierd things might happen
+ listItem->setProperty(stretchLayout, true);
+ }
+ }
+ }
+ break;
+ default:
+ {
+ HbListViewItem *listItem = static_cast<HbListViewItem*>
+ (mEventsList->itemByIndex(mListModel->index(index, 0)));
+ if (listItem) {
+ listItem->setProperty(stretchLayout, false);
+ }
+ break;
+ }
+ }
+ }
+ }
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::getIndexToScrollTo
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+int CalenAgendaViewWidget::getIndexToScrollTo()
+{
+ int scrollIndex = 0;
+ TCalenInstanceId instanceId = mServices.Context().instanceId();
+ if (instanceId == TCalenInstanceId::nullInstanceId()) {
+ // If the instance is not set, then scroll to zero index
+ return scrollIndex;
+ }
+
+ for (int index = 0 ; index < mInstanceArray.count() ; index++) {
+ AgendaEntry entry = mInstanceArray[index];
+ if (entry.id() == instanceId.mEntryLocalUid) {
+ // Match found.
+ scrollIndex = index;
+ break;
+ }
+ }
+ return scrollIndex;
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::showHideRegionalInformation
+// To Show and hide regional plugin label depends upon settings
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaViewWidget::showHideRegionalInformation()
+{
+ if (mView->pluginEnabled()) {
+ XQSettingsKey regionalInfo(XQSettingsKey::TargetCentralRepository,
+ KCRUidCalendar, KCalendarShowRegionalInfo);
+
+ int showRegionalInfo =
+ mSettingsManager->readItemValue(regionalInfo).toUInt();
+ if (showRegionalInfo) {
+
+ if (!mRegionalInfoGroupBox) {
+ mRegionalInfoGroupBox = new HbGroupBox();
+ CalenPluginLabel *regionalInfo = new CalenPluginLabel(
+ mServices, this);
+ regionalInfo->setFontSpec(HbFontSpec(HbFontSpec::Primary));
+ mRegionalInfoGroupBox->setContentWidget(regionalInfo);
+ mRegionalPluginLayout->insertItem(1, mRegionalInfoGroupBox);
+ }
+ QString *pluginString = mView->pluginText();
+ HbLabel *pluginInfoLabel = qobject_cast <HbLabel *>
+ (mRegionalInfoGroupBox->contentWidget());
+ pluginInfoLabel->setPlainText(*pluginString);
+ }
+ } else {
+ if (mRegionalInfoGroupBox) {
+ mRegionalPluginLayout->removeItem(mRegionalInfoGroupBox);
+ delete mRegionalInfoGroupBox;
+ mRegionalInfoGroupBox = NULL;
+ }
+ }
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::createNewEvent
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaViewWidget::createNewEvent()
+{
+ // Issue a command to launch editor to create
+ // a new event
+ mServices.IssueCommandL(ECalenNewMeeting);
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::editEntry
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaViewWidget::editEntry()
+{
+ // Check if the selected index is valid
+ if (mSelectedIndex < 0 || mSelectedIndex > mInstanceArray.count()) {
+ return;
+ }
+
+ // Get the entry details first
+ AgendaEntry entry = mInstanceArray[mSelectedIndex];
+ if (AgendaEntry::TypeTodo == entry.type()) {
+ // Load the notes editor plugin if not loaded.
+ if (!mNotesPluginLoaded) {
+ // Launch the to-do editor using notes editor plugin api
+ QDir dir(NOTES_EDITOR_PLUGIN_PATH);
+ QString pluginName = dir.absoluteFilePath(NOTES_EDITOR_PLUGIN_NAME);
+
+ // Create NotesEditor plugin loader object.
+ mNotesEditorPluginLoader = new QPluginLoader(pluginName);
+
+ // Load the plugin
+ mNotesPluginLoaded = mNotesEditorPluginLoader->load();
+ }
+
+ QObject *plugin = qobject_cast<QObject*> (
+ mNotesEditorPluginLoader->instance());
+
+ NotesEditorInterface* interface =
+ qobject_cast<NotesEditorInterface*>(plugin);
+
+ interface->edit(entry, mServices.agendaInterface());
+
+ connect(
+ interface, SIGNAL(editingCompleted(bool)),
+ this, SLOT(noteEditingCompleted(bool)));
+ } else {
+ // Set the context
+ setContextFromHighlight(entry);
+ // Issue a command to launch the editor to edit this entry
+ mServices.IssueCommandL(ECalenEditCurrentEntry);
+ }
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::viewEntry
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaViewWidget::viewEntry()
+{
+ // Get the entry details first
+ AgendaEntry entry = mInstanceArray[mSelectedIndex];
+
+ // Set the context
+ setContextFromHighlight(entry);
+
+ // Launch the event viewer.
+ mServices.IssueCommandL(ECalenEventView);
+}
+
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::deleteEntry
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaViewWidget::deleteEntry()
+{
+ // Check if the selected index is valid
+ if (mSelectedIndex < 0 || mSelectedIndex > mInstanceArray.count()) {
+ return;
+ }
+
+ // Get the entry details
+ AgendaEntry entry = mInstanceArray[mSelectedIndex];
+ // Set the context
+ setContextFromHighlight(entry);
+ // Issue the command to delete the entry
+ mServices.IssueCommandL(ECalenDeleteCurrentEntry);
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::markAsDone
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaViewWidget::markAsDone()
+{
+ // Check if the selected index is valid
+ if (mSelectedIndex < 0 || mSelectedIndex > mInstanceArray.count()) {
+ return;
+ }
+
+ // Get the entry details
+ AgendaEntry entry = mInstanceArray[mSelectedIndex];
+
+ // Check again if the event is of type to-to
+ if (AgendaEntry::TypeTodo == entry.type()) {
+ // Set the status of the to-do as completed
+ entry.setStatus(AgendaEntry::TodoCompleted);
+ // Update the completed date and time
+ entry.setCompletedDateTime(mDate);
+
+ // Update the entry in the database
+ mServices.agendaInterface()->setCompleted(entry, true, mDate);
+ mServices.IssueCommandL(ECalenStartActiveStep);
+ }
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::itemLongPressed
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaViewWidget::itemLongPressed(HbAbstractViewItem* listViewItem,
+ const QPointF& coords)
+{
+ mLongTapEventFlag = true;
+ // Update the selection index first
+ mSelectedIndex = listViewItem->modelIndex().row();
+
+ if (mSelectedIndex < 0 || mSelectedIndex > mInstanceArray.count()) {
+ // Invalid index
+ return;
+ }
+
+ AgendaEntry entry = mInstanceArray[mSelectedIndex];
+
+ // Create new menu.
+ HbMenu *contextMenu = new HbMenu();
+
+ // Add the open option
+ HbAction *openAction = contextMenu->addAction(
+ hbTrId("txt_common_menu_open"));
+
+ // Check the type of event
+ if (AgendaEntry::TypeTodo == entry.type()) {
+ // Add an option to mark the note as complete
+ HbAction *completeAction = contextMenu->addAction(
+ hbTrId("txt_calendar_menu_mark_as_done"));
+ }
+
+ // Add the edit option
+ HbAction *editAction = contextMenu->addAction(
+ hbTrId("txt_common_menu_edit"));
+
+ // Add the delete option
+ HbAction *deleteAction = contextMenu->addAction(
+ hbTrId("txt_common_menu_delete"));
+
+ contextMenu->setDismissPolicy(HbMenu::TapAnywhere);
+
+ // Show context sensitive menu.
+ // Param const QPointF& coordinate - is a longpress position.
+ contextMenu->setPreferredPos(coords);
+ connect(contextMenu, SIGNAL(aboutToClose()),
+ this,
+ SLOT(contextMenuClosed()));
+
+ contextMenu->open(this, SLOT(contextManuTriggered(HbAction *)));
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::itemActivated
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaViewWidget::itemActivated(const QModelIndex &index)
+{
+ // Update the selection index first
+ mSelectedIndex = index.row();
+
+ // Check if the selected index is valid
+ if (mSelectedIndex < 0 || mSelectedIndex > mInstanceArray.count()) {
+ return;
+ }
+ if( !mLongTapEventFlag ) {
+ // Open the event for viewing
+ viewEntry();
+ }
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::itemActivated
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaViewWidget::noteEditingCompleted(bool status)
+{
+ // We need to refresh the list since user
+ // might have marked the to-do as complete or
+ // edited it or deleted it. So get the instance
+ // list again
+ if (status) {
+ mServices.IssueCommandL(ECalenStartActiveStep);
+ }
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::goToToday
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaViewWidget::goToToday()
+{
+ // First check if we are not already
+ // showing today's agenda
+ if (mDate == CalenDateUtils::today()) {
+ return;
+ }
+
+ // Set the context for the current day
+ mServices.Context().setFocusDate(CalenDateUtils::today());
+
+ mView->refreshViewOnGoToDate();
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::contextMenuClosed
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaViewWidget::contextMenuClosed()
+{
+ mLongTapEventFlag = false;
+}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::contextManuTriggered
+// Rest of the details are commented in the header
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaViewWidget::contextManuTriggered(HbAction *action)
+{
+ if (action->text() == hbTrId("txt_common_menu_open")) {
+ viewEntry();
+ } else if (action->text() == hbTrId("txt_calendar_menu_mark_as_done")) {
+ markAsDone();
+ } else if (action->text() == hbTrId("txt_common_menu_edit")) {
+ editEntry();
+ } else {
+ if (action->text() == hbTrId("txt_common_menu_delete")) {
+ deleteEntry();
+ }
+ }
+}
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::clearListModel
+// clears the list model
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaViewWidget::clearListModel()
+ {
+ mListModel->clear();
+ }
+
+// End of file --Don't remove this.
--- a/calendarui/views/src/calendayview.cpp Wed Jun 23 18:11:28 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,322 +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: CalenDayView implementation.
-*
-*/
-
-// System includes
-#include <QGraphicsSceneEvent>
-#include <hbmainwindow.h>
-#include <hbaction.h>
-#include <hbpangesture.h>
-#include <hbswipegesture.h>
-#include <hbapplication.h> // hbapplication
-#include <hbactivitymanager.h> // Activity Manager
-
-// User includes
-#include "calendayview.h"
-#include "calendocloader.h"
-#include "calendayviewwidget.h"
-#include "calenservices.h"
-#include "calencommon.h"
-#include "calencontext.h"
-#include "calendateutils.h"
-#include "calenconstants.h"
-
-// ----------------------------------------------------------------------------
-// CalenDayView::CalenDayView
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-CalenDayView::CalenDayView(MCalenServices &services):
-CalenNativeView(services),
-mSoftKeyAction(NULL),
-mGoToTodayAction(NULL),
-mActionTaken(false),
-mIsAboutToQuitEventConnected(false)
-{
- // No implementation yet
- grabGesture(Qt::SwipeGesture);
-}
-
-// ----------------------------------------------------------------------------
-// CCalenDayView::~CalenDayView
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-CalenDayView::~CalenDayView()
-{
- // No implementation yet
-}
-
-// ----------------------------------------------------------------------------
-// CCalenDayView::setupView
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayView::setupView(CalenDocLoader *docLoader)
-{
- if (!docLoader) {
- // Nothing can be done. Simply return
- return;
- }
- // Store the document loader for reference later
- mDocLoader = docLoader;
-
- // Listen to orientation change events
- connect(&(mServices.MainWindow()), SIGNAL(orientationChanged(Qt::Orientation)),
- this, SLOT(orientationChanged(Qt::Orientation)));
-
- // Get the pointer to the content widget
- mDayViewWidget = qobject_cast<CalenDayViewWidget*>(mDocLoader->findWidget(CALEN_DAYVIEW_WIDGET));
- if (!mDayViewWidget) {
- qFatal("calendayview.cpp : Unable to find the content widget");
- }
- mDayViewWidget->setupWidget(this);
-
- // Initialize all the menu and toolbar actions
- setupActions();
- // get a poitner to activity manager
- HbActivityManager* activityManager = qobject_cast<HbApplication*>(qApp)->activityManager();
-
- // clean up any previous versions of this activity, if any, i.e. activityName, from the activity manager.
- // Ignore return value, first boot would always return False. bool declared
- // only for debugging purpose.
- bool ok = activityManager->removeActivity(activityName);
-
-}
-
-// ----------------------------------------------------------------------------
-// CCalenDayView::doPopulation
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayView::doPopulation()
- {
- // The content widget has not been constructed. Don't do anything
- if (!mDayViewWidget) {
- return;
- }
- // 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);
- }
- }
-
- // Set self as the current view
- // mServices.MainWindow().setCurrentView(this);
-
- // Dont override the soft key behavior if day view is the first view
- if (ECalenDayView != mServices.getFirstView()) {
- mSoftKeyAction = new HbAction(Hb::BackNaviAction);
- setNavigationAction(mSoftKeyAction);
- // Connect to the signal triggered by clicking on back button.
- connect(mSoftKeyAction, SIGNAL(triggered()), this,
- SLOT(launchMonthView()));
- }
- // Initialize the content widget
- mDayViewWidget->showWidget();
-
- //set Current Activity as day view
- mActivityId = ECalenDayView;
-
- // connect to receive a call back on Day View exit. Call back would result in saveActivity
- // to be called in Native View
- if (!mIsAboutToQuitEventConnected) // check if already not connected
- {
- connect(qobject_cast<HbApplication*>(qApp), SIGNAL(aboutToQuit()), this, SLOT(saveActivity()));
- mIsAboutToQuitEventConnected = true;
- }
-
-
- // Population is complete, issue a notification
- 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
-// ----------------------------------------------------------------------------
-//
-void CalenDayView::HandleNotification(const TCalenNotification notification)
-{
- Q_UNUSED(notification)
- // No implementation yet
-}
-
-// ----------------------------------------------------------------------------
-// CCalenDayView::docLoader
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-CalenDocLoader* CalenDayView::docLoader()
-{
- return mDocLoader;
-}
-
-/*
- Function to listen for gestures
-*/
-void CalenDayView::gestureEvent(QGestureEvent *event)
-{
- if(HbSwipeGesture *gesture = qobject_cast<HbSwipeGesture *>(event->gesture(Qt::SwipeGesture))) {
- if (gesture->state() == Qt::GestureStarted) {
- if(QSwipeGesture::Left == gesture->horizontalDirection()) {
- mServices.IssueCommandL(ECalenShowNextDay);
- event->accept(Qt::SwipeGesture);
- } else if(QSwipeGesture::Right == gesture->horizontalDirection()) {
- mServices.IssueCommandL(ECalenShowPrevDay);
- event->accept(Qt::SwipeGesture);
- }
- }
- }
-}
-
-// ----------------------------------------------------------------------------
-// CCalenDayView::createToolBar
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayView::setupActions()
-{
- // Get the actions associated with this view
- HbAction *newEventAction = qobject_cast<HbAction *>
- (mDocLoader->findObject(CALEN_DAYVIEW_MENU_NEW_EVENT));
- if (!newEventAction) {
- qFatal("calendayview.cpp : Unable to find new event action");
- }
- // Connect to the signal triggered by new event action
- connect(newEventAction, SIGNAL(triggered()), mDayViewWidget, SLOT(createNewEvent()));
-
- mGoToTodayAction = qobject_cast<HbAction *>
- (mDocLoader->findObject(CALEN_DAYVIEW_MENU_GO_TO_TODAY));
- if (!mGoToTodayAction) {
- qFatal("calendayview.cpp : Unable to find go to today action");
- }
- // Connect to the signal triggered by new event action
- connect(mGoToTodayAction, SIGNAL(triggered()), mDayViewWidget, SLOT(goToToday()));
-
- HbAction *goToDateAction = qobject_cast<HbAction *>
- (mDocLoader->findObject(CALEN_DAYVIEW_MENU_GO_TO_DATE));
- if (!goToDateAction) {
- qFatal("calendayview.cpp : Unable to find go to date action");
- }
- // Connect to the signal triggered by new event action
- connect(goToDateAction, SIGNAL(triggered()), this, SLOT(goToDate()));
-
- HbAction *settingsAction = qobject_cast<HbAction *>
- (mDocLoader->findObject(CALEN_DAYVIEW_MENU_SETTINGS));
- if (!settingsAction) {
- qFatal("calendayview.cpp : Unable to find settings action");
- }
- // Connect to the signal triggered by new event action
- connect(settingsAction, SIGNAL(triggered()), this, SLOT(launchSettingsView()));
-}
-
-// ----------------------------------------------------------------------------
-// CCalenDayView::onLocaleChanged
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayView::onLocaleChanged(int reason)
-{
- Q_UNUSED(reason)
- // Notify the content widget about the change
- if(mDayViewWidget) {
- mDayViewWidget->handleLocaleChange();
- }
-}
-
-// ----------------------------------------------------------------------------
-// CCalenDayView::orientationChanged
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayView::orientationChanged(Qt::Orientation orientation)
-{
- // Notify the content widget about the change
- if (mDayViewWidget) {
- mDayViewWidget->orientationChanged(orientation);
- }
-}
-
-// ----------------------------------------------------------------------------
-// CCalenDayView::launchMonthView
-// ----------------------------------------------------------------------------
-//
-void CalenDayView::launchMonthView()
-{
- // Issue the command to launch the month view
- mServices.IssueCommandL(ECalenMonthView);
- // month view launched now, disconnect to get the call backs for saveActivity
- // on aboutToQuit signal
- disconnectAboutToQuitEvent();
-}
-
-// ----------------------------------------------------------------------------
-// CCalenDayView::clearListModel
-// clears the list model
-// ----------------------------------------------------------------------------
-//
-void CalenDayView::clearListModel()
- {
- // day view is removed from the list disconnect for aboutToQuit events
- disconnectAboutToQuitEvent();
- mDayViewWidget->clearListModel();
- }
-
-// ----------------------------------------------------------------------------
-// disconnectAboutToQuitEvent disconnects for the aboutToQuit events
-// ----------------------------------------------------------------------------
-//
-void CalenDayView::disconnectAboutToQuitEvent()
- {
- if (mIsAboutToQuitEventConnected)
- {
- disconnect(qobject_cast<HbApplication*>(qApp), SIGNAL(aboutToQuit()), this, SLOT(saveActivity()));
- mIsAboutToQuitEventConnected = false;
- }
- }
-
-// End of file --Don't remove this.
--- a/calendarui/views/src/calendayviewwidget.cpp Wed Jun 23 18:11:28 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1136 +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: CalenDayViewWidget implementation
-*
-*/
-
-// System includes
-#include <QStandardItemModel>
-#include <QGraphicsSceneEvent>
-#include <QDir>
-#include <QPluginLoader>
-#include <hbi18ndef.h>
-#include <hbextendedlocale.h>
-#include <hbgroupbox.h>
-#include <hbmenu.h>
-#include <hbaction.h>
-#include <hbmainwindow.h>
-#include <hbstyleloader.h>
-#include <hbdatetimepicker.h>
-#include <hbdialog.h>
-#include <xqsettingsmanager.h>
-#include <agendautil.h>
-#include <NotesEditorInterface>
-
-// User includes
-#include "calendayviewwidget.h"
-#include "calencommon.h"
-#include "calendayview.h"
-#include "calendocloader.h"
-#include "calenservices.h"
-#include "calencontext.h"
-#include "calendateutils.h"
-#include "CalenUid.h"
-#include "caleneventlistviewitem.h"
-#include "calenpluginlabel.h"
-#include "calendarprivatecrkeys.h"
-
-// Constants
-static const QString singleSpace(" ");
-static const QString newLine("\n");
-static const QString customLayout("custom");
-static const char *stretchLayout("stretchItem");
-// TODO: Replace with actual image names later
-static const QString toDoIcon("qtg_small_todo");
-static const QString reminderIcon("qtg_mono_alarm");
-static const QString locationIcon("qtg_mono_location");
-static const QString repeatIcon("qtg_mono_repeat");
-static const QString allDayIcon(":/qgn_indi_cdr_meeting_layer0.svg");
-static const QString exceptionIcon(":/qtg_mono_exception.png");
-static const int singleColumn(1);
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::CalenDayViewWidget
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-EXPORT_C CalenDayViewWidget::CalenDayViewWidget(MCalenServices &services,
- CalenDocLoader *docLoader) :
-mServices(services),
-mDocLoader(docLoader),
-mRegionalInfoGroupBox(NULL),
-mLongTapEventFlag(false),
-mNotesPluginLoaded(false)
-{
- // Construct the list view prototype
- mListViewPrototype = new CalenEventListViewItem(this);
-
- // Create the list model
- mListModel = new QStandardItemModel(this);
-
- // 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);
-}
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::~CalenDayViewWidget
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-EXPORT_C CalenDayViewWidget::~CalenDayViewWidget()
-{
- // Unload notes editor if loaded.
- if (mNotesEditorPluginLoader) {
- mNotesEditorPluginLoader->unload();
- delete mNotesEditorPluginLoader;
- mNotesEditorPluginLoader = 0;
- }
-
- if (mListViewPrototype) {
- delete mListViewPrototype;
- mListViewPrototype = NULL;
- }
- if (mListModel) {
- // Do not delete the model since its owned by the view
- mListModel->clear();
- }
-}
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::setupWidget
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayViewWidget::setupWidget(CalenDayView *view)
-{
- // Store the view for future reference
- mView = view;
-
- if (!mDocLoader) {
- // Nothing much can be done. Simply return
- return;
- }
-
- // Initialize the child widgets
- initChildWidgets();
-}
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::showWidget
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayViewWidget::showWidget()
-{
- // Get the date for which this view has been launched
- mDate = mServices.Context().focusDateAndTimeL();
-
- // Set the heading text
- setHeadingText();
-
- // 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()) {
- // There are no entries for the day
- // Load and show the empty list section
- bool loadSuccess = false;
-
- // Hide the list which shows the events
- mEventsList->hide();
-
- // Show the empty list text
- mEmptyListLabel->show();
-
- // Get the current device orientation
- int orientation = mServices.MainWindow().orientation();
- if (Qt::Vertical == orientation) {
- mDocLoader->load(CALEN_DAYVIEW_XML_FILE, "emptyList", &loadSuccess);
- } else {
- mDocLoader->load(CALEN_DAYVIEW_XML_FILE, "emptyLandscape", &loadSuccess);
- }
- if (!loadSuccess) {
- qFatal("calendayviewwidget.cpp : Unable to load empty list section");
- }
- } else {
- // Hide the empty view label
- mEmptyListLabel->hide();
-
- // Show the events list
- mEventsList->show();
-
- // There are one or more events. Load the non-empty section
- bool loadSuccess = false;
- mDocLoader->load(CALEN_DAYVIEW_XML_FILE, "nonEmptyList", &loadSuccess);
- if (!loadSuccess) {
- qFatal("calendayviewwidget.cpp : Unable to load non-empty list section");
- }
- // Now populate the list with the events
- populateListWidget();
- }
-}
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::orientationChanged
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayViewWidget::orientationChanged(Qt::Orientation orientation)
-{
- // Load the appropriate section based on the number of events for the day
- if (0 == mInstanceArray.count()) {
- // There are no entries for the day
- // Load and show the empty list section
- bool loadSuccess = false;
-
- // Hide the list which shows the events
- mEventsList->hide();
-
- // Show the empty list text
- mEmptyListLabel->show();
-
- if (Qt::Vertical == orientation) {
- mDocLoader->load(CALEN_DAYVIEW_XML_FILE, "emptyList", &loadSuccess);
- } else {
- mDocLoader->load(CALEN_DAYVIEW_XML_FILE, "emptyLandscape", &loadSuccess);
- }
- if (!loadSuccess) {
- qFatal("calendayviewwidget.cpp : Unable to load empty list section");
- }
- } else {
- // Hide the empty view label
- mEmptyListLabel->hide();
-
- // Show the events list
- mEventsList->show();
-
- // There are one or more events. Load the non-empty section
- bool loadSuccess = false;
- mDocLoader->load(CALEN_DAYVIEW_XML_FILE, "nonEmptyList", &loadSuccess);
- if (!loadSuccess) {
- qFatal("calendayviewwidget.cpp : Unable to load non-empty list section");
- }
- handleListItemStretching(orientation);
- }
-}
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::handleLocaleChange
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayViewWidget::handleLocaleChange()
-{
-
-}
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::setContextFromHighlight
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayViewWidget::setContextFromHighlight(AgendaEntry entry)
-{
- if (entry.isTimedEntry()) {
- // Timed entry.
- QDateTime start = entry.startTime();
- // start.setDate(mDate.date());
- mServices.Context().setFocusDateAndTimeAndInstanceL(start,
- TCalenInstanceId::create(entry),
- KCalenDayViewUidValue);
- } else {
- // Untimed entry.
- if (CalenDateUtils::onSameDay(TCalenInstanceId::create(entry).mInstanceTime,
- mDate)) {
- mServices.Context().setInstanceIdL(TCalenInstanceId::create(entry),
- KCalenDayViewUidValue);
- } else {
- // Multi-day untimed note (either multi-day day note or weird todo).
- // Focus on the instance and set the focus time to the highlighted day.
- mServices.Context().setFocusDateAndTimeAndInstanceL(mDate,
- TCalenInstanceId::create(entry),
- KCalenDayViewUidValue);
- }
- }
-}
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::initChildWidgets
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayViewWidget::initChildWidgets()
-{
- // Get the pointer to the events list
- mEventsList = static_cast<HbListView*> (mDocLoader->findWidget(CALEN_DAYVIEW_LISTWIDGET));
- if (!mEventsList) {
- qFatal("calendayviewwidget.cpp : Unable to find the events list");
- }
- // NOTE: Layout name MUST be same as the name mentioned in the css
- mEventsList->setLayoutName(customLayout);
-
- // TODO : remove this line after gestures are available
- mEventsList->installEventFilter(mView);
-
- // Connect to the long press and activation signals
- connect(mEventsList, SIGNAL(longPressed(HbAbstractViewItem*, const QPointF&)),
- this, SLOT(itemLongPressed(HbAbstractViewItem*, const QPointF&)));
- connect(mEventsList, SIGNAL(activated(const QModelIndex&)), this,
- SLOT(itemActivated(const QModelIndex&)));
-
- // Get the pointer to label from the loader.
- mHeadingLabel = qobject_cast<HbGroupBox*> (mDocLoader->findWidget(CALEN_DAYVIEW_HEADING));
- if (!mHeadingLabel) {
- qFatal("calendayviewwidget.cpp : Unable to find heading widget");
- }
-
- // Get the pointer to the empty view label
- mEmptyListLabel = qobject_cast<HbLabel*> (mDocLoader->findWidget("noEventsLabel"));
- 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());
-
-}
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::populateListWidget
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayViewWidget::populateListWidget()
-{
- // Recycle the list items so that only needed rows
- // are added or removed
- if (mInstanceArray.count() == 0) {
- // Reset the list
- mEventsList->reset();
- // Clear the model to ensure it does not have any old items
- mListModel->clear();
- return;
- } else if (mInstanceArray.count() > mListModel->rowCount()) {
- // There are more events than the number of items
- // in the list. Add more rows
- mListModel->insertRows(0, mInstanceArray.count() - mListModel->rowCount());
- } else if (mInstanceArray.count() < mListModel->rowCount()) {
- // There are less number of events than the number
- // of items in the list. Remove the extra rows
- mListModel->removeRows(0, mListModel->rowCount() - mInstanceArray.count());
- }
- mListModel->setColumnCount(singleColumn);
-
- // Add all the events to the list
- for (int index = 0; index < mInstanceArray.count(); index++) {
- // Get each of the entry details
- AgendaEntry entry = mInstanceArray[index];
- // Create a list item for each entry
- createListItem(index, entry);
- }
- // Add the item on to the list widget
- mEventsList->setModel(mListModel, mListViewPrototype);
-
- // Now get the item to scroll to
- int scrollToIndex = getIndexToScrollTo();
- if (mListModel->rowCount() > 0) {
- // Scroll to the index only if index is valid
- mEventsList->scrollTo(mListModel->index(scrollToIndex, 0));
- }
-}
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::getInstanceList
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayViewWidget::getInstanceList()
-{
- // Clear the previous instance list
- mInstanceArray.clear();
-
- // Check if the date is valid
- if (!CalenDateUtils::isValidDay(mDate)) {
- mDate = CalenDateUtils::today();
- }
-
- // Set the filter flags to fetch all relevant entries
- AgendaUtil::FilterFlags filter = AgendaUtil::FilterFlags(AgendaUtil::IncludeAnniversaries |
- AgendaUtil::IncludeAppointments |
- AgendaUtil::IncludeEvents |
- AgendaUtil::IncludeReminders |
- AgendaUtil::IncludeIncompletedTodos);
-
- // Fetch the instance list from the agenda interface
- mInstanceArray = mServices.agendaInterface()->createEntryIdListForDay(mDate, filter);
-
- if (0 == mInstanceArray.count()) {
- // There are no events to populate
- // Hide the events list
- mEventsList->hide();
- // Show the empty list text
- mEmptyListLabel->show();
- return;
- }
-}
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::setDateToLabel
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayViewWidget::setHeadingText()
- {
- // Format the date as per the device locale settings
- HbExtendedLocale systemLocale = HbExtendedLocale::system();
-
- // Get localised name of the day from locale
- QString dayString = systemLocale.dayName(mDate.date().dayOfWeek());
- // Append a single space
- dayString.append(singleSpace);
- // Set the heading
- // Append the date which is formatted as per the locale
- mHeadingLabel->setHeading(hbTrId(
- "txt_calendar_subhead_1_2").arg(dayString).arg(
- systemLocale.format(mDate.date(), r_qtn_date_usual_with_zero)));
-}
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::createListItem
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayViewWidget::createListItem(int index, AgendaEntry entry)
-{
- if (index < 0 || entry.isNull()) {
- // Not a valid index or entry. Dont do anything
- return;
- }
- // Check if the entry is a timed entry
- // TODO: Right now, only appointment/meeting type is being handled
- // Handle other timed entry types like reminder etc
- if (entry.isTimedEntry()) {
- // Get the text and icon data for the entry
- addTimedEventToList(index, entry);
- } else {
- addNonTimedEventToList(index, entry);
- }
-}
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::addTimedEventToList
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayViewWidget::addTimedEventToList(int index, AgendaEntry entry)
-{
- // Create text and icon list to set to the model
- QVariantList textData;
- QVariantList iconData;
- bool twoLines = false;
-
- /**
- * IMPORTANT NOTE: All the text and icon items must be
- * inserted into the variant list in a specific order.
- * If not, chaos will set it!!!
- * On a more serious note, the mesh layout depends on the
- * fact that the icons and text data will be added in a
- * particular order. If one of the items go missing, the
- * layout might get messed up. Also in case a particular item
- * is not required to be added in the middle of the list, an
- * empty QVariant must be added to indicate to the list view
- * that the item must be removed from the layout.
- * Do not mess with the order in case you are not sure what
- * you are exactly doing.
- */
-
- // The first icon to show to-do or all day should not be shown
- // Append empty data to the icons list
- iconData << QVariant();
-
- // Check if alarm is enabled for the entry
- if (entry.alarm().isNull()) {
- // Insert a blank icon. Else the next icon
- // will get replaced in this icon's position
- iconData << QVariant();
- } else {
- iconData << HbIcon(reminderIcon);
- }
-
- // Check if the entry is recurring
- if (entry.isRepeating()) {
- iconData << HbIcon(repeatIcon);
- } else if (!entry.recurrenceId().isNull()) {
- // This is an exceptional entry
- iconData << HbIcon(exceptionIcon);
- } else {
- // Insert a blank icon. Else the next icon
- // will get replaced in this icon's position
- iconData << QVariant();
- }
-
- HbExtendedLocale locale = HbExtendedLocale::system();
- // 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
- 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
- // would wrap to two lines
- twoLines = true;
- // Append '-' to indicate an end time is present
- eventTime.append("-");
- } else {
- // To align the subject properly if the start and endtime are same
- eventTime.append(" ");
- }
-
- // Add the event time to the text list
- // This MUST be the first item to be added to the list
- textData << eventTime;
-
- // Get the entry subject
- QString subject = entry.summary();
- if (subject.isEmpty() || subject.isNull()) {
- // No subject. Add "(No subject)" text
- subject.append(hbTrId("txt_calendar_dblist_unnamed"));
- }
- // Add the subject to the text list
- // This MUST be the second item in the list
- textData << subject;
-
- // Check if the entry has location
- // TODO: This must change to check for geo-location
- // This MUST be the third item in the list
- if (entry.location().isEmpty()) {
- // Insert a blank icon. Else the next icon
- // will get replaced in this icon's position
- iconData << QVariant();
- if (twoLines) {
- /**
- * NOTE: If the primary text is wrapping to two
- * lines, then the location must be set as blank
- * since the bottom of the list item is anchored to
- * the bottom of the secondary text. Else the bottom
- * of the list will overlap on the primary text
- */
- textData << singleSpace;
- } else {
- /**
- * Else, set the secondary text to empty to indicate
- * to the list view to remove the item itself and
- * shrink its size to a single line size
- */
- textData << QVariant();
- }
- } else {
- // TODO: Location icon must be shown
- // only if valid geo-coordinates are present
- // iconData << HbIcon(locationIcon);
- textData << entry.location();
- }
- // Add the end time to the list item
- if (eventStartTime < eventEndTime) {
- QString endtime = locale.format(eventEndTime, r_qtn_time_usual_with_zero);
- endtime.append(" ");
- textData << endtime;
- }else {
- textData<<QString(" ");
- }
- // Get the list model index and set the text and icon data
- QModelIndex listIndex = mListModel->index(index, 0);
- mListModel->setData(listIndex, textData, Qt::DisplayRole);
- mListModel->setData(listIndex, iconData, Qt::DecorationRole);
-
- // Disable item stretching by removing the dynamic property
- HbListViewItem *listViewItem = static_cast<HbListViewItem*>
- (mEventsList->itemByIndex(mListModel->index(index, 0)));
- if (listViewItem) {
- listViewItem->setProperty(stretchLayout, false);
- }
-}
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::addNonTimedEventToList
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayViewWidget::addNonTimedEventToList(int index, AgendaEntry entry)
-{
- QVariantList textData;
- QVariantList iconData;
-
- /**
- * IMPORTANT NOTE: All the text and icon items must be
- * inserted into the variant list in a specific order.
- * If not, chaos will set it!!!
- * On a more serious note, the mesh layout depends on the
- * fact that the icons and text data will be added in a
- * particular order. If one of the items go missing, the
- * layout might get messed up. Also in case a particular item
- * is not required to be added in the middle of the list, an
- * empty QVariant must be added to indicate to the list view
- * that the item must be removed from the layout.
- * Do not mess with the order in case you are not sure what
- * you are exactly doing.
- */
-
- // The first column text has to be empty
- textData << QVariant();
-
- // Get the entry subject
- QString subject = entry.summary();
- if (subject.isEmpty() || subject.isNull()) {
- // No subject. Add "(No subject)" text
- subject.append(hbTrId("txt_calendar_dblist_unnamed"));
- }
- // Add the subject to the text list
- // This MUST be the second item in the list
- textData << subject;
-
- // Get the entry type
- AgendaEntry::Type entryType = entry.type();
-
- if (entryType == AgendaEntry::TypeAnniversary) {
- // Nothing to do as of now as anniversary events
- // cannot be created
- // TODO: To be handled in case of sync
- } else if (entryType == AgendaEntry::TypeEvent) {
- // This is an all day event
- // Append the all-day icon
- iconData << HbIcon(allDayIcon);
-
- // Check if alarm is enabled for the entry
- if (entry.alarm().isNull()) {
- // Insert a blank icon. Else next text item will get shifted to left
- iconData << HbIcon();
- } else {
- // if entry is not repeating in place of reminder icon put a blank
- // icon and move reminder icon to the place of repeating icon
- if (!entry.isRepeating()) {
- iconData << HbIcon();
- }
- iconData << HbIcon(reminderIcon);
- }
-
- // Check if the entry is recurring
- if (entry.isRepeating()) {
- iconData << HbIcon(repeatIcon);
- } else {
- // put the blank icon only when both reminder and repeating icons
- // are not there
- if (entry.alarm().isNull()) {
- iconData << HbIcon();
- }
- }
-
- // Append the location
- if (!entry.location().isEmpty()) {
- textData << entry.location();
- // TODO: Location icon must be shown
- // only if valid geo-coordinates are present
- // iconData << HbIcon(locationIcon);
- } else {
- textData << QVariant();
- }
- // The fourth text item has to be empty
- textData << QVariant();
-
- } else if (entryType == AgendaEntry::TypeTodo) {
- // Append the to-do icon
- iconData << HbIcon(toDoIcon);
-
- // Get the due date
- QDateTime dueDate = entry.endTime();
-
- // Append the date first
- QString dueDateString(hbTrId("txt_calendar_dblist_val_due_on_1"));
- QString dueText;
- dueText.setNum(dueDate.date().day());
- dueText.append(singleSpace);
-
- // Append the month name next
- HbExtendedLocale locale = HbExtendedLocale::system();
- QString month = locale.monthName(dueDate.date().month());
- dueText.append(month);
- dueText.append(singleSpace);
-
- // Append the year
- QString year;
- year.setNum(dueDate.date().year());
- dueText.append(year);
-
- textData << dueDateString.arg(dueText);
-
- // The fourth text item has to be empty
- textData << QVariant();
-
- // Check if alarm is enabled for the entry
- if (entry.alarm().isNull()) {
- // Insert a blank icon. Else next text item will get shifted to left
- iconData << HbIcon();
- } else {
- // if entry is not repeating in place of reminder icon put a blank
- // icon and move reminder icon to the place of repeating icon
- if (!entry.isRepeating()) {
- iconData << HbIcon();
- }
- iconData << HbIcon(reminderIcon);
- }
-
- // Check if the entry is recurring
- if (entry.isRepeating()) {
- iconData << HbIcon(repeatIcon);
- } else {
- // Insert the blank icon only when both reminder and repeating icons
- // are not there
- if (entry.alarm().isNull()) {
- iconData << HbIcon();
- }
- }
- }
-
- // Get the list model index and set the text and icon data
- QModelIndex listIndex = mListModel->index(index, 0);
- mListModel->setData(listIndex, textData, Qt::DisplayRole);
- mListModel->setData(listIndex, iconData, Qt::DecorationRole);
-
- // Enable item stretching by adding the dynamic property
- HbListViewItem *listViewItem = static_cast<HbListViewItem*>
- (mEventsList->itemByIndex(mListModel->index(index, 0)));
- Qt::Orientation orientation = mServices.MainWindow().orientation();
- // Apply stretch only for landscape orientation
- if (listViewItem) {
- if (Qt::Horizontal == orientation) {
- listViewItem->setProperty(stretchLayout, true);
- } else {
- listViewItem->setProperty(stretchLayout, false);
- }
- }
-}
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::handleListItemStretching
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayViewWidget::handleListItemStretching(Qt::Orientation orientation)
-{
- if (mInstanceArray.count() == 0) {
- // Nothing much to do. Simply return
- return;
- }
- for(int index = 0; index < mInstanceArray.count() ; index ++) {
- AgendaEntry entry = mInstanceArray[index];
- if (!entry.isNull()) {
- AgendaEntry::Type eventType = entry.type();
- switch(eventType) {
- // Apply the stretching to only to-do's,
- // anniversary and all-day event types
- case AgendaEntry::TypeTodo:
- case AgendaEntry::TypeEvent:
- case AgendaEntry::TypeAnniversary:
- {
- // Get the list view item corresponding to the index
- HbListViewItem *listItem = static_cast<HbListViewItem*>
- (mEventsList->itemByIndex(mListModel->index(index, 0)));
- if (listItem) {
- if (orientation == Qt::Horizontal) {
- // Set a dynamic property to indicate that this list item
- // must be stretched in landscape.
- // NOTE: Property name MUST match the name specified in
- // css file, else wierd things might happen
- listItem->setProperty(stretchLayout, true);
- }
- }
- }
- break;
- default:
- {
- HbListViewItem *listItem = static_cast<HbListViewItem*>
- (mEventsList->itemByIndex(mListModel->index(index, 0)));
- if (listItem) {
- listItem->setProperty(stretchLayout, false);
- }
- break;
- }
- }
- }
- }
-}
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::getIndexToScrollTo
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-int CalenDayViewWidget::getIndexToScrollTo()
-{
- int scrollIndex = 0;
- TCalenInstanceId instanceId = mServices.Context().instanceId();
- if (instanceId == TCalenInstanceId::nullInstanceId()) {
- // If the instance is not set, then scroll to zero index
- return scrollIndex;
- }
-
- for (int index = 0 ; index < mInstanceArray.count() ; index++) {
- AgendaEntry entry = mInstanceArray[index];
- if (entry.id() == instanceId.mEntryLocalUid) {
- // Match found.
- scrollIndex = index;
- break;
- }
- }
- return scrollIndex;
-}
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::showHideRegionalInformation
-// To Show and hide regional plugin label depends upon settings
-// ----------------------------------------------------------------------------
-//
-void CalenDayViewWidget::showHideRegionalInformation()
-{
- if (mView->pluginEnabled()) {
- XQSettingsKey regionalInfo(XQSettingsKey::TargetCentralRepository,
- KCRUidCalendar, KCalendarShowRegionalInfo);
-
- int showRegionalInfo =
- mSettingsManager->readItemValue(regionalInfo).toUInt();
- if (showRegionalInfo) {
-
- if (!mRegionalInfoGroupBox) {
- mRegionalInfoGroupBox = new HbGroupBox();
- CalenPluginLabel *regionalInfo = new CalenPluginLabel(
- mServices, this);
- regionalInfo->setFontSpec(HbFontSpec(HbFontSpec::Primary));
- mRegionalInfoGroupBox->setContentWidget(regionalInfo);
- mRegionalPluginLayout->insertItem(1, mRegionalInfoGroupBox);
- }
- 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
-// ----------------------------------------------------------------------------
-//
-void CalenDayViewWidget::createNewEvent()
-{
- // Issue a command to launch editor to create
- // a new event
- mServices.IssueCommandL(ECalenNewMeeting);
-}
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::editEntry
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayViewWidget::editEntry()
-{
- // Check if the selected index is valid
- if (mSelectedIndex < 0 || mSelectedIndex > mInstanceArray.count()) {
- return;
- }
-
- // Get the entry details first
- AgendaEntry entry = mInstanceArray[mSelectedIndex];
- if (AgendaEntry::TypeTodo == entry.type()) {
- // Load the notes editor plugin if not loaded.
- if (!mNotesPluginLoaded) {
- // Launch the to-do editor using notes editor plugin api
- QDir dir(NOTES_EDITOR_PLUGIN_PATH);
- QString pluginName = dir.absoluteFilePath(NOTES_EDITOR_PLUGIN_NAME);
-
- // Create NotesEditor plugin loader object.
- mNotesEditorPluginLoader = new QPluginLoader(pluginName);
-
- // Load the plugin
- mNotesPluginLoaded = mNotesEditorPluginLoader->load();
- }
-
- QObject *plugin = qobject_cast<QObject*> (
- mNotesEditorPluginLoader->instance());
-
- NotesEditorInterface* interface =
- qobject_cast<NotesEditorInterface*>(plugin);
-
- interface->edit(entry, mServices.agendaInterface());
-
- connect(
- interface, SIGNAL(editingCompleted(bool)),
- this, SLOT(noteEditingCompleted(bool)));
- } else {
- // Set the context
- setContextFromHighlight(entry);
- // Issue a command to launch the editor to edit this entry
- mServices.IssueCommandL(ECalenEditCurrentEntry);
- }
-}
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::viewEntry
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayViewWidget::viewEntry()
-{
- // Get the entry details first
- AgendaEntry entry = mInstanceArray[mSelectedIndex];
-
- // Set the context
- setContextFromHighlight(entry);
-
- // Launch the event viewer.
- mServices.IssueCommandL(ECalenEventView);
-}
-
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::deleteEntry
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayViewWidget::deleteEntry()
-{
- // Check if the selected index is valid
- if (mSelectedIndex < 0 || mSelectedIndex > mInstanceArray.count()) {
- return;
- }
-
- // Get the entry details
- AgendaEntry entry = mInstanceArray[mSelectedIndex];
- // Set the context
- setContextFromHighlight(entry);
- // Issue the command to delete the entry
- mServices.IssueCommandL(ECalenDeleteCurrentEntry);
-}
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::markAsDone
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayViewWidget::markAsDone()
-{
- // Check if the selected index is valid
- if (mSelectedIndex < 0 || mSelectedIndex > mInstanceArray.count()) {
- return;
- }
-
- // Get the entry details
- AgendaEntry entry = mInstanceArray[mSelectedIndex];
-
- // Check again if the event is of type to-to
- if (AgendaEntry::TypeTodo == entry.type()) {
- // Set the status of the to-do as completed
- entry.setStatus(AgendaEntry::TodoCompleted);
- // Update the completed date and time
- entry.setCompletedDateTime(mDate);
-
- // Update the entry in the database
- mServices.agendaInterface()->setCompleted(entry, true, mDate);
- mServices.IssueCommandL(ECalenStartActiveStep);
- }
-}
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::itemLongPressed
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayViewWidget::itemLongPressed(HbAbstractViewItem* listViewItem,
- const QPointF& coords)
-{
- mLongTapEventFlag = true;
- // Update the selection index first
- mSelectedIndex = listViewItem->modelIndex().row();
-
- if (mSelectedIndex < 0 || mSelectedIndex > mInstanceArray.count()) {
- // Invalid index
- return;
- }
-
- AgendaEntry entry = mInstanceArray[mSelectedIndex];
-
- // Create new menu.
- HbMenu *contextMenu = new HbMenu();
-
- // Add the open option
- HbAction *openAction = contextMenu->addAction(
- hbTrId("txt_common_menu_open"));
-
- // Check the type of event
- if (AgendaEntry::TypeTodo == entry.type()) {
- // Add an option to mark the note as complete
- HbAction *completeAction = contextMenu->addAction(
- hbTrId("txt_calendar_menu_mark_as_done"));
- }
-
- // Add the edit option
- HbAction *editAction = contextMenu->addAction(
- hbTrId("txt_common_menu_edit"));
-
- // Add the delete option
- HbAction *deleteAction = contextMenu->addAction(
- hbTrId("txt_common_menu_delete"));
-
- contextMenu->setDismissPolicy(HbMenu::TapAnywhere);
-
- // Show context sensitive menu.
- // Param const QPointF& coordinate - is a longpress position.
- contextMenu->setPreferredPos(coords);
- connect(contextMenu, SIGNAL(aboutToClose()),
- this,
- SLOT(contextMenuClosed()));
-
- contextMenu->open(this, SLOT(contextManuTriggered(HbAction *)));
-}
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::itemActivated
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayViewWidget::itemActivated(const QModelIndex &index)
-{
- // Update the selection index first
- mSelectedIndex = index.row();
-
- // Check if the selected index is valid
- if (mSelectedIndex < 0 || mSelectedIndex > mInstanceArray.count()) {
- return;
- }
- if( !mLongTapEventFlag ) {
- // Open the event for viewing
- viewEntry();
- }
-}
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::itemActivated
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayViewWidget::noteEditingCompleted(bool status)
-{
- // We need to refresh the list since user
- // might have marked the to-do as complete or
- // edited it or deleted it. So get the instance
- // list again
- if (status) {
- mServices.IssueCommandL(ECalenStartActiveStep);
- }
-}
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::goToToday
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayViewWidget::goToToday()
-{
- // First check if we are not already
- // showing today's agenda
- if (mDate == CalenDateUtils::today()) {
- return;
- }
-
- // Set the context for the current day
- mServices.Context().setFocusDateL(CalenDateUtils::today(), KCalenDayViewUidValue);
-
- mView->refreshViewOnGoToDate();
-}
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::contextMenuClosed
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayViewWidget::contextMenuClosed()
-{
- mLongTapEventFlag = false;
-}
-
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::contextManuTriggered
-// Rest of the details are commented in the header
-// ----------------------------------------------------------------------------
-//
-void CalenDayViewWidget::contextManuTriggered(HbAction *action)
-{
- if (action->text() == hbTrId("txt_common_menu_open")) {
- viewEntry();
- } else if (action->text() == hbTrId("txt_calendar_menu_mark_as_done")) {
- markAsDone();
- } else if (action->text() == hbTrId("txt_common_menu_edit")) {
- editEntry();
- } else {
- if (action->text() == hbTrId("txt_common_menu_delete")) {
- deleteEntry();
- }
- }
-}
-// ----------------------------------------------------------------------------
-// CalenDayViewWidget::clearListModel
-// clears the list model
-// ----------------------------------------------------------------------------
-//
-void CalenDayViewWidget::clearListModel()
- {
- mListModel->clear();
- }
-// End of file --Don't remove this.
--- a/calendarui/views/src/calengriditemprototype.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/views/src/calengriditemprototype.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -16,7 +16,6 @@
*/
// System includes
-#include <QDebug>
#include <QPainter>
#include <QPen>
#include <QGraphicsWidget>
--- a/calendarui/views/src/calenmonthgrid.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/views/src/calenmonthgrid.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -36,6 +36,8 @@
// Constants
#define SCROLL_SPEEED 3000
#define GRIDLINE_WIDTH 0.075 //units
+#define MAX_PAN_DIRECTION_THRESHOLD 50
+#define MIN_PAN_DIRECTION_THRESHOLD 20
/*!
\class CalenMonthGrid
@@ -306,6 +308,13 @@
*/
void CalenMonthGrid::downGesture()
{
+ // Make sure that content widget is properly placed
+ if (mIsNonActiveDayFocused) {
+ mIsAtomicScroll = true;
+ int itemToBeScrolled = mView->rowsInPrevMonth() * KCalenDaysInWeek;
+ QModelIndex indexToBeScrolled = mModel->index(itemToBeScrolled, 0);
+ scrollTo(indexToBeScrolled);
+ }
mDirection = down;
mIsAtomicScroll = false;
setAttribute(Hb::InteractionDisabled);
@@ -318,6 +327,14 @@
*/
void CalenMonthGrid::upGesture()
{
+ // Make sure that content widget is properly placed
+ if (mIsNonActiveDayFocused) {
+ mIsAtomicScroll = true;
+ int itemToBeScrolled = mView->rowsInPrevMonth() * KCalenDaysInWeek;
+ itemToBeScrolled += KNumOfVisibleRows * KCalenDaysInWeek;
+ QModelIndex indexToBeScrolled = mModel->index(itemToBeScrolled, 0);
+ scrollTo(indexToBeScrolled);
+ }
mDirection = up;
mIsAtomicScroll = false;
setAttribute(Hb::InteractionDisabled);
@@ -361,38 +378,67 @@
setAttribute(Hb::InteractionDisabled);
mIsAtomicScroll = false;
if (!mIsPanGesture) {
- mIsPanGesture = true;
- mIgnoreItemActivated = true;
+ mDirection = invalid;
mStartPos = mContentWidget->pos();
+ // TODO: This work aroung till framework provides an api
+ // to know the direciton of the pan, until then we need
+ // calculate the direction explicitly
// Get to know the direction of the gesture
- QPointF velocity = gesture->velocity();
- if (velocity.y() > 0) {
- mDirection = down;
- } else {
- mDirection = up;
- }
+ // Use our defined threshold temporarily till scrollarea
+ // frm orbit side is made clever enough not to scroll in other direction
+ // apart frm the registered scroll direction
+ QPointF delta = gesture->delta();
+ if (abs(delta.x()) > MAX_PAN_DIRECTION_THRESHOLD) {
+ // Now see if y coord diff has crossed threshold
+ if (delta.y() > MAX_PAN_DIRECTION_THRESHOLD) {
+ mIsPanGesture = true;
+ mIgnoreItemActivated = true;
+ mDirection = down;
+ } else if (delta.y() < -MAX_PAN_DIRECTION_THRESHOLD){
+ mIsPanGesture = true;
+ mIgnoreItemActivated = true;
+ mDirection = up;
+ } else {
+ event->accept(Qt::PanGesture);
+ return;
+ }
+ } else if (abs(delta.x()) < MAX_PAN_DIRECTION_THRESHOLD) {
+ if (delta.y() > MIN_PAN_DIRECTION_THRESHOLD) {
+ mIsPanGesture = true;
+ mIgnoreItemActivated = true;
+ mDirection = down;
+ } else if (delta.y() < -MIN_PAN_DIRECTION_THRESHOLD){
+ mIsPanGesture = true;
+ mIgnoreItemActivated = true;
+ mDirection = up;
+ }else {
+ event->accept(Qt::PanGesture);
+ return;
+ }
+ }
}
- } else if(gesture->state() == Qt::GestureFinished) {
- // TODO: Need to handle here to avoid followOn animation
}
} else if(HbSwipeGesture *gesture = qobject_cast<HbSwipeGesture *>(event->gesture(Qt::SwipeGesture))) {
if (gesture->state() == Qt::GestureStarted) {
setAttribute(Hb::InteractionDisabled);
mIsAtomicScroll = false;
- if (gesture->swipeAngle() > 250 && gesture->swipeAngle() < 290 &&
- gesture->verticalDirection() == QSwipeGesture::Down) {
+ mDirection = invalid;
+ if (gesture->sceneVerticalDirection() == QSwipeGesture::Down) {
mDirection = down;
- } else if (gesture->swipeAngle() > 70 && gesture->swipeAngle() < 110 &&
- gesture->verticalDirection() == QSwipeGesture::Up) {
+ } else if (gesture->sceneVerticalDirection() == QSwipeGesture::Up) {
mDirection = up;
+ } else {
+ event->accept(Qt::SwipeGesture);
+ return;
}
}
- gesture->setSpeed(SCROLL_SPEEED);
}
- // Call the parent class to perform the pan gesture
- // When scrolling finished, month grid will adjust to show the proper month
- HbScrollArea::gestureEvent(event);
+ if (mDirection!= invalid) {
+ // Call the parent class to perform the pan gesture
+ // When scrolling finished, month grid will adjust to show the proper month
+ HbScrollArea::gestureEvent(event);
+ }
}
/*!
@@ -418,6 +464,7 @@
mDirection = invalid;
} else {
mIsAtomicScroll = false;
+ mDirection = invalid;
}
mIgnoreItemActivated = false;
setAttribute(Hb::InteractionDisabled, false);
@@ -750,7 +797,7 @@
mIsNonActiveDayFocused = false;
// Check if the same item has been tapped twice
if (mCurrentRow == index.row()) {
- // Launch the agenda view
+ // Launch the Day view
mView->launchDayView();
} else {
// Reset the focus attribute to this item
@@ -996,7 +1043,9 @@
} else {
pen.setBrush(mGridBorderColor);
}
- // Set the pen to the painter
+ //store the old pen first
+ QPen oldPen = painter->pen();
+ // Set the new pen to the painter
painter->setPen(pen);
// Get the sizes of content widget
@@ -1052,6 +1101,8 @@
// Draw the lines for the points in the vector list
painter->drawLines(pointList);
+ // Set the old pen back
+ painter->setPen(oldPen);
}
// End of File
--- a/calendarui/views/src/calenmonthview.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/views/src/calenmonthview.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -71,7 +71,7 @@
mIsWeekNumbersShown = 0;
mOrientation = mServices.MainWindow().orientation();
// Read the date from the context
- mDate = mServices.Context().focusDateAndTimeL();
+ mDate = mServices.Context().focusDateAndTime();
mCurrentDay = mDate;
// Create the settings manager instance and settings key for week number
@@ -106,7 +106,7 @@
mDocLoader->findWidget(CALEN_MONTH_TITLE));
// Set the title text color
QColor monthTitleColor = HbColorScheme::color("qtc_cal_monthgrid_title");
- if (monthTitleColor.isValid()) {
+ if (mTitleLabel && monthTitleColor.isValid()) {
mTitleLabel->setTextColor(monthTitleColor);
}
@@ -430,24 +430,32 @@
if (mTitleLabel) {
// The month title
drawer = new HbFrameDrawer("qtg_fr_cal_monthgrid_title_bg", HbFrameDrawer::ThreePiecesHorizontal);
- frame = new HbFrameItem(drawer, this);
- mTitleLabel->setBackgroundItem(frame->graphicsItem(), -2);
+ if (drawer)
+ frame = new HbFrameItem(drawer, this);
+ if(frame)
+ mTitleLabel->setBackgroundItem(frame->graphicsItem(), -2);
}
// Set the frame to the preview pane
drawer = new HbFrameDrawer("qtg_fr_cal_preview_bg", HbFrameDrawer::NinePieces);
- frame = new HbFrameItem(drawer, this);
- mPrevPaneLayoutWidget->setBackgroundItem(frame->graphicsItem(), -5);
+ if (drawer)
+ frame = new HbFrameItem(drawer, this);
+ if(frame)
+ mPrevPaneLayoutWidget->setBackgroundItem(frame->graphicsItem(), -5);
// Set the frame to the preview pane
drawer = new HbFrameDrawer("qtg_fr_cal_preview_bg", HbFrameDrawer::NinePieces);
- frame = new HbFrameItem(drawer, this);
+ if(drawer)
+ frame = new HbFrameItem(drawer, this);
+ if(frame)
mCurrPaneLayoutWidget->setBackgroundItem(frame->graphicsItem(), -5);
// Set the frame to the preview pane
drawer = new HbFrameDrawer("qtg_fr_cal_preview_bg", HbFrameDrawer::NinePieces);
+ if(drawer)
frame = new HbFrameItem(drawer, this);
- mNextPaneLayoutWidget->setBackgroundItem(frame->graphicsItem(), -5);
+ if(frame)
+ mNextPaneLayoutWidget->setBackgroundItem(frame->graphicsItem(), -5);
}
void CalenMonthView::showHideRegionalInformation()
@@ -583,24 +591,26 @@
void CalenMonthView::goToToday()
{
QDateTime today = CalenDateUtils::today();
+ // Set the context and repopulate the view
+ MCalenContext &context = mServices.Context();
+ context.setFocusDateAndTime(today);
+
// 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()) {
+ mDate = today;
// 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;
+ // Populate the preview panes
+ populatePreviewPane(mDate);
+ } else {
+ refreshViewOnGoToDate();
}
-
- // Set the context and repopulate the view
- MCalenContext &context = mServices.Context();
- context.setFocusDateAndTimeL(today, KCalenMonthViewUidValue);
-
- refreshViewOnGoToDate();
}
/*
@@ -706,9 +716,7 @@
*/
void CalenMonthView::refreshViewOnGoToDate()
{
- setActiveDay(dateFromContext(mServices.Context()));
- setDate();
- updateMonthDataArrayWithActiveDates();
+ prepareForPopulation();
setDateToLabel();
// fetch list of required calendar instances
populateWithInstanceView();
@@ -731,13 +739,13 @@
QDateTime ret;
if (AgendaEntry::TypeTodo == context.instanceId().mType) {
QDateTime today = CalenDateUtils::today();
- if (context.focusDateAndTimeL() < today) {
+ if (context.focusDateAndTime() < today) {
ret = today;
} else {
- ret = context.focusDateAndTimeL();
+ ret = context.focusDateAndTime();
}
} else {
- ret = context.focusDateAndTimeL();
+ ret = context.focusDateAndTime();
}
return ret;
}
@@ -759,8 +767,6 @@
date.setDate(date.year(), date.month(), 1);
QDateTime firstDayOfPrevMonth(date, day.time());
- // TODO: Need to consider the week start frm the locale object
- TLocale locale;
int offset(firstDayOfPrevMonth.date().dayOfWeek() - (mLocale.startOfWeek()
+ 1));
if (offset < 0) {
@@ -967,7 +973,7 @@
date.setDate(date.year(), date.month(), 1);
// Get the first day of the future month
QDateTime firstDayOfFutMonth(date, futureMonthDateTime.time());
- TLocale locale;
+
int offset = firstDayOfFutMonth.date().dayOfWeek() - (mLocale.startOfWeek()
+ 1);
if (offset < 0) {
@@ -1064,7 +1070,8 @@
void CalenMonthView::updateMonthDataArrayWithActiveDates()
{
int activeMonth = mActiveMonth.date().month();
- for (int i = 0; i < mMonthDataArray.count(); i++) {
+ int monthDataCount = mMonthDataArray.count();
+ for (int i = 0; i < monthDataCount; i++) {
if (mMonthDataArray[i].Day().date().month() == activeMonth) {
// Set the active flag
mMonthDataArray[i].setActive(true);
@@ -1108,7 +1115,8 @@
getInstanceList(datesWithEvents,gridStart,gridEnd);
// Parse thru the list of dates and set the required flags
- for(int i(0); i < datesWithEvents.count(); i++) {
+ int datesEventsCount = datesWithEvents.count();
+ for(int i(0); i < datesEventsCount; i++) {
int offset = mFirstDayOfGrid.date().daysTo(datesWithEvents.at(i));
mMonthDataArray[offset].SetHasEvents(true);
}
@@ -1135,7 +1143,8 @@
getInstanceList(datesWithEvents,gridStart,gridEnd);
// Parse thru the list of dates and set the required flags
- for(int i(0); i < datesWithEvents.count(); i++) {
+ int datesEventsCount = datesWithEvents.count();
+ for(int i(0); i < datesEventsCount; i++) {
int offset = mFirstDayOfGrid.date().daysTo(datesWithEvents.at(i));
mMonthDataArray[offset].SetHasEvents(true);
}
@@ -1162,7 +1171,8 @@
getInstanceList(datesWithEvents,gridStart,gridEnd);
// Parse thru the list of dates and set the required flags
- for(int i(0); i < datesWithEvents.count(); i++) {
+ int datesEventsCount = datesWithEvents.count();
+ for(int i(0); i < datesEventsCount; i++) {
int offset = mFirstDayOfGrid.date().daysTo(datesWithEvents.at(i));
mMonthDataArray[offset].SetHasEvents(true);
}
@@ -1220,7 +1230,7 @@
{
QDateTime newActiveDay = mFirstDayOfGrid.addDays(index);
// Set the context
- mServices.Context().setFocusDateL(newActiveDay, KCalenMonthViewUidValue);
+ mServices.Context().setFocusDate(newActiveDay);
mDate = newActiveDay;
setDateToLabel();
@@ -1242,7 +1252,7 @@
}
/*!
- Slot to launch the agenda view
+ Slot to launch the Day view
*/
void CalenMonthView::launchDayView()
{
--- a/calendarui/views/src/calennativeview.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/views/src/calennativeview.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -51,6 +51,7 @@
// Create services API and register for notifications
RArray<TCalenNotification> notificationArray;
+ CleanupClosePushL(notificationArray);
notificationArray.Append(ECalenNotifySystemTimeChanged);
notificationArray.Append(ECalenNotifySystemLocaleChanged);
@@ -58,7 +59,7 @@
mServices.RegisterForNotificationsL(this, notificationArray);
- notificationArray.Reset();
+ CleanupStack::PopAndDestroy(¬ificationArray);
}
/*!
@@ -105,17 +106,14 @@
popUp->setAttribute( Qt::WA_DeleteOnClose, true );
popUp->setHeadingWidget(new HbLabel(hbTrId("txt_calendar_opt_go_to_date")));
- // Get the current date.
- QDateTime currentDateTime = CalenDateUtils::today();
- QDate currentDate = currentDateTime.date();
if(mDatePicker) {
mDatePicker = NULL;
}
- mDatePicker = new HbDateTimePicker(currentDate, popUp);
+ mDatePicker = new HbDateTimePicker(QDate::currentDate(), popUp);
// Set the date range.
mDatePicker->setMinimumDate(CalenDateUtils::minTime().date());
mDatePicker->setMaximumDate(CalenDateUtils::maxTime().date());
- mDatePicker->setDate(currentDate);
+ mDatePicker->setDate(QDate::currentDate());
popUp->setContentWidget(mDatePicker);
HbAction *okAction = new HbAction(hbTrId("txt_common_button_ok"));
@@ -137,11 +135,11 @@
selectedDate >= CalenDateUtils::minTime().date() &&
selectedDate <= CalenDateUtils::maxTime().date()) {
MCalenContext& context = mServices.Context();
- QDateTime contextDate = context.focusDateAndTimeL();
+ QDateTime contextDate = context.focusDateAndTime();
//Set the selected date to contextDate.
contextDate.setDate(selectedDate);
- context.setFocusDateAndTimeL(contextDate, KCalenMonthViewUidValue);
+ context.setFocusDateAndTime(contextDate);
}
refreshViewOnGoToDate();
}
--- a/calendarui/views/src/calenpluginlabel.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/views/src/calenpluginlabel.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -30,7 +30,7 @@
/*!
constructor
*/
-CalenPluginLabel::CalenPluginLabel(MCalenServices& services,
+Q_DECL_EXPORT CalenPluginLabel::CalenPluginLabel(MCalenServices& services,
QGraphicsItem* parent) :
HbLabel(parent),mServices(services)
{
@@ -41,7 +41,7 @@
/*!
Destructor
*/
-CalenPluginLabel::~CalenPluginLabel()
+Q_DECL_EXPORT CalenPluginLabel::~CalenPluginLabel()
{
}
--- a/calendarui/views/src/calenpreviewpane.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/views/src/calenpreviewpane.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -45,6 +45,8 @@
// Macros
#define TWO_SECONDS_TIMER 2000 // millseconds
#define SCROLLING_SPEED 10
+#define MAX_PAN_DIRECTION_THRESHOLD 50
+#define MIN_PAN_DIRECTION_THRESHOLD 20
static const QString EMPTYSTRING(" ");
@@ -315,25 +317,49 @@
{
if(HbPanGesture *gesture = qobject_cast<HbPanGesture *>(event->gesture(Qt::PanGesture))) {
if (gesture->state() == Qt::GestureStarted) {
+ // TODO: This work aroung till framework provides an api
+ // to know the direciton of the pan, until then we need
+ // calculate the direction explicitly
// Get to know the direction of the gesture
- QPointF delta = gesture->sceneDelta();
- if (delta.x() > 20) {
- mIsGestureHandled = true;
- // right gesture
- mView->handlePreviewPaneGesture(true);
- event->accept(Qt::PanGesture);
- } else if (delta.x() < -20){
- mIsGestureHandled = true;
- // left gesture
- mView->handlePreviewPaneGesture(false);
- event->accept(Qt::PanGesture);
+ QPointF delta = gesture->delta();
+ if (abs(delta.y()) > MAX_PAN_DIRECTION_THRESHOLD) {
+ // Now see if y coord diff has crossed threshold
+ if (delta.x() > MAX_PAN_DIRECTION_THRESHOLD) {
+ mIsGestureHandled = true;
+ // right gesture
+ mView->handlePreviewPaneGesture(true);
+ event->accept(Qt::PanGesture);
+ } else if (delta.x() < -MAX_PAN_DIRECTION_THRESHOLD){
+ mIsGestureHandled = true;
+ // left gesture
+ mView->handlePreviewPaneGesture(false);
+ event->accept(Qt::PanGesture);
+ } else {
+ event->accept(Qt::PanGesture);
+ return;
+ }
+ } else if (abs(delta.y()) < MAX_PAN_DIRECTION_THRESHOLD) {
+ if (delta.x() > MIN_PAN_DIRECTION_THRESHOLD) {
+ mIsGestureHandled = true;
+ // right gesture
+ mView->handlePreviewPaneGesture(true);
+ event->accept(Qt::PanGesture);
+ } else if (delta.x() < -MIN_PAN_DIRECTION_THRESHOLD){
+ mIsGestureHandled = true;
+ // left gesture
+ mView->handlePreviewPaneGesture(false);
+ event->accept(Qt::PanGesture);
+ }else {
+ event->accept(Qt::PanGesture);
+ return;
+ }
}
}
} else if(HbTapGesture *gesture = qobject_cast<HbTapGesture *>(event->gesture(Qt::TapGesture))) {
if (gesture->state() == Qt::GestureFinished) {
if (gesture->tapStyleHint() == HbTapGesture::Tap) {
// Preview pane tapped
- mServices.IssueCommandL(ECalenDayView);
+ mServices.IssueCommandL(ECalenAgendaView);
event->accept(Qt::TapGesture);
}
}
--- a/calendarui/views/src/calensettingsview.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/views/src/calensettingsview.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -31,7 +31,11 @@
#include "calensettings.h"
CalenSettingsView::CalenSettingsView(MCalenServices& services, QGraphicsItem *parent)
-:HbView(parent), mServices(services)
+:HbView(parent),
+ mServices(services),
+ mCalenSettingsForm(NULL),
+ mCalenSettings(NULL),
+ mSoftKeyAction(NULL)
{
mCalenSettingsForm = new HbDataForm(this);
@@ -40,16 +44,26 @@
setTitle(hbTrId("txt_calendar_title_calendar"));
// Construct the settings utility.
- mCalenSettings = new CalenSettings(mServices, mCalenSettingsForm);
- mCalenSettings->createModel();
-
- setWidget(mCalenSettingsForm);
+ if(mCalenSettingsForm)
+ {
+ mCalenSettings = new CalenSettings(mServices, mCalenSettingsForm);
+ if(mCalenSettings)
+ {
+ mCalenSettings->createModel();
+ setWidget(mCalenSettingsForm);
+ }
+ }
}
CalenSettingsView::~CalenSettingsView()
{
- // Nothing yet.
+ if (mCalenSettings) {
+ delete mCalenSettings;
+ }
+ if (mSoftKeyAction) {
+ delete mSoftKeyAction;
+ }
}
void CalenSettingsView::launchPreviousView()
@@ -60,31 +74,22 @@
this, SLOT(launchPreviousView()));
mServices.MainWindow().removeView(this);
mServices.IssueNotificationL(ECalenNotifySettingsClosed);
-
- //TODO :: For ART3 we are launching agenda view later we have to use week view
- // GEt the current orientation
- /* Qt::Orientation orientation = mServices.MainWindow().orientation();
- if(orientation == Qt::Vertical)
- {
- mServices.IssueCommandL(ECalenDayView);
- }
- else if(orientation == Qt::Horizontal)
- {
- mServices.IssueCommandL(ECalenLandscapeDayView);
- }*/
}
void CalenSettingsView::initializeForm()
- {
+{
mCalenSettings->populateSettingList();
// Add view on main window and set back softkey
mServices.MainWindow().addView(this);
mSoftKeyAction = new HbAction(Hb::BackNaviAction);
- setNavigationAction(mSoftKeyAction);
- connect(mSoftKeyAction, SIGNAL(triggered()),
+ if(mSoftKeyAction)
+ {
+ setNavigationAction(mSoftKeyAction);
+ connect(mSoftKeyAction, SIGNAL(triggered()),
this, SLOT(launchPreviousView()));
- }
+ }
+}
void CalenSettingsView::refreshView()
{
--- a/calendarui/views/views.pro Wed Jun 23 18:11:28 2010 +0300
+++ b/calendarui/views/views.pro Tue Jul 06 14:14:56 2010 +0300
@@ -52,9 +52,9 @@
calenmonthgrid.h \
calengriditemprototype.h \
calennativeview.h \
- calendayview.h \
+ calenagendaview.h \
caleneventlistviewitem.h \
- calendayviewwidget.h \
+ calenagendaviewwidget.h \
calenpreviewpane.h \
calensettingsview.h \
calenthicklinesdrawer.h \
@@ -66,9 +66,9 @@
calenmonthgrid.cpp \
calengriditemprototype.cpp \
calennativeview.cpp \
- calendayview.cpp \
+ calenagendaview.cpp \
caleneventlistviewitem.cpp \
- calendayviewwidget.cpp \
+ calenagendaviewwidget.cpp \
calenpreviewpane.cpp \
calensettingsview.cpp \
calenthicklinesdrawer.cpp \
@@ -77,5 +77,7 @@
RESOURCES += calenresources.qrc
+include(dayview/dayview.pri)
+
# End of file --Don't remove this.
--- a/clock/clock.pro Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clock.pro Tue Jul 06 14:14:56 2010 +0300
@@ -26,13 +26,15 @@
symbian: {
BLD_INF_RULES.prj_exports += \
"./rom/clock.iby CORE_APP_LAYER_IBY_EXPORT_PATH(clock.iby)" \
- "./rom/clockengines.iby CORE_APP_LAYER_IBY_EXPORT_PATH(clockengines.iby)" \
+ "./rom/clockengines.iby CORE_APP_LAYER_IBY_EXPORT_PATH(clockengines.iby)" \
"./rom/clockresources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(clockresources.iby)" \
\
"./conf/clockapp.confml APP_LAYER_CONFML(clockapp.confml)" \
"./conf/CI_clockapp.confml APP_LAYER_CONFML(CI_clockapp.confml)" \
"./conf/clockapp_101F874D.crml APP_LAYER_CRML(clockapp_101F874D.crml)" \
- "./conf/clockapp_101F8876.crml APP_LAYER_CRML(clockapp_101F8876.crml)"
+ "./conf/clockapp_101F8876.crml APP_LAYER_CRML(clockapp_101F8876.crml)" \
+ # stubsis is added to provide IAD
+ "./stubsis/clock_stub.sis /epoc32/data/z/system/install/clock_stub.sis"
}
# End of file --Don't remove this.
--- a/clock/clockengines/clockserver/server/src/clockserverimpl.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockengines/clockserver/server/src/clockserverimpl.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -506,6 +506,11 @@
}
}
+ // Initialise the attributes to null.
+ TTime invalidTime( 0 );
+ iTimeAttributes->iDstOffset = TTimeIntervalMinutes( 0 );
+ iTimeAttributes->iTimeZoneOffset = TTimeIntervalMinutes( 0 );
+ iTimeAttributes->iUtcDateTime = invalidTime.DateTime();
// Get all the information related to the plugin.
// The UTC time.
TRAP_IGNORE( aPluginImpl.GetTimeInformationL( EUTCTime, iTimeAttributes ) );
@@ -523,7 +528,7 @@
// Try to resolve the timezone id with the data that we have recieved.
TInt timezoneId;
- TInt errorVal;
+ TInt errorVal = 0;
TRAP_IGNORE( errorVal = iTzResolver->GetTimeZoneL( *iTimeAttributes, iMcc, timezoneId ) );
__PRINT( "CClkSrvImpl::NotifyTimeChangeL - timeZoneId: %d", timezoneId );
@@ -593,7 +598,7 @@
// Try to resolve the timezone id with the data that we have recieved.
TInt timezoneId;
- TInt errorVal;
+ TInt errorVal = 0;
const TBuf< 4 > invalidMCC( KInvalidMCC );
TRAP_IGNORE( errorVal = iTzResolver->GetTimeZoneL( *iTimeAttributes, invalidMCC, timezoneId ) );
@@ -671,8 +676,49 @@
// Lets see if we can narrow down to a single timezone with the MCC recieved.
RArray< CTzId > tzIdArray;
- // Try and fetch the timezone ID using the MCC recieved.
- TRAP_IGNORE( iTzResolver->TzIdFromMccL( iMcc, tzIdArray, KInvalidTimeZoneId ) );
+ // This parte of code introduced due to error ID EASH-82DPPC(3G Tests for NITZ and GPRS Interaction)
+ // Fix is bascially to narrowing down to single timezone id if NITZ packet is received prior to MCC.
+ // In first IF state we are trying to narrowdown to single timezone ID, if not possible try to use MCC to get timezone
+ // In second IF , we are using MCC to narrow down to single timezone ID directly as dont have NITZ info.
+ if( iTimeAttributes )
+ {
+ __PRINTS("timeatrrtibutes has value");
+
+ TTime invalidTime(0);
+ if( iTimeAttributes->iDstOffset != TTimeIntervalMinutes( 0 ) &&
+ iTimeAttributes->iTimeZoneOffset != TTimeIntervalMinutes( 0 ) &&
+ iTimeAttributes->iUtcDateTime.Year() != invalidTime.DateTime().Year() )
+ {
+ // Try to resolve the timezone id with the data that we have recieved.
+ TInt timezoneId;
+ TRAP_IGNORE( TInt errorVal = iTzResolver->GetTimeZoneL( *iTimeAttributes, iMcc, timezoneId ) );
+
+ __PRINT("TIMEZONE ID %d", timezoneId );
+
+ // Append the timezone id to array.
+
+ CTzId* matchingDSTZoneId = CTzId::NewL( timezoneId );
+ CleanupStack::PushL( matchingDSTZoneId );
+
+ tzIdArray.AppendL( *matchingDSTZoneId );
+
+ CleanupStack::PopAndDestroy( matchingDSTZoneId );
+
+ matchingDSTZoneId = NULL;
+ }
+ else
+ {
+ __PRINTS("NOT ABLE TO NARROW DOWN TO TIMEZONE ID WITH RECEIVED NITZ HENCE TRY WITH MCC");
+ // Not able to narrow down to single timezone id with received NITZ packet hence try with MCC.
+ TRAP_IGNORE( iTzResolver->TzIdFromMccL( iMcc, tzIdArray, KInvalidTimeZoneId ) );
+ }
+ }
+ else
+ {
+ __PRINTS("NO NITZ INFO HENCE TRY WITH MCC");
+ // No NITZ info hecne try with MCC to get the time zone Id.
+ TRAP_IGNORE( iTzResolver->TzIdFromMccL( iMcc, tzIdArray, KInvalidTimeZoneId ) );
+ }
// A single matching timezone was found. Set it as the default one.
if( KSingleZone == tzIdArray.Count() )
@@ -708,8 +754,34 @@
CleanupStack::PopAndDestroy( newTzId );
}
CleanupStack::PopAndDestroy( currentCTzId );
- CleanupStack::PopAndDestroy( &tz );
- }
+ CleanupStack::PopAndDestroy( &tz );
+
+ }
+
+ // Set the time on device and set the attributes to null so that we avoid setting old value.
+ if( iTimeAttributes )
+ {
+ // Time sent by nw is UTC
+ TTime nwUtcTime( iTimeAttributes->iUtcDateTime);
+
+ // Set the UTC time only. This is being done because with the UTC time,
+ // before the time is being set, the dst properties for the timezone are being checked.
+ // If its not the first boot, then set the time.
+ __PRINTS( "Setting the UTC time." );
+
+ TRAP_IGNORE( User::SetUTCTime( nwUtcTime ) );
+
+ // Setting the attributes to null again as we dont trust on
+ // previous NITZ data recevied by device.If device receive
+ // NITZ data again attributes would get filled with actual value.
+ // Has been kept outside because this statement is valid for
+ // first boot also.
+
+ iTimeAttributes->iDstOffset = TTimeIntervalMinutes( 0 );
+ iTimeAttributes->iTimeZoneOffset = TTimeIntervalMinutes( 0 );
+ TTime invalidTime( 0 );
+ iTimeAttributes->iUtcDateTime = invalidTime.DateTime();
+ }
}
// Notify the sessions about the change in mcc.
--- a/clock/clockmw/clocksettingsutility/src/settingsutility.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockmw/clocksettingsutility/src/settingsutility.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -38,7 +38,7 @@
:QObject(parent)
{
mTimeSeparatorList << tr(".") << tr(":");
- mClockTypeList << tr("Analog") << tr("Digital");
+ mClockTypeList << hbTrId("txt_clock_button_digital") << hbTrId("txt_clock_button_analog");
mTimeFormatList << hbTrId("txt_clk_setlabel_val_24_hour") << hbTrId("txt_clk_setlabel_val_12_hour");
mDateFormatList << hbTrId("txt_clk_setlabel_val_dd_mm_yyyy") << hbTrId("txt_clk_setlabel_val_mm_dd_yyyy") << hbTrId("txt_clk_setlabel_val_yyyy_mm_dd");
mDateSeparatorList << tr(".") << tr(":") << tr("/") << tr("-");
--- a/clock/clockmw/clocktimezone/bwins/timezoneclientu.def Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockmw/clocktimezone/bwins/timezoneclientu.def Tue Jul 06 14:14:56 2010 +0300
@@ -7,43 +7,43 @@
?getDstRulesL@TimezoneClient@@AAEXAAVQDateTime@@0H@Z @ 6 NONAME ; void TimezoneClient::getDstRulesL(class QDateTime &, class QDateTime &, int)
?locationSelectorModel@TimezoneClient@@QAEPAVQStandardItemModel@@XZ @ 7 NONAME ; class QStandardItemModel * TimezoneClient::locationSelectorModel(void)
?getUtcDstOffsetL@TimezoneClient@@AAE_NAAHABVCTzId@@@Z @ 8 NONAME ; bool TimezoneClient::getUtcDstOffsetL(int &, class CTzId const &)
- ?mReferenceCount@TimezoneClient@@0HA @ 9 NONAME ; int TimezoneClient::mReferenceCount
- ??0TimezoneClient@@AAE@XZ @ 10 NONAME ; TimezoneClient::TimezoneClient(void)
- ?intToMonth@TimezoneClient@@AAE?AW4TMonth@@H@Z @ 11 NONAME ; enum TMonth TimezoneClient::intToMonth(int)
- ?getDstZoneOffset@TimezoneClient@@AAEHH@Z @ 12 NONAME ; int TimezoneClient::getDstZoneOffset(int)
- ?environmentCallback@TimezoneClient@@SAHPAX@Z @ 13 NONAME ; int TimezoneClient::environmentCallback(void *)
- ?trUtf8@TimezoneClient@@SA?AVQString@@PBD0H@Z @ 14 NONAME ; class QString TimezoneClient::trUtf8(char const *, char const *, int)
- ?getStandardOffset@TimezoneClient@@QAEHH@Z @ 15 NONAME ; int TimezoneClient::getStandardOffset(int)
- ?getCurrentZoneInfoL@TimezoneClient@@QAE?AULocationInfo@@XZ @ 16 NONAME ; struct LocationInfo TimezoneClient::getCurrentZoneInfoL(void)
- ?dstOn@TimezoneClient@@QAE_NH@Z @ 17 NONAME ; bool TimezoneClient::dstOn(int)
- ?createWorldClockModel@TimezoneClient@@QAEXXZ @ 18 NONAME ; void TimezoneClient::createWorldClockModel(void)
- ?tr@TimezoneClient@@SA?AVQString@@PBD0H@Z @ 19 NONAME ; class QString TimezoneClient::tr(char const *, char const *, int)
- ?setAsCurrentLocationL@TimezoneClient@@QAEXAAULocationInfo@@@Z @ 20 NONAME ; void TimezoneClient::setAsCurrentLocationL(struct LocationInfo &)
- ?eventMonitor@TimezoneClient@@AAEXABVXQSettingsKey@@ABVQVariant@@@Z @ 21 NONAME ; void TimezoneClient::eventMonitor(class XQSettingsKey const &, class QVariant const &)
- ?getInstance@TimezoneClient@@SAPAV1@XZ @ 22 NONAME ; class TimezoneClient * TimezoneClient::getInstance(void)
- ?getCityGroupIdByName@TimezoneClient@@AAEHABVQString@@@Z @ 23 NONAME ; int TimezoneClient::getCityGroupIdByName(class QString const &)
- ?getCityOffsetByNameAndId@TimezoneClient@@AAEHABVQString@@H@Z @ 24 NONAME ; int TimezoneClient::getCityOffsetByNameAndId(class QString const &, int)
- ?getAllTimeZoneOffsets@TimezoneClient@@QAE?AV?$QList@H@@XZ @ 25 NONAME ; class QList<int> TimezoneClient::getAllTimeZoneOffsets(void)
- ?getCitiesForCountry@TimezoneClient@@AAEXHAAV?$QMap@VQString@@H@@@Z @ 26 NONAME ; void TimezoneClient::getCitiesForCountry(int, class QMap<class QString, int> &)
- ?getCountriesForUTCOffset@TimezoneClient@@QAE?AV?$QList@ULocationInfo@@@@H@Z @ 27 NONAME ; class QList<struct LocationInfo> TimezoneClient::getCountriesForUTCOffset(int)
- ??1TimezoneClient@@EAE@XZ @ 28 NONAME ; TimezoneClient::~TimezoneClient(void)
- ?timeUpdateOn@TimezoneClient@@QAE_NXZ @ 29 NONAME ; bool TimezoneClient::timeUpdateOn(void)
- ?staticMetaObject@TimezoneClient@@2UQMetaObject@@B @ 30 NONAME ; struct QMetaObject const TimezoneClient::staticMetaObject
- ?qt_metacast@TimezoneClient@@UAEPAXPBD@Z @ 31 NONAME ; void * TimezoneClient::qt_metacast(char const *)
- ?autoTimeUpdateChanged@TimezoneClient@@IAEXH@Z @ 32 NONAME ; void TimezoneClient::autoTimeUpdateChanged(int)
- ?trUtf8@TimezoneClient@@SA?AVQString@@PBD0@Z @ 33 NONAME ; class QString TimezoneClient::trUtf8(char const *, char const *)
- ?listUpdated@TimezoneClient@@IAEXXZ @ 34 NONAME ; void TimezoneClient::listUpdated(void)
- ?getSavedLocations@TimezoneClient@@QAE?AV?$QList@ULocationInfo@@@@XZ @ 35 NONAME ; class QList<struct LocationInfo> TimezoneClient::getSavedLocations(void)
- ?getLocationInfo@TimezoneClient@@AAEXHHAAULocationInfo@@@Z @ 36 NONAME ; void TimezoneClient::getLocationInfo(int, int, struct LocationInfo &)
- ?getAllTimeZoneIds@TimezoneClient@@QAE?AV?$QList@H@@XZ @ 37 NONAME ; class QList<int> TimezoneClient::getAllTimeZoneIds(void)
- ?populateCities@TimezoneClient@@AAEXXZ @ 38 NONAME ; void TimezoneClient::populateCities(void)
- ?tr@TimezoneClient@@SA?AVQString@@PBD0@Z @ 39 NONAME ; class QString TimezoneClient::tr(char const *, char const *)
- ?setDateTime@TimezoneClient@@QAEXVQDateTime@@@Z @ 40 NONAME ; void TimezoneClient::setDateTime(class QDateTime)
- ?metaObject@TimezoneClient@@UBEPBUQMetaObject@@XZ @ 41 NONAME ; struct QMetaObject const * TimezoneClient::metaObject(void) const
- ?getStaticMetaObject@TimezoneClient@@SAABUQMetaObject@@XZ @ 42 NONAME ; struct QMetaObject const & TimezoneClient::getStaticMetaObject(void)
- ?mTimezoneClient@TimezoneClient@@0PAV1@A @ 43 NONAME ; class TimezoneClient * TimezoneClient::mTimezoneClient
- ?cityUpdated@TimezoneClient@@IAEXXZ @ 44 NONAME ; void TimezoneClient::cityUpdated(void)
- ?setTimeUpdateOn@TimezoneClient@@QAEX_N@Z @ 45 NONAME ; void TimezoneClient::setTimeUpdateOn(bool)
+ ??0TimezoneClient@@AAE@XZ @ 9 NONAME ; TimezoneClient::TimezoneClient(void)
+ ?intToMonth@TimezoneClient@@AAE?AW4TMonth@@H@Z @ 10 NONAME ; enum TMonth TimezoneClient::intToMonth(int)
+ ?getDstZoneOffset@TimezoneClient@@AAEHH@Z @ 11 NONAME ; int TimezoneClient::getDstZoneOffset(int)
+ ?environmentCallback@TimezoneClient@@SAHPAX@Z @ 12 NONAME ; int TimezoneClient::environmentCallback(void *)
+ ?trUtf8@TimezoneClient@@SA?AVQString@@PBD0H@Z @ 13 NONAME ; class QString TimezoneClient::trUtf8(char const *, char const *, int)
+ ?getStandardOffset@TimezoneClient@@QAEHH@Z @ 14 NONAME ; int TimezoneClient::getStandardOffset(int)
+ ?getCurrentZoneInfoL@TimezoneClient@@QAE?AULocationInfo@@XZ @ 15 NONAME ; struct LocationInfo TimezoneClient::getCurrentZoneInfoL(void)
+ ?dstOn@TimezoneClient@@QAE_NH@Z @ 16 NONAME ; bool TimezoneClient::dstOn(int)
+ ?createWorldClockModel@TimezoneClient@@QAEXXZ @ 17 NONAME ; void TimezoneClient::createWorldClockModel(void)
+ ?tr@TimezoneClient@@SA?AVQString@@PBD0H@Z @ 18 NONAME ; class QString TimezoneClient::tr(char const *, char const *, int)
+ ?setAsCurrentLocationL@TimezoneClient@@QAEXAAULocationInfo@@@Z @ 19 NONAME ; void TimezoneClient::setAsCurrentLocationL(struct LocationInfo &)
+ ?eventMonitor@TimezoneClient@@AAEXABVXQSettingsKey@@ABVQVariant@@@Z @ 20 NONAME ; void TimezoneClient::eventMonitor(class XQSettingsKey const &, class QVariant const &)
+ ?getInstance@TimezoneClient@@SAPAV1@XZ @ 21 NONAME ; class TimezoneClient * TimezoneClient::getInstance(void)
+ ?getCityGroupIdByName@TimezoneClient@@AAEHABVQString@@@Z @ 22 NONAME ; int TimezoneClient::getCityGroupIdByName(class QString const &)
+ ?getCityOffsetByNameAndId@TimezoneClient@@AAEHABVQString@@H@Z @ 23 NONAME ; int TimezoneClient::getCityOffsetByNameAndId(class QString const &, int)
+ ?getAllTimeZoneOffsets@TimezoneClient@@QAE?AV?$QList@H@@XZ @ 24 NONAME ; class QList<int> TimezoneClient::getAllTimeZoneOffsets(void)
+ ?getCitiesForCountry@TimezoneClient@@AAEXHAAV?$QMap@VQString@@H@@@Z @ 25 NONAME ; void TimezoneClient::getCitiesForCountry(int, class QMap<class QString, int> &)
+ ?getCountriesForUTCOffset@TimezoneClient@@QAE?AV?$QList@ULocationInfo@@@@H@Z @ 26 NONAME ; class QList<struct LocationInfo> TimezoneClient::getCountriesForUTCOffset(int)
+ ??1TimezoneClient@@EAE@XZ @ 27 NONAME ; TimezoneClient::~TimezoneClient(void)
+ ?timeUpdateOn@TimezoneClient@@QAE_NXZ @ 28 NONAME ; bool TimezoneClient::timeUpdateOn(void)
+ ?staticMetaObject@TimezoneClient@@2UQMetaObject@@B @ 29 NONAME ; struct QMetaObject const TimezoneClient::staticMetaObject
+ ?qt_metacast@TimezoneClient@@UAEPAXPBD@Z @ 30 NONAME ; void * TimezoneClient::qt_metacast(char const *)
+ ?autoTimeUpdateChanged@TimezoneClient@@IAEXH@Z @ 31 NONAME ; void TimezoneClient::autoTimeUpdateChanged(int)
+ ?trUtf8@TimezoneClient@@SA?AVQString@@PBD0@Z @ 32 NONAME ; class QString TimezoneClient::trUtf8(char const *, char const *)
+ ?listUpdated@TimezoneClient@@IAEXXZ @ 33 NONAME ; void TimezoneClient::listUpdated(void)
+ ?getSavedLocations@TimezoneClient@@QAE?AV?$QList@ULocationInfo@@@@XZ @ 34 NONAME ; class QList<struct LocationInfo> TimezoneClient::getSavedLocations(void)
+ ?getLocationInfo@TimezoneClient@@AAEXHHAAULocationInfo@@@Z @ 35 NONAME ; void TimezoneClient::getLocationInfo(int, int, struct LocationInfo &)
+ ?getAllTimeZoneIds@TimezoneClient@@QAE?AV?$QList@H@@XZ @ 36 NONAME ; class QList<int> TimezoneClient::getAllTimeZoneIds(void)
+ ?populateCities@TimezoneClient@@AAEXXZ @ 37 NONAME ; void TimezoneClient::populateCities(void)
+ ?tr@TimezoneClient@@SA?AVQString@@PBD0@Z @ 38 NONAME ; class QString TimezoneClient::tr(char const *, char const *)
+ ?setDateTime@TimezoneClient@@QAEXVQDateTime@@@Z @ 39 NONAME ; void TimezoneClient::setDateTime(class QDateTime)
+ ?metaObject@TimezoneClient@@UBEPBUQMetaObject@@XZ @ 40 NONAME ; struct QMetaObject const * TimezoneClient::metaObject(void) const
+ ?getStaticMetaObject@TimezoneClient@@SAABUQMetaObject@@XZ @ 41 NONAME ; struct QMetaObject const & TimezoneClient::getStaticMetaObject(void)
+ ?mTimezoneClient@TimezoneClient@@0PAV1@A @ 42 NONAME ; class TimezoneClient * TimezoneClient::mTimezoneClient
+ ?cityUpdated@TimezoneClient@@IAEXXZ @ 43 NONAME ; void TimezoneClient::cityUpdated(void)
+ ?setTimeUpdateOn@TimezoneClient@@QAEX_N@Z @ 44 NONAME ; void TimezoneClient::setTimeUpdateOn(bool)
+ ?mReferenceCount@TimezoneClient@@0_NA @ 45 NONAME ; bool TimezoneClient::mReferenceCount
?getCountries@TimezoneClient@@QAEXAAV?$QMap@VQString@@H@@@Z @ 46 NONAME ; void TimezoneClient::getCountries(class QMap<class QString, int> &)
?checkForDstChange@TimezoneClient@@QAE_NAAUAlarmInfo@@@Z @ 47 NONAME ; bool TimezoneClient::checkForDstChange(struct AlarmInfo &)
?isDSTOnL@TimezoneClient@@QAE_NH@Z @ 48 NONAME ; bool TimezoneClient::isDSTOnL(int)
--- a/clock/clockmw/clocktimezone/eabi/timezoneclientu.def Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockmw/clocktimezone/eabi/timezoneclientu.def Tue Jul 06 14:14:56 2010 +0300
@@ -16,7 +16,7 @@
_ZN14TimezoneClient14deleteInstanceEv @ 15 NONAME
_ZN14TimezoneClient14populateCitiesEv @ 16 NONAME
_ZN14TimezoneClient15getLocationInfoEiiR12LocationInfo @ 17 NONAME
- _ZN14TimezoneClient15mReferenceCountE @ 18 NONAME DATA 4
+ _ZN14TimezoneClient15mReferenceCountE @ 18 NONAME DATA 1
_ZN14TimezoneClient15mTimezoneClientE @ 19 NONAME DATA 4
_ZN14TimezoneClient15setTimeUpdateOnEb @ 20 NONAME
_ZN14TimezoneClient16getDstZoneOffsetEi @ 21 NONAME
--- a/clock/clockmw/clocktimezone/inc/timezoneclient.h Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockmw/clocktimezone/inc/timezoneclient.h Tue Jul 06 14:14:56 2010 +0300
@@ -70,7 +70,7 @@
private:
static TimezoneClient *mTimezoneClient;
- static int mReferenceCount;
+ static bool mReferenceCount;
// TODO: still refatoring
public:
--- a/clock/clockmw/clocktimezone/src/timezoneclient.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockmw/clocktimezone/src/timezoneclient.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -46,7 +46,7 @@
*/
TimezoneClient* TimezoneClient::mTimezoneClient = 0;
-int TimezoneClient::mReferenceCount = 0;
+bool TimezoneClient::mReferenceCount = false;
/*!
Call this funtion to instantiate the TimezoneClient class.
*/
@@ -54,9 +54,9 @@
{
if (!mTimezoneClient) {
mTimezoneClient = new TimezoneClient();
+ mReferenceCount = true;
}
- mReferenceCount++;
return mTimezoneClient;
}
@@ -65,9 +65,7 @@
*/
void TimezoneClient::deleteInstance()
{
- mReferenceCount--;
-
- if (0 == mReferenceCount) {
+ if (mReferenceCount) {
delete mTimezoneClient;
mTimezoneClient = 0;
}
@@ -78,11 +76,7 @@
*/
bool TimezoneClient::isNull()
{
- bool deleted = false;
- if (0 == mReferenceCount) {
- deleted = true;
- }
- return deleted;
+ return !mReferenceCount;
}
/*!
--- a/clock/clockui/clockalarmeditor/clockalarmeditor.pro Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clockalarmeditor/clockalarmeditor.pro Tue Jul 06 14:14:56 2010 +0300
@@ -51,7 +51,8 @@
clockalarmcustomitem.h \
clockalarmeditordefines.h
-RESOURCES += \
- clockalarmeditor.qrc
+RESOURCES += clockalarmeditor.qrc
+
+TRANSLATIONS += clockalarmeditor.ts
# End of file --Don't remove this.
--- a/clock/clockui/clockalarmeditor/data/clockalarmeditor.qrc Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clockalarmeditor/data/clockalarmeditor.qrc Tue Jul 06 14:14:56 2010 +0300
@@ -1,8 +1,4 @@
<!DOCTYPE RCC><RCC version="1.0">
- <qresource prefix="/translations">
- <file alias="clockalarmeditor" >translations/clockalarmeditor.qm</file>
- </qresource>
-
<qresource prefix="/xml">
<file alias="clockalarmeditor.docml">xml/clockalarmeditor.docml</file>
</qresource>
Binary file clock/clockui/clockalarmeditor/data/translations/clockalarmeditor.qm has changed
--- a/clock/clockui/clockalarmeditor/data/translations/clockalarmeditor.ts Wed Jun 23 18:11:28 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,376 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="3.0" language="en_GB" sourcelanguage="en_GB">
-<context>
-<message numerus="no" id="txt_common_common_clock">
- <comment>Title for Date and time settings view</comment>
- <source>Clock</source>
- <translation variants="no">Clock</translation>
- <extra-loc-layout_id></extra-loc-layout_id>
- <extra-loc-viewid>Common</extra-loc-viewid>
- <extra-loc-positionid>Common</extra-loc-positionid>
- <extra-loc-feature>Co</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_note_alarm_occurs_every_week_on_1_at_2">
- <comment>Note displayed after alarm is set (every week)</comment>
- <source>Alarm occurs every week on %1 at %2</source>
- <translation variants="no">Alarm occurs every week on %1 at %2</translation>
- <extra-loc-layout_id>qtl_notifdialog_pri2</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>dpopinfo</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_formlabel_val_alarm">
- <comment>Default value for Description label in Alarm editor view</comment>
- <source>Alarm</source>
- <translation variants="no">Alarm</translation>
- <extra-loc-layout_id>qtl_dataform_description_sec</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>formlabel_1_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_occurence">
- <comment>Label for Occurence in Alarm editor</comment>
- <source>Occurence</source>
- <translation variants="no">Occurence</translation>
- <extra-loc-layout_id>qtl_dataform_heading_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_tumbler_title_alarm_time">
- <comment>Title for the time picker tumbler widget </comment>
- <source>Alarm time</source>
- <translation variants="no">Alarm time</translation>
- <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>
- <extra-loc-viewid>Tumbler</extra-loc-viewid>
- <extra-loc-positionid>title</extra-loc-positionid>
- <extra-loc-feature>Tu</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_opt_discard_changes">
- <comment>When user edits an already existed alarm in Alarm editor form, he can "Discard changes" from Options menu and the prevoius values are saved.</comment>
- <source>Discard changes</source>
- <translation variants="no">Discard changes</translation>
- <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>opt</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_dpopinfo_time_to_alarm_1_hrs_and_2_min">
- <comment>Note displayed after alarm is set (time remaining) (hrs, min)</comment>
- <source>Time to alarm %1 hours and %2 minute</source>
- <translation variants="no">Time to alarm %1 hours and %2 minute</translation>
- <extra-loc-layout_id>qtl_notifdialog_pri2</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>dpopinfo</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_dpopinfo_alarm_will_occur_at_1_after_au">
- <comment>Popup Information which comes after setting the alarm.</comment>
- <source>Alarm will occur at %1 after automatic daylight saving update</source>
- <translation variants="no">Alarm will occur at %1 after automatic daylight saving update</translation>
- <extra-loc-layout_id>qtl_notifdialog_pri2</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>dpopinfo</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_subhead_new_alarm">
- <comment>When user taps on "New alarm" toolbar button in Clock main view, alarm editor opens with the subtitle "New alarm".</comment>
- <source>New alarm</source>
- <translation variants="no">New alarm</translation>
- <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>subhead</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_subhead_alarm">
- <comment>When user taps on already existed alarm in the alarm list, the alarm editor opens with subtitle "Alarm"</comment>
- <source>Alarm</source>
- <translation variants="no">Alarm</translation>
- <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>subhead</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_val_repeat_daily">
- <comment>2nd dropdown list value for Occurence label in Alarm editor view</comment>
- <source>Repeat daily</source>
- <translation variants="no">Repeat daily</translation>
- <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>setlabel_2_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_tumbler_title_time">
- <comment></comment>
- <source>Time</source>
- <translation variants="no">Time</translation>
- <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>
- <extra-loc-viewid>Tumbler</extra-loc-viewid>
- <extra-loc-positionid>title</extra-loc-positionid>
- <extra-loc-feature>Tu</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_common_setlabel_dst">
- <comment></comment>
- <source>DST</source>
- <translation variants="no">DST</translation>
- <extra-loc-layout_id></extra-loc-layout_id>
- <extra-loc-viewid>Common</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1</extra-loc-positionid>
- <extra-loc-feature>Co</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_time">
- <comment>Label for Time in Alarm editor view</comment>
- <source>Time</source>
- <translation variants="no">Time</translation>
- <extra-loc-layout_id>qtl_dataform_heading_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_val_once">
- <comment>1st dropdown list value for Occurence label in Alarm editor view</comment>
- <source>Once</source>
- <translation variants="no">Once</translation>
- <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_alarm_sound">
- <comment>Label for Alarm sound in Alarm editor view</comment>
- <source>Alarm sound</source>
- <translation variants="no">Alarm sound</translation>
- <extra-loc-layout_id>qtl_checkbox_sec</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_val_monday">
- <comment>1st dropdown list value for Day label in Alarm editor view</comment>
- <source>Monday</source>
- <translation variants="no">Monday</translation>
- <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_dpopinfo_alarm_occurs_every_day_at_1">
- <comment>Note displayed after alarm is set (Everyday Time)</comment>
- <source>Alarm occurs every day at %1</source>
- <translation variants="no">Alarm occurs every day at %1</translation>
- <extra-loc-layout_id>qtl_notifdialog_pri2</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>dpopinfo</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_val_thursday">
- <comment>4th dropdown list value for Day label in Alarm editor view</comment>
- <source>Thursday</source>
- <translation variants="no">Thursday</translation>
- <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>setlabel_4_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_val_friday">
- <comment>5th dropdown list value for Day label in Alarm editor view</comment>
- <source>Friday</source>
- <translation variants="no">Friday</translation>
- <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>setlabel_5_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_val_repeat_on_workdays">
- <comment>4th dropdown list value for Occurence label in Alarm editor view</comment>
- <source>Repeat on workdays</source>
- <translation variants="no">Repeat on workdays</translation>
- <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>setlabel_4_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_val_sunday">
- <comment>7th dropdown list value for Day label in Alarm editor view</comment>
- <source>Sunday</source>
- <translation variants="no">Sunday</translation>
- <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>setlabel_7_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_dpopinfo_time_to_alarm_1_hr_and_2_min">
- <comment>Note displayed after alarm is set (time remaining)</comment>
- <source>Time to alarm %1 hour and %2 minute</source>
- <translation variants="no">Time to alarm %1 hour and %2 minute</translation>
- <extra-loc-layout_id>qtl_notifdialog_pri2</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>dpopinfo</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_val_tuesday">
- <comment>2nd dropdown list value for Day label in Alarm editor view</comment>
- <source>Tuesday</source>
- <translation variants="no">Tuesday</translation>
- <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>setlabel_2_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_note_alarm_occurs_once_only_on_next_1_a">
- <comment>Note displayed after alarm is set (only once)</comment>
- <source>Alarm occurs once only on next %1 at %2</source>
- <translation variants="no">Alarm occurs once only on next %1 at %2</translation>
- <extra-loc-layout_id>qtl_notifdialog_pri2</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>dpopinfo</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_dpopinfo_time_to_alarm_1_hr_and_2_mins">
- <comment>Note displayed after alarm is set (time remaining) (hr, mins)</comment>
- <source>Time to alarm %1 hour and %2 minutes</source>
- <translation variants="no">Time to alarm %1 hour and %2 minutes</translation>
- <extra-loc-layout_id>qtl_notifdialog_pri2</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>dpopinfo</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_tumbler_title_alarm_date">
- <comment>Title for the date picker tumbler widget </comment>
- <source>Alarm date</source>
- <translation variants="no">Alarm date</translation>
- <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>
- <extra-loc-viewid>Tumbler</extra-loc-viewid>
- <extra-loc-positionid>title</extra-loc-positionid>
- <extra-loc-feature>Tu</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_tumbler_title_date">
- <comment></comment>
- <source>Date</source>
- <translation variants="no">Date</translation>
- <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>
- <extra-loc-viewid>Tumbler</extra-loc-viewid>
- <extra-loc-positionid>title</extra-loc-positionid>
- <extra-loc-feature>Tu</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_common_common_gmt">
- <comment></comment>
- <source>GMT</source>
- <translation variants="no">GMT</translation>
- <extra-loc-layout_id></extra-loc-layout_id>
- <extra-loc-viewid>Common</extra-loc-viewid>
- <extra-loc-positionid>Common</extra-loc-positionid>
- <extra-loc-feature>Co</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_day">
- <comment>Label for Day in Alarm editor view</comment>
- <source>Day</source>
- <translation variants="no">Day</translation>
- <extra-loc-layout_id>qtl_dataform_heading_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_val_repeat_weekly">
- <comment>3rd dropdown list value for Occurence label in Alarm editor view</comment>
- <source>Repeat weekly</source>
- <translation variants="no">Repeat weekly</translation>
- <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>setlabel_3_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_dpopinfo_time_to_alarm_1_hrs_and_2_mins">
- <comment>Note displayed after alarm is set (time remaining) (hrs, mins)</comment>
- <source>Time to alarm %1 hours and %2 minutes</source>
- <translation variants="no">Time to alarm %1 hours and %2 minutes</translation>
- <extra-loc-layout_id>qtl_notifdialog_pri2</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>dpopinfo</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_note_alarm_occurs_workdays_at_1">
- <comment>Note displayed after alarm is set (workdays)</comment>
- <source>Alarm occurs workdays at %1</source>
- <translation variants="no">Alarm occurs workdays at %1</translation>
- <extra-loc-layout_id>qtl_notifdialog_pri2</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>dpopinfo</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_opt_delete">
- <comment>When user creates a new alarm in Alarm editor form, he can "Delete" this alarm via Options menu.</comment>
- <source>Delete</source>
- <translation variants="no">Delete</translation>
- <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>opt</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_val_saturday">
- <comment>6th dropdown list value for Day label in Alarm editor view</comment>
- <source>Saturday</source>
- <translation variants="no">Saturday</translation>
- <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>setlabel_6_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_val_wednesday">
- <comment>3rd dropdown list value for Day label in Alarm editor view</comment>
- <source>Wednesday</source>
- <translation variants="no">Wednesday</translation>
- <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>setlabel_3_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_formlabel_description">
- <comment>Label for Description in Alarm editor view</comment>
- <source>Description</source>
- <translation variants="no">Description</translation>
- <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>formlabel_1</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-</context>
-</TS>
--- a/clock/clockui/clockalarmeditor/inc/clockalarmeditor.h Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clockalarmeditor/inc/clockalarmeditor.h Tue Jul 06 14:14:56 2010 +0300
@@ -36,12 +36,13 @@
class HbAction;
class HbDateTimePicker;
class HbDialog;
+class HbTranslator;
class XQSettingsManager;
class XQSettingsKey;
class AlarmClient;
class TimezoneClient;
class ClockAlarmCustomItem;
-class QTranslator;
+
class ClockAlarmEditor : public QObject
{
@@ -118,7 +119,7 @@
AlarmClient &mAlarmClient;
AlarmInfo mAlarmInfo;
TimezoneClient *mTimezoneClient;
- QTranslator *mTranslator;
+ HbTranslator *mTranslator;
};
#endif // CLOCKALARMEDITOR_H
--- a/clock/clockui/clockalarmeditor/src/clockalarmeditor.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clockalarmeditor/src/clockalarmeditor.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -32,10 +32,10 @@
#include <HbExtendedLocale>
#include <HbGroupBox>
#include <HbDocumentLoader>
-#include <HbApplication>
+#include <HbTranslator>
#include <xqsettingsmanager.h>
#include <xqsettingskey.h>
-#include <QTranslator>
+
// User includes
#include "clockprivatecrkeys.h"
@@ -85,14 +85,9 @@
mAlarmClient(alarmClient)
{
// Load the translation file and install the alarmeditor specific translator
- mTranslator = new QTranslator;
- //QString lang = QLocale::system().name();
- //QString path = "Z:/resource/qt/translations/";
- mTranslator->load("clockalarmeditor",":/translations");
- // TODO: Load the appropriate .qm file based on locale
- //bool loaded = mTranslator->load("caleneditor_" + lang, path);
- HbApplication::instance()->installTranslator(mTranslator);
-
+ mTranslator = new HbTranslator("clockalarmeditor");
+ mTranslator->loadCommon();
+
// create the timezone client object
mTimezoneClient = TimezoneClient::getInstance();
// Create the settings manager.
@@ -107,7 +102,7 @@
// TODO: do i need to delete this object ??
SettingsUtility *settingsUtil = new SettingsUtility(this);
mTimeFormat = settingsUtil->timeFormatString();
-
+
// Get start of week from the locale.
HbExtendedLocale locale = HbExtendedLocale::system();
mStartOfWeek = locale.startOfWeek();
@@ -176,11 +171,7 @@
*/
ClockAlarmEditor::~ClockAlarmEditor()
{
- if(!mTimezoneClient->isNull()) {
- mTimezoneClient->deleteInstance();
- }
// Remove the translator
- HbApplication::instance()->removeTranslator(mTranslator);
if (mTranslator) {
delete mTranslator;
mTranslator = 0;
@@ -408,6 +399,7 @@
SettingsUtility *settingsUtil = new SettingsUtility(this);
QStringList timeSeparator;
int index = settingsUtil->timeFormat(timeSeparator);
+
QString tumblerDisplayFormat =
mTimeFormat.replace(timeSeparator.at(index), QString("."));
--- a/clock/clockui/clockapplication/src/main.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clockapplication/src/main.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -18,7 +18,7 @@
// System includes
#include <QtGui>
#include <QScopedPointer>
-#include <QTranslator>
+#include <HbTranslator>
#include <HbApplication>
#include <HbMainWindow>
@@ -43,10 +43,9 @@
window.setViewportUpdateMode(QGraphicsView::MinimalViewportUpdate);
// Load the translation file.
- QTranslator translator;
- translator.load("clock", ":/translations");
- app.installTranslator(&translator);
-
+ HbTranslator translator("clock");
+ translator.loadCommon();
+
// Construct the application controller.
QScopedPointer<ClockAppController> controller(new ClockAppController);
Q_UNUSED(controller)
--- a/clock/clockui/clockcityselectionlist/clockcityselectionlist.pro Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clockcityselectionlist/clockcityselectionlist.pro Tue Jul 06 14:14:56 2010 +0300
@@ -43,7 +43,7 @@
clockcityselectionlist.cpp \
clockcityselectionlist_p.cpp \
clockcitylistproxymodel.cpp \
- clockcityselectionlistprototype.cpp
+
HEADERS += \
clockcityselectionlist.h \
@@ -51,9 +51,10 @@
clockcitylistproxymodel.h \
clockcityselectionlistdefines.h \
clockcityselectionlistcommon.h \
- clockcityselectionlistprototype.h
RESOURCES += \
clockcityselectionlist.qrc
+
+TRANSLATIONS += clockcityselectionlist.ts
# End of file --Don't remove this.
--- a/clock/clockui/clockcityselectionlist/data/clockcityselectionlist.qrc Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clockcityselectionlist/data/clockcityselectionlist.qrc Tue Jul 06 14:14:56 2010 +0300
@@ -2,13 +2,4 @@
<qresource prefix="/xml">
<file alias="clockcityselectionlist.docml">xml/clockcityselectionlist.docml</file>
</qresource>
- <qresource prefix= "/style">
- <file alias="clockcityselectionlistprototype.css">style/clockcityselectionlistprototype.css</file>
- <file alias="clockcityselectionlistprototype_color.css">style/clockcityselectionlistprototype_color.css</file>
- <file alias="clockcityselectionlistprototype.widgetml">style/clockcityselectionlistprototype.widgetml</file>
- </qresource>
- <qresource prefix="/translations">
- <file alias="clockcityselectionlist" >translations/clockcityselectionlist.qm</file>
- </qresource>
-
</RCC>
--- a/clock/clockui/clockcityselectionlist/data/style/clockcityselectionlistprototype.css Wed Jun 23 18:11:28 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-ClockCitySelectionListPrototype[layoutName="cityselectionlist-default"]{
- layout: cityselectionlist-default;
-}
-
-ClockCitySelectionListPrototype::cityNameItem[layoutName="cityselectionlist-default"]{
- font-variant: secondary;
- text-height: var(hb-param-text-height-secondary);
- text-line-count-min: 1;
- text-line-count-max: 2;
- text-align: left;
- left: -var(hb-param-margin-gene-left);
- top: -var(hb-param-margin-gene-top);
- right: var(hb-param-margin-gene-right);
- bottom: var(hb-param-margin-gene-bottom);
-}
--- a/clock/clockui/clockcityselectionlist/data/style/clockcityselectionlistprototype.widgetml Wed Jun 23 18:11:28 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-<hbwidget version="0.1" type="ClockCitySelectionListPrototype">
- <layout name="cityselectionlist-default" type="mesh">
- <meshitem src="cityNameItem" srcEdge="TOP" dst="" dstEdge="TOP" />
- <meshitem src="cityNameItem" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
- <meshitem src="cityNameItem" srcEdge="LEFT" dst="" dstEdge="LEFT" />
- <meshitem src="cityNameItem" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
- </layout>
-</hbwidget>
--- a/clock/clockui/clockcityselectionlist/data/style/clockcityselectionlistprototype_color.css Wed Jun 23 18:11:28 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-ClockCitySelectionListPrototype::cityNameItem{
- color: var(qtc_list_item_content_normal);
-}
-
-ClockCitySelectionListPrototype::cityNameItem[state="pressed"]{
- color: var(qtc_list_item_pressed);
-}
-
-ClockCitySelectionListPrototype::cityNameItem[state="disabled"]{
- color: var(qtc_list_item_disabled);
-}
\ No newline at end of file
Binary file clock/clockui/clockcityselectionlist/data/translations/clockcityselectionlist.qm has changed
--- a/clock/clockui/clockcityselectionlist/data/translations/clockcityselectionlist.ts Wed Jun 23 18:11:28 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="3.0" language="en_GB" sourcelanguage="en_GB">
-<context>
-<message numerus="no" id="txt_common_common_clock">
- <comment>Title for Date and time settings view</comment>
- <source>Clock</source>
- <translation variants="no">Clock</translation>
- <extra-loc-layout_id></extra-loc-layout_id>
- <extra-loc-viewid>Common</extra-loc-viewid>
- <extra-loc-positionid>Common</extra-loc-positionid>
- <extra-loc-feature>Co</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_formlabel_city_name">
- <comment>Form label for city name in add own city (popup) data entry form</comment>
- <source>City name</source>
- <translation variants="no">City name</translation>
- <extra-loc-layout_id>qtl_dataform_heading_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_City list_P07</extra-loc-viewid>
- <extra-loc-positionid>formlabel_1</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_formlabel_timezone">
- <comment>Form label for timezone in add own city (popup) data entry form</comment>
- <source>Timezone</source>
- <translation variants="no">Timezone</translation>
- <extra-loc-layout_id>qtl_dataform_heading_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_City list_P07</extra-loc-viewid>
- <extra-loc-positionid>formlabel_1</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_formlabel_country">
- <comment>Form label for country in add own city (popup) data entry form</comment>
- <source>Country</source>
- <translation variants="no">Country</translation>
- <extra-loc-layout_id>qtl_dataform_heading_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_City list_P07</extra-loc-viewid>
- <extra-loc-positionid>formlabel_1</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_common_setlabel_dst">
- <comment></comment>
- <source>DST</source>
- <translation variants="no">DST</translation>
- <extra-loc-layout_id></extra-loc-layout_id>
- <extra-loc-viewid>Common</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1</extra-loc-positionid>
- <extra-loc-feature>Co</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_subhead_city_list">
- <comment>Subtitle for City list</comment>
- <source>City list</source>
- <translation variants="no">City list</translation>
- <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>
- <extra-loc-viewid>Clock_City list_P07</extra-loc-viewid>
- <extra-loc-positionid>subhead</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_common_common_gmt">
- <comment></comment>
- <source>GMT</source>
- <translation variants="no">GMT</translation>
- <extra-loc-layout_id></extra-loc-layout_id>
- <extra-loc-viewid>Common</extra-loc-viewid>
- <extra-loc-positionid>Common</extra-loc-positionid>
- <extra-loc-feature>Co</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_opt_add_own_city">
- <comment>"Add own city" from Options menu in City list </comment>
- <source>Add own city</source>
- <translation variants="no">Add own city</translation>
- <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_City list_P07</extra-loc-viewid>
- <extra-loc-positionid>opt</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-</context>
-</TS>
--- a/clock/clockui/clockcityselectionlist/inc/clockcityselectionlist.h Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clockcityselectionlist/inc/clockcityselectionlist.h Tue Jul 06 14:14:56 2010 +0300
@@ -27,10 +27,9 @@
#include "clockdatatypes.h"
// Forward declarations
+class HbTranslator;
class ClockCitySelectionListPrivate;
class TimezoneClient;
-class QTranslator;
-
class CLOCKCITYSELECTIONLIST_EXPORT ClockCitySelectionList : public QObject
{
@@ -52,7 +51,7 @@
ClockCitySelectionListPrivate *d_ptr;
Q_DECLARE_PRIVATE_D(d_ptr, ClockCitySelectionList)
Q_DISABLE_COPY(ClockCitySelectionList)
- QTranslator *mTranslator;
+ HbTranslator *mTranslator;
};
#endif // CLOCKCITYSELECTIONLIST_H
--- a/clock/clockui/clockcityselectionlist/inc/clockcityselectionlistprototype.h Wed Jun 23 18:11:28 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +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:
-* The header file for class ClockCitySelectionListPrototype.
-*
-*/
-
-#ifndef CLOCKCITYSELECTIONLISTPROTOTYPE_H
-#define CLOCKCITYSELECTIONLISTPROTOTYPE_H
-
-// System includes
-#include <HbListViewItem>
-
-// Forward declarations
-class QGraphicsItem;
-class HbAbstractViewItem;
-class HbTextItem;
-
-class ClockCitySelectionListPrototype : public HbListViewItem
-{
- Q_OBJECT
-
-public:
- explicit ClockCitySelectionListPrototype(QGraphicsItem *parent = 0);
- virtual ~ClockCitySelectionListPrototype();
-
-public:
- HbAbstractViewItem *createItem();
- void updateChildItems();
-
-private:
- HbTextItem *mCityNameItem;
-};
-
-#endif // CLOCKCITYSELECTIONLISTPROTOTYPE_H
-
-// End of file --Don't remove this.
--- a/clock/clockui/clockcityselectionlist/src/clockcityselectionlist.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clockcityselectionlist/src/clockcityselectionlist.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -17,8 +17,7 @@
*/
//System Include
-#include<HbApplication>
-#include<QTranslator>
+#include<HbTranslator>
// User includes
@@ -55,13 +54,8 @@
d_ptr(new ClockCitySelectionListPrivate(client, this))
{
// Load the translation file and install the editor specific translator
- mTranslator = new QTranslator;
- //QString lang = QLocale::system().name();
- //QString path = "Z:/resource/qt/translations/";
- mTranslator->load("clockcityselectionlist",":/translations");
- // TODO: Load the appropriate .qm file based on locale
- //bool loaded = mTranslator->load("caleneditor_" + lang, path);
- HbApplication::instance()->installTranslator(mTranslator);
+ mTranslator = new HbTranslator("clockcityselectionlist");
+ mTranslator->loadCommon();
}
/*!
@@ -74,20 +68,13 @@
d_ptr(new ClockCitySelectionListPrivate(0, this))
{
// Load the translation file and install the editor specific translator
- mTranslator = new QTranslator;
- //QString lang = QLocale::system().name();
- //QString path = "Z:/resource/qt/translations/";
- mTranslator->load("clockcityselectionlist",":/translations");
- // TODO: Load the appropriate .qm file based on locale
- //bool loaded = mTranslator->load("caleneditor_" + lang, path);
- HbApplication::instance()->installTranslator(mTranslator);
-
+ mTranslator = new HbTranslator("clockcityselectionlist");
+ mTranslator->loadCommon();
}
ClockCitySelectionList::~ClockCitySelectionList()
{
// Remove the translator
- HbApplication::instance()->removeTranslator(mTranslator);
if (mTranslator) {
delete mTranslator;
mTranslator = 0;
--- a/clock/clockui/clockcityselectionlist/src/clockcityselectionlist_p.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clockcityselectionlist/src/clockcityselectionlist_p.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -40,7 +40,7 @@
#include "clockcityselectionlist.h"
#include "clockcitylistproxymodel.h"
#include "clockcityselectionlistcommon.h"
-#include "clockcityselectionlistprototype.h"
+
#include "timezoneclient.h"
#include "clockdatatypes.h"
@@ -77,7 +77,7 @@
*/
ClockCitySelectionListPrivate::~ClockCitySelectionListPrivate()
{
- if (mOwnsClient && !mClient->isNull()) {
+ if (mOwnsClient) {
mClient->deleteInstance();
}
if (mLoader) {
@@ -123,6 +123,7 @@
displayString += info.cityName;
displayString += ", ";
displayString += info.countryName;
+ mListModel->setData(index, displayString, Qt::DisplayRole);
mListModel->setData(index, displayString, Qt::UserRole + 100);
// Now save the timezone and city group ids.
@@ -402,15 +403,6 @@
mProxyModel->setSourceModel(mListModel);
mProxyModel->setFilterRole(Qt::UserRole + 100);
- // Construct the custom list item prototype.
- ClockCitySelectionListPrototype *prototype =
- new ClockCitySelectionListPrototype;
-
- // Loader the custom list view layout.
- HbStyleLoader::registerFilePath(":/style/");
- mListView->setLayoutName("cityselectionlist-default");
- mListView->setItemPrototype(prototype);
-
// Construct the model for the list.
QTimer::singleShot(1, this, SLOT(populateListModel()));
--- a/clock/clockui/clockcityselectionlist/src/clockcityselectionlistprototype.cpp Wed Jun 23 18:11:28 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +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:
-* The definition file for class ClockCitySelectionListPrototype.
-*
-*/
-
-// System includes
-#include <QGraphicsItem>
-#include <HbTextItem>
-
-// User includes
-#include "clockcityselectionlistprototype.h"
-
-/*!
- \class ClockCitySelectionListPrototype
-
- This is the custom prototype class for HbListView. It sub-classes
- HbListViewItem and re-implements HbListViewItem::createItem() and
- HbListViewItem::updateChildItems().
-
- \sa HbListViewItem, HbAbstractViewItem.
- */
-
-/*!
- Default constructor.
-
- \param parent of type QGraphicsItem.
- */
-ClockCitySelectionListPrototype::ClockCitySelectionListPrototype(
- QGraphicsItem *parent)
-:HbListViewItem(parent),
- mCityNameItem(0)
-{
- // Nothing yet.
-}
-
-/*!
- Destructor.
- */
-ClockCitySelectionListPrototype::~ClockCitySelectionListPrototype()
-{
- if (mCityNameItem) {
- delete mCityNameItem;
- mCityNameItem = 0;
- }
-}
-
-/*!
- From HbListViewItem.
- Constructs the custom list view item.
-
- \sa HbListViewItem, HbAbstractViewItem.
- */
-HbAbstractViewItem *ClockCitySelectionListPrototype::createItem()
-{
- return new ClockCitySelectionListPrototype(*this);
-}
-
-/*!
- From HbListViewItem.
- Updates the child items of the cutsom prototype.
-
- \sa HbListViewItem, HbAbstractViewItem.
- */
-void ClockCitySelectionListPrototype::updateChildItems()
-{
- HbListViewItem::updateChildItems();
-
- if (!mCityNameItem) {
- mCityNameItem = new HbTextItem(this);
- style()->setItemName(mCityNameItem, "cityNameItem");
- mCityNameItem->setTextWrapping(Hb::TextWordWrap);
- }
- mCityNameItem->setText(
- modelIndex().data(Qt::UserRole + 100).value<QString>());
-}
-
-// End of file --Don't remove this.
--- a/clock/clockui/clocksettingsview/clocksettingsview.pro Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clocksettingsview/clocksettingsview.pro Tue Jul 06 14:14:56 2010 +0300
@@ -62,5 +62,7 @@
RESOURCES += \
clocksettingsview.qrc
+
+TRANSLATIONS += clocksettingsview.ts
# End of file --Don't remove this.
--- a/clock/clockui/clocksettingsview/data/clocksettingsview.qrc Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clocksettingsview/data/clocksettingsview.qrc Tue Jul 06 14:14:56 2010 +0300
@@ -3,7 +3,4 @@
<file alias="clocksettingsview.docml">xml/clocksettingsview.docml</file>
<file alias="clockregionalsettingsview.docml">xml/clockregionalsettingsview.docml</file>
</qresource>
- <qresource prefix="/translations">
- <file alias="clocksettingsview" >translations/clocksettingsview.qm</file>
- </qresource>
</RCC>
Binary file clock/clockui/clocksettingsview/data/translations/clocksettingsview.qm has changed
--- a/clock/clockui/clocksettingsview/data/translations/clocksettingsview.ts Wed Jun 23 18:11:28 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,369 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="3.0" language="en_GB" sourcelanguage="en_GB">
-<context>
-<message numerus="no" id="txt_common_common_clock">
- <comment>Title for Date and time settings view</comment>
- <source>Clock</source>
- <translation variants="no">Clock</translation>
- <extra-loc-layout_id></extra-loc-layout_id>
- <extra-loc-viewid>Common</extra-loc-viewid>
- <extra-loc-positionid>Common</extra-loc-positionid>
- <extra-loc-feature>Co</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_setlabel_time_format">
- <comment>1st label in Regional date & time settings view</comment>
- <source>Time format</source>
- <translation variants="no">Time format</translation>
- <extra-loc-layout_id>qtl_dataform_heading_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Date & time settings_P04_3</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_cp_main_view_list_time_info_date_info">
- <comment>The time and date information will be displayed in 2nd row</comment>
- <source>%1, %2</source>
- <translation variants="no">%1, %2</translation>
- <extra-loc-layout_id>qtl_list_sec_large_graphic</extra-loc-layout_id>
- <extra-loc-viewid>CP main view_time & date plugin_P11</extra-loc-viewid>
- <extra-loc-positionid>list</extra-loc-positionid>
- <extra-loc-feature>CP</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_button_digital">
- <comment>Setting item to clock display type. Tap to toggle values.</comment>
- <source>Digital</source>
- <translation variants="no">Digital</translation>
- <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Date & time settings_P04_1</extra-loc-viewid>
- <extra-loc-positionid>button</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_cp_main_view_list_time_date">
- <comment>This text is displayed in 1st row</comment>
- <source>Time & date</source>
- <translation variants="no">Time & date</translation>
- <extra-loc-layout_id>qtl_list_pri_large_graphic</extra-loc-layout_id>
- <extra-loc-viewid>CP main view_time & date plugin_P11</extra-loc-viewid>
- <extra-loc-positionid>list</extra-loc-positionid>
- <extra-loc-feature>CP</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_val_mm_dd_yyyy">
- <comment>2nd value in combo box list for Date format label</comment>
- <source>mm dd yyyy</source>
- <translation variants="no">mm dd yyyy</translation>
- <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Date & time settings_P04_3</extra-loc-viewid>
- <extra-loc-positionid>setlabel_2_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_setlabel_date_format">
- <comment>3rd field in Regional date & time settings view</comment>
- <source>Date format</source>
- <translation variants="no">Date format</translation>
- <extra-loc-layout_id>qtl_dataform_heading_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Date & time settings_P04_3</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_button_regional_date_time_settings">
- <comment>Tapping on this button opens advanced date and time view</comment>
- <source>Regional date & time settings</source>
- <translation variants="no">Regional date & time settings</translation>
- <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Date & time settings_P04_1</extra-loc-viewid>
- <extra-loc-positionid>button</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_subhead_regional_date_time_settings">
- <comment>Sub-title for Regiional date & time settings</comment>
- <source>Regional date & time settings</source>
- <translation variants="no">Regional date & time settings</translation>
- <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Date & time settings_P04_3</extra-loc-viewid>
- <extra-loc-positionid>subhead</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_formlabel_place">
- <comment>5th label for Place in Clock settings view</comment>
- <source>Place</source>
- <translation variants="no">Place</translation>
- <extra-loc-layout_id>qtl_dataform_heading_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Date & time settings_P04_1</extra-loc-viewid>
- <extra-loc-positionid>formlabel_1</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_val_24_hour">
- <comment>1st Value in combo box list for Time format label</comment>
- <source>24 hour</source>
- <translation variants="no">24 hour</translation>
- <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Date & time settings_P04_3</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_common_setlabel_dst">
- <comment></comment>
- <source>DST</source>
- <translation variants="no">DST</translation>
- <extra-loc-layout_id></extra-loc-layout_id>
- <extra-loc-viewid>Common</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1</extra-loc-positionid>
- <extra-loc-feature>Co</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_val_monday">
- <comment>1st dropdown list value for Day label in Alarm editor view</comment>
- <source>Monday</source>
- <translation variants="no">Monday</translation>
- <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_val_thursday">
- <comment>4th dropdown list value for Day label in Alarm editor view</comment>
- <source>Thursday</source>
- <translation variants="no">Thursday</translation>
- <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>setlabel_4_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_val_friday">
- <comment>5th dropdown list value for Day label in Alarm editor view</comment>
- <source>Friday</source>
- <translation variants="no">Friday</translation>
- <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>setlabel_5_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_button_analog">
- <comment>Setting item to clock display type. Tap to toggle values.</comment>
- <source>Analog</source>
- <translation variants="no">Analog</translation>
- <extra-loc-layout_id>qtl_dataform_button_sec</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Date & time settings_P04_1</extra-loc-viewid>
- <extra-loc-positionid>button</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_setlabel_week_starts_on">
- <comment>6th field in Regional date & time settings view</comment>
- <source>Week starts on</source>
- <translation variants="no">Week starts on</translation>
- <extra-loc-layout_id>qtl_dataform_heading_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Date & time settings_P04_3</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_val_sunday">
- <comment>7th dropdown list value for Day label in Alarm editor view</comment>
- <source>Sunday</source>
- <translation variants="no">Sunday</translation>
- <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>setlabel_7_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_val_yyyy_mm_dd">
- <comment>3rd value in combo box list for Date format label</comment>
- <source>yyyy mm dd</source>
- <translation variants="no">yyyy mm dd</translation>
- <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Date & time settings_P04_3</extra-loc-viewid>
- <extra-loc-positionid>setlabel_3_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_val_tuesday">
- <comment>2nd dropdown list value for Day label in Alarm editor view</comment>
- <source>Tuesday</source>
- <translation variants="no">Tuesday</translation>
- <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>setlabel_2_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_common_common_gmt">
- <comment></comment>
- <source>GMT</source>
- <translation variants="no">GMT</translation>
- <extra-loc-layout_id></extra-loc-layout_id>
- <extra-loc-viewid>Common</extra-loc-viewid>
- <extra-loc-positionid>Common</extra-loc-positionid>
- <extra-loc-feature>Co</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_use_network_date_time">
- <comment>1st label in Date and time settings view</comment>
- <source>Use network date & time</source>
- <translation variants="no">Use network date & time</translation>
- <extra-loc-layout_id>qtl_checkbox_sec</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Date & time settings_P04_1</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_setlabel_time_separator">
- <comment>Subtitle for the time seperator drop down list</comment>
- <source>Time separator</source>
- <translation variants="no">Time separator</translation>
- <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Date & time settings_P04_3</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_subhead_settings">
- <comment>Sub-title for Settings view</comment>
- <source>Settings</source>
- <translation variants="no">Settings</translation>
- <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Date & time settings_P04_1</extra-loc-viewid>
- <extra-loc-positionid>subhead</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_setlabel_date_separator">
- <comment>Subtitle for the date seperator drop down list</comment>
- <source>Date separator</source>
- <translation variants="no">Date separator</translation>
- <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Date & time settings_P04_3</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_setlabel_workdays">
- <comment>Label for Workdays in Alarm editor</comment>
- <source>Workdays</source>
- <translation variants="no">Workdays</translation>
- <extra-loc-layout_id>qtl_dataform_heading_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Date & time settings_P04_3</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_setlabel_date">
- <comment>Label to the date field (picker) in the settings view</comment>
- <source>Date</source>
- <translation variants="no">Date</translation>
- <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Date & time settings_P04_1</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_setlabel_time">
- <comment>Label to the time field (picker) in the settings view</comment>
- <source>Time</source>
- <translation variants="no">Time</translation>
- <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Date & time settings_P04_1</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_val_12_hour">
- <comment>2nd value in combo box list for Time format label</comment>
- <source>12 hour</source>
- <translation variants="no">12 hour</translation>
- <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Date & time settings_P04_3</extra-loc-viewid>
- <extra-loc-positionid>setlabel_2_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_setlabel_alarm_snooze_time">
- <comment>Primary text label for Clock Type</comment>
- <source>Alarm snooze time</source>
- <translation variants="no">Alarm snooze time</translation>
- <extra-loc-layout_id>qtl_dataform_pri_graphic</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Date & time settings_P04_1</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="yes" id="txt_clock_set_ln_mins">
- <comment>Alarm snooze time details in the list box (5mins, 10mins, 15mins, 30mins)</comment>
- <source>%Ln mins</source>
- <translation>
- <numerusform variants = "no">%Ln mins</numerusform>
- <numerusform variants = "no">%Ln mins</numerusform>
- </translation>
- <extra-loc-layout_id>qtl_dataform_combobox_sec</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Date & time settings_P04_1</extra-loc-viewid>
- <extra-loc-positionid>set</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_setlabel_clock_type">
- <comment>Primary text label for Clock Type</comment>
- <source>Clock Type</source>
- <translation variants="no">Clock Type</translation>
- <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Date & time settings_P04_1</extra-loc-viewid>
- <extra-loc-positionid>setlabel_5</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_subhead_date_time">
- <comment>Sub-title for Date & time settings view</comment>
- <source>Date & time</source>
- <translation variants="no">Date & time</translation>
- <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Date & time settings_P04_1</extra-loc-viewid>
- <extra-loc-positionid>subhead</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_val_saturday">
- <comment>6th dropdown list value for Day label in Alarm editor view</comment>
- <source>Saturday</source>
- <translation variants="no">Saturday</translation>
- <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>setlabel_6_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_val_wednesday">
- <comment>3rd dropdown list value for Day label in Alarm editor view</comment>
- <source>Wednesday</source>
- <translation variants="no">Wednesday</translation>
- <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Alarm editor_P03</extra-loc-viewid>
- <extra-loc-positionid>setlabel_3_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_val_dd_mm_yyyy">
- <comment>1st value in combo box list for Date format label</comment>
- <source>dd mm yyyy</source>
- <translation variants="no">dd mm yyyy</translation>
- <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_Date & time settings_P04_3</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-</context>
-</TS>
--- a/clock/clockui/clocksettingsview/inc/clockregionalsettingsview.h Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clocksettingsview/inc/clockregionalsettingsview.h Tue Jul 06 14:14:56 2010 +0300
@@ -35,7 +35,7 @@
class HbDataFormModelItem;
class HbListWidget;
class HbComboBox;
-class QTranslator;
+class HbTranslator;
class ClockSettingsDocLoader;
class SettingsCustomItem;
@@ -90,7 +90,7 @@
ClockSettingsDocLoader *mLoader;
SettingsUtility *mSettingsUtility;
SettingsCustomItem *mCustomPrototype;
- QTranslator *mTranslator;
+ HbTranslator *mTranslator;
};
#endif // CLOCKREGIONALSETTINGSVIEW_H
--- a/clock/clockui/clocksettingsview/inc/clocksettingsview.h Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clocksettingsview/inc/clocksettingsview.h Tue Jul 06 14:14:56 2010 +0300
@@ -37,7 +37,7 @@
class SettingsUtility;
class ClockSettingsDocLoader;
class ClockSettingsView;
-class QTranslator;
+class HbTranslator;
class XQSettingsManager;
class XQSettingsKey;
@@ -61,6 +61,7 @@
void handleNetworkTimeStateChange(int state);
void handleAutoTimeUpdateChange(int value);
void handleAlarmSnoozeTimeChanged(int index);
+ void handleClockTypeChanged();
void eventMonitor(const XQSettingsKey& key, const QVariant& value);
private:
@@ -82,15 +83,15 @@
HbDataFormModelItem *mTimeDataFormItem;
HbDataFormModelItem *mDateDataFormItem;
HbDataFormModelItem *mPlaceDataFormItem;
+ HbDataFormModelItem *mClockTypeItem;
HbDataFormModelItem *mAlarmSnoozeItem;
-
ClockSettingsDocLoader *mDocLoader;
SettingsUtility *mSettingsUtility;
TimezoneClient *mTimezoneClient;
XQSettingsManager *mSettingsManager;
XQSettingsKey *mAlarmSnoozeTimeKey;
QHash<int, int> mAlarmSnoozeTimeHash;
- QTranslator *mTranslator;
+ HbTranslator *mTranslator;
};
#endif // CLOCKSETTINGSVIEW_H
--- a/clock/clockui/clocksettingsview/src/clockregionalsettingsview.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clocksettingsview/src/clockregionalsettingsview.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -30,8 +30,7 @@
#include <HbListWidget>
#include <HbComboBox>
#include <HbListWidgetItem>
-#include <HbApplication>
-#include <QTranslator>
+#include <HbTranslator>
// User includes
#include "clockregionalsettingsview.h"
@@ -61,13 +60,9 @@
mSettingsUtility = new SettingsUtility();
// Load the translation file and install the editor specific translator
- mTranslator = new QTranslator;
- //QString lang = QLocale::system().name();
- //QString path = "Z:/resource/qt/translations/";
- mTranslator->load("clocksettingsview",":/translations");
- // TODO: Load the appropriate .qm file based on locale
- //bool loaded = mTranslator->load("caleneditor_" + lang, path);
- HbApplication::instance()->installTranslator(mTranslator);
+ mTranslator = new HbTranslator("clocksettingsview");
+ mTranslator->loadCommon();
+
// Create the custom prototype.
mCustomPrototype = new SettingsCustomItem();
}
@@ -90,7 +85,6 @@
delete mFormModel;
}
// Remove the translator
- HbApplication::instance()->removeTranslator(mTranslator);
if (mTranslator) {
delete mTranslator;
mTranslator = 0;
--- a/clock/clockui/clocksettingsview/src/clocksettingsview.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clocksettingsview/src/clocksettingsview.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -25,8 +25,7 @@
#include <HbLabel>
#include <HbPushButton>
#include <HbCheckBox>
-#include <HbApplication>
-#include <QTranslator>
+#include <HbTranslator>
#include <xqsettingsmanager.h>
#include <xqsettingskey.h>
#include <clockdomaincrkeys.h>
@@ -55,16 +54,10 @@
ClockSettingsView::ClockSettingsView(QObject *parent)
:QObject(parent)
{
- qDebug("clock: ClockSettingsView::ClockSettingsView() -->");
// Load the translation file and install the editor specific translator
- mTranslator = new QTranslator;
- //QString lang = QLocale::system().name();
- //QString path = "Z:/resource/qt/translations/";
- mTranslator->load("clocksettingsview",":/translations");
- // TODO: Load the appropriate .qm file based on locale
- //bool loaded = mTranslator->load("caleneditor_" + lang, path);
- HbApplication::instance()->installTranslator(mTranslator);
+ mTranslator = new HbTranslator("clocksettingsview");
+ mTranslator->loadCommon();
// Construct the settings utility.
mSettingsUtility = new SettingsUtility();
@@ -121,7 +114,6 @@
}
// Remove the translator
- HbApplication::instance()->removeTranslator(mTranslator);
if (mTranslator) {
delete mTranslator;
mTranslator = 0;
@@ -130,9 +122,6 @@
delete mSettingsUtility;
}
- if (!mTimezoneClient->isNull()) {
- mTimezoneClient->deleteInstance();
- }
if(mSettingsModel){
delete mSettingsModel;
}
@@ -296,7 +285,7 @@
// Create the custom prototype.
QList <HbAbstractViewItem*> prototypes = mSettingsForm->itemPrototypes();
- SettingsCustomItem *customPrototype = new SettingsCustomItem();
+ SettingsCustomItem *customPrototype = new SettingsCustomItem(mSettingsForm);
prototypes.append(customPrototype);
mSettingsForm->setItemPrototypes(prototypes);
@@ -399,8 +388,28 @@
static_cast<HbDataFormModelItem::DataItemType>
(HbDataFormModelItem::CustomItemBase + RegionalSettingsItem);
mSettingsModel->appendDataFormItem(regionalSettingsItem);
-
- // Add the alarm snooze time item.
+
+ // Add the clock type item.
+ HbDataFormModelItem::DataItemType clockTypeSettingsItem =
+ static_cast<HbDataFormModelItem::DataItemType>
+ (HbDataFormModelItem::ToggleValueItem);
+ mClockTypeItem = mSettingsModel->appendDataFormItem(
+ clockTypeSettingsItem,hbTrId("txt_clock_setlabel_clock_type"));
+ QStringList clockTypeList;
+ int clockType = mSettingsUtility->clockType(clockTypeList);
+ int zeroIndex(0);
+ if( zeroIndex == clockType ){
+ mClockTypeItem->setContentWidgetData("text", clockTypeList[0]);
+ mClockTypeItem->setContentWidgetData("additionalText", clockTypeList[1]);
+ } else {
+ mClockTypeItem->setContentWidgetData("text", clockTypeList[1]);
+ mClockTypeItem->setContentWidgetData("additionalText", clockTypeList[0]);
+ }
+ mSettingsForm->addConnection(
+ mClockTypeItem, SIGNAL(clicked()),
+ this, SLOT(handleClockTypeChanged()));
+
+ // Add the alarm snooze time item.
mAlarmSnoozeItem = mSettingsModel->appendDataFormItem(
HbDataFormModelItem::ComboBoxItem,
hbTrId("txt_clock_setlabel_alarm_snooze_time"));
@@ -490,6 +499,15 @@
}
/*!
+ Slot which handles the clock type change..
+ */
+void ClockSettingsView::handleClockTypeChanged()
+{
+ mSettingsUtility->setClockType(
+ mClockTypeItem->contentWidgetData("text").toString());
+}
+
+/*!
Slot which is called when the value changes in cenrep.
\param key The key which got changed in cenrep.
--- a/clock/clockui/clocksettingsview/src/settingscustomitem.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clocksettingsview/src/settingscustomitem.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -63,9 +63,7 @@
*/
SettingsCustomItem::~SettingsCustomItem()
{
- if (!mTimezoneClient->isNull()) {
- mTimezoneClient->deleteInstance();
- }
+ // Nothing yet.
}
/*!
--- a/clock/clockui/clockviews/data/style/clockalarmlistitemprototype.css Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clockviews/data/style/clockalarmlistitemprototype.css Tue Jul 06 14:14:56 2010 +0300
@@ -13,53 +13,36 @@
top: -var(hb-param-margin-gene-top);
right: var(hb-param-margin-gene-right);
text-height: var(hb-param-text-height-secondary);
+ font-variant: secondary;
fixed-width: 8.2un;
text-align: right;
text-line-count-min: 2;
text-line-count-max: 2;
}
-ClockAlarmListItemPrototype::text-2:portrait{
+ClockAlarmListItemPrototype::text-2{
top: -var(hb-param-margin-gene-top);
right: var(hb-param-margin-gene-right);
text-height: var(hb-param-text-height-tiny);
+ font-variant: secondary;
fixed-width: 28.7un;
text-align: left;
}
-ClockAlarmListItemPrototype::text-3:portrait{
+ClockAlarmListItemPrototype::text-3{
text-height: var(hb-param-text-height-primary);
+ font-variant: primary;
top: -var(hb-param-margin-gene-middle-vertical);
right: var(hb-param-margin-gene-right);
fixed-width: 28.7un;
text-align: left;
}
-ClockAlarmListItemPrototype::text-4:portrait{
- text-height: var(hb-param-text-height-primary-small);
+ClockAlarmListItemPrototype::text-4{
+ text-height: var(hb-param-text-height-tiny);
+ font-variant: secondary;
top: -var(hb-param-margin-gene-middle-vertical);
bottom: var(hb-param-margin-gene-bottom);
fixed-width: 28.7un;
text-align: left;
}
-ClockAlarmListItemPrototype::text-2:landscape{
- top: -var(hb-param-margin-gene-top);
- right: var(hb-param-margin-gene-right);
- text-height: var(hb-param-text-height-tiny);
- fixed-width: 21un;
- text-align: left;
-}
-ClockAlarmListItemPrototype::text-3:landscape{
- text-height: var(hb-param-text-height-primary);
- top: -var(hb-param-margin-gene-middle-vertical);
- right: var(hb-param-margin-gene-right);
- fixed-width: 21un;
- text-align: left;
-}
-ClockAlarmListItemPrototype::text-4:landscape{
- text-height: var(hb-param-text-height-primary-small);
- top: -var(hb-param-margin-gene-middle-vertical);
- bottom: var(hb-param-margin-gene-bottom);
- fixed-width: 21un;
- text-align: left;
-}
ClockAlarmListItemPrototype::alarmIconItem{
top: -var(hb-param-margin-gene-top);
right: var(hb-param-margin-gene-right);
--- a/clock/clockui/clockviews/data/style/clockalarmlistitemprototype_color.css Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clockviews/data/style/clockalarmlistitemprototype_color.css Tue Jul 06 14:14:56 2010 +0300
@@ -8,4 +8,40 @@
ClockAlarmListItemPrototype::text-4[state="disabled"]{
color: var(qtc_list_item_disabled);
+}
+
+ClockAlarmListItemPrototype::alarmIconItem{
+ color: var(qtc_list_item_content_normal);
+}
+
+ClockAlarmListItemPrototype::alarmIconItem[state="pressed"]{
+ color: var(qtc_list_item_pressed);
+}
+
+ClockAlarmListItemPrototype::alarmIconItem[state="disabled"]{
+ color: var(qtc_list_item_disabled);
+}
+
+ClockAlarmListItemPrototype::text-3{
+ color: var(qtc_list_item_title_normal);
+}
+
+ClockAlarmListItemPrototype::text-3[state="pressed"]{
+ color: var(qtc_list_item_pressed);
+}
+
+ClockAlarmListItemPrototype::text-3[state="disabled"]{
+ color: var(qtc_list_item_disabled);
+}
+
+ClockAlarmListItemPrototype::text-1{
+ color: var(qtc_list_item_content_normal);
+}
+
+ClockAlarmListItemPrototype::text-1[state="pressed"]{
+ color: var(qtc_list_item_pressed);
+}
+
+ClockAlarmListItemPrototype::text-1[state="disabled"]{
+ color: var(qtc_list_item_disabled);
}
\ No newline at end of file
--- a/clock/clockui/clockviews/data/style/clockhomecityitem.css Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clockviews/data/style/clockhomecityitem.css Tue Jul 06 14:14:56 2010 +0300
@@ -18,6 +18,7 @@
top: -var(hb-param-margin-gene-top);
right: var(hb-param-margin-gene-middle-horizontal);
text-height: var(hb-param-text-height-tiny);
+ font-variant: secondary;
text-align: left;
}
@@ -25,6 +26,7 @@
top: -var(hb-param-margin-gene-middle-vertical);
right: var(hb-param-margin-gene-middle-horizontal);
text-height: var(hb-param-text-height-primary);
+ font-variant: primary;
text-align: left;
}
@@ -39,6 +41,7 @@
ClockHomeCityItem::timeText{
right: var(hb-param-margin-gene-right);
text-height: var(hb-param-text-height-tiny);
+ font-variant: secondary;
text-align: right;
fixed-width: 16un;
}
--- a/clock/clockui/clockviews/data/style/clockhomecityitem_color.css Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clockviews/data/style/clockhomecityitem_color.css Tue Jul 06 14:14:56 2010 +0300
@@ -1,5 +1,5 @@
ClockHomeCityItem::dateText{
- color: var(qtc_list_item_title_normal);
+ color: var(qtc_list_item_content_normal);
}
ClockHomeCityItem::dateText[state="pressed"]{
@@ -11,7 +11,7 @@
}
ClockHomeCityItem::cityText{
- color: var(qtc_list_item_content_normal);
+ color: var(qtc_list_item_title_normal);
}
ClockHomeCityItem::cityText[state="pressed"]{
--- a/clock/clockui/clockviews/data/style/hblistviewitem.css Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clockviews/data/style/hblistviewitem.css Tue Jul 06 14:14:56 2010 +0300
@@ -7,7 +7,7 @@
layout: citylist-landscape;
}
-HbListViewItem::icon-1{
+HbListViewItem[layoutName="citylist-portrait"]::icon-1{
top: -var(hb-param-margin-gene-top);
left: -var(hb-param-margin-gene-left);
right: var(hb-param-margin-gene-middle-horizontal);
@@ -17,38 +17,42 @@
fixed-width: var(hb-param-graphic-size-primary-large);
}
-HbListViewItem::text-1{
+HbListViewItem[layoutName="citylist-portrait"]::text-1{
top: -var(hb-param-margin-gene-top);
right: var(hb-param-margin-gene-middle-horizontal);
text-height: var(hb-param-text-height-tiny);
+ font-variant: secondary;
text-align: left;
}
-HbListViewItem::text-2{
+HbListViewItem[layoutName="citylist-portrait"]::text-2{
top: -var(hb-param-margin-gene-middle-vertical);
right: var(hb-param-margin-gene-middle-horizontal);
text-height: var(hb-param-text-height-primary);
+ font-variant: primary;
text-align: left;
}
-HbListViewItem::text-3:portrait{
+HbListViewItem[layoutName="citylist-portrait"]::text-3{
top: -var(hb-param-margin-gene-middle-vertical);
right: var(hb-param-margin-gene-right);
bottom: var(hb-param-margin-gene-bottom);
text-height: var(hb-param-text-height-tiny);
+ font-variant: secondary;
text-align: left;
}
-HbListViewItem::text-3:landscape{
+HbListViewItem[layoutName="citylist-landscape"]::text-3{
right: var(hb-param-margin-gene-right);
text-height: var(hb-param-text-height-tiny);
+ font-variant: secondary;
text-align: right;
fixed-width: 24un;
}
-HbListViewItem::icon-2{
+HbListViewItem[layoutName="citylist-portrait"]::icon-2{
top: -var(hb-param-margin-gene-top);
right: var(hb-param-margin-gene-right);
@@ -56,9 +60,10 @@
fixed-width: var(hb-param-graphic-size-secondary);
}
-HbListViewItem::text-4{
+HbListViewItem[layoutName="citylist-portrait"]::text-4{
right: var(hb-param-margin-gene-right);
text-height: var(hb-param-text-height-tiny);
+ font-variant: secondary;
text-align: right;
fixed-width: 16un;
}
--- a/clock/clockui/clockviews/data/style/hblistviewitem_color.css Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clockviews/data/style/hblistviewitem_color.css Tue Jul 06 14:14:56 2010 +0300
@@ -1,11 +1,35 @@
-HbListViewItem::text-4{
+HbListViewItem[layoutName="citylist-portrait"]::text-4{
color: var(qtc_list_item_content_normal);
}
-HbListViewItem::text-4[state="pressed"]{
+HbListViewItem[layoutName="citylist-portrait"]::text-4[state="pressed"]{
+ color: var(qtc_list_item_pressed);
+}
+
+HbListViewItem[layoutName="citylist-portrait"]::text-4[state="disabled"]{
+ color: var(qtc_list_item_disabled);
+}
+
+HbListViewItem[layoutName="citylist-portrait"]::text-2{
+ color: var(qtc_list_item_title_normal);
+}
+
+HbListViewItem[layoutName="citylist-portrait"]::text-2[state="pressed"]{
color: var(qtc_list_item_pressed);
}
-HbListViewItem::text-4[state="disabled"]{
+HbListViewItem[layoutName="citylist-portrait"]::text-2[state="disabled"]{
+ color: var(qtc_list_item_disabled);
+}
+
+HbListViewItem[layoutName="citylist-portrait"]::text-1{
+ color: var(qtc_list_item_content_normal);
+}
+
+HbListViewItem[layoutName="citylist-portrait"]::text-1[state="pressed"]{
+ color: var(qtc_list_item_pressed);
+}
+
+HbListViewItem[layoutName="citylist-portrait"]::text-1[state="disabled"]{
color: var(qtc_list_item_disabled);
}
\ No newline at end of file
--- a/clock/clockui/clockviews/data/xml/clockmainview.docml Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clockviews/data/xml/clockmainview.docml Tue Jul 06 14:14:56 2010 +0300
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="0.9">
+<hbdocument version="1.1">
<object name="alarmsAction" type="HbAction">
<icon iconName="qtg_mono_alarm" name="icon"/>
</object>
@@ -15,133 +15,173 @@
<widget name="clockMainView" type="HbView">
<widget name="clockMainViewWidget" role="HbView:widget" type="HbWidget">
<widget name="clockWidget" plugin="clockwidgetplugin" type="ClockWidget">
- <real name="z" value="8"/>
- </widget>
- <widget name="dateLabel" type="HbLabel">
- <real name="z" value="9"/>
- <sizehint height="var(hb-param-text-height-tiny)" type="PREFERRED"/>
- <string name="plainText" value="Mon 18.05.2009"/>
- </widget>
- <widget name="placeLabel" type="HbLabel">
<real name="z" value="10"/>
- <sizehint height="var(hb-param-text-height-primary)" type="PREFERRED"/>
- <string name="plainText" value="Helsinki, Finland +2 GMT"/>
- </widget>
- <widget name="alarmListView" type="HbListView">
- <widget name="prototype" role="HbListView:prototype" type="HbListViewItem">
- <string name="state" value="normal"/>
- </widget>
- <real name="z" value="11"/>
- <sizehint height="47.7612un" type="PREFERRED" width="35.8209un"/>
+ <sizehint height="22.55un" type="PREFERRED" width="22.55un"/>
</widget>
<widget name="noAlarmLabel" type="HbLabel">
- <real name="z" value="12"/>
- <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
- <sizehint height="3.9un" type="FIXED"/>
+ <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+ <real name="z" value="16"/>
+ <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+ <sizehint height="var(hb-param-text-height-primary)" type="PREFERRED" width="49.7un"/>
+ <sizehint height="var(hb-param-text-height-primary)" type="MINIMUM" width="37.7un"/>
+ <sizehint height="var(hb-param-text-height-primary)" type="MAXIMUM" width="49.7un"/>
<string locid="txt_clk_main_view_list_no_alarms_set" name="plainText" value="No alarm set"/>
</widget>
+ <widget name="dateLabel" type="HbLabel">
+ <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+ <real name="z" value="19"/>
+ <sizehint height="var(hb-param-text-height-tiny)" type="PREFERRED" width="expr(var(hb-param-screen-width)-53.73un-4un)"/>
+ <string name="plainText" value="Mon 18.05.2009"/>
+ </widget>
+ <widget name="alarmListView" type="HbListView">
+ <widget name="prototype" role="HbAbstractView:prototype" type="HbListViewItem">
+ <string name="state" value="normal"/>
+ </widget>
+ <real name="z" value="21"/>
+ <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Expanding" verticalStretch="0"/>
+ <sizehint height="47.7612un" type="PREFERRED" width="expr(var(hb-param-screen-short-edge) )"/>
+ </widget>
+ <widget name="horizontalDivider" type="HbLabel">
+ <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+ <icon iconName="qtg_graf_input_v_swipe" name="icon"/>
+ <real name="z" value="1"/>
+ <sizehint height="3.58209un" type="PREFERRED" width="21.49254un"/>
+ </widget>
+ <widget name="verticalDivider" type="HbLabel">
+ <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+ <icon iconName="qtg_graf_input_h_swipe" name="icon"/>
+ <real name="z" value="2"/>
+ </widget>
+ <widget name="placeLabel" type="HbLabel">
+ <enums name="alignment" value="AlignAbsolute|AlignRight|AlignTrailing"/>
+ <enums name="layoutDirection" value="LeftToRight"/>
+ <real name="z" value="2"/>
+ <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+ <sizehint height="expr(var(hb-param-text-height-tiny) )" type="PREFERRED" width="18.58295un"/>
+ <string name="plainText" value="united kingdom 0:00 GMT"/>
+ </widget>
<layout type="anchor">
- <anchoritem dst="clockWidget" dstEdge="CENTERH" spacing="0un" src="" srcEdge="CENTERH"/>
- <anchoritem dst="dateLabel" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
- <anchoritem dst="dateLabel" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
- <anchoritem dst="dateLabel" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="clockWidget" srcEdge="BOTTOM"/>
- <anchoritem dst="placeLabel" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
- <anchoritem dst="placeLabel" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
- <anchoritem dst="placeLabel" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" src="dateLabel" srcEdge="BOTTOM"/>
+ <anchoritem dst="clockWidget" dstEdge="TOP" spacing="2un" src="" srcEdge="TOP"/>
+ <anchoritem dst="clockWidget" dstEdge="RIGHT" spacing="-10.91567un" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="noAlarmLabel" dstEdge="LEFT" spacing="2un" src="" srcEdge="LEFT"/>
+ <anchoritem dst="noAlarmLabel" dstEdge="BOTTOM" spacing="-35.26739un" src="" srcEdge="BOTTOM"/>
+ <anchoritem dst="dateLabel" dstEdge="LEFT" spacing="2un" src="" srcEdge="LEFT"/>
+ <anchoritem dst="dateLabel" dstEdge="TOP" spacing="29.73761un" src="" srcEdge="TOP"/>
<anchoritem dst="alarmListView" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
- <anchoritem dst="alarmListView" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
- <anchoritem dst="alarmListView" dstEdge="TOP" spacing="var(hb-param-margin-gene-bottom)" src="placeLabel" srcEdge="BOTTOM"/>
- <anchoritem dst="alarmListView" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
- <anchoritem dst="clockWidget" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="" srcEdge="TOP"/>
- <anchoritem dst="noAlarmLabel" dstEdge="LEFT" spacing="3.58209un" src="" srcEdge="LEFT"/>
- <anchoritem dst="noAlarmLabel" dstEdge="TOP" spacing="23.43284un" src="" srcEdge="TOP"/>
+ <anchoritem dst="alarmListView" dstEdge="BOTTOM" spacing="-18un" src="" srcEdge="BOTTOM"/>
+ <anchoritem dst="horizontalDivider" dstEdge="LEFT" spacing="6.1194un" src="" srcEdge="LEFT"/>
+ <anchoritem dst="horizontalDivider" dstEdge="BOTTOM" spacing="-9.70896un" src="" srcEdge="BOTTOM"/>
+ <anchoritem dst="verticalDivider" dstEdge="RIGHT" spacing="-8.80597un" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="verticalDivider" dstEdge="BOTTOM" spacing="-2.84328un" src="" srcEdge="BOTTOM"/>
+ <anchoritem dst="placeLabel" dstEdge="TOP" spacing="35.07463un" src="" srcEdge="TOP"/>
+ <anchoritem dst="placeLabel" dstEdge="RIGHT" spacing="-16.04392un" src="" srcEdge="RIGHT"/>
</layout>
</widget>
<widget name="viewToolbar" role="HbView:toolBar" type="HbToolBar">
- <enums name="orientation" value="Horizontal"/>
- <ref object="alarmsAction" role="HbToolBar:addAction"/>
- <ref object="worldClockAction" role="HbToolBar:addAction"/>
- <ref object="newAlarmAction" role="HbToolBar:addAction"/>
+ <ref object="alarmsAction" role="HbWidget:addAction"/>
+ <ref object="worldClockAction" role="HbWidget:addAction"/>
+ <ref object="newAlarmAction" role="HbWidget:addAction"/>
</widget>
<widget name="viewMenu" role="HbView:menu" type="HbMenu">
- <ref object="settingsAction" role="HbMenu:addAction"/>
+ <ref object="settingsAction" role="HbWidget:addAction"/>
</widget>
<string locid="txt_common_common_clock" name="title" value="Clock"/>
</widget>
- <section name="landscape">
- <widget name="noAlarmLabel" type="HbLabel">
- <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
- <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
- <sizehint height="var(hb-param-text-height-primary)" type="PREFERRED" width="37.7un"/>
- <sizehint height="var(hb-param-text-height-primary)" type="MINIMUM" width="37.7un"/>
- <sizehint height="var(hb-param-text-height-primary)" type="MAXIMUM" width="37.7un"/>
+ <section name="portrait">
+ <widget name="alarmListView" type="HbListView">
+ <sizehint height="27.61194un" type="PREFERRED" width="expr(var(hb-param-screen-short-edge) )"/>
+ </widget>
+ <widget name="dateLabel" type="HbLabel">
+ <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
</widget>
<widget name="clockMainViewWidget" role="HbView:widget" type="HbWidget">
<layout type="anchor">
- <anchoritem dst="dateLabel" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="clockWidget" srcEdge="BOTTOM"/>
- <anchoritem dst="placeLabel" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
- <anchoritem dst="placeLabel" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" src="dateLabel" srcEdge="BOTTOM"/>
- <anchoritem dst="alarmListView" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
- <anchoritem dst="clockWidget" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="" srcEdge="TOP"/>
- <anchoritem dst="clockWidget" dstEdge="LEFT" spacing="9.5un" src="" srcEdge="LEFT"/>
- <anchoritem dst="alarmListView" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+ <anchoritem dst="clockWidget" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-top) )" src="" srcEdge="TOP"/>
+ <anchoritem dst="clockWidget" dstEdge="CENTERH" spacing="0un" src="" srcEdge="CENTERH"/>
+ <anchoritem dst="dateLabel" dstEdge="LEFT" spacing="expr(var(hb-param-margin-gene-left) )" src="" srcEdge="LEFT"/>
+ <anchoritem dst="dateLabel" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-top) )" src="clockWidget" srcEdge="BOTTOM"/>
+ <anchoritem dst="dateLabel" dstEdge="RIGHT" spacing="expr(-var(hb-param-margin-gene-right) )" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="noAlarmLabel" dstEdge="LEFT" spacing="expr(var(hb-param-margin-gene-left) )" src="" srcEdge="LEFT"/>
+ <anchoritem dst="noAlarmLabel" dstEdge="CENTERV" spacing="0un" src="alarmListView" srcEdge="CENTERV"/>
+ <anchoritem dst="alarmListView" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+ <anchoritem dst="alarmListView" dstEdge="TOP" spacing="0un" src="horizontalDivider" srcEdge="BOTTOM"/>
<anchoritem dst="alarmListView" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
- <anchoritem dst="alarmListView" dstEdge="LEFT" spacing="9.5un" src="clockWidget" srcEdge="RIGHT"/>
- <anchoritem dst="dateLabel" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
- <anchoritem dst="dateLabel" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="alarmListView" srcEdge="LEFT"/>
- <anchoritem dst="placeLabel" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="alarmListView" srcEdge="LEFT"/>
- <anchoritem dst="noAlarmLabel" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
- <anchoritem dst="noAlarmLabel" dstEdge="TOP" spacing="15.8un" src="" srcEdge="TOP"/>
- <anchoritem dst="noAlarmLabel" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="alarmListView" srcEdge="LEFT"/>
+ <anchoritem dst="alarmListView" dstEdge="BOTTOM" spacing="-0un" src="" srcEdge="BOTTOM"/>
+ <anchoritem dst="verticalDivider" dstEdge="RIGHT" spacing="-8.80597un" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="verticalDivider" dstEdge="BOTTOM" spacing="-2.84328un" src="" srcEdge="BOTTOM"/>
+ <anchoritem dst="horizontalDivider" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+ <anchoritem dst="horizontalDivider" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-bottom) )" src="placeLabel" srcEdge="BOTTOM"/>
+ <anchoritem dst="horizontalDivider" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="placeLabel" dstEdge="LEFT" spacing="expr(var(hb-param-margin-gene-left) )" src="" srcEdge="LEFT"/>
+ <anchoritem dst="placeLabel" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-middle-vertical) )" src="dateLabel" srcEdge="BOTTOM"/>
+ <anchoritem dst="placeLabel" dstEdge="RIGHT" spacing="expr(-var(hb-param-margin-gene-right) )" src="" srcEdge="RIGHT"/>
</layout>
</widget>
- <widget name="dateLabel" type="HbLabel">
- <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
- </widget>
<widget name="placeLabel" type="HbLabel">
- <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+ <sizehint height="expr(var(hb-param-text-height-tiny) )" type="PREFERRED" width="expr(var(hb-param-screen-short-edge) - 4un )"/>
+ <enums name="alignment" value="AlignAbsolute|AlignVCenter|AlignHCenter"/>
</widget>
<widget name="clockWidget" plugin="clockwidgetplugin" type="ClockWidget">
- <sizehint height="22.3un" type="PREFERRED" width="22.3un"/>
+ <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+ <sizehint height="31.9un" type="FIXED" width="31.9un"/>
+ </widget>
+ <widget name="horizontalDivider" type="HbLabel">
+ <icon iconName="qtg_graf_divider_h_thin" name="icon"/>
+ <enums name="aspectRatioMode" value="IgnoreAspectRatio"/>
+ <sizepolicy horizontalPolicy="Minimum" horizontalStretch="1" verticalPolicy="Fixed" verticalStretch="0"/>
+ <sizehint height="0.5un" type="PREFERRED" width="21.49254un"/>
+ </widget>
+ <widget name="verticalDivider" type="HbLabel">
+ <bool name="visible" value="TRUE"/>
</widget>
</section>
- <section name="portrait">
- <widget name="noAlarmLabel" type="HbLabel">
- <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
- <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
- <sizehint height="var(hb-param-text-height-primary)" type="PREFERRED" width="49.7un"/>
- <sizehint height="var(hb-param-text-height-primary)" type="MINIMUM" width="37.7un"/>
- <sizehint height="var(hb-param-text-height-primary)" type="MAXIMUM" width="49.7un"/>
+ <section name="landscape">
+ <widget name="alarmListView" type="HbListView">
+ <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Expanding" verticalStretch="0"/>
+ <sizehint type="MAXIMUM" width="53.73un"/>
</widget>
<widget name="clockMainViewWidget" role="HbView:widget" type="HbWidget">
<layout type="anchor">
- <anchoritem dst="clockWidget" dstEdge="CENTERH" spacing="0un" src="" srcEdge="CENTERH"/>
- <anchoritem dst="dateLabel" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
- <anchoritem dst="dateLabel" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
- <anchoritem dst="dateLabel" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="clockWidget" srcEdge="BOTTOM"/>
- <anchoritem dst="placeLabel" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
- <anchoritem dst="placeLabel" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
- <anchoritem dst="placeLabel" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" src="dateLabel" srcEdge="BOTTOM"/>
- <anchoritem dst="alarmListView" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+ <anchoritem dst="alarmListView" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
<anchoritem dst="alarmListView" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
- <anchoritem dst="alarmListView" dstEdge="TOP" spacing="var(hb-param-margin-gene-bottom)" src="placeLabel" srcEdge="BOTTOM"/>
<anchoritem dst="alarmListView" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
- <anchoritem dst="clockWidget" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="" srcEdge="TOP"/>
- <anchoritem dst="noAlarmLabel" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
- <anchoritem dst="noAlarmLabel" dstEdge="TOP" spacing="17.8un" src="placeLabel" srcEdge="BOTTOM"/>
+ <anchoritem dst="noAlarmLabel" dstEdge="LEFT" spacing="expr(var(hb-param-margin-gene-left) )" src="alarmListView" srcEdge="LEFT"/>
+ <anchoritem dst="noAlarmLabel" dstEdge="CENTERV" spacing="0un" src="alarmListView" srcEdge="CENTERV"/>
+ <anchoritem dst="clockWidget" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-top) )" src="" srcEdge="TOP"/>
+ <anchoritem dst="clockWidget" dstEdge="CENTERH" spacing="0un" src="dateLabel" srcEdge="CENTERH"/>
+ <anchoritem dst="dateLabel" dstEdge="LEFT" spacing="expr(var(hb-param-margin-gene-left) )" src="" srcEdge="LEFT"/>
+ <anchoritem dst="dateLabel" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-bottom) )" src="clockWidget" srcEdge="BOTTOM"/>
+ <anchoritem dst="dateLabel" dstEdge="RIGHT" spacing="expr(-var(hb-param-margin-gene-right) )" src="verticalDivider" srcEdge="LEFT"/>
+ <anchoritem dst="verticalDivider" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+ <anchoritem dst="verticalDivider" dstEdge="RIGHT" spacing="0un" src="alarmListView" srcEdge="LEFT"/>
+ <anchoritem dst="verticalDivider" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+ <anchoritem dst="horizontalDivider" dstEdge="RIGHT" spacing="-17.16418un" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="horizontalDivider" dstEdge="BOTTOM" spacing="-7.17164un" src="" srcEdge="BOTTOM"/>
+ <anchoritem dst="placeLabel" dstEdge="LEFT" spacing="expr(var(hb-param-margin-gene-left) )" src="" srcEdge="LEFT"/>
+ <anchoritem dst="placeLabel" dstEdge="TOP" spacing="expr(var(hb-param-margin-gene-middle-vertical) )" src="dateLabel" srcEdge="BOTTOM"/>
+ <anchoritem dst="placeLabel" dstEdge="RIGHT" spacing="expr(-var(hb-param-margin-gene-right) )" src="alarmListView" srcEdge="LEFT"/>
+ <anchoritem dst="placeLabel" dstEdge="BOTTOM" spacing="expr(-var(hb-param-margin-gene-bottom) )" src="" srcEdge="BOTTOM"/>
</layout>
</widget>
- <widget name="dateLabel" type="HbLabel">
- <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
- </widget>
<widget name="placeLabel" type="HbLabel">
- <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+ <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+ <enums name="alignment" value="AlignAbsolute|AlignVCenter|AlignHCenter"/>
</widget>
<widget name="clockWidget" plugin="clockwidgetplugin" type="ClockWidget">
- <sizehint height="31.9un" type="PREFERRED" width="31.9un"/>
+ <sizehint height="expr(var(hb-param-screen-short-edge) - var(hb-param-widget-chrome-height) - var(hb-param-widget-toolbar-height) - 12.75un )" type="PREFERRED" width="expr(var(hb-param-screen-short-edge) - var(hb-param-widget-chrome-height) - var(hb-param-widget-toolbar-height) - 12.75un )"/>
+ </widget>
+ <widget name="horizontalDivider" type="HbLabel">
+ <sizehint height="0.5un" type="PREFERRED" width="21.49254un"/>
+ <bool name="visible" value="TRUE"/>
+ </widget>
+ <widget name="verticalDivider" type="HbLabel">
+ <icon iconName="qtg_graf_divider_v_thin" name="icon"/>
+ <enums name="aspectRatioMode" value="IgnoreAspectRatio"/>
+ <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+ <sizehint type="PREFERRED" width="0.1un"/>
</widget>
</section>
- <metadata activeUIState="landscape" display="NHD landscape" unit="un">
+ <metadata activeUIState="portrait" display="NHD-3.2-inch_portrait" unit="un">
<uistate name="Common ui state" sections="#common"/>
<uistate name="portrait" sections="#common portrait"/>
<uistate name="landscape" sections="#common landscape"/>
--- a/clock/clockui/clockviews/inc/clockmainview.h Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clockviews/inc/clockmainview.h Tue Jul 06 14:14:56 2010 +0300
@@ -90,6 +90,8 @@
HbLabel *mDayLabel;
HbLabel *mPlaceLabel;
+ HbLabel *mHorizontalDivider;
+ HbLabel *mVerticalDivider;
ClockWidget *mClockWidget;
HbLabel *mNoAlarmLabel;
HbListView *mAlarmList;
--- a/clock/clockui/clockviews/src/clockmainview.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clockviews/src/clockmainview.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -127,6 +127,12 @@
bool loadSuccess = false;
Qt::Orientation currentOrienation = window->orientation();
+
+ // Get the dividers.
+ mHorizontalDivider = static_cast<HbLabel *> (
+ mDocLoader->findObject("horizontalDivider"));
+ mVerticalDivider = static_cast<HbLabel *> (
+ mDocLoader->findObject("verticalDivider"));
// Get the "No alarm set" label.
mNoAlarmLabel = qobject_cast<HbLabel *> (
@@ -159,11 +165,15 @@
CLOCK_MAIN_VIEW_DOCML,
CLOCK_MAIN_VIEW_PORTRAIT_SECTION,
&loadSuccess);
+ mHorizontalDivider->setVisible(true);
+ mVerticalDivider->setVisible(false);
} else {
mDocLoader->load(
CLOCK_MAIN_VIEW_DOCML,
CLOCK_MAIN_VIEW_LANDSCAPE_SECTION,
&loadSuccess);
+ mHorizontalDivider->setVisible(false);
+ mVerticalDivider->setVisible(true);
}
if (loadSuccess) {
if (0 == alarmCount) {
@@ -174,14 +184,8 @@
}
}
- mDayLabel = static_cast<HbLabel *> (
- mDocLoader->findObject("dateLabel"));
-
- mPlaceLabel = static_cast<HbLabel *> (
- mDocLoader->findObject("placeLabel"));
-
-
-
+ mDayLabel = static_cast<HbLabel *> (mDocLoader->findObject("dateLabel"));
+ mPlaceLabel = static_cast<HbLabel *> (mDocLoader->findObject("placeLabel"));
mClockWidget = static_cast<ClockWidget*> (
mDocLoader->findObject(CLOCK_WIDGET));
@@ -582,10 +586,14 @@
mDocLoader->load(
CLOCK_MAIN_VIEW_DOCML, CLOCK_MAIN_VIEW_LANDSCAPE_SECTION,
&success);
+ mHorizontalDivider->setVisible(false);
+ mVerticalDivider->setVisible(true);
} else {
mDocLoader->load(
CLOCK_MAIN_VIEW_DOCML, CLOCK_MAIN_VIEW_PORTRAIT_SECTION,
&success);
+ mHorizontalDivider->setVisible(true);
+ mVerticalDivider->setVisible(false);
}
if(success) {
@@ -687,6 +695,23 @@
*/
void ClockMainView::updateClockWidget()
{
+ QStringList clockType;
+ int index = mSettingsUtility->clockType(clockType);
+ int zeroIndex(0);
+ if(zeroIndex == index){
+ mClockWidget->setClockType(ClockWidget::ClockTypeDigital);
+ } else {
+ mClockWidget->setClockType(ClockWidget::ClockTypeAnalog);
+ }
+
+ QStringList timeFormat;
+
+ if (zeroIndex == mSettingsUtility->timeFormat(timeFormat)) {
+ mClockWidget->setTimeFormat(ClockWidget::TimeFormat24Hrs);
+ } else {
+ mClockWidget->setTimeFormat(ClockWidget::TimeFormat12Hrs);
+ }
+
mClockWidget->updateTime();
}
--- a/clock/clockui/clockwidget/clockwidgetimpl/bwins/clockwidgetu.def Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clockwidget/clockwidgetimpl/bwins/clockwidgetu.def Tue Jul 06 14:14:56 2010 +0300
@@ -15,4 +15,7 @@
?getStaticMetaObject@ClockWidget@@SAABUQMetaObject@@XZ @ 14 NONAME ; struct QMetaObject const & ClockWidget::getStaticMetaObject(void)
?qt_metacall@ClockWidget@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 15 NONAME ; int ClockWidget::qt_metacall(enum QMetaObject::Call, int, void * *)
?clockType@ClockWidget@@QBE?AW4ClockType@1@XZ @ 16 NONAME ; enum ClockWidget::ClockType ClockWidget::clockType(void) const
+ ?updateClockWidget@ClockWidget@@AAEXXZ @ 17 NONAME ; void ClockWidget::updateClockWidget(void)
+ ?timeFormat@ClockWidget@@QBE?AW4TimeFormat@1@XZ @ 18 NONAME ; enum ClockWidget::TimeFormat ClockWidget::timeFormat(void) const
+ ?setTimeFormat@ClockWidget@@QAEXABW4TimeFormat@1@@Z @ 19 NONAME ; void ClockWidget::setTimeFormat(enum ClockWidget::TimeFormat const &)
--- a/clock/clockui/clockwidget/clockwidgetimpl/clockwidgetimpl.pro Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clockwidget/clockwidgetimpl/clockwidgetimpl.pro Tue Jul 06 14:14:56 2010 +0300
@@ -40,12 +40,14 @@
SOURCES += \
clockwidget.cpp \
- analogclockwidget.cpp
+ analogclockwidget.cpp \
+ digitalclockwidget.cpp
HEADERS += \
clockwidgetdefines.h \
clockwidget.h \
- analogclockwidget.h
+ analogclockwidget.h \
+ digitalclockwidget.h
symbian {
TARGET.UID3 = 0x2002E715
--- a/clock/clockui/clockwidget/clockwidgetimpl/clockwidgetimpl.qrc Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clockwidget/clockwidgetimpl/clockwidgetimpl.qrc Tue Jul 06 14:14:56 2010 +0300
@@ -2,5 +2,9 @@
<qresource prefix="/resource" >
<file alias="analogclockwidget.widgetml">resource/analogclockwidget.widgetml</file>
<file alias="analogclockwidget.css">resource/analogclockwidget.css</file>
+ <file alias="digitalclockwidget.widgetml">resource/digitalclockwidget.widgetml</file>
+ <file alias="digitalclockwidget.css">resource/digitalclockwidget.css</file>
+ <file alias="digitalclockwidget_color.css">resource/digitalclockwidget_color.css</file>
+
</qresource>
</RCC>
--- a/clock/clockui/clockwidget/clockwidgetimpl/eabi/clockwidgetu.def Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clockwidget/clockwidgetimpl/eabi/clockwidgetu.def Tue Jul 06 14:14:56 2010 +0300
@@ -19,4 +19,7 @@
_ZThn16_N11ClockWidgetD1Ev @ 18 NONAME
_ZThn8_N11ClockWidgetD0Ev @ 19 NONAME
_ZThn8_N11ClockWidgetD1Ev @ 20 NONAME
+ _ZN11ClockWidget13setTimeFormatERKNS_10TimeFormatE @ 21 NONAME
+ _ZN11ClockWidget17updateClockWidgetEv @ 22 NONAME
+ _ZNK11ClockWidget10timeFormatEv @ 23 NONAME
--- a/clock/clockui/clockwidget/clockwidgetimpl/inc/clockwidget.h Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clockwidget/clockwidgetimpl/inc/clockwidget.h Tue Jul 06 14:14:56 2010 +0300
@@ -20,7 +20,7 @@
// System includes
#include <hbwidget.h>
-
+#include <QPointer>
// User includes
#include "clockwidgetdefines.h"
@@ -28,11 +28,13 @@
class QGraphicsLinearLayout;
class AnalogClockWidget;
+class DigitalClockWidget;
class CLOCKWIDGET_EXPORT ClockWidget : public HbWidget
{
Q_OBJECT
Q_PROPERTY(ClockType clockType READ clockType WRITE setClockType)
+ Q_PROPERTY(TimeFormat timeFormat READ timeFormat WRITE setTimeFormat)
public:
enum ClockType
@@ -40,20 +42,31 @@
ClockTypeAnalog,
ClockTypeDigital
};
+ enum TimeFormat
+ {
+ TimeFormat12Hrs,
+ TimeFormat24Hrs
+ };
ClockWidget(QGraphicsItem *parent = 0, Qt::WindowFlags flags = 0);
~ClockWidget();
ClockType clockType() const;
void setClockType(const ClockType &type);
void loadClockWidget();
+ TimeFormat timeFormat() const;
+ void setTimeFormat(const TimeFormat &timeFormat);
public slots:
void updateTime();
private:
- ClockType mClockType;
- AnalogClockWidget *mAnalogClock;
- QGraphicsLinearLayout *mLayout;
+ void updateClockWidget();
+private:
+ ClockType mClockType;
+ TimeFormat mTimeFormat;
+ QPointer<AnalogClockWidget> mAnalogClock;
+ QPointer<DigitalClockWidget> mDigitalClock;
+ QGraphicsLinearLayout *mLayout;
};
#endif // CLOCKWIDGET_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/clock/clockui/clockwidget/clockwidgetimpl/inc/digitalclockwidget.h Tue Jul 06 14:14:56 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: DigitalClockWidget
+*
+*/
+
+#ifndef DIGITALCLOCKWIDGET_H
+#define DIGITALCLOCKWIDGET_H
+
+// System includes
+#include <HbWidget>
+#include <QPointer>
+
+// User includes
+#include "clockwidgetdefines.h"
+
+// Forward declarations
+class QTimer;
+class HbLabel;
+class HbTextItem;
+
+class DigitalClockWidget : public HbWidget
+{
+ Q_OBJECT
+
+public:
+ DigitalClockWidget(bool useAmPm = true, QGraphicsItem *parent = 0);
+ ~DigitalClockWidget();
+
+signals:
+ void clockTapped();
+
+public slots:
+ void tick();
+ void setAmPm(bool useAmPm);
+
+protected:
+ void resizeEvent(QGraphicsSceneResizeEvent *event);
+
+private:
+ void createPrimitives();
+
+public:
+ void updatePrimitives();
+
+private:
+ QPointer<QTimer> mTimer;
+ QPointer<HbTextItem> mClockLabel;
+ QPointer<HbTextItem> mAmPmLabel;
+ bool mUseAmPm;
+};
+
+#endif // DIGITALCLOCKWIDGET_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/clock/clockui/clockwidget/clockwidgetimpl/resource/digitalclockwidget.css Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,25 @@
+DigitalClockWidget {
+ layout: digital_clock_layout;
+}
+
+DigitalClockWidget::clockLabel {
+ size-policy: expanding expanding;
+ text-align: center center;
+ font-variant:primary;
+ text-height: 14.7un;
+}
+
+DigitalClockWidget::clockLabel:landscape {
+ text-height: 9.8un;
+}
+
+DigitalClockWidget::amPmLabel {
+ size-policy: expanding expanding;
+ text-align: left;
+ font-variant:primary;
+ bottom: -var(hb-param-margin-gene-middle-vertical);
+ text-height: var(hb-param-text-height-primary);
+}
+DigitalClockWidget::amPmLabel:landscape {
+ font-variant:secondary;
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/clock/clockui/clockwidget/clockwidgetimpl/resource/digitalclockwidget.widgetml Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,11 @@
+<hbwidget version="0.1" type="DigitalClockWidget">
+ <layout name="digital_clock_layout" type="mesh">
+
+ <meshitem src="clockLabel" srcEdge="CENTERV" dst="" dstEdge="CENTERV" />
+ <meshitem src="clockLabel" srcEdge="CENTERH" dst="" dstEdge="CENTERH" />
+
+ <meshitem src="amPmLabel" srcEdge="BOTTOM" dst="clockLabel" dstEdge="TOP" />
+ <meshitem src="amPmLabel" srcEdge="LEFT" dst="clockLabel" dstEdge="LEFT" />
+
+ </layout>
+</hbwidget>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/clock/clockui/clockwidget/clockwidgetimpl/resource/digitalclockwidget_color.css Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,9 @@
+
+
+DigitalClockWidget::clockLabel{
+ color: var(qtc_list_item_content_normal);
+}
+
+DigitalClockWidget::amPmLabel{
+ color: var(qtc_list_item_content_normal);
+}
\ No newline at end of file
--- a/clock/clockui/clockwidget/clockwidgetimpl/src/analogclockwidget.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clockwidget/clockwidgetimpl/src/analogclockwidget.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -41,7 +41,9 @@
AnalogClockWidget::AnalogClockWidget(QGraphicsItem *parent)
: HbWidget(parent)
{
- HbStyleLoader::registerFilePath(":/resource");
+ bool result = HbStyleLoader::registerFilePath(":/resource/analogclockwidget.widgetml");
+ result = HbStyleLoader::registerFilePath(":/resource/analogclockwidget.css");
+
updatePrimitives();
mTimer = new QTimer(this);
connect(mTimer, SIGNAL(timeout()), SLOT(tick()));
--- a/clock/clockui/clockwidget/clockwidgetimpl/src/clockwidget.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/clockui/clockwidget/clockwidgetimpl/src/clockwidget.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -21,6 +21,7 @@
// User includes
#include "clockwidget.h"
#include "analogclockwidget.h"
+#include "digitalclockwidget.h"
/*!
\class ClockWidget
@@ -33,7 +34,7 @@
*/
ClockWidget::ClockWidget(QGraphicsItem *parent, Qt::WindowFlags flags)
: HbWidget(parent, flags),
- mClockType(ClockTypeAnalog)
+ mClockType(ClockTypeDigital)
{
loadClockWidget();
}
@@ -59,10 +60,16 @@
*/
void ClockWidget::setClockType(const ClockType &type)
{
- if (type == ClockTypeDigital) {
- mClockType = ClockTypeDigital;
+ if (type == ClockTypeAnalog) {
+ if(type != mClockType){
+ mClockType = ClockTypeAnalog;
+ updateClockWidget();
+ }
} else {
- mClockType = ClockTypeAnalog;
+ if(type != mClockType){
+ mClockType = ClockTypeDigital;
+ updateClockWidget();
+ }
}
}
@@ -73,6 +80,8 @@
{
if (mClockType == ClockTypeAnalog) {
mAnalogClock->tick();
+ } else {
+ mDigitalClock->updatePrimitives();
}
}
@@ -81,13 +90,57 @@
*/
void ClockWidget::loadClockWidget()
{
+ mLayout = new QGraphicsLinearLayout(Qt::Vertical);
+ mLayout->setContentsMargins(0,0,0,0);
+
if (mClockType == ClockTypeAnalog) {
- mAnalogClock = new AnalogClockWidget(this);
- mLayout = new QGraphicsLinearLayout(Qt::Vertical);
- mLayout->setContentsMargins(0,0,0,0);
+ mAnalogClock = new AnalogClockWidget(this);
+ mLayout->addItem(mAnalogClock);
+ } else {
+ bool useAmPm = false;
+ mDigitalClock = new DigitalClockWidget(useAmPm, this);
+ mLayout->addItem(mDigitalClock);
+ }
+ setLayout(mLayout);
+}
+
+/*!
+ Constructs the clockwidget based upon its type.
+*/
+void ClockWidget::updateClockWidget()
+{
+ if (mClockType == ClockTypeAnalog) {
+ mLayout->removeItem(mDigitalClock);
+ delete mDigitalClock;
+ if (!mAnalogClock) {
+ mAnalogClock = new AnalogClockWidget(this);
+ }
mLayout->addItem(mAnalogClock);
- setLayout(mLayout);
+ } else {
+ mLayout->removeItem(mAnalogClock);
+ delete mAnalogClock;
+ if(!mDigitalClock){
+ bool useAmPm = false; // find out this fronm the settings utility
+ mDigitalClock = new DigitalClockWidget(useAmPm, this);
+ }
+ mLayout->addItem(mDigitalClock);
+ }
+}
+
+ClockWidget::TimeFormat ClockWidget::timeFormat() const
+{
+ return mTimeFormat;
+}
+
+void ClockWidget::setTimeFormat(const TimeFormat &timeFormat)
+{
+ if(mDigitalClock){
+ mTimeFormat = timeFormat;
+ if (timeFormat == ClockWidget::TimeFormat12Hrs) {
+ mDigitalClock->setAmPm(true);
+ } else {
+ mDigitalClock->setAmPm(false);
+ }
}
}
-
// End of file --Don't remove this.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/clock/clockui/clockwidget/clockwidgetimpl/src/digitalclockwidget.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,157 @@
+/*
+* 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: DigitalClockWidget
+*
+*/
+
+// System includes
+#include <HbStyleLoader>
+#include <HbLabel>
+#include <HbTextItem>
+#include <hbextendedlocale>
+#include <QGraphicsSceneMouseEvent>
+#include <QSizePolicy>
+#include <QTimer>
+#include <QTime>
+
+// User includes
+#include "digitalclockwidget.h"
+
+// Constants
+const int clockUpdateInterval (60000); // msec
+
+/*!
+ \class DigitalClockWidget
+
+ This class implements the digitalclock widget which gets displayed
+ in the clockmainview when the clocktype is set to digital type.
+*/
+
+/*!
+ Constructor.
+ \param useAmPm bool for setting 12 hour format
+ \param parent The parent of type QGraphicsItem.
+*/
+DigitalClockWidget::DigitalClockWidget(bool useAmPm, QGraphicsItem *parent)
+ : HbWidget(parent),
+ mUseAmPm(useAmPm)
+{
+ bool result = HbStyleLoader::registerFilePath(":/resource/digitalclockwidget.widgetml");
+ result = HbStyleLoader::registerFilePath(":/resource/digitalclockwidget.css");
+ result = HbStyleLoader::registerFilePath(":/resource/digitalclockwidget_color.css");
+
+ createPrimitives();
+
+ mTimer = new QTimer(this);
+ connect(mTimer, SIGNAL(timeout()), SLOT(tick()));
+
+ QTime time = QTime::currentTime();
+ int initialIntervalTime = (clockUpdateInterval - ( time.msec() + (time.second() * 1000)));
+ mTimer->start(initialIntervalTime);
+
+}
+
+/*!
+ Destructor.
+*/
+DigitalClockWidget::~DigitalClockWidget()
+{
+ mTimer->stop();
+ HbStyleLoader::unregisterFilePath(":/resource/digitalclockwidget.widgetml");
+ HbStyleLoader::unregisterFilePath(":/resource/digitalclockwidget.css");
+ HbStyleLoader::unregisterFilePath(":/resource/digitalclockwidget_color.css");
+
+}
+
+/*!
+ Updates clock visualization according to current time
+ */
+void DigitalClockWidget::tick()
+{
+ mTimer->setInterval(clockUpdateInterval);
+ updatePrimitives();
+ update();
+}
+
+/*!
+ Toggles time format
+ */
+void DigitalClockWidget::setAmPm(bool useAmPm)
+{
+
+ bool old = mUseAmPm;
+ mUseAmPm = useAmPm;
+
+ if (mUseAmPm != old) { // change am/pm label
+ QTime time = QTime::currentTime();
+ QString timeString;
+ if (mUseAmPm) {
+ mAmPmLabel->setText(time.toString("ap")); // set am/pm label
+ } else {
+ mAmPmLabel->setText(""); // set am/pm label as null
+ }
+ }
+
+}
+
+/*!
+ @copydoc HbWidget::resizeEvent()
+ */
+void DigitalClockWidget::resizeEvent(QGraphicsSceneResizeEvent *event)
+{
+ HbWidget::resizeEvent(event);
+}
+
+/*!
+ Creates all widget primitives.
+ */
+void DigitalClockWidget::createPrimitives()
+{
+ mClockLabel = new HbTextItem(this);
+ mClockLabel->setTextWrapping( Hb::TextNoWrap );
+ HbStyle::setItemName(mClockLabel, QLatin1String("clockLabel"));
+
+ mAmPmLabel = new HbTextItem(this);
+ mClockLabel->setTextWrapping( Hb::TextNoWrap );
+ HbStyle::setItemName(mAmPmLabel, QLatin1String("amPmLabel"));
+}
+
+/*!
+ @copydoc HbWidget::updatePrimitives()
+ updates all widget primitives
+ */
+void DigitalClockWidget::updatePrimitives()
+{
+
+ QTime time = QTime::currentTime();
+ QString timeString;
+
+ if (mUseAmPm) {
+ timeString = time.toString("hh:ap"); // covert time in 12 hours format
+ timeString = timeString.section(":", 0, 0); // it would remove :ap section from timeString
+ mAmPmLabel->setText(time.toString("ap")); // set am/pm label
+ } else {
+ mAmPmLabel->setText(""); // set am/pm label as null
+ timeString = time.toString("hh"); // append hour part
+ }
+
+ int index(1);
+ HbExtendedLocale locale;
+ QChar timeSeparator(locale.timeSeparator(index)) ;
+ timeString.append(timeSeparator); // append time separator
+ timeString.append(time.toString("mm")); //append minute part
+
+ mClockLabel->setText(timeString);
+
+}
--- a/clock/data/clock.qrc Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/data/clock.qrc Tue Jul 06 14:14:56 2010 +0300
@@ -11,8 +11,5 @@
<file alias="fade_out.fxml">effects/fade_out.fxml</file>
<file alias="fade_in.fxml">effects/fade_in.fxml</file>
- </qresource>
- <qresource prefix="/translations">
- <file alias="clock" >translations/clock.qm</file>
- </qresource>
+ </qresource>
</RCC>
\ No newline at end of file
Binary file clock/data/translations/clock.qm has changed
--- a/clock/data/translations/clock.ts Wed Jun 23 18:11:28 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,376 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="3.0" language="en_GB" sourcelanguage="en_GB">
-<context>
-<message numerus="no" id="txt_common_common_clock">
- <comment>Title for Date and time settings view</comment>
- <source>Clock</source>
- <translation variants="no">Clock</translation>
- <extra-loc-layout_id></extra-loc-layout_id>
- <extra-loc-viewid>Common</extra-loc-viewid>
- <extra-loc-positionid>Common</extra-loc-positionid>
- <extra-loc-feature>Co</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_dblist_val_1_hr">
- <comment>LayoutID Parent. Custom. When a city is added to the World Clock list view, its relative time offset is displayed with respect to Homecity. (Hour)</comment>
- <source>%1 hr</source>
- <translation variants="no">%1 hr</translation>
- <extra-loc-layout_id>txt_clock_dblist_val_l1_hr</extra-loc-layout_id>
- <extra-loc-viewid>Clock_World clock_P05</extra-loc-viewid>
- <extra-loc-positionid>dblist_1_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_dblist_daily_val_1_hr_2_mins">
- <comment>When a city is added to the World Clock list view, its relative time offset is displayed with respect to Homecity. (Hour and Mins)</comment>
- <source>%1 hr %2 mins</source>
- <translation variants="no">%1 hr %2 mins</translation>
- <extra-loc-layout_id>txt_clock_dblist_val_l1_hr</extra-loc-layout_id>
- <extra-loc-viewid>Clock_World clock_P05</extra-loc-viewid>
- <extra-loc-positionid>dblist_1_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_dblist_val_1_mins">
- <comment>When a city is added to the World Clock list view, its relative time offset is displayed with respect to Homecity. (Mins)</comment>
- <source>%1 mins</source>
- <translation variants="no">%1 mins</translation>
- <extra-loc-layout_id>txt_clock_dblist_val_l1_hr</extra-loc-layout_id>
- <extra-loc-viewid>Clock_World clock_P05</extra-loc-viewid>
- <extra-loc-positionid>dblist_1_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_val_mm_dd_yyyy">
- <comment>2nd value in combo box list for Date format label</comment>
- <source>mm dd yyyy</source>
- <translation variants="no">mm dd yyyy</translation>
- <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock main view_P01</extra-loc-viewid>
- <extra-loc-positionid>setlabel_2_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_main_view_setlabel_in_1hr_2min">
- <comment>Secondary text displaying the time remaining for the alarm (hour, min)</comment>
- <source>In %1hr %2min</source>
- <translation variants="no">In %1hr %2min</translation>
- <extra-loc-layout_id>txt_clock_main_view_setlabel_in_1hr_2min</extra-loc-layout_id>
- <extra-loc-viewid>Clock main view_P01</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_opt_add_city">
- <comment></comment>
- <source>Add city</source>
- <translation variants="no">Add city</translation>
- <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_World clock_P05</extra-loc-viewid>
- <extra-loc-positionid>opt</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_menu_show_on_homescreen">
- <comment>Long tap menu on an added city in World clock view (both portrait and landscape)</comment>
- <source>Show on homescreen</source>
- <translation variants="no">Show on homescreen</translation>
- <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_World clock_P05</extra-loc-viewid>
- <extra-loc-positionid>menu</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_menu_delete">
- <comment>Long tap menu on an added city in World Clock view (both portrait and landscape)</comment>
- <source>Delete</source>
- <translation variants="no">Delete</translation>
- <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_World clock_P05</extra-loc-viewid>
- <extra-loc-positionid>menu</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_main_view_setlabel_in_1hr_2mins">
- <comment>Secondary text displaying the time remaining for the alarm (hour, mins)</comment>
- <source>In %1hr %2mins</source>
- <translation variants="no">In %1hr %2mins</translation>
- <extra-loc-layout_id>txt_clock_main_view_setlabel_in_1hr_2mins</extra-loc-layout_id>
- <extra-loc-viewid>Clock main view_P01</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_common_setlabel_dst">
- <comment></comment>
- <source>DST</source>
- <translation variants="no">DST</translation>
- <extra-loc-layout_id></extra-loc-layout_id>
- <extra-loc-viewid>Common</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1</extra-loc-positionid>
- <extra-loc-feature>Co</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_main_view_setlabel_in_1hrs_2mins">
- <comment>Secondary text displaying the time remaining for the alarm (hours, mins)</comment>
- <source>In %1hrs %2mins</source>
- <translation variants="no">In %1hrs %2mins</translation>
- <extra-loc-layout_id>txt_clock_main_view_setlabel_in_1hrs_2mins</extra-loc-layout_id>
- <extra-loc-viewid>Clock main view_P01</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_main_view_button_alarms">
- <comment></comment>
- <source>Alarms</source>
- <translation variants="no">Alarms</translation>
- <extra-loc-layout_id>qtl_toolbar_tiny1_3</extra-loc-layout_id>
- <extra-loc-viewid>Clock main view_P01</extra-loc-viewid>
- <extra-loc-positionid>button</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_main_view_button_world_clock">
- <comment></comment>
- <source>World clock</source>
- <translation variants="no">World clock</translation>
- <extra-loc-layout_id>qtl_toolbar_tiny1_3</extra-loc-layout_id>
- <extra-loc-viewid>Clock main view_P01</extra-loc-viewid>
- <extra-loc-positionid>button</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_main_view_dblist_daily_val_workdays">
- <comment>Layout ID Parent. Custom Layout. Text to show the alarm occurance.</comment>
- <source>Workdays</source>
- <translation variants="no">Workdays</translation>
- <extra-loc-layout_id>txt_clock_main_view_dblist_daily_val_today</extra-loc-layout_id>
- <extra-loc-viewid>Clock main view_P01</extra-loc-viewid>
- <extra-loc-positionid>dblist_1_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_val_yyyy_mm_dd">
- <comment>3rd value in combo box list for Date format label</comment>
- <source>yyyy mm dd</source>
- <translation variants="no">yyyy mm dd</translation>
- <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock main view_P01</extra-loc-viewid>
- <extra-loc-positionid>setlabel_3_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_main_view_dblist_daily">
- <comment>Layout ID Parent. Custom Layout. Text to show the alarm occurance.</comment>
- <source>Daily</source>
- <translation variants="no">Daily</translation>
- <extra-loc-layout_id>txt_clock_main_view_dblist_daily_val_today</extra-loc-layout_id>
- <extra-loc-viewid>Clock main view_P01</extra-loc-viewid>
- <extra-loc-positionid>dblist_1</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_subhead_world_clock">
- <comment>Subtitle for World Clock view</comment>
- <source>World Clock</source>
- <translation variants="no">World Clock</translation>
- <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>
- <extra-loc-viewid>Clock_World clock_P05</extra-loc-viewid>
- <extra-loc-positionid>subhead</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_main_view_button_new_alarm">
- <comment></comment>
- <source>New alarm</source>
- <translation variants="no">New alarm</translation>
- <extra-loc-layout_id>qtl_toolbar_tiny1_3</extra-loc-layout_id>
- <extra-loc-viewid>Clock main view_P01</extra-loc-viewid>
- <extra-loc-positionid>button</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_button_add_city">
- <comment></comment>
- <source>Add city</source>
- <translation variants="no">Add city</translation>
- <extra-loc-layout_id>qtl_toolbar_tiny1_3</extra-loc-layout_id>
- <extra-loc-viewid>Clock_World clock_P05</extra-loc-viewid>
- <extra-loc-positionid>button</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_main_view_setlabel_gmt_1">
- <comment>Layout ID Parent. Custom. Text to display the GMT info for that city.</comment>
- <source>GMT %1</source>
- <translation variants="no">GMT %1</translation>
- <extra-loc-layout_id>txt_clock_main_view_label_gmt_1</extra-loc-layout_id>
- <extra-loc-viewid>Clock main view_P01</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_main_view_setlabel_in_1hrs_2min">
- <comment>Secondary text displaying the time remaining for the alarm (hours, min)</comment>
- <source>In %1hrs %2min</source>
- <translation variants="no">In %1hrs %2min</translation>
- <extra-loc-layout_id>txt_clock_main_view_setlabel_in_1hrs_2min</extra-loc-layout_id>
- <extra-loc-viewid>Clock main view_P01</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_common_common_gmt">
- <comment></comment>
- <source>GMT</source>
- <translation variants="no">GMT</translation>
- <extra-loc-layout_id></extra-loc-layout_id>
- <extra-loc-viewid>Common</extra-loc-viewid>
- <extra-loc-positionid>Common</extra-loc-positionid>
- <extra-loc-feature>Co</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_short_caption_clock">
- <comment>Clock application in Application library grid</comment>
- <source>Clock</source>
- <translation variants="no">Clock</translation>
- <extra-loc-layout_id>qtl_grid_applications_sec</extra-loc-layout_id>
- <extra-loc-viewid>Clock</extra-loc-viewid>
- <extra-loc-positionid>grid</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_main_view_setlabel_in_1days">
- <comment>Layout ID Parent. Custom layout. Days remaining for the alarm</comment>
- <source>In %1days</source>
- <translation variants="no">In %1days</translation>
- <extra-loc-layout_id>txt_clock_main_view_setlabel_in_1days</extra-loc-layout_id>
- <extra-loc-viewid>Clock main view_P01</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_dblist_val_1_hrs">
- <comment>When a city is added to the World Clock list view, its relative time offset is displayed with respect to Homecity. (Hours)</comment>
- <source>%1 hrs</source>
- <translation variants="no">%1 hrs</translation>
- <extra-loc-layout_id>txt_clock_dblist_val_l1_hr</extra-loc-layout_id>
- <extra-loc-viewid>Clock_World clock_P05</extra-loc-viewid>
- <extra-loc-positionid>dblist_1_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_main_view_menu_delete_alarm">
- <comment>Long tap on an alarm in Alarm list opens the item specific menu displaying text "Delete alarm"</comment>
- <source>Delete alarm</source>
- <translation variants="no">Delete alarm</translation>
- <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock main view_P01</extra-loc-viewid>
- <extra-loc-positionid>menu</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_main_view_setlabel_every_1">
- <comment>Layout ID Parent. Custom. Alarm Occurance detail.</comment>
- <source>Every %1</source>
- <translation variants="no">Every %1</translation>
- <extra-loc-layout_id>txt_clock_main_view_label_every_1</extra-loc-layout_id>
- <extra-loc-viewid>Clock main view_P01</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_main_view_dblist_daily_val_today">
- <comment>Layout ID Parent. Custom Layout. Text to show the alarm occurance.</comment>
- <source>Today</source>
- <translation variants="no">Today</translation>
- <extra-loc-layout_id>txt_clock_main_view_dblist_daily_val_today</extra-loc-layout_id>
- <extra-loc-viewid>Clock main view_P01</extra-loc-viewid>
- <extra-loc-positionid>dblist_1_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_long_caption_clock">
- <comment>Clock application in Application library list</comment>
- <source>Clock</source>
- <translation variants="no">Clock</translation>
- <extra-loc-layout_id>qtl_list_pri_large_graphic</extra-loc-layout_id>
- <extra-loc-viewid>Clock</extra-loc-viewid>
- <extra-loc-positionid>list</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_main_view_opt_settings">
- <comment>Item in Options menu from Clock main vew</comment>
- <source>Settings</source>
- <translation variants="no">Settings</translation>
- <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock main view_P01</extra-loc-viewid>
- <extra-loc-positionid>opt</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_menu_set_as_current_location">
- <comment>Long tap menu on an added city in the World clock view (both portrait and landscape)</comment>
- <source>Set as current location</source>
- <translation variants="no">Set as current location</translation>
- <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock_World clock_P05</extra-loc-viewid>
- <extra-loc-positionid>menu</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_main_view_dpopinfo_alarm_deactivated">
- <comment>Information shown in a popup once the alarm is deactivated</comment>
- <source>Alarm Deactivated</source>
- <translation variants="no">Alarm Deactivated</translation>
- <extra-loc-layout_id>qtl_notifdialog_pri2</extra-loc-layout_id>
- <extra-loc-viewid>Clock main view_P01</extra-loc-viewid>
- <extra-loc-positionid>dpopinfo</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_main_view_list_no_alarms_set">
- <comment>When there are no alarms set in Clock main view, the text "No alarms set" is displayed in list.</comment>
- <source>No alarms set</source>
- <translation variants="no">No alarms set</translation>
- <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock main view_with no alarms set_P02</extra-loc-viewid>
- <extra-loc-positionid>list</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_main_view_dpopinfo_alarm_activated">
- <comment>Information shown in a popup once the alarm is activated</comment>
- <source>Alarm Activated</source>
- <translation variants="no">Alarm Activated</translation>
- <extra-loc-layout_id>qtl_notifdialog_pri2</extra-loc-layout_id>
- <extra-loc-viewid>Clock main view_P01</extra-loc-viewid>
- <extra-loc-positionid>dpopinfo</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clk_setlabel_val_dd_mm_yyyy">
- <comment>1st value in combo box list for Date format label</comment>
- <source>dd mm yyyy</source>
- <translation variants="no">dd mm yyyy</translation>
- <extra-loc-layout_id>qtl_dataform_group_pri</extra-loc-layout_id>
- <extra-loc-viewid>Clock main view_P01</extra-loc-viewid>
- <extra-loc-positionid>setlabel_1_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_clock_dblist_daily_val_1_hrs_2_mins">
- <comment>When a city is added to the World Clock list view, its relative time offset is displayed with respect to Homecity. (Hours and Mins)</comment>
- <source>%1 hrs %2 mins</source>
- <translation variants="no">%1 hrs %2 mins</translation>
- <extra-loc-layout_id>txt_clock_dblist_val_l1_hr</extra-loc-layout_id>
- <extra-loc-viewid>Clock_World clock_P05</extra-loc-viewid>
- <extra-loc-positionid>dblist_1_val</extra-loc-positionid>
- <extra-loc-feature>Cl</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-</context>
-</TS>
--- a/clock/rom/clock.iby Wed Jun 23 18:11:28 2010 +0300
+++ b/clock/rom/clock.iby Tue Jul 06 14:14:56 2010 +0300
@@ -41,6 +41,9 @@
data=DATAZ_\resource\mcc\mcc.rsc RESOURCE_FILES_DIR\mcc\mcc.rsc
+// Stub sis
+data=DATAZ_\system\install\clock_stub.sis \System\Install\clock_stub.sis
+
// Binaries.
file=ABI_DIR\BUILD_DIR\clockalarmclient.dll SHARED_LIB_DIR\clockalarmclient.dll
file=ABI_DIR\BUILD_DIR\timezoneclient.dll SHARED_LIB_DIR\timezoneclient.dll
@@ -52,7 +55,7 @@
file=ABI_DIR\BUILD_DIR\clockviewmanager.dll SHARED_LIB_DIR\clockviewmanager.dll
file=ABI_DIR\BUILD_DIR\clockviews.dll SHARED_LIB_DIR\clockviews.dll
file=ABI_DIR\BUILD_DIR\clockwidget.dll SHARED_LIB_DIR\clockwidget.dll
-file=ABI_DIR\BUILD_DIR\clockwidgetplugin.dll SHARED_LIB_DIR\clockwidgetplugin.dll
+file=ABI_DIR\BUILD_DIR\clockwidgetplugin.dll SHARED_LIB_DIR\clockwidgetplugin.dll
file=ABI_DIR\BUILD_DIR\datetimesettingsplugin.dll SHARED_LIB_DIR\datetimesettingsplugin.dll
data=\epoc32\data\c\resource\qt\plugins\controlpanel\datetimesettingsplugin.qtplugin resource\qt\plugins\controlpanel\datetimesettingsplugin.qtplugin
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/clock/sis/clock.pkg Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,75 @@
+;
+; 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 of Clock Application for IAD.
+;
+
+; Language
+&EN
+
+; standard SIS file header
+#{"Clock"}, (0x10005903), 1, 0, 0, TYPE=SA, RU
+
+; Localised vendor name
+%{"Nokia"}
+
+; Unique vendor name
+:"Nokia"
+
+; Clock engine components
+"/epoc32/release/armv5/urel/clockserver.exe" - "!:/sys/bin/clockserver.exe"
+"/epoc32/release/armv5/urel/clockserverclient.dll" - "!:/sys/bin/clockserverclient.dll"
+"/epoc32/release/armv5/urel/clocktimezoneresolver.dll" - "!:/sys/bin/clocktimezoneresolver.dll"
+"/epoc32/release/armv5/urel/clocktimesourceinterface.dll" - "!:/sys/bin/clocktimesourceinterface.dll"
+"/epoc32/release/armv5/urel/clockecomlistener.dll" - "!:/sys/bin/clockecomlistener.dll"
+
+; Clock nitz Ecom plugin
+"/epoc32/release/armv5/urel/clocknitzplugin.dll" - "!:/sys/bin/clocknitzplugin.dll"
+"/epoc32/data/z/resource/plugins/clocknitzplugin.rsc" - "!:/resource/plugins/clocknitzplugin.rsc"
+
+; Clock executable and default resource files
+
+"/epoc32/release/armv5/urel/clock.exe" - "!:/sys/bin/clock.exe"
+"/epoc32/data/Z/private/10003a3f/import/apps/clock_reg.rsc" - "!:/private/10003a3f/import/apps/clock_reg.rsc"
+"/epoc32/data/z/resource/apps/clock.rsc" - "!:/resource/apps/clock.rsc"
+"/epoc32/data/z/resource/qt/translations/clock_en.qm" - "!:/resource/qt/translations/clock_en.qm"
+
+
+"/epoc32/release/armv5/urel/clockalarmclient.dll" - "!:/sys/bin/clockalarmclient.dll"
+"/epoc32/release/armv5/urel/timezoneclient.dll" - "!:/sys/bin/timezoneclient.dll"
+"/epoc32/release/armv5/urel/clocksettingsutility.dll" - "!:/sys/bin/clocksettingsutility.dll"
+"/epoc32/release/armv5/urel/clocksettingsview.dll" - "!:/sys/bin/clocksettingsview.dll"
+"/epoc32/release/armv5/urel/clockcityselectionlist.dll" - "!:/sys/bin/clockcityselectionlist.dll"
+"/epoc32/release/armv5/urel/clockalarmeditor.dll" - "!:/sys/bin/clockalarmeditor.dll"
+"/epoc32/release/armv5/urel/clockappcontroller.dll" - "!:/sys/bin/clockappcontroller.dll"
+"/epoc32/release/armv5/urel/clockviewmanager.dll" - "!:/sys/bin/clockviewmanager.dll"
+"/epoc32/release/armv5/urel/clockviews.dll" - "!:/sys/bin/clockviews.dll"
+"/epoc32/release/armv5/urel/clockwidget.dll" - "!:/sys/bin/clockwidget.dll"
+"/epoc32/release/armv5/urel/clockwidgetplugin.dll" - "!:/sys/bin/clockwidgetplugin.dll"
+
+"/epoc32/data/Z/resource/mcc/mcc.rsc" -"!:/resource/mcc/mcc.rsc"
+"/epoc32/data/Z/resource/timezonelocalization/timezones.rsc" -"!:/resource/timezonelocalization/timezones.rsc"
+"/epoc32/data/Z/resource/timezonelocalization/timezonegroups.rsc" -"!:/resource/timezonelocalization/timezonegroups.rsc"
+
+;Qt plugin files to be installed
+"/epoc32/release/armv5/urel/datetimesettingsplugin.dll" - "!:/sys/bin/datetimesettingsplugin.dll"
+"/epoc32/data/c/resource/qt/plugins/controlpanel/datetimesettingsplugin.qtplugin" - "!:/resource/qt/plugins/controlpanel/datetimesettingsplugin.qtplugin"
+
+"/epoc32/release/armv5/urel/clocksettingsviewplugin.dll" - "!:/sys/bin/clocksettingsviewplugin.dll"
+"/epoc32/data/z/resource/qt/plugins/clock/clocksettingsviewplugin.qtplugin" - "!:/resource/qt/plugins/clock/clocksettingsviewplugin.qtplugin"
+
+"/epoc32/release/armv5/urel/ftudatetimewizard.dll" - "!:/sys/bin/ftudatetimewizard.dll"
+"/epoc32/data/z/resource/qt/plugins/FTU/ftudatetimewizard.qtplugin" - "!:/resource/qt/plugins/FTU/ftudatetimewizard.qtplugin"
+"/epoc32/data/z/fturesources/plugins/wizardproviders/ftudatetimewizard.manifest" - "!:/fturesources/plugins/wizardproviders/ftudatetimewizard.manifest"
+
+;END OF FILE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/clock/sis/createandsign.bat Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,22 @@
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description: Bat file to create Clock Application's sisx.
+rem
+
+@echo -------- Create sis packages ---------
+makesis clock.pkg
+
+@echo -------- Sign and rename sis packages -----------
+signsis clock.sis clock.sisx Nokia_RnDCert_02.der Nokia_RnDCert_02.key
+
Binary file clock/sis/nokia_rndcert_02.der has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/clock/sis/nokia_rndcert_02.key Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQC/TDP7KKIaf5+uW4OD2iVZuUMC2a+SeQTjf6srlKcOm+CpPNXn
+uLNm/8fdEnyOIuRXPRKmqhs1n0JkxEGHynELWMTuKXbQx9SRAGUXzyneGn+IJNnO
+vOKHWgKCouX2hfI8rtkdqJpqmO460gGsMgw+lsbeyWyW9lnfLxq+ZC7sqQIDAQAB
+AoGBALmUWZE8GBaQ3P4u9WUCSd3DJkkrmXIFSULSZeH/chlwCwDjbbhArHothVzo
+REE3hEFFlERvHbplZ+mNouzy7boduvgUzbksGrbGMLJ2qO1GzWWVwV+GzOWKd3ss
+/98Gwoy5R8pjnkqUE2wP1iJFw0FjvUTKcYv/z6t3LLJ0CsoBAkEA+c7ixvsviQ3J
+s0INytCKU2bf8fqFQJi1VI82ukxNsujGTQ9upVSjuvqPvWyDvvTdrUBHqO+3qPut
+sEh01Q8aiQJBAMQKDJPVRu4ud3mwUfEavzL5EjqwG1k9VCNGYsT4FwtrHcxu1oP/
+pk6M3rIZukqomoEEnHWPMwhrK3fhBqi0OSECQQDr40VXege4FnH5OI2Hj4afHMyp
+VdQQXGMWFyopnzXblFz0lXb43cTCIiorR9XcMqNFHybLypkWE5o+lRzlt55pAkBQ
+P/zeF5Sts//cpL0mgdh7OVKpC6ZmZaCnwAx2rUhhuDu+kDDoYCLoTOps5fNI1LRK
+1GRoC3LMo3Jr5IYhUYWBAkBpCpN6k4JU/mszq98EojHerQNxk8sPqvQKUzTutohT
+1gLX9yepGayB/TtT2EEJDkWOlnTy/dvN6W3vzbJYz97x
+-----END RSA PRIVATE KEY-----
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/clock/stubsis/clock_stub.pkg Tue Jul 06 14:14:56 2010 +0300
@@ -0,0 +1,27 @@
+;
+; 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 of Clock Application for IAD.
+;
+
+; Language
+&EN
+
+; Header
+#{"Clock"}, (0x10005903), 1, 0, 0, TYPE=SA
+
+; Localised vendor name
+%{"Nokia"}
+
+; Unique vendor name
+:"Nokia"
\ No newline at end of file
Binary file clock/stubsis/clock_stub.sis has changed
--- a/notes/data/notes.qrc Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/data/notes.qrc Tue Jul 06 14:14:56 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> <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
+<!DOCTYPE RCC><RCC version="1.0"> <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
Binary file notes/data/translations/notes.qm has changed
--- a/notes/data/translations/notes.ts Wed Jun 23 18:11:28 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,856 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_dataform_editor_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P12</extra-loc-viewid>
- <extra-loc-positionid>formlabel_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_formlabel_val_subject">
- <comment>Default text value for Subject field in a dataform</comment>
- <source>Subject</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_dataform_editor_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P12</extra-loc-viewid>
- <extra-loc-positionid>formlabel_4_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_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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P1</extra-loc-viewid>
- <extra-loc-positionid>menu</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>
- <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_todo">
- <comment>Sub title in To-do Editor</comment>
- <source>To-do</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P8</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_opt_new_note">
- <comment>Option menu item to create new note</comment>
- <source>New note</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P5</extra-loc-viewid>
- <extra-loc-positionid>opt</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_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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_dataform_combobox_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P8</extra-loc-viewid>
- <extra-loc-positionid>setlabel_4_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_created_on_1_2">
- <comment>Secondary text item to mention creation date and time for a task</comment>
- <source>Created on %1 %2</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_1_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_alarm_time">
- <comment>Message dialog header text . Time picker component embedded</comment>
- <source>Alarm time</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P9</extra-loc-viewid>
- <extra-loc-positionid>title</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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P8</extra-loc-viewid>
- <extra-loc-positionid>formlabel_1</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_remove_description">
- <comment>Options menu item to remove description from the To-do editor</comment>
- <source>Remove description</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P12</extra-loc-viewid>
- <extra-loc-positionid>opt</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_alarm_date">
- <comment>Message dialog header text . Date picker component embedded</comment>
- <source>Alarm date</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P9</extra-loc-viewid>
- <extra-loc-positionid>title</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_mark_as_not_done">
- <comment>Item specific menu item to mark a task as not done</comment>
- <source>Mark as not done</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P1</extra-loc-viewid>
- <extra-loc-positionid>menu</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_note_saved">
- <comment>Soft notification dialog info text. This dialog is displayed once the note is modified and saved</comment>
- <source>Note saved</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_notifdialog_pri2</extra-loc-layout_id>
- <extra-loc-viewid>Notes</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_button_new_note">
- <comment>toolbar button text in landscape mode . If user taps on this button, Notes editor is launched to add note</comment>
- <source>New note</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_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_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>
-<message numerus="yes" id="txt_notes_subhead_ln_notes">
- <comment>Sub title for All Notes view</comment>
- <source>%Ln Notes</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P1</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_dblist_description">
- <comment>Primary text label in To-do Viewer</comment>
- <source>Description:</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P11</extra-loc-viewid>
- <extra-loc-positionid>dblist_7</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_subject">
- <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_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>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_notes_opt_add_description">
- <comment>Options menu item to add description field in To-do note editor</comment>
- <source>Add description</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P8</extra-loc-viewid>
- <extra-loc-positionid>opt</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_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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_dataform_combobox_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P8</extra-loc-viewid>
- <extra-loc-positionid>setlabel_4_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_completed_date_val_1">
- <comment>Completed date value (Secondary text ) in To-do viewer</comment>
- <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>
- <extra-loc-positionid>dblist_6_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_opt_discard_changes">
- <comment>Option menu item to discard the changes done in the notes editor</comment>
- <source>Discard changes</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P5</extra-loc-viewid>
- <extra-loc-positionid>opt</extra-loc-positionid>
- <extra-loc-feature>No</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_short_caption_notes">
- <comment>Notes application in application library grid view</comment>
- <source>Notes</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_grid_applications_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes</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_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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P11</extra-loc-viewid>
- <extra-loc-positionid>opt</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_completed_date">
- <comment>Primary text label in To-do viewer</comment>
- <source>Completed date:</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P11</extra-loc-viewid>
- <extra-loc-positionid>dblist_6</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_normal">
- <comment>Priority value in Combo Box used in a dataform</comment>
- <source>Normal</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_dataform_combobox_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P8</extra-loc-viewid>
- <extra-loc-positionid>setlabel_4_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_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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_toolbar_tiny_3</extra-loc-layout_id>
- <extra-loc-viewid>Notes_L4</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_list_favorites">
- <comment>Collections name in the list widget (Left Side)</comment>
- <source>Favorites</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_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>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>
-<message numerus="no" id="txt_notes_menu_remove_from_favorites">
- <comment>Item specific menu item to remove the note from favorites</comment>
- <source>Remove from favorites</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P1</extra-loc-viewid>
- <extra-loc-positionid>menu</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_add_to_calendar">
- <comment>Toolbar button to launch calendar editor and add content in the subject and description field</comment>
- <source>Add to Calendar</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_toolbar_tiny_3</extra-loc-layout_id>
- <extra-loc-viewid>Notes_L4</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_long_caption_notes">
- <comment>Notes application in application library list view</comment>
- <source>Notes</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_list_pri_large_graphic</extra-loc-layout_id>
- <extra-loc-viewid>Notes</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_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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_toolbar_tiny_3</extra-loc-layout_id>
- <extra-loc-viewid>Notes_L4</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_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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P9</extra-loc-viewid>
- <extra-loc-positionid>title</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_todos">
- <comment>Collections name in the list widget (Left Side)</comment>
- <source>To-do's</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_subhead_note">
- <comment>Layout ID Parent. Custom GroupBox. Sub title in Notes editor (Left Side)</comment>
- <source>Note</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>txt_notes_subhead_note</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_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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_notifdialog_pri2</extra-loc-layout_id>
- <extra-loc-viewid>Notes</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_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>%2</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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P4</extra-loc-viewid>
- <extra-loc-positionid>opt</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_remove_from_favorites">
- <comment>Options menu item to remove the note from favorites item</comment>
- <source>Remove from favorites</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P5</extra-loc-viewid>
- <extra-loc-positionid>opt</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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>txt_notes_subhead_new_note</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P4</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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P12</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_title_notes">
- <comment>Title bar text for Notes application+</comment>
- <source>Notes</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_titlebar</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P1</extra-loc-viewid>
- <extra-loc-positionid>title</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_favorite">
- <comment>Options menu item to mark the note as favorite item</comment>
- <source>Mark as favorite</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P4</extra-loc-viewid>
- <extra-loc-positionid>opt</extra-loc-positionid>
- <extra-loc-feature>No</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_tsw_caption_notes">
- <comment>Notes application name in Task Switcher</comment>
- <source>Notes</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>txt_tsw_caption_notes</extra-loc-layout_id>
- <extra-loc-viewid>tsw01</extra-loc-viewid>
- <extra-loc-positionid>caption</extra-loc-positionid>
- <extra-loc-feature>ts</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_notes_subhead_collections">
- <comment>Sub title for Collections view</comment>
- <source>Collections</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P2</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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P8</extra-loc-viewid>
- <extra-loc-positionid>formlabel_3</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_collections">
- <comment>toolbar button text in landscape mode . If user taps on this button, Collections view is displayed</comment>
- <source>Collections</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_button_edit">
- <comment>One of 3 buttons in Toolbar . Toolbar button item to edit the To-do note </comment>
- <source>Edit</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_toolbar_tiny_3</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P11</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_dblist_val_modified_on_1_2">
- <comment>Secondary text item to mention modified date & time for a note</comment>
- <source>Modified on %1 %2</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_2_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_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_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>
-</message>
-<message numerus="no" id="txt_notes_dblist_val_due_on_1">
- <comment>Secondary text item in the list to show due date for a task</comment>
- <source>Due 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_3_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_menu_mark_as_favorite">
- <comment>Item specific menu item to mark a note as favorite </comment>
- <source>Mark as favorite</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P1</extra-loc-viewid>
- <extra-loc-positionid>menu</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_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>
- <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_4_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_opt_mark_as_done">
- <comment>Options menu item to change the non-completed to-do status to completed</comment>
- <source>Mark as done</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P11</extra-loc-viewid>
- <extra-loc-positionid>opt</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_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_setlabel_priority">
- <comment>Label item in Data form</comment>
- <source>Priority</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P8</extra-loc-viewid>
- <extra-loc-positionid>setlabel_4</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>
- <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="yes" id="txt_notes_subhead_todos_ln_pending">
- <comment>Sub title in To-do notes list view</comment>
- <source>To-do's (%Ln Pending )</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P7</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_task_switcher_caption_notes">
- <comment>Notes application name in Task Switcher</comment>
- <source>Notes</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>cell_tport_appsw_pane_t1</extra-loc-layout_id>
- <extra-loc-viewid>Task Switcher</extra-loc-viewid>
- <extra-loc-positionid>caption</extra-loc-positionid>
- <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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P1</extra-loc-viewid>
- <extra-loc-positionid>menu</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_note_moved_to_todos">
- <comment>If a plain note is marked as To-do note in the list view, the marked item disappears from the current view with a notification dialog </comment>
- <source>Note moved to To-do's</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_notifdialog_pri2</extra-loc-layout_id>
- <extra-loc-viewid>Notes</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_menu_mark_as_done">
- <comment>Item specific menu item to mark a task as completed</comment>
- <source>Mark as done</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P1</extra-loc-viewid>
- <extra-loc-positionid>menu</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">
- <comment>Checkbox label item to enable/disable alarm</comment>
- <source>Alarm</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_dataform_checkbox_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P8</extra-loc-viewid>
- <extra-loc-positionid>formlabel_2</extra-loc-positionid>
- <extra-loc-feature>No</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-</context>
-</TS>
--- a/notes/data/xml/notescollectionsview.docml Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/data/xml/notescollectionsview.docml Tue Jul 06 14:14:56 2010 +0300
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="0.9">
+<hbdocument version="1.1">
<object name="allNotesAction" type="HbAction">
- <icon iconName="qtg_mono_notes_all" name="icon"/>
+ <icon iconName="qtg_mono_notes_all" name="icon"/>
</object>
<object name="collectionsViewAction" type="HbAction">
- <icon iconName="qtg_mono_notes_collections" name="icon"/>
+ <icon iconName="qtg_mono_notes_collections" name="icon"/>
</object>
<object name="newNoteAction" type="HbAction">
<icon iconName="qtg_mono_create_event" name="icon"/>
@@ -12,38 +12,38 @@
<widget name="notesCollectionView" type="HbView">
<widget name="notesCollectionWidget" role="HbView:widget" type="HbWidget">
<widget name="subtitleGroupBox" type="HbGroupBox">
- <string locid="txt_notes_subhead_collections" name="heading" value="Collections"/>
<real name="z" value="1"/>
<bool name="collapsable" value="FALSE"/>
+ <string locid="txt_notes_subhead_collections" name="heading" value="Collections"/>
</widget>
<widget name="listView" type="HbListView">
- <widget name="listItemPrototype" role="HbListView:prototype" type="HbListViewItem"/>
+ <widget name="listItemPrototype_1" role="HbAbstractView:prototype" type="HbListViewItem"/>
<real name="z" value="2"/>
-
+ <sizehint height="85.52239un" type="PREFERRED" width="45.8209un"/>
</widget>
<layout type="anchor">
<anchoritem dst="subtitleGroupBox" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
<anchoritem dst="subtitleGroupBox" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
<anchoritem dst="subtitleGroupBox" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
- <anchoritem dst="listView" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
- <anchoritem dst="listView" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="listView" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+ <anchoritem dst="listView" dstEdge="TOP" spacing="0un" src="subtitleGroupBox" srcEdge="BOTTOM"/>
+ <anchoritem dst="listView" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
<anchoritem dst="listView" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
- <anchoritem dst="listView" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="subtitleGroupBox" srcEdge="BOTTOM"/>
</layout>
</widget>
<widget name="viewToolbar" role="HbView:toolBar" type="HbToolBar">
<enums name="orientation" value="Horizontal"/>
- <ref object="allNotesAction" role="HbToolBar:addAction"/>
- <ref object="collectionsViewAction" role="HbToolBar:addAction"/>
- <ref object="newNoteAction" role="HbToolBar:addAction"/>
+ <ref object="allNotesAction" role="HbWidget:addAction"/>
+ <ref object="collectionsViewAction" role="HbWidget:addAction"/>
+ <ref object="newNoteAction" role="HbWidget:addAction"/>
</widget>
<widget name="viewMenu" role="HbView:menu" type="HbMenu"/>
<string locid="txt_notes_title_notes" name="title" value="Notes"/>
</widget>
- <metadata activeUIState="portrait" display="NHD portrait" unit="un">
+ <metadata activeUIState="portrait" display="NHD-3.2-inch_portrait" unit="un">
<uistate name="Common ui state" sections="#common"/>
<uistate name="portrait" sections="#common"/>
<uistate name="landscape" sections="#common"/>
- <dummydata objectName="listView" section="#common" value="0"/>
+ <dummydata objectName="listView" section="#common" value="app_list_template5"/>
</metadata>
</hbdocument>
--- a/notes/data/xml/notesfavoriteview.docml Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/data/xml/notesfavoriteview.docml Tue Jul 06 14:14:56 2010 +0300
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="0.9">
+<hbdocument version="1.1">
<object name="allNotesAction" type="HbAction">
- <icon iconName="qtg_mono_notes_all" name="icon"/>
+ <icon iconName="qtg_mono_notes_all" name="icon"/>
</object>
<object name="displayCollectionsAction" type="HbAction">
- <icon iconName="qtg_mono_notes_collections" name="icon"/>
+ <icon iconName="qtg_mono_notes_collections" name="icon"/>
</object>
<object name="newNoteAction" type="HbAction">
<icon iconName="qtg_mono_create_event" name="icon"/>
@@ -15,42 +15,48 @@
<widget name="notesFavoriteView" type="HbView">
<widget name="notesFavoriteViewWidget" role="HbView:widget" type="HbWidget">
<widget name="subtitleGroupBox" type="HbGroupBox">
- <string locid="txt_notes_subhead_favorites" name="heading" value="Favorites"/>
<real name="z" value="1"/>
<bool name="collapsable" value="FALSE"/>
+ <string locid="txt_notes_subhead_favorites" name="heading" value="Favorites"/>
</widget>
<widget name="favoritesListView" type="HbListView">
- <widget name="prototype" role="HbListView:prototype" type="HbListViewItem">
- <string name="state" value="normal"/>
- </widget>
+ <widget name="listItemPrototype" role="HbAbstractView:prototype" type="HbListViewItem"/>
<real name="z" value="2"/>
<sizehint height="47.7612un" type="PREFERRED" width="35.8209un"/>
</widget>
+ <widget name="emptyListLabel" type="HbLabel">
+ <real name="z" value="1"/>
+ <string locid="txt_notes_list_no_notes_available" name="plainText" value="No notes available"/> <enums name="textWrapping" value="TextWordWrap"/>
+ <enums name="textWrapping" value="TextWordWrap"/>
+ <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+ <sizehint height="expr(var(hb-param-text-height-primary) )" type="PREFERRED"/>
+ </widget>
<layout type="anchor">
<anchoritem dst="subtitleGroupBox" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
<anchoritem dst="subtitleGroupBox" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
<anchoritem dst="subtitleGroupBox" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
- <anchoritem dst="favoritesListView" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
- <anchoritem dst="favoritesListView" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
- <anchoritem dst="favoritesListView" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="subtitleGroupBox" srcEdge="BOTTOM"/>
+ <anchoritem dst="favoritesListView" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+ <anchoritem dst="favoritesListView" dstEdge="TOP" spacing="0un" src="subtitleGroupBox" srcEdge="BOTTOM"/>
+ <anchoritem dst="favoritesListView" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
<anchoritem dst="favoritesListView" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+ <anchoritem dst="emptyListLabel" dstEdge="LEFT" spacing="expr(var(hb-param-margin-gene-left) )" src="favoritesListView" srcEdge="LEFT"/>
+ <anchoritem dst="emptyListLabel" dstEdge="RIGHT" spacing="expr(-var(hb-param-margin-gene-right) )" src="favoritesListView" srcEdge="RIGHT"/>
+ <anchoritem dst="emptyListLabel" dstEdge="CENTERV" spacing="0un" src="favoritesListView" srcEdge="CENTERV"/>
</layout>
</widget>
<widget name="viewToolbar" role="HbView:toolBar" type="HbToolBar">
<enums name="orientation" value="Horizontal"/>
- <ref object="allNotesAction" role="HbToolBar:addAction"/>
- <ref object="displayCollectionsAction" role="HbToolBar:addAction"/>
- <ref object="newNoteAction" role="HbToolBar:addAction"/>
+ <ref object="allNotesAction" role="HbWidget:addAction"/>
+ <ref object="displayCollectionsAction" role="HbWidget:addAction"/>
+ <ref object="newNoteAction" role="HbWidget:addAction"/>
</widget>
- <widget name="viewMenu" role="HbView:menu" type="HbMenu">
- <!-- uncomment for multiple delete <ref object="deleteAction" role="HbMenu:addAction"/> -->
- </widget>
+ <widget name="viewMenu" role="HbView:menu" type="HbMenu"/>
<string locid="txt_notes_title_notes" name="title" value="Notes"/>
</widget>
- <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
+ <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
<uistate name="Common ui state" sections="#common"/>
<uistate name="portrait" sections="#common"/>
<uistate name="landscape" sections="#common"/>
- <dummydata objectName="favoritesListView" section="#common" value="0"/>
+ <dummydata objectName="favoritesListView" section="#common" value="app_list_template5"/>
</metadata>
</hbdocument>
--- a/notes/data/xml/notesmainview.docml Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/data/xml/notesmainview.docml Tue Jul 06 14:14:56 2010 +0300
@@ -1,53 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="0.9">
+<hbdocument version="1.1">
<object name="allNotesAction" type="HbAction">
- <icon iconName="qtg_mono_notes_all" name="icon"/>
+ <icon iconName="qtg_mono_notes_all" name="icon"/>
</object>
<object name="collectionsViewAction" type="HbAction">
- <icon iconName="qtg_mono_notes_collections" name="icon"/>
+ <icon iconName="qtg_mono_notes_collections" name="icon"/>
</object>
<object name="newNoteAction" type="HbAction">
<icon iconName="qtg_mono_create_event" name="icon"/>
</object>
- <object name="deleteAction" type="HbAction">
+ <object name="deleteAction" type="HbAction">
<string locid="txt_common_opt_delete" name="text" value="Delete"/>
</object>
<widget name="notesMainView" type="HbView">
<widget name="notesMainViewWidget" role="HbView:widget" type="HbWidget">
<widget name="viewHeading" type="HbGroupBox">
- <string name="heading" value=" "/>
<real name="z" value="1"/>
<bool name="collapsable" value="FALSE"/>
+ <string name="heading" value=" "/>
</widget>
<widget name="listView" type="HbListView">
- <widget name="prototype" role="HbListView:prototype" type="HbListViewItem"/>
+ <widget name="prototype" role="HbAbstractView:prototype" type="HbListViewItem"/>
<real name="z" value="2"/>
<sizehint height="47.7612un" type="PREFERRED" width="35.8209un"/>
</widget>
+ <widget name="emptyListLabel" type="HbLabel">
+ <real name="z" value="1"/>
+ <string locid="txt_notes_list_no_notes_available" name="plainText" value="No notes available"/> <enums name="textWrapping" value="TextWordWrap"/>
+ <sizehint height="expr(var(hb-param-text-height-primary) )" type="PREFERRED"/>
+ <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+ </widget>
<layout type="anchor">
<anchoritem dst="viewHeading" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
<anchoritem dst="viewHeading" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
<anchoritem dst="viewHeading" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
- <anchoritem dst="listView" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
- <anchoritem dst="listView" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="viewHeading" srcEdge="BOTTOM"/>
- <anchoritem dst="listView" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="listView" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+ <anchoritem dst="listView" dstEdge="TOP" spacing="0un" src="viewHeading" srcEdge="BOTTOM"/>
+ <anchoritem dst="listView" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
<anchoritem dst="listView" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+ <anchoritem dst="emptyListLabel" dstEdge="LEFT" spacing="expr(var(hb-param-margin-gene-left) )" src="listView" srcEdge="LEFT"/>
+ <anchoritem dst="emptyListLabel" dstEdge="RIGHT" spacing="expr(-var(hb-param-margin-gene-right) )" src="listView" srcEdge="RIGHT"/>
+ <anchoritem dst="emptyListLabel" dstEdge="CENTERV" spacing="0un" src="listView" srcEdge="CENTERV"/>
</layout>
</widget>
<widget name="viewToolbar" role="HbView:toolBar" type="HbToolBar">
- <enums name="orientation" value="Horizontal"/>
- <ref object="allNotesAction" role="HbToolBar:addAction"/>
- <ref object="collectionsViewAction" role="HbToolBar:addAction"/>
- <ref object="newNoteAction" role="HbToolBar:addAction"/>
+ <enums name="orientation" value="Horizontal"/>
+ <ref object="allNotesAction" role="HbWidget:addAction"/>
+ <ref object="collectionsViewAction" role="HbWidget:addAction"/>
+ <ref object="newNoteAction" role="HbWidget:addAction"/>
</widget>
- <widget name="viewMenu" role="HbView:menu" type="HbMenu">
- <!-- uncomment for multiple delete <ref object="deleteAction" role="HbMenu:addAction"/> -->
- </widget>
+ <widget name="viewMenu" role="HbView:menu" type="HbMenu"/>
<string locid="txt_notes_title_notes" name="title" value="Notes"/>
</widget>
- <metadata activeUIState="portrait" display="QHD portrait" unit="un">
+ <metadata activeUIState="portrait" display="NHD-3.2-inch_portrait" unit="un">
<uistate name="Common ui state" sections="#common"/>
<uistate name="portrait" sections="#common"/>
<uistate name="landscape" sections="#common"/>
+ <dummydata objectName="listView" section="#common" value="app_list_template5"/>
</metadata>
</hbdocument>
--- a/notes/data/xml/notesnoteview.docml Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/data/xml/notesnoteview.docml Tue Jul 06 14:14:56 2010 +0300
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="0.9">
+<hbdocument version="1.1">
<object name="allNotesAction" type="HbAction">
- <icon iconName="qtg_mono_notes_all" name="icon"/>
+ <icon iconName="qtg_mono_notes_all" name="icon"/>
</object>
<object name="displayCollectionsAction" type="HbAction">
- <icon iconName="qtg_mono_notes_collections" name="icon"/>
+ <icon iconName="qtg_mono_notes_collections" name="icon"/>
</object>
<object name="newNoteAction" type="HbAction">
<icon iconName="qtg_mono_create_event" name="icon"/>
@@ -15,42 +15,48 @@
<widget name="notesNoteView" type="HbView">
<widget name="notesNoteViewWidget" role="HbView:widget" type="HbWidget">
<widget name="subtitleGroupBox" type="HbGroupBox">
- <string locid="txt_notes_list_plain_notes" name="heading" value="Recent notes"/>
<real name="z" value="1"/>
<bool name="collapsable" value="FALSE"/>
+ <string locid="txt_notes_list_plain_notes" name="heading" value="Recent notes"/>
</widget>
<widget name="noteListView" type="HbListView">
- <widget name="prototype" role="HbListView:prototype" type="HbListViewItem">
- <string name="state" value="normal"/>
- </widget>
+ <widget name="listItemPrototype" role="HbAbstractView:prototype" type="HbListViewItem"/>
<real name="z" value="2"/>
<sizehint height="47.7612un" type="PREFERRED" width="35.8209un"/>
</widget>
+ <widget name="emptyListLabel" type="HbLabel">
+ <real name="z" value="1"/>
+ <string locid="txt_notes_list_no_notes_available" name="plainText" value="No notes available"/> <enums name="textWrapping" value="TextWordWrap"/>
+ <enums name="textWrapping" value="TextWordWrap"/>
+ <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+ <sizehint height="expr(var(hb-param-text-height-primary) )" type="PREFERRED"/>
+ </widget>
<layout type="anchor">
<anchoritem dst="subtitleGroupBox" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
<anchoritem dst="subtitleGroupBox" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
<anchoritem dst="subtitleGroupBox" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
- <anchoritem dst="noteListView" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
- <anchoritem dst="noteListView" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
- <anchoritem dst="noteListView" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="subtitleGroupBox" srcEdge="BOTTOM"/>
+ <anchoritem dst="noteListView" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+ <anchoritem dst="noteListView" dstEdge="TOP" spacing="0un" src="subtitleGroupBox" srcEdge="BOTTOM"/>
+ <anchoritem dst="noteListView" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
<anchoritem dst="noteListView" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+ <anchoritem dst="emptyListLabel" dstEdge="LEFT" spacing="expr(var(hb-param-margin-gene-left) )" src="noteListView" srcEdge="LEFT"/>
+ <anchoritem dst="emptyListLabel" dstEdge="RIGHT" spacing="expr(-var(hb-param-margin-gene-right) )" src="noteListView" srcEdge="RIGHT"/>
+ <anchoritem dst="emptyListLabel" dstEdge="CENTERV" spacing="0un" src="noteListView" srcEdge="CENTERV"/>
</layout>
</widget>
<widget name="viewToolbar" role="HbView:toolBar" type="HbToolBar">
<enums name="orientation" value="Horizontal"/>
- <ref object="allNotesAction" role="HbToolBar:addAction"/>
- <ref object="displayCollectionsAction" role="HbToolBar:addAction"/>
- <ref object="newNoteAction" role="HbToolBar:addAction"/>
+ <ref object="allNotesAction" role="HbWidget:addAction"/>
+ <ref object="displayCollectionsAction" role="HbWidget:addAction"/>
+ <ref object="newNoteAction" role="HbWidget:addAction"/>
</widget>
- <widget name="viewMenu" role="HbView:menu" type="HbMenu">
- <!-- uncomment for multiple delete <ref object="deleteAction" role="HbMenu:addAction"/> -->
- </widget>
+ <widget name="viewMenu" role="HbView:menu" type="HbMenu"/>
<string locid="txt_notes_title_notes" name="title" value="Notes"/>
</widget>
- <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
+ <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
<uistate name="Common ui state" sections="#common"/>
<uistate name="portrait" sections="#common"/>
<uistate name="landscape" sections="#common"/>
- <dummydata objectName="noteListView" section="#common" value="0"/>
+ <dummydata objectName="noteListView" section="#common" value="app_list_template5"/>
</metadata>
</hbdocument>
--- a/notes/data/xml/notestodoview.docml Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/data/xml/notestodoview.docml Tue Jul 06 14:14:56 2010 +0300
@@ -1,56 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="0.9">
+<hbdocument version="1.1">
<object name="allNotesAction" type="HbAction">
- <icon iconName="qtg_mono_notes_all" name="icon"/>
+ <icon iconName="qtg_mono_notes_all" name="icon"/>
</object>
<object name="displayCollectionsAction" type="HbAction">
- <icon iconName="qtg_mono_notes_collections" name="icon"/>
+ <icon iconName="qtg_mono_notes_collections" name="icon"/>
</object>
<object name="newTodoAction" type="HbAction">
<icon iconName="qtg_mono_create_event" name="icon"/>
- </object>
+ </object>
<object name="deleteAction" type="HbAction">
<string locid="txt_common_opt_delete" name="text" value="Delete"/>
</object>
<widget name="notesTodoView" type="HbView">
<widget name="notesTodoViewWidget" role="HbView:widget" type="HbWidget">
<widget name="subtitleGroupBox" type="HbGroupBox">
- <string name="heading" value=" "/>
<real name="z" value="1"/>
<bool name="collapsable" value="FALSE"/>
+ <string name="heading" value=" "/>
</widget>
<widget name="todoListView" type="HbListView">
- <widget name="prototype" role="HbListView:prototype" type="HbListViewItem">
- <string name="state" value="normal"/>
- </widget>
+ <widget name="listItemPrototype" role="HbAbstractView:prototype" type="HbListViewItem"/>
<real name="z" value="2"/>
<sizehint height="47.7612un" type="PREFERRED" width="35.8209un"/>
</widget>
+ <widget name="emptyListLabel" type="HbLabel">
+ <real name="z" value="1"/>
+ <string locid="txt_notes_list_no_notes_available" name="plainText" value="No notes available"/> <enums name="textWrapping" value="TextWordWrap"/>
+ <enums name="textWrapping" value="TextWordWrap"/>
+ <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+ <sizehint height="expr(var(hb-param-text-height-primary) )" type="PREFERRED"/>
+ </widget>
<layout type="anchor">
<anchoritem dst="subtitleGroupBox" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
<anchoritem dst="subtitleGroupBox" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
<anchoritem dst="subtitleGroupBox" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
- <anchoritem dst="todoListView" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
- <anchoritem dst="todoListView" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
- <anchoritem dst="todoListView" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="subtitleGroupBox" srcEdge="BOTTOM"/>
+ <anchoritem dst="todoListView" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+ <anchoritem dst="todoListView" dstEdge="TOP" spacing="0un" src="subtitleGroupBox" srcEdge="BOTTOM"/>
+ <anchoritem dst="todoListView" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
<anchoritem dst="todoListView" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+ <anchoritem dst="emptyListLabel" dstEdge="LEFT" spacing="expr(var(hb-param-margin-gene-left) )" src="todoListView" srcEdge="LEFT"/>
+ <anchoritem dst="emptyListLabel" dstEdge="RIGHT" spacing="expr(-var(hb-param-margin-gene-right) )" src="todoListView" srcEdge="RIGHT"/>
+ <anchoritem dst="emptyListLabel" dstEdge="CENTERV" spacing="0un" src="todoListView" srcEdge="CENTERV"/>
</layout>
</widget>
<widget name="viewToolbar" role="HbView:toolBar" type="HbToolBar">
<enums name="orientation" value="Horizontal"/>
- <ref object="allNotesAction" role="HbToolBar:addAction"/>
- <ref object="displayCollectionsAction" role="HbToolBar:addAction"/>
- <ref object="newTodoAction" role="HbToolBar:addAction"/>
+ <ref object="allNotesAction" role="HbWidget:addAction"/>
+ <ref object="displayCollectionsAction" role="HbWidget:addAction"/>
+ <ref object="newTodoAction" role="HbWidget:addAction"/>
</widget>
- <widget name="viewMenu" role="HbView:menu" type="HbMenu">
- <!-- uncomment for multiple delete <ref object="deleteAction" role="HbMenu:addAction"/> -->
- </widget>
+ <widget name="viewMenu" role="HbView:menu" type="HbMenu"/>
<string locid="txt_notes_title_notes" name="title" value="Notes"/>
</widget>
- <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
+ <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
<uistate name="Common ui state" sections="#common"/>
<uistate name="portrait" sections="#common"/>
<uistate name="landscape" sections="#common"/>
- <dummydata objectName="todoListView" section="#common" value="0"/>
+ <dummydata objectName="todoListView" section="#common" value="app_list_template5"/>
</metadata>
</hbdocument>
--- a/notes/notesui/notesappcontroller/src/notesappcontroller.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/notesui/notesappcontroller/src/notesappcontroller.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -38,7 +38,7 @@
mIfImpl(0)
{
// Construct the interface implementation.
- mIfImpl = new NotesAppControllerIfImpl(this, this);
+ mIfImpl = new NotesAppControllerIfImpl(this);
// Construct the model handler.
mNotesModelHandler = new NotesModelHandler(this);
--- a/notes/notesui/notesappcontroller/src/notesappcontrollerifimpl.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/notesui/notesappcontroller/src/notesappcontrollerifimpl.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -38,7 +38,7 @@
*/
NotesAppControllerIfImpl::NotesAppControllerIfImpl(
NotesAppController *controller, QObject *parent)
-:QObject(parent),
+:QObject(controller),
mAppController(controller)
{
// Nothing yet.
--- a/notes/notesui/notesapplication/src/main.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/notesui/notesapplication/src/main.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -17,10 +17,9 @@
// System includes
#include <QScopedPointer>
-#include <QTranslator>
#include <hbapplication.h>
#include <hbmainwindow.h>
-
+#include <hbtranslator.h>
// User includes
#include "notesappcontroller.h"
@@ -42,9 +41,8 @@
window.setViewportUpdateMode(QGraphicsView::MinimalViewportUpdate);
// Load the translation file.
- QTranslator notesViewsTranslator;
- notesViewsTranslator.load("notes",":/translations");
- app.installTranslator(¬esViewsTranslator);
+ HbTranslator notesViewsTranslator("notes");
+ notesViewsTranslator.loadCommon();
// Construct the application controller.
QScopedPointer<NotesAppController> controller(new NotesAppController);
--- a/notes/notesui/noteseditor/data/noteseditor.qrc Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/notesui/noteseditor/data/noteseditor.qrc Tue Jul 06 14:14:56 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></RCC>
\ No newline at end of file
+<!DOCTYPE RCC><RCC version="1.0"> <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
Binary file notes/notesui/noteseditor/data/translations/notes.qm has changed
--- a/notes/notesui/noteseditor/data/translations/notes.ts Wed Jun 23 18:11:28 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,856 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_dataform_editor_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P12</extra-loc-viewid>
- <extra-loc-positionid>formlabel_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_formlabel_val_subject">
- <comment>Default text value for Subject field in a dataform</comment>
- <source>Subject</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_dataform_editor_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P12</extra-loc-viewid>
- <extra-loc-positionid>formlabel_4_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_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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P1</extra-loc-viewid>
- <extra-loc-positionid>menu</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>
- <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_todo">
- <comment>Sub title in To-do Editor</comment>
- <source>To-do</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P8</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_opt_new_note">
- <comment>Option menu item to create new note</comment>
- <source>New note</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P5</extra-loc-viewid>
- <extra-loc-positionid>opt</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_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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_dataform_combobox_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P8</extra-loc-viewid>
- <extra-loc-positionid>setlabel_4_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_created_on_1_2">
- <comment>Secondary text item to mention creation date and time for a task</comment>
- <source>Created on %1 %2</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_1_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_alarm_time">
- <comment>Message dialog header text . Time picker component embedded</comment>
- <source>Alarm time</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P9</extra-loc-viewid>
- <extra-loc-positionid>title</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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P8</extra-loc-viewid>
- <extra-loc-positionid>formlabel_1</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_remove_description">
- <comment>Options menu item to remove description from the To-do editor</comment>
- <source>Remove description</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P12</extra-loc-viewid>
- <extra-loc-positionid>opt</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_alarm_date">
- <comment>Message dialog header text . Date picker component embedded</comment>
- <source>Alarm date</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P9</extra-loc-viewid>
- <extra-loc-positionid>title</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_mark_as_not_done">
- <comment>Item specific menu item to mark a task as not done</comment>
- <source>Mark as not done</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P1</extra-loc-viewid>
- <extra-loc-positionid>menu</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_note_saved">
- <comment>Soft notification dialog info text. This dialog is displayed once the note is modified and saved</comment>
- <source>Note saved</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_notifdialog_pri2</extra-loc-layout_id>
- <extra-loc-viewid>Notes</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_button_new_note">
- <comment>toolbar button text in landscape mode . If user taps on this button, Notes editor is launched to add note</comment>
- <source>New note</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_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_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>
-<message numerus="yes" id="txt_notes_subhead_ln_notes">
- <comment>Sub title for All Notes view</comment>
- <source>%Ln Notes</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P1</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_dblist_description">
- <comment>Primary text label in To-do Viewer</comment>
- <source>Description:</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P11</extra-loc-viewid>
- <extra-loc-positionid>dblist_7</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_subject">
- <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_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>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_notes_opt_add_description">
- <comment>Options menu item to add description field in To-do note editor</comment>
- <source>Add description</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P8</extra-loc-viewid>
- <extra-loc-positionid>opt</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_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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_dataform_combobox_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P8</extra-loc-viewid>
- <extra-loc-positionid>setlabel_4_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_completed_date_val_1">
- <comment>Completed date value (Secondary text ) in To-do viewer</comment>
- <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>
- <extra-loc-positionid>dblist_6_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_opt_discard_changes">
- <comment>Option menu item to discard the changes done in the notes editor</comment>
- <source>Discard changes</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P5</extra-loc-viewid>
- <extra-loc-positionid>opt</extra-loc-positionid>
- <extra-loc-feature>No</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_short_caption_notes">
- <comment>Notes application in application library grid view</comment>
- <source>Notes</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_grid_applications_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes</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_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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P11</extra-loc-viewid>
- <extra-loc-positionid>opt</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_completed_date">
- <comment>Primary text label in To-do viewer</comment>
- <source>Completed date:</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P11</extra-loc-viewid>
- <extra-loc-positionid>dblist_6</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_normal">
- <comment>Priority value in Combo Box used in a dataform</comment>
- <source>Normal</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_dataform_combobox_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P8</extra-loc-viewid>
- <extra-loc-positionid>setlabel_4_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_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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_toolbar_tiny_3</extra-loc-layout_id>
- <extra-loc-viewid>Notes_L4</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_list_favorites">
- <comment>Collections name in the list widget (Left Side)</comment>
- <source>Favorites</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_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>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>
-<message numerus="no" id="txt_notes_menu_remove_from_favorites">
- <comment>Item specific menu item to remove the note from favorites</comment>
- <source>Remove from favorites</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P1</extra-loc-viewid>
- <extra-loc-positionid>menu</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_add_to_calendar">
- <comment>Toolbar button to launch calendar editor and add content in the subject and description field</comment>
- <source>Add to Calendar</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_toolbar_tiny_3</extra-loc-layout_id>
- <extra-loc-viewid>Notes_L4</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_long_caption_notes">
- <comment>Notes application in application library list view</comment>
- <source>Notes</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_list_pri_large_graphic</extra-loc-layout_id>
- <extra-loc-viewid>Notes</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_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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_toolbar_tiny_3</extra-loc-layout_id>
- <extra-loc-viewid>Notes_L4</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_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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P9</extra-loc-viewid>
- <extra-loc-positionid>title</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_todos">
- <comment>Collections name in the list widget (Left Side)</comment>
- <source>To-do's</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_subhead_note">
- <comment>Layout ID Parent. Custom GroupBox. Sub title in Notes editor (Left Side)</comment>
- <source>Note</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>txt_notes_subhead_note</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_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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_notifdialog_pri2</extra-loc-layout_id>
- <extra-loc-viewid>Notes</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_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>%2</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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P4</extra-loc-viewid>
- <extra-loc-positionid>opt</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_remove_from_favorites">
- <comment>Options menu item to remove the note from favorites item</comment>
- <source>Remove from favorites</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P5</extra-loc-viewid>
- <extra-loc-positionid>opt</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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>txt_notes_subhead_new_note</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P4</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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P12</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_title_notes">
- <comment>Title bar text for Notes application+</comment>
- <source>Notes</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_titlebar</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P1</extra-loc-viewid>
- <extra-loc-positionid>title</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_favorite">
- <comment>Options menu item to mark the note as favorite item</comment>
- <source>Mark as favorite</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P4</extra-loc-viewid>
- <extra-loc-positionid>opt</extra-loc-positionid>
- <extra-loc-feature>No</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_tsw_caption_notes">
- <comment>Notes application name in Task Switcher</comment>
- <source>Notes</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>txt_tsw_caption_notes</extra-loc-layout_id>
- <extra-loc-viewid>tsw01</extra-loc-viewid>
- <extra-loc-positionid>caption</extra-loc-positionid>
- <extra-loc-feature>ts</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_notes_subhead_collections">
- <comment>Sub title for Collections view</comment>
- <source>Collections</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P2</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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P8</extra-loc-viewid>
- <extra-loc-positionid>formlabel_3</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_collections">
- <comment>toolbar button text in landscape mode . If user taps on this button, Collections view is displayed</comment>
- <source>Collections</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_button_edit">
- <comment>One of 3 buttons in Toolbar . Toolbar button item to edit the To-do note </comment>
- <source>Edit</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_toolbar_tiny_3</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P11</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_dblist_val_modified_on_1_2">
- <comment>Secondary text item to mention modified date & time for a note</comment>
- <source>Modified on %1 %2</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_2_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_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_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>
-</message>
-<message numerus="no" id="txt_notes_dblist_val_due_on_1">
- <comment>Secondary text item in the list to show due date for a task</comment>
- <source>Due 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_3_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_menu_mark_as_favorite">
- <comment>Item specific menu item to mark a note as favorite </comment>
- <source>Mark as favorite</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P1</extra-loc-viewid>
- <extra-loc-positionid>menu</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_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>
- <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_4_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_opt_mark_as_done">
- <comment>Options menu item to change the non-completed to-do status to completed</comment>
- <source>Mark as done</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P11</extra-loc-viewid>
- <extra-loc-positionid>opt</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_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_setlabel_priority">
- <comment>Label item in Data form</comment>
- <source>Priority</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P8</extra-loc-viewid>
- <extra-loc-positionid>setlabel_4</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>
- <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="yes" id="txt_notes_subhead_todos_ln_pending">
- <comment>Sub title in To-do notes list view</comment>
- <source>To-do's (%Ln Pending )</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P7</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_task_switcher_caption_notes">
- <comment>Notes application name in Task Switcher</comment>
- <source>Notes</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>cell_tport_appsw_pane_t1</extra-loc-layout_id>
- <extra-loc-viewid>Task Switcher</extra-loc-viewid>
- <extra-loc-positionid>caption</extra-loc-positionid>
- <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>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P1</extra-loc-viewid>
- <extra-loc-positionid>menu</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_note_moved_to_todos">
- <comment>If a plain note is marked as To-do note in the list view, the marked item disappears from the current view with a notification dialog </comment>
- <source>Note moved to To-do's</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_notifdialog_pri2</extra-loc-layout_id>
- <extra-loc-viewid>Notes</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_menu_mark_as_done">
- <comment>Item specific menu item to mark a task as completed</comment>
- <source>Mark as done</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P1</extra-loc-viewid>
- <extra-loc-positionid>menu</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">
- <comment>Checkbox label item to enable/disable alarm</comment>
- <source>Alarm</source>
- <translation variants="no" type="unfinished"></translation>
- <extra-loc-layout_id>qtl_dataform_checkbox_sec</extra-loc-layout_id>
- <extra-loc-viewid>Notes_P8</extra-loc-viewid>
- <extra-loc-positionid>formlabel_2</extra-loc-positionid>
- <extra-loc-feature>No</extra-loc-feature>
- <extra-loc-blank>False</extra-loc-blank>
-</message>
-</context>
-</TS>
--- a/notes/notesui/noteseditor/data/xml/notesnoteeditor.docml Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/notesui/noteseditor/data/xml/notesnoteeditor.docml Tue Jul 06 14:14:56 2010 +0300
@@ -52,8 +52,8 @@
</layout>
</widget>
<widget name="viewMenu" role="HbView:menu" type="HbMenu">
+ <ref object="makeFavoriteAction" role="HbMenu:addAction"/>
<ref object="makeAsTodoAction" role="HbMenu:addAction"/>
- <ref object="makeFavoriteAction" role="HbMenu:addAction"/>
</widget>
<widget name="viewToolbar" role="HbView:toolBar" type="HbToolBar">
<enums name="orientation" value="Horizontal"/>
--- a/notes/notesui/noteseditor/inc/noteseditor_p.h Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/notesui/noteseditor/inc/noteseditor_p.h Tue Jul 06 14:14:56 2010 +0300
@@ -31,7 +31,7 @@
// Forward declarations
class QFile;
class QString;
-class QTranslator;
+class HbTranslator;
class HbView;
class AgendaUtil;
class NotesEditor;
@@ -85,7 +85,7 @@
bool mOwnsAgendaUtil;
bool mSaveEntry;
- QPointer<QTranslator> mTranslator;
+ HbTranslator *mTranslator;
ulong mNoteId;
private:
--- a/notes/notesui/noteseditor/noteseditor.pro Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/notesui/noteseditor/noteseditor.pro Tue Jul 06 14:14:56 2010 +0300
@@ -68,5 +68,7 @@
RESOURCES += \
noteseditor.qrc
+# TODO :need to use noteseditor.ts once it is released to platform
+TRANSLATIONS += notes.ts
# End of file --Don't remove this.
--- a/notes/notesui/noteseditor/src/noteseditor.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/notesui/noteseditor/src/noteseditor.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -44,7 +44,7 @@
\param parent QObject pointer.
*/
NotesEditor::NotesEditor(QObject *parent)
-:QObject(parent),d_ptr(new NotesEditorPrivate(0, parent))
+:QObject(parent),d_ptr(new NotesEditorPrivate(0, this))
{
// Nothing yet.
}
@@ -57,7 +57,7 @@
\param parent QObject pointer.
*/
NotesEditor::NotesEditor(AgendaUtil *agendaUtil, QObject *parent)
-:QObject(parent), d_ptr(new NotesEditorPrivate(agendaUtil, parent))
+:QObject(parent), d_ptr(new NotesEditorPrivate(agendaUtil, this))
{
// Nothing yet.
}
--- a/notes/notesui/noteseditor/src/noteseditor_p.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/notesui/noteseditor/src/noteseditor_p.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -18,13 +18,12 @@
// System includes
#include <QDateTime>
-#include <QTranslator>
-#include <HbApplication>
#include <HbInstance>
#include <HbMainWindow>
#include <HbView>
#include <HbNotificationDialog>
#include <HbExtendedLocale>
+#include <HbTranslator>
// User includes
#include "noteseditor.h"
@@ -49,10 +48,14 @@
NotesEditorPrivate::NotesEditorPrivate(AgendaUtil *agendaUtil, QObject *parent)
:QObject(parent),
mSaveEntry(true),
+ mTranslator(0),
mNoteId(0)
{
// First get the q-pointer.
q_ptr = static_cast<NotesEditor *> (parent);
+
+ mTranslator = new HbTranslator("notes");
+ mTranslator->loadCommon();
// Here we check if the agendautil passed by the client is 0. If so, then we
// construct our own.
@@ -69,11 +72,6 @@
mAgendaUtil, SIGNAL(entriesChanged(QList<ulong> )),
this, SLOT(handleEntriesChanged(QList<ulong> )));
-
- mTranslator = new QTranslator;
- int success=mTranslator->load("notes",":/translations");
-
- HbApplication::instance()->installTranslator(mTranslator);
}
/*!
@@ -86,7 +84,6 @@
mAgendaUtil = 0;
}
- HbApplication::instance()->removeTranslator(mTranslator);
if (mTranslator) {
delete mTranslator;
mTranslator = 0;
@@ -565,12 +562,12 @@
if (isTodoEdited()) {
status = mAgendaUtil->updateEntry(mModifiedNote);
mNoteId = mModifiedNote.id();
- if (status) {
- showNotification(
- hbTrId("txt_notes_dpopinfo_todo_note_saved"));
- }
}
}
+ if (status) {
+ showNotification(
+ hbTrId("txt_notes_dpopinfo_todo_note_saved"));
+ }
}
return status;
--- a/notes/notesui/noteseditor/src/notestodoeditorcustomitem.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/notesui/noteseditor/src/notestodoeditorcustomitem.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -181,6 +181,7 @@
mTimePickerDialog = new HbDialog;
mTimePickerDialog->setTimeout(HbDialog::NoTimeout);
mTimePickerDialog->setDismissPolicy(HbDialog::NoDismiss);
+ mTimePickerDialog->setAttribute(Qt::WA_DeleteOnClose, true);
// Set the heading for the dialog.
HbLabel * timeLabel = new HbLabel("Time", mTimePickerDialog);
@@ -221,7 +222,8 @@
mDatePickerDialog = new HbDialog;
mDatePickerDialog->setTimeout(HbDialog::NoTimeout);
mDatePickerDialog->setDismissPolicy(HbDialog::NoDismiss);
-
+ mDatePickerDialog->setAttribute(Qt::WA_DeleteOnClose, true);
+
// Set the heading for the dialog.
HbLabel * timeLabel = new HbLabel("Date", mDatePickerDialog);
mDatePickerDialog->setHeadingWidget(timeLabel);
@@ -274,7 +276,8 @@
mDatePickerDialog = new HbDialog;
mDatePickerDialog->setTimeout(HbDialog::NoTimeout);
mDatePickerDialog->setDismissPolicy(HbDialog::NoDismiss);
-
+ mDatePickerDialog->setAttribute(Qt::WA_DeleteOnClose, true);
+
// Create date picker
HbDateTimePicker *datePicker = new HbDateTimePicker(mDatePickerDialog);
// Set the min/max date for the editor.
--- a/notes/notesui/notesviewmanager/src/notesviewmanager.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/notesui/notesviewmanager/src/notesviewmanager.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -61,10 +61,6 @@
mAgendaUtil = mAppControllerIf.agendaUtil();
- connect(
- mAgendaUtil, SIGNAL(instanceViewCreationCompleted(int)),
- this,SLOT(handleInstanceViewCreationCompleted(int)));
-
// Check the Application Startup reason from Activity Manager
int activityReason = qobject_cast<HbApplication*>(qApp)->activateReason();
@@ -96,6 +92,10 @@
loadNotesMainView();
}
+ connect(
+ mAgendaUtil, SIGNAL(instanceViewCreationCompleted(int)),
+ this,SLOT(handleInstanceViewCreationCompleted(int)));
+
// Delay loading of other views till main view is loaded.
connect(
window, SIGNAL(viewReady()),
@@ -403,5 +403,11 @@
// Update the title for to-do view.
mTodoView->updateTitle();
+
+ // Update the plain notes view.
+ mNoteView->updateNoteView();
+
+ // Update the favorites view.
+ mFavoriteView->updateFavoriteView();
}
// End of file --Don't remove this.
--- a/notes/notesui/notesviews/bwins/notesviewsu.def Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/notesui/notesviews/bwins/notesviewsu.def Tue Jul 06 14:14:56 2010 +0300
@@ -19,4 +19,6 @@
??1NotesTodoView@@UAE@XZ @ 18 NONAME ; NotesTodoView::~NotesTodoView(void)
?setupView@NotesFavoriteView@@QAEXAAVNotesAppControllerIf@@PAVNotesDocLoader@@@Z @ 19 NONAME ; void NotesFavoriteView::setupView(class NotesAppControllerIf &, class NotesDocLoader *)
?captureScreenShot@NotesMainView@@QAEX_N@Z @ 20 NONAME ; void NotesMainView::captureScreenShot(bool)
+ ?updateFavoriteView@NotesFavoriteView@@QAEXXZ @ 21 NONAME ; void NotesFavoriteView::updateFavoriteView(void)
+ ?updateNoteView@NotesNoteView@@QAEXXZ @ 22 NONAME ; void NotesNoteView::updateNoteView(void)
--- a/notes/notesui/notesviews/eabi/notesviewsu.def Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/notesui/notesviews/eabi/notesviewsu.def Tue Jul 06 14:14:56 2010 +0300
@@ -54,4 +54,6 @@
_ZThn8_N19NotesCollectionViewD0Ev @ 53 NONAME
_ZThn8_N19NotesCollectionViewD1Ev @ 54 NONAME
_ZN13NotesMainView17captureScreenShotEb @ 55 NONAME
+ _ZN13NotesNoteView14updateNoteViewEv @ 56 NONAME
+ _ZN17NotesFavoriteView18updateFavoriteViewEv @ 57 NONAME
--- a/notes/notesui/notesviews/inc/notesfavoriteview.h Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/notesui/notesviews/inc/notesfavoriteview.h Tue Jul 06 14:14:56 2010 +0300
@@ -32,6 +32,7 @@
class HbListView;
class HbAction;
class HbAbstractViewItem;
+class HbLabel;
class NotesModel;
class NotesDocLoader;
class AgendaUtil;
@@ -49,6 +50,7 @@
public:
NOTESVIEWS_EXPORT void setupView(
NotesAppControllerIf &controllerIf, NotesDocLoader *docLoader);
+ NOTESVIEWS_EXPORT void updateFavoriteView();
signals:
void deleteEntry(ulong entryId);
@@ -69,7 +71,8 @@
void openNote();
void selectedMenuAction(HbAction *action);
void handleMenuClosed();
-
+ void updateView(ulong id=0);
+
private:
HbListView *mListView;
HbAbstractViewItem *mSelectedItem;
@@ -81,7 +84,9 @@
HbAction *mRemoveFavoriteAction;
HbAction *mMarkTodoAction;
HbAction *mOpenAction;
-
+
+ HbLabel *mEmptyListLabel;
+
AgendaUtil *mAgendaUtil;
NotesAppControllerIf *mAppControllerIf;
--- a/notes/notesui/notesviews/inc/notesmainview.h Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/notesui/notesviews/inc/notesmainview.h Tue Jul 06 14:14:56 2010 +0300
@@ -100,6 +100,7 @@
HbAction *mOpenAction;
HbGroupBox *mSubTitle;
+ HbLabel *mEmptyListLabel;
AgendaUtil *mAgendaUtil;
--- a/notes/notesui/notesviews/inc/notesnoteview.h Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/notesui/notesviews/inc/notesnoteview.h Tue Jul 06 14:14:56 2010 +0300
@@ -32,6 +32,7 @@
class HbListView;
class HbAction;
class HbAbstractViewItem;
+class HbLabel;
class NotesModel;
class NotesDocLoader;
class AgendaUtil;
@@ -49,6 +50,8 @@
public:
NOTESVIEWS_EXPORT void setupView(
NotesAppControllerIf &controllerIf, NotesDocLoader *docLoader);
+ NOTESVIEWS_EXPORT void updateNoteView();
+
signals:
void deleteEntry(ulong entryId);
@@ -69,6 +72,7 @@
void openNote();
void selectedMenuAction(HbAction *action);
void handleMenuClosed();
+ void updateView(ulong id=0);
private:
HbListView *mListView;
@@ -83,6 +87,8 @@
HbAction *mMarkTodoAction;
HbAction *mOpenAction;
+ HbLabel *mEmptyListLabel;
+
AgendaUtil *mAgendaUtil;
NotesAppControllerIf *mAppControllerIf;
--- a/notes/notesui/notesviews/inc/notestodoview.h Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/notesui/notesviews/inc/notestodoview.h Tue Jul 06 14:14:56 2010 +0300
@@ -32,6 +32,7 @@
class HbAction;
class HbAbstractViewItem;
class HbGroupBox;
+class HbLabel;
class NotesModel;
class NotesDocLoader;
class AgendaUtil;
@@ -88,7 +89,8 @@
HbAction *mOpenAction;
HbGroupBox *mSubTitle;
-
+ HbLabel *mEmptyListLabel;
+
AgendaUtil *mAgendaUtil;
NotesAppControllerIf *mAppControllerIf;
--- a/notes/notesui/notesviews/src/notescollectionview.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/notesui/notesviews/src/notescollectionview.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -252,6 +252,8 @@
// Cleanup.
mNotesEditor->deleteLater();
+
+ mAppControllerIf->switchToView(NotesNamespace::NotesMainViewId);
}
/*!
@@ -334,14 +336,18 @@
Q_UNUSED(index)
Q_UNUSED(start)
Q_UNUSED(end)
-
- // Update the count of notes in the view.
- 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);
+
+ // Check model is set for mListView before update
+ if( mListView->model())
+ {
+ // Update the count of notes in the view.
+ 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);
+ }
}
/*!
--- a/notes/notesui/notesviews/src/notesfavoriteview.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/notesui/notesviews/src/notesfavoriteview.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -118,6 +118,10 @@
this,
SLOT(handleItemLongPressed(HbAbstractViewItem *, const QPointF &)));
+ // Get the empty list label.
+ mEmptyListLabel = static_cast<HbLabel *> (
+ mDocLoader->findWidget("emptyListLabel"));
+
// Get the toolbar/menu actions.
mAddNoteAction = static_cast<HbAction *> (
mDocLoader->findObject("newNoteAction"));
@@ -133,8 +137,7 @@
mViewCollectionAction = static_cast<HbAction *> (
mDocLoader->findObject("displayCollectionsAction"));
- mViewCollectionAction->setCheckable(true);
- mViewCollectionAction->setChecked(true);
+
connect(
mViewCollectionAction, SIGNAL(changed()),
this, SLOT(handleActionStateChanged()));
@@ -149,11 +152,29 @@
window, SIGNAL(orientationChanged(Qt::Orientation)),
this, SLOT(handleOrientationChanged(Qt::Orientation)));
+ connect(
+ mAgendaUtil, SIGNAL(entryAdded(ulong)),
+ this,SLOT(updateView(ulong)));
+ connect(
+ mAgendaUtil, SIGNAL(entryDeleted(ulong)),
+ this,SLOT(updateView(ulong)));
+ connect(
+ mAgendaUtil, SIGNAL(entryUpdated(ulong)),
+ this, SLOT(updateView(ulong)));
+
// Set the graphics size for the icons.
HbListViewItem *prototype = mListView->listItemPrototype();
prototype->setGraphicsSize(HbListViewItem::SmallIcon);
}
+/*
+ Updates the favorite view either to show notes or emptyListLabel.
+ */
+void NotesFavoriteView::updateFavoriteView()
+{
+ updateView();
+}
+
/*!
Slot which gets called when `+ New note' action is triggered from the view
toolbar. This is responsible for launching the editor to create a new note.
@@ -458,5 +479,23 @@
{
mIsLongTop = false;
}
+
+/*!
+ Handles the visibility of empty list label.
+ */
+void NotesFavoriteView::updateView(ulong id)
+{
+ Q_UNUSED(id)
+
+ // Get the numbers of favorite notes.
+ if (0 >= mListView->model()->rowCount()) {
+ mEmptyListLabel->show();
+ mListView->hide();
+ } else {
+ mEmptyListLabel->hide();
+ mListView->show();
+ }
+}
+
// End of file --Don't remove this.
--- a/notes/notesui/notesviews/src/notesmainview.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/notesui/notesviews/src/notesmainview.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -126,10 +126,12 @@
mNotesModel, SIGNAL(rowAdded(QModelIndex)),
this, SLOT(scrollTo(QModelIndex)));
+ // Get the empty list label.
+ mEmptyListLabel = static_cast<HbLabel *> (
+ mDocLoader->findWidget("emptyListLabel"));
+ mEmptyListLabel->hide();
+
// Get the view heading label
-/* mViewHeading = static_cast<HbLabel *> (
- mDocLoader->findWidget("viewHeading"));*/
-
mSubTitle = static_cast<HbGroupBox *>(
mDocLoader->findWidget("viewHeading"));
@@ -540,7 +542,15 @@
(AgendaUtil::IncludeNotes
| AgendaUtil::IncludeCompletedTodos
| AgendaUtil::IncludeIncompletedTodos));
- int c= entries.count();
+
+ if (0 >= entries.count()) {
+ mEmptyListLabel->show();
+ mListView->hide();
+ } else {
+ mEmptyListLabel->hide();
+ mListView->show();
+ }
+
mSubTitle->setHeading(
hbTrId("txt_notes_subhead_ln_notes",entries.count()));
}
--- a/notes/notesui/notesviews/src/notesnoteview.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/notesui/notesviews/src/notesnoteview.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -27,6 +27,7 @@
#include <HbListViewItem>
#include <HbInstance>
#include <HbNotificationDialog>
+#include <HbLabel>
// User includes
#include "notesnoteview.h"
@@ -99,8 +100,9 @@
subModel->setSourceModel(mProxyModel);
// Get the list object from the document and update the model.
- mListView = static_cast<HbListView *>
- (mDocLoader->findWidget("noteListView"));
+ mListView = static_cast<HbListView *> (
+ mDocLoader->findWidget("noteListView"));
+
// Update the list view model.
mListView->setModel(subModel);
// Setup the operations that can be done with a list view.
@@ -113,6 +115,10 @@
this,
SLOT(handleItemLongPressed(HbAbstractViewItem *, const QPointF &)));
+ // Get the empty list label.
+ mEmptyListLabel = static_cast<HbLabel *> (
+ mDocLoader->findWidget("emptyListLabel"));
+
// Get the toolbar/menu actions.
mAddNoteAction = static_cast<HbAction *> (
mDocLoader->findObject("newNoteAction"));
@@ -128,8 +134,7 @@
mViewCollectionAction = static_cast<HbAction *> (
mDocLoader->findObject("displayCollectionsAction"));
- mViewCollectionAction->setCheckable(true);
- mViewCollectionAction->setChecked(true);
+
connect(
mViewCollectionAction, SIGNAL(changed()),
this, SLOT(handleActionStateChanged()));
@@ -144,11 +149,31 @@
window, SIGNAL(orientationChanged(Qt::Orientation)),
this, SLOT(handleOrientationChanged(Qt::Orientation)));
+
+ connect(
+ mAgendaUtil, SIGNAL(entryAdded(ulong)),
+ this,SLOT(updateView(ulong)));
+ connect(
+ mAgendaUtil, SIGNAL(entryDeleted(ulong)),
+ this,SLOT(updateView(ulong)));
+ connect(
+ mAgendaUtil, SIGNAL(entryUpdated(ulong)),
+ this, SLOT(updateView(ulong)));
+
+
// Set the graphics size for the icons.
HbListViewItem *prototype = mListView->listItemPrototype();
prototype->setGraphicsSize(HbListViewItem::SmallIcon);
}
+/*
+ Updates the note view either to show notes or emptyListLabel.
+ */
+void NotesNoteView::updateNoteView()
+{
+ updateView();
+}
+
/*!
Opens the note editor to create a new note.
*/
@@ -457,5 +482,23 @@
{
mIsLongTop = false;
}
+
+/*!
+ Handles the visibility of empty list label.
+ */
+void NotesNoteView::updateView(ulong id)
+{
+ Q_UNUSED(id)
+
+ // Get the numbers of notes.
+ if (0 >= mListView->model()->rowCount()) {
+ mEmptyListLabel->show();
+ mListView->hide();
+ } else {
+ mEmptyListLabel->hide();
+ mListView->show();
+ }
+}
+
// End of file --Don't remove this.
--- a/notes/notesui/notesviews/src/notestodoview.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/notesui/notesviews/src/notestodoview.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -115,7 +115,11 @@
SIGNAL(longPressed(HbAbstractViewItem *, const QPointF &)),
this,
SLOT(handleItemLongPressed(HbAbstractViewItem *, const QPointF &)));
-
+
+ // Get the empty list string.
+ mEmptyListLabel = static_cast<HbLabel *> (
+ mDocLoader->findWidget("emptyListLabel"));
+
// Get the toolbar/menu actions.
mAddTodoAction = static_cast<HbAction *> (
mDocLoader->findObject("newTodoAction"));
@@ -131,8 +135,7 @@
mViewCollectionAction = static_cast<HbAction *> (
mDocLoader->findObject("displayCollectionsAction"));
- mViewCollectionAction->setCheckable(true);
- mViewCollectionAction->setChecked(true);
+
connect(
mViewCollectionAction, SIGNAL(changed()),
this, SLOT(handleActionStateChanged()));
@@ -439,6 +442,14 @@
AgendaUtil::IncludeIncompletedTodos);
mSubTitle->setHeading(
hbTrId("txt_notes_subhead_todos_ln_pending",entries.count()));
+
+ if (0 >= entries.count()) {
+ mEmptyListLabel->show();
+ mListView->hide();
+ } else {
+ mEmptyListLabel->hide();
+ mListView->show();
+ }
}
/*
--- a/organizer_pub/calendar_interim_utils2_api/tsrc/bc/calendar/group/BCTestCalendar2.mmp Wed Jun 23 18:11:28 2010 +0300
+++ b/organizer_pub/calendar_interim_utils2_api/tsrc/bc/calendar/group/BCTestCalendar2.mmp Tue Jul 06 14:14:56 2010 +0300
@@ -43,8 +43,7 @@
#if defined(__S60_)
OS_LAYER_SYSTEMINCLUDE
#else // __S60_ not defined
- SYSTEMINCLUDE /epoc32/include
- SYSTEMINCLUDE /epoc32/include/internal
+ SYSTEMINCLUDE /epoc32/include
#endif // __S60_
SOURCEPATH ../src
@@ -54,20 +53,19 @@
#if defined(__S60_)
OS_LAYER_SYSTEMINCLUDE
#else // __S60_ not defined
- SYSTEMINCLUDE /epoc32/include
- SYSTEMINCLUDE /epoc32/include/internal
+ SYSTEMINCLUDE /epoc32/include
#endif // __S60_
SOURCEPATH ../src
#endif // SBSV2
+APP_LAYER_SYSTEMINCLUDE
SYSTEMINCLUDE /epoc32/include
SYSTEMINCLUDE /epoc32/include/middleware
SYSTEMINCLUDE /epoc32/include/domain/middleware
SYSTEMINCLUDE /epoc32/include/osextensions
SYSTEMINCLUDE /epoc32/include/domain/osextensions
SYSTEMINCLUDE /epoc32/include/applications
-SYSTEMINCLUDE /epoc32/include/internal
SOURCE BCTestCalendar2.cpp
SOURCE BCTestCalendar2Blocks.cpp
--- a/pimappservices/calendar/client/src/calclient.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/pimappservices/calendar/client/src/calclient.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -1806,11 +1806,18 @@
{
if (type == CCalEntry::ETodo)
{
- changeItem.iEntryType = MCalChangeCallBack2::EChangeEntryTodo;
+ changeItem.iEntryType =
+ MCalChangeCallBack2::EChangeEntryTodo;
+ }
+ else if (type == CCalEntry::ENote)
+ {
+ changeItem.iEntryType =
+ MCalChangeCallBack2::EChangeEntryNote;
}
else
{
- changeItem.iEntryType = MCalChangeCallBack2::EChangeEntryEvent;
+ changeItem.iEntryType =
+ MCalChangeCallBack2::EChangeEntryEvent;
}
}
aChangeItems.AppendL(changeItem);
--- a/pimappservices/calendar/inc/calchangecallback.h Wed Jun 23 18:11:28 2010 +0300
+++ b/pimappservices/calendar/inc/calchangecallback.h Tue Jul 06 14:14:56 2010 +0300
@@ -145,7 +145,9 @@
/** Entry type is event. */
EChangeEntryEvent,
/** All entry types. */
- EChangeEntryAll
+ EChangeEntryAll,
+ /** Entry type is note */
+ EChangeEntryNote
};
/**
--- a/pimappservices/calendar/server/src/agssess.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/pimappservices/calendar/server/src/agssess.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -142,7 +142,24 @@
{
return EFalse;
}
-
+
+ // Check for the requested entry type and the change type.
+ // Don't notify clients which are listening for event and
+ // to-do notifictaions when note event is modified.
+ if ( ((iEntryType == MCalChangeCallBack2::EChangeEntryEvent) ||
+ (iEntryType == MCalChangeCallBack2::EChangeEntryTodo)) &&
+ (aChange.iEntryType == CCalEntry::ENote))
+ {
+ return EFalse;
+ }
+
+ // Notify clients which are listening for event type note modifications.
+ if (iEntryType == MCalChangeCallBack2::EChangeEntryNote &&
+ aChange.iEntryType == CCalEntry::ENote)
+ {
+ return ETrue;
+ }
+
// Check the entry is within the time range specified by the filter
// aChange.iRepeatRule gives the repeat data for the newly stored entry. If this operation is an update,
// then aChange.iOriginalRepeatRule gives the repeat data for the old entry.