summaryrefslogtreecommitdiffstats
path: root/kopete/libkopete/avdevice/videodevicepool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/libkopete/avdevice/videodevicepool.cpp')
-rw-r--r--kopete/libkopete/avdevice/videodevicepool.cpp78
1 files changed, 39 insertions, 39 deletions
diff --git a/kopete/libkopete/avdevice/videodevicepool.cpp b/kopete/libkopete/avdevice/videodevicepool.cpp
index 2651addb..39f6a7c7 100644
--- a/kopete/libkopete/avdevice/videodevicepool.cpp
+++ b/kopete/libkopete/avdevice/videodevicepool.cpp
@@ -24,7 +24,7 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qdir.h>
+#include <tqdir.h>
#include "videodevice.h"
#include "videodevicepool.h"
@@ -414,9 +414,9 @@ int VideoDevicePool::getFrame()
}
/*!
- \fn VideoDevicePool::getQImage(QImage *qimage)
+ \fn VideoDevicePool::getQImage(TQImage *qimage)
*/
-int VideoDevicePool::getImage(QImage *qimage)
+int VideoDevicePool::getImage(TQImage *qimage)
{
// kdDebug(14010) << k_funcinfo << "VideoDevicePool::getImage() called." << endl;
if(m_videodevice.size())
@@ -424,7 +424,7 @@ int VideoDevicePool::getImage(QImage *qimage)
else
{
kdDebug(14010) << k_funcinfo << "VideoDevicePool::getImage() fallback for no device." << endl;
- qimage->create(m_buffer.width, m_buffer.height,32, QImage::IgnoreEndian);
+ qimage->create(m_buffer.width, m_buffer.height,32, TQImage::IgnoreEndian);
uchar *bits=qimage->bits();
switch(m_buffer.pixelformat)
{
@@ -609,9 +609,9 @@ int VideoDevicePool::scanDevices()
kdDebug(14010) << k_funcinfo << "called" << endl;
#if defined(__linux__) && defined(ENABLE_AV)
- QDir videodevice_dir;
- const QString videodevice_dir_path=QString::fromLocal8Bit("/dev/v4l/");
- const QString videodevice_dir_filter=QString::fromLocal8Bit("video*");
+ TQDir videodevice_dir;
+ const TQString videodevice_dir_path=TQString::fromLocal8Bit("/dev/v4l/");
+ const TQString videodevice_dir_filter=TQString::fromLocal8Bit("video*");
VideoDevice videodevice;
m_videodevice.clear();
@@ -619,8 +619,8 @@ int VideoDevicePool::scanDevices()
videodevice_dir.setPath(videodevice_dir_path);
videodevice_dir.setNameFilter(videodevice_dir_filter);
- videodevice_dir.setFilter( QDir::System | QDir::NoSymLinks | QDir::Readable | QDir::Writable );
- videodevice_dir.setSorting( QDir::Name );
+ videodevice_dir.setFilter( TQDir::System | TQDir::NoSymLinks | TQDir::Readable | TQDir::Writable );
+ videodevice_dir.setSorting( TQDir::Name );
kdDebug(14010) << k_funcinfo << "Looking for devices in " << videodevice_dir_path << endl;
const QFileInfoList *list = videodevice_dir.entryInfoList();
@@ -628,15 +628,15 @@ int VideoDevicePool::scanDevices()
if (!list)
{
kdDebug(14010) << k_funcinfo << "Found no suitable devices in " << videodevice_dir_path << endl;
- QDir videodevice_dir;
- const QString videodevice_dir_path=QString::fromLocal8Bit("/dev/");
- const QString videodevice_dir_filter=QString::fromLocal8Bit("video*");
+ TQDir videodevice_dir;
+ const TQString videodevice_dir_path=TQString::fromLocal8Bit("/dev/");
+ const TQString videodevice_dir_filter=TQString::fromLocal8Bit("video*");
VideoDevice videodevice;
videodevice_dir.setPath(videodevice_dir_path);
videodevice_dir.setNameFilter(videodevice_dir_filter);
- videodevice_dir.setFilter( QDir::System | QDir::NoSymLinks | QDir::Readable | QDir::Writable );
- videodevice_dir.setSorting( QDir::Name );
+ videodevice_dir.setFilter( TQDir::System | TQDir::NoSymLinks | TQDir::Readable | TQDir::Writable );
+ videodevice_dir.setSorting( TQDir::Name );
kdDebug(14010) << k_funcinfo << "Looking for devices in " << videodevice_dir_path << endl;
const QFileInfoList *list = videodevice_dir.entryInfoList();
@@ -648,7 +648,7 @@ int VideoDevicePool::scanDevices()
}
QFileInfoListIterator fileiterator ( *list );
- QFileInfo *fileinfo;
+ TQFileInfo *fileinfo;
kdDebug(14010) << k_funcinfo << "scanning devices in " << videodevice_dir_path << "..." << endl;
while ( (fileinfo = fileiterator.current()) != 0 )
@@ -676,7 +676,7 @@ int VideoDevicePool::scanDevices()
}
QFileInfoListIterator fileiterator ( *list );
- QFileInfo *fileinfo;
+ TQFileInfo *fileinfo;
kdDebug(14010) << k_funcinfo << "scanning devices in " << videodevice_dir_path << "..." << endl;
while ( (fileinfo = fileiterator.current()) != 0 )
@@ -760,7 +760,7 @@ void VideoDevicePool::loadConfig()
{
KConfig *config = KGlobal::config();
config->setGroup("Video Device Settings");
- const QString currentdevice = config->readEntry("Current Device", QString::null);
+ const TQString currentdevice = config->readEntry("Current Device", TQString::null);
kdDebug(14010) << k_funcinfo << "Current device: " << currentdevice << endl;
// m_current_device = 0; // Must check this thing because of the fact that multiple loadConfig in other methodas can do bad things. Watch out!
@@ -768,28 +768,28 @@ void VideoDevicePool::loadConfig()
VideoDeviceVector::iterator vditerator;
for( vditerator = m_videodevice.begin(); vditerator != m_videodevice.end(); ++vditerator )
{
- const QString modelindex = QString::fromLocal8Bit ( "Model %1 Device %2") .arg ((*vditerator).m_name ) .arg ((*vditerator).m_modelindex);
+ const TQString modelindex = TQString::fromLocal8Bit ( "Model %1 Device %2") .arg ((*vditerator).m_name ) .arg ((*vditerator).m_modelindex);
if(modelindex == currentdevice)
{
m_current_device = vditerator - m_videodevice.begin();
// kdDebug(14010) << k_funcinfo << "This place will be used to set " << modelindex << " as the current device ( " << (vditerator - m_videodevice.begin()) << " )." << endl;
}
- const QString name = config->readEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Name") .arg ((*vditerator).m_name ) .arg ((*vditerator).m_modelindex)), (*vditerator).m_model);
- const int currentinput = config->readNumEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Current input") .arg ((*vditerator).m_name ) .arg ((*vditerator).m_modelindex)), 0);
+ const TQString name = config->readEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Name") .arg ((*vditerator).m_name ) .arg ((*vditerator).m_modelindex)), (*vditerator).m_model);
+ const int currentinput = config->readNumEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Current input") .arg ((*vditerator).m_name ) .arg ((*vditerator).m_modelindex)), 0);
kdDebug(14010) << k_funcinfo << "Device name: " << name << endl;
kdDebug(14010) << k_funcinfo << "Device current input: " << currentinput << endl;
(*vditerator).selectInput(currentinput);
for (size_t input = 0 ; input < (*vditerator).m_input.size(); input++)
{
- const float brightness = config->readDoubleNumEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Brightness").arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 );
- const float contrast = config->readDoubleNumEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Contrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 );
- const float saturation = config->readDoubleNumEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Saturation").arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 );
- const float whiteness = config->readDoubleNumEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Whiteness") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 );
- const float hue = config->readDoubleNumEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Hue") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 );
- const bool autobrightnesscontrast = config->readBoolEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoBrightnessContrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , false );
- const bool autocolorcorrection = config->readBoolEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoColorCorrection") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , false );
- const bool imageasmirror = config->readBoolEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 mageAsMirror") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , false );
+ const float brightness = config->readDoubleNumEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Brightness").arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 );
+ const float contrast = config->readDoubleNumEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Contrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 );
+ const float saturation = config->readDoubleNumEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Saturation").arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 );
+ const float whiteness = config->readDoubleNumEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Whiteness") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 );
+ const float hue = config->readDoubleNumEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Hue") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 );
+ const bool autobrightnesscontrast = config->readBoolEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoBrightnessContrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , false );
+ const bool autocolorcorrection = config->readBoolEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoColorCorrection") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , false );
+ const bool imageasmirror = config->readBoolEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 mageAsMirror") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , false );
(*vditerator).setBrightness(brightness);
(*vditerator).setContrast(contrast);
(*vditerator).setSaturation(saturation);
@@ -833,7 +833,7 @@ void VideoDevicePool::saveConfig()
}
*/
// Stores what is the current video device in use
- const QString currentdevice = QString::fromLocal8Bit ( "Model %1 Device %2" ) .arg(m_videodevice[m_current_device].m_model) .arg(m_videodevice[m_current_device].m_modelindex);
+ const TQString currentdevice = TQString::fromLocal8Bit ( "Model %1 Device %2" ) .arg(m_videodevice[m_current_device].m_model) .arg(m_videodevice[m_current_device].m_modelindex);
config->writeEntry( "Current Device", currentdevice);
VideoDeviceVector::iterator vditerator;
@@ -843,8 +843,8 @@ void VideoDevicePool::saveConfig()
kdDebug(14010) << "Model:" << (*vditerator).m_model << ":Index:" << (*vditerator).m_modelindex << ":Current input:" << (*vditerator).currentInput() << endl;
// Stores current input for the given video device
- const QString name = QString::fromLocal8Bit ( "Model %1 Device %2 Name") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex);
- const QString currentinput = QString::fromLocal8Bit ( "Model %1 Device %2 Current input") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex);
+ const TQString name = TQString::fromLocal8Bit ( "Model %1 Device %2 Name") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex);
+ const TQString currentinput = TQString::fromLocal8Bit ( "Model %1 Device %2 Current input") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex);
config->writeEntry( name, (*vditerator).m_name);
config->writeEntry( currentinput, (*vditerator).currentInput());
@@ -859,14 +859,14 @@ void VideoDevicePool::saveConfig()
kdDebug(14010) << "Model:" << (*vditerator).m_model << ":Index:" << (*vditerator).m_modelindex << ":Input:" << input << ":Automatic color correction : " << (*vditerator).m_input[input].getAutoColorCorrection() << endl;
// Stores configuration about each channel
- const QString brightness = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Brightness") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input);
- const QString contrast = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Contrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input);
- const QString saturation = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Saturation") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input);
- const QString whiteness = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Whiteness") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input);
- const QString hue = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Hue") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input);
- const QString autobrightnesscontrast = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoBrightnessContrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input);
- const QString autocolorcorrection = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoColorCorrection") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input);
- const QString imageasmirror = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 ImageAsMirror") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input);
+ const TQString brightness = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Brightness") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input);
+ const TQString contrast = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Contrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input);
+ const TQString saturation = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Saturation") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input);
+ const TQString whiteness = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Whiteness") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input);
+ const TQString hue = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Hue") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input);
+ const TQString autobrightnesscontrast = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoBrightnessContrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input);
+ const TQString autocolorcorrection = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoColorCorrection") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input);
+ const TQString imageasmirror = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 ImageAsMirror") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input);
config->writeEntry( brightness, (*vditerator).m_input[input].getBrightness());
config->writeEntry( contrast, (*vditerator).m_input[input].getContrast());
config->writeEntry( saturation, (*vditerator).m_input[input].getSaturation());