| 91 | } |
| 92 | |
| 93 | void SelectVolume::load(const QString &json, const VolumeSearchQuery &searchQuery) |
| 94 | { |
| 95 | auto tempM = new VolumesModel(); |
| 96 | tempM->load(json); |
| 97 | // tableVolumes->setModel(tempM); |
| 98 | |
| 99 | proxyModel->setSourceModel(tempM); |
| 100 | tableVolumes->setModel(proxyModel); |
| 101 | tableVolumes->sortByColumn(0, Qt::AscendingOrder); |
| 102 | tableVolumes->resizeColumnsToContents(); |
| 103 | |
| 104 | if (model != 0) |
| 105 | delete model; |
| 106 | |
| 107 | model = tempM; |
| 108 | |
| 109 | if (model->rowCount() > 0) { |
| 110 | tableVolumes->selectRow(0); |
| 111 | loadVolumeInfo(proxyModel->index(0, 0)); |
| 112 | } |
| 113 | |
| 114 | tableVolumes->setColumnWidth(0, 350); |
| 115 | |
| 116 | currentSearchQuery = searchQuery; |
| 117 | paginator->update(json); |
| 118 | } |
| 119 | |
| 120 | void SelectVolume::loadNextPage() |
| 121 | { |