~ubuntu-branches/ubuntu/maverick/bluedevil/maverick-proposed

« back to all changes in this revision

Viewing changes to src/wizard/pages/discoverpage.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2010-08-07 09:04:19 UTC
  • Revision ID: james.westby@ubuntu.com-20100807090419-68k54ucso2htcf5z
Tags: upstream-1.0~rc2
ImportĀ upstreamĀ versionĀ 1.0~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright (C) 2010 UFO Coders <info@ufocoders.com>
 
3
 
 
4
    This program is free software: you can redistribute it and/or modify
 
5
    it under the terms of the GNU General Public License as published by
 
6
    the Free Software Foundation, either version 3 of the License, or
 
7
    (at your option) any later version.
 
8
 
 
9
    This program is distributed in the hope that it will be useful,
 
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
    GNU General Public License for more details.
 
13
 
 
14
    You should have received a copy of the GNU General Public License
 
15
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
16
*/
 
17
 
 
18
 
 
19
#ifndef DISCOVERPAGE_H
 
20
#define DISCOVERPAGE_H
 
21
 
 
22
#include "ui_discover.h"
 
23
#include <QWizardPage>
 
24
 
 
25
class QTimer;
 
26
class BlueWizard;
 
27
 
 
28
namespace BlueDevil {
 
29
    class Device;
 
30
}
 
31
using namespace BlueDevil;
 
32
 
 
33
class DiscoverPage : public QWizardPage
 
34
, public Ui::Discover
 
35
{
 
36
Q_OBJECT
 
37
 
 
38
public:
 
39
    DiscoverPage(QWidget* parent = 0);
 
40
    virtual ~DiscoverPage();
 
41
 
 
42
    virtual void initializePage();
 
43
    virtual void cleanupPage();
 
44
    virtual bool isComplete() const;
 
45
    virtual int nextId() const;
 
46
private Q_SLOTS:
 
47
    void startScan();
 
48
    void deviceFound(Device * device);
 
49
    void timeout();
 
50
    void itemSelected(QListWidgetItem* item);
 
51
    void leavePage(int id);
 
52
 
 
53
private:
 
54
    void stopScan();
 
55
 
 
56
private:
 
57
    char m_counter;
 
58
 
 
59
    QTimer *m_timer;
 
60
    BlueWizard *m_wizard;
 
61
};
 
62
 
 
63
#endif // DISCOVERPAGE_H