]> SALOME platform Git repositories - modules/gui.git/blob - tools/RemoteFileBrowser/QMachineBrowser
Salome HOME
Merge changes from 'master' branch.
[modules/gui.git] / tools / RemoteFileBrowser / QMachineBrowser
1 // Copyright (C) 2017  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 // Author : Anthony GEAY (EDF R&D)
20
21 #ifndef __QMACHINEBROWSER__
22 #define __QMACHINEBROWSER__
23
24 #include <QWidget>
25 #include <QComboBox>
26
27 class QPushButton;
28 class QLineEdit;
29
30 class QMachineSelector : public QComboBox
31 {
32   Q_OBJECT
33 public:
34   QMachineSelector(QWidget *parent);
35   void initLocation();
36 public slots:
37   void appendEntry(const QString& entry);
38 private:
39   void fillMachines();
40   void fillMachinesFromCatalog();
41   void fillMachinesFromSettings();
42   void assignToLocalhost();
43 };
44
45 class QMachineManager : public QWidget
46 {
47   Q_OBJECT
48 public:
49   QMachineManager(QWidget *parent);
50   void initLocation();
51   QString getSelectedHost() const;
52 public slots:
53   void newEntryRequested();
54 private:
55   QPushButton *_pb;
56   QMachineSelector *_ms;
57 };
58
59 class QRemoteFileSystemModel;
60 class FileLoader;
61
62 class QMachineBrowser : public QWidget
63 {
64   Q_OBJECT
65 public:
66   QMachineBrowser(QWidget *parent=NULL);
67   void initLocation();
68   QRemoteFileSystemModel *generateModel();
69   FileLoader *generateFileLoader();
70 signals:
71   void locationChanged();
72 private:
73   QMachineManager *_msel;
74   QLineEdit *_le;
75 };
76
77 #endif