src/eric7/WebBrowser/UrlBar/StackedUrlBar.py

branch
eric7
changeset 10436
f6881d10e995
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10435:c712d09cc839 10436:f6881d10e995
17 17
18 def __init__(self, parent=None): 18 def __init__(self, parent=None):
19 """ 19 """
20 Constructor 20 Constructor
21 21
22 @param parent reference to the parent widget (QWidget) 22 @param parent reference to the parent widget
23 @type QWidget
23 """ 24 """
24 super().__init__(parent) 25 super().__init__(parent)
25 26
26 sizePolicy = QSizePolicy( 27 sizePolicy = QSizePolicy(
27 QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Preferred 28 QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Preferred
33 34
34 def currentUrlBar(self): 35 def currentUrlBar(self):
35 """ 36 """
36 Public method to get a reference to the current URL bar. 37 Public method to get a reference to the current URL bar.
37 38
38 @return reference to the current URL bar (UrlBar) 39 @return reference to the current URL bar
40 @rtype UrlBar
39 """ 41 """
40 return self.urlBar(self.currentIndex()) 42 return self.urlBar(self.currentIndex())
41 43
42 def urlBar(self, index): 44 def urlBar(self, index):
43 """ 45 """
44 Public method to get a reference to the URL bar for a given index. 46 Public method to get a reference to the URL bar for a given index.
45 47
46 @param index index of the url bar (integer) 48 @param index index of the url bar
47 @return reference to the URL bar for the given index (UrlBar) 49 @type int
50 @return reference to the URL bar for the given index
51 @rtype UrlBar
48 """ 52 """
49 return self.widget(index) 53 return self.widget(index)
50 54
51 def moveBar(self, from_, to_): 55 def moveBar(self, from_, to_):
52 """ 56 """
53 Public slot to move an URL bar. 57 Public slot to move an URL bar.
54 58
55 @param from_ index of URL bar to be moved (integer) 59 @param from_ index of URL bar to be moved
56 @param to_ index to move the URL bar to (integer) 60 @type int
61 @param to_ index to move the URL bar to
62 @type int
57 """ 63 """
58 fromBar = self.widget(from_) 64 fromBar = self.widget(from_)
59 self.removeWidget(fromBar) 65 self.removeWidget(fromBar)
60 self.insertWidget(to_, fromBar) 66 self.insertWidget(to_, fromBar)
61 67
62 def urlBars(self): 68 def urlBars(self):
63 """ 69 """
64 Public method to get a list of references to all URL bars. 70 Public method to get a list of references to all URL bars.
65 71
66 @return list of references to URL bars (list of UrlBar) 72 @return list of references to URL bars
73 @rtype list of UrlBar
67 """ 74 """
68 urlBars = [] 75 urlBars = []
69 for index in range(self.count()): 76 for index in range(self.count()):
70 urlBars.append(self.widget(index)) 77 urlBars.append(self.widget(index))
71 return urlBars 78 return urlBars

eric ide

mercurial