ParaView
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:
39  QWidget *parent,
40  Qt::WindowFlags f,
41  int clientHostType,
42  int serverHostType);
43 
45 
46  // Description:
47  // before running the dialog call these to set the
48  // active host and process id.
49  void SetActiveHost(string host);
50  void SetActivePid(string pid);
51 
52  // Description:
53  // Returns the command that the user has selected
54  string GetCommand();
55 
56 private slots:
57  void AddCommandTemplate();
58  void EditCommandTemplate();
59  void DeleteCommandTemplate();
60 
61  void UpdateCommandPreview();
62  void UpdateTokenValues();
63  void UpdateForm();
64 
65  void FindXTermExecutable();
66  void FindSshExecutable();
67 
68 private:
69  void Save();
70  void Restore();
71  string LocateFile();
72 
73 private:
74  pqRemoteCommandDialogUI *Ui;
75 
76  string CommandSetName;
77  QStringList CommandSet;
78 
79  vector<string> Tokens;
80  vector<string> TokenValues;
81  vector<QLineEdit*> TokenWidgets;
82 };
83 
84 #endif
void SetActiveHost(string host)
pqRemoteCommandDialog(QWidget *parent, Qt::WindowFlags f, int clientHostType, int serverHostType)
void SetActivePid(string pid)