1
/***************************************************************************
2
* This file is part of the KDE project *
4
* Copyright (C) 2010 Alejandro Fiestas Olivares <alex@ufocoders.com> *
5
* Copyright (C) 2010 UFO Coders <info@ufocoders.com> *
7
* This program is free software; you can redistribute it and/or modify *
8
* it under the terms of the GNU General Public License as published by *
9
* the Free Software Foundation; either version 2 of the License, or *
10
* (at your option) any later version. *
12
* This program is distributed in the hope that it will be useful, *
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15
* GNU General Public License for more details. *
17
* You should have received a copy of the GNU General Public License *
18
* along with this program; if not, write to the *
19
* Free Software Foundation, Inc., *
20
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
21
***************************************************************************/
23
#include "selectdevicepage.h"
24
#include "discoverwidget.h"
25
#include "../sendfilewizard.h"
27
#include <QtGui/QVBoxLayout>
28
#include <kfilewidget.h>
29
#include <kdiroperator.h>
31
#include <bluedevil/bluedevil.h>
33
using namespace BlueDevil;
34
SelectDevicePage::SelectDevicePage(QWidget* parent): QWizardPage(parent)
36
DiscoverWidget *widget = new DiscoverWidget(this);
37
QVBoxLayout *layout = new QVBoxLayout(this);
38
layout->addWidget(widget);
40
connect(widget, SIGNAL(deviceSelected(Device*)), this, SLOT(deviceSelected(Device*)));
44
void SelectDevicePage::deviceSelected(Device* device)
46
static_cast<SendFileWizard* >(wizard())->setDevice(device);
47
emit completeChanged();
50
bool SelectDevicePage::isComplete() const
52
if (!static_cast<SendFileWizard* >(wizard())->device()) {