Salome HOME
Updated copyright comment
[modules/gui.git] / tools / RemoteFileBrowser / QMachineBrowser.h
1 // Copyright (C) 2017-2024  CEA, EDF
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 "RemoteFileBrowser.h"
25
26 #include <QWidget>
27 #include <QComboBox>
28
29 class QPushButton;
30 class QLineEdit;
31
32 class QREMOTEFILEBROWSER_EXPORT QMachineSelector : public QComboBox
33 {
34   Q_OBJECT
35 public:
36   QMachineSelector(QWidget *parent);
37   void initLocation();
38 public slots:
39   void appendEntry(const QString& entry);
40 private:
41   void fillMachines();
42   void fillMachinesFromCatalog();
43   void fillMachinesFromSettings();
44   void assignToLocalhost();
45 };
46
47 class QREMOTEFILEBROWSER_EXPORT QMachineManager : public QWidget
48 {
49   Q_OBJECT
50 public:
51   QMachineManager(QWidget *parent);
52   void initLocation();
53   QString getSelectedHost() const;
54 public slots:
55   void newEntryRequested();
56 private:
57   QPushButton *_pb;
58   QMachineSelector *_ms;
59 };
60
61 class QRemoteFileSystemModel;
62 class FileLoader;
63
64 class QREMOTEFILEBROWSER_EXPORT QMachineBrowser : public QWidget
65 {
66   Q_OBJECT
67 public:
68   QMachineBrowser(QWidget *parent=NULL);
69   void initLocation();
70   QRemoteFileSystemModel *generateModel();
71   FileLoader *generateFileLoader();
72 signals:
73   void locationChanged();
74 private:
75   QMachineManager *_msel;
76   QLineEdit *_le;
77 };
78
79 #endif