/***************************************************************************
                          preferencesdialog.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 PREFERENCESDIALOG_H
#define PREFERENCESDIALOG_H

#include "dialogdesign.h"
#include "kbandwidthview.h"
#include "kbandwidth.h"
#include <kconfig.h>
#include <qstring.h>
#include <qmap.h>

class KBandwidth;

class PreferencesDialog : public DialogDesign
{
  Q_OBJECT

  ulong        divisor;
  QString      lastInterface;
  KBandwidthView* kbandwidthview;

  QMap<QString, Bandwidth> limits;

  virtual  void saveConfig(void);
  virtual  void slotOk(void);
  virtual  void disableSpins(bool disable);
  virtual  void updateUnitText(void);
  virtual  void writeReadLimits(const QString& iface);
  virtual  void resetLearnedLimits();

public:

  PreferencesDialog(const KBandwidth*  parent);
  ~PreferencesDialog();
};
#endif
