Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

mxcpcFastStreamParametersSelector.cpp

00001 //           ///          //                                        Mx clientSDK
00002 //          /////        ////                    Mx Crossplatform Client Library
00003 //         /// XXX     XXX ///
00004 //        ///    XXX XXX    ///     $RCSfile: mxcpcFastStreamParametersSelector.cpp,v $
00005 //       ///       XXX       ///     $Revision: 1.1 $
00006 //      ///      XXX XXX      ///     $Date: 2005/12/19 17:38:39 $
00007 //     ////    XXX     XXX    ////     $Author: cvs-kai $
00008 //    ////                     ////
00009 //   ////  M  O  B  O  T  I  X  ////////////////////////////////////////////////
00010 //  //// Security Vision Systems //////////////////////////////////////////////
00011 //                                                                          //
00012 //  Copyright (C) 2005 - 2006, MOBOTIX AG, Germany                         //
00013 //  This software is made available under the BSD licence. Please refer   //
00014 //  to the file LICENCE.TXT contained in this distribution for details.  //
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   //grid_layout->setSizeConstraint(QLayout::SetFixedSize);
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 }

Generated on Mon Jan 30 15:52:42 2006 for mxcpc by  doxygen 1.4.4