#ifndef RUNCMD_H #define RUNCMD_H #include #include #include #include #include #include #include #include #include #include #include #include #include "channelMasks.h" #include "constants.h" class RunCmd : public QMainWindow { Q_OBJECT public: RunCmd( int c, int r, ChannelMasks* m, QWidget* parentCP, QWidget* parent ); // Default constructor. ~RunCmd(); // Default destructor. void displayWindow(); // Enable/disable the appropriate checkboxes and show the window. public slots: void runCommand(); // Function to run the command in the cmdLine object on the selected channels. void runCommandFin(); // Finish the run command process. void readOutput( int c ); // Read in the output from the command on the specified channel. void closeEvent( QCloseEvent* event ); // Function to clear the checkboxes and command line when the window closes. void selectAll(); // Check all of the slice boxes. void deselectAll(); // Uncheck all of the slice boxes. signals: void writeMsg( QString text, int type ); // Signal to write a message to a log. private: QCheckBox** chanBox; // Pointers to the checkboxes. QLineEdit* cmdLine; // The text entry line for the command to be run. QGridLayout* layout; // Main layout for the window. QLabel* cmdLineLabel; // Label for the text entry line. QPushButton* runCmdButton; // The Run Command button. QPushButton* selAllButton; // Select All button. QPushButton* selNoneButton; // Unselect All button. QProcess** procs; // Processes to run the commands. ChannelMasks* masks; // Pointer to the ChannelMasks object. bool* procFinished; // Booleans to keep track if the processes have finished. int channels; // Number of channels. int rNum; // Number of the radar. }; #endif // RUNCMD_H