summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/statwindow.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/wellenreiter/gui/statwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/statwindow.cpp32
1 files changed, 15 insertions, 17 deletions
diff --git a/noncore/net/wellenreiter/gui/statwindow.cpp b/noncore/net/wellenreiter/gui/statwindow.cpp
index 07d34ef..2c8c774 100644
--- a/noncore/net/wellenreiter/gui/statwindow.cpp
+++ b/noncore/net/wellenreiter/gui/statwindow.cpp
@@ -5,41 +5,39 @@
**
** 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 "statwindow.h"
-#include <qmultilineedit.h>
+#include <opie2/olistview.h>
MStatWindow::MStatWindow( QWidget * parent, const char * name, WFlags f )
:QVBox( parent, name, f )
{
- ledit = new QMultiLineEdit( this );
- ledit->setFont( QFont( "fixed", 10 ) );
-
- // FIXME: Set properties( font, read-only, etc...)
-
+ table = new OListView( this );
+ table->addColumn( "Protocol" );
+ table->addColumn( "Count" );
+ table->setItemMargin( 2 );
};
-void MStatWindow::log( QString text )
-{
-
- ledit->append( text );
-
-};
-const QString MStatWindow::getLog() const
+void MStatWindow::updateCounter( const QString& protocol, int counter )
+{
+ QListViewItemIterator it( table );
+ for ( ; it.current(); ++it )
+ {
+ if ( it.current()->text( 0 ) == protocol )
{
- return ledit->text();
+ it.current()->setText( 1, QString::number( counter ) );
+ return;
+ }
}
-void MStatWindow::clear()
-{
- ledit->clear();
+ new OListViewItem( table, protocol, QString::number( counter ) );
}