summaryrefslogtreecommitdiffstats
path: root/kamera
diff options
context:
space:
mode:
Diffstat (limited to 'kamera')
-rw-r--r--kamera/kcontrol/kamera.cpp92
-rw-r--r--kamera/kcontrol/kamera.h36
-rw-r--r--kamera/kcontrol/kameraconfigdialog.cpp100
-rw-r--r--kamera/kcontrol/kameraconfigdialog.h12
-rw-r--r--kamera/kcontrol/kameradevice.cpp122
-rw-r--r--kamera/kcontrol/kameradevice.h72
-rw-r--r--kamera/kioslave/kamera.cpp56
-rw-r--r--kamera/kioslave/kamera.h20
8 files changed, 255 insertions, 255 deletions
diff --git a/kamera/kcontrol/kamera.cpp b/kamera/kcontrol/kamera.cpp
index 0fdc416a..97338181 100644
--- a/kamera/kcontrol/kamera.cpp
+++ b/kamera/kcontrol/kamera.cpp
@@ -20,8 +20,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kgenericfactory.h>
#include <ksimpleconfig.h>
@@ -41,14 +41,14 @@
#include "kamera.h"
#include "kamera.moc"
-typedef KGenericFactory<KKameraConfig, QWidget> KKameraConfigFactory;
+typedef KGenericFactory<KKameraConfig, TQWidget> KKameraConfigFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kamera, KKameraConfigFactory( "kcmkamera" ) )
// --------------- Camera control center module widget ---
KKameraConfig *KKameraConfig::m_instance = NULL;
-KKameraConfig::KKameraConfig(QWidget *parent, const char *name, const QStringList &)
+KKameraConfig::KKameraConfig(TQWidget *parent, const char *name, const TQStringList &)
: KCModule(KKameraConfigFactory::instance(), parent, name)
{
m_devicePopup = new KPopupMenu(this);
@@ -88,7 +88,7 @@ void KKameraConfig::defaults()
void KKameraConfig::displayGPFailureDialogue(void)
{
- new QLabel(i18n("Unable to initialize the gPhoto2 libraries."), this);
+ new TQLabel(i18n("Unable to initialize the gPhoto2 libraries."), this);
}
void KKameraConfig::displayGPSuccessDialogue(void)
@@ -97,7 +97,7 @@ void KKameraConfig::displayGPSuccessDialogue(void)
setButtons(Help | Apply | Cancel | Ok);
// create a layout with two vertical boxes
- QVBoxLayout *topLayout = new QVBoxLayout(this, 0, 0);
+ TQVBoxLayout *topLayout = new TQVBoxLayout(this, 0, 0);
topLayout->setAutoAdd(true);
m_toolbar = new KToolBar(this, "ToolBar");
@@ -106,36 +106,36 @@ void KKameraConfig::displayGPSuccessDialogue(void)
// create list of devices
m_deviceSel = new KIconView(this);
- connect(m_deviceSel, SIGNAL(rightButtonClicked(QIconViewItem *, const QPoint &)),
- SLOT(slot_deviceMenu(QIconViewItem *, const QPoint &)));
- connect(m_deviceSel, SIGNAL(doubleClicked(QIconViewItem *)),
- SLOT(slot_configureCamera()));
- connect(m_deviceSel, SIGNAL(selectionChanged(QIconViewItem *)),
- SLOT(slot_deviceSelected(QIconViewItem *)));
+ connect(m_deviceSel, TQT_SIGNAL(rightButtonClicked(TQIconViewItem *, const TQPoint &)),
+ TQT_SLOT(slot_deviceMenu(TQIconViewItem *, const TQPoint &)));
+ connect(m_deviceSel, TQT_SIGNAL(doubleClicked(TQIconViewItem *)),
+ TQT_SLOT(slot_configureCamera()));
+ connect(m_deviceSel, TQT_SIGNAL(selectionChanged(TQIconViewItem *)),
+ TQT_SLOT(slot_deviceSelected(TQIconViewItem *)));
- m_deviceSel->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
+ m_deviceSel->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding));
// create actions
KAction *act;
- act = new KAction(i18n("Add"), "camera", 0, this, SLOT(slot_addCamera()), m_actions, "camera_add");
+ act = new KAction(i18n("Add"), "camera", 0, this, TQT_SLOT(slot_addCamera()), m_actions, "camera_add");
act->setWhatsThis(i18n("Click this button to add a new camera."));
act->plug(m_toolbar);
m_toolbar->insertLineSeparator();
- act = new KAction(i18n("Test"), "camera_test", 0, this, SLOT(slot_testCamera()), m_actions, "camera_test");
+ act = new KAction(i18n("Test"), "camera_test", 0, this, TQT_SLOT(slot_testCamera()), m_actions, "camera_test");
act->setWhatsThis(i18n("Click this button to remove the selected camera from the list."));
act->plug(m_toolbar);
- act = new KAction(i18n("Remove"), "edittrash", 0, this, SLOT(slot_removeCamera()), m_actions, "camera_remove");
+ act = new KAction(i18n("Remove"), "edittrash", 0, this, TQT_SLOT(slot_removeCamera()), m_actions, "camera_remove");
act->setWhatsThis(i18n("Click this button to remove the selected camera from the list."));
act->plug(m_toolbar);
- act = new KAction(i18n("Configure..."), "configure", 0, this, SLOT(slot_configureCamera()), m_actions, "camera_configure");
+ act = new KAction(i18n("Configure..."), "configure", 0, this, TQT_SLOT(slot_configureCamera()), m_actions, "camera_configure");
act->setWhatsThis(i18n("Click this button to change the configuration of the selected camera.<br><br>The availability of this feature and the contents of the Configuration dialog depend on the camera model."));
act->plug(m_toolbar);
- act = new KAction(i18n("Information"), "hwinfo", 0, this, SLOT(slot_cameraSummary()), m_actions, "camera_summary");
+ act = new KAction(i18n("Information"), "hwinfo", 0, this, TQT_SLOT(slot_cameraSummary()), m_actions, "camera_summary");
act->setWhatsThis(i18n("Click this button to view a summary of the current status of the selected camera.<br><br>The availability of this feature and the contents of the Configuration dialog depend on the camera model."));
act->plug(m_toolbar);
m_toolbar->insertLineSeparator();
- act = new KAction(i18n("Cancel"), "stop", 0, this, SLOT(slot_cancelOperation()), m_actions, "camera_cancel");
+ act = new KAction(i18n("Cancel"), "stop", 0, this, TQT_SLOT(slot_cancelOperation()), m_actions, "camera_cancel");
act->setWhatsThis(i18n("Click this button to cancel the current camera operation."));
act->setEnabled(false);
act->plug(m_toolbar);
@@ -147,7 +147,7 @@ void KKameraConfig::populateDeviceListView(void)
CameraDevicesMap::Iterator it;
for (it = m_devices.begin(); it != m_devices.end(); it++) {
if (it.data()) {
- new QIconViewItem(m_deviceSel, it.key(), DesktopIcon("camera"));
+ new TQIconViewItem(m_deviceSel, it.key(), DesktopIcon("camera"));
}
}
slot_deviceSelected(m_deviceSel->currentItem());
@@ -172,8 +172,8 @@ void KKameraConfig::load(void)
void KKameraConfig::load(bool useDefaults )
{
m_config->setReadDefaults( useDefaults );
- QStringList groupList = m_config->groupList();
- QStringList::Iterator it;
+ TQStringList groupList = m_config->groupList();
+ TQStringList::Iterator it;
int i, count;
CameraList *list;
CameraAbilitiesList *al;
@@ -188,8 +188,8 @@ void KKameraConfig::load(bool useDefaults )
continue;
kcamera = new KCamera(*it,m_config->readEntry("Path"));
- connect(kcamera, SIGNAL(error(const QString &)), SLOT(slot_error(const QString &)));
- connect(kcamera, SIGNAL(error(const QString &, const QString &)), SLOT(slot_error(const QString &, const QString &)));
+ connect(kcamera, TQT_SIGNAL(error(const TQString &)), TQT_SLOT(slot_error(const TQString &)));
+ connect(kcamera, TQT_SIGNAL(error(const TQString &, const TQString &)), TQT_SLOT(slot_error(const TQString &, const TQString &)));
kcamera->load(m_config);
m_devices[*it] = kcamera;
}
@@ -208,7 +208,7 @@ void KKameraConfig::load(bool useDefaults )
count = gp_list_count (list);
- QMap<QString,QString> ports, names;
+ TQMap<TQString,TQString> ports, names;
for (i = 0 ; i<count ; i++) {
gp_list_get_name (list, i, &model);
@@ -221,14 +221,14 @@ void KKameraConfig::load(bool useDefaults )
if (ports.contains("usb:") && names[ports["usb:"]]!="usb:")
ports.remove("usb:");
- QMap<QString,QString>::iterator portit;
+ TQMap<TQString,TQString>::iterator portit;
for (portit = ports.begin() ; portit != ports.end(); portit++) {
/* kdDebug() << "Adding USB camera: " << portit.data() << " at " << portit.key() << endl; */
kcamera = new KCamera(portit.data(),portit.key());
- connect(kcamera, SIGNAL(error(const QString &)), SLOT(slot_error(const QString &)));
- connect(kcamera, SIGNAL(error(const QString &, const QString &)), SLOT(slot_error(const QString &, const QString &)));
+ connect(kcamera, TQT_SIGNAL(error(const TQString &)), TQT_SLOT(slot_error(const TQString &)));
+ connect(kcamera, TQT_SIGNAL(error(const TQString &, const TQString &)), TQT_SLOT(slot_error(const TQString &, const TQString &)));
m_devices[portit.data()] = kcamera;
}
populateDeviceListView();
@@ -265,9 +265,9 @@ void KKameraConfig::afterCameraOperation(void)
slot_deviceSelected(m_deviceSel->currentItem());
}
-QString KKameraConfig::suggestName(const QString &name)
+TQString KKameraConfig::suggestName(const TQString &name)
{
- QString new_name = name;
+ TQString new_name = name;
new_name.replace("/", ""); // we cannot have a slash in a URI's host
if (!m_devices.contains(new_name)) return new_name;
@@ -275,20 +275,20 @@ QString KKameraConfig::suggestName(const QString &name)
// try new names with a number appended until we find a free one
int i = 1;
while (i++ < 0xffff) {
- new_name = name + " (" + QString::number(i) + ")";
+ new_name = name + " (" + TQString::number(i) + ")";
if (!m_devices.contains(new_name)) return new_name;
}
- return QString::null;
+ return TQString::null;
}
void KKameraConfig::slot_addCamera()
{
- KCamera *m_device = new KCamera(QString::null,QString::null);
- connect(m_device, SIGNAL(error(const QString &)), SLOT(slot_error(const QString &)));
- connect(m_device, SIGNAL(error(const QString &, const QString &)), SLOT(slot_error(const QString &, const QString &)));
+ KCamera *m_device = new KCamera(TQString::null,TQString::null);
+ connect(m_device, TQT_SIGNAL(error(const TQString &)), TQT_SLOT(slot_error(const TQString &)));
+ connect(m_device, TQT_SIGNAL(error(const TQString &, const TQString &)), TQT_SLOT(slot_error(const TQString &, const TQString &)));
KameraDeviceSelectDialog dialog(this, m_device);
- if (dialog.exec() == QDialog::Accepted) {
+ if (dialog.exec() == TQDialog::Accepted) {
dialog.save();
m_device->setName(suggestName(m_device->model()));
m_devices.insert(m_device->name(), m_device);
@@ -301,7 +301,7 @@ void KKameraConfig::slot_addCamera()
void KKameraConfig::slot_removeCamera()
{
- QString name = m_deviceSel->currentItem()->text();
+ TQString name = m_deviceSel->currentItem()->text();
if (m_devices.contains(name)) {
KCamera *m_device = m_devices[name];
m_devices.remove(name);
@@ -316,7 +316,7 @@ void KKameraConfig::slot_testCamera()
{
beforeCameraOperation();
- QString name = m_deviceSel->currentItem()->text();
+ TQString name = m_deviceSel->currentItem()->text();
if (m_devices.contains(name)) {
KCamera *m_device = m_devices[name];
if (m_device->test())
@@ -328,7 +328,7 @@ void KKameraConfig::slot_testCamera()
void KKameraConfig::slot_configureCamera()
{
- QString name = m_deviceSel->currentItem()->text();
+ TQString name = m_deviceSel->currentItem()->text();
if (m_devices.contains(name)) {
KCamera *m_device = m_devices[name];
m_device->configure();
@@ -337,8 +337,8 @@ void KKameraConfig::slot_configureCamera()
void KKameraConfig::slot_cameraSummary()
{
- QString summary;
- QString name = m_deviceSel->currentItem()->text();
+ TQString summary;
+ TQString name = m_deviceSel->currentItem()->text();
if (m_devices.contains(name)) {
KCamera *m_device = m_devices[name];
summary = m_device->summary();
@@ -357,7 +357,7 @@ void KKameraConfig::slot_cancelOperation()
qApp->setOverrideCursor(Qt::WaitCursor);
}
-void KKameraConfig::slot_deviceMenu(QIconViewItem *item, const QPoint &point)
+void KKameraConfig::slot_deviceMenu(TQIconViewItem *item, const TQPoint &point)
{
if (item) {
m_devicePopup->clear();
@@ -369,7 +369,7 @@ void KKameraConfig::slot_deviceMenu(QIconViewItem *item, const QPoint &point)
}
}
-void KKameraConfig::slot_deviceSelected(QIconViewItem *item)
+void KKameraConfig::slot_deviceSelected(TQIconViewItem *item)
{
m_actions->action("camera_test")->setEnabled(item);
m_actions->action("camera_remove")->setEnabled(item);
@@ -399,7 +399,7 @@ GPContextFeedback KKameraConfig::cbGPCancel(GPContext * /*context*/, void *data)
return GP_CONTEXT_FEEDBACK_OK;
}
-QString KKameraConfig::quickHelp() const
+TQString KKameraConfig::quickHelp() const
{
return i18n("<h1>Digital Camera</h1>\n"
"This module allows you to configure support for your digital camera.\n"
@@ -411,12 +411,12 @@ QString KKameraConfig::quickHelp() const
"<a href=\"camera:/\">camera:/</a> in Konqueror and other KDE applications.");
}
-void KKameraConfig::slot_error(const QString &message)
+void KKameraConfig::slot_error(const TQString &message)
{
KMessageBox::error(this, message);
}
-void KKameraConfig::slot_error(const QString &message, const QString &details)
+void KKameraConfig::slot_error(const TQString &message, const TQString &details)
{
KMessageBox::detailedError(this, message, details);
}
diff --git a/kamera/kcontrol/kamera.h b/kamera/kcontrol/kamera.h
index 35f93bc0..6e66d642 100644
--- a/kamera/kcontrol/kamera.h
+++ b/kamera/kcontrol/kamera.h
@@ -26,15 +26,15 @@
#include <kcmodule.h>
#include <gphoto2.h>
-class QWidget;
-class QRadioButton;
-class QPushButton;
-class QComboBox;
-class QVButtonGroup;
-class QLineEdit;
-class QWidgetStack;
-class QCheckBox;
-class QIconViewItem;
+class TQWidget;
+class TQRadioButton;
+class TQPushButton;
+class TQComboBox;
+class TQVButtonGroup;
+class TQLineEdit;
+class TQWidgetStack;
+class TQCheckBox;
+class TQIconViewItem;
class KCamera;
class KameraDeviceSelectDialog;
@@ -50,7 +50,7 @@ class KKameraConfig : public KCModule
friend class KameraDeviceSelectDialog;
public:
- KKameraConfig(QWidget *parent, const char *name, const QStringList &);
+ KKameraConfig(TQWidget *parent, const char *name, const TQStringList &);
virtual ~KKameraConfig();
// KCModule interface methods
@@ -59,22 +59,22 @@ public:
void save();
void defaults();
int buttons();
- QString quickHelp() const;
+ TQString quickHelp() const;
protected:
- QString suggestName(const QString &name);
+ TQString suggestName(const TQString &name);
protected slots:
- void slot_deviceMenu(QIconViewItem *item, const QPoint &point);
- void slot_deviceSelected(QIconViewItem *item);
+ void slot_deviceMenu(TQIconViewItem *item, const TQPoint &point);
+ void slot_deviceSelected(TQIconViewItem *item);
void slot_addCamera();
void slot_removeCamera();
void slot_configureCamera();
void slot_cameraSummary();
void slot_testCamera();
void slot_cancelOperation();
- void slot_error(const QString &message);
- void slot_error(const QString &message, const QString &details);
+ void slot_error(const TQString &message);
+ void slot_error(const TQString &message, const TQString &details);
private:
void displayGPFailureDialogue(void);
@@ -89,7 +89,7 @@ private:
static GPContextFeedback cbGPCancel(GPContext *context, void *data);
private:
- typedef QMap<QString, KCamera *> CameraDevicesMap;
+ typedef TQMap<TQString, KCamera *> CameraDevicesMap;
KSimpleConfig *m_config;
CameraDevicesMap m_devices;
@@ -101,7 +101,7 @@ private:
// widgets for the cameras listview
KIconView *m_deviceSel;
KActionCollection *m_actions;
- QPushButton *m_addCamera, *m_removeCamera, *m_testCamera, *m_configureCamera;
+ TQPushButton *m_addCamera, *m_removeCamera, *m_testCamera, *m_configureCamera;
KToolBar *m_toolbar;
KPopupMenu *m_devicePopup;
diff --git a/kamera/kcontrol/kameraconfigdialog.cpp b/kamera/kcontrol/kameraconfigdialog.cpp
index 5af0b33d..124ea991 100644
--- a/kamera/kcontrol/kameraconfigdialog.cpp
+++ b/kamera/kcontrol/kameraconfigdialog.cpp
@@ -20,20 +20,20 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qgrid.h>
-#include <qlabel.h>
-#include <qvgroupbox.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qslider.h>
-#include <qvbuttongroup.h>
-#include <qhbuttongroup.h>
-#include <qvbox.h>
-#include <qtabwidget.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqgrid.h>
+#include <tqlabel.h>
+#include <tqvgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqslider.h>
+#include <tqvbuttongroup.h>
+#include <tqhbuttongroup.h>
+#include <tqvbox.h>
+#include <tqtabwidget.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
@@ -42,13 +42,13 @@
KameraConfigDialog::KameraConfigDialog(Camera */*camera*/,
CameraWidget *widget,
- QWidget *parent,
+ TQWidget *parent,
const char *name) :
-KDialogBase(parent, name, true, QString::null, Ok|Cancel, Ok ),
+KDialogBase(parent, name, true, TQString::null, Ok|Cancel, Ok ),
m_widgetRoot(widget)
{
- QFrame *main = makeMainWidget();
- QVBoxLayout *topLayout = new QVBoxLayout(main, 0, spacingHint());
+ TQFrame *main = makeMainWidget();
+ TQVBoxLayout *topLayout = new TQVBoxLayout(main, 0, spacingHint());
topLayout->setAutoAdd(true);
m_tabWidget = 0;
@@ -56,9 +56,9 @@ m_widgetRoot(widget)
appendWidget(main, widget);
}
-void KameraConfigDialog::appendWidget(QWidget *parent, CameraWidget *widget)
+void KameraConfigDialog::appendWidget(TQWidget *parent, CameraWidget *widget)
{
- QWidget *newParent = parent;
+ TQWidget *newParent = parent;
CameraWidgetType widget_type;
const char *widget_name;
@@ -72,7 +72,7 @@ void KameraConfigDialog::appendWidget(QWidget *parent, CameraWidget *widget)
gp_widget_get_info(widget, &widget_info);
gp_widget_get_name(widget, &widget_name);
- QString whats_this = QString::fromLocal8Bit(widget_info); // gphoto2 doesn't seem to have any standard for i18n
+ TQString whats_this = TQString::fromLocal8Bit(widget_info); // gphoto2 doesn't seem to have any standard for i18n
// Add this widget to parent
switch(widget_type) {
@@ -85,13 +85,13 @@ void KameraConfigDialog::appendWidget(QWidget *parent, CameraWidget *widget)
case GP_WIDGET_SECTION:
{
if (!m_tabWidget)
- m_tabWidget = new QTabWidget(parent);
- QWidget *tab = new QWidget(m_tabWidget);
+ m_tabWidget = new TQTabWidget(parent);
+ TQWidget *tab = new TQWidget(m_tabWidget);
// widgets are to be aligned vertically in the tab
- QVBoxLayout *tabLayout = new QVBoxLayout(tab, marginHint(),
+ TQVBoxLayout *tabLayout = new TQVBoxLayout(tab, marginHint(),
spacingHint());
m_tabWidget->insertTab(tab, widget_label);
- QVBox *tabContainer = new QVBox(tab);
+ TQVBox *tabContainer = new TQVBox(tab);
tabContainer->setSpacing(spacingHint());
tabLayout->addWidget(tabContainer);
newParent = tabContainer;
@@ -104,14 +104,14 @@ void KameraConfigDialog::appendWidget(QWidget *parent, CameraWidget *widget)
{
gp_widget_get_value(widget, &widget_value_string);
- QGrid *grid = new QGrid(2, Horizontal, parent);
+ TQGrid *grid = new TQGrid(2, Horizontal, parent);
grid->setSpacing(spacingHint());
- new QLabel(QString::fromLocal8Bit( widget_label )+":", grid);
- QLineEdit *lineEdit = new QLineEdit(widget_value_string, grid);
+ new TQLabel(TQString::fromLocal8Bit( widget_label )+":", grid);
+ TQLineEdit *lineEdit = new TQLineEdit(widget_value_string, grid);
m_wmap.insert(widget, lineEdit);
if (!whats_this.isEmpty())
- QWhatsThis::add(grid, whats_this);
+ TQWhatsThis::add(grid, whats_this);
break;
}
@@ -123,18 +123,18 @@ void KameraConfigDialog::appendWidget(QWidget *parent, CameraWidget *widget)
gp_widget_get_range(widget, &widget_low, &widget_high, &widget_increment);
gp_widget_get_value(widget, &widget_value_float);
- QGroupBox *groupBox = new QVGroupBox(widget_label, parent);
- QSlider *slider = new QSlider(
+ TQGroupBox *groupBox = new TQVGroupBox(widget_label, parent);
+ TQSlider *slider = new TQSlider(
( int )widget_low,
( int )widget_high,
( int )widget_increment,
( int )widget_value_float,
- QSlider::Horizontal,
+ TQSlider::Horizontal,
groupBox );
m_wmap.insert(widget, slider);
if (!whats_this.isEmpty())
- QWhatsThis::add(groupBox, whats_this);
+ TQWhatsThis::add(groupBox, whats_this);
break;
}
@@ -142,12 +142,12 @@ void KameraConfigDialog::appendWidget(QWidget *parent, CameraWidget *widget)
{
gp_widget_get_value(widget, &widget_value_int);
- QCheckBox *checkBox = new QCheckBox(widget_label, parent);
+ TQCheckBox *checkBox = new TQCheckBox(widget_label, parent);
checkBox->setChecked(widget_value_int);
m_wmap.insert(widget, checkBox);
if (!whats_this.isEmpty())
- QWhatsThis::add(checkBox, whats_this);
+ TQWhatsThis::add(checkBox, whats_this);
break;
}
@@ -158,24 +158,24 @@ void KameraConfigDialog::appendWidget(QWidget *parent, CameraWidget *widget)
int count = gp_widget_count_choices(widget);
// for less than 5 options, align them horizontally
- QButtonGroup *buttonGroup;
+ TQButtonGroup *buttonGroup;
if (count > 4)
- buttonGroup = new QVButtonGroup(widget_label, parent);
+ buttonGroup = new TQVButtonGroup(widget_label, parent);
else
- buttonGroup = new QHButtonGroup(widget_label, parent);
+ buttonGroup = new TQHButtonGroup(widget_label, parent);
for(int i = 0; i < count; ++i) {
const char *widget_choice;
gp_widget_get_choice(widget, i, &widget_choice);
- new QRadioButton(widget_choice, buttonGroup);
+ new TQRadioButton(widget_choice, buttonGroup);
if(!strcmp(widget_value_string, widget_choice))
buttonGroup->setButton(i);
}
m_wmap.insert(widget, buttonGroup);
if (!whats_this.isEmpty())
- QWhatsThis::add(buttonGroup, whats_this);
+ TQWhatsThis::add(buttonGroup, whats_this);
break;
}
@@ -183,7 +183,7 @@ void KameraConfigDialog::appendWidget(QWidget *parent, CameraWidget *widget)
{
gp_widget_get_value(widget, &widget_value_string);
- QComboBox *comboBox = new QComboBox(FALSE, parent);
+ TQComboBox *comboBox = new TQComboBox(FALSE, parent);
comboBox->clear();
for(int i = 0; i < gp_widget_count_choices(widget); ++i) {
const char *widget_choice;
@@ -196,7 +196,7 @@ void KameraConfigDialog::appendWidget(QWidget *parent, CameraWidget *widget)
m_wmap.insert(widget, comboBox);
if (!whats_this.isEmpty())
- QWhatsThis::add(comboBox, whats_this);
+ TQWhatsThis::add(comboBox, whats_this);
break;
}
@@ -206,14 +206,14 @@ void KameraConfigDialog::appendWidget(QWidget *parent, CameraWidget *widget)
// I can't see a way of implementing this. Since there is
// no way of telling which button sent you a signal, we
// can't map to the appropriate widget->callback
- new QLabel(i18n("Button (not supported by KControl)"), parent);
+ new TQLabel(i18n("Button (not supported by KControl)"), parent);
break;
}
case GP_WIDGET_DATE:
{
// TODO
- new QLabel(i18n("Date (not supported by KControl)"), parent);
+ new TQLabel(i18n("Date (not supported by KControl)"), parent);
break;
}
@@ -233,7 +233,7 @@ void KameraConfigDialog::appendWidget(QWidget *parent, CameraWidget *widget)
switch (widget_type) {
case GP_WIDGET_SECTION:
{
- tabLayout->addItem( new QSpacerItem(0, 0, QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding) );
+ tabLayout->addItem( new TQSpacerItem(0, 0, TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding) );
break;
}
}
@@ -254,14 +254,14 @@ void KameraConfigDialog::updateWidgetValue(CameraWidget *widget)
break;
case GP_WIDGET_TEXT:
{
- QLineEdit *lineEdit = static_cast<QLineEdit *>(m_wmap[widget]);
+ TQLineEdit *lineEdit = static_cast<TQLineEdit *>(m_wmap[widget]);
gp_widget_set_value(widget, (void *)lineEdit->text().local8Bit().data());
break;
}
case GP_WIDGET_RANGE:
{
- QSlider *slider = static_cast<QSlider *>(m_wmap[widget]);
+ TQSlider *slider = static_cast<TQSlider *>(m_wmap[widget]);
float value_float = slider->value();
gp_widget_set_value(widget, (void *)&value_float);
@@ -269,7 +269,7 @@ void KameraConfigDialog::updateWidgetValue(CameraWidget *widget)
}
case GP_WIDGET_TOGGLE:
{
- QCheckBox *checkBox = static_cast<QCheckBox *>(m_wmap[widget]);
+ TQCheckBox *checkBox = static_cast<TQCheckBox *>(m_wmap[widget]);
int value_int = checkBox->isChecked() ? 1 : 0;
gp_widget_set_value(widget, (void *)&value_int);
@@ -277,14 +277,14 @@ void KameraConfigDialog::updateWidgetValue(CameraWidget *widget)
}
case GP_WIDGET_RADIO:
{
- QButtonGroup *buttonGroup = static_cast<QVButtonGroup *>(m_wmap[widget]);
+ TQButtonGroup *buttonGroup = static_cast<TQVButtonGroup *>(m_wmap[widget]);
gp_widget_set_value(widget, (void *)buttonGroup->selected()->text().local8Bit().data());
break;
}
case GP_WIDGET_MENU:
{
- QComboBox *comboBox = static_cast<QComboBox *>(m_wmap[widget]);
+ TQComboBox *comboBox = static_cast<TQComboBox *>(m_wmap[widget]);
gp_widget_set_value(widget, (void *)comboBox->currentText().local8Bit().data());
break;
diff --git a/kamera/kcontrol/kameraconfigdialog.h b/kamera/kcontrol/kameraconfigdialog.h
index 73b2a012..575f4aad 100644
--- a/kamera/kcontrol/kameraconfigdialog.h
+++ b/kamera/kcontrol/kameraconfigdialog.h
@@ -23,9 +23,9 @@
#ifndef __kameraconfigdialog_h__
#define __kameraconfigdialog_h__
-#include <qmap.h>
+#include <tqmap.h>
#include <kdialogbase.h>
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
extern "C" {
#include <gphoto2.h>
@@ -36,18 +36,18 @@ class KameraConfigDialog : public KDialogBase
Q_OBJECT
public:
KameraConfigDialog(Camera *camera, CameraWidget *widget,
- QWidget *parent = 0, const char *name = 0);
+ TQWidget *parent = 0, const char *name = 0);
private slots:
void slotOk();
private:
- void appendWidget(QWidget *parent, CameraWidget *widget);
+ void appendWidget(TQWidget *parent, CameraWidget *widget);
void updateWidgetValue(CameraWidget *widget);
- QMap<CameraWidget *, QWidget *> m_wmap;
+ TQMap<CameraWidget *, TQWidget *> m_wmap;
CameraWidget *m_widgetRoot;
- QTabWidget *m_tabWidget;
+ TQTabWidget *m_tabWidget;
};
#endif
diff --git a/kamera/kcontrol/kameradevice.cpp b/kamera/kcontrol/kameradevice.cpp
index 010bf694..9492934b 100644
--- a/kamera/kcontrol/kameradevice.cpp
+++ b/kamera/kcontrol/kameradevice.cpp
@@ -20,16 +20,16 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qwidgetstack.h>
-#include <qvbuttongroup.h>
-#include <qvgroupbox.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qradiobutton.h>
-#include <qwhatsthis.h>
-#include <qlabel.h>
-#include <qgrid.h>
+#include <tqlayout.h>
+#include <tqwidgetstack.h>
+#include <tqvbuttongroup.h>
+#include <tqvgroupbox.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqradiobutton.h>
+#include <tqwhatsthis.h>
+#include <tqlabel.h>
+#include <tqgrid.h>
#include <klocale.h>
#include <kconfig.h>
@@ -54,7 +54,7 @@ static const int INDEX_SERIAL = 1;
static const int INDEX_USB= 3;
static GPContext *glob_context = 0;
-KCamera::KCamera(const QString &name, const QString &path)
+KCamera::KCamera(const TQString &name, const TQString &path)
{
m_name = name;
m_model = name;
@@ -143,7 +143,7 @@ Camera* KCamera::camera()
return m_camera;
}
-QString KCamera::summary()
+TQString KCamera::summary()
{
int result;
CameraText summary;
@@ -153,7 +153,7 @@ QString KCamera::summary()
result = gp_camera_get_summary(m_camera, &summary, glob_context);
if (result != GP_OK)
return i18n("No camera summary information is available.\n");
- return QString(summary.text);
+ return TQString(summary.text);
}
bool KCamera::configure()
@@ -207,27 +207,27 @@ void KCamera::save(KConfig *config)
config->writeEntry("Path", m_path);
}
-QString KCamera::portName()
+TQString KCamera::portName()
{
- QString port = m_path.left(m_path.find(":")).lower();
+ TQString port = m_path.left(m_path.find(":")).lower();
if (port == "serial") return i18n("Serial");
if (port == "usb") return i18n("USB");
return i18n("Unknown port");
}
-void KCamera::setName(const QString &name)
+void KCamera::setName(const TQString &name)
{
m_name = name;
}
-void KCamera::setModel(const QString &model)
+void KCamera::setModel(const TQString &model)
{
m_model = model;
invalidateCamera();
initInformation();
}
-void KCamera::setPath(const QString &path)
+void KCamera::setPath(const TQString &path)
{
m_path = path;
invalidateCamera();
@@ -252,10 +252,10 @@ bool KCamera::isConfigurable()
return m_abilities.operations & GP_OPERATION_CONFIG;
}
-QStringList KCamera::supportedPorts()
+TQStringList KCamera::supportedPorts()
{
initInformation();
- QStringList ports;
+ TQStringList ports;
if (m_abilities.port & GP_PORT_SERIAL)
ports.append("serial");
if (m_abilities.port & GP_PORT_USB)
@@ -270,70 +270,70 @@ CameraAbilities KCamera::abilities()
// ---------- KameraSelectCamera ------------
-KameraDeviceSelectDialog::KameraDeviceSelectDialog(QWidget *parent, KCamera *device)
+KameraDeviceSelectDialog::KameraDeviceSelectDialog(TQWidget *parent, KCamera *device)
: KDialogBase(parent, "kkameradeviceselect", true, i18n("Select Camera Device"), Ok | Cancel, Ok, true)
{
m_device = device;
- connect(m_device, SIGNAL(error(const QString &)),
- SLOT(slot_error(const QString &)));
- connect(m_device, SIGNAL(error(const QString &, const QString &)),
- SLOT(slot_error(const QString &, const QString &)));
+ connect(m_device, TQT_SIGNAL(error(const TQString &)),
+ TQT_SLOT(slot_error(const TQString &)));
+ connect(m_device, TQT_SIGNAL(error(const TQString &, const TQString &)),
+ TQT_SLOT(slot_error(const TQString &, const TQString &)));
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
// a layout with vertical boxes
- QHBoxLayout *topLayout = new QHBoxLayout(page, 0, KDialog::spacingHint());
+ TQHBoxLayout *topLayout = new TQHBoxLayout(page, 0, KDialog::spacingHint());
// the models list
m_modelSel = new KListView(page);
topLayout->addWidget( m_modelSel );
m_modelSel->addColumn(i18n("Supported Cameras"));
- m_modelSel->setColumnWidthMode(0, QListView::Maximum);
- connect(m_modelSel, SIGNAL(selectionChanged(QListViewItem *)),
- SLOT(slot_setModel(QListViewItem *)));
+ m_modelSel->setColumnWidthMode(0, TQListView::Maximum);
+ connect(m_modelSel, TQT_SIGNAL(selectionChanged(TQListViewItem *)),
+ TQT_SLOT(slot_setModel(TQListViewItem *)));
// make sure listview only as wide as it needs to be
- m_modelSel->setSizePolicy(QSizePolicy(QSizePolicy::Maximum,
- QSizePolicy::Preferred));
+ m_modelSel->setSizePolicy(TQSizePolicy(TQSizePolicy::Maximum,
+ TQSizePolicy::Preferred));
- QVBoxLayout *rightLayout = new QVBoxLayout(0L, 0, KDialog::spacingHint());
+ TQVBoxLayout *rightLayout = new TQVBoxLayout(0L, 0, KDialog::spacingHint());
topLayout->addLayout( rightLayout );
- m_portSelectGroup = new QVButtonGroup(i18n("Port"), page);
+ m_portSelectGroup = new TQVButtonGroup(i18n("Port"), page);
rightLayout->addWidget(m_portSelectGroup);
- m_portSettingsGroup = new QVGroupBox(i18n("Port Settings"), page);
+ m_portSettingsGroup = new TQVGroupBox(i18n("Port Settings"), page);
rightLayout->addWidget(m_portSettingsGroup);
// Create port type selection radiobuttons.
- m_serialRB = new QRadioButton(i18n("Serial"), m_portSelectGroup);
+ m_serialRB = new TQRadioButton(i18n("Serial"), m_portSelectGroup);
m_portSelectGroup->insert(m_serialRB, INDEX_SERIAL);
- QWhatsThis::add(m_serialRB, i18n("If this option is checked, the camera would have to be connected one of the serial ports (known as COM in Microsoft Windows) in your computer."));
- m_USBRB = new QRadioButton(i18n("USB"), m_portSelectGroup);
+ TQWhatsThis::add(m_serialRB, i18n("If this option is checked, the camera would have to be connected one of the serial ports (known as COM in Microsoft Windows) in your computer."));
+ m_USBRB = new TQRadioButton(i18n("USB"), m_portSelectGroup);
m_portSelectGroup->insert(m_USBRB, INDEX_USB);
- QWhatsThis::add(m_USBRB, i18n("If this option is checked, the camera would have to be connected to one of the USB slots in your computer or USB hub."));
+ TQWhatsThis::add(m_USBRB, i18n("If this option is checked, the camera would have to be connected to one of the USB slots in your computer or USB hub."));
// Create port settings widget stack
- m_settingsStack = new QWidgetStack(m_portSettingsGroup);
- connect(m_portSelectGroup, SIGNAL(clicked(int)),
- m_settingsStack, SLOT(raiseWidget(int)));
+ m_settingsStack = new TQWidgetStack(m_portSettingsGroup);
+ connect(m_portSelectGroup, TQT_SIGNAL(clicked(int)),
+ m_settingsStack, TQT_SLOT(raiseWidget(int)));
// none tab
- m_settingsStack->addWidget(new QLabel(i18n("No port type selected."),
+ m_settingsStack->addWidget(new TQLabel(i18n("No port type selected."),
m_settingsStack), INDEX_NONE);
// serial tab
- QGrid *grid = new QGrid(2, m_settingsStack);
+ TQGrid *grid = new TQGrid(2, m_settingsStack);
grid->setSpacing(KDialog::spacingHint());
- new QLabel(i18n("Port:"), grid);
- m_serialPortCombo = new QComboBox(TRUE, grid);
- QWhatsThis::add(m_serialPortCombo, i18n("Here you should choose the serial port you connect the camera to."));
+ new TQLabel(i18n("Port:"), grid);
+ m_serialPortCombo = new TQComboBox(TRUE, grid);
+ TQWhatsThis::add(m_serialPortCombo, i18n("Here you should choose the serial port you connect the camera to."));
m_settingsStack->addWidget(grid, INDEX_SERIAL);
- grid = new QGrid(2, m_settingsStack);
+ grid = new TQGrid(2, m_settingsStack);
grid->setSpacing(KDialog::spacingHint());
- new QLabel(i18n("Port"), grid);
+ new TQLabel(i18n("Port"), grid);
m_settingsStack->addWidget(new
- QLabel(i18n("No further configuration is required for USB."),
+ TQLabel(i18n("No further configuration is required for USB."),
m_settingsStack), INDEX_USB);
// query gphoto2 for existing serial ports
@@ -347,7 +347,7 @@ KameraDeviceSelectDialog::KameraDeviceSelectDialog(QWidget *parent, KCamera *dev
for (int i = 0; i < gphoto_ports; i++) {
if (gp_port_info_list_get_info(list, i, &info) >= 0) {
if (strncmp(info.path, "serial:", 7) == 0)
- m_serialPortCombo->insertItem(QString::fromLatin1(info.path).mid(7));
+ m_serialPortCombo->insertItem(TQString::fromLatin1(info.path).mid(7));
}
}
gp_port_info_list_free(list);
@@ -376,7 +376,7 @@ bool KameraDeviceSelectDialog::populateCameraListView()
} else {
for(int x = 0; x < numCams; ++x) {
if(gp_abilities_list_get_abilities(m_device->m_abilitylist, x, &a) == GP_OK) {
- new QListViewItem(m_modelSel, a.model);
+ new TQListViewItem(m_modelSel, a.model);
}
}
return true;
@@ -388,7 +388,7 @@ void KameraDeviceSelectDialog::save()
m_device->setModel(m_modelSel->currentItem()->text(0));
if (m_portSelectGroup->selected()) {
- QString type = m_portSelectGroup->selected()->text();
+ TQString type = m_portSelectGroup->selected()->text();
if(type == i18n("Serial"))
m_device->setPath("serial:" + m_serialPortCombo->currentText());
@@ -402,13 +402,13 @@ void KameraDeviceSelectDialog::save()
void KameraDeviceSelectDialog::load()
{
- QString path = m_device->path();
- QString port = path.left(path.find(":")).lower();
+ TQString path = m_device->path();
+ TQString port = path.left(path.find(":")).lower();
if (port == "serial") setPortType(INDEX_SERIAL);
if (port == "usb") setPortType(INDEX_USB);
- QListViewItem *modelItem = m_modelSel->firstChild();
+ TQListViewItem *modelItem = m_modelSel->firstChild();
if( modelItem)
{
do {
@@ -420,13 +420,13 @@ void KameraDeviceSelectDialog::load()
}
}
-void KameraDeviceSelectDialog::slot_setModel(QListViewItem *item)
+void KameraDeviceSelectDialog::slot_setModel(TQListViewItem *item)
{
enableButtonOK(true);
m_portSelectGroup->setEnabled(true);
m_portSettingsGroup->setEnabled(true);
- QString model = item->text(0);
+ TQString model = item->text(0);
CameraAbilities abilities;
int index = gp_abilities_list_lookup_model(m_device->m_abilitylist, model.local8Bit().data());
@@ -441,7 +441,7 @@ void KameraDeviceSelectDialog::slot_setModel(QListViewItem *item)
m_USBRB->setEnabled(abilities.port & GP_PORT_USB);
// turn off any selected port
- QButton *selected = m_portSelectGroup->selected();
+ TQButton *selected = m_portSelectGroup->selected();
if(selected != NULL)
selected->toggle();
@@ -465,12 +465,12 @@ void KameraDeviceSelectDialog::setPortType(int type)
m_settingsStack->raiseWidget(type);
}
-void KameraDeviceSelectDialog::slot_error(const QString &message)
+void KameraDeviceSelectDialog::slot_error(const TQString &message)
{
KMessageBox::error(this, message);
}
-void KameraDeviceSelectDialog::slot_error(const QString &message, const QString &details)
+void KameraDeviceSelectDialog::slot_error(const TQString &message, const TQString &details)
{
KMessageBox::detailedError(this, message, details);
}
diff --git a/kamera/kcontrol/kameradevice.h b/kamera/kcontrol/kameradevice.h
index aae24e02..34594f4e 100644
--- a/kamera/kcontrol/kameradevice.h
+++ b/kamera/kcontrol/kameradevice.h
@@ -23,52 +23,52 @@
#ifndef __kameradevice_h__
#define __kameradevice_h__
-#include <qmap.h>
+#include <tqmap.h>
#include <kdialogbase.h>
#include <config.h>
class KConfig;
-class QString;
+class TQString;
class KListView;
-class QWidgetStack;
-class QVButtonGroup;
-class QVGroupBox;
-class QComboBox;
-class QLineEdit;
-class QRadioButton;
-
-class KCamera : public QObject {
+class TQWidgetStack;
+class TQVButtonGroup;
+class TQVGroupBox;
+class TQComboBox;
+class TQLineEdit;
+class TQRadioButton;
+
+class KCamera : public TQObject {
friend class KameraDeviceSelectDialog;
Q_OBJECT
public:
- KCamera(const QString &name, const QString &path);
+ KCamera(const TQString &name, const TQString &path);
~KCamera();
void invalidateCamera();
bool configure();
void load(KConfig *m_config);
void save(KConfig *m_config);
bool test();
- QStringList supportedPorts();
+ TQStringList supportedPorts();
Camera* camera();
- QString name() const { return m_name ; }
- QString model() const { return m_model; }
- QString path() const { return m_path; }
- QString portName();
+ TQString name() const { return m_name ; }
+ TQString model() const { return m_model; }
+ TQString path() const { return m_path; }
+ TQString portName();
- QString summary();
+ TQString summary();
CameraAbilities abilities();
- void setName(const QString &name);
- void setModel(const QString &model);
- void setPath(const QString &path);
+ void setName(const TQString &name);
+ void setModel(const TQString &model);
+ void setPath(const TQString &path);
bool isTestable() const;
bool isConfigurable();
signals:
- void error(const QString &message);
- void error(const QString &message, const QString &details);
+ void error(const TQString &message);
+ void error(const TQString &message, const TQString &details);
protected:
bool initInformation();
@@ -78,9 +78,9 @@ protected:
Camera *m_camera;
// KConfig *m_config;
- QString m_name; // the camera's real name
- QString m_model;
- QString m_path;
+ TQString m_name; // the camera's real name
+ TQString m_model;
+ TQString m_path;
CameraAbilities m_abilities;
CameraAbilitiesList *m_abilitylist;
};
@@ -89,13 +89,13 @@ class KameraDeviceSelectDialog : public KDialogBase
{
Q_OBJECT
public:
- KameraDeviceSelectDialog(QWidget *parent, KCamera *device);
+ KameraDeviceSelectDialog(TQWidget *parent, KCamera *device);
void save();
void load();
protected slots:
- void slot_setModel(QListViewItem *item);
- void slot_error(const QString &message);
- void slot_error(const QString &message, const QString &details);
+ void slot_setModel(TQListViewItem *item);
+ void slot_error(const TQString &message);
+ void slot_error(const TQString &message, const TQString &details);
protected:
KCamera *m_device;
@@ -104,14 +104,14 @@ protected:
// port settings widgets
KListView *m_modelSel;
- QLineEdit *m_nameEdit;
- QWidgetStack *m_settingsStack;
- QVButtonGroup *m_portSelectGroup;
- QVGroupBox *m_portSettingsGroup;
- QComboBox *m_serialPortCombo;
+ TQLineEdit *m_nameEdit;
+ TQWidgetStack *m_settingsStack;
+ TQVButtonGroup *m_portSelectGroup;
+ TQVGroupBox *m_portSettingsGroup;
+ TQComboBox *m_serialPortCombo;
// port selection radio buttons
- QRadioButton *m_serialRB;
- QRadioButton *m_USBRB;
+ TQRadioButton *m_serialRB;
+ TQRadioButton *m_USBRB;
};
#endif
diff --git a/kamera/kioslave/kamera.cpp b/kamera/kioslave/kamera.cpp
index ab4eb469..5aefd632 100644
--- a/kamera/kioslave/kamera.cpp
+++ b/kamera/kioslave/kamera.cpp
@@ -29,8 +29,8 @@
#include <signal.h>
#include <errno.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kdebug.h>
#include <kinstance.h>
@@ -79,7 +79,7 @@ int kdemain(int argc, char **argv)
return 0;
}
-KameraProtocol::KameraProtocol(const QCString &pool, const QCString &app)
+KameraProtocol::KameraProtocol(const TQCString &pool, const TQCString &app)
: SlaveBase("camera", pool, app),
m_camera(NULL)
{
@@ -104,7 +104,7 @@ m_camera(NULL)
//
// The existance of a lockfile is used to signify "please give up camera".
//
-void KameraProtocol::special(const QByteArray&) {
+void KameraProtocol::special(const TQByteArray&) {
kdDebug(7123) << "KameraProtocol::special() at " << getpid() << endl;
if (!actiondone && cameraopen) {
@@ -136,7 +136,7 @@ KameraProtocol::~KameraProtocol()
}
// initializes the camera for usage - should be done before operations over the wire
-bool KameraProtocol::openCamera(QString &str) {
+bool KameraProtocol::openCamera(TQString &str) {
idletime = 0;
actiondone = true;
if (!m_camera) {
@@ -188,8 +188,8 @@ void KameraProtocol::closeCamera(void)
return;
}
-static QString fix_foldername(QString ofolder) {
- QString folder = ofolder;
+static TQString fix_foldername(TQString ofolder) {
+ TQString folder = ofolder;
if (folder.length() > 1) {
while ((folder.length()>1) && (folder.right(1) == "/"))
folder = folder.left(folder.length()-1);
@@ -227,7 +227,7 @@ void KameraProtocol::get(const KURL &url)
error(KIO::ERR_DOES_NOT_EXIST, url.path()); \
return; \
} \
- QByteArray chunkDataBuffer; \
+ TQByteArray chunkDataBuffer; \
chunkDataBuffer.setRawData(xx.text, strlen(xx.text)); \
data(chunkDataBuffer); \
processedSize(strlen(xx.text)); \
@@ -329,7 +329,7 @@ void KameraProtocol::get(const KURL &url)
// already.
if ((fileSize > 0) && (fileSize - m_fileSize)>0) {
unsigned long written = 0;
- QByteArray chunkDataBuffer;
+ TQByteArray chunkDataBuffer;
// We need to split it up here. Someone considered it funny
// to discard any data() larger than 16MB.
@@ -518,9 +518,9 @@ void KameraProtocol::listDir(const KURL &url)
if (url.host().isEmpty()) {
KURL xurl;
// List the available cameras
- QStringList groupList = m_config->groupList();
+ TQStringList groupList = m_config->groupList();
kdDebug(7123) << "Found cameras: " << groupList.join(", ") << endl;
- QStringList::Iterator it;
+ TQStringList::Iterator it;
UDSEntry entry;
UDSAtom atom;
@@ -531,8 +531,8 @@ void KameraProtocol::listDir(const KURL &url)
* - List all saved and possible offline cameras.
* - List all autodetected and not yet printed cameras.
*/
- QMap<QString,QString> ports, names;
- QMap<QString,int> modelcnt;
+ TQMap<TQString,TQString> ports, names;
+ TQMap<TQString,int> modelcnt;
/* Autodetect USB cameras ... */
GPContext *glob_context = NULL;
@@ -578,7 +578,7 @@ void KameraProtocol::listDir(const KURL &url)
ports.remove("usb:");
for (it = groupList.begin(); it != groupList.end(); it++) {
- QString m_cfgPath;
+ TQString m_cfgPath;
if (*it == "<default>")
continue;
@@ -619,7 +619,7 @@ void KameraProtocol::listDir(const KURL &url)
listEntry(entry, false);
}
- QMap<QString,QString>::iterator portsit;
+ TQMap<TQString,TQString>::iterator portsit;
for (portsit = ports.begin(); portsit != ports.end(); portsit++) {
entry.clear();
@@ -699,7 +699,7 @@ void KameraProtocol::listDir(const KURL &url)
for(int i = 0; i < gp_list_count(dirList); ++i) {
gp_list_get_name(dirList, i, &name);
- translateDirectoryToUDS(entry, QString::fromLocal8Bit(name));
+ translateDirectoryToUDS(entry, TQString::fromLocal8Bit(name));
listEntry(entry, false);
}
@@ -709,7 +709,7 @@ void KameraProtocol::listDir(const KURL &url)
gp_list_get_name(fileList, i, &name);
// we want to know more info about files (size, type...)
gp_camera_file_get_info(m_camera, tocstr(url.path()), name, &info, m_context);
- translateFileToUDS(entry, info, QString::fromLocal8Bit(name));
+ translateFileToUDS(entry, info, TQString::fromLocal8Bit(name));
listEntry(entry, false);
}
if (!url.path().compare("/")) {
@@ -737,7 +737,7 @@ void KameraProtocol::listDir(const KURL &url)
finished();
}
-void KameraProtocol::setHost(const QString& host, int port, const QString& user, const QString& pass )
+void KameraProtocol::setHost(const TQString& host, int port, const TQString& user, const TQString& pass )
{
kdDebug(7123) << "KameraProtocol::setHost(" << host << ", " << port << ", " << user << ", " << pass << ")" << endl;
int gpr, idx;
@@ -805,7 +805,7 @@ void KameraProtocol::setHost(const QString& host, int port, const QString& user,
gp_camera_set_port_speed(m_camera, 0); // TODO: the value needs to be configurable
kdDebug(7123) << "Opening camera model " << user << " at " << host << endl;
- QString errstr;
+ TQString errstr;
if (!openCamera(errstr)) {
kdDebug(7123) << "Unable to init camera: " << gp_result_as_string(gpr) << endl;
error(KIO::ERR_SERVICE_NOT_AVAILABLE, errstr);
@@ -821,7 +821,7 @@ void KameraProtocol::reparseConfiguration(void)
}
// translate a simple text to a UDS entry
-void KameraProtocol::translateTextToUDS(UDSEntry &udsEntry, const QString &fn,
+void KameraProtocol::translateTextToUDS(UDSEntry &udsEntry, const TQString &fn,
const char *text
) {
UDSAtom atom;
@@ -846,7 +846,7 @@ void KameraProtocol::translateTextToUDS(UDSEntry &udsEntry, const QString &fn,
}
// translate a CameraFileInfo to a UDSEntry which we can return as a directory listing entry
-void KameraProtocol::translateFileToUDS(UDSEntry &udsEntry, const CameraFileInfo &info, QString name)
+void KameraProtocol::translateFileToUDS(UDSEntry &udsEntry, const CameraFileInfo &info, TQString name)
{
UDSAtom atom;
@@ -858,7 +858,7 @@ void KameraProtocol::translateFileToUDS(UDSEntry &udsEntry, const CameraFileInfo
atom.m_uds = UDS_NAME;
if (info.file.fields & GP_FILE_INFO_NAME)
- atom.m_str = QString::fromLocal8Bit(info.file.name);
+ atom.m_str = TQString::fromLocal8Bit(info.file.name);
else
atom.m_str = name;
udsEntry.append(atom);
@@ -881,7 +881,7 @@ void KameraProtocol::translateFileToUDS(UDSEntry &udsEntry, const CameraFileInfo
if (info.file.fields & GP_FILE_INFO_TYPE) {
atom.m_uds = UDS_MIME_TYPE;
- atom.m_str = QString::fromLatin1(info.file.type);
+ atom.m_str = TQString::fromLatin1(info.file.type);
udsEntry.append(atom);
}
@@ -903,7 +903,7 @@ void KameraProtocol::translateFileToUDS(UDSEntry &udsEntry, const CameraFileInfo
}
// translate a directory name to a UDSEntry which we can return as a directory listing entry
-void KameraProtocol::translateDirectoryToUDS(UDSEntry &udsEntry, const QString &dirname)
+void KameraProtocol::translateDirectoryToUDS(UDSEntry &udsEntry, const TQString &dirname)
{
UDSAtom atom;
@@ -942,7 +942,7 @@ bool KameraProtocol::cameraSupportsPreview(void)
return (m_abilities.file_operations & GP_FILE_OPERATION_PREVIEW);
}
-int KameraProtocol::readCameraFolder(const QString &folder, CameraList *dirList, CameraList *fileList)
+int KameraProtocol::readCameraFolder(const TQString &folder, CameraList *dirList, CameraList *fileList)
{
kdDebug(7123) << "KameraProtocol::readCameraFolder(" << folder << ")" << endl;
@@ -975,7 +975,7 @@ void frontendProgressUpdate(
if (fileSize > 0) {
// XXX using assign() here causes segfault, prolly because
// gp_file_free is called before chunkData goes out of scope
- QByteArray chunkDataBuffer;
+ TQByteArray chunkDataBuffer;
chunkDataBuffer.setRawData(fileData + object->getFileSize(), fileSize - object->getFileSize());
// Note: this will fail with sizes > 16MB ...
object->data(chunkDataBuffer);
@@ -1021,7 +1021,7 @@ unsigned int frontendProgressStart(
vsnprintf(status, 300, format, args);
#endif
- object->infoMessage(QString::fromLocal8Bit(status));
+ object->infoMessage(TQString::fromLocal8Bit(status));
delete [] status;
object->totalSize((int)totalsize); // hack: call slot directly
return GP_OK;
@@ -1061,6 +1061,6 @@ static void frontendCameraStatus(GPContext * /*context*/, const char *format, va
status=new char[300];
vsnprintf(status, 300, format, args);
#endif
- object->infoMessage(QString::fromLocal8Bit(status));
+ object->infoMessage(TQString::fromLocal8Bit(status));
delete [] status;
}
diff --git a/kamera/kioslave/kamera.h b/kamera/kioslave/kamera.h
index 765f6560..b75a0185 100644
--- a/kamera/kioslave/kamera.h
+++ b/kamera/kioslave/kamera.h
@@ -32,15 +32,15 @@ class KSimpleConfig;
class KameraProtocol : public KIO::SlaveBase
{
public:
- KameraProtocol(const QCString &pool, const QCString &app);
+ KameraProtocol(const TQCString &pool, const TQCString &app);
virtual ~KameraProtocol();
virtual void get(const KURL &url);
virtual void stat(const KURL &url);
virtual void del(const KURL &url, bool isFile);
- virtual void setHost(const QString& host, int port, const QString& user, const QString& pass );
+ virtual void setHost(const TQString& host, int port, const TQString& user, const TQString& pass );
virtual void listDir(const KURL &url);
- virtual void special(const QByteArray &data);
+ virtual void special(const TQByteArray &data);
CameraFile *getFile() { return m_file; }
int getFileSize() { return m_fileSize; }
@@ -54,24 +54,24 @@ private:
GPContext *m_context;
void reparseConfiguration(void);
- bool openCamera(QString& str);
+ bool openCamera(TQString& str);
bool openCamera(void ) {
- QString errstr;
+ TQString errstr;
return openCamera(errstr);
}
void closeCamera(void);
void statRoot(void);
void statRegular(const KURL &url);
- void translateTextToUDS(KIO::UDSEntry &udsEntry, const QString &info, const char *txt);
- void translateFileToUDS(KIO::UDSEntry &udsEntry, const CameraFileInfo &info, QString name);
- void translateDirectoryToUDS(KIO::UDSEntry &udsEntry, const QString &dirname);
+ void translateTextToUDS(KIO::UDSEntry &udsEntry, const TQString &info, const char *txt);
+ void translateFileToUDS(KIO::UDSEntry &udsEntry, const CameraFileInfo &info, TQString name);
+ void translateDirectoryToUDS(KIO::UDSEntry &udsEntry, const TQString &dirname);
bool cameraSupportsPreview(void);
bool cameraSupportsDel(void);
bool cameraSupportsPut(void);
- int readCameraFolder(const QString &folder, CameraList *dirList, CameraList *fileList);
+ int readCameraFolder(const TQString &folder, CameraList *dirList, CameraList *fileList);
- QString m_lockfile;
+ TQString m_lockfile;
int idletime;
int m_fileSize;