00001 #if 0 // Depracated 00002 00003 /* 00004 webcam_set.h 00005 00006 (c) 2003 Paul Volkaerts 00007 00008 Header for the webcam config screen 00009 */ 00010 00011 #ifndef WEBCAMSETTINGS_H_ 00012 #define WEBCAMSETTINGS_H_ 00013 00014 #include <qregexp.h> 00015 #include <qtimer.h> 00016 #include <qptrlist.h> 00017 #include <qthread.h> 00018 00019 #include <mythtv/mythwidgets.h> 00020 #include <mythtv/dialogbox.h> 00021 00022 #include "webcam.h" 00023 #include "h263.h" 00024 00025 #define MAX_FPS 30 00026 00027 00028 class WebcamSettingSlider 00029 { 00030 00031 public: 00032 WebcamSettingSlider(UIStatusBarType *UI, 00033 UIPushButtonType *up, UIPushButtonType *down, 00034 WebcamSettingSlider *pr) 00035 { statusUI = UI; up_button = up; down_button = down; prevObj = this; nextObj = this; 00036 if (pr!=0) { pr->setNext(this); prevObj = pr; }}; 00037 ~WebcamSettingSlider(void); 00038 void up(void) { if (up_button) up_button->push();}; 00039 void down(void) { if (down_button) down_button->push();}; 00040 WebcamSettingSlider *prev(void) { return prevObj; }; 00041 WebcamSettingSlider *next(void) { return nextObj; }; 00042 void setPrev(WebcamSettingSlider *w) { prevObj = w; }; 00043 void setNext(WebcamSettingSlider *w) { nextObj = w; }; 00044 00045 private: 00046 UIStatusBarType *statusUI; 00047 UIPushButtonType *up_button; 00048 UIPushButtonType *down_button; 00049 WebcamSettingSlider *nextObj; 00050 WebcamSettingSlider *prevObj; 00051 }; 00052 00053 00054 class WebcamSettingsBox : public MythThemedDialog 00055 { 00056 00057 Q_OBJECT 00058 00059 public: 00060 00061 typedef QValueVector<int> IntVector; 00062 00063 WebcamSettingsBox(MythMainWindow *parent, QString window_name, 00064 QString theme_filename, const char *name = 0); 00065 00066 ~WebcamSettingsBox(void); 00067 00068 void keyPressEvent(QKeyEvent *e); 00069 00070 public slots: 00071 00072 void DrawLocalWebcamImage(uchar *yuv, int w, int h); 00073 void SettingDisplayTimerExpiry(); 00074 void saveSettings(); 00075 void brightnessUp(); 00076 void brightnessDown(); 00077 void contrastUp(); 00078 void contrastDown(); 00079 void colourUp(); 00080 void colourDown(); 00081 void hueUp(); 00082 void hueDown(); 00083 void fpsUp(); 00084 void fpsDown(); 00085 00086 00087 private: 00088 00089 void wireUpTheme(); 00090 void checkPaletteModes(); 00091 00092 Webcam *webcam; 00093 QTimer *settingDisplayTimer; // Timer controlling display of stats 00094 int fps; // Webcam Frame Per Second 0..30 00095 int brightness; // as 0..255 00096 int contrast; // as 0..255 00097 int colour; // as 0..255 00098 int hue; // as 0..255 00099 00100 uchar localRgbBuffer[MAX_RGB_704_576]; 00101 00102 // From Settings SQL database 00103 QString WebcamDevice; 00104 QString TxResolution; 00105 00106 QString palModes; 00107 00108 // 00109 // Theme-related "widgets" 00110 // 00111 WebcamSettingSlider *activeSlider; 00112 WebcamSettingSlider *brightnessSlider; 00113 WebcamSettingSlider *contrastSlider; 00114 WebcamSettingSlider *colourSlider; 00115 WebcamSettingSlider *hueSlider; 00116 WebcamSettingSlider *fpsSlider; 00117 00118 UITextType *webcam_name_text; 00119 UITextType *webcam_maxsize_text; 00120 UITextType *webcam_cursize_text; 00121 UITextType *webcam_colour_bw_text; 00122 UITextType *webcam_brightness_text; 00123 UITextType *webcam_contrast_text; 00124 UITextType *webcam_colour_text; 00125 UITextType *webcam_hue_text; 00126 UITextType *webcam_fps_text; 00127 UIBlackHoleType *webcamArea; 00128 UIStatusBarType *brightnessUI; 00129 UIStatusBarType *contrastUI; 00130 UIStatusBarType *colourUI; 00131 UIStatusBarType *hueUI; 00132 UIStatusBarType *fpsUI; 00133 UITextButtonType *save_button; 00134 UIPushButtonType *br_up_button; 00135 UIPushButtonType *br_down_button; 00136 UIPushButtonType *con_up_button; 00137 UIPushButtonType *con_down_button; 00138 UIPushButtonType *col_up_button; 00139 UIPushButtonType *col_down_button; 00140 UIPushButtonType *hue_up_button; 00141 UIPushButtonType *hue_down_button; 00142 UIPushButtonType *fps_up_button; 00143 UIPushButtonType *fps_down_button; 00144 }; 00145 00146 00147 #endif 00148 00149 00150 #endif 00151
1.5.5