Try to enforce release mode when build fails.
[autotroll.git] / gui / lcdrange.cpp
blob6826fb9b1831b68a7e24f86de72241a8ffd4472f
1 /****************************************************************************
2 **
3 ** Copyright (C) 2005-2006 Trolltech ASA. All rights reserved.
4 **
5 ** This file is part of the example classes of the Qt Toolkit.
6 **
7 ** This file may be used under the terms of the GNU General Public
8 ** License version 2.0 as published by the Free Software Foundation
9 ** and appearing in the file LICENSE.GPL included in the packaging of
10 ** this file. Please review the following information to ensure GNU
11 ** General Public Licensing requirements will be met:
12 ** http://www.trolltech.com/products/qt/opensource.html
14 ** If you are unsure which license is appropriate for your use, please
15 ** review the following information:
16 ** http://www.trolltech.com/products/qt/licensing.html or contact the
17 ** sales department at sales@trolltech.com.
19 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
22 ****************************************************************************/
24 #include <QLCDNumber>
25 #include <QSlider>
26 #include <QVBoxLayout>
28 #include "lcdrange.h"
30 LCDRange::LCDRange(QWidget *parent)
31 : QWidget(parent)
33 QLCDNumber *lcd = new QLCDNumber(2);
34 lcd->setSegmentStyle(QLCDNumber::Filled);
36 slider = new QSlider(Qt::Horizontal);
37 slider->setRange(0, 99);
38 slider->setValue(0);
40 connect(slider, SIGNAL(valueChanged(int)),
41 lcd, SLOT(display(int)));
42 connect(slider, SIGNAL(valueChanged(int)),
43 this, SIGNAL(valueChanged(int)));
45 QVBoxLayout *layout = new QVBoxLayout;
46 layout->addWidget(lcd);
47 layout->addWidget(slider);
48 setLayout(layout);
51 int LCDRange::value() const
53 return slider->value();
56 void LCDRange::setValue(int value)
58 slider->setValue(value);