LibEngsas
emodulestatedialog.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2010 - 2012 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Lesser General Public
6  License as published by the Free Software Foundation; either
7  version 2.1 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Lesser General Public License for more details.
13 
14  You should have received a copy of the GNU Lesser General Public
15  License along with this library; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17  MA 02110-1301 USA.
18 */
19 
20 
21 #ifndef EMODULESTATEDIALOG_H
22 #define EMODULESTATEDIALOG_H
23 
24 #include "edialog.h"
25 #include "eglobal.h"
26 
28 class EModuleStateWidget;
29 
30 namespace Ui {
31  class EModuleStateDialog;
32 };
33 
34 #include <QMap>
35 
45 {
46  Q_OBJECT
47  Q_FLAGS(ActiveButtons)
48  public:
56  enum ActiveButton {
57  Load = 0x01,
58  Unload = 0x02,
59  };
60  Q_DECLARE_FLAGS(ActiveButtons, ActiveButton)
61  Q_ENUMS(ActiveButton)
62 
63  EModuleStateDialog(QWidget* parent = 0, Qt::WindowFlags flags = 0);
64 
65  EModuleStateWidget *addModuleState(EngSaS::ModuleListWidgetItems protocol, QString title,
66  ActiveButtons enabledButtons = ActiveButtons());
67 
68  private slots:
69  void tabChanged(int index);
70  void itemClicked ( EModuleListWidgetItem *item );
71  void loadButton();
72  void unloadButton();
73  void reloadAllButton();
74 
75  private:
76  EModuleListWidgetItem *activeItem;
78  QMap<int, ActiveButtons> activeButtons;
79 
80  signals:
81  void reloadPlugins();
82  void unload ( EModuleListWidgetItem* item );
83  void loadPlugin ( EModuleListWidgetItem* item, bool emitSetupWizard );
84 };
85 
86 Q_DECLARE_OPERATORS_FOR_FLAGS(EModuleStateDialog::ActiveButtons)
87 
88 #endif // EMODULESTATEDIALOG_H
QList< EModuleListWidgetItem * > ModuleListWidgetItems
A type to replace QList with a shorter name.
Definition: eglobal.h:168
Definition: eaboutdialog.h:28
Definition: eglobal.h:126
Some definitions, used along LibEngsas.
Definition: eglobal.h:121
#define E_CORE_EXPORT
Definition: eglobal.h:107
Shows some information about the loading process of each found module.
Definition: emodulestatewidget.h:39
Dialog to display EModuleStateWidgets.
Definition: emodulestatedialog.h:44
ActiveButton
Enum to identify which buttons should be enabled.
Definition: emodulestatedialog.h:56
A QListWidgetItem to handle information about a plugin.
Definition: emodulelistwidgetitem.h:45
Mostly the same as EWidget but for QDialog as base class.
Definition: edialog.h:54