Forwardport from 3.5 branch:
[kdenetwork.git] / kget / dlgLimits.cpp
blobe31326c79283a6aa46e91b6083bfd1ece4de3bf7
1 /***************************************************************************
2 * dlgLimits.cpp
3 * -------------------
5 * Revision : $Id$
6 * begin : Tue Jan 29 2002
7 * copyright : (C) 2002 by Patrick Charbonnier
8 * : Based On Caitoo v.0.7.3 (c) 1998 - 2000, Matej Koss
9 * email : pch@freeshell.org
11 ****************************************************************************/
13 /***************************************************************************
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 ***************************************************************************/
28 #include <qlabel.h>
29 #include <qlayout.h>
31 #include <knuminput.h>
32 #include <klocale.h>
33 #include <kdialog.h>
35 #include "settings.h"
36 #include "kmainwidget.h"
37 #include "dlgLimits.h"
40 DlgLimits::DlgLimits(QWidget * parent)
41 : DlgLimitsBase(parent)
43 // TODO: these are not supported yet, so hide them
44 lb_maxband->hide();
45 le_maxband->hide();
46 lb_minband->hide();
47 le_minband->hide();
51 void DlgLimits::setData()
53 le_maxnum->setValue(ksettings.maxSimultaneousConnections);
54 le_minband->setValue(ksettings.minimumBandwidth);
55 le_maxband->setValue(ksettings.maximumBandwidth);
59 void DlgLimits::applyData()
61 ksettings.maxSimultaneousConnections = le_maxnum->value();
62 ksettings.minimumBandwidth = le_minband->value();
63 ksettings.maximumBandwidth = le_maxband->value();
64 kmain->checkQueue();
67 void DlgLimits::slotChanged()
69 emit configChanged();
72 #include "dlgLimits.moc"