diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | bcb704366cb5e333a626c18c308c7e0448a8e69f (patch) | |
tree | f0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /wifi/kwireless/kwireless.cpp | |
download | tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip |
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/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'wifi/kwireless/kwireless.cpp')
-rw-r--r-- | wifi/kwireless/kwireless.cpp | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/wifi/kwireless/kwireless.cpp b/wifi/kwireless/kwireless.cpp new file mode 100644 index 00000000..ff584603 --- /dev/null +++ b/wifi/kwireless/kwireless.cpp @@ -0,0 +1,89 @@ +/* + $ Author: Mirko Boehm $ + $ License: This code is licensed under the LGPL $ + $ Copyright: (C) 1996-2003, Mirko Boehm $ + $ Contact: Mirko Boehm <mirko@kde.org> + http://www.kde.org + http://www.hackerbuero.org $ +*/ + +#include <kglobal.h> +#include <klocale.h> +#include <kconfig.h> +#include <kapplication.h> +#include <kmessagebox.h> + +#include "kwireless.h" +#include "kwirelesswidget.h" + + +KWireLess::KWireLess(const QString& configFile, Type type, + int actions, QWidget *parent, const char *name) + : KPanelApplet(configFile, type, actions, parent, name) +{ + ksConfig = config(); + + widget = KWireLessWidget::makeWireLessWidget(this); + widget->show(); +} + + +KWireLess::~KWireLess() +{ +} + + +void KWireLess::about() +{ + KMessageBox::information + (0, + i18n("<qt><b>KWireLess</b><br>" + "Displays information about wireless network devices.<br />" + "KWireLess is licensed to you under the terms of the GPL.<br />" + "<i>(C) 2003 Mirko Boehm</i></qt>"), + i18n("About KWireLess")); +} + + +void KWireLess::help() +{ +// KMessageBox::information(0, i18n("This is a help box")); +} + + +void KWireLess::preferences() +{ +// KMessageBox::information(0, i18n("This is a preferences box")); +} + +int KWireLess::widthForHeight(int) const +{ + widget->setMode(KWireLessWidget::Vertical); + return widget->preferredWidth(); +} + +int KWireLess::heightForWidth(int) const +{ + widget->setMode(KWireLessWidget::Horizontal); + return widget->preferredHeight(); +} + +void KWireLess::resizeEvent(QResizeEvent *) +{ + widget->setGeometry(0, 0, width(), height()); +} + + +extern "C" +{ + KDE_EXPORT KPanelApplet* init( QWidget *parent, const QString configFile) + { + KGlobal::locale()->insertCatalogue("kwireless"); + return new KWireLess(configFile, KPanelApplet::Normal, + KPanelApplet::About, + // | KPanelApplet::Help | KPanelApplet::Preferences, + parent, "kwireless"); + } +} + +#include "kwireless.moc" |