~mateo-salta/nitroshare/nitroshare

« back to all changes in this revision

Viewing changes to src/CAcceptPromptDialog.cpp

  • Committer: Nathan Osman
  • Date: 2012-06-20 04:12:55 UTC
  • Revision ID: admin@quickmediasolutions.com-20120620041255-q9h0r4phyz3x6vqw
Implemented security policy for incoming files... even though they still aren't properly stored on the receiving end.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#include <CAcceptPromptDialog.h>
18
18
#include "ui_CAcceptPromptDialog.h"
19
19
 
20
 
CAcceptPromptDialog::CAcceptPromptDialog()
 
20
CAcceptPromptDialog::CAcceptPromptDialog(QString hostname, QList<CFileHeader> files)
21
21
    : ui(new Ui::CAcceptPromptDialog)
22
22
{
23
23
    ui->setupUi(this);
 
24
 
 
25
    // Set the label according to the parameters supplied
 
26
    ui->DescriptionLabel->setText(tr("%1 would like to send you the following file(s):").arg(hostname));
 
27
 
 
28
    ui->FileList->setColumnWidth(ui->FileList->columnAt(1), 250);
 
29
 
 
30
    // Enter the files into the table
 
31
    foreach(CFileHeader file, files)
 
32
    {
 
33
        ui->FileList->insertRow(0);
 
34
        ui->FileList->setItem(0, 0, new QTableWidgetItem(file.filename));
 
35
        QTableWidgetItem * item = new QTableWidgetItem(QString::number(file.size));
 
36
        item->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
 
37
        ui->FileList->setItem(0, 1, item);
 
38
    }
24
39
}
25
40
 
26
41
CAcceptPromptDialog::~CAcceptPromptDialog()