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

« back to all changes in this revision

Viewing changes to src/trayicon.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
 *  KBluetooth4 - KDE Bluetooth Framework
 
4
 *
 
5
 *  Copyright (C) 2008  Tom Patzig <tpatzig@suse.de>
 
6
 *
 
7
 *  This file is part of kbluetooth4.
 
8
 *
 
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.
 
13
 *
 
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.
 
18
 *
 
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
 
22
 *
 
23
*/
 
24
 
 
25
 
 
26
#ifndef KBLUETRAY_H
 
27
#define KBLUETRAY_H
 
28
 
 
29
#include <QSystemTrayIcon>
 
30
 
 
31
#include <kdialog.h>
 
32
#include <kaboutapplicationdialog.h>
 
33
#include <kaboutdata.h>
 
34
#include <klocalizedstring.h>
 
35
#include <KConfig>
 
36
#include <KConfigGroup>
 
37
#include <KFileDialog>
 
38
#include <KIcon>
 
39
#include <KProcess>
 
40
#include <QtGui>
 
41
#include <QtDBus>
 
42
 
 
43
#include <QMainWindow>
 
44
 
 
45
 
 
46
#include <solid/control/bluetoothmanager.h>
 
47
#include <solid/control/bluetoothsecurity.h>
 
48
 
 
49
 
 
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"
 
57
 
 
58
 
 
59
class KBlueTray : public QObject
 
60
{
 
61
Q_OBJECT
 
62
 
 
63
public:
 
64
         KBlueTray(QObject* parent = 0);
 
65
         ~KBlueTray();
 
66
 
 
67
private:
 
68
 
 
69
         QStringList modes;
 
70
         QString toolTipInfo;
 
71
         QSystemTrayIcon* tray;
 
72
//       KSystemTrayIcon* tray;
 
73
         QMenu* mainmenu;
 
74
 
 
75
         QAction* quitAction;
 
76
         QAction* aboutAction;
 
77
         QAction* adapterAction;
 
78
         QAction* wizardAction;
 
79
         QAction* sendToAction;
 
80
         QAction* lockConfigureAction;
 
81
         QAction* lockEnableAction;
 
82
         QMenu* kbluelockMenu;
 
83
         
 
84
         KConfig* config;
 
85
         KConfigGroup* confGroup;
 
86
 
 
87
         AdapterConfig* adapterConfig;
 
88
 
 
89
         Solid::Control::BluetoothSecurity* secure;
 
90
         Solid::Control::BluetoothInterface* adapter;
 
91
 
 
92
         AuthAgent* authagent;
 
93
         PasskeyAgent* passagent;
 
94
 
 
95
         ObexSession* session;
 
96
 
 
97
         QString defaultAdapterUBI;
 
98
         bool online;
 
99
 
 
100
         DeviceSel* devSelector;
 
101
         DeviceSel* lockSelector;
 
102
         QString fileToSend;
 
103
         QProgressDialog* progress;
 
104
        
 
105
         qulonglong totalFileSize;
 
106
         QString lockDevice;
 
107
         bool kblueLockEnabled;
 
108
 
 
109
         QDBusConnection* dbus;
 
110
 
 
111
 
 
112
 
 
113
 
 
114
public slots:
 
115
         void slotQuitApp(bool);
 
116
         void showAboutInfo();
 
117
         void showAdapterInterface();
 
118
         void showWizard();
 
119
         void showManager();
 
120
         void sendFile();
 
121
         void slotSendFile(const QString&,const QString&);
 
122
 
 
123
         void obexSessionReady();
 
124
         void onlineMode(Solid::Control::BluetoothManager&);
 
125
         void offlineMode();
 
126
 
 
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 );
 
134
 
 
135
         void enableLock();
 
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&);
 
146
 
 
147
 
 
148
};
 
149
 
 
150
 
 
151
#endif