Helpviewer/SpeedDial/Page.py

Sun, 11 Mar 2012 13:04:30 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 11 Mar 2012 13:04:30 +0100
changeset 1699
10706f6ad9d2
child 2302
f29e9405c851
permissions
-rw-r--r--

Changed the speedial to store the data into an XML file.

1699
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3 # Copyright (c) 2012 Detlev Offenbach <detlev@die-offenbachs.de>
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing a structure to hold the data for a speed dial page.
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11 class Page(object):
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12 """
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13 Class to hold the data for a speed dial page.
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14 """
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15 def __init__(self, url="", title="", broken=False):
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16 """
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 Constructor
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 @param url URL of the page (string)
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 @param title title of the page (string)
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 """
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 self.url = url
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 self.title = title
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 self.broken = broken
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 def __eq__(self, other):
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 """
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 Public method implementing the equality operator.
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 @param other reference to the other page object (Page)
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31 @return flag indicating equality (boolean)
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 """
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 return self.title == other.title and \
10706f6ad9d2 Changed the speedial to store the data into an XML file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34 self.url == other.url

eric ide

mercurial