Archive Search¶
ArchiveResultsTableModel(parent=None)
¶
Bases: QAbstractTableModel
This table model holds the results of an archiver appliance PV search. This search is for names matching the input search words, and the results are a list of PV names that match that search.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parent
|
QObject
|
The parent item of this table |
None
|
Source code in trace/widgets/archive_search.py
48 49 50 51 | |
rowCount(index=QModelIndex())
¶
Return the row count of the table
Source code in trace/widgets/archive_search.py
53 54 55 56 57 | |
columnCount(index=QModelIndex())
¶
Return the column count of the table
Source code in trace/widgets/archive_search.py
59 60 61 62 63 | |
data(index, role)
¶
Return the data for the associated role. Currently only supporting DisplayRole.
Source code in trace/widgets/archive_search.py
65 66 67 68 69 70 71 72 73 | |
headerData(section, orientation, role=Qt.DisplayRole)
¶
Return data associated with the header
Source code in trace/widgets/archive_search.py
75 76 77 78 79 80 | |
flags(index)
¶
Return flags that determine how users can interact with the items in the table
Source code in trace/widgets/archive_search.py
82 83 84 85 | |
append(pv)
¶
Appends a row to this table given the PV name as input
Source code in trace/widgets/archive_search.py
87 88 89 90 91 92 | |
replace_rows(pvs)
¶
Overwrites any existing rows in the table with the input list of PV names
Source code in trace/widgets/archive_search.py
94 95 96 97 98 99 | |
clear()
¶
Clear out all data stored in this table
Source code in trace/widgets/archive_search.py
101 102 103 104 105 106 | |
sort(col, order=Qt.AscendingOrder)
¶
Sort the table by PV name
Source code in trace/widgets/archive_search.py
108 109 110 111 | |
ArchiveSearchWidget(parent=None)
¶
Bases: QWidget
Widget for searching and selecting PVs from the EPICS archiver appliance.
This widget provides a search interface for finding PVs by name patterns using the archiver appliance. Users can search for PVs and add them to the plot by selecting them from the results table.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parent
|
QObject
|
The parent item of this widget |
None
|
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parent
|
QObject
|
The parent object |
None
|
Source code in trace/widgets/archive_search.py
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | |
selectedPVs()
¶
Get the list of selected PVs from the results table.
Returns:
| Type | Description |
|---|---|
list[str]
|
List of selected PV names |
Source code in trace/widgets/archive_search.py
192 193 194 195 196 197 198 199 200 201 202 203 204 | |
startDragAction(supported_actions)
¶
Handle drag action for PV names.
This method is called when a user initiates a drag action for one of the results in the table. It allows dragging PV names onto a plot to automatically start drawing data for that PV.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
supported_actions
|
DropActions
|
The supported drop actions, unused |
required |
Source code in trace/widgets/archive_search.py
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | |
keyPressEvent(e)
¶
Handle key press events for search submission.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
e
|
QKeyEvent
|
The key press event |
required |
Source code in trace/widgets/archive_search.py
224 225 226 227 228 229 230 231 232 233 234 | |
request_archiver_info()
¶
Send a search request to the archiver appliance.
Converts the search text to a regex pattern and queries the archiver appliance for matching PV names.
Source code in trace/widgets/archive_search.py
236 237 238 239 240 241 242 243 244 245 246 247 248 249 | |
populate_results_list(reply)
¶
Handle the response from the archiver appliance search.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
reply
|
QNetworkReply
|
The network reply containing search results |
required |
Source code in trace/widgets/archive_search.py
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 | |