summaryrefslogtreecommitdiff
path: root/plugins-alternative/CopyEngine/Rsync/debugDialog.cpp
blob: a03aec0b085755106158eb266cfc79b2e79ef794 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/** \file debugDialog.cpp
\brief Define the dialog to have debug information
\author alpha_one_x86
\version 0.3
\date 2010 */

#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 QStringList &list)
{
	if(list.size()==ui->tranferList->count())
	{
		int index=0;
		while(index<list.size())
		{
			ui->tranferList->item(index)->setText(list.at(index));
			index++;
		}
	}
	else
	{
		ui->tranferList->clear();
		ui->tranferList->addItems(list);
	}
}

void debugDialog::setActiveTransfer(int activeTransfer)
{
	ui->spinBoxActiveTransfer->setValue(activeTransfer);
}

void debugDialog::setInodeUsage(int inodeUsage)
{
	ui->spinBoxNumberOfInode->setValue(inodeUsage);
}

void debugDialog::setTransferThreadList(const QStringList &list)
{
	if(list.size()==ui->transferThreadList->count())
	{
		int index=0;
		while(index<list.size())
		{
			ui->transferThreadList->item(index)->setText(list.at(index));
			index++;
		}
	}
	else
	{
		ui->transferThreadList->clear();
		ui->transferThreadList->addItems(list);
	}
}

#endif