Merged in f5soh/librepilot/update_credits (pull request #529)
[librepilot.git] / ground / gcs / src / plugins / coreplugin / ioutputpane.h
blobaeb518b936d0dd6a896cad77e664799bbb5a29b3
1 /**
2 ******************************************************************************
4 * @file ioutputpane.h
5 * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
6 * Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009.
7 * @addtogroup GCSPlugins GCS Plugins
8 * @{
9 * @addtogroup CorePlugin Core Plugin
10 * @{
11 * @brief The Core GCS plugin
12 *****************************************************************************/
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 3 of the License, or
17 * (at your option) any later version.
19 * This program is distributed in the hope that it will be useful, but
20 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 * for more details.
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 #ifndef IOUTPUTPANE_H
30 #define IOUTPUTPANE_H
32 #include "core_global.h"
34 #include <QtCore/QObject>
35 #include <QtCore/QList>
36 #include <QtCore/QString>
38 QT_BEGIN_NAMESPACE
39 class QWidget;
40 QT_END_NAMESPACE
42 namespace Core {
43 class CORE_EXPORT IOutputPane : public QObject {
44 Q_OBJECT
45 public:
46 IOutputPane(QObject *parent = 0) : QObject(parent) {}
47 virtual ~IOutputPane() {}
49 virtual QWidget *outputWidget(QWidget *parent) = 0;
50 virtual QList<QWidget *> toolBarWidgets() const = 0;
51 virtual QString name() const = 0;
53 // -1 don't show in statusBar
54 // 100...0 show at front...end
55 virtual int priorityInStatusBar() const = 0;
57 virtual void clearContents() = 0;
58 virtual void visibilityChanged(bool visible) = 0;
60 // This function is called to give the outputwindow focus
61 virtual void setFocus() = 0;
62 // Wheter the outputpane has focus
63 virtual bool hasFocus() = 0;
64 // Wheter the outputpane can be focused at the moment.
65 // (E.g. the search result window doesn't want to be focussed if the are no results.)
66 virtual bool canFocus() = 0;
68 virtual bool canNavigate() = 0;
69 virtual bool canNext() = 0;
70 virtual bool canPrevious() = 0;
71 virtual void goToNext() = 0;
72 virtual void goToPrev() = 0;
73 public slots:
74 void popup()
76 popup(true);
78 void popup(bool withFocus)
80 emit showPage(withFocus);
83 void hide()
85 emit hidePage();
88 void toggle()
90 toggle(true);
93 void toggle(bool withFocusIfShown)
95 emit togglePage(withFocusIfShown);
98 void navigateStateChanged()
100 emit navigateStateUpdate();
103 signals:
104 void showPage(bool withFocus);
105 void hidePage();
106 void togglePage(bool withFocusIfShown);
107 void navigateStateUpdate();
109 } // namespace Core
111 #endif // IOUTPUTPANE_H