calendarui/caleneditor/src/caleneditor.cpp
changeset 51 0b38fc5b94c6
parent 45 b6db4fd4947b
child 55 2c54b51f39c4
equal deleted inserted replaced
46:ecd7b9840282 51:0b38fc5b94c6
    23 #include <agendaentry.h>
    23 #include <agendaentry.h>
    24 #include <agendautil.h>
    24 #include <agendautil.h>
    25 
    25 
    26 #include "caleneditor.h"
    26 #include "caleneditor.h"
    27 #include "caleneditor_p.h"
    27 #include "caleneditor_p.h"
       
    28 #include "OstTraceDefinitions.h"
       
    29 #ifdef OST_TRACE_COMPILER_IN_USE
       
    30 #include "caleneditorTraces.h"
       
    31 #endif
    28 
    32 
    29 /*!
    33 /*!
    30 	\class CalenEditor
    34 	\class CalenEditor
    31  */
    35  */
    32 /*!
    36 /*!
    35 	\param parent HbView pointer.
    39 	\param parent HbView pointer.
    36  */
    40  */
    37 CalenEditor::CalenEditor(QObject *parent)
    41 CalenEditor::CalenEditor(QObject *parent)
    38 :QObject(parent),d_ptr(new CalenEditorPrivate(0, this))
    42 :QObject(parent),d_ptr(new CalenEditorPrivate(0, this))
    39 {
    43 {
       
    44 	OstTraceFunctionEntry0( CALENEDITOR_CALENEDITOR_ENTRY );
    40 	
    45 	
       
    46 	OstTraceFunctionExit0( CALENEDITOR_CALENEDITOR_EXIT );
    41 }
    47 }
    42 
    48 
    43 /*!
    49 /*!
    44 	Constructor.
    50 	Constructor.
    45 
    51 
    47 	\param parent HbView pointer.
    53 	\param parent HbView pointer.
    48  */
    54  */
    49 CalenEditor::CalenEditor(AgendaUtil *agendaUtil, QObject *parent)
    55 CalenEditor::CalenEditor(AgendaUtil *agendaUtil, QObject *parent)
    50 :QObject(parent), d_ptr(new CalenEditorPrivate(agendaUtil, this))
    56 :QObject(parent), d_ptr(new CalenEditorPrivate(agendaUtil, this))
    51 {
    57 {
       
    58 	OstTraceFunctionEntry0( DUP1_CALENEDITOR_CALENEDITOR_ENTRY );
    52 	
    59 	
       
    60 	OstTraceFunctionExit0( DUP1_CALENEDITOR_CALENEDITOR_EXIT );
    53 }
    61 }
    54 
    62 
    55 /*!
    63 /*!
    56 	Destructor.
    64 	Destructor.
    57  */
    65  */
    58 CalenEditor::~CalenEditor()
    66 CalenEditor::~CalenEditor()
    59 {
    67 {
       
    68 	OstTraceFunctionEntry0( DUP2_CALENEDITOR_CALENEDITOR_ENTRY );
    60 	if (d_ptr) {
    69 	if (d_ptr) {
    61 		delete d_ptr;
    70 		delete d_ptr;
    62 	}
    71 	}
       
    72 	OstTraceFunctionExit0( DUP2_CALENEDITOR_CALENEDITOR_EXIT );
    63 }
    73 }
    64 
    74 
    65 /*!
    75 /*!
    66 	Shows the caleneditor by parsing a .vcs file which will be edited.
    76 	Shows the caleneditor by parsing a .vcs file which will be edited.
    67 	\param handle reference to QFile handle.
    77 	\param handle reference to QFile handle.
    68 	\param launchCalendar bool to tell whether calendar has to be launched after 
    78 	\param launchCalendar bool to tell whether calendar has to be launched after 
    69 	 coming back from editor
    79 	 coming back from editor
    70  */
    80  */
    71 void CalenEditor::edit(const QFile &handle, bool launchCalendar)
    81 void CalenEditor::edit(const QFile &handle, bool launchCalendar)
    72 {
    82 {
       
    83 	OstTraceFunctionEntry0( CALENEDITOR_EDIT_ENTRY );
    73 	d_ptr->edit(handle, launchCalendar);
    84 	d_ptr->edit(handle, launchCalendar);
       
    85 	OstTraceFunctionExit0( CALENEDITOR_EDIT_EXIT );
    74 }
    86 }
    75 
    87 
    76 /*!
    88 /*!
    77 	Shows the caleneditor, by parsing an AgendaEntry.
    89 	Shows the caleneditor, by parsing an AgendaEntry.
    78 	\param entry An object of AgendaEntry.
    90 	\param entry An object of AgendaEntry.
    79 	\param launchCalendar bool to tell whether calendar has to be launched after 
    91 	\param launchCalendar bool to tell whether calendar has to be launched after 
    80 	 coming back from editor
    92 	 coming back from editor
    81  */
    93  */
    82 void CalenEditor::edit(AgendaEntry entry, bool launchCalendar)
    94 void CalenEditor::edit(AgendaEntry entry, bool launchCalendar)
    83 {
    95 {
       
    96 	OstTraceFunctionEntry0( DUP1_CALENEDITOR_EDIT_ENTRY );
    84 	if(entry.isNull()) {
    97 	if(entry.isNull()) {
       
    98 		OstTraceFunctionExit0( DUP1_CALENEDITOR_EDIT_EXIT );
    85 		return;
    99 		return;
    86 	}
   100 	}
    87 	d_ptr->edit(entry, launchCalendar);
   101 	d_ptr->edit(entry, launchCalendar);
       
   102 	OstTraceFunctionExit0( DUP2_CALENEDITOR_EDIT_EXIT );
    88 }
   103 }
    89 
   104 
    90 /*!
   105 /*!
    91 	Shows the caleneditor, by using the entry id provided.
   106 	Shows the caleneditor, by using the entry id provided.
    92 	\param id entry id.
   107 	\param id entry id.
    93  */
   108  */
    94 void CalenEditor::edit(ulong id, bool launchCalendar)
   109 void CalenEditor::edit(ulong id, bool launchCalendar)
    95 {
   110 {
       
   111 	OstTraceFunctionEntry0( DUP2_CALENEDITOR_EDIT_ENTRY );
    96 	d_ptr->edit(id, launchCalendar);
   112 	d_ptr->edit(id, launchCalendar);
       
   113 	OstTraceFunctionExit0( DUP3_CALENEDITOR_EDIT_EXIT );
    97 }
   114 }
    98 
   115 
    99 /*!
   116 /*!
   100 	Creates a new entry based on the create type.It launches the
   117 	Creates a new entry based on the create type.It launches the
   101 	editor for editing
   118 	editor for editing
   105 	\param type type of the editor to be shown for creating new entry.
   122 	\param type type of the editor to be shown for creating new entry.
   106  */
   123  */
   107 void CalenEditor::create(QDateTime newEntryDateTime, bool launchCalendar, 
   124 void CalenEditor::create(QDateTime newEntryDateTime, bool launchCalendar, 
   108                          CalenEditor::CreateType type)
   125                          CalenEditor::CreateType type)
   109 {
   126 {
       
   127 	OstTraceFunctionEntry0( CALENEDITOR_CREATE_ENTRY );
   110 	d_ptr->create(type, newEntryDateTime, launchCalendar);
   128 	d_ptr->create(type, newEntryDateTime, launchCalendar);
       
   129 	OstTraceFunctionExit0( CALENEDITOR_CREATE_EXIT );
   111 }
   130 }
   112 
   131 
   113 /*!
   132 /*!
   114 	Creates a new entry based on the create type by copying the
   133 	Creates a new entry based on the create type by copying the
   115 	details of passed entry.It launches the editor for editing
   134 	details of passed entry.It launches the editor for editing
   119 	\param type type of the editor to be shown for creating new entry.
   138 	\param type type of the editor to be shown for creating new entry.
   120  */
   139  */
   121 void CalenEditor::create(AgendaEntry entry, bool launchCalendar, 
   140 void CalenEditor::create(AgendaEntry entry, bool launchCalendar, 
   122                          CalenEditor::CreateType type)
   141                          CalenEditor::CreateType type)
   123 {
   142 {
       
   143 	OstTraceFunctionEntry0( DUP1_CALENEDITOR_CREATE_ENTRY );
   124 	if(entry.isNull()) {
   144 	if(entry.isNull()) {
       
   145 		OstTraceFunctionExit0( DUP1_CALENEDITOR_CREATE_EXIT );
   125 		return;
   146 		return;
   126 	}
   147 	}
   127 	d_ptr->create(type, entry, launchCalendar);
   148 	d_ptr->create(type, entry, launchCalendar);
       
   149 	OstTraceFunctionExit0( DUP2_CALENEDITOR_CREATE_EXIT );
   128 }
   150 }
   129 
   151 
   130 // End of file	--Don't remove this.
   152 // End of file	--Don't remove this.