2009-02-25 09:15:00 +01:00
|
|
|
/**************************************************************************
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator
|
|
|
|
|
**
|
2011-01-11 16:28:15 +01:00
|
|
|
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2011-11-02 15:59:12 +01:00
|
|
|
** Contact: Nokia Corporation (qt-info@nokia.com)
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
** GNU Lesser General Public License Usage
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2011-04-13 08:42:33 +02:00
|
|
|
** This file may be used under the terms of the GNU Lesser General Public
|
|
|
|
|
** License version 2.1 as published by the Free Software Foundation and
|
|
|
|
|
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
|
|
|
|
** Please review the following information to ensure the GNU Lesser General
|
|
|
|
|
** Public License version 2.1 requirements will be met:
|
|
|
|
|
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2010-12-17 16:01:08 +01:00
|
|
|
** In addition, as a special exception, Nokia gives you certain additional
|
2011-04-13 08:42:33 +02:00
|
|
|
** rights. These rights are described in the Nokia Qt LGPL Exception
|
2010-12-17 16:01:08 +01:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
2011-04-13 08:42:33 +02:00
|
|
|
** Other Usage
|
|
|
|
|
**
|
|
|
|
|
** Alternatively, this file may be used in accordance with the terms and
|
|
|
|
|
** conditions contained in a signed written agreement between you and Nokia.
|
|
|
|
|
**
|
2010-12-17 16:01:08 +01:00
|
|
|
** If you have questions regarding the use of this file, please contact
|
2011-11-02 15:59:12 +01:00
|
|
|
** Nokia at qt-info@nokia.com.
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
**************************************************************************/
|
2008-12-02 14:09:21 +01:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
#ifndef IOUTPUTPANE_H
|
|
|
|
|
#define IOUTPUTPANE_H
|
|
|
|
|
|
|
|
|
|
#include "core_global.h"
|
|
|
|
|
|
|
|
|
|
#include <QtCore/QObject>
|
|
|
|
|
#include <QtCore/QList>
|
|
|
|
|
#include <QtCore/QString>
|
2009-10-01 16:38:08 +02:00
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
class QWidget;
|
|
|
|
|
QT_END_NAMESPACE
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
namespace Core {
|
|
|
|
|
|
|
|
|
|
class CORE_EXPORT IOutputPane : public QObject
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
2011-09-27 13:47:06 +02:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
public:
|
|
|
|
|
IOutputPane(QObject *parent = 0) : QObject(parent) {}
|
|
|
|
|
|
|
|
|
|
virtual QWidget *outputWidget(QWidget *parent) = 0;
|
2011-09-27 13:47:06 +02:00
|
|
|
virtual QList<QWidget *> toolBarWidgets() const = 0;
|
2010-06-16 11:56:30 +02:00
|
|
|
virtual QString displayName() const = 0;
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
// -1 don't show in statusBar
|
|
|
|
|
// 100...0 show at front...end
|
|
|
|
|
virtual int priorityInStatusBar() const = 0;
|
|
|
|
|
|
|
|
|
|
virtual void clearContents() = 0;
|
|
|
|
|
virtual void visibilityChanged(bool visible) = 0;
|
|
|
|
|
|
|
|
|
|
// This function is called to give the outputwindow focus
|
|
|
|
|
virtual void setFocus() = 0;
|
2010-01-11 10:22:55 +01:00
|
|
|
// Whether the outputpane has focus
|
2011-09-27 13:47:06 +02:00
|
|
|
virtual bool hasFocus() const = 0;
|
2010-01-11 10:22:55 +01:00
|
|
|
// Whether the outputpane can be focused at the moment.
|
|
|
|
|
// (E.g. the search result window does not want to be focused if the are no results.)
|
2011-09-27 13:47:06 +02:00
|
|
|
virtual bool canFocus() const = 0;
|
2009-04-30 12:50:52 +02:00
|
|
|
|
2011-09-27 13:47:06 +02:00
|
|
|
virtual bool canNavigate() const = 0;
|
|
|
|
|
virtual bool canNext() const = 0;
|
|
|
|
|
virtual bool canPrevious() const = 0;
|
2009-04-30 12:50:52 +02:00
|
|
|
virtual void goToNext() = 0;
|
|
|
|
|
virtual void goToPrev() = 0;
|
2011-09-27 13:47:06 +02:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
public slots:
|
2011-11-24 11:38:35 +01:00
|
|
|
void popup() { popup(true, false); }
|
|
|
|
|
void popup(bool withFocus) { popup(withFocus, false); }
|
|
|
|
|
void popup(bool withFocus, bool ensureSizeHint) { emit showPage(withFocus, ensureSizeHint); }
|
2011-09-27 13:47:06 +02:00
|
|
|
void hide() { emit hidePage(); }
|
|
|
|
|
void toggle() { toggle(true); }
|
|
|
|
|
void toggle(bool withFocusIfShown) { emit togglePage(withFocusIfShown); }
|
|
|
|
|
void navigateStateChanged() { emit navigateStateUpdate(); }
|
2009-04-30 12:50:52 +02:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
signals:
|
2011-11-24 11:38:35 +01:00
|
|
|
void showPage(bool withFocus, bool ensureSizeHint);
|
2008-12-02 12:01:29 +01:00
|
|
|
void hidePage();
|
|
|
|
|
void togglePage(bool withFocusIfShown);
|
2009-04-30 12:50:52 +02:00
|
|
|
void navigateStateUpdate();
|
2008-12-02 12:01:29 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Core
|
|
|
|
|
|
|
|
|
|
#endif // IOUTPUTPANE_H
|