3
* KBluetooth4 - KDE Bluetooth Framework
5
* Copyright (C) 2008 Tom Patzig <tpatzig@suse.de>
7
* This file is part of kbluetooth4.
9
* kbluetooth4 is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; either version 2 of the License, or
12
* (at your option) any later version.
14
* kbluetooth4 is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
19
* You should have received a copy of the GNU General Public License
20
* along with kbluetooth4; if not, write to the Free Software
21
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29
#include <QSystemTrayIcon>
32
#include <kaboutapplicationdialog.h>
33
#include <kaboutdata.h>
34
#include <klocalizedstring.h>
36
#include <KConfigGroup>
37
#include <KFileDialog>
43
#include <QMainWindow>
46
#include <solid/control/bluetoothmanager.h>
47
#include <solid/control/bluetoothsecurity.h>
50
#include "adapterconfig.h"
51
#include "authagent.h"
52
#include "passkeyagent.h"
53
#include "inputwizard/wizarddialog.h"
54
#include "device-manager/devicemanager.h"
55
#include "obexsession/obexsession.h"
56
#include "deviceselector/devicesel.h"
59
class KBlueTray : public QObject
64
KBlueTray(QObject* parent = 0);
71
QSystemTrayIcon* tray;
72
// KSystemTrayIcon* tray;
77
QAction* adapterAction;
78
QAction* wizardAction;
79
QAction* sendToAction;
80
QAction* lockConfigureAction;
81
QAction* lockEnableAction;
85
KConfigGroup* confGroup;
87
AdapterConfig* adapterConfig;
89
Solid::Control::BluetoothSecurity* secure;
90
Solid::Control::BluetoothInterface* adapter;
93
PasskeyAgent* passagent;
97
QString defaultAdapterUBI;
100
DeviceSel* devSelector;
101
DeviceSel* lockSelector;
103
QProgressDialog* progress;
105
qulonglong totalFileSize;
107
bool kblueLockEnabled;
109
QDBusConnection* dbus;
115
void slotQuitApp(bool);
116
void showAboutInfo();
117
void showAdapterInterface();
121
void slotSendFile(const QString&,const QString&);
123
void obexSessionReady();
124
void onlineMode(Solid::Control::BluetoothManager&);
127
void adapterAdded(const QString&);
128
void adapterRemoved(const QString&);
129
void defaultAdapterChanged(const QString&);
130
void slotFileSendFinished();
131
void slotTransferProgress(qulonglong);
132
void slotFileSendCanceled();
133
void slotFileSendStarted(const QString& ,const QString& ,qulonglong );
136
void enableBlueLock(QString,const QString&);
137
void slotValidateLockDev(const QString&);
138
void slotConfigureKBlueLock();
139
void disableBlueLock();
140
void slotBlueSelectorCancelled();
141
void slotTargetDeviceFound(const QString&,int,int);
142
void slotModeChanged(Solid::Control::BluetoothInterface::Mode mode);
143
void slotNameChanged(const QString& name);
144
void slotRemoteDeviceConnected(const QString&);
145
void slotRemoteDeviceDisconnected(const QString&);