⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 videopropertiessub.cxx

📁 使用VOIP技术.能够无连接接通远程用户
💻 CXX
字号:
////  The contents of this file are subject to the Mozilla Public License//  Version 1.0 (the "License"); you may not use this file except in//  compliance with the License. You may obtain a copy of the License at//  http://www.mozilla.org/MPL/// //  Software distributed under the License is distributed on an "AS IS"//  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See//  the License for the specific language governing rights and limitations//  under the License.// //  The Original Code is CPhone, a cross platform voip gui.////  The Initial Developer of the Original Code is Derek Smithies.////  Copyright (C) 2002 Indranet Technologies Ltd, //                                  http://www.indranet-technologies.com//  All Rights Reserved.////  Contributor(s): _______________/* * *  $Log: videopropertiesSub.cxx,v $ *  Revision 1.2  2003/04/04 04:37:49  dereksmithies *  Major upgrade. *  Ixj & microtelco support added. Fix threading issues. * *  Revision 1.1.1.1  2002/05/12 22:55:05  dereksmithies *  Initial release. * * * * */#include <ptlib.h>#include <qcheckbox.h>#include <qcombobox.h>#include <qradiobutton.h>#include <qslider.h>#include <qspinbox.h>#include <qapp.h>#include <qapplication.h>#include "keys.h"#include "videopropertiesSub.h"#include "qtvid.h"   #define CUSTOM_EVENT_SETUP (QEvent::User + 1)/*  *  Constructs a VideoProperties which is a child of 'parent', with the  *  name 'name' and widget flags set to 'f'  * *  The dialog will by default be modeless, unless you set 'modal' to *  TRUE to construct a modal dialog. */VideoProperties::VideoProperties(VideoOptions & vc)  : FormVideoProperties( 0, "Video Properties", FALSE, 0),    videoConfig(vc){  controlsSet = FALSE;  CPhone::Current().SetWindowId(eVideoProperties, winId());  move (600,60);  QApplication::postEvent(this, new QCustomEvent(CUSTOM_EVENT_SETUP));}/*   *  Destroys the object and frees any allocated resources */VideoProperties::~VideoProperties(){  // no need to delete child widgets, Qt does it all for us}void VideoProperties::Setup(){  SliderBrightness->setValue(videoConfig.GetBrightness());  SliderColour->setValue(videoConfig.GetColour());  SliderContrast->setValue(videoConfig.GetContrast());  SliderHue->setValue(videoConfig.GetHue());  SliderWhiteness->setValue(videoConfig.GetWhiteness());  ////////////////  SpinBoxVideoInputChannel->setValue(videoConfig.GetInputChannel());  SpinBoxVideoReceiveQuality->setValue(videoConfig.GetReceiveQuality());  SpinBoxVideoTransmitQuality->setValue(videoConfig.GetTransmitQuality());  /////  RadioButtonPalVideoFormat->setChecked(videoConfig.GetPalFormat() );  RadioButtonNtscVideoFormat->setChecked(videoConfig.GetNtscFormat() );   ////  CheckBoxLargeSize->setChecked(videoConfig.GetUseLargeSize());  CheckBoxDisplayLocalVideo->setChecked(videoConfig.GetDisplayLocal());  CheckBoxFlipLocalVideo->setChecked(videoConfig.GetFlipLocal());  CheckBoxFlipReceivedVideo->setChecked(videoConfig.GetFlipReceived());  /////  PINDEX i;  PStringList allVideoDevices = videoConfig.GetAllVideoDevices();  for (i = 0; i < allVideoDevices.GetSize(); i++)    ComboBoxVideoInputDevice->insertItem((const char *)allVideoDevices[i].GetPointer());  for(i = 0; i < (PINDEX)ComboBoxVideoInputDevice->count(); i++)     if (strcmp((const char *)videoConfig.GetVideoDevice(), ComboBoxVideoInputDevice->text(i)) == 0 )      ComboBoxVideoInputDevice->setCurrentItem(i);  //////  controlsSet = TRUE;}void VideoProperties::BrightnessChanged_slot(){  if (!controlsSet)    return;  videoConfig.BrightnessChange(SliderBrightness->value());}void VideoProperties::ColourChanged_slot(){  if (!controlsSet)    return;  videoConfig.ColourChange(SliderColour->value());}void VideoProperties::ContrastChanged_slot(){  if (!controlsSet)    return;  videoConfig.ContrastChange(SliderContrast->value());}void VideoProperties::DisplayLocalVideo_slot(){  if (!controlsSet)    return;  videoConfig.DisplayLocalChange(CheckBoxDisplayLocalVideo->isChecked());}void VideoProperties::FlipLocal_slot(){  if (!controlsSet)    return;  videoConfig.LocalVideoOrientationChange(CheckBoxFlipLocalVideo->isChecked());}void VideoProperties::FlipReceived_slot(){  if (!controlsSet)    return;  videoConfig.ReceivedVideoOrientationChange(CheckBoxFlipReceivedVideo->isChecked());}void VideoProperties::HueChanged_slot(){  if (!controlsSet)    return;  videoConfig.HueChange(SliderHue->value());}void VideoProperties::InputChannel_slot(){  if (!controlsSet)    return;  videoConfig.ChannelChange(SpinBoxVideoInputChannel->value());}void VideoProperties::InputDevice_slot(){  if (!controlsSet)    return;    PString newDevice;  if(ComboBoxVideoInputDevice->count()>0)     newDevice = (const char *)ComboBoxVideoInputDevice->currentText();  videoConfig.DeviceChange(newDevice);}void VideoProperties::LargeSize_slot(){  if (!controlsSet)    return;  videoConfig.FrameSizeChange(CheckBoxLargeSize->isChecked());}void VideoProperties::ReceiveQuality_slot(){  if (!controlsSet)    return; videoConfig.ReceivedQualityChange(SpinBoxVideoReceiveQuality->value());} void VideoProperties::TransmitQuality_slot(){  if (!controlsSet)    return; videoConfig.TransmitQualityChange(SpinBoxVideoTransmitQuality->value());}void VideoProperties::VideoFormatChanged_slot(){  if (!controlsSet)    return;  videoConfig.FormatChange(RadioButtonPalVideoFormat->isChecked());}void VideoProperties::WhitenessChanged_slot(){  if (!controlsSet)    return;  videoConfig.WhitenessChange(SliderWhiteness->value());}void VideoProperties::closeEvent(QCloseEvent *e){  CPhone::Current().ForgetExists(eVideoProperties, winId());  e->accept();}  void VideoProperties::customEvent(QCustomEvent *e){  if (e->type()  == CUSTOM_EVENT_DIE)     close(TRUE); if (e->type()  == CUSTOM_EVENT_SETUP)     Setup();}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -