KDevelop API Documentation

parts/outputviews/appoutputwidget.cpp

Go to the documentation of this file.
00001 /*************************************************************************** 00002 * Copyright (C) 1999-2001 by Bernd Gehrmann * 00003 * bernd@kdevelop.org * 00004 * * 00005 * Copyright (C) 2003 by Hamish Rodda * 00006 * meddie@yoyo.its.monash.edu.au * 00007 * * 00008 * This program is free software; you can redistribute it and/or modify * 00009 * it under the terms of the GNU General Public License as published by * 00010 * the Free Software Foundation; either version 2 of the License, or * 00011 * (at your option) any later version. * 00012 * * 00013 ***************************************************************************/ 00014 00015 #include "appoutputwidget.h" 00016 00017 #include <qregexp.h> 00018 00019 #include <klocale.h> 00020 #include <kdebug.h> 00021 #include <kstatusbar.h> 00022 #include <kapplication.h> 00023 #include <kconfig.h> 00024 00025 #include "appoutputviewpart.h" 00026 #include "kdevpartcontroller.h" 00027 #include "kdevmainwindow.h" 00028 00029 AppOutputWidget::AppOutputWidget(AppOutputViewPart* part) 00030 : ProcessWidget(0, "app output widget") 00031 , m_part(part) 00032 { 00033 connect(this, SIGNAL(executed(QListBoxItem*)), SLOT(slotRowSelected(QListBoxItem*))); 00034 KConfig *config = kapp->config(); 00035 config->setGroup("General Options"); 00036 setFont(config->readFontEntry("Application Font")); 00037 } 00038 00039 00040 AppOutputWidget::~AppOutputWidget() 00041 {} 00042 00043 00044 void AppOutputWidget::childFinished(bool normal, int status) 00045 { 00046 ProcessWidget::childFinished(normal, status); 00047 } 00048 00049 00050 void AppOutputWidget::slotRowSelected(QListBoxItem* row) 00051 { 00052 static QRegExp assertMatch("ASSERT: \\\"([^\\\"]+)\\\" in ([^\\( ]+) \\(([\\d]+)\\)"); 00053 static QRegExp lineInfoMatch("\\[([^:]+):([\\d]+)\\]"); 00054 if (row) { 00055 if (assertMatch.exactMatch(row->text())) { 00056 m_part->partController()->editDocument(assertMatch.cap(2), assertMatch.cap(3).toInt() - 1); 00057 m_part->mainWindow()->statusBar()->message(i18n("Assertion failed: %1").arg(assertMatch.cap(1)), 10000); 00058 m_part->mainWindow()->lowerView(this); 00059 00060 } else if (lineInfoMatch.search(row->text()) != -1) { 00061 m_part->partController()->editDocument(lineInfoMatch.cap(1), lineInfoMatch.cap(2).toInt() - 1); 00062 m_part->mainWindow()->statusBar()->message(row->text(), 10000); 00063 m_part->mainWindow()->lowerView(this); 00064 } 00065 } 00066 } 00067 00068 #include "appoutputwidget.moc"
KDE Logo
This file is part of the documentation for KDevelop Version 3.0.4.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Oct 19 08:01:52 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003