dtor first
[personal-kdebase.git] / workspace / ksysguard / gui / SensorFrame.cc
blob05ed2702e66de2b5cc787a00e06b22eacdd16014
1 /*
2 KSysGuard, the KDE System Guard
4 Copyright (c) 1999, 2000 Chris Schlaeger <cs@kde.org>
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public
8 License version 2 or at your option version 3 as published by
9 the Free Software Foundation.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 #include "SensorFrame.h"
23 #include <QBoxLayout>
27 SensorFrame::SensorFrame(KSGRD::SensorDisplay* display)
29 setAlignment(Qt::AlignCenter);
30 QHBoxLayout *layout = new QHBoxLayout;
31 layout->setMargin(2);
32 layout->addWidget(display);
33 setLayout(layout);
34 connect(display, SIGNAL(translatedTitleChanged(const QString&)), SLOT(setTranslatedTitle(const QString&)));
35 setTranslatedTitle(display->translatedTitle());
36 setFlat(true);
38 void SensorFrame::setTranslatedTitle(const QString& translatedTitle) {
39 QGroupBox::setTitle(translatedTitle);
42 #include "SensorFrame.moc"