~ubuntu-branches/ubuntu/intrepid/kdebluetooth/intrepid-proposed

« back to all changes in this revision

Viewing changes to kdebluetooth/kbluelock/kbluelock.h

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Mercatante
  • Date: 2008-08-07 09:49:47 UTC
  • mto: This revision was merged to the branch mainline in revision 56.
  • Revision ID: james.westby@ubuntu.com-20080807094947-pj6q3uxwuv7l844q
Tags: upstream-0.1
ImportĀ upstreamĀ versionĀ 0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 *
3
 
 *  KDE Bluetooth Screen Locker 
4
 
 *
5
 
 *  Copyright (C) 2007  Tom Patzig <tpatzig@suse.de>
6
 
 *
7
 
 *
8
 
 *  This file is part of kbluelock.
9
 
 *
10
 
 *  kbluelock is free software; you can redistribute it and/or modify
11
 
 *  it under the terms of the GNU General Public License as published by
12
 
 *  the Free Software Foundation; either version 2 of the License, or
13
 
 *  (at your option) any later version.
14
 
 *
15
 
 *  kbluelock is distributed in the hope that it will be useful,
16
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 
 *  GNU General Public License for more details.
19
 
 *
20
 
 *  You should have received a copy of the GNU General Public License
21
 
 *  along with kbluelock; if not, write to the Free Software
22
 
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
23
 
 *
24
 
 */
25
 
#ifndef KBLUELOCK_H
26
 
#define KBLUELOCK_H
27
 
 
28
 
#include <libkbluetooth/manager.h>
29
 
#include <libkbluetooth/adapter.h>
30
 
#include <libkbluetooth/dbussignal.h>
31
 
#include <libkbluetooth/dbusinit.h>
32
 
#include <qpushbutton.h>
33
 
#include <qmessagebox.h>
34
 
#include <qlistview.h>
35
 
#include <klocale.h>
36
 
#include <ksystemtray.h>
37
 
#include <qstringlist.h>
38
 
#include <qcheckbox.h>
39
 
#include <qmainwindow.h>
40
 
#include <qtooltip.h>
41
 
#include <kapplication.h>
42
 
#include <kuniqueapplication.h>
43
 
#include <kpixmap.h>
44
 
#include <kiconloader.h>
45
 
#include <kmessagebox.h>
46
 
#include <kprocess.h>
47
 
#include <khelpmenu.h>
48
 
#include <kaction.h>
49
 
#include <kpopupmenu.h>
50
 
#include <dcopclient.h>
51
 
#include <qheader.h>
52
 
#include <qstatusbar.h>
53
 
#include <qlayout.h>
54
 
#include <qcstring.h>
55
 
 
56
 
#include "lockdialog.h"
57
 
 
58
 
using namespace KBluetooth;
59
 
 
60
 
class KBlueLock : public LockDialog {
61
 
        
62
 
        Q_OBJECT
63
 
 
64
 
public:
65
 
        KBlueLock();
66
 
        ~KBlueLock();
67
 
        DBusInit* dbus;
68
 
        DBusConnection *conn;
69
 
        Manager *manager;
70
 
        Adapter *adapter;
71
 
        KApplication* Kapp;
72
 
        KHelpMenu *helpMenu;
73
 
        QStringList *setupNewDevList;
74
 
        QListViewItem *newdev;
75
 
        KSystemTray *systray;
76
 
        QToolTip *tooltip;
77
 
 
78
 
private:
79
 
        QString name;
80
 
        QString addr;
81
 
        DCOPClient* dcopclient;
82
 
        
83
 
        KAction* disableAction;
84
 
        KAction* enableAction;
85
 
        bool on;
86
 
        bool selfstart;
87
 
        bool unlock;
88
 
        bool locked;
89
 
        int size;
90
 
        QStatusBar* statusbar;
91
 
 
92
 
public slots:
93
 
 
94
 
        void insertDev(const QString&, int, short);
95
 
        void cancelSlot();
96
 
        void okSlot();
97
 
        void checkBoxSlot(bool);
98
 
        void activateLock(const QString&);
99
 
        void slotAbout() { helpMenu->aboutApplication(); };
100
 
        void setupTray();
101
 
        void updateDevName(const QString&, const QString&);
102
 
        void disableActionSlot();
103
 
        void enableActionSlot();
104
 
        void restartPeriodicDiscovery();
105
 
        void quitSysTray();
106
 
        void slotSearch();
107
 
        void slotEnableSearch();
108
 
        void setDiscoverStatusOn();
109
 
        void activateUnlock(const QString&,int, short);
110
 
        void slotStartPeriodicDisco();
111
 
 
112
 
};
113
 
 
114
 
#endif