pqRemoteCommandDialog.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
3 #ifndef pqRemoteCommandDialog_h
4 #define pqRemoteCommandDialog_h
5 
6 // .NAME pqRemoteCommandDialog - Dialog for configuring remote commands
7 // .SECTION Description
8 // .SECTION See Also
9 // .SECTION Thanks
10 
11 #include <QDialog>
12 #include <QLineEdit>
13 
14 #include <vector>
15 using std::vector;
16 #include <string>
17 using std::string;
18 
19 class pqRemoteCommandDialogUI;
20 
21 class pqRemoteCommandDialog : public QDialog
22 {
23  Q_OBJECT
24 
25 public:
26  pqRemoteCommandDialog(QWidget* parent, Qt::WindowFlags f, int clientHostType, int serverHostType);
27 
28  ~pqRemoteCommandDialog() override;
29 
30  // Description:
31  // before running the dialog call these to set the
32  // active host and process id.
33  void SetActiveHost(string host);
34  void SetActivePid(string pid);
35 
36  // Description:
37  // Returns the command that the user has selected
38  string GetCommand();
39 
40 private Q_SLOTS:
41  void AddCommandTemplate();
42  void EditCommandTemplate();
43  void DeleteCommandTemplate();
44 
45  void UpdateCommandPreview();
46  void UpdateTokenValues();
47  void UpdateForm();
48 
49  void FindXTermExecutable();
50  void FindSshExecutable();
51 
52 private: // NOLINT(readability-redundant-access-specifiers)
53  void Save();
54  void Restore();
55  string LocateFile();
56 
57  pqRemoteCommandDialogUI* Ui;
58 
59  string CommandSetName;
60  QStringList CommandSet;
61 
62  vector<string> Tokens;
63  vector<string> TokenValues;
64  vector<QLineEdit*> TokenWidgets;
65 };
66 
67 #endif
void SetActiveHost(string host)
pqRemoteCommandDialog(QWidget *parent, Qt::WindowFlags f, int clientHostType, int serverHostType)
void SetActivePid(string pid)
~pqRemoteCommandDialog() override