mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-29 06:35:40 +03:00
feat: choosing complete
This commit is contained in:
@@ -32,11 +32,14 @@ void UpdateNotifyWidget::addToList(FileData localFileData,FileData serverFileDat
|
||||
{
|
||||
QString itemName = localFileData.path;
|
||||
itemName = itemName.remove(streamingAssetsPath);
|
||||
itemName.append("Сервер: ");
|
||||
itemName.append(serverFileData.lastUpdate);
|
||||
itemName.append("Локально: ");
|
||||
itemName.append(localFileData.lastUpdate);
|
||||
ui->updateListWidget->addItem(itemName);
|
||||
UpdateFileSlot *slot = new UpdateFileSlot();
|
||||
QListWidgetItem *widgetItem = new QListWidgetItem();
|
||||
|
||||
widgetItem->setSizeHint(QSize(slot->width(),slot->height()));
|
||||
ui->updateListWidget->addItem(widgetItem);
|
||||
ui->updateListWidget->setItemWidget(widgetItem,slot);
|
||||
|
||||
slot->fill(itemName,serverFileData,localFileData);
|
||||
}
|
||||
|
||||
void UpdateNotifyWidget::showTryChangeBase()
|
||||
@@ -128,6 +131,24 @@ void UpdateNotifyWidget::closeWindow()
|
||||
on_closeButton_clicked();
|
||||
}
|
||||
|
||||
QList<FileData> *UpdateNotifyWidget::getUpdateList()
|
||||
{
|
||||
QList<FileData> *realUpdateList = new QList<FileData>();
|
||||
|
||||
for (int i = 0; i < ui->updateListWidget->count(); i++) {
|
||||
QListWidgetItem *item = ui->updateListWidget->item(i);
|
||||
UpdateFileSlot *slot = qobject_cast<UpdateFileSlot*>(ui->updateListWidget->itemWidget(item));
|
||||
|
||||
if (slot && slot->getNeedUpdate())
|
||||
{
|
||||
realUpdateList->append(slot->getLocal());
|
||||
}
|
||||
}
|
||||
|
||||
return realUpdateList;
|
||||
|
||||
}
|
||||
|
||||
void UpdateNotifyWidget::setUpdateState()
|
||||
{
|
||||
ui->undoChangesButton->show();
|
||||
|
||||
Reference in New Issue
Block a user