From 114a878c64ce6f8223cfd22d76a20eb16d177e5e Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- parts/outputviews/makewidget.h | 129 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 parts/outputviews/makewidget.h (limited to 'parts/outputviews/makewidget.h') diff --git a/parts/outputviews/makewidget.h b/parts/outputviews/makewidget.h new file mode 100644 index 00000000..ff65eb5e --- /dev/null +++ b/parts/outputviews/makewidget.h @@ -0,0 +1,129 @@ +/*************************************************************************** + * 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 _MAKEWIDGET_H_ +#define _MAKEWIDGET_H_ + +#include +#include +#include +#include +#include + +#include "outputfilter.h" +#include "directorystatusmessagefilter.h" +#include "compileerrorfilter.h" +#include "commandcontinuationfilter.h" +#include "makeactionfilter.h" +#include "otherfilter.h" +#include "makeitem.h" + +class MakeViewPart; +class MakeItem; +class KProcess; +class ProcessLineMaker; +class KURL; + +namespace KTextEditor { class Document; } + +class MakeWidget : public QTextEdit +{ + Q_OBJECT + +public: + MakeWidget(MakeViewPart *part); + ~MakeWidget(); + + void queueJob(const QString &dir, const QString &command); + bool isRunning(); + void updateSettingsFromConfig(); + void processLine( const QString& line ); + +public slots: + void startNextJob(); + void killJob(); + void nextError(); + void prevError(); + void copy(); + +protected: + virtual QPopupMenu *createPopupMenu( const QPoint& pos ); + virtual void contentsMouseReleaseEvent( QMouseEvent* e ); + +private slots: + void insertStdoutLine(const QCString& line); + void insertStderrLine(const QCString& line); + void storePartialStdoutLine(const QCString& line); + void storePartialStderrLine(const QCString& line); + void slotProcessExited(KProcess *); + void verticScrollingOn() { m_vertScrolling = true; } + void verticScrollingOff() { m_vertScrolling = false; } + void horizScrollingOn() { m_horizScrolling = true; } + void horizScrollingOff() { m_horizScrolling = false; } + void toggleLineWrapping(); + void slotVeryShortCompilerOutput(); + void slotShortCompilerOutput(); + void slotFullCompilerOutput(); + void toggleShowDirNavigMessages(); + void slotEnteredDirectory( EnteringDirectoryItem* ); + void slotExitedDirectory( ExitingDirectoryItem* ); + void insertItem( MakeItem* ); + +private: + void specialCheck( const QString& file, QString& fName ) const; + virtual void keyPressEvent(QKeyEvent *e); + void searchItem(int parag); + QString guessFileName( const QString& fName, int parag ) const; + QString directory(int parag) const; + bool brightBg(); + void refill(); + void createCursor(ErrorItem* e, KTextEditor::Document* doc); + + bool scanErrorForward(int parag); + bool scanErrorBackward(int parag); + + DirectoryStatusMessageFilter m_directoryStatusFilter; + CompileErrorFilter m_errorFilter; + CommandContinuationFilter m_continuationFilter; + MakeActionFilter m_actionFilter; + OtherFilter m_otherFilter; + + void setPendingItem(MakeItem* new_item); + void displayPendingItem(); + bool appendToLastLine( const QString& text ); + void setCompilerOutputLevel(EOutputLevel level); + + QStringList commandList; + QStringList dirList; + QString m_lastBuildDir; //stores directory of last build, for the case we don't have proper path information + QString currentCommand; + KProcess *childproc; + ProcessLineMaker* procLineMaker; + QPtrStack dirstack; + MakeItem* m_pendingItem; + QValueVector m_items; + QIntDict m_paragraphToItem; + long m_paragraphs; + int m_lastErrorSelected; + + MakeViewPart *m_part; + + bool m_vertScrolling, m_horizScrolling; + bool m_bCompiling; + + QCString stderrbuf; + QCString stdoutbuf; + + bool m_bLineWrapping; + EOutputLevel m_compilerOutputLevel; +}; + +#endif -- cgit v1.2.1