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

Sat, 12 Jul 2014 16:29:25 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 12 Jul 2014 16:29:25 +0200
changeset 51
d0afa82c3deb
parent 42
37049a04b8fa
child 69
021ac1e44e32
permissions
-rw-r--r--

Ported to PyQt5 and eric6.

<!DOCTYPE html>
<html><head>
<title>Plugin_Time_Tracker.TimeTracker.TimeTracker</title>
<meta charset="UTF-8">
<style>
body {
    background: #EDECE6;
    margin: 0em 1em 10em 1em;
    color: black;
}

h1 { color: white; background: #85774A; }
h2 { color: white; background: #85774A; }
h3 { color: white; background: #9D936E; }
h4 { color: white; background: #9D936E; }
    
a { color: #BA6D36; }

</style>
</head>
<body><a NAME="top" ID="top"></a>
<h1>Plugin_Time_Tracker.TimeTracker.TimeTracker</h1>
<p>
Module implementing the time tracker object.
</p>
<h3>Global Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Classes</h3>
<table>
<tr>
<td><a href="#TimeTracker">TimeTracker</a></td>
<td>Class implementing the time tracker object.</td>
</tr>
</table>
<h3>Functions</h3>
<table>
<tr><td>None</td></tr>
</table>
<hr /><hr />
<a NAME="TimeTracker" ID="TimeTracker"></a>
<h2>TimeTracker</h2>
<p>
    Class implementing the time tracker object.
</p>
<h3>Derived from</h3>
QObject
<h3>Class Attributes</h3>
<table>
<tr><td>FileName</td></tr>
</table>
<h3>Class Methods</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#TimeTracker.__init__">TimeTracker</a></td>
<td>Constructor</td>
</tr><tr>
<td><a href="#TimeTracker.__activateWidget">__activateWidget</a></td>
<td>Private slot to handle the activation of the project browser.</td>
</tr><tr>
<td><a href="#TimeTracker.__initialize">__initialize</a></td>
<td>Private slot to initialize some member variables.</td>
</tr><tr>
<td><a href="#TimeTracker.__readTrackerEntries">__readTrackerEntries</a></td>
<td>Private slot to read the time tracker entries from a file.</td>
</tr><tr>
<td><a href="#TimeTracker.activate">activate</a></td>
<td>Public method to activate the time tracker.</td>
</tr><tr>
<td><a href="#TimeTracker.addTrackerEntry">addTrackerEntry</a></td>
<td>Public method to add a new tracker entry based on the given data.</td>
</tr><tr>
<td><a href="#TimeTracker.continueTrackerEntry">continueTrackerEntry</a></td>
<td>Public method to continue the current tracker entry.</td>
</tr><tr>
<td><a href="#TimeTracker.deactivate">deactivate</a></td>
<td>Public method to deactivate the time tracker.</td>
</tr><tr>
<td><a href="#TimeTracker.deleteTrackerEntry">deleteTrackerEntry</a></td>
<td>Public method to delete a tracker entry given its ID.</td>
</tr><tr>
<td><a href="#TimeTracker.entryChanged">entryChanged</a></td>
<td>Public method to indicate an external change to any of the entries.</td>
</tr><tr>
<td><a href="#TimeTracker.getCurrentEntry">getCurrentEntry</a></td>
<td>Public method to get a reference to the current tracker entry.</td>
</tr><tr>
<td><a href="#TimeTracker.getEntry">getEntry</a></td>
<td>Public method to get a tracker entry given its ID.</td>
</tr><tr>
<td><a href="#TimeTracker.getPreferences">getPreferences</a></td>
<td>Public method to retrieve the various settings.</td>
</tr><tr>
<td><a href="#TimeTracker.importTrackerEntries">importTrackerEntries</a></td>
<td>Public slot to import tracker entries from a file.</td>
</tr><tr>
<td><a href="#TimeTracker.mergeDuplicateTrackerEntries">mergeDuplicateTrackerEntries</a></td>
<td>Public slot to merge duplicate time tracker entries.</td>
</tr><tr>
<td><a href="#TimeTracker.pauseTrackerEntry">pauseTrackerEntry</a></td>
<td>Public method to pause the current tracker entry.</td>
</tr><tr>
<td><a href="#TimeTracker.projectClosed">projectClosed</a></td>
<td>Public slot to handle the projectClosed signal.</td>
</tr><tr>
<td><a href="#TimeTracker.projectOpened">projectOpened</a></td>
<td>Public slot to handle the projectOpened signal.</td>
</tr><tr>
<td><a href="#TimeTracker.removeDuplicateTrackerEntries">removeDuplicateTrackerEntries</a></td>
<td>Public slot to remove duplicate time tracker entries.</td>
</tr><tr>
<td><a href="#TimeTracker.saveTrackerEntries">saveTrackerEntries</a></td>
<td>Public slot to save the tracker entries to a file.</td>
</tr><tr>
<td><a href="#TimeTracker.startTrackerEntry">startTrackerEntry</a></td>
<td>Public method to start a new tracker entry.</td>
</tr><tr>
<td><a href="#TimeTracker.stopTrackerEntry">stopTrackerEntry</a></td>
<td>Public method to stop the current tracker entry.</td>
</tr>
</table>
<h3>Static Methods</h3>
<table>
<tr><td>None</td></tr>
</table>
<a NAME="TimeTracker.__init__" ID="TimeTracker.__init__"></a>
<h4>TimeTracker (Constructor)</h4>
<b>TimeTracker</b>(<i>plugin, parent=None</i>)
<p>
        Constructor
</p><dl>
<dt><i>plugin</i></dt>
<dd>
reference to the plugin object (TimeTrackerPlugin)
</dd><dt><i>parent</i></dt>
<dd>
parent (QObject)
</dd>
</dl><a NAME="TimeTracker.__activateWidget" ID="TimeTracker.__activateWidget"></a>
<h4>TimeTracker.__activateWidget</h4>
<b>__activateWidget</b>(<i></i>)
<p>
        Private slot to handle the activation of the project browser.
</p><a NAME="TimeTracker.__initialize" ID="TimeTracker.__initialize"></a>
<h4>TimeTracker.__initialize</h4>
<b>__initialize</b>(<i></i>)
<p>
        Private slot to initialize some member variables.
</p><a NAME="TimeTracker.__readTrackerEntries" ID="TimeTracker.__readTrackerEntries"></a>
<h4>TimeTracker.__readTrackerEntries</h4>
<b>__readTrackerEntries</b>(<i></i>)
<p>
        Private slot to read the time tracker entries from a file.
</p><a NAME="TimeTracker.activate" ID="TimeTracker.activate"></a>
<h4>TimeTracker.activate</h4>
<b>activate</b>(<i></i>)
<p>
        Public method to activate the time tracker.
</p><a NAME="TimeTracker.addTrackerEntry" ID="TimeTracker.addTrackerEntry"></a>
<h4>TimeTracker.addTrackerEntry</h4>
<b>addTrackerEntry</b>(<i>startDateTime, duration, task, comment</i>)
<p>
        Public method to add a new tracker entry based on the given data.
</p><dl>
<dt><i>startDateTime</i></dt>
<dd>
start date and time (QDateTime)
</dd><dt><i>duration</i></dt>
<dd>
duration in minutes (integer)
</dd><dt><i>task</i></dt>
<dd>
task description (string)
</dd><dt><i>comment</i></dt>
<dd>
comment (string)
</dd>
</dl><a NAME="TimeTracker.continueTrackerEntry" ID="TimeTracker.continueTrackerEntry"></a>
<h4>TimeTracker.continueTrackerEntry</h4>
<b>continueTrackerEntry</b>(<i></i>)
<p>
        Public method to continue the current tracker entry.
</p><a NAME="TimeTracker.deactivate" ID="TimeTracker.deactivate"></a>
<h4>TimeTracker.deactivate</h4>
<b>deactivate</b>(<i></i>)
<p>
        Public method to deactivate the time tracker.
</p><a NAME="TimeTracker.deleteTrackerEntry" ID="TimeTracker.deleteTrackerEntry"></a>
<h4>TimeTracker.deleteTrackerEntry</h4>
<b>deleteTrackerEntry</b>(<i>eid</i>)
<p>
        Public method to delete a tracker entry given its ID.
</p><dl>
<dt><i>eid</i></dt>
<dd>
ID of the tracker entry (integer)
</dd>
</dl><a NAME="TimeTracker.entryChanged" ID="TimeTracker.entryChanged"></a>
<h4>TimeTracker.entryChanged</h4>
<b>entryChanged</b>(<i></i>)
<p>
        Public method to indicate an external change to any of the entries.
</p><a NAME="TimeTracker.getCurrentEntry" ID="TimeTracker.getCurrentEntry"></a>
<h4>TimeTracker.getCurrentEntry</h4>
<b>getCurrentEntry</b>(<i></i>)
<p>
        Public method to get a reference to the current tracker entry.
</p><dl>
<dt>Returns:</dt>
<dd>
reference to the current entry (TimeTrackEntry)
</dd>
</dl><a NAME="TimeTracker.getEntry" ID="TimeTracker.getEntry"></a>
<h4>TimeTracker.getEntry</h4>
<b>getEntry</b>(<i>eid</i>)
<p>
        Public method to get a tracker entry given its ID.
</p><dl>
<dt><i>eid</i></dt>
<dd>
ID of the tracker entry (integer)
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
entry for the given ID (TimeTrackEntry) or None
</dd>
</dl><a NAME="TimeTracker.getPreferences" ID="TimeTracker.getPreferences"></a>
<h4>TimeTracker.getPreferences</h4>
<b>getPreferences</b>(<i>key</i>)
<p>
        Public method to retrieve the various settings.
</p><dl>
<dt><i>key</i></dt>
<dd>
the key of the value to get
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
the requested setting
</dd>
</dl><a NAME="TimeTracker.importTrackerEntries" ID="TimeTracker.importTrackerEntries"></a>
<h4>TimeTracker.importTrackerEntries</h4>
<b>importTrackerEntries</b>(<i>fname</i>)
<p>
        Public slot to import tracker entries from a file.
</p><dl>
<dt><i>fname</i></dt>
<dd>
name of the file to import (string)
</dd>
</dl><a NAME="TimeTracker.mergeDuplicateTrackerEntries" ID="TimeTracker.mergeDuplicateTrackerEntries"></a>
<h4>TimeTracker.mergeDuplicateTrackerEntries</h4>
<b>mergeDuplicateTrackerEntries</b>(<i></i>)
<p>
        Public slot to merge duplicate time tracker entries.
</p><p>
        If entries with the identical start date and time are found, the
        durations of these entries are added.
</p><a NAME="TimeTracker.pauseTrackerEntry" ID="TimeTracker.pauseTrackerEntry"></a>
<h4>TimeTracker.pauseTrackerEntry</h4>
<b>pauseTrackerEntry</b>(<i></i>)
<p>
        Public method to pause the current tracker entry.
</p><a NAME="TimeTracker.projectClosed" ID="TimeTracker.projectClosed"></a>
<h4>TimeTracker.projectClosed</h4>
<b>projectClosed</b>(<i></i>)
<p>
        Public slot to handle the projectClosed signal.
</p><a NAME="TimeTracker.projectOpened" ID="TimeTracker.projectOpened"></a>
<h4>TimeTracker.projectOpened</h4>
<b>projectOpened</b>(<i></i>)
<p>
        Public slot to handle the projectOpened signal.
</p><a NAME="TimeTracker.removeDuplicateTrackerEntries" ID="TimeTracker.removeDuplicateTrackerEntries"></a>
<h4>TimeTracker.removeDuplicateTrackerEntries</h4>
<b>removeDuplicateTrackerEntries</b>(<i></i>)
<p>
        Public slot to remove duplicate time tracker entries.
</p><p>
        If entries with the identical start date and time are found, the one
        with the longest duration is kept.
</p><a NAME="TimeTracker.saveTrackerEntries" ID="TimeTracker.saveTrackerEntries"></a>
<h4>TimeTracker.saveTrackerEntries</h4>
<b>saveTrackerEntries</b>(<i>filePath="", ids=[]</i>)
<p>
        Public slot to save the tracker entries to a file.
</p><dl>
<dt><i>filePath=</i></dt>
<dd>
path and name of the file to write the entries to
            (string)
</dd><dt><i>ids=</i></dt>
<dd>
list of entry IDs to be written (list of integer)
</dd>
</dl><a NAME="TimeTracker.startTrackerEntry" ID="TimeTracker.startTrackerEntry"></a>
<h4>TimeTracker.startTrackerEntry</h4>
<b>startTrackerEntry</b>(<i></i>)
<p>
        Public method to start a new tracker entry.
</p><a NAME="TimeTracker.stopTrackerEntry" ID="TimeTracker.stopTrackerEntry"></a>
<h4>TimeTracker.stopTrackerEntry</h4>
<b>stopTrackerEntry</b>(<i></i>)
<p>
        Public method to stop the current tracker entry.
</p><dl>
<dt>Returns:</dt>
<dd>
tuple of the ID assigned to the stopped tracker entry and
            the duration (integer, integer)
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
</body></html>

eric ide

mercurial