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) (side-by-side diff)
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
@@ -21,26 +21,29 @@ MLogWindow::MLogWindow( QWidget * parent, const char * name, WFlags f )
:QVBox( parent, name, f )
{
ledit = new QMultiLineEdit( this );
-
- // FIXME: Set properties( font, read-only, etc...)
-
+ ledit->setReadOnly( true );
}
+
void MLogWindow::log( QString text )
{
QTime time = QTime::currentTime();
QString line;
- line.sprintf( "[%s] %s", (const char*) time.toString(), (const char*) text );
- ledit->append( line );
+ line.sprintf( "[%s] %s\n", (const char*) time.toString(), (const char*) text );
+ int col;
+ int row;
+ ledit->getCursorPosition( &col, &row );
+ ledit->insertAt( line, col, row );
qDebug( line );
-
}
+
void MLogWindow::clear()
{
ledit->clear();
}
+
const QString MLogWindow::getLog() const
{
return ledit->text();