1 | /* This file is part of the KDE project |
2 | Copyright (C) 2007 Will Stephenson <wstephenson@kde.org> |
3 | |
4 | This library is free software; you can redistribute it and/or |
5 | modify it under the terms of the GNU Library General Public |
6 | License version 2 as published by the Free Software Foundation. |
7 | |
8 | This library is distributed in the hope that it will be useful, |
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
11 | Library General Public License for more details. |
12 | |
13 | You should have received a copy of the GNU Library General Public License |
14 | along with this library. If not, write to the Free Software |
15 | Foundation, Inc., 51 Franklin Street, Fifth Floor, |
16 | Boston, MA 02110-1301, USA. |
17 | |
18 | As a special exception, permission is given to link this library |
19 | with any edition of Qt, and distribute the resulting executable, |
20 | without including the source code for Qt in the source distribution. |
21 | */ |
22 | |
23 | #ifndef KDE_KSTATUSBAROFFLINEINDICATOR_H |
24 | #define KDE_KSTATUSBAROFFLINEINDICATOR_H |
25 | |
26 | #include <QtGui/QWidget> |
27 | #include <kio/kio_export.h> |
28 | #include <solid/networking.h> |
29 | |
30 | class KStatusBarOfflineIndicatorPrivate; |
31 | /** |
32 | * Widget indicating network connection status using an icon and tooltip. This widget uses |
33 | * Solid::Networking internally to automatically show and hide itself as required. |
34 | * |
35 | * @code |
36 | * KStatusBarOfflineIndicator * indicator = new KStatusBarOfflineIndicator( this ); |
37 | * statusBar()->addWidget( indicator, 0, false ); |
38 | * @endcode |
39 | * |
40 | * @author Will Stephenson <wstephenson@kde.org> |
41 | */ |
42 | class KIO_EXPORT KStatusBarOfflineIndicator : public QWidget |
43 | { |
44 | Q_OBJECT |
45 | public: |
46 | /** |
47 | * Default constructor. |
48 | * @param parent the widget's parent |
49 | */ |
50 | explicit KStatusBarOfflineIndicator( QWidget * parent ); |
51 | ~KStatusBarOfflineIndicator(); |
52 | |
53 | private: |
54 | KStatusBarOfflineIndicatorPrivate * const d; |
55 | |
56 | Q_PRIVATE_SLOT( d, void _k_networkStatusChanged( Solid::Networking::Status ) ) |
57 | }; |
58 | |
59 | #endif |
60 | |
61 | |