QGCDockWidget.h 941 Bytes
Newer Older
1 2 3 4 5 6 7 8 9
/****************************************************************************
 *
 *   (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
 *
 * QGroundControl is licensed according to the terms in the file
 * COPYING.md in the root of the source code directory.
 *
 ****************************************************************************/

10 11 12 13 14

#ifndef QGCDockWidget_h
#define QGCDockWidget_h

#include <QDockWidget>
15
#include <QAction>
16
#include <QPointer>
17

18
class QGCDockWidget : public QWidget {
19 20 21
    Q_OBJECT
    
public:
22 23 24 25 26
    /// Pass in title = QString() and action = NULL when just using as a regular widget
    QGCDockWidget(const QString& title, QAction* action, QWidget *parent = 0);
    
    void loadSettings(void);
    void saveSettings(void);
27 28

    void closeEvent(QCloseEvent* event);
29

30 31
protected:
    QString             _title;
32
    QPointer<QAction>   _action;
33
    static const char*  _settingsGroup;
34 35 36 37
};


#endif