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 14:09:21 +01:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
#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
|
2019-03-31 08:04:43 +02:00
|
|
|
class QToolButton;
|
2009-10-01 16:38:08 +02:00
|
|
|
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:
|
2017-12-08 17:20:48 +01:00
|
|
|
IOutputPane(QObject *parent = nullptr);
|
2018-05-07 15:00:03 +02:00
|
|
|
~IOutputPane() override;
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
virtual QWidget *outputWidget(QWidget *parent) = 0;
|
2019-03-31 08:04:43 +02:00
|
|
|
virtual QList<QWidget *> toolBarWidgets() const;
|
2010-06-16 11:56:30 +02:00
|
|
|
virtual QString displayName() const = 0;
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
virtual int priorityInStatusBar() const = 0;
|
|
|
|
|
|
|
|
|
|
virtual void clearContents() = 0;
|
|
|
|
|
virtual void visibilityChanged(bool visible) = 0;
|
|
|
|
|
|
|
|
|
|
virtual void setFocus() = 0;
|
2011-09-27 13:47:06 +02:00
|
|
|
virtual bool hasFocus() const = 0;
|
|
|
|
|
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
|
|
|
|
2019-03-31 08:04:43 +02:00
|
|
|
void setFont(const QFont &font);
|
|
|
|
|
void setWheelZoomEnabled(bool enabled);
|
|
|
|
|
|
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);
|
2019-03-31 08:04:43 +02:00
|
|
|
void zoomIn(int range);
|
|
|
|
|
void zoomOut(int range);
|
|
|
|
|
void wheelZoomEnabledChanged(bool enabled);
|
|
|
|
|
void fontChanged(const QFont &font);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
void setZoomButtonsEnabled(bool enabled);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
QToolButton * const m_zoomInButton = nullptr;
|
|
|
|
|
QToolButton * const m_zoomOutButton = nullptr;
|
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)
|