From 2bda8f7717adf28da4af0d34fb82f63d2868c31d Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- klaptopdaemon/pcmcia.cpp | 122 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 klaptopdaemon/pcmcia.cpp (limited to 'klaptopdaemon/pcmcia.cpp') diff --git a/klaptopdaemon/pcmcia.cpp b/klaptopdaemon/pcmcia.cpp new file mode 100644 index 0000000..ed17789 --- /dev/null +++ b/klaptopdaemon/pcmcia.cpp @@ -0,0 +1,122 @@ +/* + * pcmcia.cpp + * + * Copyright (c) 1999 Paul Campbell + * + * Requires the Qt widget libraries, available at no cost at + * http://www.troll.no/ + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include "pcmcia.h" +#include "portable.h" +#include "version.h" + +PcmciaConfig::PcmciaConfig (QWidget * parent, const char *name) + : KCModule(parent, name) +{ + KAboutData *about = + new KAboutData(I18N_NOOP("kcmlaptop"), + I18N_NOOP("KDE Panel System Information Control Module"), + 0, 0, KAboutData::License_GPL, + I18N_NOOP("(c) 1999 - 2002 Paul Campbell")); + about->addAuthor("Paul Campbell", 0, "paul@taniwha.com"); + setAboutData( about ); + + KGlobal::locale()->insertCatalogue("klaptopdaemon"); // For translation of klaptopdaemon messages + + label0 = laptop_portable::pcmcia_info(0, this); + label0_text = laptop_portable::pcmcia_info(1, this); + label1 = laptop_portable::pcmcia_info(2, this); + label1_text = laptop_portable::pcmcia_info(3, this); + + + QVBoxLayout *top_layout = new QVBoxLayout(this, 15, 5); + QGridLayout *top_grid = new QGridLayout(2, 2); + top_layout->addLayout(top_grid); + + top_grid->setColStretch(0, 0); + top_grid->setColStretch(1, 1); + top_grid->addRowSpacing(0, 40); + top_grid->addRowSpacing(1, 40); + + label0->setFixedSize(80, 24); + top_grid->addWidget(label0, 0, 0); + label0_text->adjustSize(); + top_grid->addWidget(label0_text, 0, 1); + + label1->setFixedSize(80, 24); + top_grid->addWidget(label1, 1, 0); + label1_text->adjustSize(); + top_grid->addWidget(label1_text, 1, 1); + + + top_layout->addStretch(1); + + QHBoxLayout *v1 = new QHBoxLayout; + top_layout->addLayout(v1, 0); + v1->addStretch(1); + QString s1 = LAPTOP_VERSION; + QString s2 = i18n("Version: ")+s1; + QLabel* vers = new QLabel(s2, this); + vers->setMinimumSize(vers->sizeHint()); + v1->addWidget(vers, 0); + + top_layout->activate(); + + load(); + setButtons(Help); +} + + +void PcmciaConfig::save() +{ +} + +void PcmciaConfig::load() +{ +} + +void PcmciaConfig::defaults() +{ +} + + +void PcmciaConfig::changed() +{ + emit KCModule::changed(true); +} + + +QString PcmciaConfig::quickHelp() const +{ + return i18n("

PCMCIA Config

This module shows information about " + "the PCMCIA cards in your system, if there are PCMCIA cards."); +} + +#include "pcmcia.moc" -- cgit v1.2.1