Documentation for OpenFLUID 2.2.0
AbstractSrcImportDialog.hpp
Go to the documentation of this file.
1 /*
2 
3  This file is part of OpenFLUID software
4  Copyright(c) 2007, INRA - Montpellier SupAgro
5 
6 
7  == GNU General Public License Usage ==
8 
9  OpenFLUID is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  (at your option) any later version.
13 
14  OpenFLUID is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with OpenFLUID. If not, see <http://www.gnu.org/licenses/>.
21 
22 
23  == Other Usage ==
24 
25  Other Usage means a use of OpenFLUID that is inconsistent with the GPL
26  license, and requires a written agreement between You and INRA.
27  Licensees for Other Usage of OpenFLUID may use this file in accordance
28  with the terms contained in the written agreement between You and INRA.
29 
30  */
31 
32 /**
33  @file AbstractSrcImportDialog.hpp
34 
35  @author Armel THÖNI <armel.thoni@inra.fr>
36  */
37 
38 
39 #ifndef __OPENFLUID_UIWARESDEV_ABSTRACTSRCIMPORTDIALOG_HPP__
40 #define __OPENFLUID_UIWARESDEV_ABSTRACTSRCIMPORTDIALOG_HPP__
41 
42 
43 #include <QListWidget>
44 #include <QLineEdit>
45 #include <QAbstractButton>
46 #include <QButtonGroup>
47 #include <QLabel>
48 #include <QPushButton>
49 
50 #include <openfluid/dllexport.hpp>
51 #include <openfluid/ware/TypeDefs.hpp>
52 #include <openfluid/config.hpp>
59 
60 
61 namespace openfluid { namespace ui { namespace waresdev {
62 
63 
64 class WaresImportWorker;
65 
66 
68 {
69  Q_OBJECT
70 
71  protected slots :
72 
73  virtual bool check() = 0;
74 
75  virtual void onHubConnectButtonClicked();
76 
78 
79  virtual void onImportAsked() = 0;
80 
81 
82  protected:
83 
85 
86  QList<QWidget*> m_HubLoginWidgets;
87  QList<QWidget*> m_HubConnectionInfoWidgets;
88  QList<QWidget*> m_HubLoginWidgetsAndButton;
89 
94 
96 
97  QStringList getSelectedWares();
98 
99  virtual void updateHubElementsList() = 0;
100 
101  virtual QLineEdit* hubUrlLineEdit() = 0;
102 
103  virtual QLineEdit* usernameLineEdit() = 0;
104 
105  virtual QLineEdit* passwordLineEdit() = 0;
106 
107  virtual QPushButton* hubConnectButton() = 0;
108 
109  virtual QPushButton* hubLoginButton() = 0;
110 
111  virtual QLabel* hubUsernameLabel() = 0;
112 
113  virtual void clearListWidgets() = 0;
114 
115  virtual void customHideWidget(QWidget* Widget) = 0;
116 
117  virtual void postConnectSetup() = 0;
118 
119  QStringList getSelectedElementsFromListWidget(const QListWidget* ListWidget);
120 
121  void genericItemDisplay(bool AlreadyDisplayed, bool NotAuthorized, QListWidgetItem* Item, const QString& ElementId);
122 
124  QThread* Thread,
126 
127  void runThread(QThread* Thread, openfluid::ui::waresdev::WaresSrcIOProgressDialog& ProgressDialog);
128 
129 
130  public:
131 
132  explicit AbstractSrcImportDialog(QWidget* Parent);
133 
135 
136 };
137 
138 
139 } } } //namespaces
140 
141 
142 #endif /* __OPENFLUID_UIWARESDEV_ABSTRACTSRCIMPORTDIALOG_HPP__ */
Definition: MessageDialog.hpp:56
Definition: AbstractSrcImportDialog.hpp:68
QList< QWidget * > m_HubConnectionInfoWidgets
Definition: AbstractSrcImportDialog.hpp:87
QString m_HubButtonDisconnectLabel
Definition: AbstractSrcImportDialog.hpp:91
virtual void customHideWidget(QWidget *Widget)=0
void genericItemDisplay(bool AlreadyDisplayed, bool NotAuthorized, QListWidgetItem *Item, const QString &ElementId)
QStringList getSelectedElementsFromListWidget(const QListWidget *ListWidget)
void runThread(QThread *Thread, openfluid::ui::waresdev::WaresSrcIOProgressDialog &ProgressDialog)
void setupImportManagerThread(openfluid::ui::waresdev::SrcImportSequenceManager *SrcImportSequenceManager, QThread *Thread, openfluid::ui::waresdev::WaresSrcIOProgressDialog *ProgressDialogPtr)
openfluid::ui::waresdev::HubManager m_HubManager
Definition: AbstractSrcImportDialog.hpp:84
QList< QWidget * > m_HubLoginWidgetsAndButton
Definition: AbstractSrcImportDialog.hpp:88
QString m_HubButtonLogoutLabel
Definition: AbstractSrcImportDialog.hpp:93
QString m_HubButtonConnectLabel
Definition: AbstractSrcImportDialog.hpp:90
QList< QWidget * > m_HubLoginWidgets
Definition: AbstractSrcImportDialog.hpp:86
QString m_HubButtonLoginLabel
Definition: AbstractSrcImportDialog.hpp:92
Definition: HubManager.hpp:53
Definition: SrcImportSequenceManager.hpp:54
Definition: WaresImportWorker.hpp:58
Definition: WaresSrcIOProgressDialog.hpp:57
#define OPENFLUID_API
Definition: dllexport.hpp:86
Definition: ApplicationException.hpp:47