#ifndef CONTROLPANEL_H #define CONTROLPANEL_H #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "diskGauge.h" #include "channelFeedback.h" #include "radarStatus.h" #include "hddStatus.h" #include "activityLog.h" #include "radarActions.h" #include "quickLook.h" #include "constants.h" class ControlPanel: public QMainWindow { Q_OBJECT public: ControlPanel( int r, int c, QWidget * = NULL ); ~ControlPanel(); public slots: void setStatusValues( QString utc, uint32_t pps, uint32_t epri ); void setRefresh( QString refresh ); void setMaxPPS( double sFreq ); // Set the max. pps value. void changeThemeDef(); // Changes the theme to the default (Just the background image for now). void changeThemeRace(); // Changes the theme to racing (Just the background image for now). void changeThemeFlame(); // Changes the theme to flames (Just the background image for now). void writeToLog( QString text, int lType ); // Write the text to the correct log. void changeFeedbackLEDColor( QColor color, int type ); // Change the LED color in the Feedback module. void changeStatusLEDColor( QColor color, int type ); // Change the LED color in the Status module. void showAboutWindow(); // Show the About window. void dispDataRate( QString msg ); // Display the new estimated recording speed. void setHDDStatus( double ar, double total, double free, int rem ); // Set the values in the HDD Status module of the control panel. signals: void cpWindowClosed(); protected: void closeEvent( QCloseEvent* event ); private: enum{ numButtons = 13, numParams = 2, numStatus = 4, numStatusLEDs = 2, numLEDs = 3 }; void setStatusBarVersion(); QVBoxLayout* createButtons(); QVBoxLayout* createLogViewer(); QVBoxLayout* createStatusSection(); void createDiskGauge(); // Creates the disk gauge to show the fewest GB remaining on any of the recording drives. bool checkValidParams(); void createMenu(); // Create the file menu at the top of the window. QuickLook* quickLook; ActivityLog* aLog; ChannelFeedback* chFeedback; RadarStatus* rStatus; HDDStatus* hddStatus; RadarActions* rActions; QPlainTextEdit* log; QPushButton* cpButtons[ numButtons ]; QGroupBox* buttonBox; QGroupBox* diskGaugeBox; QProcess* chmod; QProcess* runCmd; QProcess* runRebootCmd; QProcess* runRadCmd; QProcess* runStartRadCmd; QProcess* runStopRadCmd; QProcess* runShutdownCmd; QProcess* mountHDDCmd; QCloseEvent* cEvent; //QMenu* fileMenu; QMenuBar* menuBar; QTimer* diskGaugeTimer; QPalette defaultPalette; DiskGauge* dGauge; int radarNumber; int channelNumber; int hddRecLabel; bool buttonState[ numButtons ]; bool d0Mounted; bool d1Mounted; bool hddRecording; bool radarStarted; bool radarOn; }; #endif // CONTROLPANEL_H