00001 /********************************************************************** 00002 ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. 00003 ** 00004 ** This file is part of Wellenreiter II. 00005 ** 00006 ** This file may be distributed and/or modified under the terms of the 00007 ** GNU General Public License version 2 as published by the Free Software 00008 ** Foundation and appearing in the file LICENSE.GPL included in the 00009 ** packaging of this file. 00010 ** 00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00013 ** 00014 **********************************************************************/ 00015 00016 #include "hexwindow.h" 00017 #include <qmultilineedit.h> 00018 00019 MHexWindow::MHexWindow( QWidget * parent, const char * name, WFlags f ) 00020 :QVBox( parent, name, f ) 00021 { 00022 ledit = new QMultiLineEdit( this ); 00023 ledit->setFont( QFont( "fixed", 10 ) ); 00024 ledit->setReadOnly( true ); 00025 }; 00026 00027 void MHexWindow::log( const QString& text ) 00028 { 00029 int col; 00030 int row; 00031 ledit->getCursorPosition( &col, &row ); 00032 ledit->insertAt( text, col, row ); 00033 }; 00034 00035 const QString MHexWindow::getLog() const 00036 { 00037 return ledit->text(); 00038 } 00039 00040 void MHexWindow::clear() 00041 { 00042 ledit->clear(); 00043 } 00044
1.4.2