dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
pfdqmlgadget.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful, but
8  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
9  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
10  * for more details.
11  *
12  * You should have received a copy of the GNU General Public License along
13  * with this program; if not, see <http://www.gnu.org/licenses/>
14  */
15 
16 #ifndef PFDQMLGADGET_H_
17 #define PFDQMLGADGET_H_
18 
19 #include <coreplugin/iuavgadget.h>
20 #include "pfdqmlgadgetwidget.h"
21 
22 class IUAVGadget;
23 class QWidget;
24 class QString;
25 class PfdQmlGadgetWidget;
26 
27 using namespace Core;
28 
30 {
31  Q_OBJECT
32 public:
33  PfdQmlGadget(QString classId, PfdQmlGadgetWidget *widget, QWidget *parent = nullptr);
34  ~PfdQmlGadget();
35 
36  QWidget *widget()
37  {
38  if (!m_container) {
39  m_container = QWidget::createWindowContainer(m_widget, m_parent);
40  m_container->setMinimumSize(64, 64);
41  m_container->setSizePolicy(QSizePolicy::MinimumExpanding,
42  QSizePolicy::MinimumExpanding);
43  }
44  return m_container;
45  }
46 
47  void loadConfiguration(IUAVGadgetConfiguration *config);
48 
49 private:
50  QWidget *m_container;
51  QWidget *m_parent;
52  PfdQmlGadgetWidget *m_widget;
53 };
54 
55 #endif // PFDQMLQMLGADGET_H_
QWidget * widget()
Definition: pfdqmlgadget.h:36