pqRemoteCommandDialog.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPVInformation.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 #ifndef pqRemoteCommandDialog_h
16 #define pqRemoteCommandDialog_h
17 
18 // .NAME pqRemoteCommandDialog - Dialog for configuring remote commands
19 // .SECTION Description
20 // .SECTION See Also
21 // .SECTION Thanks
22 
23 #include <QDialog>
24 #include <QLineEdit>
25 
26 #include <vector>
27 using std::vector;
28 #include <string>
29 using std::string;
30 
31 class pqRemoteCommandDialogUI;
32 
33 class pqRemoteCommandDialog : public QDialog
34 {
35  Q_OBJECT
36 
37 public:
38  pqRemoteCommandDialog(QWidget* parent, Qt::WindowFlags f, int clientHostType, int serverHostType);
39 
40  ~pqRemoteCommandDialog() override;
41 
42  // Description:
43  // before running the dialog call these to set the
44  // active host and process id.
45  void SetActiveHost(string host);
46  void SetActivePid(string pid);
47 
48  // Description:
49  // Returns the command that the user has selected
50  string GetCommand();
51 
52 private Q_SLOTS:
53  void AddCommandTemplate();
54  void EditCommandTemplate();
55  void DeleteCommandTemplate();
56 
57  void UpdateCommandPreview();
58  void UpdateTokenValues();
59  void UpdateForm();
60 
61  void FindXTermExecutable();
62  void FindSshExecutable();
63 
64 private:
65  void Save();
66  void Restore();
67  string LocateFile();
68 
69 private:
70  pqRemoteCommandDialogUI* Ui;
71 
72  string CommandSetName;
73  QStringList CommandSet;
74 
75  vector<string> Tokens;
76  vector<string> TokenValues;
77  vector<QLineEdit*> TokenWidgets;
78 };
79 
80 #endif
void SetActiveHost(string host)
pqRemoteCommandDialog(QWidget *parent, Qt::WindowFlags f, int clientHostType, int serverHostType)
void SetActivePid(string pid)
~pqRemoteCommandDialog() override