summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/logwindow.cpp
authormickeyl <mickeyl>2003-04-30 18:50:47 (UTC)
committer mickeyl <mickeyl>2003-04-30 18:50:47 (UTC)
commite6428d30a5dc90ed3ec6ca7e1cb3f92c81437cc0 (patch) (unidiff)
tree06f7877ef85b91531c4f75681e1cd91881703c18 /noncore/net/wellenreiter/gui/logwindow.cpp
parent027458b66cffbfaf07c394a1a622a1f01970e11c (diff)
downloadopie-e6428d30a5dc90ed3ec6ca7e1cb3f92c81437cc0.zip
opie-e6428d30a5dc90ed3ec6ca7e1cb3f92c81437cc0.tar.gz
opie-e6428d30a5dc90ed3ec6ca7e1cb3f92c81437cc0.tar.bz2
- autoscrolling for hex- and logwindow
- revamped statistics window
Diffstat (limited to 'noncore/net/wellenreiter/gui/logwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/logwindow.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/noncore/net/wellenreiter/gui/logwindow.cpp b/noncore/net/wellenreiter/gui/logwindow.cpp
index 55e2ccb..12f74fd 100644
--- a/noncore/net/wellenreiter/gui/logwindow.cpp
+++ b/noncore/net/wellenreiter/gui/logwindow.cpp
@@ -18,30 +18,33 @@
18#include <qdatetime.h> 18#include <qdatetime.h>
19 19
20MLogWindow::MLogWindow( QWidget * parent, const char * name, WFlags f ) 20MLogWindow::MLogWindow( QWidget * parent, const char * name, WFlags f )
21 :QVBox( parent, name, f ) 21 :QVBox( parent, name, f )
22{ 22{
23 ledit = new QMultiLineEdit( this ); 23 ledit = new QMultiLineEdit( this );
24 24 ledit->setReadOnly( true );
25 // FIXME: Set properties( font, read-only, etc...)
26
27} 25}
28 26
27
29void MLogWindow::log( QString text ) 28void MLogWindow::log( QString text )
30{ 29{
31 QTime time = QTime::currentTime(); 30 QTime time = QTime::currentTime();
32 QString line; 31 QString line;
33 line.sprintf( "[%s] %s", (const char*) time.toString(), (const char*) text ); 32 line.sprintf( "[%s] %s\n", (const char*) time.toString(), (const char*) text );
34 ledit->append( line ); 33 int col;
34 int row;
35 ledit->getCursorPosition( &col, &row );
36 ledit->insertAt( line, col, row );
35 qDebug( line ); 37 qDebug( line );
36
37} 38}
38 39
40
39void MLogWindow::clear() 41void MLogWindow::clear()
40{ 42{
41 ledit->clear(); 43 ledit->clear();
42} 44}
43 45
46
44const QString MLogWindow::getLog() const 47const QString MLogWindow::getLog() const
45{ 48{
46 return ledit->text(); 49 return ledit->text();
47} 50}