~mateo-salta/nitroshare/nitroshare

« back to all changes in this revision

Viewing changes to src/dialogs/CMachineSelectionDialog.cpp

  • Committer: Nathan Osman
  • Date: 2012-06-26 23:07:20 UTC
  • Revision ID: admin@quickmediasolutions.com-20120626230720-uzgqoc5w7lnowgx7
Added wizard to run when NitroShare is first started to guide new users in configuring the application.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#include <dialogs/CMachineSelectionDialog.h>
18
18
#include "ui_CMachineSelectionDialog.h"
19
19
 
20
 
CMachineSelectionDialog::CMachineSelectionDialog(MachineMap machine_list)
 
20
CMachineSelectionDialog::CMachineSelectionDialog(MachineMap machine_list, QString label, bool include_select)
21
21
    : ui(new Ui::CMachineSelectionDialog)
22
22
{
23
23
    ui->setupUi(this);
 
24
    ui->MachinesLabel->setText(label);
24
25
 
25
 
    // Populate the machine list
 
26
    /* Populate the machine list. */
26
27
    for(MachineMap::const_iterator i = machine_list.constBegin();i != machine_list.constEnd();++i)
27
28
    {
28
29
        QListWidgetItem * item = new QListWidgetItem(i.value().name, ui->Machines);
29
30
        item->setData(Qt::UserRole, i.key());
30
31
    }
31
32
 
 
33
    if(include_select)
 
34
        ui->Machines->addItem("[Select Machine]");
 
35
 
32
36
    ui->Machines->setCurrentRow(0);
33
37
}
34
38