summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter
authormickeyl <mickeyl>2003-09-26 10:25:38 (UTC)
committer mickeyl <mickeyl>2003-09-26 10:25:38 (UTC)
commit0009e5f8bfb3050a7906bf03ce7b9870275496e6 (patch) (side-by-side diff)
tree197c61e4bb1eda153ca5bf9fa6986bffafaea137 /noncore/net/wellenreiter
parent11370952060598f7c79f9df70289f74ecc7693a1 (diff)
downloadopie-0009e5f8bfb3050a7906bf03ce7b9870275496e6.zip
opie-0009e5f8bfb3050a7906bf03ce7b9870275496e6.tar.gz
opie-0009e5f8bfb3050a7906bf03ce7b9870275496e6.tar.bz2
add automatic tree-opening if checked in config
Diffstat (limited to 'noncore/net/wellenreiter') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp
index d695c17..245290d 100644
--- a/noncore/net/wellenreiter/gui/scanlist.cpp
+++ b/noncore/net/wellenreiter/gui/scanlist.cpp
@@ -1,48 +1,49 @@
/**********************************************************************
** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
**
** This file is part of Opie Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
**********************************************************************/
#include "scanlist.h"
#include "configwindow.h"
#include "logwindow.h"
#include <assert.h>
#include <qcursor.h>
#include <qdatetime.h>
#include <qtextstream.h>
#include <qpopupmenu.h>
+#include <qcheckbox.h>
#ifdef QWS
#include <qpe/qpeapplication.h>
#include <opie/odevice.h>
using namespace Opie;
#endif
#ifdef QWS
#include <qpe/resource.h>
#else
#include "resource.h"
#endif
const int col_type = 0;
const int col_essid = 0;
const int col_sig = 1;
const int col_ap = 2;
const int col_channel = 3;
const int col_wep = 4;
const int col_traffic = 5;
const int col_ip = 6;
const int col_manuf = 7;
const int col_firstseen = 8;
@@ -448,48 +449,54 @@ void MScanListItem::decorateItem( QString type, QString essid, QString macaddr,
// set icon for wep (wireless encryption protocol)
if ( wep )
setPixmap( col_wep, Resource::loadPixmap( "wellenreiter/cracked" ) ); //FIXME: rename the pixmap!
// set channel and signal text
if ( signal != -1 )
setText( col_sig, QString::number( signal ) );
if ( channel != -1 )
setText( col_channel, QString::number( channel ) );
setText( col_firstseen, QTime::currentTime().toString() );
//setText( col_lastseen, QTime::currentTime().toString() );
listView()->triggerUpdate();
this->type = type;
_type = type;
_essid = essid;
_macaddr = macaddr;
_channel = channel;
_beacons = 1;
_signal = 0;
+
+ if ( WellenreiterConfigWindow::instance()->openTree->isChecked() )
+ {
+ listView()->ensureItemVisible( this );
+ }
+
}
void MScanListItem::setManufacturer( const QString& manufacturer )
{
setText( col_manuf, manufacturer );
}
void MScanListItem::setLocation( const float& latitude, const float& longitude )
{
if ( latitude == 0.0 || longitude == 0.0 )
setText( col_location, "N/A" );
else
setText( col_location, QString().sprintf( "%.2f / %.2f", latitude, longitude ) );
}
void MScanListItem::playSound( const QString& sound ) const
{
#ifdef QWS
if ( sound == "Ignore" ) return;
else if ( sound == "Touch" ) ODevice::inst()->touchSound();
else if ( sound == "Key" ) ODevice::inst()->keySound();