TimeTracker/Documentation/source/Plugin_Time_Tracker.TimeTracker.TimeTrackEntry.html

branch
eric7
changeset 98
693e42176007
parent 95
7449695cf655
child 106
6deb942739dc
--- a/TimeTracker/Documentation/source/Plugin_Time_Tracker.TimeTracker.TimeTrackEntry.html	Thu Jun 03 18:02:18 2021 +0200
+++ b/TimeTracker/Documentation/source/Plugin_Time_Tracker.TimeTracker.TimeTrackEntry.html	Fri Jun 04 16:40:54 2021 +0200
@@ -93,8 +93,8 @@
 <td>Public method to continue the entry.</td>
 </tr>
 <tr>
-<td><a href="#TimeTrackEntry.fromString">fromString</a></td>
-<td>Public method to populate the entry from the given string.</td>
+<td><a href="#TimeTrackEntry.fromDict">fromDict</a></td>
+<td>Public method to populate the time track entry from a dictionary.</td>
 </tr>
 <tr>
 <td><a href="#TimeTrackEntry.getComment">getComment</a></td>
@@ -161,8 +161,8 @@
 <td>Public method to stop this entry.</td>
 </tr>
 <tr>
-<td><a href="#TimeTrackEntry.toString">toString</a></td>
-<td>Public method to get a string representation of the entry.</td>
+<td><a href="#TimeTrackEntry.toDict">toDict</a></td>
+<td>Public method to convert the time track entry into a dictionary.</td>
 </tr>
 </table>
 <h3>Static Methods</h3>
@@ -180,9 +180,9 @@
 </p>
 <dl>
 
-<dt><i>plugin</i></dt>
+<dt><i>plugin</i> (TimeTrackerPlugin)</dt>
 <dd>
-reference to the plugin object (TimeTrackerPlugin)
+reference to the plugin object
 </dd>
 </dl>
 <a NAME="TimeTrackEntry.__calculateDuration" ID="TimeTrackEntry.__calculateDuration"></a>
@@ -194,19 +194,25 @@
 </p>
 <dl>
 
-<dt><i>start</i></dt>
+<dt><i>start</i> (QDateTime)</dt>
 <dd>
-start date and time (QDateTime)
+start date and time
 </dd>
-<dt><i>stop</i></dt>
+<dt><i>stop</i> (QDateTime)</dt>
 <dd>
-end date and time (QDateTime)
+end date and time
 </dd>
 </dl>
 <dl>
 <dt>Return:</dt>
 <dd>
-duration in minutes (int)
+duration in minutes
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+int
 </dd>
 </dl>
 <a NAME="TimeTrackEntry.__currentDateTime" ID="TimeTrackEntry.__currentDateTime"></a>
@@ -219,7 +225,13 @@
 <dl>
 <dt>Return:</dt>
 <dd>
-current date and time (QDateTime)
+current date and time
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+QDateTime
 </dd>
 </dl>
 <a NAME="TimeTrackEntry.__lt__" ID="TimeTrackEntry.__lt__"></a>
@@ -231,15 +243,21 @@
 </p>
 <dl>
 
-<dt><i>other</i></dt>
+<dt><i>other</i> (TimeTrackEntry)</dt>
 <dd>
-reference to the other object (TimeTrackEntry)
+reference to the other object
 </dd>
 </dl>
 <dl>
 <dt>Return:</dt>
 <dd>
-flag indicating that self is less than other (boolean)
+flag indicating that self is less than other
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+bool
 </dd>
 </dl>
 <a NAME="TimeTrackEntry.addDuration" ID="TimeTrackEntry.addDuration"></a>
@@ -251,10 +269,10 @@
 </p>
 <dl>
 
-<dt><i>duration</i></dt>
+<dt><i>duration</i> (int)</dt>
 <dd>
-duration to be added in minutes (integer). Negative
-            values are ignored.
+duration to be added in minutes. Negative values are
+            ignored.
 </dd>
 </dl>
 <a NAME="TimeTrackEntry.continue_" ID="TimeTrackEntry.continue_"></a>
@@ -264,24 +282,30 @@
 <p>
         Public method to continue the entry.
 </p>
-<a NAME="TimeTrackEntry.fromString" ID="TimeTrackEntry.fromString"></a>
-<h4>TimeTrackEntry.fromString</h4>
-<b>fromString</b>(<i>line</i>)
+<a NAME="TimeTrackEntry.fromDict" ID="TimeTrackEntry.fromDict"></a>
+<h4>TimeTrackEntry.fromDict</h4>
+<b>fromDict</b>(<i>data</i>)
 
 <p>
-        Public method to populate the entry from the given string.
+        Public method to populate the time track entry from a dictionary.
 </p>
 <dl>
 
-<dt><i>line</i></dt>
+<dt><i>data</i> (dict)</dt>
 <dd>
-stringified entry data as generated by toString() (string)
+dictionary containing the time track entry data
 </dd>
 </dl>
 <dl>
 <dt>Return:</dt>
 <dd>
-ID of the tracker entry; -1 indicates an error (integer)
+ID of the tracker entry; -1 indicates an error
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+int
 </dd>
 </dl>
 <a NAME="TimeTrackEntry.getComment" ID="TimeTrackEntry.getComment"></a>
@@ -294,7 +318,13 @@
 <dl>
 <dt>Return:</dt>
 <dd>
-comment (string)
+comment
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+str
 </dd>
 </dl>
 <a NAME="TimeTrackEntry.getDuration" ID="TimeTrackEntry.getDuration"></a>
@@ -307,7 +337,13 @@
 <dl>
 <dt>Return:</dt>
 <dd>
-duration (integer)
+duration
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+int
 </dd>
 </dl>
 <a NAME="TimeTrackEntry.getEntryData" ID="TimeTrackEntry.getEntryData"></a>
@@ -320,9 +356,17 @@
 <dl>
 <dt>Return:</dt>
 <dd>
-entry data as a tuple of start date (string), start time
-            (string), duration (integer), task (string), comment (string)
-            and flag indicating a paused state (boolean)
+entry data as a dictionary with keys 'id', 'paused',
+            'start_date', 'start_time', 'duration', 'task' and 'comment'
+            containing the entry ID, a flag indicating a paused
+            state, the start date as a string, the start time as a string,
+            the duration, the task and a comment
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+dict
 </dd>
 </dl>
 <a NAME="TimeTrackEntry.getID" ID="TimeTrackEntry.getID"></a>
@@ -335,7 +379,13 @@
 <dl>
 <dt>Return:</dt>
 <dd>
-ID of the entry (integer)
+ID of the entry
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+int
 </dd>
 </dl>
 <a NAME="TimeTrackEntry.getStartDateTime" ID="TimeTrackEntry.getStartDateTime"></a>
@@ -348,7 +398,13 @@
 <dl>
 <dt>Return:</dt>
 <dd>
-start date and time (QDateTime)
+start date and time
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+QDateTime
 </dd>
 </dl>
 <a NAME="TimeTrackEntry.getTask" ID="TimeTrackEntry.getTask"></a>
@@ -361,7 +417,13 @@
 <dl>
 <dt>Return:</dt>
 <dd>
-task description (string)
+task description
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+str
 </dd>
 </dl>
 <a NAME="TimeTrackEntry.isPaused" ID="TimeTrackEntry.isPaused"></a>
@@ -374,7 +436,13 @@
 <dl>
 <dt>Return:</dt>
 <dd>
-flag indicating a paused state (boolean)
+flag indicating a paused state
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+bool
 </dd>
 </dl>
 <a NAME="TimeTrackEntry.isValid" ID="TimeTrackEntry.isValid"></a>
@@ -387,7 +455,13 @@
 <dl>
 <dt>Return:</dt>
 <dd>
-validity of the entry (boolean)
+validity of the entry
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+bool
 </dd>
 </dl>
 <a NAME="TimeTrackEntry.pause" ID="TimeTrackEntry.pause"></a>
@@ -406,9 +480,9 @@
 </p>
 <dl>
 
-<dt><i>comment</i></dt>
+<dt><i>comment</i> (str)</dt>
 <dd>
-comment to set (string)
+comment to set
 </dd>
 </dl>
 <a NAME="TimeTrackEntry.setDuration" ID="TimeTrackEntry.setDuration"></a>
@@ -420,9 +494,9 @@
 </p>
 <dl>
 
-<dt><i>duration</i></dt>
+<dt><i>duration</i> (int)</dt>
 <dd>
-duration in minutes (integer)
+duration in minutes
 </dd>
 </dl>
 <a NAME="TimeTrackEntry.setID" ID="TimeTrackEntry.setID"></a>
@@ -434,9 +508,9 @@
 </p>
 <dl>
 
-<dt><i>eid</i></dt>
+<dt><i>eid</i> (int)</dt>
 <dd>
-ID for the entry (integer)
+ID for the entry
 </dd>
 </dl>
 <a NAME="TimeTrackEntry.setStartDateTime" ID="TimeTrackEntry.setStartDateTime"></a>
@@ -448,9 +522,9 @@
 </p>
 <dl>
 
-<dt><i>startDateTime</i></dt>
+<dt><i>startDateTime</i> (QDateTime)</dt>
 <dd>
-start date and time (QDateTime)
+start date and time
 </dd>
 </dl>
 <a NAME="TimeTrackEntry.setTask" ID="TimeTrackEntry.setTask"></a>
@@ -462,9 +536,9 @@
 </p>
 <dl>
 
-<dt><i>description</i></dt>
+<dt><i>description</i> (str)</dt>
 <dd>
-task description (string)
+task description
 </dd>
 </dl>
 <a NAME="TimeTrackEntry.start" ID="TimeTrackEntry.start"></a>
@@ -481,17 +555,23 @@
 <p>
         Public method to stop this entry.
 </p>
-<a NAME="TimeTrackEntry.toString" ID="TimeTrackEntry.toString"></a>
-<h4>TimeTrackEntry.toString</h4>
-<b>toString</b>(<i></i>)
+<a NAME="TimeTrackEntry.toDict" ID="TimeTrackEntry.toDict"></a>
+<h4>TimeTrackEntry.toDict</h4>
+<b>toDict</b>(<i></i>)
 
 <p>
-        Public method to get a string representation of the entry.
+        Public method to convert the time track entry into a dictionary.
 </p>
 <dl>
 <dt>Return:</dt>
 <dd>
-string representation of the entry (string)
+dictionary containing the time track entry data
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+dict
 </dd>
 </dl>
 <div align="right"><a href="#top">Up</a></div>

eric ide

mercurial