2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
2016-01-15 14:57:40 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2010-12-17 16:01:08 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2008-12-02 16:19:05 +01:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
#ifndef COMPILEOUTPUTWINDOW_H
|
|
|
|
|
#define COMPILEOUTPUTWINDOW_H
|
|
|
|
|
|
2010-07-15 10:29:38 +02:00
|
|
|
#include "buildstep.h"
|
2008-12-02 12:01:29 +01:00
|
|
|
#include <coreplugin/ioutputpane.h>
|
2010-06-30 16:39:32 +02:00
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QHash>
|
2015-04-20 17:13:45 +02:00
|
|
|
#include <QPair>
|
2010-06-30 16:39:32 +02:00
|
|
|
|
2010-01-25 15:09:16 +01:00
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
class QPlainTextEdit;
|
2010-07-13 16:36:37 +02:00
|
|
|
class QTextCharFormat;
|
2012-03-28 22:23:03 +02:00
|
|
|
class QToolButton;
|
2010-01-25 15:09:16 +01:00
|
|
|
QT_END_NAMESPACE
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2013-09-03 06:47:17 +03:00
|
|
|
namespace Utils { class AnsiEscapeCodeHandler; }
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
namespace ProjectExplorer {
|
|
|
|
|
|
|
|
|
|
class BuildManager;
|
2010-06-30 16:39:32 +02:00
|
|
|
class Task;
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
2010-06-30 16:39:32 +02:00
|
|
|
class ShowOutputTaskHandler;
|
2010-06-25 10:41:49 +02:00
|
|
|
class CompileOutputTextEdit;
|
2010-06-30 16:39:32 +02:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
class CompileOutputWindow : public Core::IOutputPane
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2014-01-27 14:04:03 +01:00
|
|
|
CompileOutputWindow(QAction *cancelBuildAction);
|
2010-06-30 16:39:32 +02:00
|
|
|
~CompileOutputWindow();
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
QWidget *outputWidget(QWidget *);
|
2012-03-28 22:23:03 +02:00
|
|
|
QList<QWidget *> toolBarWidgets() const;
|
2010-06-16 11:56:30 +02:00
|
|
|
QString displayName() const { return tr("Compile Output"); }
|
2008-12-02 12:01:29 +01:00
|
|
|
int priorityInStatusBar() const;
|
|
|
|
|
void clearContents();
|
|
|
|
|
void visibilityChanged(bool visible);
|
2014-10-13 22:37:28 +03:00
|
|
|
void appendText(const QString &text, BuildStep::OutputFormat format);
|
2011-09-27 13:47:06 +02:00
|
|
|
bool canFocus() const;
|
|
|
|
|
bool hasFocus() const;
|
2008-12-02 12:01:29 +01:00
|
|
|
void setFocus();
|
|
|
|
|
|
2011-09-27 13:47:06 +02:00
|
|
|
bool canNext() const;
|
|
|
|
|
bool canPrevious() const;
|
2009-04-30 12:50:52 +02:00
|
|
|
void goToNext();
|
|
|
|
|
void goToPrev();
|
2011-09-27 13:47:06 +02:00
|
|
|
bool canNavigate() const;
|
2009-04-30 12:50:52 +02:00
|
|
|
|
2015-04-20 17:13:45 +02:00
|
|
|
void registerPositionOf(const Task &task, int linkedOutputLines, int skipLines);
|
2010-06-30 16:39:32 +02:00
|
|
|
bool knowsPositionOf(const Task &task);
|
|
|
|
|
void showPositionOf(const Task &task);
|
|
|
|
|
|
2013-09-03 06:47:17 +03:00
|
|
|
void flush();
|
|
|
|
|
|
2016-01-29 16:38:37 +02:00
|
|
|
private:
|
2011-04-14 10:39:09 +02:00
|
|
|
void updateWordWrapMode();
|
2015-08-17 16:29:09 +02:00
|
|
|
void updateZoomEnabled();
|
2011-04-14 10:39:09 +02:00
|
|
|
|
2010-06-25 10:41:49 +02:00
|
|
|
CompileOutputTextEdit *m_outputWindow;
|
2015-04-20 17:13:45 +02:00
|
|
|
QHash<unsigned int, QPair<int, int>> m_taskPositions;
|
2010-06-30 16:39:32 +02:00
|
|
|
ShowOutputTaskHandler * m_handler;
|
2012-03-28 22:23:03 +02:00
|
|
|
QToolButton *m_cancelBuildButton;
|
2015-08-17 16:29:09 +02:00
|
|
|
QToolButton *m_zoomInButton;
|
|
|
|
|
QToolButton *m_zoomOutButton;
|
2013-09-03 06:47:17 +03:00
|
|
|
Utils::AnsiEscapeCodeHandler *m_escapeCodeHandler;
|
2008-12-02 12:01:29 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace ProjectExplorer
|
|
|
|
|
|
|
|
|
|
#endif // COMPILEOUTPUTWINDOW_H
|