src/eric7/WebBrowser/SpeedDial/Page.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9653
e67609152c5e
equal deleted inserted replaced
9220:e9e7eca7efee 9221:bf71ee032bb4
10 10
11 class Page: 11 class Page:
12 """ 12 """
13 Class to hold the data for a speed dial page. 13 Class to hold the data for a speed dial page.
14 """ 14 """
15
15 def __init__(self, url="", title="", broken=False): 16 def __init__(self, url="", title="", broken=False):
16 """ 17 """
17 Constructor 18 Constructor
18 19
19 @param url URL of the page (string) 20 @param url URL of the page (string)
20 @param title title of the page (string) 21 @param title title of the page (string)
21 @param broken flag indicating a broken connection (boolean) 22 @param broken flag indicating a broken connection (boolean)
22 """ 23 """
23 self.url = url 24 self.url = url
24 self.title = title 25 self.title = title
25 self.broken = broken 26 self.broken = broken
26 27
27 def __eq__(self, other): 28 def __eq__(self, other):
28 """ 29 """
29 Special method implementing the equality operator. 30 Special method implementing the equality operator.
30 31
31 @param other reference to the other page object (Page) 32 @param other reference to the other page object (Page)
32 @return flag indicating equality (boolean) 33 @return flag indicating equality (boolean)
33 """ 34 """
34 return ( 35 return self.title == other.title and self.url == other.url
35 self.title == other.title and 36
36 self.url == other.url
37 )
38
39 def isValid(self): 37 def isValid(self):
40 """ 38 """
41 Public method to check the validity. 39 Public method to check the validity.
42 40
43 @return flag indicating a valid object 41 @return flag indicating a valid object
44 @rtype bool 42 @rtype bool
45 """ 43 """
46 return bool(self.url) 44 return bool(self.url)

eric ide

mercurial