Documentation/Source/eric5.Helpviewer.History.HistoryModel.html

changeset 58
37f0444c3479
parent 21
b88a0e6268bd
child 409
0ea528e80202
equal deleted inserted replaced
57:81326a94fdca 58:37f0444c3479
20 </style> 20 </style>
21 </head> 21 </head>
22 <body><a NAME="top" ID="top"></a> 22 <body><a NAME="top" ID="top"></a>
23 <h1>eric5.Helpviewer.History.HistoryModel</h1> 23 <h1>eric5.Helpviewer.History.HistoryModel</h1>
24 <p> 24 <p>
25 &#77;&#111;&#100;&#117;&#108;&#101; &#105;&#109;&#112;&#108;&#101;&#109;&#101;&#110;&#116;&#105;&#110;&#103; &#116;&#104;&#101; &#104;&#105;&#115;&#116;&#111;&#114;y &#109;&#111;&#100;&#101;&#108;. 25 Module implementing the history model.
26 </p> 26 </p>
27 <h3>Global Attributes</h3> 27 <h3>Global Attributes</h3>
28 <table> 28 <table>
29 <tr><td>None</td></tr> 29 <tr><td>None</td></tr>
30 </table> 30 </table>
31 <h3>Classes</h3> 31 <h3>Classes</h3>
32 <table> 32 <table>
33 <tr> 33 <tr>
34 <td><a href="#HistoryModel">HistoryModel</a></td> 34 <td><a href="#HistoryModel">HistoryModel</a></td>
35 <td>&#67;&#108;&#97;&#115;&#115; &#105;&#109;&#112;&#108;&#101;&#109;&#101;&#110;&#116;&#105;&#110;&#103; &#116;&#104;&#101; &#104;&#105;&#115;&#116;&#111;&#114;y &#109;&#111;&#100;&#101;&#108;.</td> 35 <td>Class implementing the history model.</td>
36 </tr> 36 </tr>
37 </table> 37 </table>
38 <h3>Functions</h3> 38 <h3>Functions</h3>
39 <table> 39 <table>
40 <tr><td>None</td></tr> 40 <tr><td>None</td></tr>
41 </table> 41 </table>
42 <hr /><hr /> 42 <hr /><hr />
43 <a NAME="HistoryModel" ID="HistoryModel"></a> 43 <a NAME="HistoryModel" ID="HistoryModel"></a>
44 <h2>HistoryModel</h2> 44 <h2>HistoryModel</h2>
45 <p> 45 <p>
46 &#67;&#108;&#97;&#115;&#115; &#105;&#109;&#112;&#108;&#101;&#109;&#101;&#110;&#116;&#105;&#110;&#103; &#116;&#104;&#101; &#104;&#105;&#115;&#116;&#111;&#114;y &#109;&#111;&#100;&#101;&#108;. 46 Class implementing the history model.
47 </p> 47 </p>
48 <h3>Derived from</h3> 48 <h3>Derived from</h3>
49 QAbstractTableModel 49 QAbstractTableModel
50 <h3>Class Attributes</h3> 50 <h3>Class Attributes</h3>
51 <table> 51 <table>
53 </table> 53 </table>
54 <h3>Methods</h3> 54 <h3>Methods</h3>
55 <table> 55 <table>
56 <tr> 56 <tr>
57 <td><a href="#HistoryModel.__init__">HistoryModel</a></td> 57 <td><a href="#HistoryModel.__init__">HistoryModel</a></td>
58 <td>&#67;&#111;&#110;&#115;&#116;&#114;&#117;&#99;&#116;&#111;&#114;</td> 58 <td>Constructor</td>
59 </tr><tr> 59 </tr><tr>
60 <td><a href="#HistoryModel.columnCount">columnCount</a></td> 60 <td><a href="#HistoryModel.columnCount">columnCount</a></td>
61 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#103;&#101;&#116; &#116;&#104;&#101; &#110;&#117;&#109;&#98;&#101;&#114; &#111;&#102; &#99;&#111;&#108;&#117;&#109;&#110;&#115;.</td> 61 <td>Public method to get the number of columns.</td>
62 </tr><tr> 62 </tr><tr>
63 <td><a href="#HistoryModel.data">data</a></td> 63 <td><a href="#HistoryModel.data">data</a></td>
64 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#103;&#101;&#116; &#100;&#97;&#116;&#97; &#102;&#114;&#111;&#109; &#116;&#104;&#101; &#109;&#111;&#100;&#101;&#108;.</td> 64 <td>Public method to get data from the model.</td>
65 </tr><tr> 65 </tr><tr>
66 <td><a href="#HistoryModel.entryAdded">entryAdded</a></td> 66 <td><a href="#HistoryModel.entryAdded">entryAdded</a></td>
67 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#115;&#108;&#111;&#116; &#116;&#111; &#104;&#97;&#110;&#100;&#108;&#101; &#116;&#104;&#101; &#97;&#100;&#100;&#105;&#116;&#105;&#111;&#110; &#111;&#102; &#97; &#104;&#105;&#115;&#116;&#111;&#114;y &#101;&#110;&#116;&#114;y.</td> 67 <td>Public slot to handle the addition of a history entry.</td>
68 </tr><tr> 68 </tr><tr>
69 <td><a href="#HistoryModel.entryUpdated">entryUpdated</a></td> 69 <td><a href="#HistoryModel.entryUpdated">entryUpdated</a></td>
70 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#115;&#108;&#111;&#116; &#116;&#111; &#104;&#97;&#110;&#100;&#108;&#101; &#116;&#104;&#101; &#117;&#112;&#100;&#97;&#116;&#101; &#111;&#102; &#97; &#104;&#105;&#115;&#116;&#111;&#114;y &#101;&#110;&#116;&#114;y.</td> 70 <td>Public slot to handle the update of a history entry.</td>
71 </tr><tr> 71 </tr><tr>
72 <td><a href="#HistoryModel.headerData">headerData</a></td> 72 <td><a href="#HistoryModel.headerData">headerData</a></td>
73 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#103;&#101;&#116; &#116;&#104;&#101; &#104;&#101;&#97;&#100;&#101;&#114; &#100;&#97;&#116;&#97;.</td> 73 <td>Public method to get the header data.</td>
74 </tr><tr> 74 </tr><tr>
75 <td><a href="#HistoryModel.historyReset">historyReset</a></td> 75 <td><a href="#HistoryModel.historyReset">historyReset</a></td>
76 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#115;&#108;&#111;&#116; &#116;&#111; &#114;&#101;&#115;&#101;&#116; &#116;&#104;&#101; &#109;&#111;&#100;&#101;&#108;.</td> 76 <td>Public slot to reset the model.</td>
77 </tr><tr> 77 </tr><tr>
78 <td><a href="#HistoryModel.removeRows">removeRows</a></td> 78 <td><a href="#HistoryModel.removeRows">removeRows</a></td>
79 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#114;&#101;&#109;&#111;v&#101; &#104;&#105;&#115;&#116;&#111;&#114;y &#101;&#110;&#116;&#114;&#105;&#101;&#115; &#102;&#114;&#111;&#109; &#116;&#104;&#101; &#109;&#111;&#100;&#101;&#108;.</td> 79 <td>Public method to remove history entries from the model.</td>
80 </tr><tr> 80 </tr><tr>
81 <td><a href="#HistoryModel.rowCount">rowCount</a></td> 81 <td><a href="#HistoryModel.rowCount">rowCount</a></td>
82 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#100;&#101;&#116;&#101;&#114;&#109;&#105;&#110;&#101; &#116;&#104;&#101; &#110;&#117;&#109;&#98;&#101;&#114; &#111;&#102; &#114;&#111;w&#115;.</td> 82 <td>Public method to determine the number of rows.</td>
83 </tr> 83 </tr>
84 </table> 84 </table>
85 <a NAME="HistoryModel.__init__" ID="HistoryModel.__init__"></a> 85 <a NAME="HistoryModel.__init__" ID="HistoryModel.__init__"></a>
86 <h4>HistoryModel (Constructor)</h4> 86 <h4>HistoryModel (Constructor)</h4>
87 <b>HistoryModel</b>(<i>historyManager, parent = None</i>) 87 <b>HistoryModel</b>(<i>historyManager, parent = None</i>)
88 <p> 88 <p>
89 &#67;&#111;&#110;&#115;&#116;&#114;&#117;&#99;&#116;&#111;&#114; 89 Constructor
90 </p><dl> 90 </p><dl>
91 <dt><i>historyManager</i></dt> 91 <dt><i>historyManager</i></dt>
92 <dd> 92 <dd>
93 &#114;&#101;&#102;&#101;&#114;&#101;&#110;&#99;&#101; &#116;&#111; &#116;&#104;&#101; &#104;&#105;&#115;&#116;&#111;&#114;y &#109;&#97;&#110;&#97;&#103;&#101;&#114; &#111;&#98;&#106;&#101;&#99;&#116; (&#72;&#105;&#115;&#116;&#111;&#114;y&#77;&#97;&#110;&#97;&#103;&#101;&#114;) 93 reference to the history manager object (HistoryManager)
94 </dd><dt><i>parent</i></dt> 94 </dd><dt><i>parent</i></dt>
95 <dd> 95 <dd>
96 &#114;&#101;&#102;&#101;&#114;&#101;&#110;&#99;&#101; &#116;&#111; &#116;&#104;&#101; &#112;&#97;&#114;&#101;&#110;&#116; &#111;&#98;&#106;&#101;&#99;&#116; (&#81;&#79;&#98;&#106;&#101;&#99;&#116;) 96 reference to the parent object (QObject)
97 </dd> 97 </dd>
98 </dl><a NAME="HistoryModel.columnCount" ID="HistoryModel.columnCount"></a> 98 </dl><a NAME="HistoryModel.columnCount" ID="HistoryModel.columnCount"></a>
99 <h4>HistoryModel.columnCount</h4> 99 <h4>HistoryModel.columnCount</h4>
100 <b>columnCount</b>(<i>parent = QModelIndex()</i>) 100 <b>columnCount</b>(<i>parent = QModelIndex()</i>)
101 <p> 101 <p>
102 &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#103;&#101;&#116; &#116;&#104;&#101; &#110;&#117;&#109;&#98;&#101;&#114; &#111;&#102; &#99;&#111;&#108;&#117;&#109;&#110;&#115;. 102 Public method to get the number of columns.
103 </p><dl> 103 </p><dl>
104 <dt><i>parent</i></dt> 104 <dt><i>parent</i></dt>
105 <dd> 105 <dd>
106 &#105;&#110;&#100;&#101;x &#111;&#102; &#112;&#97;&#114;&#101;&#110;&#116; (&#81;&#77;&#111;&#100;&#101;&#108;&#73;&#110;&#100;&#101;x) 106 index of parent (QModelIndex)
107 </dd> 107 </dd>
108 </dl><dl> 108 </dl><dl>
109 <dt>Returns:</dt> 109 <dt>Returns:</dt>
110 <dd> 110 <dd>
111 &#110;&#117;&#109;&#98;&#101;&#114; &#111;&#102; &#99;&#111;&#108;&#117;&#109;&#110;&#115; (&#105;&#110;&#116;&#101;&#103;&#101;&#114;) 111 number of columns (integer)
112 </dd> 112 </dd>
113 </dl><a NAME="HistoryModel.data" ID="HistoryModel.data"></a> 113 </dl><a NAME="HistoryModel.data" ID="HistoryModel.data"></a>
114 <h4>HistoryModel.data</h4> 114 <h4>HistoryModel.data</h4>
115 <b>data</b>(<i>index, role = Qt.DisplayRole</i>) 115 <b>data</b>(<i>index, role = Qt.DisplayRole</i>)
116 <p> 116 <p>
117 &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#103;&#101;&#116; &#100;&#97;&#116;&#97; &#102;&#114;&#111;&#109; &#116;&#104;&#101; &#109;&#111;&#100;&#101;&#108;. 117 Public method to get data from the model.
118 </p><dl> 118 </p><dl>
119 <dt><i>index</i></dt> 119 <dt><i>index</i></dt>
120 <dd> 120 <dd>
121 &#105;&#110;&#100;&#101;x &#111;&#102; &#104;&#105;&#115;&#116;&#111;&#114;y &#101;&#110;&#116;&#114;y &#116;&#111; &#103;&#101;&#116; &#100;&#97;&#116;&#97; &#102;&#111;&#114; (&#81;&#77;&#111;&#100;&#101;&#108;&#73;&#110;&#100;&#101;x) 121 index of history entry to get data for (QModelIndex)
122 </dd><dt><i>role</i></dt> 122 </dd><dt><i>role</i></dt>
123 <dd> 123 <dd>
124 &#100;&#97;&#116;&#97; &#114;&#111;&#108;&#101; (&#105;&#110;&#116;&#101;&#103;&#101;&#114;) 124 data role (integer)
125 </dd> 125 </dd>
126 </dl><dl> 126 </dl><dl>
127 <dt>Returns:</dt> 127 <dt>Returns:</dt>
128 <dd> 128 <dd>
129 &#104;&#105;&#115;&#116;&#111;&#114;y &#101;&#110;&#116;&#114;y &#100;&#97;&#116;&#97; 129 history entry data
130 </dd> 130 </dd>
131 </dl><a NAME="HistoryModel.entryAdded" ID="HistoryModel.entryAdded"></a> 131 </dl><a NAME="HistoryModel.entryAdded" ID="HistoryModel.entryAdded"></a>
132 <h4>HistoryModel.entryAdded</h4> 132 <h4>HistoryModel.entryAdded</h4>
133 <b>entryAdded</b>(<i></i>) 133 <b>entryAdded</b>(<i></i>)
134 <p> 134 <p>
135 &#80;&#117;&#98;&#108;&#105;&#99; &#115;&#108;&#111;&#116; &#116;&#111; &#104;&#97;&#110;&#100;&#108;&#101; &#116;&#104;&#101; &#97;&#100;&#100;&#105;&#116;&#105;&#111;&#110; &#111;&#102; &#97; &#104;&#105;&#115;&#116;&#111;&#114;y &#101;&#110;&#116;&#114;y. 135 Public slot to handle the addition of a history entry.
136 </p><a NAME="HistoryModel.entryUpdated" ID="HistoryModel.entryUpdated"></a> 136 </p><a NAME="HistoryModel.entryUpdated" ID="HistoryModel.entryUpdated"></a>
137 <h4>HistoryModel.entryUpdated</h4> 137 <h4>HistoryModel.entryUpdated</h4>
138 <b>entryUpdated</b>(<i>row</i>) 138 <b>entryUpdated</b>(<i>row</i>)
139 <p> 139 <p>
140 &#80;&#117;&#98;&#108;&#105;&#99; &#115;&#108;&#111;&#116; &#116;&#111; &#104;&#97;&#110;&#100;&#108;&#101; &#116;&#104;&#101; &#117;&#112;&#100;&#97;&#116;&#101; &#111;&#102; &#97; &#104;&#105;&#115;&#116;&#111;&#114;y &#101;&#110;&#116;&#114;y. 140 Public slot to handle the update of a history entry.
141 </p><dl> 141 </p><dl>
142 <dt><i>row</i></dt> 142 <dt><i>row</i></dt>
143 <dd> 143 <dd>
144 &#114;&#111;w &#110;&#117;&#109;&#98;&#101;&#114; &#111;&#102; &#116;&#104;&#101; &#117;&#112;&#100;&#97;&#116;&#101;&#100; &#101;&#110;&#116;&#114;y (&#105;&#110;&#116;&#101;&#103;&#101;&#114;) 144 row number of the updated entry (integer)
145 </dd> 145 </dd>
146 </dl><a NAME="HistoryModel.headerData" ID="HistoryModel.headerData"></a> 146 </dl><a NAME="HistoryModel.headerData" ID="HistoryModel.headerData"></a>
147 <h4>HistoryModel.headerData</h4> 147 <h4>HistoryModel.headerData</h4>
148 <b>headerData</b>(<i>section, orientation, role = Qt.DisplayRole</i>) 148 <b>headerData</b>(<i>section, orientation, role = Qt.DisplayRole</i>)
149 <p> 149 <p>
150 &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#103;&#101;&#116; &#116;&#104;&#101; &#104;&#101;&#97;&#100;&#101;&#114; &#100;&#97;&#116;&#97;. 150 Public method to get the header data.
151 </p><dl> 151 </p><dl>
152 <dt><i>section</i></dt> 152 <dt><i>section</i></dt>
153 <dd> 153 <dd>
154 &#115;&#101;&#99;&#116;&#105;&#111;&#110; &#110;&#117;&#109;&#98;&#101;&#114; (&#105;&#110;&#116;&#101;&#103;&#101;&#114;) 154 section number (integer)
155 </dd><dt><i>orientation</i></dt> 155 </dd><dt><i>orientation</i></dt>
156 <dd> 156 <dd>
157 &#104;&#101;&#97;&#100;&#101;&#114; &#111;&#114;&#105;&#101;&#110;&#116;&#97;&#116;&#105;&#111;&#110; (&#81;&#116;.&#79;&#114;&#105;&#101;&#110;&#116;&#97;&#116;&#105;&#111;&#110;) 157 header orientation (Qt.Orientation)
158 </dd><dt><i>role</i></dt> 158 </dd><dt><i>role</i></dt>
159 <dd> 159 <dd>
160 &#100;&#97;&#116;&#97; &#114;&#111;&#108;&#101; (&#105;&#110;&#116;&#101;&#103;&#101;&#114;) 160 data role (integer)
161 </dd> 161 </dd>
162 </dl><dl> 162 </dl><dl>
163 <dt>Returns:</dt> 163 <dt>Returns:</dt>
164 <dd> 164 <dd>
165 &#104;&#101;&#97;&#100;&#101;&#114; &#100;&#97;&#116;&#97; 165 header data
166 </dd> 166 </dd>
167 </dl><a NAME="HistoryModel.historyReset" ID="HistoryModel.historyReset"></a> 167 </dl><a NAME="HistoryModel.historyReset" ID="HistoryModel.historyReset"></a>
168 <h4>HistoryModel.historyReset</h4> 168 <h4>HistoryModel.historyReset</h4>
169 <b>historyReset</b>(<i></i>) 169 <b>historyReset</b>(<i></i>)
170 <p> 170 <p>
171 &#80;&#117;&#98;&#108;&#105;&#99; &#115;&#108;&#111;&#116; &#116;&#111; &#114;&#101;&#115;&#101;&#116; &#116;&#104;&#101; &#109;&#111;&#100;&#101;&#108;. 171 Public slot to reset the model.
172 </p><a NAME="HistoryModel.removeRows" ID="HistoryModel.removeRows"></a> 172 </p><a NAME="HistoryModel.removeRows" ID="HistoryModel.removeRows"></a>
173 <h4>HistoryModel.removeRows</h4> 173 <h4>HistoryModel.removeRows</h4>
174 <b>removeRows</b>(<i>row, count, parent = QModelIndex()</i>) 174 <b>removeRows</b>(<i>row, count, parent = QModelIndex()</i>)
175 <p> 175 <p>
176 &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#114;&#101;&#109;&#111;v&#101; &#104;&#105;&#115;&#116;&#111;&#114;y &#101;&#110;&#116;&#114;&#105;&#101;&#115; &#102;&#114;&#111;&#109; &#116;&#104;&#101; &#109;&#111;&#100;&#101;&#108;. 176 Public method to remove history entries from the model.
177 </p><dl> 177 </p><dl>
178 <dt><i>row</i></dt> 178 <dt><i>row</i></dt>
179 <dd> 179 <dd>
180 &#114;&#111;w &#111;&#102; &#116;&#104;&#101; &#102;&#105;&#114;&#115;&#116; &#104;&#105;&#115;&#116;&#111;&#114;y &#101;&#110;&#116;&#114;y &#116;&#111; &#114;&#101;&#109;&#111;v&#101; (&#105;&#110;&#116;&#101;&#103;&#101;&#114;) 180 row of the first history entry to remove (integer)
181 </dd><dt><i>count</i></dt> 181 </dd><dt><i>count</i></dt>
182 <dd> 182 <dd>
183 &#110;&#117;&#109;&#98;&#101;&#114; &#111;&#102; &#104;&#105;&#115;&#116;&#111;&#114;y &#101;&#110;&#116;&#114;&#105;&#101;&#115; &#116;&#111; &#114;&#101;&#109;&#111;v&#101; (&#105;&#110;&#116;&#101;&#103;&#101;&#114;) 183 number of history entries to remove (integer)
184 </dd><dt><i>index</i></dt> 184 </dd><dt><i>index</i></dt>
185 <dd> 185 <dd>
186 &#111;&#102; &#116;&#104;&#101; &#112;&#97;&#114;&#101;&#110;&#116; &#101;&#110;&#116;&#114;y (&#81;&#77;&#111;&#100;&#101;&#108;&#73;&#110;&#100;&#101;x) 186 of the parent entry (QModelIndex)
187 </dd> 187 </dd>
188 </dl><dl> 188 </dl><dl>
189 <dt>Returns:</dt> 189 <dt>Returns:</dt>
190 <dd> 190 <dd>
191 &#102;&#108;&#97;&#103; &#105;&#110;&#100;&#105;&#99;&#97;&#116;&#105;&#110;&#103; &#115;&#117;&#99;&#99;&#101;&#115;&#115;&#102;&#117;&#108; &#114;&#101;&#109;&#111;v&#97;&#108; (&#98;&#111;&#111;&#108;&#101;&#97;&#110;) 191 flag indicating successful removal (boolean)
192 </dd> 192 </dd>
193 </dl><a NAME="HistoryModel.rowCount" ID="HistoryModel.rowCount"></a> 193 </dl><a NAME="HistoryModel.rowCount" ID="HistoryModel.rowCount"></a>
194 <h4>HistoryModel.rowCount</h4> 194 <h4>HistoryModel.rowCount</h4>
195 <b>rowCount</b>(<i>parent = QModelIndex()</i>) 195 <b>rowCount</b>(<i>parent = QModelIndex()</i>)
196 <p> 196 <p>
197 &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#100;&#101;&#116;&#101;&#114;&#109;&#105;&#110;&#101; &#116;&#104;&#101; &#110;&#117;&#109;&#98;&#101;&#114; &#111;&#102; &#114;&#111;w&#115;. 197 Public method to determine the number of rows.
198 </p><dl> 198 </p><dl>
199 <dt><i>parent</i></dt> 199 <dt><i>parent</i></dt>
200 <dd> 200 <dd>
201 &#105;&#110;&#100;&#101;x &#111;&#102; &#112;&#97;&#114;&#101;&#110;&#116; (&#81;&#77;&#111;&#100;&#101;&#108;&#73;&#110;&#100;&#101;x) 201 index of parent (QModelIndex)
202 </dd> 202 </dd>
203 </dl><dl> 203 </dl><dl>
204 <dt>Returns:</dt> 204 <dt>Returns:</dt>
205 <dd> 205 <dd>
206 &#110;&#117;&#109;&#98;&#101;&#114; &#111;&#102; &#114;&#111;w&#115; (&#105;&#110;&#116;&#101;&#103;&#101;&#114;) 206 number of rows (integer)
207 </dd> 207 </dd>
208 </dl> 208 </dl>
209 <div align="right"><a href="#top">Up</a></div> 209 <div align="right"><a href="#top">Up</a></div>
210 <hr /> 210 <hr />
211 </body></html> 211 </body></html>

eric ide

mercurial