00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include <mxcpcFastStreamParametersSelector.h>
00021 #include <mxcpc_namespace.h>
00022
00023 #include <QGridLayout>
00024 #include <QLabel>
00025 #include <QComboBox>
00026
00027
00028
00029 mxcpcFastStreamParametersSelector
00030 ::mxcpcFastStreamParametersSelector(QWidget *parent)
00031 : QWidget(parent) {
00032
00033 QGridLayout *grid_layout;
00034 QComboBox *combo_box;
00035 QLabel *label;
00036 int i;
00037
00038 grid_layout = new QGridLayout(this);
00039 grid_layout->setMargin(0);
00040
00041
00042 label = new QLabel(QString("Framerate:"), this);
00043 grid_layout->addWidget(label, 0, 0);
00044 FrameRateComboBox = combo_box = new QComboBox(this);
00045 grid_layout->addWidget(combo_box, 0, 1);
00046 combo_box->setSizePolicy(QSizePolicy(QSizePolicy::Fixed,
00047 QSizePolicy::Fixed));
00048 for(i = 0; i < mxcpc::FrameRatePresetNum; i++)
00049 combo_box->addItem(mxcpc::FrameRatePresetNames[i]);
00050 for(i = 0; i < mxcpc::FrameRatePresetNum; i++)
00051 if( (mxcpc::FrameRatePresets[i] > 3.5f)
00052 && (mxcpc::FrameRatePresets[i] < 4.5f)) {
00053 combo_box->setCurrentIndex(i);
00054 }
00055 }
00056
00057
00058
00059 float mxcpcFastStreamParametersSelector::getFrameRate(void) {
00060
00061 return(mxcpc::FrameRatePresets[FrameRateComboBox->currentIndex()]);
00062 }