• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • KDevelop Widgets Library
 

KDevelop Widgets Library

  • lib
  • widgets
processwidget.h
Go to the documentation of this file.
1 /* This file is part of the KDE project
2  Copyright (C) 1999-2001 Bernd Gehrmann <bernd@kdevelop.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef _PROCESSWIDGET_H_
21 #define _PROCESSWIDGET_H_
22 
23 #include <tdelistbox.h>
24 #include <kprocess.h>
25 
31 class ProcessLineMaker;
32 
36 class ProcessListBoxItem : public TQListBoxText
37 {
38 public:
39  enum Type { Diagnostic, Normal, Error };
40 
41  ProcessListBoxItem(const TQString &s, Type type);
42 
43  virtual bool isCustomItem();
44 
45 protected:
46  TQColor blend(const TQColor &c1, const TQColor &c2, double k = 0.25) const;
47 
48 private:
49  virtual void paint(TQPainter *p);
50  Type t;
51 };
52 
53 
58 class ProcessWidget : public TDEListBox
59 {
60  Q_OBJECT
61 
62 
63 public:
64  ProcessWidget(TQWidget *parent, const char *name=0);
65  ~ProcessWidget();
66 
70  bool isRunning();
71 
72 public slots:
76  void startJob(const TQString &dir, const TQString &command);
80  void killJob( int signo = SIGTERM );
86  virtual void insertStdoutLine(const TQCString &line);
93  virtual void insertStderrLine(const TQCString &line);
94 
95  virtual void addPartialStdoutLine(const TQCString&);
96  virtual void addPartialStderrLine(const TQCString&);
97 
98 protected:
105  virtual void childFinished(bool normal, int status);
106 
107 signals:
108  void processExited(TDEProcess *);
109  void rowSelected(int row);
110 
111 protected:
112  virtual TQSize minimumSizeHint() const;
113  void maybeScrollToBottom();
114 
115 protected slots:
116  void slotProcessExited(TDEProcess*);
117 
118 private:
119  TDEProcess *childproc;
120  ProcessLineMaker* procLineMaker;
121  TQCString stderrbuf;
122  TQCString stdoutbuf;
123  int lastRowStdout;
124  int lastRowStderr;
125 };
126 
127 
128 #endif
ProcessLineMaker
Convenience class to catch output of TDEProcess.
Definition: processlinemaker.h:35
ProcessWidget
This class is designed to share code between the grep and application output widgets.
Definition: processwidget.h:58
ProcessListBoxItem
Listbox item for process widgets.
Definition: processwidget.h:36

KDevelop Widgets Library

Skip menu "KDevelop Widgets Library"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

KDevelop Widgets Library

Skip menu "KDevelop Widgets Library"
  • buildtools
  •   lib
  •     base
  •     parsers
  •       autotools
  •       qmake
  •     widgets
  •   api
  • languages
  •   lib
  •     debugger
  •     designer_integration
  •     interfaces
  • lib
  •   catalog
  •   interfaces
  •     extensions
  •     external
  •     extras
  •   util
  •   widgets
  •     propeditor
  • parts
  •   documentation
  •     interfaces
  • src
  •   profileengine
  •     lib
Generated for KDevelop Widgets Library by doxygen 1.8.13
This website is maintained by Timothy Pearson.