PluginManagerDialog.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file terralib/qt/widgets/plugin/manager/PluginManagerDialog.h
22 
23  \brief A Qt dialog for plugin management.
24 */
25 
26 #ifndef __TERRALIB_QT_WDIGETS_PLUGIN_MANAGER_INTERNAL_PLUGINMANAGERDIALOG_H
27 #define __TERRALIB_QT_WDIGETS_PLUGIN_MANAGER_INTERNAL_PLUGINMANAGERDIALOG_H
28 
29 // TerraLib
30 #include "../../Config.h"
31 
32 // STL
33 #include <memory>
34 #include <set>
35 
36 // Qt
37 #include <QDialog>
38 
39 // Forward declaration
40 namespace Ui { class PluginManagerDialogForm; }
41 
42 class QModelIndex;
43 class QNetworkReply;
44 class QTableView;
45 class QTableWidget;
46 class QTableWidgetItem;
47 
48 namespace te
49 {
50  namespace plugin
51  {
52 // Forward declaration
53  struct PluginInfo;
54  }
55 
56  namespace qt
57  {
58  namespace widgets
59  {
60 // Forward declaration
61  class PluginsModel;
62 
63  //struct iPluginInfo;
64 
65  class TEQTWIDGETSEXPORT PluginManagerDialog : public QDialog
66  {
67  Q_OBJECT
68 
69  public:
70 
71  PluginManagerDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
72 
74 
75  protected slots:
76 
77  void applyPushButtonPressed();
78 
79  void tableWidgetClicked(QTableWidgetItem* item);
80 
81  void replyFinished(QNetworkReply*);
82 
83  void addPlugins();
84 
85  void removePlugins();
86 
87  void dataChanged(const QModelIndex&, const QModelIndex&);
88 
89  void onEnableAllChanged(bool st);
90 
91  protected:
92 
93  void fillInstalledPlugins();
94 
95  void filliPlugins();
96 
97  void addEntry(int i, const te::plugin::PluginInfo& pinfo, bool checked);
98 
99  private:
100 
101  std::auto_ptr<Ui::PluginManagerDialogForm> m_ui;
102  //std::set<iPluginInfo> m_iplugins;
104  std::set<int> m_downloadPlugins;
106  };
107 
108  } // end namespace widgets
109  } // end namespace qt
110 } // end namespace te
111 
112 #endif // __TERRALIB_QT_WDIGETS_PLUGIN_MANAGER_INTERNAL_PLUGINMANAGERDIALOG_H
URI C++ Library.
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
The basic information about a plugin.
Definition: PluginInfo.h:61
std::auto_ptr< Ui::PluginManagerDialogForm > m_ui