does not need DQT3_SUPPORT
[kdenetwork.git] / kppp / docking.h
blobf417340ccce21d54f596b9c7f02b13c3b94e8a1b
1 /*
2 * kPPP: A pppd Front End for the KDE project
4 * $Id$
6 * Copyright (C) 1997 Bernd Johannes Wuebben
7 * wuebben@math.cornell.edu
9 * This file was contributed by Harri Porten <porten@tu-harburg.de>
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Library General Public
14 * License as published by the Free Software Foundation; either
15 * version 2 of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Library General Public License for more details.
22 * You should have received a copy of the GNU Library General Public
23 * License along with this program; if not, write to the Free
24 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
28 #ifndef _DOCKING_H_
29 #define _DOCKING_H_
31 #include <qpixmap.h>
32 //Added by qt3to4:
33 #include <QMouseEvent>
34 #include <QShowEvent>
35 #include <QPaintEvent>
36 #include <ksystemtrayicon.h>
38 class PPPStats;
40 class DockWidget : public KSystemTrayIcon {
41 Q_OBJECT
42 public:
43 DockWidget(QWidget * parent, const char *name, PPPStats *st);
44 ~DockWidget();
46 protected:
47 void showEvent(QShowEvent *) { }
49 private slots:
50 void toggle_window_state();
51 void mousePressEvent(QMouseEvent *e);
53 public slots:
54 void paintIcon(int);
55 void take_stats();
56 void stop_stats();
58 public:
59 static DockWidget *dock_widget;
61 private:
62 int toggleID;
63 PPPStats *stats;
65 QMenu *popup_m;
67 QPixmap dock_none_pixmap;
68 QPixmap dock_left_pixmap;
69 QPixmap dock_right_pixmap;
70 QPixmap dock_both_pixmap;
73 #endif