/* $ Author: Mirko Boehm $ $ License: This code is licensed under the LGPL $ $ Copyright: (C) 1996-2003, Mirko Boehm $ $ Contact: Mirko Boehm http://www.kde.org http://www.hackerbuero.org $ */ #include #include #include #include #include #include "kwireless.h" #include "kwirelesswidget.h" KWireLess::KWireLess(const TQString& configFile, Type type, int actions, TQWidget *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("KWireLess
" "Displays information about wireless network devices.
" "KWireLess is licensed to you under the terms of the GPL.
" "(C) 2003 Mirko Boehm
"), 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(TQResizeEvent *) { widget->setGeometry(0, 0, width(), height()); } extern "C" { KDE_EXPORT KPanelApplet* init( TQWidget *parent, const TQString configFile) { KGlobal::locale()->insertCatalogue("kwireless"); return new KWireLess(configFile, KPanelApplet::Normal, KPanelApplet::About, // | KPanelApplet::Help | KPanelApplet::Preferences, parent, "kwireless"); } } #include "kwireless.moc"