|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' |
|
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> |
|
4 <html><head> |
|
5 <title>eric5.Helpviewer.History.HistoryModel</title> |
|
6 <style> |
|
7 b'body {\n background:white;\n margin: 0em 1em 10em 1em;\n color: black;\n}\n\nh1 { color: white; background: #4FA4FF; }\nh2 { color: white; background: #4FA4FF; }\nh3 { color: white; background: #00557F; }\nh4 { color: white; background: #00557F; }\n \na { color: #AA5500; }\n' |
|
8 </style> |
|
9 </head> |
|
10 <body><a NAME="top" ID="top"></a> |
|
11 <h1>eric5.Helpviewer.History.HistoryModel</h1> |
|
12 <p> |
|
13 Module implementing the history model. |
|
14 </p> |
|
15 <h3>Global Attributes</h3> |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 <table> |
|
21 <tr> |
|
22 <td><a href="#HistoryModel">HistoryModel</a></td> |
|
23 <td>Class implementing the history model.</td> |
|
24 </tr> |
|
25 </table> |
|
26 <h3>Functions</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <hr /><hr /> |
|
31 <a NAME="HistoryModel" ID="HistoryModel"></a> |
|
32 <h2>HistoryModel</h2> |
|
33 <p> |
|
34 Class implementing the history model. |
|
35 </p> |
|
36 <h3>Derived from</h3> |
|
37 QAbstractTableModel |
|
38 <h3>Class Attributes</h3> |
|
39 <table> |
|
40 <tr><td>DateRole</td></tr><tr><td>DateTimeRole</td></tr><tr><td>MaxRole</td></tr><tr><td>TitleRole</td></tr><tr><td>UrlRole</td></tr><tr><td>UrlStringRole</td></tr> |
|
41 </table> |
|
42 <h3>Methods</h3> |
|
43 <table> |
|
44 <tr> |
|
45 <td><a href="#HistoryModel.__init__">HistoryModel</a></td> |
|
46 <td>Constructor</td> |
|
47 </tr><tr> |
|
48 <td><a href="#HistoryModel.columnCount">columnCount</a></td> |
|
49 <td>Public method to get the number of columns.</td> |
|
50 </tr><tr> |
|
51 <td><a href="#HistoryModel.data">data</a></td> |
|
52 <td>Public method to get data from the model.</td> |
|
53 </tr><tr> |
|
54 <td><a href="#HistoryModel.entryAdded">entryAdded</a></td> |
|
55 <td>Public slot to handle the addition of a history entry.</td> |
|
56 </tr><tr> |
|
57 <td><a href="#HistoryModel.entryUpdated">entryUpdated</a></td> |
|
58 <td>Public slot to handle the update of a history entry.</td> |
|
59 </tr><tr> |
|
60 <td><a href="#HistoryModel.headerData">headerData</a></td> |
|
61 <td>Public method to get the header data.</td> |
|
62 </tr><tr> |
|
63 <td><a href="#HistoryModel.historyReset">historyReset</a></td> |
|
64 <td>Public slot to reset the model.</td> |
|
65 </tr><tr> |
|
66 <td><a href="#HistoryModel.removeRows">removeRows</a></td> |
|
67 <td>Public method to remove history entries from the model.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#HistoryModel.rowCount">rowCount</a></td> |
|
70 <td>Public method to determine the number of rows.</td> |
|
71 </tr> |
|
72 </table> |
|
73 <a NAME="HistoryModel.__init__" ID="HistoryModel.__init__"></a> |
|
74 <h4>HistoryModel (Constructor)</h4> |
|
75 <b>HistoryModel</b>(<i>historyManager, parent = None</i>) |
|
76 <p> |
|
77 Constructor |
|
78 </p><dl> |
|
79 <dt><i>historyManager</i></dt> |
|
80 <dd> |
|
81 reference to the history manager object (HistoryManager) |
|
82 </dd><dt><i>parent</i></dt> |
|
83 <dd> |
|
84 reference to the parent object (QObject) |
|
85 </dd> |
|
86 </dl><a NAME="HistoryModel.columnCount" ID="HistoryModel.columnCount"></a> |
|
87 <h4>HistoryModel.columnCount</h4> |
|
88 <b>columnCount</b>(<i>parent = QModelIndex()</i>) |
|
89 <p> |
|
90 Public method to get the number of columns. |
|
91 </p><dl> |
|
92 <dt><i>parent</i></dt> |
|
93 <dd> |
|
94 index of parent (QModelIndex) |
|
95 </dd> |
|
96 </dl><dl> |
|
97 <dt>Returns:</dt> |
|
98 <dd> |
|
99 number of columns (integer) |
|
100 </dd> |
|
101 </dl><a NAME="HistoryModel.data" ID="HistoryModel.data"></a> |
|
102 <h4>HistoryModel.data</h4> |
|
103 <b>data</b>(<i>index, role = Qt.DisplayRole</i>) |
|
104 <p> |
|
105 Public method to get data from the model. |
|
106 </p><dl> |
|
107 <dt><i>index</i></dt> |
|
108 <dd> |
|
109 index of history entry to get data for (QModelIndex) |
|
110 </dd><dt><i>role</i></dt> |
|
111 <dd> |
|
112 data role (integer) |
|
113 </dd> |
|
114 </dl><dl> |
|
115 <dt>Returns:</dt> |
|
116 <dd> |
|
117 history entry data |
|
118 </dd> |
|
119 </dl><a NAME="HistoryModel.entryAdded" ID="HistoryModel.entryAdded"></a> |
|
120 <h4>HistoryModel.entryAdded</h4> |
|
121 <b>entryAdded</b>(<i></i>) |
|
122 <p> |
|
123 Public slot to handle the addition of a history entry. |
|
124 </p><a NAME="HistoryModel.entryUpdated" ID="HistoryModel.entryUpdated"></a> |
|
125 <h4>HistoryModel.entryUpdated</h4> |
|
126 <b>entryUpdated</b>(<i>row</i>) |
|
127 <p> |
|
128 Public slot to handle the update of a history entry. |
|
129 </p><dl> |
|
130 <dt><i>row</i></dt> |
|
131 <dd> |
|
132 row number of the updated entry (integer) |
|
133 </dd> |
|
134 </dl><a NAME="HistoryModel.headerData" ID="HistoryModel.headerData"></a> |
|
135 <h4>HistoryModel.headerData</h4> |
|
136 <b>headerData</b>(<i>section, orientation, role = Qt.DisplayRole</i>) |
|
137 <p> |
|
138 Public method to get the header data. |
|
139 </p><dl> |
|
140 <dt><i>section</i></dt> |
|
141 <dd> |
|
142 section number (integer) |
|
143 </dd><dt><i>orientation</i></dt> |
|
144 <dd> |
|
145 header orientation (Qt.Orientation) |
|
146 </dd><dt><i>role</i></dt> |
|
147 <dd> |
|
148 data role (integer) |
|
149 </dd> |
|
150 </dl><dl> |
|
151 <dt>Returns:</dt> |
|
152 <dd> |
|
153 header data |
|
154 </dd> |
|
155 </dl><a NAME="HistoryModel.historyReset" ID="HistoryModel.historyReset"></a> |
|
156 <h4>HistoryModel.historyReset</h4> |
|
157 <b>historyReset</b>(<i></i>) |
|
158 <p> |
|
159 Public slot to reset the model. |
|
160 </p><a NAME="HistoryModel.removeRows" ID="HistoryModel.removeRows"></a> |
|
161 <h4>HistoryModel.removeRows</h4> |
|
162 <b>removeRows</b>(<i>row, count, parent = QModelIndex()</i>) |
|
163 <p> |
|
164 Public method to remove history entries from the model. |
|
165 </p><dl> |
|
166 <dt><i>row</i></dt> |
|
167 <dd> |
|
168 row of the first history entry to remove (integer) |
|
169 </dd><dt><i>count</i></dt> |
|
170 <dd> |
|
171 number of history entries to remove (integer) |
|
172 </dd><dt><i>index</i></dt> |
|
173 <dd> |
|
174 of the parent entry (QModelIndex) |
|
175 </dd> |
|
176 </dl><dl> |
|
177 <dt>Returns:</dt> |
|
178 <dd> |
|
179 flag indicating successful removal (boolean) |
|
180 </dd> |
|
181 </dl><a NAME="HistoryModel.rowCount" ID="HistoryModel.rowCount"></a> |
|
182 <h4>HistoryModel.rowCount</h4> |
|
183 <b>rowCount</b>(<i>parent = QModelIndex()</i>) |
|
184 <p> |
|
185 Public method to determine the number of rows. |
|
186 </p><dl> |
|
187 <dt><i>parent</i></dt> |
|
188 <dd> |
|
189 index of parent (QModelIndex) |
|
190 </dd> |
|
191 </dl><dl> |
|
192 <dt>Returns:</dt> |
|
193 <dd> |
|
194 number of rows (integer) |
|
195 </dd> |
|
196 </dl> |
|
197 <div align="right"><a href="#top">Up</a></div> |
|
198 <hr /> |
|
199 </body></html> |