2 ******************************************************************************
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
9 * @addtogroup CorePlugin Core Plugin
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
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
32 #include "core_global.h"
42 class RightPaneWidget
;
44 // TODO: The right pane works only for the help plugin atm. It can't cope
45 // with more than one plugin publishing objects they want in the right pane
46 // For that the API would need to be different. (Might be that instead of
47 // adding objects to the pool, there should be a method
48 // RightPaneWidget::setWidget(QWidget *w) Anyway if a second plugin wants to
49 // show something there, redesign this API
51 class CORE_EXPORT RightPanePlaceHolder
: public QWidget
{
52 friend class Core::RightPaneWidget
;
56 RightPanePlaceHolder(Core::IMode
*mode
, QWidget
*parent
= 0);
57 ~RightPanePlaceHolder();
58 static RightPanePlaceHolder
*current();
61 void currentModeChanged(Core::IMode
*);
64 void applyStoredSize(int width
);
66 static RightPanePlaceHolder
*m_current
;
70 class CORE_EXPORT BaseRightPaneWidget
: public QObject
{
74 BaseRightPaneWidget(QWidget
*widget
);
75 ~BaseRightPaneWidget();
76 QWidget
*widget() const;
83 class CORE_EXPORT RightPaneWidget
: public QWidget
{
90 void saveSettings(QSettings
*settings
);
91 void readSettings(QSettings
*settings
);
94 void setShown(bool b
);
96 static RightPaneWidget
*instance();
101 void resizeEvent(QResizeEvent
*);
104 void objectAdded(QObject
*obj
);
105 void aboutToRemoveObject(QObject
*obj
);
110 static RightPaneWidget
*m_instance
;
114 #endif // RIGHTPANE_H