eric7/WebBrowser/SpeedDial/Page.py

branch
eric7
changeset 8312
800c432b34c8
parent 8207
d359172d11be
child 8881
54e42bc2437a
equal deleted inserted replaced
8311:4e8b98454baa 8312:800c432b34c8
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2012 - 2021 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing a structure to hold the data for a speed dial page.
8 """
9
10
11 class Page:
12 """
13 Class to hold the data for a speed dial page.
14 """
15 def __init__(self, url="", title="", broken=False):
16 """
17 Constructor
18
19 @param url URL of the page (string)
20 @param title title of the page (string)
21 @param broken flag indicating a broken connection (boolean)
22 """
23 self.url = url
24 self.title = title
25 self.broken = broken
26
27 def __eq__(self, other):
28 """
29 Special method implementing the equality operator.
30
31 @param other reference to the other page object (Page)
32 @return flag indicating equality (boolean)
33 """
34 return (
35 self.title == other.title and
36 self.url == other.url
37 )
38
39 def isValid(self):
40 """
41 Public method to check the validity.
42
43 @return flag indicating a valid object
44 @rtype bool
45 """
46 return bool(self.url)

eric ide

mercurial