Share and Money Management 0.18devel
Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Private Attributes | List of all members
smm.objects.Watch Class Reference

Class to handle watch list entries. More...

Inheritance diagram for smm.objects.Watch:

Public Member Functions

def __init__ (self, share,, expire=None, notes=None)
 Create a new Watch instance. More...
def __str__ (self)
 Returns the content of this instance as string. More...
def remove (self)
 Delete watch list entry. More...
- Public Member Functions inherited from smm.objects.SMMBaseObject
def __init__ (self, **kwargs)
 Initialise the instance and set attributes optionally. More...
def __repr__ (self)
 Returns the representation of this object as string. More...
def update (self, **kwargs)
 Update instance arguments. More...
def add2db (self)
 Add an object to the database. More...

Static Public Member Functions

def get (id=None, expired=False, share=None)
 Query Watch objects. More...

Static Public Attributes

dictionary arguments
string psTopic = ""
 id = Int(default=AutoReload, primary=True)
 Unique ID for each object. More...
 notes = Unicode()
 Detailed notes. More...
 share = Reference(id, Share.watch_id, on_remote=True)
 Reference to the Share object More...
 created = Date()
 Date when the watch object is created. More...
 expire = Date()
 Date when the watch object will be removed automatically. More...
- Static Public Attributes inherited from smm.objects.SMMBaseObject
dictionary arguments
 Set of argument names for keyword arguments. More...
 encoding = sys.stdout.encoding or sys.getdefaultencoding()
 Encoding of all character strings. More...
 psTopic = None
 Publish Subscribe Topic for this class. More...
 id = None
 Unique ID for each object. More...

Static Private Attributes

string __storm_table__ = "t_watch"
 Use given table to store all of this class inside. More...

Detailed Description

Class to handle watch list entries.


Constructor & Destructor Documentation

◆ __init__()

def smm.objects.Watch.__init__ (   self,
  created =,
  expire = None,
  notes = None 

Create a new Watch instance.

selfThe object instance itself
shareShare to watch (smm.objects.Share object)
createdCreation date ( object, default: today)
expireExpiration date ( object, default: no expiration)
notesComment to the entry (default: None)
Emitted Notification:

Reimplemented from smm.objects.SMMBaseObject.

References gui.dialogs.DlgTrade.share, gui.dialogs.DlgShare.share, smm.objects.DailyQuote.share, smm.objects.Watch.share, and smm.objects.Position.share.

Member Function Documentation

◆ __str__()

def smm.objects.Watch.__str__ (   self)

◆ get()

def smm.objects.Watch.get (   id = None,
  expired = False,
  share = None 

Query Watch objects.

There are three ways for querying objects:

  • Querying by id returns a Watch object or None
  • Query special entries described using share and/or expired
  • Querying without parameters to get all Watch objects

The last two ways returns always a

idReturns a watch list entry specified by id.
expiredBoolean flag to returns all expired watch list entries.
shareReturns a watch list entry specified by share.
The result are unsorted

◆ remove()

def smm.objects.Watch.remove (   self)

Delete watch list entry.

The reference between share and watch list entry will be cleaned and Watch object will be removed from the database.

References smm.objects.SMMBaseObject._remove(), gui.dialogs.DlgTrade.share, gui.dialogs.DlgShare.share, smm.objects.DailyQuote.share, smm.objects.Watch.share, smm.objects.Position.share, and smm.objects.SMMBaseObject.update().

Here is the call graph for this function:

Member Data Documentation

◆ __storm_table__

string smm.objects.Watch.__storm_table__ = "t_watch"

Use given table to store all of this class inside.

◆ arguments

dictionary smm.objects.Watch.arguments
Initial value:
= {

Referenced by smm.objects.SMMBaseObject._setAttrs().

◆ created

smm.objects.Watch.created = Date()

Date when the watch object is created.

Referenced by smm.objects.Watch.__str__().

◆ expire

smm.objects.Watch.expire = Date()

Date when the watch object will be removed automatically.

Referenced by smm.objects.Watch.__str__().

◆ id = Int(default=AutoReload, primary=True)

◆ notes

smm.objects.Watch.notes = Unicode()

Detailed notes.

◆ psTopic

string smm.objects.Watch.psTopic = ""

◆ share

smm.objects.Watch.share = Reference(id, Share.watch_id, on_remote=True)

The documentation for this class was generated from the following file: