Diffstat (limited to 'noncore/net/wellenreiter/gui/statwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/statwindow.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/noncore/net/wellenreiter/gui/statwindow.cpp b/noncore/net/wellenreiter/gui/statwindow.cpp index 48e4847..e3c6bbe 100644 --- a/noncore/net/wellenreiter/gui/statwindow.cpp +++ b/noncore/net/wellenreiter/gui/statwindow.cpp | |||
@@ -1,42 +1,45 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Wellenreiter II. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | **********************************************************************/ | 14 | **********************************************************************/ |
15 | 15 | ||
16 | #include "statwindow.h" | 16 | #include "statwindow.h" |
17 | #include <opie2/olistview.h> | 17 | #include <opie2/olistview.h> |
18 | 18 | ||
19 | using namespace Opie::Ui; | ||
20 | using namespace Opie::Ui; | ||
21 | using namespace Opie::Ui; | ||
19 | MStatWindow::MStatWindow( QWidget * parent, const char * name, WFlags f ) | 22 | MStatWindow::MStatWindow( QWidget * parent, const char * name, WFlags f ) |
20 | :QVBox( parent, name, f ) | 23 | :QVBox( parent, name, f ) |
21 | { | 24 | { |
22 | table = new OListView( this ); | 25 | table = new OListView( this ); |
23 | table->addColumn( tr( "Protocol" ) ); | 26 | table->addColumn( tr( "Protocol" ) ); |
24 | table->addColumn( tr( "Count" ) ); | 27 | table->addColumn( tr( "Count" ) ); |
25 | table->setItemMargin( 2 ); | 28 | table->setItemMargin( 2 ); |
26 | }; | 29 | }; |
27 | 30 | ||
28 | 31 | ||
29 | void MStatWindow::updateCounter( const QString& protocol, int counter ) | 32 | void MStatWindow::updateCounter( const QString& protocol, int counter ) |
30 | { | 33 | { |
31 | QListViewItemIterator it( table ); | 34 | QListViewItemIterator it( table ); |
32 | for ( ; it.current(); ++it ) | 35 | for ( ; it.current(); ++it ) |
33 | { | 36 | { |
34 | if ( it.current()->text( 0 ) == protocol ) | 37 | if ( it.current()->text( 0 ) == protocol ) |
35 | { | 38 | { |
36 | it.current()->setText( 1, QString::number( counter ) ); | 39 | it.current()->setText( 1, QString::number( counter ) ); |
37 | return; | 40 | return; |
38 | } | 41 | } |
39 | } | 42 | } |
40 | 43 | ||
41 | new OListViewItem( table, protocol, QString::number( counter ) ); | 44 | new OListViewItem( table, protocol, QString::number( counter ) ); |
42 | } | 45 | } |