summaryrefslogtreecommitdiff
path: root/plugins/CopyEngine/Ultracopier/DebugDialog.cpp
blob: 0b3fec49e67193132c780008526da30394a07741 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/** \file debugDialog.cpp
\brief Define the dialog to have debug information
\author alpha_one_x86 */

#include "DebugDialog.h"
#include "ui_debugDialog.h"

#ifdef ULTRACOPIER_PLUGIN_DEBUG_WINDOW

DebugDialog::DebugDialog(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::debugDialog)
{
    ui->setupUi(this);
}

DebugDialog::~DebugDialog()
{
    delete ui;
}

void DebugDialog::setTransferList(const std::vector<std::string> &list)
{
    ui->tranferList->clear();
    unsigned int index=0;
    while(index<list.size())
    {
        ui->tranferList->addItem(QString::fromStdString(list.at(index)));
        index++;
    }
}

void DebugDialog::setActiveTransfer(const int &activeTransfer)
{
    ui->spinBoxActiveTransfer->setValue(activeTransfer);
}

void DebugDialog::setInodeUsage(const int &inodeUsage)
{
    ui->spinBoxNumberOfInode->setValue(inodeUsage);
}

void DebugDialog::setTransferThreadList(const std::vector<std::string> &list)
{
    ui->transferThreadList->clear();
    unsigned int index=0;
    while(index<list.size())
    {
        ui->transferThreadList->addItem(QString::fromStdString(list.at(index)));
        index++;
    }
}

#endif