dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
iuavgadget.h
Go to the documentation of this file.
1 
13 /*
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.
18  *
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.
23  *
24  * You should have received a copy of the GNU General Public License along
25  * with this program; if not, see <http://www.gnu.org/licenses/>
26  */
27 
28 #ifndef IUAVGADGET_H
29 #define IUAVGADGET_H
30 
31 #include <coreplugin/icontext.h>
32 #include <coreplugin/core_global.h>
33 #include <QComboBox>
34 #include <QtCore/QSettings>
35 
36 QT_BEGIN_NAMESPACE
37 class QWidget;
38 class QComboBox;
39 QT_END_NAMESPACE
40 
41 namespace Core {
42 
43 class IUAVGadgetConfiguration;
44 
45 class CORE_EXPORT IUAVGadget : public IContext
46 {
47  Q_OBJECT
48 public:
49  IUAVGadget(QString classId, QObject *parent = nullptr)
50  : IContext(parent)
51  , m_classId(classId)
52  {
53  }
54 
55  virtual ~IUAVGadget() {}
56 
57  QList<int> context() const { return m_context; }
58  void setContext(QList<int> context) { m_context = context; }
59  virtual QWidget *widget() = 0;
60  virtual QComboBox *toolBar() { return nullptr; }
61  virtual QString contextHelpId() const { return QString(); }
62  QString classId() const { return m_classId; }
63 
64  virtual IUAVGadgetConfiguration *activeConfiguration() { return nullptr; }
66  virtual void saveState(QSettings * /*qSettings*/) {}
67  virtual void restoreState(QByteArray) {}
68  virtual void restoreState(QSettings * /*qSettings*/) {}
69 public slots:
73 private slots:
74 private:
75  QString m_classId;
76  QList<int> m_context;
77 };
78 
79 } // namespace Core
80 
81 #endif // IUAVGADGET_H
virtual void configurationAdded(IUAVGadgetConfiguration *)
Definition: iuavgadget.h:71
virtual ~IUAVGadget()
Definition: iuavgadget.h:55
QString classId() const
Definition: iuavgadget.h:62
virtual void loadConfiguration(IUAVGadgetConfiguration *)
Definition: iuavgadget.h:65
virtual QComboBox * toolBar()
Definition: iuavgadget.h:60
virtual void restoreState(QSettings *)
Definition: iuavgadget.h:68
virtual void configurationToBeDeleted(IUAVGadgetConfiguration *)
Definition: iuavgadget.h:72
virtual void configurationChanged(IUAVGadgetConfiguration *)
Definition: iuavgadget.h:70
IUAVGadget(QString classId, QObject *parent=nullptr)
Definition: iuavgadget.h:49
virtual void restoreState(QByteArray)
Definition: iuavgadget.h:67
virtual void saveState(QSettings *)
Definition: iuavgadget.h:66
QList< int > context() const
Definition: iuavgadget.h:57
virtual QString contextHelpId() const
Definition: iuavgadget.h:61
void setContext(QList< int > context)
Definition: iuavgadget.h:58
virtual IUAVGadgetConfiguration * activeConfiguration()
Definition: iuavgadget.h:64