/***************************************************************************
                         kbandwidthview.h  -  description
                             -------------------
    copyright            : (C) 2007 by Hans Dembinski
    email                : kbandwidth@5th-heaven.org
    original author      : Niko Sommer
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef KBANDWIDTH_H
#define KBANDWIDTH_H

#include <kpanelapplet.h>

#include "kbandwidthview.h"
#include "preferencesdialog.h"

class KPopupMenu;
class KConfig;
class QString;

class KBandwidth : public KPanelApplet
{
    Q_OBJECT

public:

    KBandwidth(const QString& configFile, Type t = Normal, int actions = 0,
        QWidget *parent = 0, const char *name = 0);

    ~KBandwidth();

    virtual int widthForHeight(int height) const;
    virtual int heightForWidth(int width) const;

public slots:
    virtual void preferences();
    virtual void about();
    virtual void help();

protected:
    KPopupMenu* contMenu;

    virtual void mousePressEvent ( QMouseEvent*);
//    virtual void contextMenuEvent( QContextMenuEvent * );

    void createMenu(QWidget *);
    void resizeEvent(QResizeEvent *);

public:

    KConfig *kConfig;
    KBandwidthView *mainView;
};

#endif
