/*
   SPDX-FileCopyrightText: 2022-2026 Laurent Montel <montel@kde.org>

   SPDX-License-Identifier: LGPL-2.0-or-later
*/

#include "uploadwidget.h"
#include "room/uploadfileprogressstatuslistwidget.h"
#include <QPushButton>
#include <QVBoxLayout>
using namespace Qt::Literals::StringLiterals;
int UploadWidget::identifier = 0;
UploadWidget::UploadWidget(QWidget *parent)
    : QWidget{parent}
    , mUploadFileProgressStatusListWidget(new UploadFileProgressStatusListWidget(this))
{
    auto mainLayout = new QVBoxLayout(this);
    auto addElement = new QPushButton(u"Add"_s, this);
    mainLayout->addWidget(mUploadFileProgressStatusListWidget);
    mainLayout->addWidget(addElement);
    connect(addElement, &QPushButton::clicked, this, &UploadWidget::addButton);
}

void UploadWidget::addButton()
{
    mUploadFileProgressStatusListWidget->addProgressStatusWidget(++identifier);
    // TODO
}

#include "moc_uploadwidget.cpp"
