1 /*************************************************************************** 2 * Copyright (C) 2008-2009 by ������ �.�. * 3 * valexlin@gmail.com * 4 * * 5 * This program is free software; you can redistribute it and/or modify * 6 * it under the terms of the GNU General Public License as published by * 7 * the Free Software Foundation; either version 2 of the License, or * 8 * (at your option) any later version. * 9 * * 10 * This program is distributed in the hope that it will be useful, * 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 * GNU General Public License for more details. * 14 * * 15 * You should have received a copy of the GNU General Public License * 16 * along with this program; if not, write to the * 17 * Free Software Foundation, Inc., * 18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 19 ***************************************************************************/ 20 21 #ifndef _mainwnd_h 22 #define _mainwnd_h 23 24 #include <QWidget> 25 #include <QImage> 26 27 //class QTimer; 28 //class QImage; 29 class QCheckBox; 30 class QPushButton; 31 class QToolButton; 32 class QComboBox; 33 class QSpinBox; 34 class QLabel; 35 class QSpinBox; 36 class QStatusBar; 37 38 class GMyLiveThread; 39 class GAFThread; 40 class GEOSCaptureWnd; 41 class QBlinkLabel; 42 class GHistogramWnd; 43 44 class GEOSRecWnd: public QWidget 45 { 46 Q_OBJECT 47 public: 48 GEOSRecWnd(); 49 ~GEOSRecWnd(); 50 protected slots: 51 void slotReconnect(); 52 void slotSelFile(); 53 void slotStart(); 54 void slotStop(); 55 //void slotStartTimeout(); 56 //void slotWorkTimeout(); 57 void slotAESelected(int ae_ind); 58 void slotDofPressed(); 59 void slotISOSelected(int iso_ind); 60 void slotAvSelected(int av_ind); 61 void slotTvSelected(int tv_ind); 62 void slotWbSelected(int wb_ind); 63 void slotWbTempSelected(int wb_temp); 64 void slotShowImageChanged(int); 65 void slotOptions(); 66 void slotAbout(); 67 void slotFocusNear3(); 68 void slotFocusNear2(); 69 void slotFocusNear1(); 70 void slotFocusFar1(); 71 void slotFocusFar2(); 72 void slotFocusFar3(); 73 void slotZoom5x(); 74 void slotAutoFocus(); 75 void slotStopAutoFocus(); 76 void slotCameraAF(); 77 void slotHistogram(); 78 void slotTimeTimerSwitch(bool); 79 void slotFramesTimerSwitch(bool); 80 protected: 81 virtual void customEvent(QEvent* event); 82 virtual void closeEvent(QCloseEvent* event); 83 private: 84 QString giveNextName(const QString& path); 85 void shutdown(); 86 void loadSettings(); 87 void saveSettings(); 88 private: 89 //QTimer* StartTimer; 90 QBlinkLabel* blinkLabel; 91 QToolButton* reconnBtn; 92 QToolButton* selFileBtn; 93 QPushButton* startBtn; 94 QPushButton* stopBtn; 95 QComboBox* AEModeBox; 96 QToolButton* dofBtn; 97 QComboBox* isoBox; 98 QComboBox* avBox; 99 QComboBox* tvBox; 100 QComboBox* wbBox; 101 QSpinBox* wbTempBox; 102 QLabel* fpsLabel; 103 QCheckBox* showBox; 104 QToolButton* focusNear3Btn; 105 QToolButton* focusNear2Btn; 106 QToolButton* focusNear1Btn; 107 QToolButton* focusFar1Btn; 108 QToolButton* focusFar2Btn; 109 QToolButton* focusFar3Btn; 110 QToolButton* zoom5xBtn; 111 QToolButton* AFBtn; 112 QToolButton* AFCamBtn; 113 QToolButton* HistBtn; 114 QToolButton* optionsBtn; 115 QStatusBar* statusBar; 116 QLabel* framesLabel; 117 QLabel* timeLabel; 118 QCheckBox* timeTimerBox; 119 QSpinBox* timeTimerSpinBox; 120 QCheckBox* framesTimerBox; 121 QSpinBox* framesTimerSpinBox; 122 GMyLiveThread* LiveThread; 123 GAFThread* AFThread; 124 GEOSCaptureWnd* CaptureWnd; 125 GHistogramWnd* HistogramWnd; 126 struct GSavedSettings 127 { 128 QString Path; 129 int Av; 130 int Tv; 131 int ISO; 132 int Wb; 133 int WbTemp; 134 int AEMode; 135 int AFMode; 136 int BufferSize; 137 bool UseStabFPS; 138 bool ShowWhiteBox; 139 }; 140 struct GSavedSettings CurrSettings; 141 struct GSavedSettings BackupSettings; 142 }; 143 144 #endif // _mainwnd_h 145