gvlogwindow.h 1.51 KB
Newer Older
1
/***************************************************************************
2
 *   Copyright (C) 2005 by Piotr Szymanski <niedakh@gmail.com>             *
3 4 5 6 7 8 9 10 11 12
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 ***************************************************************************/

#ifndef LOGWINDOW_H
#define LOGWINDOW_H

13
#include "interpreter.h"
14
#include <kdialogbase.h>
15 16 17
#include <klistviewsearchline.h>
#include <qvbox.h>
#include <qtimer.h>
18 19

class QTextEdit;
Pino Toscano's avatar
porting  
Pino Toscano committed
20
class KUrlLabel;
21
class GSLogWindow : public QVBox
22 23 24 25
{
    Q_OBJECT

public:
26
    GSLogWindow( const QString& caption,
27 28 29
               QWidget* parent = 0, const char* name = 0 );

public slots:
30
    void append( GSInterpreterLib::MessageType t, const char* buf, int num );
31
    void appendBuffered() { m_lastInt=0; m_clearTimer.stop(); append(m_buffer.first,m_buffer.second); };
32
    void append( GSInterpreterLib::MessageType t, const QString &text);
33 34
    void clear();
    bool event( QEvent * event );
35 36

private:
37 38
    KListView*   m_msgList;
    KListViewSearchLine* m_searchLine;
39
    QPair <GSInterpreterLib::MessageType, QString> m_buffer;
40 41 42
    int m_tCol;
    int m_lastInt;
    QTimer m_clearTimer;
43 44 45 46 47
};

#endif

// vim:sw=4:sts=4:ts=8:sta:tw=78:noet