2009-02-25 09:15:00 +01:00
|
|
|
/**************************************************************************
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator
|
|
|
|
|
**
|
2012-01-26 18:33:46 +01:00
|
|
|
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2012-07-19 12:26:56 +02:00
|
|
|
** Contact: http://www.qt-project.org/
|
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.
|
|
|
|
|
**
|
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"
|
|
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QObject>
|
|
|
|
|
#include <QList>
|
|
|
|
|
#include <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
|
|
|
|
2012-09-13 15:50:06 +02:00
|
|
|
enum Flag { NoModeSwitch = 0, ModeSwitch = 1, WithFocus = 2, EnsureSizeHint = 4};
|
|
|
|
|
Q_DECLARE_FLAGS(Flags, Flag)
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
public slots:
|
2012-09-13 15:50:06 +02:00
|
|
|
void popup(int flags) { emit showPage(flags); }
|
|
|
|
|
|
2011-09-27 13:47:06 +02:00
|
|
|
void hide() { emit hidePage(); }
|
2012-09-13 15:50:06 +02:00
|
|
|
void toggle(int flags) { emit togglePage(flags); }
|
2011-09-27 13:47:06 +02:00
|
|
|
void navigateStateChanged() { emit navigateStateUpdate(); }
|
2012-06-11 10:32:16 +02:00
|
|
|
void flash() { emit flashButton(); }
|
2012-06-14 16:33:10 +02:00
|
|
|
void setIconBadgeNumber(int number) { emit setBadgeNumber(number); }
|
2009-04-30 12:50:52 +02:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
signals:
|
2012-09-13 15:50:06 +02:00
|
|
|
void showPage(int flags);
|
2008-12-02 12:01:29 +01:00
|
|
|
void hidePage();
|
2012-09-13 15:50:06 +02:00
|
|
|
void togglePage(int flags);
|
2009-04-30 12:50:52 +02:00
|
|
|
void navigateStateUpdate();
|
2012-06-11 10:32:16 +02:00
|
|
|
void flashButton();
|
2012-06-14 16:33:10 +02:00
|
|
|
void setBadgeNumber(int number);
|
2008-12-02 12:01:29 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Core
|
|
|
|
|
|
2012-09-13 15:50:06 +02:00
|
|
|
Q_DECLARE_OPERATORS_FOR_FLAGS(Core::IOutputPane::Flags)
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
#endif // IOUTPUTPANE_H
|