Main Page | Alphabetical List | Class List | File List | Class Members

monitor.h

00001 /*
00002  * $Id: monitor.h,v 1.1.1.1 2005/05/06 17:56:45 akos Exp $
00003  *
00004  * Copyright (C) 2005 by Akos Polster <akos@pipacs.com>
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful, but
00012  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
00013  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00014  * for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License along
00017  * with this program; if not, write to the Free Software Foundation, Inc.,
00018  * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00019  */
00020 
00021 #ifndef MONITOR_H
00022 #define MONITOR_H
00023 
00024 #include <qpixmap.h>
00025 #include <qtimer.h>
00026 #include <qwidget.h>
00027 
00028 #include "connectionlist.h"
00029 #include "selector.h"
00030 #include "vpnc.h"
00031 
00036 class Monitor: public QWidget
00037 {
00038     Q_OBJECT
00039 
00040 public:
00041     Monitor(ConnectionList &connList, QWidget *parent);
00042     ~Monitor();
00043 
00045     static const int POLL_INTERVAL = 1700;
00046 
00047 protected slots:
00048     void poll();
00049 
00050 protected:
00051     void mousePressEvent(QMouseEvent *);
00052 
00053 private:
00054     ConnectionList &connList_;
00055     void paintEvent(QPaintEvent*);
00056     void connectVpn();
00057     void disconnectVpn();
00058     Vpnc::State currentState;
00059     QString currentConnection;
00060     QString currentPid;
00061     QPixmap disconnected;
00062     QPixmap connecting;
00063     QPixmap connected;
00064     QTimer timer;
00065     Selector selDlg;
00066 };
00067 
00068 #endif // MONITOR_H

Generated on Fri Aug 19 23:02:10 2005 for Viperin-Z by  doxygen 1.4.4