summaryrefslogtreecommitdiffstats
path: root/parts/outputviews/appoutputwidget.h
blob: 0673f10633dd286d0b8ecf56ded816716a37c052 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/***************************************************************************
 *   Copyright (C) 1999-2001 by Bernd Gehrmann                             *
 *   bernd@kdevelop.org                                                    *
 *                                                                         *
 *   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 _APPOUTPUTWIDGET_H_
#define _APPOUTPUTWIDGET_H_

#include <tqstringlist.h>
#include <kregexp.h>

#include "processwidget.h"

class AppOutputViewPart;

class AppOutputWidget : public ProcessWidget
{
    Q_OBJECT
friend class AppOutputViewPart;
public:
    AppOutputWidget(AppOutputViewPart* part);
    ~AppOutputWidget();
    // clears our own store and the one of our base ProcessWidget

public slots:
	void slotRowSelected(TQListBoxItem* row);
	void insertStdoutLine(const TQCString &line);
        void insertStderrLine(const TQCString &line);
        void addPartialStdoutLine(const TQCString &line);
        void addPartialStderrLine(const TQCString &line);
	void slotContextMenu(TQListBoxItem *, const TQPoint &);
	void hideView();
	void clearViewAndContents();
	void clearFilter();
	void editFilter();
	void saveAll();
	void saveFiltered();
  void copySelected();

private:
	virtual void childFinished(bool normal, int status);
	void saveOutputToFile( bool useFilter );
	void reinsertAndFilter();
	bool filterSingleLine( const TQString & line );

	TQStringList m_contentList;

	struct OutputFilter
	{
		OutputFilter() : m_isActive(false), m_isRegExp(false), m_caseSensitive(false) {}
		bool m_isActive;
		bool m_isRegExp;
		bool m_caseSensitive;
		TQString m_filterString;
	};

	AppOutputViewPart* m_part;
	OutputFilter m_filter;
        TQCString stdoutbuf;
        TQCString stderrbuf;
};

#endif